/** * root-guard.ts * * Pure helpers and constants for WorkspaceCheckpointManager's root-safety * guards: deciding whether a resolved workspace root is too broad to snapshot, * and building the honest refusal messages used both for automatic-subscription * skips and for rejected explicit `create()` calls. * * Kept separate from manager.ts so the guard policy (and its wording) is * unit-testable in isolation and the manager file stays within its line cap. */ /** Constructor option (and log-facing name) that opts a manager into snapshotting a broad root (home, fs root, or the daemon state dir). */ export declare const BROAD_ROOT_OVERRIDE = "allowBroadRoot"; /** Constructor option (and log-facing name) that opts a manager into a first snapshot whose sweep exceeds the file-count ceiling. */ export declare const LARGE_FIRST_SNAPSHOT_OVERRIDE = "allowLargeFirstSnapshot"; /** * Default ceiling for the first-ever snapshot's file sweep. Deliberately * generous: a real source tree (with node_modules/build output gitignored) * sits far below this, while a mistaken sweep of a home directory or an * over-broad root blows past it, the exact case that produced an orphaned * multi-GiB checkpoint store rooted at $HOME. */ export declare const DEFAULT_MAX_FIRST_SNAPSHOT_FILES = 50000; /** * Decide whether `root` is too broad to auto-snapshot. Returns a short, * human-readable reason when it is (filesystem root, the user's home * directory, or the daemon state directory `~/.goodvibes`), or `null` when the * root is a normal project directory. Paths are compared by their canonical * (realpath-resolved where possible) form so symlinked homes still match. */ export declare function broadRootReason(root: string, homeDir: string, daemonStateDir: string): string | null; /** Honest, override-naming message for a refused broad root. */ export declare function broadRootRefusalMessage(root: string, reason: string): string; /** Honest, count-and-override-naming message for a refused oversized first snapshot. */ export declare function firstSnapshotTooLargeMessage(root: string, count: number, limit: number): string; //# sourceMappingURL=root-guard.d.ts.map