export interface FileEntry { absolutePath: string; relativePath: string; language: string; module: string; lastModified: string; } export declare function walkFiles(): Promise; export interface IndexState { lastIndexedAt: string; fileHashes: Record; } export declare function loadIndexState(): IndexState | null; export declare function saveIndexState(state: IndexState): void; export declare function getChangedFiles(files: FileEntry[], state: IndexState | null): { toIndex: FileEntry[]; toDelete: string[]; }; /** * Every path whose existing chunks must be deleted before an incremental upsert: removed * files AND changed files. Chunk ids are hash(path:startLine), so an upsert only replaces a * chunk whose start line did not move — without clearing a changed file first, every edit * that shifts a chunk boundary leaves the old chunk in the collection forever. */ export declare function pathsToClear(changes: { toIndex: FileEntry[]; toDelete: string[]; }): string[];