/** Session-scoped undo stack for write operations. */ export interface EntrySnapshot { id: number; mediaId: number; status: string; score: number; progress: number; progressVolumes: number; notes: string | null; private: boolean; } export type UndoOperation = { type: "update"; before: EntrySnapshot; } | { type: "create"; entryId: number; mediaId: number; } | { type: "delete"; before: EntrySnapshot; } | { type: "batch"; entries: Array<{ before: EntrySnapshot; }>; }; export interface UndoRecord { operation: UndoOperation; toolName: string; timestamp: number; description: string; } /** Push a record onto the undo stack, trimming oldest if full */ export declare function pushUndo(record: UndoRecord): void; /** Pop the most recent undo record */ export declare function popUndo(): UndoRecord | undefined; /** Inspect the most recent record without removing */ export declare function peekUndo(): UndoRecord | undefined; /** Current stack depth */ export declare function undoStackSize(): number; /** Clear all undo records */ export declare function clearUndoStack(): void;