import { type AgentRunner, type VerifyRunner } from "./agent-runner.js"; import { type ExecutionMode } from "./execution-mode.js"; /** * Run the whole pipeline: one command from a planned program to a built one. * * The individual commands exist because each stage needed its own brief, its * own agent, and its own failure semantics. But composing them by hand meant * eight invocations with manual commits in between, which is more babysitting * than the workflow it replaced — the seams were the point, the command count * was not supposed to be the price. * * So this sequences them, commits between stages itself, and stops for a * human in exactly one place: the acceptance-criteria gate, and only when * that gate is switched on. Everything else either continues or fails loudly. * * It is also what makes the CI move possible. A workflow file wants one * command, not eight with `git commit` between them. */ export declare const RUN_STAGES: readonly ["plan-audit", "author", "validate", "converge", "review", "criteria", "build", "as-built"]; export type RunStage = (typeof RUN_STAGES)[number]; export interface RunStageResult { stage: RunStage; /** The stage command's own outcome string. */ result: string; reason?: string; /** Short SHA when this stage's output was committed. */ commit?: string; } export type RunOutcome = "COMPLETE" | "STOPPED" | "FAILED"; export interface RunProgramResult { programId: string; executionMode?: ExecutionMode; result: RunOutcome; reason?: string; stages: RunStageResult[]; } export interface RunProgramOptions { cwd: string; programId: string; /** Start here instead of at the beginning; use to resume after a stop. */ from?: RunStage; /** Stop after this stage. */ to?: RunStage; /** Include the advisory architecture review, which is otherwise skipped. */ review?: boolean; /** Do not commit between stages, and pass --no-commit down to the build. */ commit?: boolean; agentRunner?: AgentRunner; verifyRunner?: VerifyRunner; now?: () => Date; onProgress?: (line: string) => void; /** Internal bounded automatic replan depth. */ automaticReplans?: number; /** Allow non-blocking semantic findings after convergence exhausts its rounds. */ allowSemanticRisks?: boolean; /** Override the planner-selected execution mode for this run. */ executionMode?: ExecutionMode; } export declare function parseStage(value: string): RunStage; /** * The stages this run will perform: the default sequence, narrowed by * `--from` / `--to`, with `review` included only when asked for. */ export declare function stagesFor(options: { from?: RunStage; to?: RunStage; review?: boolean; }): RunStage[]; export declare function runProgram(options: RunProgramOptions): Promise; //# sourceMappingURL=run-program.d.ts.map