# Copyright (C) 2025-2026 AKIOUD AI, SAS <contact@akioud.ai>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.

"""
Application constants for AKIOS

Fixed values that should not be user-configurable.
Separated from defaults.py for better organization.
"""

# Security violation error patterns for reliable detection in engine
SECURITY_VIOLATION_PATTERNS = {
    'quota', 'limit', 'security', 'not in allowed list', 'command blocked',
    'security violation',
    'access denied', 'permission denied', 'unauthorized'
}

# Workflow execution constants
DEFAULT_WORKFLOW_TIMEOUT = 1800.0  # 30 minutes in seconds
TEMPLATE_SUBSTITUTION_MAX_DEPTH = 10

# Token estimation fallbacks (characters per token)
ROUGH_TOKEN_ESTIMATION_RATIO = 4

# Audit event metadata keys
AUDIT_ERROR_CONTEXT_KEY = 'error_context'
AUDIT_EXECUTION_TIME_KEY = 'execution_time'
AUDIT_WORKFLOW_NAME_KEY = 'workflow_name'
AUDIT_STEP_ID_KEY = 'step_id'
