/**
 * Crewly Cross-Domain Constants
 *
 * This file contains constants shared across all Crewly domains:
 * - Backend (Express.js server)
 * - Frontend (React application)
 * - CLI (Command-line interface)
 * - MCP Server (Model Context Protocol server)
 *
 * Domain-specific constants should remain in their respective constants.ts files.
 */
/**
 * Crewly core system identifiers and names
 */
export declare const CREWLY_CONSTANTS: {
    /**
     * Session and orchestrator configuration
     */
    readonly SESSIONS: {
        /** Default orchestrator session name used across all domains */
        readonly ORCHESTRATOR_NAME: "crewly-orc";
        /** Default timeout for agent initialization (2 minutes) */
        readonly DEFAULT_TIMEOUT: 120000;
        /** Interval for checking agent registration status (5 seconds) */
        readonly REGISTRATION_CHECK_INTERVAL: 5000;
        /** Cache timeout for Claude detection (30 seconds) */
        readonly CLAUDE_DETECTION_CACHE_TIMEOUT: 30000;
        /** Default shell for terminal sessions, /bin/bash, /bin/zsh */
        readonly DEFAULT_SHELL: "/bin/bash";
    };
    /**
     * File system paths and directory structure
     */
    readonly PATHS: {
        /** Crewly home directory name */
        readonly CREWLY_HOME: ".crewly";
        /** Teams configuration file */
        readonly TEAMS_FILE: "teams.json";
        /** Projects configuration file */
        readonly PROJECTS_FILE: "projects.json";
        /** Runtime state file */
        readonly RUNTIME_FILE: "runtime.json";
        /** Scheduled messages file */
        readonly SCHEDULED_MESSAGES_FILE: "scheduled-messages.json";
        /** Message delivery logs file */
        readonly MESSAGE_DELIVERY_LOGS_FILE: "message-delivery-logs.json";
        /** Configuration directory */
        readonly CONFIG_DIR: "config";
        /** System prompts directory */
        readonly PROMPTS_DIR: "prompts";
        /** Tasks directory */
        readonly TASKS_DIR: "tasks";
        /** Specifications directory */
        readonly SPECS_DIR: "specs";
        /** Agent memory directory */
        readonly MEMORY_DIR: "memory";
        /** Knowledge documents directory */
        readonly DOCS_DIR: "docs";
        /** Knowledge documents index file */
        readonly DOCS_INDEX_FILE: "docs-index.json";
        /** Server logs directory */
        readonly LOGS_DIR: "logs";
        /** Session PTY logs subdirectory (under LOGS_DIR) */
        readonly SESSION_LOGS_DIR: "sessions";
        /** Bug reports directory */
        readonly BUG_REPORTS_DIR: "bug-reports";
        /** Skills directory (under CREWLY_HOME) */
        readonly SKILLS_DIR: "skills";
        /** Agent skills catalog file (under SKILLS_DIR) */
        readonly SKILLS_CATALOG_FILE: "AGENT_SKILLS_CATALOG.md";
    };
    /**
     * Agent status enumeration - represents agent lifecycle states
     * Lifecycle: inactive -> starting -> started -> active
     */
    readonly AGENT_STATUSES: {
        /** Agent is not running or has been stopped */
        readonly INACTIVE: "inactive";
        /** Terminal/PTY session is being created */
        readonly STARTING: "starting";
        /** Runtime (Claude Code, etc.) is running but agent hasn't registered yet */
        readonly STARTED: "started";
        /** Agent has registered and is fully operational */
        readonly ACTIVE: "active";
        /** Agent was active but has been suspended to free resources (idle timeout) */
        readonly SUSPENDED: "suspended";
        /** @deprecated Use STARTING instead - kept for backward compatibility */
        readonly ACTIVATING: "activating";
    };
    /**
     * Working status enumeration - represents current agent activity
     */
    readonly WORKING_STATUSES: {
        /** Agent is idle and available for tasks */
        readonly IDLE: "idle";
        /** Agent is currently processing a task */
        readonly IN_PROGRESS: "in_progress";
    };
    /**
     * Agent roles available in the system
     */
    readonly ROLES: {
        /** System orchestrator - coordinates all activities */
        readonly ORCHESTRATOR: "orchestrator";
        /** Project manager - handles project-level coordination */
        readonly PROJECT_MANAGER: "pm";
        /** Technical project manager - technical leadership */
        readonly TECH_LEAD: "tpm";
        /** Software developer - implements features */
        readonly DEVELOPER: "developer";
        /** Quality assurance engineer - testing and validation */
        readonly QA: "qa";
        /** DevOps engineer - deployment and infrastructure */
        readonly DEVOPS: "devops";
    };
    /**
     * Special agent identifiers for system-level agents
     */
    readonly AGENT_IDS: {
        /** Orchestrator agent identifier - used in teamAgentStatus.json */
        readonly ORCHESTRATOR_ID: "orchestrator";
    };
    /**
     * Human-readable role display names
     */
    readonly ROLE_DISPLAY_NAMES: {
        readonly orchestrator: "Orchestrator";
        readonly pm: "Project Manager";
        readonly tpm: "Technical Project Manager";
        readonly developer: "Developer";
        readonly qa: "Quality Assurance";
        readonly devops: "DevOps Engineer";
    };
    /**
     * Orchestrator-specific configuration
     */
    readonly ORCHESTRATOR: {
        /** Display name for the orchestrator role */
        readonly DISPLAY_NAME: "Orchestrator";
        /** Default orchestrator window name */
        readonly WINDOW_NAME: "Crewly Orchestrator";
        /** Crewly session name prefix pattern */
        readonly SESSION_PREFIX: "crewly_";
    };
};
/**
 * Convenient agent identity references combining multiple constants
 */
