Memory.FileStore (fnord v0.9.29)
View SourceShared file-backed storage for long-term memories.
This module underpins both global and project memory stores, preserving compatibility with existing file-backed memory layouts while centralizing shared lookup, allocation, listing, locking, and JSON marshalling behavior.
Summary
Functions
Returns whether a memory with the given title is present.
Resolves a title to a file path using the canonical slug location first and only scanning suffix collisions when the base path does not match.
Removes the memory file identified by title.
Ensures the configured storage path exists and removes the retired legacy directory when present.
Returns all memory titles by reading each stored file once.
Returns all decodable memories in a single filesystem pass.
Builds a store context from runtime paths.
Reads a memory by title using slug-based lookup with collision fallback.
Persists a memory, overwriting an existing file for the same title or allocating a new collision-safe path when needed.
Types
Functions
Returns whether a memory with the given title is present.
Resolves a title to a file path using the canonical slug location first and only scanning suffix collisions when the base path does not match.
Removes the memory file identified by title.
Ensures the configured storage path exists and removes the retired legacy directory when present.
Returns all memory titles by reading each stored file once.
Returns all decodable memories in a single filesystem pass.
Builds a store context from runtime paths.
Reads a memory by title using slug-based lookup with collision fallback.
Persists a memory, overwriting an existing file for the same title or allocating a new collision-safe path when needed.