export interface SupersededCacheRoot {
    path: string;
    schemaVersion: number | null;
    bytes: number;
}
export interface CacheInventory {
    root: string;
    bytes: number;
    /** Current and superseded deletion units visible to the cache manager. */
    entryCount: number;
    currentEntryCount: number;
    supersededRoots: SupersededCacheRoot[];
}
export interface CachePruneOptions {
    cacheDir?: string;
    maxAgeDays?: number;
    maxBytes?: number;
    /** Deterministic clock injection for tests and hosts. */
    now?: Date;
}
export interface CachePruneResult {
    root: string;
    limits: {
        maxAgeDays?: number;
        maxBytes?: number;
    };
    before: CacheInventory;
    after: CacheInventory;
    removedEntries: number;
    removedBytes: number;
    removedPaths: string[];
    skippedOpenPaths: string[];
}
/** Keep an entry out of explicit pruning while a live store owns it. */
export declare function retainCacheEntry(entryPath: string): () => void;
export declare function isCachePathRetained(candidatePath: string): boolean;
/** Whether another process is atomically replacing this cache entry. */
export declare function isCacheEntryWriteLocked(entryPath: string): Promise<boolean>;
/**
 * Serialize the destructive rename boundary across OCC processes. The lock is
 * a sibling file, so pruning can see it even while the destination entry does
 * not exist yet.
 */
export declare function acquireCacheEntryWriteLock(entryPath: string, signal?: AbortSignal): Promise<() => Promise<void>>;
/** Last-open activity is recorded in metadata mtime without rewriting payload bytes. */
export declare function touchCacheEntry(entryPath: string): Promise<void>;
/** Read cache size/entry metadata without deserializing any index bodies. */
export declare function inspectOccCache(cacheDir?: string): Promise<CacheInventory>;
/** Explicitly prune superseded roots, aged entries, and oldest entries over size. */
export declare function pruneOccCache(options?: CachePruneOptions): Promise<CachePruneResult>;
