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<ReturnType<typeof runLoop>>;
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<string>;
    writeFile: (filePath: string, content: string) => Promise<void>;
    readDoc: () => Promise<SuperintendentDoc>;
};
export type TurnSpec = {
    assertPrompt?: (prompt: string, ctx: TurnContext) => void | Promise<void>;
    fileChanges?: Record<string, string>;
    output: TurnOutput;
};
export type SimulationOptions = {
    docContent: string;
    docPath?: string;
    turns: TurnSpec[];
    files?: Record<string, string>;
    maxRounds?: number;
    signal?: AbortSignal;
};
export type SimulationRun = AgentRunInput;
export type SimulationResult = {
    result: SuperintendentRunResult;
    prompts: string[];
    runs: SimulationRun[];
    fs: SimulationFs;
    readFile: (filePath: string) => Promise<string>;
    readDoc: () => Promise<SuperintendentDoc>;
};
export type SimulationFailureContext = Omit<SimulationResult, "result">;
export declare function successTurn(assertPrompt?: TurnSpec["assertPrompt"], fileChanges?: Record<string, string>): TurnSpec;
export declare function failTurn(stderr: string, assertPrompt?: TurnSpec["assertPrompt"], fileChanges?: Record<string, string>): TurnSpec;
export declare function builderTurn(fileChanges?: Record<string, string>, assertPrompt?: TurnSpec["assertPrompt"]): TurnSpec;
export declare function inspectorTurn(summary: string, assertPrompt?: TurnSpec["assertPrompt"]): TurnSpec;
export declare function superintendentTurn(transition?: WorkflowTransition, fileChanges?: Record<string, string>, 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<SimulationResult>;
};
export {};