export declare const AGENT_IDENTITY_CONSTANTS: {
    /**
     * Orchestrator agent identity - combines ID, session name, and role
     */
    readonly ORCHESTRATOR: {
        /** Agent identifier used in teamAgentStatus.json */
        readonly ID: "orchestrator";
        /** PTY session name */
        readonly SESSION_NAME: "crewly-orc";
        /** Agent role */
        readonly ROLE: "orchestrator";
    };
};
/**
 * Process exit codes used for inter-process communication between the CLI
 * parent process and the backend child process.
 */
export declare const PROCESS_EXIT_CODES: {
    /** Normal shutdown — do not respawn */
    readonly SUCCESS: 0;
    /** Error — do not respawn */
    readonly ERROR: 1;
    /** Graceful restart requested — CLI should respawn the backend */
    readonly RESTART_REQUESTED: 120;
};
/**
 * Web server and API configuration
 */
export declare const WEB_CONSTANTS: {
    /**
     * Default server ports
     */
    readonly PORTS: {
        /** Backend API server default port */
        readonly BACKEND: 8787;
        /** Frontend development server default port */
        readonly FRONTEND: 8788;
    };
    /**
     * API endpoint paths
     */
    readonly ENDPOINTS: {
        /** Health check endpoint */
        readonly HEALTH: "/health";
        /** Base API path */
        readonly API_BASE: "/api";
        /** Teams management endpoints */
        readonly TEAMS: "/api/teams";
        /** Projects management endpoints */
        readonly PROJECTS: "/api/projects";
        /** Orchestrator control endpoints */
        readonly ORCHESTRATOR: "/api/orchestrator";
        /** Terminal operations endpoints */
        readonly TERMINAL: "/api/terminal";
        /** Task management endpoints */
        readonly TASKS: "/api/tasks";
        /** Factory SSE endpoint */
        readonly FACTORY_SSE: "/api/factory/sse";
    };
    /**
     * SSE (Server-Sent Events) configuration
     */
    readonly SSE: {
        /** Backend polling interval in milliseconds (3 seconds) */
        readonly POLL_INTERVAL: 3000;
        /** Heartbeat interval in milliseconds (30 seconds) */
        readonly HEARTBEAT_INTERVAL: 30000;
        /** Maximum reconnection attempts before fallback to polling */
        readonly MAX_RECONNECT_ATTEMPTS: 5;
        /** Base delay between reconnection attempts (1 second) */
        readonly BASE_RECONNECT_DELAY: 1000;
        /** Maximum reconnection delay (30 seconds) */
        readonly MAX_RECONNECT_DELAY: 30000;
        /** Fallback polling interval when SSE fails (5 seconds) */
        readonly FALLBACK_POLL_INTERVAL: 5000;
    };
};
/**
 * Timing and interval configurations used across domains
 */
export declare const TIMING_CONSTANTS: {
    /**
     * Retry and timeout configurations
     */
    readonly RETRIES: {
        /** Maximum retry attempts for failed operations */
        readonly MAX_ATTEMPTS: 3;
        /** Base delay between retries (1 second) */
        readonly BASE_DELAY: 1000;
        /** Maximum delay between retries (10 seconds) */
        readonly MAX_DELAY: 10000;
    };
    /**
     * Polling and monitoring intervals
     */
    readonly INTERVALS: {
        /** Health check interval (30 seconds) */
        readonly HEALTH_CHECK: 30000;
        /** Memory cleanup interval (5 minutes) */
        readonly MEMORY_CLEANUP: number;
        /** Status update interval (10 seconds) */
        readonly STATUS_UPDATE: 10000;
        /** Activity monitoring interval (15 seconds) */
        readonly ACTIVITY_MONITOR: 15000;
        /** General cleanup interval (1 minute) */
        readonly CLEANUP: 60000;
        /** Batch operation delay (500ms) */
        readonly BATCH_DELAY: 500;
        /** Rate limit window for short bursts (1 second) */
        readonly RATE_LIMIT_WINDOW: 1000;
        /** Task cleanup interval (5 minutes) */
        readonly TASK_CLEANUP: 300000;
    };
    /**
     * Timeout values for various operations
     */
    readonly TIMEOUTS: {
        /** Claude initialization timeout (45 seconds) */
        readonly CLAUDE_INIT: 45000;
        /** Agent setup timeout (90 seconds) */
        readonly AGENT_SETUP: 90000;
        /** Task completion timeout (5 minutes) */
        readonly TASK_COMPLETION: number;
        /** WebSocket connection timeout (30 seconds) */
        readonly WEBSOCKET: 30000;
        /** Orchestrator setup timeout (30 seconds) */
        readonly ORCHESTRATOR_SETUP: 30000;
        /** Task monitoring and polling intervals (2 seconds) */
        readonly TASK_MONITOR_POLL: 2000;
        /** Health check timeout for individual checks (1 second) */
        readonly HEALTH_CHECK_TIMEOUT: 1000;
        /** HTTP health check timeout for CLI commands (3 seconds) */
        readonly HTTP_HEALTH_CHECK: 3000;
        /** API request timeout for quick calls (2 seconds) */
        readonly API_REQUEST_QUICK: 2000;
        /** Shutdown wait timeout (2 seconds) */
        readonly SHUTDOWN: 2000;
        /** Connection timeout for network requests (10 seconds) */
        readonly CONNECTION: 10000;
        /** Agent default timeout for operations (5 minutes) */
        readonly AGENT_DEFAULT: 300000;
        /** Context refresh interval (30 minutes) */
        readonly CONTEXT_REFRESH: 1800000;
        /** WebSocket ping timeout (60 seconds) */
        readonly WS_PING: 60000;
        /** WebSocket ping interval (25 seconds) */
        readonly WS_PING_INTERVAL: 25000;
        /** Backup interval (1 hour) */
        readonly BACKUP: 3600000;
        /** Rate limit window (15 minutes) */
        readonly RATE_LIMIT_WINDOW: 900000;
        /** Command timestamp offset (5 minutes) */
        readonly COMMAND_TIMESTAMP_OFFSET: 300000;
        /** Command timestamp offset long (10 minutes) */
        readonly COMMAND_TIMESTAMP_OFFSET_LONG: 600000;
    };
};
/**
 * Message handling and communication constants
 */
