Skip to main content

Module portability

Module portability 

Source
Expand description

KG export / import — portable JSON archive for namespace-scoped knowledge graphs.

Implements the v1 portability format described in ADR-010. Embeddings are intentionally excluded: they are regenerable from the embedding model + text and their inclusion would lock the format to a specific model.

§Edge namespace enumeration

GraphStore::query_edges has no namespace column — edges are linked to entities, not namespaces. Export collects all entity IDs in the namespace first, then queries edges where source_id is in that set. This covers every edge whose source entity belongs to the namespace, which is the correct definition of “edges in a namespace” for an export that preserves referential integrity.

Structs§

ExportedEdge
A directed edge record in the portable archive.
ExportedEntity
An entity record in the portable archive.
ImportSummary
Outcome of a successful import operation.
KgArchive
Portable JSON archive of a namespace-scoped knowledge graph.