Skip to main content

Module portability

Module portability 

Source
Expand description

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

Embeddings are excluded (regenerable from text + model). Edges are collected by querying all entity IDs in the namespace first, then fetching incident edges.

Structs§

ExportedEdge
A directed edge record in the portable archive.
ExportedEntity
An entity record in the portable archive.
ImportConflictSummary
ImportOptions
Opt-in CLI behavior; this does not change import_kg or its JSON/policy wrappers.
ImportPolicySkippedEdge
ImportSkippedEdge
One skipped archive edge, retaining its identity and endpoint-contract error.
ImportSummary
Outcome of a successful import operation.
ImportValidation
Pure preflight result. Unknown kinds are distinct and in first-record order. Preflight emits no warnings and opens no destination store.
KgArchive
Portable JSON archive of a namespace-scoped knowledge graph.

Enums§

ImportConflictMode
ImportEdgeSkipCause
Why an archive edge was skipped during a successful import.
ImportPolicySkipCause
Reasons in the policy-aware report, separate from the legacy closed skip enum.

Functions§

import_key_conflict
import_key_conflict: archive entity entity_id carries key under kind, and another live entity holds it. The holder is not named.
parse_archive_timestamp
Parse an optional archive timestamp, using fallback only when absent.
validate_archive_key_uniqueness
Refuse an archive in which two entities carry the same key under the same kind. Each item is one entity’s id, kind and keys.
validate_entity_names
Validate the keys and aliases one archive entity carries, before any read: each key and each alias as a caller write validates it, none listed twice, and no alias equal to the entity’s name.