import type { ChannelSchema, GraphCheckpoint, GraphCheckpointV1, GraphTask, PendingInterrupt, StoredGraphCheckpoint } from '../types/graph.js'; /** * Reads a checkpoint in the current schema from one in either schema. A custom checkpointer whose * store still holds 1.x checkpoints can return them as they are, since the graph calls this on every * read; a tool that reads a store directly calls it too. A version 2 checkpoint is returned as it is. * * A version 1 checkpoint gains its id, its tasks spelled out from `next` when it carried none, and its * questions moved from the single `interrupt` into `interrupts`. */ export declare function migrateCheckpoint(checkpoint: StoredGraphCheckpoint): GraphCheckpoint; /** A checkpoint being assembled, before `toCheckpoint()` fills in its id, tasks, and questions. */ export type CheckpointDraft = Omit, 'version' | 'id' | 'tasks' | 'interrupts'> & { version?: 2; id?: string; tasks?: GraphTask[]; interrupts?: PendingInterrupt[]; }; /** * Turns a draft or a stored checkpoint of either schema into one in the current schema. The id is * always derived again, so a checkpoint copied to another thread or step never keeps a stale one. */ export declare function toCheckpoint(draft: CheckpointDraft | GraphCheckpointV1): GraphCheckpoint;