import type { RunPersistence } from '../../manager/run/persistence.js';
import type { RunDiskStore } from '../../store/run/disk.js';
import type { ActiveNodeInfo, BranchStackEntry, CheckpointId, CheckpointSummary, IterationCheckpoint } from '../../types/hitl/index.js';
import type { EmergencySaveData } from '../../types/run/emergency.js';
import type { CheckpointListEntry } from '../../types/run/replay.js';
/**
 * Project an {@link EmergencySaveData} dump to an {@link IterationCheckpoint}
 * shape so `replay({ fromCheckpoint: 'emergency' })` can consume it through
 * the same restore path as any other checkpoint.
 *
 * The projection is lossy: `costInfo`, `guardState.elapsedMs`,
 * `toolResultHashes`, `branchStack`, and `activeNode` are not captured at
 * emergency-save time and default to zero/empty values. The synthetic
 * checkpoint id is derived deterministically from the emergency save id so
 * re-projecting the same dump yields the same {@link CheckpointId}.
 *
 * See ses_005-deterministic-replay design §2 + §5.2.
 */
export declare function projectEmergencyToCheckpoint(dump: EmergencySaveData): IterationCheckpoint;
export declare class CheckpointManager {
    private store;
    constructor(store: RunDiskStore);
    create(runMgr: RunPersistence, iteration: number, extra?: {
        toolResults?: Array<{
            toolCallId: string;
            toolName: string;
            input: unknown;
            output: string;
        }>;
        branchStack?: BranchStackEntry[];
        activeNode?: ActiveNodeInfo;
    }): Promise<IterationCheckpoint>;
    restore(checkpointId: CheckpointId): Promise<IterationCheckpoint>;
    list(): Promise<IterationCheckpoint[]>;
    /**
     * Listing projection used by the public `listCheckpoints` API. Returns
     * only the fields a consumer needs to pick a fork point for
     * {@link import('./replay/prepare.js').prepareReplayState} — not the
     * full checkpoint payload. See ses_005-deterministic-replay design §3.1.
     */
    listEntries(): Promise<CheckpointListEntry[]>;
    prune(keepLast: number): Promise<void>;
    static buildSummary(runMgr: RunPersistence, iteration: number): CheckpointSummary;
}
//# sourceMappingURL=checkpoint.d.ts.map