import type { PhaseStore } from './phase-store.js'; import type { PhaseGraph, PhaseNode } from './types.js'; export interface Checkpoint { id: string; graphId: string; phaseId: string; phaseStatus: PhaseNode['status']; taskStatuses: Array<{ taskId: string; status: string; title: string; }>; timestamp: number; label?: string | undefined; } export interface CheckpointManagerOptions { store: PhaseStore; maxCheckpoints?: number | undefined; /** Max age in ms before a checkpoint is eligible for TTL-based pruning. Default: 7 days. */ maxCheckpointAgeMs?: number | undefined; baseDir?: string | undefined; } /** * CheckpointManager - saves and restores snapshots of the phase graph. * * Usage: * const cm = new CheckpointManager({ store }); * await cm.saveCheckpoint(graph, 'Before risky refactor'); * // ... if something goes wrong ... * const restored = await cm.restoreCheckpoint(checkpointId); */ export declare class CheckpointManager { private store; private maxCheckpoints; private maxCheckpointAgeMs; private checkpoints; private baseDir; constructor(opts: CheckpointManagerOptions); initialize(): Promise; saveCheckpoint(graph: PhaseGraph, label?: string): Promise; restoreCheckpoint(checkpointId: string): Promise; listCheckpoints(graphId?: string): Checkpoint[]; deleteCheckpoint(checkpointId: string): Promise; private saveToDisk; private deleteFromDisk; private loadFromDisk; private pruneCheckpoints; } //# sourceMappingURL=checkpoint.d.ts.map