/** * Disk cache of picker labels so listing history does not inspect every * session.jsonl.zstd on each launch. Invalidated by file mtime/size. */ /** One cached picker row for a stored session. */ export interface SessionIndexEntry { id: string; label: string; updatedAt: number; cwd: string; hasUserInput: boolean; hasReply: boolean; unreadable?: boolean; mtimeMs: number; size: number; } /** First page of recent sessions inspected after the header sketch paints. */ export declare const PICKER_PRIORITY_COUNT = 9; export declare function sessionIndexPath(dshHome?: string): string; /** Artifact fingerprint used as the cache key. Missing files return zeros. */ export declare function sessionArtifactStat(persistence: object, meta: object): { mtimeMs: number; size: number; }; export declare function indexEntryMatchesStat(entry: SessionIndexEntry | undefined, stat: { mtimeMs: number; size: number; }): boolean; export declare function loadSessionIndex(path: string): Promise>; export declare function saveSessionIndex(path: string, entries: ReadonlyMap): Promise; /** Drop ids that are no longer in the store so the file cannot grow forever. */ export declare function pruneSessionIndex(entries: Map, keepIds: ReadonlySet): void;