import type { Mind, Store } from "../../src/index.js"; export interface SavedProgress { completedFiles: string[]; depositCount: number; trainedContentBytes: number; totalBytesProcessed: number; totalCorpusBytes: number; } export declare function loadProgress(store: Store): Promise; export declare function saveProgress(store: Store, p: SavedProgress): Promise; /** Run index maintenance: compact (remove garbage), repair (fill gaps), * then refresh the canonical-form index (see below). All three are * idempotent — running twice produces the same result as once. * Compaction frees index space first; repair then adds back every * edge/halo-bearing node whose gist was evicted from the pending cache * before it reached the content index, completing the coverage that * incremental promotion alone cannot guarantee. * * repair runs with minParents = 0, NOT the library default of 2. The * default repairs only structural BRIDGES (≥2 parents), but this * trainer's fact deposits also leave answer-side DEPOSIT ROOTS with 0 * structural parents ("The capital of France is Paris." as the dst of a * Q→A edge is a root of its own tree, contained in nothing). Those are * resonance targets recall depends on — a trained store shipped without * them cannot ground statement-shaped queries against its own answers * (observed: 33 such roots missing after a full curriculum, including * high-traffic conversation replies). minParents = 0 admits every * edge/halo bearer; the candidate set is still corpus-of-experiences- * sized, so the pass stays cheap. * * Logs the number of entries removed/added so a run that silently degrades * (growing compaction count, or repair never recovering anything) is * visible in the training log. */ export declare function runIndexMaintenance(mind: Mind, log: (msg: string) => void): Promise;