export declare const MESSAGE_CONSTANTS: {
    /**
     * Message size and chunking limits
     */
    readonly LIMITS: {
        /** Maximum message size before chunking (1500 characters) */
        readonly CHUNK_SIZE: 1500;
        /** Small chunk size to avoid paste detection (200 characters) */
        readonly SMALL_CHUNK_SIZE: 200;
        /** Maximum output buffer size for streaming */
        readonly MAX_BUFFER_SIZE: 100;
    };
    /**
     * Message types and categories
     */
    readonly TYPES: {
        /** System-generated status messages */
        readonly SYSTEM: "system";
        /** User-initiated messages */
        readonly USER: "user";
        /** Agent-to-agent communications */
        readonly AGENT: "agent";
        /** Error and warning messages */
        readonly ERROR: "error";
        /** Broadcast messages to all agents */
        readonly BROADCAST: "broadcast";
    };
};
/**
 * Environment variable names used across domains
 */
export declare const ENV_CONSTANTS: {
    /** PTY session name used for agent identity and heartbeat tracking */
    readonly CREWLY_SESSION_NAME: "CREWLY_SESSION_NAME";
    /** Crewly role identifier */
    readonly CREWLY_ROLE: "CREWLY_ROLE";
    /** API server port */
    readonly API_PORT: "API_PORT";
    /** MCP server port */
    readonly MCP_PORT: "CREWLY_MCP_PORT";
    /** Project path */
    readonly PROJECT_PATH: "PROJECT_PATH";
    /** Agent role */
    readonly AGENT_ROLE: "AGENT_ROLE";
    /** Node environment */
    readonly NODE_ENV: "NODE_ENV";
    /** Development mode flag */
    readonly DEV_MODE: "DEV_MODE";
};
/**
 * Backend-specific configuration constants
 * These constants are primarily used by the Express.js backend server
 */
