//#region ../core/src/types.d.ts type RunMode = "single-pi"; type AgentStatus = "queued" | "starting" | "running" | "idle" | "blocked" | "completed" | "failed" | "stopped"; type TaskStatus = "queued" | "running" | "blocked" | "completed" | "aborted"; interface AgentSessionRecord { runtime: "pi"; persisted: boolean; sessionDir: string | null; sessionId: string | null; sessionPath: string | null; processId: number | null; lastAttachedAt: string | null; } interface AgentStateSnapshot { agentId: string; role: string; status: AgentStatus; taskId: string | null; task: string | null; branch: string | null; updatedAt: string; lastMessage: string | null; waitingOn: string | null; blocked: boolean; runId: string | null; session: AgentSessionRecord; } interface TaskRecord { taskId: string; title: string; status: TaskStatus; role: string; assignedAgentId: string; createdBy: string; createdAt: string; updatedAt: string; } interface MetricsSnapshot { interruptRate: number; autonomousCompletionRate: number; contextCoverageScore: number; meanTimeToCorrectHours: number | null; feedbackToDemoCycleTimeHours: number | null; totals: { taskAttempts: number; completedTasks: number; interrupts: number; observedInterruptCategories: number; coveredInterruptCategories: number; }; } interface RunManifest { runId: string; repoId: string; repoSlug: string; repoRoot: string; branch: string; goal: string | null; planPath: string | null; recommendedPlanDir: string | null; mode: RunMode; startedAt: string; endedAt: string | null; stopReason: string | null; leasePath: string; piExitCode: number | null; completedTaskCount: number; blockedTaskCount: number; skippedTaskCount: number; totalCostUsd: number; } interface PiInvocationRecord { command: string; cwd: string; repoRoot: string; planPath: string | null; goal: string | null; sessionDir: string | null; sessionId: string | null; sessionPath: string | null; startedAt: string; endedAt: string; exitCode: number; stdoutPath: string; stderrPath: string; promptSummary: string; } interface RunSummary { runId: string; mode: RunMode; createdAt: string; success: boolean; message: string; piExitCode: number; recommendedPlanDir: string | null; } interface ControllerRunResult { runId: string; runDir: string; latestDir: string; manifest: RunManifest; metrics: MetricsSnapshot; summary: RunSummary; piInvocation: PiInvocationRecord; } type LoopStopReason = "all-tasks-completed" | "all-remaining-tasks-blocked" | "mayor-blocked" | "mayor-idle-no-work" | "max-iterations-reached" | "max-wall-time-reached" | "pi-exit-nonzero" | "high-interrupt-rate"; interface BoardSnapshot { tasks: Array<{ taskId: string; status: TaskStatus; }>; agents: Array<{ agentId: string; status: AgentStatus; blocked: boolean; }>; allTasksCompleted: boolean; allRemainingTasksBlocked: boolean; mayorBlocked: boolean; hasQueuedOrRunningWork: boolean; } interface LoopIterationResult { iteration: number; controllerResult: ControllerRunResult; boardSnapshot: BoardSnapshot; metrics: MetricsSnapshot; elapsedMs: number; continueReason: string | null; stopReason: LoopStopReason | null; } interface LoopRunResult { loopId: string; iterations: LoopIterationResult[]; stopReason: LoopStopReason; totalIterations: number; totalElapsedMs: number; finalBoardSnapshot: BoardSnapshot; aggregateMetrics: MetricsSnapshot; } //#endregion export { LoopRunResult as n, TaskRecord as r, AgentStateSnapshot as t }; //# sourceMappingURL=types-COGNGvsY.d.mts.map