Expand description
pi (@mariozechner/pi-coding-agent): one JSONL file per session under
~/.pi/agent/sessions/<encoded-cwd>/<timestamp>_<uuid>.jsonl.
The first line is a session header; the rest are tree nodes chained via
id/parentId, read in file order (linear is correct for the common
single-branch session). Conversational entries are message lines whose
message.role is user/assistant/toolResult/bashExecution, plus
custom_message. model_change/session_info carry metadata; the rest is
bookkeeping, preserved in Record::Other so native ↔ disk is lossless.
The codec helpers here are pub(crate) and shared verbatim by Campfire,
which is the identical format under a different home.
Structs§
- Custom
Entry - A
custom_messageline — extension context that replays as a user turn. - Message
Entry - A
messageline: the tree envelope plus the raw message payload. - Pi
- The pi harness marker.
- PiStore
- Reads and writes pi-format sessions under a sessions root.
- Session
Header - The leading
sessionheader.
Enums§
- Record
- One JSONL line. The message union is preserved as raw JSON and typed by the codec.