/** * Sidecar metadata for a semantic index store. * * The Rust store (manifest.json/ids.json/vectors.bin) only knows vector ids; * this sidecar (index-meta.json, written next to the store) tracks the source * side: per-file freshness (mtime+size, content hash recomputed only when they * change) and each file's chunk line-ranges so search hits can be rendered as * `path:start-end`. It also pins the chunker version and embedding model id — * a mismatch on either triggers a clean rebuild instead of an inconsistent * incremental update. */ export interface FileMeta { mtimeMs: number; size: number; /** SHA-256 of content, hex. Recomputed only when mtime/size differ. */ hash: string; /** Per-chunk 1-based inclusive [start, end] line ranges; index = chunk number. */ chunks: Array<[number, number]>; } export interface IndexMeta { formatVersion: number; chunkerVersion: number; modelId: string; /** Absolute repo root this index was built from. */ repoRoot: string; /** Last time this index was opened (ms). Enables later GC of dead stores. */ lastUsedMs: number; files: Record; } /** Directory holding the vector store + sidecar for `repoRoot`. */ export declare function getEmbsearchStoreDir(repoRoot: string): string; /** Subdirectory the Rust store lives in (sidecar sits next to it). */ export declare function getVectorStoreDir(storeDir: string): string; export declare function emptyIndexMeta(repoRoot: string, modelId: string): IndexMeta; /** * Load the sidecar. Returns undefined when absent, unreadable, or built with a * different format/chunker/model — callers treat all of those as "rebuild". */ export declare function loadIndexMeta(storeDir: string, modelId: string): IndexMeta | undefined; /** Atomically persist the sidecar (temp + rename, matching the Rust store). */ export declare function saveIndexMeta(storeDir: string, meta: IndexMeta): void; export declare function hashContent(content: string): string; //# sourceMappingURL=index-meta.d.ts.map