klieo_graph_projector/lib.rs
1#![deny(missing_docs)]
2#![deny(rust_2018_idioms)]
3#![deny(rustdoc::broken_intra_doc_links)]
4
5//! `klieo-graph-projector` — continuous-learning bridge from
6//! [`klieo_core::memory::EpisodicMemory`] to
7//! [`klieo_memory_graph::KnowledgeGraph`].
8//!
9//! Two entry points:
10//!
11//! - [`ProjectableEpisodic`] — drop-in wrapper around any
12//! `Arc<dyn EpisodicMemory>` that broadcasts each recorded
13//! `(RunId, Episode)` pair on a `tokio::sync::broadcast` channel.
14//! The wrapped store is the single source of truth; the broadcast
15//! is a side-effect for subscribers and never causes `record()` to
16//! fail.
17//! - [`EpisodeProjector`] — broadcast subscriber that translates
18//! each episode into typed entities (via an
19//! [`klieo_memory_graph::EntityExtractor`]) and writes
20//! `MENTIONED_IN` edges into a [`klieo_memory_graph::KnowledgeGraph`].
21//! Also offers `project_run()` for on-demand batch replay of
22//! historical episodes.
23//!
24//! Stable at `1.x`. Trait freeze contract recorded in
25//! [ADR-039](https://github.com/adesso-insurance-solutions/klieo/blob/main/docs/adr/adr-039-graphrag-1-0-promotion.md).
26
27pub mod error;
28pub mod extractors;
29pub mod projectable;
30pub mod projector;
31pub mod rules;
32
33pub use error::ProjectionError;
34pub use extractors::HintsOnlyExtractor;
35pub use projectable::ProjectableEpisodic;
36pub use projector::{EpisodeProjector, EpisodeProjectorBuilder};
37pub use rules::entities_for_episode;