import { type SuperintendentDoc } from "../document/parse.js"; import { runLoop, type AgentRunInput, type SuperintendentFileSystem } from "../runtime/loop.js"; import type { WorkflowTransition } from "../runtime/workflow-tool.js"; type SimulationFs = SuperintendentFileSystem; type SuperintendentRunResult = Awaited>; type TurnOutput = { stdout: string; stderr?: string; exitCode?: number; summary?: string; log?: string; output?: string; text?: string; transition?: unknown; toolCalls?: unknown; sessionResult?: unknown; }; export type TurnContext = { fs: SimulationFs; readFile: (filePath: string) => Promise; writeFile: (filePath: string, content: string) => Promise; readDoc: () => Promise; }; export type TurnSpec = { assertPrompt?: (prompt: string, ctx: TurnContext) => void | Promise; fileChanges?: Record; output: TurnOutput; }; export type SimulationOptions = { docContent: string; docPath?: string; turns: TurnSpec[]; files?: Record; maxRounds?: number; signal?: AbortSignal; }; export type SimulationRun = AgentRunInput; export type SimulationResult = { result: SuperintendentRunResult; prompts: string[]; runs: SimulationRun[]; fs: SimulationFs; readFile: (filePath: string) => Promise; readDoc: () => Promise; }; export type SimulationFailureContext = Omit; export declare function successTurn(assertPrompt?: TurnSpec["assertPrompt"], fileChanges?: Record): TurnSpec; export declare function failTurn(stderr: string, assertPrompt?: TurnSpec["assertPrompt"], fileChanges?: Record): TurnSpec; export declare function builderTurn(fileChanges?: Record, assertPrompt?: TurnSpec["assertPrompt"]): TurnSpec; export declare function inspectorTurn(summary: string, assertPrompt?: TurnSpec["assertPrompt"]): TurnSpec; export declare function superintendentTurn(transition?: WorkflowTransition, fileChanges?: Record, assertPrompt?: TurnSpec["assertPrompt"]): TurnSpec; export declare function ownerApproveTurn(assertPrompt?: TurnSpec["assertPrompt"]): TurnSpec; export declare function ownerRejectTurn(feedback: string, assertPrompt?: TurnSpec["assertPrompt"]): TurnSpec; export declare function createSuperintendentSimulation(options: SimulationOptions): { run: () => Promise; }; export {};