export declare const BACKEND_CONSTANTS: {
    /**
     * File names and configurations
     */
    readonly FILES: {
        /** Active projects tracking file name */
        readonly ACTIVE_PROJECTS_FILE: "active_projects.json";
        /** Task tracking file name */
        readonly TASK_TRACKING_FILE: "in_progress_tasks.json";
        /** Communication log file name */
        readonly COMMUNICATION_LOG_FILE: "communication.log";
        /** Configuration file names */
        readonly CONFIG_FILE_NAMES: {
            readonly CONFIG_JSON: "config.json";
            readonly APP_JSON: "app.json";
        };
        /** Log file naming patterns */
        readonly LOG_FILE_PREFIX: "crewly-";
        readonly LOG_FILE_EXTENSION: ".log";
    };
    /**
     * Additional directory names not covered in CREWLY_CONSTANTS.PATHS
     */
    readonly ADDITIONAL_DIRS: {
        readonly LOGS: "logs";
        readonly DATA: "data";
    };
    /**
     * HTTP and network configuration
     */
    readonly NETWORK: {
        /** Default CORS origin */
        readonly DEFAULT_CORS_ORIGIN: "http://localhost:8788";
        /** Allowed HTTP methods */
        readonly ALLOWED_HTTP_METHODS: readonly ["GET", "POST"];
        /** HTTP status codes used in the application */
        readonly HTTP_STATUS_CODES: {
            readonly OK: 200;
            readonly CREATED: 201;
            readonly BAD_REQUEST: 400;
            readonly NOT_FOUND: 404;
            readonly INTERNAL_SERVER_ERROR: 500;
            readonly SERVICE_UNAVAILABLE: 503;
        };
        /** Maximum request body size (10MB) */
        readonly MAX_REQUEST_BODY_SIZE: "10mb";
    };
    /**
     * API endpoint paths
     */
    readonly API_ENDPOINTS: {
        readonly ORCHESTRATOR_SETUP: "/api/orchestrator/setup";
        readonly TEAMS: "/api/teams";
        readonly TEAM_START: "/api/teams/:id/start";
        readonly HEALTH: "/health";
        readonly API_BASE: "/api";
        readonly PROJECTS: "/projects";
        readonly MONITORING: "/monitoring";
        readonly SYSTEM: "/system";
    };
    /**
     * Orchestrator command identifiers
     */
    readonly ORCHESTRATOR_COMMANDS: {
        readonly GET_TEAM_STATUS: "get_team_status";
        readonly LIST_PROJECTS: "list_projects";
        readonly LIST_SESSIONS: "list_sessions";
        readonly BROADCAST: "broadcast";
        readonly HELP: "help";
    };
    /**
     * Session command templates (legacy - PTY backend now used)
     */
    readonly SESSION_COMMANDS: {
        /** @deprecated PTY backend now manages sessions internally */
        readonly LIST_SESSIONS: "";
    };
    /**
     * Special key names
     */
    readonly SPECIAL_KEYS: {
        readonly ENTER: "Enter";
        readonly CTRL_C: "C-c";
    };
    /**
     * Initialization script file names
     */
    readonly INIT_SCRIPTS: {
        readonly CLAUDE: "initialize_claude.sh";
    };
    /**
     * Size and limit constants
     */
    readonly LIMITS: {
        /** Maximum file size for context loading (1MB) */
        readonly MAX_CONTEXT_FILE_SIZE_BYTES: 1048576;
        /** Default log entry limit */
        readonly DEFAULT_LOG_LIMIT: 100;
        /** Maximum concurrent monitoring jobs */
        readonly MAX_CONCURRENT_MONITORING_JOBS: 10;
        /** Default log file size limit */
        readonly DEFAULT_LOG_FILE_SIZE: "10m";
    };
    /**
     * Frontend build directory path (relative to backend)
     */
    readonly FRONTEND_DIST_PATH: "../../frontend/dist";
    /**
     * Additional environment variable names
     */
    readonly ADDITIONAL_ENV_VARS: {
        readonly WEB_PORT: "WEB_PORT";
        readonly DEFAULT_CHECK_INTERVAL: "DEFAULT_CHECK_INTERVAL";
        readonly AUTO_COMMIT_INTERVAL: "AUTO_COMMIT_INTERVAL";
        readonly CREWLY_HOME: "CREWLY_HOME";
    };
    /**
     * Orchestrator help text
     */
    readonly ORCHESTRATOR_HELP_TEXT: string;
};
/**
 * Memory system configuration for the two-level memory architecture
 * Agent-level: ~/.crewly/agents/{agentId}/
 * Project-level: project/.crewly/knowledge/
 */
export declare const MEMORY_CONSTANTS: {
    /**
     * Storage paths for memory files
     */
    readonly PATHS: {
        /** Agent memory directory (relative to CREWLY_HOME) */
        readonly AGENTS_DIR: "agents";
        /** Project knowledge directory (relative to project .crewly) */
        readonly KNOWLEDGE_DIR: "knowledge";
        /** Agent session archives directory name (under agent dir) */
        readonly SESSIONS_DIR: "sessions";
        /** Latest session summary file name */
        readonly LATEST_SUMMARY: "latest-summary.md";
        /** Daily log directory (under project .crewly) */
        readonly DAILY_LOG_DIR: "logs/daily";
        /** Goals directory (under project .crewly) */
        readonly GOALS_DIR: "goals";
        /** Goals file */
        readonly GOALS_FILE: "goals.md";
        /** Current focus file */
        readonly FOCUS_FILE: "current_focus.md";
        /** Decisions log file (with retrospective outcomes) */
        readonly DECISIONS_LOG: "decisions_log.md";
        /** Learning accumulation directory (under project .crewly) */
        readonly LEARNING_DIR: "learning";
        /** What worked file */
        readonly WHAT_WORKED_FILE: "what_worked.md";
        /** What failed file */
        readonly WHAT_FAILED_FILE: "what_failed.md";
        /** Global learning directory (under CREWLY_HOME) */
        readonly GLOBAL_LEARNING_DIR: "learning";
        /** Cross-project insights file */
        readonly CROSS_PROJECT_INSIGHTS: "cross_project_insights.md";
        /** Agents index file (under project .crewly) */
        readonly AGENTS_INDEX: "agents-index.json";
    };
    /**
     * File names for agent-level memory
     */
    readonly AGENT_FILES: {
        /** Main memory file */
        readonly MEMORY: "memory.json";
        /** Detailed role knowledge entries */
        readonly ROLE_KNOWLEDGE: "role-knowledge.json";
        /** Agent preferences */
        readonly PREFERENCES: "preferences.json";
        /** Performance metrics */
        readonly PERFORMANCE: "performance.json";
        /** Custom SOPs directory */
        readonly SOP_CUSTOM_DIR: "sop-custom";
    };
    /**
     * File names for project-level memory
     */
    readonly PROJECT_FILES: {
        /** Main index file */
        readonly INDEX: "index.json";
        /** Pattern entries */
        readonly PATTERNS: "patterns.json";
        /** Decision entries */
        readonly DECISIONS: "decisions.json";
        /** Gotcha entries */
        readonly GOTCHAS: "gotchas.json";
        /** Relationship entries */
        readonly RELATIONSHIPS: "relationships.json";
        /** Completed-task ledger (TaskHistoryEntry[]) */
        readonly TASK_HISTORY: "task-history.json";
        /** Human-readable learnings log */
        readonly LEARNINGS: "learnings.md";
    };
    /**
     * Storage limits to keep memory files performant
     */
    readonly LIMITS: {
        /** Maximum entries per category in agent memory */
        readonly MAX_ROLE_KNOWLEDGE_ENTRIES: 500;
        /** Maximum entries per category in project memory */
        readonly MAX_PATTERN_ENTRIES: 200;
        readonly MAX_DECISION_ENTRIES: 100;
        readonly MAX_GOTCHA_ENTRIES: 200;
        readonly MAX_RELATIONSHIP_ENTRIES: 500;
        /** Maximum file size in bytes (1MB) */
        readonly MAX_FILE_SIZE_BYTES: 1048576;
        /** Maximum entries returned in a single query */
        readonly MAX_QUERY_RESULTS: 50;
        /** Minimum confidence to retain during pruning (0-1) */
        readonly MIN_CONFIDENCE_THRESHOLD: 0.2;
        /** Days before low-confidence entries are pruned */
        readonly PRUNE_AFTER_DAYS: 90;
    };
    /**
     * Default values for memory entries
     */
    readonly DEFAULTS: {
        /** Default confidence for new knowledge entries */
        readonly INITIAL_CONFIDENCE: 0.5;
        /** Confidence increase when knowledge is reinforced */
        readonly CONFIDENCE_REINFORCEMENT: 0.1;
        /** Maximum confidence value */
        readonly MAX_CONFIDENCE: 1;
        /** Minimum confidence value */
        readonly MIN_CONFIDENCE: 0;
    };
    /**
     * Schema versioning for migrations
     */
    readonly SCHEMA: {
        /** Current schema version */
        readonly CURRENT_VERSION: 1;
        /** Minimum supported schema version */
        readonly MIN_SUPPORTED_VERSION: 1;
    };
    /**
     * Memory categories
     */
    readonly CATEGORIES: {
        /** Role knowledge categories */
        readonly ROLE_KNOWLEDGE: readonly ["best-practice", "anti-pattern", "tool-usage", "workflow"];
        /** Pattern categories */
        readonly PATTERN: readonly ["api", "component", "service", "testing", "styling", "database", "config", "other"];
        /** Gotcha severity levels */
        readonly GOTCHA_SEVERITY: readonly ["low", "medium", "high", "critical"];
        /** Learning categories */
        readonly LEARNING: readonly ["pattern", "decision", "gotcha", "insight", "improvement"];
        /** Relationship types */
        readonly RELATIONSHIP: readonly ["depends-on", "uses", "extends", "implements", "calls", "imported-by"];
    };
};
/**
 * Continuation system configuration for automatic agent continuation
 */
