/** * The snapshot of a run: what its validation read, kept in its run directory * at the first start with the input and the settings, so that a resume runs * the flow the run started with, whatever the disk says by then. * * `snapshot.json` holds every flow file reached, each agent named, each check * script's content, the input and the settings. The skills an agent names * are copied under `agents//skills/`, where a definition keeps its * own: read back, the agent lives there, so its skills resolve to the copies * at the check and at the spawn alike. */ import type { FlowCatalogue } from "../catalogue.ts"; import type { CheckedRun } from "../check-run.ts"; /** Where the snapshot is, in a run directory. */ export declare const SNAPSHOT_FILE = "snapshot.json"; /** What a run was started with, beside its flow: frozen, so a resume is the same run. */ export type Settings = { /** The working tree it was checked against. */ readonly cwd: string; /** Whether a person could answer when it started. */ readonly somebodyThere: boolean; /** The model it was started with, over the flow's and each agent's own. */ readonly model?: string; /** The bound of every agent turn it was started with. */ readonly timeoutMs?: number; }; /** A snapshot read back: the flow's name, a catalogue holding exactly what its check read, and what the run was started with. */ export type Snapshot = { /** The flow's name. */ readonly flow: string; /** Exactly what the check read: the flow's file, the files it reaches, the agents it names. */ readonly catalogue: FlowCatalogue; /** Each check script's content, by its path. */ readonly scripts: ReadonlyMap; /** What the run was started on. */ readonly input: unknown; /** What it was started with, beside its flow. */ readonly settings: Settings; }; /** * Writes the snapshot of `run`, started on `input` with `given`, into * `runDir`, made when missing. Throws on a directory already holding one: * a run directory is one run's. */ export declare function writeSnapshot(runDir: string, run: CheckedRun, input: unknown, given: Pick): void; /** The snapshot in `runDir`. Throws when there is none, or one of another version. */ export declare function readSnapshot(runDir: string): Snapshot; //# sourceMappingURL=snapshot.d.ts.map