import type { BaseOptions } from './types.js'; /** The persisted configuration a fingerprint was computed under. */ export interface IndexFingerprintConfig { includePatterns: string[]; excludePatterns: string[]; maxFiles: number; protectedExcludePatterns: string[]; } export interface IndexStateResult { /** True only when the recorded hash and the freshly computed one agree. */ matchesWorkingTree: boolean; /** The hash the index was built from, when one is recorded. */ fingerprint?: string; /** * Why the index does not represent the working tree. * `no-index` — nothing analyzed here. `unbaselined` — an artifact exists but records no hash. * `config-unrecorded` — the index predates configuration persistence, so no sound comparison is * possible. `fingerprint-mismatch` — recomputed under the recorded configuration, and it differs. */ reason?: 'no-index' | 'unbaselined' | 'config-unrecorded' | 'fingerprint-mismatch'; } /** * Compare the persisted index's fingerprint against the working tree's. * * COST: this re-hashes the analyzed corpus, so it is O(repo bytes) of I/O. That is cheap next to an * analysis — no parsing, no call graph, no index write — but it is NOT an O(1) metadata check, and * a caller that runs it per keystroke will feel it. Per checkout is what it is for. * * There is deliberately no `files` scope. If a caller scoped to files A and B while file C changed, * an honest answer is still "does not match" — so the scope would buy nothing — and an * implementation that answered "matches" would be unsound. (`openloreDrift`'s `files` scope answers * a different question: which of these specs drifted.) * * A pure read: no artifact is written, no analysis ownership is acquired, no analysis is started. */ export declare function openloreIndexState(options?: BaseOptions): Promise; //# sourceMappingURL=index-state.d.ts.map