export declare const CONTINUATION_CONSTANTS: {
    /**
     * Detection thresholds
     */
    readonly DETECTION: {
        /** Number of idle poll cycles before triggering continuation check */
        readonly IDLE_CYCLES_BEFORE_CHECK: 2;
        /** Minutes without MCP calls before heartbeat is considered stale */
        readonly STALE_THRESHOLD_MINUTES: 20;
        /** Milliseconds between activity poll checks */
        readonly ACTIVITY_POLL_INTERVAL_MS: 120000;
    };
    /**
     * Event handling configuration
     */
    readonly EVENTS: {
        /** Debounce time for events (ms) */
        readonly DEBOUNCE_MS: 5000;
        /** Deduplication window (ms) */
        readonly DEDUP_WINDOW_MS: 10000;
        /** Cleanup interval for recent events (ms) */
        readonly CLEANUP_INTERVAL_MS: 60000;
    };
    /**
     * Iteration limits
     */
    readonly ITERATIONS: {
        /** Default maximum iterations per task */
        readonly DEFAULT_MAX: 10;
        /** Absolute maximum iterations (hard limit) */
        readonly ABSOLUTE_MAX: 50;
        /** Warning threshold (percentage of max) */
        readonly WARNING_THRESHOLD: 0.8;
    };
    /**
     * Timeouts
     */
    readonly TIMEOUTS: {
        /** Timeout for output analysis (ms) */
        readonly ANALYSIS_MS: 10000;
        /** Timeout for action execution (ms) */
        readonly ACTION_MS: 30000;
        /** Timeout for prompt injection (ms) */
        readonly PROMPT_INJECTION_MS: 15000;
    };
    /**
     * Output analysis patterns
     */
    readonly PATTERNS: {
        /** Patterns indicating task completion */
        readonly COMPLETION: readonly ["task completed", "task done", "successfully completed", "implementation complete", "all tests pass", "ready for review"];
        /** Patterns indicating agent is waiting */
        readonly WAITING: readonly ["waiting for", "awaiting", "blocked by", "need input", "please provide", "let me know"];
        /** Patterns indicating errors */
        readonly ERROR: readonly ["error:", "failed:", "exception:", "cannot", "unable to", "permission denied"];
    };
    /**
     * Confidence thresholds for analysis
     */
    readonly CONFIDENCE: {
        /** Minimum confidence to take action */
        readonly ACTION_THRESHOLD: 0.6;
        /** High confidence threshold */
        readonly HIGH: 0.8;
        /** Medium confidence threshold */
        readonly MEDIUM: 0.5;
        /** Low confidence threshold */
        readonly LOW: 0.3;
    };
};
/**
 * Orchestrator auto-restart configuration.
 * Used by OrchestratorRestartService to automatically restart the orchestrator
 * when it becomes unresponsive (child process dies inside PTY shell).
 */
