Skip to main content

khive_runtime/
lib.rs

1//! khive-runtime: composable Service API used by daemon, MCP server, and CLI.
2//!
3//! Wraps `StorageBackend` + query compilation into a single Rust API.
4//!
5//! # Quick start
6//!
7//! ```ignore
8//! use khive_runtime::{KhiveRuntime, RuntimeConfig};
9//!
10//! // In-memory for tests:
11//! let rt = KhiveRuntime::memory()?;
12//!
13//! // Default (production): reads ~/.khive/khive-graph.db
14//! let rt = KhiveRuntime::new(RuntimeConfig::default())?;
15//!
16//! // Create an entity:
17//! let entity = rt.create_entity(None, "concept", "LoRA", None, None, vec![]).await?;
18//!
19//! // Link two entities (EdgeRelation is the typed relation):
20//! let edge = rt.link(None, entity.id, other_id, EdgeRelation::Extends, 1.0).await?;
21//! ```
22
23pub mod curation;
24pub mod error;
25pub mod fusion;
26pub mod graph_traversal;
27pub mod operations;
28pub mod pack;
29pub mod portability;
30pub mod retrieval;
31pub mod runtime;
32
33pub use curation::{EdgeListFilter, EntityPatch, MergeStrategy, MergeSummary};
34pub use error::{RuntimeError, RuntimeResult};
35pub use fusion::FusionStrategy;
36pub use graph_traversal::{PathNode, TraversalOptions};
37pub use pack::{PackRuntime, VerbRegistry, VerbRegistryBuilder};
38pub use portability::{ImportSummary, KgArchive};
39pub use retrieval::{SearchHit, SearchSource};
40pub use runtime::{KhiveRuntime, RuntimeConfig};