/** * `knowledge compact` — deduplicate and normalize the YAML source files. * * After long append-only accumulation, files can carry superseded duplicate * documents. Compaction keeps the latest version of each id (by lastVerified), * drops orphaned relationships, sorts documents by id, and rewrites each file * with normalized formatting. This is the one sanctioned exception to the * append-only rule (KG Req 12.5, 12.6) and the deliberate deletion path for * merge leftovers. It also folds the one-file-per-record layout back into the * per-type files and removes the record files it folded * (autopilot-merge-lane-stalls-on-conflicts/AC-6). * * Requirements: KG 12.6 * * @module */ import type { YamlSourceStore } from './yaml-source.js'; import type { KnowledgeIndex } from './index/knowledge-index.js'; export interface CompactResult { duplicatesRemoved: number; orphanRelationshipsRemoved: number; filesRewritten: string[]; warnings: string[]; } export declare function compactKnowledge(source: YamlSourceStore, index: KnowledgeIndex): CompactResult; //# sourceMappingURL=compact.d.ts.map