Expand description
The engine: data model state, verbs, journaling and replay (/03, /05).
All state lives in the flat structures of plugmem-arena; every
mutating verb journals itself through the caller’s
Storage and is replayed through the same
internal apply_* path on open — the journal’s ids are authoritative,
so replay is deterministic and idempotent over a reapplied tail.
The engine carries the structural sources (facts, entities, edges,
tags, BM25, temporal) and — when Config::dim > 0 — the vector layer:
quantized vectors in a flat VecPool, searched as a fourth recall
source and used by similar-detection. maintain (compaction) still
lands separately.
Modules§
- source
- Source bits of
RecalledFact::sources.
Structs§
- Fact
View - A read view of one fact.
- Link
Input - Input of
link. - Maintain
Report - Report of a
maintainpass. - Memory
- The memory engine. See the module docs for staging.
- Open
Report - Report of an
open: what the journal replay found. - Recall
Query - A recall request.
Default-like construction viaRecallQuery::textplus field overrides. - Recall
Result - A recall response. Reusable: pass to
Memory::recall_intorepeatedly and the buffers are recycled. - Recall
Scratch - Reusable recall scratch — caller-owned, so
Memory::recallandMemory::recall_intotake&self: many readers can recall the same engine at once, each threading its own scratch (the host wraps one per thread). Carries every buffer a recall mutates — the query-side term/score vectors, the fusion map, and its own tokenizer and name-normalization buffer — so a recall never touches the engine’s write-side scratches. Reused across calls it upholds the zero-alloc invariant. - Recalled
Edge - One edge the graph source walked (: agents want the relations, not only the facts).
- Recalled
Fact - One recalled fact.
- Remember
Input - Input of
rememberandrevise. - Remember
Outcome - Result of
remember/revise. - Similar
- One similar-fact hint.
- Stats
- Engine size counters. Every field is an O(1) read; the
struct is
#[non_exhaustive]so later stages (database identity markers, HNSW state) can extend it without a breaking change.
Enums§
- Fact
Fault - The per-fact content problem
Memory::faulty_factsattributes to a fact — the salvage predicaterecoveruses. It mirrors the content checksMemory::verifyruns, split out per fact so a caller can drop the individual bad records instead of failing the whole image. - Similar
Reason - Why a fact was flagged as similar.