Skip to main content

Module knowledge

Module knowledge 

Source
Expand description

Knowledge graph domain types — entities (nodes) + temporal triples (edges). The structured-facts layer: “Who depends on Y?” “What did we decide about X?”

Import-compatible with the pi-mempalace entities + triples schema (see docs/HANDOFF.md §3). In the SurrealDB backend, entities are record nodes and triples are graph edges (RELATE ... ->triples->).

Structs§

Entity
An entity — a node in the knowledge graph.
EntityId
Stable opaque identifier for an entity (node).
EntityRecord
An entity plus its connected triples (query result).
ImportTriple
A knowledge-graph triple prepared for bulk import — the wire shape shared by ijima import (source dbs) and the HTTP client (import_kg). Subject/object are entity names (Ijima’s id-is-name convention); valid_to is applied as a post-add invalidation when present.
KgImportCounts
Aggregate counts reported by a knowledge-graph import run.
KgStats
Counts for the knowledge-graph stats endpoint.
Triple
A temporal triple: subject -predicate-> object with validity. The valid_to field expresses invalidation (None = still current).

Traits§

KnowledgeGraph
The knowledge-graph contract every backend implements alongside crate::Store. All methods are scoped to a NamespaceId.