Skip to main content

write_session_memory_view

Function write_session_memory_view 

Source
pub fn write_session_memory_view(
    workspace: &Path,
    session_id: &str,
    view: &SessionMemoryView,
) -> Result<(), SessionStoreError>
Expand description

Persist a session’s derived memory view to <session>/derived/memory.json (atomic, private permissions).

This is the live producer for the per-session memory file: cross-session queries (query_facts, search_memory) and the batch memory pipeline observe sessions through it. Fails when the session directory cannot be created or the file cannot be written; it never mutates events.jsonl.