/** * Memory Knowledge Graph — the claims ledger: per-origin support from which * an element's description, extraction method and conflict flag are * derived, and origin withdrawal. Split out of memory-kg.ts, which * re-exports the public symbols. */ /** How a claim came to exist. * * `asserted` — someone stated it: an LLM distillation, an explicit * `memory_kg_ingest`, an org's `org_learn`. * `heuristic` — `heuristicExtract` inferred it from two names appearing in one * sentence. Nobody asserted it, and the module header has always called it * lower-trust; until now nothing downstream could tell the two apart. */ export type KgExtractionMethod = 'asserted' | 'heuristic'; /** One origin's assertion about an element. An origin re-asserting replaces its * own contribution — a run stands behind its latest word, not its first. */ export interface KgClaim { origin: string; description: string; /** Assertion time, and the ordering that decides which claim is current. */ at: number; /** Absent on rows written before extraction method was recorded. Absent means * UNKNOWN, never `asserted` — defaulting an unrecorded method to the higher * trust would relabel every old co-occurrence guess as a stated fact. */ method?: KgExtractionMethod; } /** The stored fields derived from a claim ledger. `description` is DERIVED, so * no caller can set it directly and no merge rule has to guess which of two * strings is truer. */ export interface DerivedClaims { claims: KgClaim[]; description: string; origin_refs: string[]; provenance_complete: boolean; origins_dropped: number; /** Two or more live origins assert materially different descriptions. The * summary is still the latest one; this says the graph knows it is disputed * rather than settled. */ conflict: boolean; /** The element's standing, projected from its claims. Absent when any live * claim predates method recording — "not recorded", which is not the same * answer as `asserted`. */ method?: KgExtractionMethod; } /** Add or replace `origin`'s contribution and re-derive everything that hangs * off the ledger. */ export declare function applyClaim(md: Record, origin: string, description: string, now: number, method?: KgExtractionMethod): DerivedClaims; /** Withdraw one origin. Returns null when nothing supports the element any * more (the caller deletes it); otherwise the RE-DERIVED state, which is what * restores a previous correct description after a bad update is rolled back. */ export declare function withoutOrigin(md: Record, origin: string): DerivedClaims | null; //# sourceMappingURL=memory-kg-claims.d.ts.map