import { FileNode } from './types'; import { RecycleBinItem } from './utils/storage'; import { ClockSnapshot } from './context/ClockContext'; import { RecentDocumentEntry } from './context/RecentDocumentsContext'; import { PrintJob } from './context/PrintSpoolerContext'; /** Current snapshot format version. Bump on breaking schema changes. */ export declare const XP_SNAPSHOT_VERSION = 1; export interface XPSnapshot { /** Snapshot format version. Loading a newer version throws. */ version: number; /** Full filesystem tree, including file contents. */ fs: { root: FileNode; }; /** Recycle bin contents keyed by bin entry id. */ recycleBin: Record; /** Persisted open windows (the JSON stored under `open_windows`). */ openWindows: unknown[]; /** Active wallpaper id or URL, or null. */ wallpaper: string | null; /** Active language code, or null. */ language: string | null; /** Reserved for the scenario system (#84): scenario flags. */ flags: Record; /** Instance-local virtual wall-clock state (#275). */ clock?: ClockSnapshot; /** Seeded and runtime recent-document history (#282). */ recentDocuments?: RecentDocumentEntry[]; /** Persisted virtual print queue (#276). */ printJobs?: PrintJob[]; /** Per-playlist track index and playhead; audio never auto-resumes (#277). */ mediaSessions?: Record; /** Evidence report drafts and review state (#278). */ evidenceReports?: Record; } /** Base class for any reason a snapshot cannot be loaded (#208). */ export declare class XPSnapshotError extends Error { constructor(message: string); } /** Thrown when a snapshot's version is missing or newer than this build. */ export declare class XPSnapshotVersionError extends XPSnapshotError { constructor(message: string); } /** * Reject a snapshot larger than this (#208). A shared save is untrusted input; * an oversized blob could blow the storage quota mid-write. 5 MB of JSON is far * beyond any real desktop (file contents live in it, but not media blobs). */ export declare const SNAPSHOT_MAX_BYTES: number; /** * Validate a value is a loadable snapshot for this build (#117, #208). Throws * {@link XPSnapshotVersionError} for a missing/too-new version and * {@link XPSnapshotError} for a malformed structure — with the offending path in * the message — rather than letting bad input corrupt storage. Callers validate * before applying, so a rejected snapshot leaves the desktop untouched. */ export declare function assertLoadableSnapshot(value: unknown): asserts value is XPSnapshot;