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 portability;
29pub mod retrieval;
30pub mod runtime;
31
32pub use curation::{EdgeListFilter, EntityPatch, MergeStrategy, MergeSummary};
33pub use error::{RuntimeError, RuntimeResult};
34pub use fusion::FusionStrategy;
35pub use graph_traversal::{PathNode, TraversalOptions};
36pub use khive_storage::NoteKind;
37pub use portability::{ImportSummary, KgArchive};
38pub use retrieval::{SearchHit, SearchSource};
39pub use runtime::{KhiveRuntime, RuntimeConfig};