Skip to main content

Crate cel_memory

Crate cel_memory 

Source
Expand description

Cellar memory subsystem — trait surface and supporting types.

This crate is the locked contract between the rest of the Cellar daemon (embedded agent runtime, NL rule compiler, cel_act gateway, rule matcher post-fire hook, Activity tab queries) and the memory implementation underneath. The trait surface here is the source of truth referenced by cellar-memory-manager.md §12; every v1 caller compiles against it.

v1 ships BasicMemoryProvider as the backing implementation — real bodies for MemoryProvider::retrieve, MemoryProvider::write, session lifecycle, simple deletes, export, and stats; Err(NotImplemented) for summarization, rollups, and re-embed; no-ops for update_importance and supersede. The full Memory & Context Manager subsystem (separate crate, separate plan) drops in behind the same trait without caller churn.

Re-exports§

pub use basic::BasicMemoryProvider;
pub use chunk::ChunkKind;
pub use chunk::ChunkSource;
pub use chunk::MemoryChunk;
pub use chunk::MemoryTier;
pub use chunk::NewMemoryChunk;
pub use error::MemoryError;
pub use error::Result;
pub use importance::score as score_importance;
pub use offdevice_hook::ClosureOffdeviceHook;
pub use offdevice_hook::OffdeviceCallDescriptor;
pub use offdevice_hook::OffdeviceCallHook;
pub use offdevice_hook::OffdeviceDecision;
pub use ops::AccessEntry;
pub use ops::AgingReport;
pub use ops::EvictionEntry;
pub use ops::EvictionReason;
pub use ops::ExportBundle;
pub use ops::ExportFilter;
pub use ops::MemoryStats;
pub use ops::PurgeReport;
pub use ops::ReEmbedReport;
pub use provider::MemoryProvider;
pub use query::CallerScope;
pub use query::MemoryPredicate;
pub use query::MemoryQuery;
pub use query::RetrievalProfile;
pub use session::MemorySession;
pub use session::NewMemorySession;
pub use session::SessionFilter;
pub use session::SessionOutcome;
pub use summarizer::MockSummarizer;
pub use summarizer::MockSummaryCall;
pub use summarizer::Summarizer;
pub use summarizer::SummarizerError;
pub use summarizer::SummarizerResult;
pub use summarizer::SummaryContext;
pub use write_hook::ClosureHook;
pub use write_hook::MemoryWriteHook;
pub use write_hook::WriteDecision;

Modules§

basic
BasicMemoryProvider — the v1 backing implementation.
chunk
Memory chunk — the primary persisted unit.
error
Memory subsystem error type.
importance
Importance scoring for memory chunks.
offdevice_hook
The OffdeviceCallHook trait — the off-device call governance seam.
ops
Operational types — eviction, access logging, export bundles, reports.
provider
The MemoryProvider trait — the locked contract.
query
Query, profile, scope, and predicate types.
session
Memory session — a coherent unit of work.
summarizer
Summarizer trait and supporting types.
write_hook
The MemoryWriteHook trait — the per-write governance seam.