types.FileConversationStore

types.FileConversationStore(dir=None)

Default store: each conversation is a directory at <dir>/<chat_id>/<scope>/<id>/ containing record.json, turns.jsonl, and ui.jsonl.

record.json holds tree structure and metadata (small, rewritten atomically on every save). turns.jsonl and ui.jsonl are append-only — new turns and UI entries are appended, never rewritten.

On get(), the three files are read and merged into a full ConversationRecord with inline turns and UI on each node. Callers never see the split.