/** * Cleanup — orphaned per-project data pruning (--data): ~/.monomind/projects * dirs and ~/.monomind-projects.json registry entries whose project is gone. * Extracted from cleanup.ts. */ import type { StaleScratchItem } from './cleanup-scratch.js'; /** * Entries of the project registry (~/.monomind-projects.json, written by * `init` for `init upgrade --all`) whose project was deleted, by the same rule * as project-data dirs. Exported for tests; unreadable registry → none. */ export declare function findStaleRegistryEntries(registryPath: string): string[]; /** Rewrite the registry without `stale`, re-read first so a concurrent `init` registration survives. */ export declare function pruneRegistryEntries(registryPath: string, stale: string[]): number; /** * Find prunable entries under the per-project data base (default * ~/.monomind/projects). Exported for tests — `baseDir`/`now` injectable. * * Classification per dir: * - `origin.json` present and its recorded path still exists → keep the dir, * but flag a leftover `lancedb/` subdir (dead since the SQLite engine swap). * - `origin.json` present, recorded path provably deleted (not merely on an * unmounted volume, see {@link isProvablyDeleted}) → orphaned → prune. * - no `origin.json` (pre-2.3.1 dirs can't prove their origin) → prune only * when untouched for {@link UNKNOWN_DIR_MAX_AGE_MS} — or immediately with * `--aggressive`, which treats unprovable dirs as junk (safe: every live * project rewrites origin.json on its next memory access). */ export declare function findOrphanedProjectData(baseDir: string, now: number, aggressive: boolean): StaleScratchItem[]; //# sourceMappingURL=cleanup-data.d.ts.map