Expand description
Session storage: append-only JSONL transcript persistence.
Each session is a .jsonl file with one entry per line.
When a session file exceeds MAX_SESSION_SIZE (50MB), writes automatically
fork to a new part file (session_part2.jsonl, _part3.jsonl, etc.).
Loading stitches all parts together transparently.
Structs§
- Summary
Entry - A compaction summary entry.
- Tombstone
Entry - A soft-delete marker.
- Transcript
Message - A conversation message entry.
Enums§
- Transcript
Entry - A single entry in the session transcript.
Functions§
- all_
part_ paths - List all part files for a session, in order (base first, then _part2, _part3, …).
- load_
transcript - Load a session transcript from all part files, respecting tombstones.
- messages_
from_ transcript - Extract API messages from transcript entries.
- tombstone_
entry - Write a tombstone (soft-delete) entry.
- total_
session_ size - Total size across all session parts.
- transcript_
path - Compute the base transcript file path for a session.
- write_
assistant_ entry - Write an assistant message entry.
- write_
transcript_ entry - Append a transcript entry to the session file. Automatically forks to a new part file if the current one exceeds 50MB.
- write_
user_ entry - Write a user message entry.