Package-level declarations
Types
Markdown files in directory (one directory per namespace), written atomically (temp file + rename) under a mutex for compare-and-swap.
A persistent notebook for the agent, with the tools and prompt format of Pydantic AI Harness Memory: MEMORY.md is the main notebook, injected each turn inside <memory> markers (bounded by maxTokens / maxLines) with the names of other files; write_memory appends or replaces one unique passage, read_memory reads a bounded prefix, delete_memory removes a topic file, search_memory finds files by terms.
One stored memory file: its text (possibly a bounded prefix) and the version of the whole file.
Where memory lives. Mutations are compare-and-swap on MemoryFile.version so a stale write fails instead of overwriting a concurrent edit.