Skip to main content

Crate khive_runtime

Crate khive_runtime 

Source
Expand description

khive-runtime: composable Service API used by daemon, MCP server, and CLI.

Wraps StorageBackend and query compilation into a single Rust API surface.

Re-exports§

pub use curation::ContentMergeStrategy;
pub use curation::EdgeListFilter;
pub use curation::EdgePatch;
pub use curation::EntityDedupMergePolicy;
pub use curation::EntityPatch;
pub use curation::MergeSummary;
pub use curation::NotePatch;
pub use daemon::pid_path;
pub use daemon::run_daemon;
pub use daemon::socket_path;
pub use daemon::DaemonDispatch;
pub use daemon::DaemonRequestFrame;
pub use daemon::DaemonResponseFrame;
pub use embedder_registry::EmbedderProvider;
pub use embedder_registry::EmbedderRegistry;
pub use embedder_registry::LatticeEmbedderProvider;
pub use engine_config::config_from_env;
pub use engine_config::ConfigError;
pub use engine_config::EngineConfig;
pub use engine_config::KhiveConfig;
pub use error::RuntimeError;
pub use error::RuntimeResult;
pub use graph_traversal::PathNode;
pub use graph_traversal::TraversalOptions;
pub use objectives::AmplifiedDecayAwareSalienceObjective;
pub use objectives::DecayAwareSalienceObjective;
pub use objectives::GraphProximityObjective;
pub use objectives::MemoryRecallPipeline;
pub use objectives::NoteCandidate;
pub use objectives::RerankerObjective;
pub use objectives::RetrievalCandidate;
pub use objectives::RrfFusionObjective;
pub use objectives::TemporalRecencyObjective;
pub use objectives::TextRelevanceObjective;
pub use objectives::VectorSimilarityObjective;
pub use operations::LinkSpec;
pub use operations::NoteSearchHit;
pub use operations::QueryResult;
pub use operations::Resolved;
pub use pack::DispatchHook;
pub use pack::KindHook;
pub use pack::PackFactory;
pub use pack::PackLoadError;
pub use pack::PackRegistration;
pub use pack::PackRegistry;
pub use pack::PackRuntime;
pub use pack::SchemaPlan;
pub use pack::VerbRegistry;
pub use pack::VerbRegistryBuilder;
pub use portability::ImportSummary;
pub use portability::KgArchive;
pub use presentation::micros_to_iso;
pub use presentation::present;
pub use presentation::PresentationMode;
pub use registry::ObjectiveRegistry;
pub use registry::RegisteredObjective;
pub use retrieval::SearchHit;
pub use retrieval::SearchSource;
pub use runtime::parse_pack_list;
pub use runtime::runtime_config_from_khive_config;
pub use runtime::BackendId;
pub use runtime::KhiveRuntime;
pub use runtime::NamespaceToken;
pub use runtime::RuntimeConfig;
pub use validation::GraphPatch;
pub use validation::GraphSnapshot;
pub use validation::RuleFn;
pub use validation::RuleId;
pub use validation::Severity;
pub use validation::ValidationContext;
pub use validation::ValidationReport;
pub use validation::ValidationRule;
pub use validation::Violation;

Modules§

curation
Curation operations: entity update/merge and edge-list filter type.
daemon
khived daemon server — persistent warm runtime over a Unix socket.
embedder_registry
EmbedderRegistry — pack-extensible embedding provider surface.
engine_config
TOML-based embedding engine configuration for khive.
error
Runtime error types.
fusion
Fusion strategies for combining ranked result lists.
graph_traversal
objectives
Retrieval Objective implementations for khive-runtime.
operations
High-level operations composing storage capabilities into user-facing verbs.
pack
Pack runtime trait and verb registry.
portability
KG export / import — portable JSON archive for namespace-scoped knowledge graphs.
presentation
Verb response presentation modes and transformation.
registry
Objective registry for dynamic dispatch.
retrieval
Retrieval operations: local embedding generation and hybrid search with RRF fusion.
runtime
KhiveRuntime — composable handle to all storage capabilities.
validation
Validation pipeline types for pack-contributed KG rules.

Structs§

ActorRef
Caller identity. kind distinguishes user vs agent vs lambda etc.
AllowAllGate
Permissive gate — every request is allowed with no obligations.
AuditEvent
Structured audit record emitted once per gate consultation.
EventObservation
A single entity observation recorded alongside an event.
EventView
An event together with its associated observations.
GateContext
Per-request context — session, timing, transport source.
GateRequest
What the gate sees on every verb invocation.
HandlerDef
Handler metadata for discovery and documentation.
Namespace
A validated, opaque namespace identifier.
NoteKindSpec
Kind-level schema specification for a note kind.
NoteLifecycleSpec
Lifecycle specification for a note kind.
PackSchemaPlan
DDL statements the pack needs applied to the auxiliary schema.
ParamDef
Parameter type for help=true schema envelopes.

Enums§

AuditDecision
The outcome field of an AuditEvent, serialised as "allow" / "deny".
FusionStrategy
Fusion strategy for combining ranked result lists.
GateDecision
Gate decision: allow (with optional obligations) or deny (with reason).
GateError
Errors returned by [Gate::check].
Obligation
Side-effects a policy may attach to an Allow decision.
ObservationRole
Role of a referent in a brain observation (candidate, selected, target, signal).
ReferentKind
Which substrate (entity or note) the referent record lives in.
VerbCategory
Illocutionary force classification for a verb handler.
VerbPresentationPolicy
Presentation override for a verb handler.
Visibility
Visibility tier for a handler.

Traits§

Gate
Authorization gate consulted before each verb dispatch.

Type Aliases§

GateRef
Shareable handle to a Gate impl.