Expand description
Quipu – AI-native knowledge graph with strict ontology enforcement.
This crate implements an immutable bitemporal EAVT fact log backed by SQLite,
designed as a foundation for agent-enforced knowledge graphs.
Re-exports§
pub use config::AttachmentConfig;pub use config::EmbeddingConfig;pub use config::FederationConfig;pub use config::GovernanceConfig;pub use config::ProjectionColumnConfig;pub use config::ProjectionConfig;pub use config::QuipuConfig;pub use config::RemoteEndpoint;pub use config::ResolutionConfig;pub use config::SearchConfig;pub use config::ServerConfig;pub use config::ShaclConfig;pub use config::VectorBackend;pub use config::VectorConfig;pub use config::open_with_configured_attachments;pub use context::ContextPipeline;pub use context::ContextPipelineConfig;pub use context::KnowledgeContext;pub use context::KnowledgeEntity;pub use context::KnowledgeFact;pub use context::KnowledgeRelevance;pub use context::tool_context;pub use context::tool_unified_search;pub use derivation::DerivationMethod;pub use derivation::Rederivation;pub use embedding::DeferredEmbed;pub use embedding::EmbeddingProvider;pub use embedding::NO_PROVIDER_HELP;pub use embedding::build_entity_text;pub use embedding::build_entity_text_for_graph_backfill;pub use episode::Episode;pub use episode::IngestResolutionOpts;pub use episode::IngestResult;pub use episode::episode_provenance;pub use episode::ingest_batch;pub use episode::ingest_episode;pub use episode::ingest_episode_with_resolution;pub use error::Error;pub use error::Result;pub use graph::Communities;pub use graph::PageRankConfig;pub use graph::ProjectedGraph;pub use graph::louvain;pub use graph::page_rank;pub use graph::persist_communities;pub use graph::project;pub use graph::tool_project;pub use graph_view::tool_graph_view;pub use impact::DEFAULT_HOPS;pub use impact::ImpactNode;pub use impact::ImpactOptions;pub use impact::ImpactReport;pub use impact::impact;pub use impact::speculate_remove;pub use mcp::align::tool_align_apply;pub use mcp::align::tool_align_decide;pub use mcp::align::tool_align_propose;pub use mcp::explain::tool_explain;pub use mcp::graphiti::tool_episodes_complete;pub use mcp::history::tool_entity_history;pub use mcp::impact::tool_impact;pub use mcp::mapping::tool_mapping_apply;pub use mcp::mapping::tool_mapping_decide;pub use mcp::mapping::tool_mapping_propose;pub use mcp::merge_decisions::tool_merge_apply;pub use mcp::merge_decisions::tool_merge_decisions;pub use mcp::merge_decisions::tool_merge_resolve;pub use mcp::named_query::tool_ask;pub use mcp::owl::tool_load_ontology;pub use mcp::path::tool_path_backtest;pub use mcp::path::tool_path_cone;pub use mcp::proposal::tool_accept_proposal;pub use mcp::proposal::tool_list_proposals;pub use mcp::proposal::tool_propose_schema_change;pub use mcp::proposal::tool_reject_proposal;pub use mcp::resolution::tool_resolve_entity;pub use mcp::rule_answers::tool_rule_query;pub use mcp::search::tool_search_facts;pub use mcp::search::tool_search_nodes;pub use mcp::tools::PreparedEpisode;pub use mcp::tools::SERVER_DERIVED_EMBEDDING;pub use mcp::tools::resolve_validation_shapes;pub use mcp::tools::tool_cord;pub use mcp::tools::tool_datasets;pub use mcp::tools::tool_episode;pub use mcp::tools::tool_episode_commit;pub use mcp::tools::tool_episode_prepare;pub use mcp::tools::tool_graph_freeze;pub use mcp::tools::tool_graph_list;pub use mcp::tools::tool_graph_thaw;pub use mcp::tools::tool_hybrid_search;pub use mcp::tools::tool_queries;pub use mcp::tools::tool_retract;pub use mcp::tools::tool_retract_episode;pub use mcp::tools::tool_search;pub use mcp::tools::tool_set;pub use mcp::tools::tool_shapes;pub use mcp::tools::tool_subscriptions;pub use mcp::tools::tool_unravel;pub use mcp::tools::tool_validate;pub use mcp::tools::tool_attest_challenge;pub use mcp::tools::tool_attest_commit;pub use mcp::tools::tool_attest_receipt;pub use mcp::tools::tool_deck_attest;pub use mcp::tools::tool_deck_present;pub use mcp::tools::tool_deck_receipt;pub use mcp::inference_header;pub use mcp::labels_json;pub use mcp::query_inference;pub use mcp::query_result;pub use mcp::query_result_with_federation;pub use mcp::tool_cooccurrence;pub use mcp::tool_definitions;pub use mcp::tool_export;pub use mcp::tool_graph_create;pub use mcp::tool_graph_label;pub use mcp::tool_knot;pub use mcp::tool_overlay_compose;pub use mcp::tool_overlay_create;pub use mcp::tool_overlay_write;pub use mcp::tool_policy_check;pub use mcp::tool_query;pub use mcp::tool_query_with_federation;pub use mcp::tool_retract_source;pub use mcp::tool_verdict_verify;pub use mcp::value_to_json;pub use mcp::value_to_json_compact;pub use mcp::value_to_json_with_prefixes;pub use onnx_embedder::OnnxEmbeddingProvider;pub use owl::MaterializeReport;pub use owl::Ontology;pub use owl::OwlViolation;pub use proposal::NewProposal;pub use proposal::Proposal;pub use proposal::ProposalKind;pub use proposal::ProposalStatus;pub use provider::DeclaredLabel;pub use provider::FederatedProvider;pub use provider::FederatedQuery;pub use provider::GraphProvider;pub use provider::LocalProvider;pub use provider::ProviderOutcome;pub use provider::ProviderStatus;pub use provider::RemoteProvider;pub use provider::federated_from_config;pub use rdf::IngestReport;pub use rdf::LoadDeclaration;pub use rdf::export_rdf;pub use rdf::export_rdf_subset;pub use rdf::ingest_rdf;pub use rdf::ingest_rdf_chunked;pub use rdf::ingest_rdf_declared;pub use reasoner::reactive::ReactiveReasoner;pub use reconcile::GoResolver;pub use reconcile::ImportResolver;pub use reconcile::PythonResolver;pub use reconcile::ReconcileReport;pub use reconcile::RustResolver;pub use reconcile::default_resolvers;pub use reconcile::reconcile;pub use report::tool_report;pub use resolution::EntityCandidate;pub use resolution::ResolutionResult;pub use resolution::resolve_entity;pub use shacl::ValidationFeedback;pub use shacl::Validator;pub use shacl::validate_shapes;pub use sparql::GraphScope;pub use sparql::QueryResult;pub use sparql::TemporalContext;pub use sparql::Triple;pub use sparql::query as sparql_query;pub use sparql::query_temporal as sparql_query_temporal;pub use store::forks::ForkDiff;pub use store::forks::ForkInfo;pub use store::forks::ForkPromotion;pub use store::Datum;pub use store::GroupBy;pub use store::PROJECTION_ROWS_MAX;pub use store::ProjectionAggregate;pub use store::ProjectionCertificate;pub use store::ProjectionRows;pub use store::ProjectionStatus;pub use store::RowsAfter;pub use store::Store;pub use store::Delta;pub use store::TransactObserver;pub use types::Fact;pub use types::Op;pub use types::Term;pub use types::Transaction;pub use types::Value;pub use vector::KnowledgeVectorStore;pub use vector::VectorMatch;pub use vector_delegate::VectorSearchDelegate;pub use search_query::tool_search_query;
Modules§
- acquisition
- Complete, bounded graph acquisition from one source read transaction.
- align
- Operator-driven cross-graph concept alignment (aegis-sosiaa).
- applier
- The shared applier, slice 1 (
docs/design/shared-applier-api.md). - asof_
rdf - Offline, bounded RDF projection of one complete as-of share.
- asof_
share - As-of scoped share: a replica bootstrap cut at one transaction. As-of scoped share: the replica bootstrap (docs/design/as-of-share.md).
- bindings
- Shared, transport-free entry point for local language bindings.
- changeset
- The store-wide change-set format,
quipu-changesetv1 (aegis-4mk). - changeset_
store - Change-sets against a live store:
/diffand the/patchstate check. Change-sets against a live store:GET /diffand the/patchstate check (aegis-4mk). The format itself iscrate::changeset; spec indocs/design/changeset-format.md. - client_
changeset - Signed offline proposals, without upstream replication or admission authority.
- client_
resolver - Separately signed resolver evidence, without changing the client v1 wire. Separately signed resolver evidence; the client v1 wire object is unchanged.
- compact
- Data-driven IRI compaction for human- and agent-facing result surfaces.
- competency
- Strict, offline authoring contract for pendant questions and commands.
- config
- Configuration for Quipu — loaded from
.bobbin/config.toml[quipu]section. - context
- Unified context pipeline — blends knowledge graph facts with code context.
- crew_
credentials - Additive, audience-bound credential identity. Registries contain verifiers, never bearer plaintext. Existing shared authentication is a separate policy.
- databook
- DataBook documents: parse and render (kurtcagle/databook 1.5.0).
DataBook documents: Markdown with YAML frontmatter and typed fenced blocks
(
kurtcagle/databook, release 1.5.0, the W3C Holon CG format). - databook_
store - Export a graph as a DataBook; import a DataBook’s graph data. Export a graph as a DataBook, and import a DataBook’s graph data.
- derivation
- Fact-level derivation methods.
- embedding
- Auto-embedding support for entity writes.
- embedding_
runtime - Shared provider setup and immutable model identity for native loaders.
- entity_
key - Key-field IRI derivation for
minting = "key"namespaces. - entity_
namespaces - Registered stable entity namespaces. Configuration is owner policy, not an assertion imported from an untrusted pendant.
- entity_
reference - Stable registered minting and reference descriptors, without network fetches.
- episode
- Episode ingestion — structured write path for agent-extracted knowledge.
- error
- explain
explain— walk a fact’s derivation chain from the provenance already in the fact log (gap G8 ofdocs/design/semantic-reasoning-gaps.md; phase 6 ofdocs/design/reasoning-engine-fixes.md, bead quipu-923).- feed_
parts - Oversized-transaction parts shared by the change stream and the as-of share. Oversized-transaction parts: the one chunking scheme for feed frames.
- fluent
- Immutable observations and deterministic current-value projections.
- follow
quipu follow: keep a read-only follower current from a primary’s committed change feed (aegis-tnh), so reads survive the primary’s host going away.quipu-server --read-onlyserves the follower database (server.replica); this module is its only writer.- follow_
http - The primary over HTTP, for
crate::follow. - follow_
ready - Whether a follower may serve reads in place of its primary (aegis-tnh). Whether a follower database may serve reads in place of its primary (aegis-tnh). A failover router asks this of the replica, so the answer cannot depend on the primary being reachable: that is the case it exists for.
- fork_
merge_ decisions - Resolve a fork promotion that stopped on conflicts (aegis-k7l). Resolve a fork promotion that stopped on conflicts (aegis-k7l).
- git_
merge - Store-free pendant merging. Git supplies the base; the store merge supplies the operator.
- governance
- Governance enforcement — binding the declarative policy vocabulary to the write path (the loom’s write-time gate).
- grant_
scope - Shared principal/graph/validity predicate. This holds no authority, locks, operation grants, credential evidence, store pins or revocation barrier.
- graph
- Graph projection — materialize the fact store into a petgraph
DiGraphfor running graph algorithms (PageRank, shortest path, connected components, Louvain community detection). - graph_
catalog - Immutable admission plans for the per-graph writer pilot; not an activation API. Immutable routing admission for per-graph owners.
- graph_
view - Render-ready graph projection — the single payload the UI draws from.
- http_
auth - Access-control decisions for the Quipu REST server (hq-azs).
- impact
- Impact analysis — bounded transitive walk over entity→entity edges.
- import_
embedding - Index only eligible staged entities, without adopting them into ROOT.
- lattice
- The label lattice — freshness, trust and policy composing under one rule.
- lattice_
fold - The dataset folds over the label lattice — split from
crate::latticeto keep that module under the file-size ratchet. - lattice_
kind - The
dataKindaxis — what sort of data a graph holds. - lexical
- Opt-in, derived FTS5 index of assertions with explicit graph scope. Fact rowids are document ids; triggers maintain it in the fact writer’s transaction, including rollback. Valid-time metadata is read from facts, so closing a fact does not rewrite its text or destroy historical search. No search performs a backfill.
- mcp
- MCP tool handlers for Quipu – the agent-facing API surface.
- mcp_
transport - Native MCP protocol adapters over the governed HTTP application. Native MCP transport. Every call enters the existing REST application, so authentication, read-only guards, and transaction identity have one authority.
- memory_
budget - A conservative SQLite allocation from one aggregate service budget.
- memory_
files - Versioned UTF-8 file records; native harness routing belongs to the caller.
- merge3
- The shape-aware three-way slot merge, shared by share reconnect
(
share_merge,git_merge) and fork promotion (store::forks). - merge_
ingress - Profiled merge ingress shared by CLI, MCP and HTTP. Source-only until qualification. No default activation, new credential or graph grant.
- merge_
plan - Receiver-side blast-radius evidence for data merges.
- merge_
reconcile - One way to reconcile a failed merge: shared decisions view, resolve and layout (aegis-k7l). One way to reconcile a failed merge (aegis-k7l).
- metrics
- In-process Prometheus metrics — the usage-measurement layer.
- model_
assets - Explicit, pinned model installation. Ordinary commands never download.
- model_
backfill - Explicit bounded preparation of missing vectors for existing ROOT subjects.
- namespace
- Central namespace constants for RDF/OWL/SHACL URIs.
- onnx_
embedder - ONNX-based embedding provider for standalone quipu-server.
- onnx_
runtime - One pre-session bootstrap with explicit checksum-pinned GPU acquisition.
- owl
- OWL 2 RL ontology layer — class hierarchy, materialization, and validation.
- ownership_
handoff_ model - Experimental pure ownership-handoff model; no Store or runtime integration. Experimental, I/O-free model of the ownership-handoff design’s P0 contract.
- pack
- Knowledge packs — export a graph as a single attachable artifact (quipu #81).
- pack_
full - The
--fullpack: a LOSSLESS whole-store artifact, for internal backup. - pack_
full_ text - The
--full --format textpack: a LOSSLESS whole-store artifact as text. - pack_
restore - The pack FORMAT GATE, and
quipu restore— the reader for a--fullpack. - path
- Golden paths — trajectory pruning, backtesting, and drafting.
- project_
graph - The project graph a repository commits under
.quipu/(aegis-w3k75d.11). - promotion_
control - Cooperative cancellation for an atomic staged snapshot promotion.
- proposal
- Schema evolution proposals — agent-driven ontology change workflow.
- proposal_
migration - Data migrations carried by schema-change proposals (aegis-esd, gap G5 of
docs/design/terminusdb-gap-analysis.md). - proposal_
plan - Blast-radius plan and risk score for a schema-change proposal (aegis-493).
- provider
- Virtual graph provider trait — federation interface for external data sources.
- rdf
- RDF data model layer — bridges oxrdf types with the EAVT fact log.
- rdf_
triple - First-class, dictionary-independent triple terms for fluent projections.
- read_
authorization - Owner-local read policy and request-owned capabilities.
- read_
pin - Fail-closed transaction pins at the remote read boundary.
- reasoner
- Datalog-style rule engine over the EAVT fact log.
- reconcile
- Post-index reconciliation — resolves cross-repo import edges.
- render
- Deterministic, bounded graph-to-document plans. No filesystem or network I/O.
- replica_
manifest - Portable bootstrap manifest and signature verification, including WASM. The as-of share’s manifest types.
- replica_
provider - Compare portable provider identities in two native composed acquisitions.
- replicate_
source - The source’s side of the scoped replication stream (
local-sync-mode.md§5 and §6): the frames of one stream session, built from the store with no I/O of its own. The server route (server/replicate.rs) drives it; tests drive it directly into the applier. - replicate_
wire - The signed frames of the scoped replication stream (
local-sync-mode.md§5), shared by the source that sends them and the applier that checks them. - report
- Graph report — a live, queryable equivalent of graphify’s static
GRAPH_REPORT.md. Synthesizes three views of the current knowledge graph in one read-only pass (hq-ct27, backend for the graph-report skill / aegis-1p0 Gap 4): - request_
usage - Bounded, structured HTTP usage metadata for request logs.
- resolution
- Entity resolution — detect near-duplicate entities before writing.
- resolver_
contract - Prospective resolver types and content-bound validation evidence; no admission authority. Content-bound prospective resolver contract, without Store or planner access.
- rule_
answers - Explicit positive/negative evidence, independent of judgment or action authority.
- schema
- search_
outcome - Semantic retrieval outcomes, independent of transport and instrumentation.
- search_
query - Bounded search-seeded SPARQL SELECT queries. Search seeds first, then evaluate SPARQL with a bounded VALUES relation.
- search_
trace - Bounded, anonymous diagnostics for completed slow HTTP searches.
- semweb
- Semantic web API logic — entity conneg, Spotlight, TPF, Reconciliation, Preview.
- session_
attestation - Session workload attestation shared by HTTP writes and knowledge shares.
- shacl
- SHACL write-time validation via rudof.
- shacl_
context - Store context for write-time SHACL (aegis-fp17f).
- shacl_
cycles - Refuse recursive SHACL shape graphs (aegis-ahu0).
- shacl_
unsupported - Refuse SHACL-SPARQL shapes, which are not evaluated (aegis-rk4). Refuse SHACL-SPARQL shapes, which quipu does not evaluate (aegis-rk4).
- shape_
mapping - Version-pinned, one-hop schema correspondences. A mapping grants no access.
- share
- Git-native knowledge shares: canonical RDF plus shapes and a lineage manifest.
- share_
alignments - Optional, sealed alignment evidence. Transport never applies identity mappings.
- share_
attestation - The share-import attestation seam (aegis-c9c44).
- share_
completeness - Which store tables a reconstruction share carries, and which it must not.
- share_
compose - Compose verified snapshots into an explicit, provenance-preserving dataset.
- share_
current - Pendant autoload: one stable CURRENT name per repository (aegis-koxp0u).
- share_
delta - Parent-bound SPARQL Update deltas for portable shares.
- share_
diff - Semantic, entity-grouped diffs of share payloads (aegis-fxpbys.1).
- share_
fluent - Opaque fluent proof transport, separate from native admission authority. Manifest-bound opaque fluent evidence. Transport never grants origin authority.
- share_
import - Quarantined import and composition for git-native knowledge shares.
- share_
merge - Shape-aware three-way reconnect for git-native knowledge shares.
- share_
merge_ decisions - Resolve a share merge that cannot auto-merge (aegis-yavo9c).
- share_
merge_ decisions_ view - What a person needs to read a decisions file (aegis-yavo9c item 6):
human labels, the kind of conflict and its rule in words, and a strict
check that a file edited elsewhere carries no field
applywould drop. - share_
mint - Minting a producer attestation into a share manifest (aegis-tadzdf).
- share_
pack_ review - PR-review report for a pendant change (aegis-fxpbys.1, milestone M2).
- share_
pointer_ load - First-use pack pointers, shared by native and browser consumers.
- share_
queries - Stored queries carried by a share as
queries.ttl(aegis-fxpbys.2). - share_
review - Durable share review state and events. Notifications never adopt shapes.
- share_
scrub - The outward boundary: which destination a share is bound for, and the block-tier identifier scrub that a share bound outward must pass.
- share_
transport - Bounded directory and HTTP transport for portable text shares.
- signing
- Quipu’s application adapter to the published shared signing implementation.
- sparql
- SPARQL query engine – evaluates SPARQL queries over the EAVT fact log.
- sparql_
structure - One conservative bound on SPARQL structure, and one place every request is parsed (aegis-rq1afp, aegis-xcvb5z).
- statement_
profile - Per-query SQLite statement totals (aegis-xacr), off unless a server enables it.
- store
- The core fact log store backed by
SQLite. - store_
replica - Portable logical full-store replication values. Portable logical full-store wire values, shared by native and WASM appliers. No file access, received SQL execution, credentials or producer activation.
- store_
stream - Opt-in logical store replication; opening a store never enables its journal. Logical core-table snapshot and mutation journal for a full-store follower.
- substring
- Explicitly provisioned, transaction-maintained substring candidates. Searches never create or backfill this optional current-only derived index. Temporal queries retain the ordinary exact fact evaluator.
- term_
vocabulary - Which IRIs the vocabulary terms Quipu mints are written under.
- time
- Wall-clock timestamps for write paths, without a chrono dependency.
- transaction_
auth - Authenticated request provenance, separate from caller-declared actors.
- types
- vector
- Vector search over entity embeddings.
- vector_
delegate - Delegated vector search for external embedding providers.
- verdict_
schemes - Hardware-backed verdict signature schemes, beside the v1 raw ed25519.
- verified_
write - Native verification of a signed write, shared by the HTTP receiver and any in-process caller (aegis-2idcev, design of 2026-10-14).
- vocabulary
- The sanctioned class vocabulary, and what a write is about to add to it.
- w3c
- W3C-standard SPARQL 1.1 Query Results serialization for content-negotiated
/queryresponses (aegis-u7ag). - write_
base - Pure declared write-base binding; no writer integration or admission authority. Bind a declared write base to the writer’s captured store coordinates.
- write_
gate - The pre-transaction write gate shared by SPARQL
/updateand proposal migrations (aegis-1hfyk5, aegis-esd). - write_
kind - Which code path a write came through, as a CLOSED set (aegis-gwkd76).
- write_
observation - Payload-free stage observations for selected synchronous writer paths.
- write_
provenance - Who and where a write came from, as a CLASS, never as text (aegis-7zp4rc).
- writer_
lock - Cooperative process ownership for servers and local language bindings.
- writer_
scope - Exact, owner-enrolled machine write authority. This is not a read grant or a human attestation. Only the HTTP authentication adapter enters this lane.
Structs§
- Compact
Rdf - Reactive
Owl - Observer that re-materializes the loaded ontologies on relevant deltas.
Constants§
- COMPACT_
RDF_ LIMIT - GIT_SHA
- The git commit this build was compiled from, as stamped by
build.rs. - VERSION
- The crate version this build was compiled from.
Functions§
- delete_
rdf_ graph - Remove every current statement from one graph. Named graph registration is removed too, so a following protocol GET observes 404 rather than an empty graph that still exists.
- export_
compact_ graph - Serialize all asserted facts of exactly one named graph; unknown scope fails.
- export_
rdf_ construct - Export the graph produced by a SPARQL CONSTRUCT query.
- export_
rdf_ group - Export ROOT facts attributed to an episode group id.
- replace_
rdf_ graph - Replace one graph’s current contents with an RDF payload in one fact-log
transaction.
graph=Nonetargets the default graph; named graphs are registered as committed graphs when first created.