Expand description
Session-scoped memory boundaries and key/content sanitization.
Structs§
- Session
Scoped Memory - A memory store that is scoped to a specific session. Prevents memory from one session leaking into another.
Constants§
- MAX_
CONTENT_ BYTES - Maximum serialized memory content size (bytes).
- MAX_
KEY_ CHARS - Maximum key length in Unicode scalar values (after sanitization).
Functions§
- sanitize_
content - Sanitize a memory content string: strip NULs and cap size at 1MB (byte length).
- sanitize_
key - Sanitize a string to prevent injection in memory keys: keep alnum, dash, underscore, dot.
- validate_
key - Validate that a memory key is safe for filesystem use.