export declare const ORCHESTRATOR_RESTART_CONSTANTS: {
    /** Maximum number of restarts allowed within the cooldown window */
    readonly MAX_RESTARTS_PER_WINDOW: 3;
    /** Cooldown window in milliseconds (1 hour) */
    readonly COOLDOWN_WINDOW_MS: 3600000;
    /** Delay before attempting restart (ms) - allows cleanup */
    readonly RESTART_DELAY_MS: 5000;
};
/**
 * Orchestrator heartbeat monitoring configuration.
 * Used by OrchestratorHeartbeatMonitorService to detect unresponsive orchestrators,
 * send proactive heartbeat requests, and trigger auto-restart with resume.
 */
export declare const ORCHESTRATOR_HEARTBEAT_CONSTANTS: {
    /** Interval between heartbeat checks in milliseconds (30 seconds) */
    readonly CHECK_INTERVAL_MS: 30000;
    /** Time without API activity before sending a heartbeat request when PTY is idle (5 minutes) */
    readonly HEARTBEAT_REQUEST_THRESHOLD_MS: 300000;
    /** Time without API activity before sending a heartbeat request when PTY is active (15 minutes).
     *  A longer threshold is used when the orchestrator's terminal is producing output
     *  (e.g. running a build, tests, or other long commands) since that proves the
     *  orchestrator is alive and working — just not making API calls. */
    readonly HEARTBEAT_REQUEST_THRESHOLD_PTY_ACTIVE_MS: 900000;
    /** PTY idle time below which the orchestrator is considered "PTY active" (2 minutes).
     *  If the orchestrator produced terminal output within this window, the longer
     *  HEARTBEAT_REQUEST_THRESHOLD_PTY_ACTIVE_MS threshold is used instead. */
    readonly PTY_ACTIVE_WINDOW_MS: 120000;
    /** Time after heartbeat request before triggering auto-restart (1 minute) */
    readonly RESTART_THRESHOLD_MS: 60000;
    /** Message sent to orchestrator PTY to request a heartbeat */
    readonly HEARTBEAT_REQUEST_MESSAGE: "Please run your heartbeat skill now: bash config/skills/orchestrator/heartbeat/execute.sh";
    /** Grace period after server start before monitoring begins (120 seconds).
     *  Increased from 30s to account for orchestrator boot time + first API call delay,
     *  preventing false-positive heartbeat timeouts on slow starts or restarts. */
    readonly STARTUP_GRACE_PERIOD_MS: 120000;
    /** Maximum time the orchestrator can stay in_progress before triggering
     *  a heartbeat/restart (30 minutes). Spinner animation counts as "activity"
     *  in the idle tracker, so a stuck orchestrator may appear active forever.
     *  This timeout provides a hard upper bound. */
    readonly IN_PROGRESS_TIMEOUT_MS: 1800000;
};
/**
 * Agent heartbeat monitor configuration.
 * Used by AgentHeartbeatMonitorService to detect crashed/unresponsive agents
 * and auto-restart them with task re-delivery.
 */
export declare const AGENT_HEARTBEAT_MONITOR_CONSTANTS: {
    /** Interval between heartbeat checks in milliseconds (30 seconds) */
    readonly CHECK_INTERVAL_MS: 30000;
    /** Time without activity (both PTY and API) before checking process liveness (5 minutes) */
    readonly HEARTBEAT_REQUEST_THRESHOLD_MS: 300000;
    /** Grace period after server start before monitoring begins (1 minute) */
    readonly STARTUP_GRACE_PERIOD_MS: 60000;
    /** Maximum restarts per cooldown window per agent */
    readonly MAX_RESTARTS_PER_WINDOW: 3;
    /** Cooldown window for restart tracking (1 hour) */
    readonly COOLDOWN_WINDOW_MS: 3600000;
};
/**
 * Agent suspend/rehydrate configuration.
 * Used by AgentSuspendService, IdleDetectionService, and DiskCleanupService
 * to automatically suspend idle agents and transparently rehydrate them.
 */
export declare const AGENT_SUSPEND_CONSTANTS: {
    /** Default idle timeout in minutes before an agent is suspended (0 = disabled) */
    readonly DEFAULT_IDLE_TIMEOUT_MINUTES: 30;
    /** Interval between idle checks in milliseconds (2 minutes) */
    readonly IDLE_CHECK_INTERVAL_MS: 120000;
    /** Maximum age of debug log files eligible for cleanup on suspend (hours) */
    readonly DEBUG_LOG_MAX_AGE_HOURS: 24;
    /** Timeout for rehydration to complete in milliseconds (45 seconds) */
    readonly REHYDRATION_TIMEOUT_MS: 45000;
    /** Roles that are exempt from suspension */
    readonly EXEMPT_ROLES: readonly ["orchestrator"];
    /** Idle timeout for agents stuck in 'started' status (minutes) */
    readonly STARTED_AGENT_IDLE_TIMEOUT_MINUTES: 15;
    /** Roles that should never be auto-stopped (always-on) */
    readonly ALWAYS_ON_ROLES: readonly ["orchestrator", "auditor"];
    /** Idle timeout in ms before a worker agent is stopped (default 30 min) */
    readonly AGENT_IDLE_STOP_TIMEOUT_MS: 1800000;
};
/**
 * Server process configuration for Node.js heap sizing and resource management.
 * Used by CLI start command to dynamically allocate memory based on system RAM.
 */
