/** * Memory Knowledge Graph — ingest: kgIngest (entity resolution, claim * merge under compare-and-swap, placeholder endpoints) and its per-call * report. Split out of memory-kg.ts, which re-exports kgIngest. */ import type { KgExtractionMethod } from './memory-kg-claims.js'; import type { KgEdgeInput, KgIngestResult, KgNodeInput, KgScope } from './memory-kg-model.js'; /** Merge extracted nodes/edges into the KG. * * Identity is the (type, name) tuple resolved through the name index, so an * entity is idempotent under re-extraction but two different things sharing a * name stay two things. Each write adds this origin's CONTRIBUTION to the * element's claim ledger, from which the description and `origin_refs` are * derived — which is what lets a later ingest correct an earlier one and lets * rollback put the earlier one back. * * The COMPLETE payload is validated before anything is written, and every edge * endpoint is made to exist (as a placeholder entity when the caller named one * that does not) before the edge lands. An edge whose endpoint could not be * created is rejected rather than written: retrieval is seeded from nodes, so * an edge with a missing endpoint is a fact that cannot be found through * either of the things it is about. * * NOT ATOMIC — the memory bridge has no transaction primitive, so a failure * part-way through leaves earlier writes persisted. The counters therefore * report only what actually landed, `failures` lists what did not, and * `success` is false whenever anything was refused. A partial ingest is safe * to retry: every write is a keyed upsert. */ export declare function kgIngest(options: { nodes: KgNodeInput[]; edges?: KgEdgeInput[]; /** Provenance: run id, session id, or doc hash this extraction came from. * Stored qualified by `scope` — see `kgQualifyOrigin`. */ originRef: string; /** Owner of these facts. Omit for project-shared knowledge. */ scope?: KgScope; /** How this payload was produced. Defaults to `asserted`; `heuristicExtract` * callers must pass `heuristic` so a co-occurrence guess is not stored as a * stated fact. Recorded per origin, so the same element can hold a heuristic * claim from one run and an asserted one from another. */ method?: KgExtractionMethod; dbPath?: string; }): Promise; //# sourceMappingURL=memory-kg-ingest.d.ts.map