Expand description
Long-term memory management (Phase 7).
Kernel defines memory types and validation rules; SDKs perform I/O and selection. No I/O in this module — pure classification and validation logic.
Structs§
- Memory
Key - Stable logical key used for memory upserts.
- Memory
Policy - Declarative configuration for the kernel’s long-term memory subsystem.
- Memory
Provenance - Origin and evidence attached to a memory record.
- Memory
Query - Scoped recall request. The host owns retrieval; the kernel validates this deterministic wire and
caps
top_kthroughMemoryPolicy. - Memory
Recall - One scored host recall.
scoreis relevance, distinct from the record’s stored confidence. - Memory
Recall Lifecycle - Journaled recall lifecycle for one record (M3). Carried on
MemoryRecalledso the host mirrors the kernel-authoritative counts into its durable store. - Memory
Record - A durable fact with stable identity, provenance, and lifecycle state.
- Memory
Record Store - Pure in-kernel helper implementing scoped, identity-preserving upsert semantics.
- Memory
Scope - Isolation boundary for a memory record.
- Memory
Validation - Memory validation rules (kernel-enforced).
Enums§
- Memory
Author - Principal responsible for producing a memory record.
- Memory
Kind - Memory kind (4 types, mirroring Claude Code’s taxonomy).
- Memory
Trust Level - Explicit trust classification kept separate from authorship.
- Memory
Upsert Error - Memory
Upsert Outcome - Memory
Validation Error - Memory validation error.
Functions§
- memory_
retention_ score - Deterministic retention score for a durable record, evaluated at
current_turn. - validate_
memory_ write - Validate a memory write request with default validation rules.