1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! Backend-agnostic memory-policy primitives shared across Rig memory-store
//! adapters (`rig-memvid` and future backends like SQLite, LanceDB, Qdrant,
//! plain filesystem, etc.).
//!
//! Public surface:
//!
//! - [`dedup`] — in-process content-hash dedup for hooks/compactors that must
//! satisfy `rig::memory::{DemotionHook, Compactor}`'s idempotency contract.
//! - [`metadata`] — typed envelope written into a backend's per-entry
//! metadata so downstream tools (evals, inspectors, RAG pipelines) can
//! reason about the lifecycle that produced each entry.
//! - [`inmem`] — a deterministic no-disk reference store for tests,
//! examples, and offline modes.
//! - [`store`] — the minimal [`TextWriter`] + [`Committable`] capability
//! traits backends impl so hooks and compactors can be generic over the
//! storage engine.
//! - [`error`] — neutral `PolicyError` for failures in the above helpers.
//!
//! This crate has **no** dependency on `memvid-core` or any specific storage
//! engine. Backends are expected to wrap these primitives in their own
//! adapter (e.g. `rig-memvid` adds `.mv2` framing on top).
//!
//! See the [`store`] module docs for the audit-driven rationale behind the
//! deliberately narrow trait surface.
pub use PolicyError;
pub use ;
pub use ;