Expand description
Memory Validator — Content validation gate for memory writes.
Implements the “memory integrity validator” proposed in the containment gap paper. Rejects untrusted or poisoned inputs before they enter LMDB storage.
§Validation layers
- Trust threshold: Reject memories with
source_trustbelow a configurable threshold - Content validation: Reject empty, oversized, or malformed content
- Provenance signing: HMAC-SHA256 signature over memory metadata to detect tampering
- Source allowlist: Optionally restrict which sources may write to each galaxy
- Injection detection: Reject content containing prompt injection patterns
Structs§
- Memory
Validator - The memory validator — gates all memory writes.
- Validator
Config - Configuration for the memory validator.
Enums§
- Validation
Verdict - Result of memory validation.
Functions§
- detect_
injection - Detect prompt injection patterns in content.