import type { Snapshot } from "./types.js"; /** * Per-session snapshot file: `.undo-snapshots.json`. * Deliberately NOT `.jsonl` — pi treats every `*.jsonl` file in a session dir * as a session, so a `.jsonl` snapshot file would show up as a bogus session. */ export declare const SNAPSHOT_FILE_SUFFIX = ".undo-snapshots.json"; export declare function snapshotFilePath(sessionDir: string, sessionId: string): string; export declare function loadSnapshots(filePath: string): Promise; export declare function appendSnapshot(filePath: string, snapshot: Snapshot): Promise; /** * Remove snapshot files for sessions that no longer exist. pi deletes a session * by removing its `.jsonl` file directly (no event fires), so orphaned snapshot * files are cleaned up here whenever any session in the directory starts. * The current session is never removed. Returns the names of deleted files. */ export declare function sweepOrphanedSnapshots(sessionDir: string, currentSessionId?: string): Promise;