""" Shared configuration constants for the cronjob scheduler. This module centralizes all hardcoded constants that were previously scattered throughout the codebase. Import from here instead of hardcoding. """ from __future__ import annotations # Feishu API endpoints FEISHU_TOKEN_URL = "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal" FEISHU_MESSAGE_URL = "https://open.feishu.cn/open-apis/im/v1/messages" # Feishu message parameters FEISHU_RECEIVE_ID_TYPE = "open_id" # Hardcoded Feishu recipient (Wang Bing - team admin) FEISHU_DEFAULT_RECIPIENT_OPEN_ID = "ou_f442e20fd980363ea486b5a6cd8d2a2f" # Job execution timeout in seconds (10 minutes) JOB_EXECUTION_TIMEOUT_SECONDS = 600 # Log directory DEFAULT_LOGS_DIR_NAME = "CRONJOB_LOGS" # Environment variable prefixes for cronjob credentials CRONJOB_ENV_PREFIXES = ("CRONJOB_", "MINIMAX_", "GITHUB_") # Config file names CRONJOB_CONFIG_FILENAME = "cronjob.json" CRONJOB_CONFIG_FALLBACK_DIR = "_config" CRONJOB_JOBS_FILENAME = "jobs.json" # Valid agent roles VALID_AGENT_ROLES = frozenset({"team-admin", "team-workflow", "team-code-expert"}) # Default bashrc path DEFAULT_BASHRC = "~/.bashrc" # API timeout in seconds FEISHU_API_TIMEOUT_SECONDS = 10 # Date format for log timestamps LOG_TIMESTAMP_FORMAT = "%Y-%m-%d %H:%M:%S" # Date format for log file names LOG_FILENAME_DATE_FORMAT = "%Y%m%d" # Log prefix format LOG_PREFIX_FORMAT = "[{timestamp}] [{agent_role}] {message}"