/** * A fingerprint of the litectx source that decides *what gets written* at index time — the chunker, * the tokenizer, the schema. Stored in the index (`PRAGMA user_version`) so an index built by an * older litectx can be recognised and rebuilt. * * Why a source hash and not the package version: most releases don't touch indexing, and stamping the * package version would force a full re-chunk of every consumer's repo on every patch. And why not a * hand-maintained constant: someone edits the chunker, forgets to bump it, and the index silently rots * — which is the exact failure this exists to kill. A hash cannot be forgotten. * * It over-triggers slightly (a change to an unrelated module also moves it). That is the safe * direction: an unnecessary rebuild costs time, a skipped one serves wrong chunk boundaries forever. * * Computed once per process (~0.6ms) — the source cannot change under a running process. * @returns {number} a POSITIVE i32 (the width `PRAGMA user_version` stores). Never 0 — see below. */ export function indexStamp(): number; /** * Classify a path into its `kind` + `format` from the extension alone. * @param {string} relPath * @returns {{ kind: string, format: string }} */ export function classify(relPath: string): { kind: string; format: string; }; /** * List candidate files under root, filtered to the included extensions. * @param {string} root * @param {string[]} include extensions like [".ts", ".js", ".py", ".md"] * @param {string[]} [pathspecs] optional git pathspecs to scope the index (e.g. ["app/**\/*.js"]) * @returns {string[]} repo-relative paths */ export function collectFiles(root: string, include: string[], pathspecs?: string[]): string[]; /** * Diff the current file list against the previously-indexed state, reading (and hashing) * only files whose mtime moved (§6, fast→slow: mtime → content-hash). Unchanged files are * skipped without a read. * @param {string} root * @param {string[]} relPaths current candidate files * @param {Map} prev prior index state * @returns {{ upserts: import("./store.js").Upsert[], touch: { path: string, mtime: number }[], unchanged: number }} */ export function diffFiles(root: string, relPaths: string[], prev: Map): { upserts: import("./store.js").Upsert[]; touch: { path: string; mtime: number; }[]; unchanged: number; };