export declare const SERVER_CONSTANTS: {
    /** Minimum heap size in MB (floor for very low-RAM machines) */
    readonly MIN_HEAP_SIZE_MB: 256;
    /** Maximum heap size in MB (cap for high-RAM machines) */
    readonly MAX_HEAP_SIZE_MB: 2048;
    /** Fraction of total system RAM to allocate to Node.js heap */
    readonly HEAP_MEMORY_RATIO: 0.4;
};
/**
 * Auditor feature-flag configuration.
 * Controls whether the autonomous auditor agent (Claude Code PTY session)
 * is started at boot. Disabled by default to save memory on small machines.
 */
export declare const AUDITOR_CONSTANTS: {
    /** Whether the auditor is enabled by default (can be overridden by CREWLY_ENABLE_AUDITOR env) */
    readonly ENABLED_BY_DEFAULT: false;
    /** Environment variable name to enable/disable the auditor */
    readonly ENV_VAR: "CREWLY_ENABLE_AUDITOR";
};
/**
 * Version check configuration for CLI and web update notifications.
 * Used by VersionCheckService (backend) and version-check utilities (CLI)
 * to query the npm registry and cache the result.
 */
export declare const VERSION_CHECK_CONSTANTS: {
    /** npm registry URL for fetching the latest published version */
    readonly NPM_REGISTRY_URL: "https://registry.npmjs.org/crewly/latest";
    /** Cache file name stored under CREWLY_HOME */
    readonly CHECK_CACHE_FILE: ".update-check";
    /** Time-to-live for cached check result (24 hours) */
    readonly CACHE_TTL_MS: number;
    /** HTTP request timeout for npm registry calls (5 seconds) */
    readonly REQUEST_TIMEOUT_MS: 5000;
};
/**
 * Constants for marketplace registry, installation, and submission management.
 * Used by marketplace services (backend + CLI) to resolve API endpoints,
 * cache settings, schema versions, and local file paths.
 */
export declare const MARKETPLACE_CONSTANTS: {
    /** GitHub raw content URL for the public skills registry index */
    readonly PUBLIC_REGISTRY_URL: "https://raw.githubusercontent.com/stevehuang0115/crewly/main/config/skills/registry.json";
    /** GitHub raw content base URL for downloading public skill files */
    readonly PUBLIC_CDN_BASE: "https://raw.githubusercontent.com/stevehuang0115/crewly/main";
    /** Base URL for the Crewly marketplace webapp (premium/private registry) */
    readonly PREMIUM_BASE_URL: "https://crewlyai.com";
    /** API endpoint for premium skills registry */
    readonly PREMIUM_REGISTRY_ENDPOINT: "/api/registry/skills";
    /** API endpoint for downloading marketplace assets */
    readonly ASSETS_ENDPOINT: "/api/assets";
    /** In-memory registry cache time-to-live (1 hour in ms) */
    readonly CACHE_TTL: 3600000;
    /** Directory name under ~/.crewly/ for marketplace data */
    readonly DIR_NAME: "marketplace";
    /** File name for the installed-items manifest */
    readonly MANIFEST_FILE: "manifest.json";
    /** File name for the local registry of published skills */
    readonly LOCAL_REGISTRY_FILE: "local-registry.json";
    /** Subdirectory for skill submission archives */
    readonly SUBMISSIONS_DIR: "submissions";
    /** GitHub repository (owner/repo) for PR-based skill submissions */
    readonly GITHUB_REPO: "stevehuang0115/crewly";
    /** Registry schema version -- bump when the registry format changes */
    readonly SCHEMA_VERSION: 2;
    /** Timeout for downloading archive assets from the CDN (30 seconds) */
    readonly DOWNLOAD_TIMEOUT: 30000;
    /** Timeout for downloading individual skill files from GitHub (15 seconds) */
    readonly GITHUB_FILE_TIMEOUT: 15000;
    /** Timeout for fetching the registry index from public or premium sources (10 seconds) */
    readonly REGISTRY_FETCH_TIMEOUT: 10000;
    /** Category mapping from skill.json categories to marketplace display categories */
    readonly CATEGORY_MAP: Record<string, string>;
};
/**
 * Template Marketplace constants for creating, versioning, and publishing
 * team configuration templates. Templates are stored as JSON files under
 * ~/.crewly/marketplace/templates/.
 */
export declare const TEMPLATE_MARKETPLACE_CONSTANTS: {
    /** Subdirectory under marketplace dir for template data */
    readonly TEMPLATES_DIR: "templates";
    /** File name for the template store index */
    readonly STORE_FILE: "templates.json";
    /** Subdirectory under each template for version files */
    readonly VERSIONS_DIR: "versions";
    /** File name for the version store within each template dir */
    readonly VERSIONS_FILE: "versions.json";
    /** Schema version for template store files */
    readonly SCHEMA_VERSION: 1;
    /** Maximum template name length */
    readonly MAX_NAME_LENGTH: 100;
    /** Maximum template description length */
    readonly MAX_DESCRIPTION_LENGTH: 2000;
    /** Maximum changelog length per version */
    readonly MAX_CHANGELOG_LENGTH: 5000;
    /** Maximum number of tags per template */
    readonly MAX_TAGS: 20;
    /** Maximum tag length */
    readonly MAX_TAG_LENGTH: 50;
};
/**
 * Addon system configuration for loading and managing Crewly addons.
 * Addons are installed to ~/.crewly/addons/ and loaded on server startup.
 * Each addon has a manifest.json and a dist/ directory with compiled code.
 */
