/** * Orchestrator session startup protocol. * Ports lib/skills/orchestrator-startup.sh. * * Implements the session startup sequence, context monitoring, * dependency analysis, task spawning, and HITL summary generation. * * @epic T4454 * @task T4519 */ import type { Task, TaskRefPriority } from '@cleocode/contracts'; import type { DependencyAnalysis, HitlSummary, OrchestratorThresholds } from '../types.js'; /** * Get orchestrator context thresholds from config or defaults. * @task T4519 */ export declare function getThresholds(config?: Record): OrchestratorThresholds; interface ContextState { percentage: number; currentTokens: number; maxTokens: number; status: string; stale: boolean; } /** * Read the current context state from session-aware files. * @task T4519 */ export declare function getContextState(sessionId?: string, cwd?: string): ContextState; /** Session init result. */ export interface SessionInitResult { activeSessions: number; activeSessionId: string | null; activeScope: string | null; hasFocus: boolean; focusedTask: string | null; hasPending: boolean; recommendedAction: 'resume' | 'spawn_followup' | 'create_and_spawn' | 'request_direction'; actionReason: string; } /** * Initialize orchestrator session state. * Determines the recommended action based on current state. * @task T4519 */ export declare function sessionInit(epicId?: string, cwd?: string): Promise; /** Pause status result. */ export interface PauseStatus { pauseStatus: 'ok' | 'warning' | 'critical'; pauseCode: 0 | 1 | 2; shouldPause: boolean; shouldWrapUp: boolean; contextPercentage: number; recommendation: string; } /** * Check if orchestrator should pause based on context usage. * @task T4519 */ export declare function shouldPause(config?: Record, sessionId?: string, cwd?: string): PauseStatus; /** * Analyze dependency graph and compute execution waves. * @task T4519 */ export declare function analyzeDependencies(epicId: string, cwd?: string): Promise; /** * Get the next task ready to spawn for an epic. * @task T4519 */ export declare function getNextTask(epicId: string, cwd?: string): Promise<{ task: Task | null; readyCount: number; }>; /** * Get all tasks ready to spawn in parallel (no inter-dependencies). * @task T4519 */ export declare function getReadyTasks(epicId: string, cwd?: string): Promise; /** * Generate a Human-in-the-Loop summary for session handoff. * @task T4519 */ export declare function generateHitlSummary(epicId?: string, stopReason?: string, cwd?: string): Promise; export {}; //# sourceMappingURL=startup.d.ts.map