import { type RunStats, type StopReason } from "../contracts/turn.js"; import { type ToolLoopParams } from "../loop/tool-loop.js"; import { type CheckpointBindings, type LoopCheckpoint } from "./checkpoint.js"; export interface CheckpointRuntime { /** Bind keeps state and iteration budget; the host supplies all executable capabilities. */ params: Omit; /** Called at a settled boundary; return pins and the matching restorable host state. */ captureBindings(): Promise; } export interface CheckpointRunResult { checkpoint: LoopCheckpoint; stopReason: StopReason | "checkpointed"; /** Only this invocation's spend. checkpoint.stats covers the whole execution. */ stats: RunStats; } /** * Run the existing kernel from a validated boundary, never from an inferred * transcript position. No model/tool I/O occurs for waiting or finished input. * The host must restore/verify its configuration and environment before returning * capabilities. Checkpoint commit failures propagate before further execution. */ export declare function runFromCheckpoint(input: { checkpoint: LoopCheckpoint; restore(bindings: CheckpointBindings, executionId: string): Promise; commit(checkpoint: LoopCheckpoint): Promise<"continue" | "checkpoint">; }): Promise;