export declare const ADDON_CONSTANTS: {
    /**
     * File system paths for addon management
     */
    readonly PATHS: {
        /** Directory name under ~/.crewly/ for installed addons */
        readonly ADDONS_DIR: "addons";
        /** Directory name for addon downloads/tarballs */
        readonly DOWNLOADS_DIR: "downloads";
    };
    /**
     * Addon manifest configuration
     */
    readonly MANIFEST_FILE: "manifest.json";
    /**
     * Default entrypoint file within an addon's directory
     */
    readonly DEFAULT_ENTRYPOINT: "dist/index.js";
    /**
     * Cloud API configuration for downloading Pro addons
     */
    readonly CLOUD_API: {
        /** Base URL for the Crewly Cloud API */
        readonly BASE_URL: "https://api.crewlyai.com/v1";
        /** Endpoint path for addon downloads */
        readonly DOWNLOAD_ENDPOINT: "/addons";
    };
    /**
     * Crewly Pro addon identifiers
     */
    readonly PRO_ADDON: {
        /** Pro addon package name */
        readonly NAME: "crewly-pro";
        /** Default tarball filename */
        readonly DEFAULT_TARBALL: "crewly-pro.tar.gz";
    };
    /**
     * Addon loading timeouts
     */
    readonly TIMEOUTS: {
        /** Maximum time to load a single addon (10 seconds) */
        readonly LOAD_TIMEOUT_MS: 10000;
    };
};
/** Shorthand for debounce value */
export declare const EVENT_DEBOUNCE_MS: 5000;
/**
 * Redis connection and caching configuration
 */
export declare const REDIS_CONSTANTS: {
    /** Redis connection settings */
    readonly CONNECTION: {
        /** Default Redis host */
        readonly HOST: "127.0.0.1";
        /** Default Redis port */
        readonly PORT: 6379;
        /** Connection timeout in milliseconds (5 seconds) */
        readonly CONNECT_TIMEOUT: 5000;
        /** Maximum number of reconnect retries before giving up */
        readonly MAX_RETRIES: 3;
        /** Delay between reconnect attempts in milliseconds */
        readonly RETRY_DELAY: 1000;
        /** Key prefix to namespace all Crewly cache entries */
        readonly KEY_PREFIX: "crewly:";
    };
    /** Cache TTL (time-to-live) settings in seconds */
    readonly TTL: {
        /** TTL for GET /api/teams list (60 seconds) */
        readonly TEAMS_LIST: 60;
        /** TTL for GET /api/projects list (60 seconds) */
        readonly PROJECTS_LIST: 60;
        /** Default TTL for unspecified cache entries (60 seconds) */
        readonly DEFAULT: 60;
    };
    /** Cache key patterns */
    readonly KEYS: {
        /** Cache key for the teams list endpoint */
        readonly TEAMS_LIST: "api:teams";
        /** Cache key for the projects list endpoint */
        readonly PROJECTS_LIST: "api:projects";
    };
    /** Environment variable names for Redis configuration */
    readonly ENV: {
        /** Redis host override */
        readonly REDIS_HOST: "CREWLY_REDIS_HOST";
        /** Redis port override */
        readonly REDIS_PORT: "CREWLY_REDIS_PORT";
        /** Redis password */
        readonly REDIS_PASSWORD: "CREWLY_REDIS_PASSWORD";
        /** Redis URL (takes precedence over host/port) */
        readonly REDIS_URL: "CREWLY_REDIS_URL";
    };
};
/**
 * Type helpers for extracting literal types from constants
 */
export type AgentStatus = (typeof CREWLY_CONSTANTS.AGENT_STATUSES)[keyof typeof CREWLY_CONSTANTS.AGENT_STATUSES];
export type WorkingStatus = (typeof CREWLY_CONSTANTS.WORKING_STATUSES)[keyof typeof CREWLY_CONSTANTS.WORKING_STATUSES];
export type AgentRole = (typeof CREWLY_CONSTANTS.ROLES)[keyof typeof CREWLY_CONSTANTS.ROLES];
export type MessageType = (typeof MESSAGE_CONSTANTS.TYPES)[keyof typeof MESSAGE_CONSTANTS.TYPES];
export type OrchestratorCommand = (typeof BACKEND_CONSTANTS.ORCHESTRATOR_COMMANDS)[keyof typeof BACKEND_CONSTANTS.ORCHESTRATOR_COMMANDS];
export type HTTPStatusCode = (typeof BACKEND_CONSTANTS.NETWORK.HTTP_STATUS_CODES)[keyof typeof BACKEND_CONSTANTS.NETWORK.HTTP_STATUS_CODES];
export type AgentId = (typeof CREWLY_CONSTANTS.AGENT_IDS)[keyof typeof CREWLY_CONSTANTS.AGENT_IDS];
//# sourceMappingURL=constants.d.ts.map