/**
 * @fileoverview Orchestrator Loop type definitions.
 *
 * Types for the phased plan execution system: state machine, plan structure,
 * phase grouping, team strategies, verification, configuration, and persistence.
 *
 * Key exports:
 * - OrchestratorState — state machine states (idle → planning → approval → executing → verifying → ...)
 * - OrchestratorPlan / OrchestratorPhase / OrchestratorTask — hierarchical plan structure
 * - TeamStrategy — how agents are coordinated per phase (single, parallel, team)
 * - VerificationResult / VerificationCheck — phase verification output
 * - OrchestratorConfig — user-configurable options
 * - OrchestratorPersistState / OrchestratorStats — persistence and metrics
 *
 * Cross-domain relationships:
 * - OrchestratorTask.queueTaskId links to TaskState.id (task domain)
 * - OrchestratorTask.assignedSessionId links to SessionState.id (session domain)
 * - OrchestratorPersistState is embedded in AppState.orchestrator (app-state domain)
 *
 * Served at `GET /api/orchestrator/status` and `GET /api/orchestrator/plan`.
 * No dependencies on other domain modules.
 */
/** Default orchestrator configuration */
export const DEFAULT_ORCHESTRATOR_CONFIG = {
    plannerModel: 'opus',
    researchEnabled: true,
    autoApprove: false,
    maxPhaseRetries: 3,
    phaseTimeoutMs: 30 * 60 * 1000, // 30 minutes
    enableTeamAgents: true,
    maxParallelSessions: 3,
    verificationMode: 'moderate',
    compactBetweenPhases: true,
};
/** Factory function for initial orchestrator stats */
export function createInitialOrchestratorStats() {
    return {
        phasesCompleted: 0,
        phasesFailed: 0,
        totalTasksCompleted: 0,
        totalTasksFailed: 0,
        totalDurationMs: 0,
        replanCount: 0,
    };
}
//# sourceMappingURL=orchestrator.js.map