Expand description
Session record + replay (DESIGN.md §15 v0.2+).
Two halves:
SessionRecorderis aHookthat captures every lifecycle event to a JSONL file. Wire it viaAgentLoop::with_hookand you get a complete trace of what the agent did.read_session+replay_as_mockreconstruct a deterministicMockModelfrom a recorded log so you can replay the run offline, verify changes, or debug failures without rerunning against a real LLM.
Structs§
- Live
Progress Hook Hookthat prints a verbose progress trace to stderr in real time.- Session
Recorder - Hook that serialises every relevant lifecycle event into a JSONL file.
- Session
Stats - Stats from a single session — handy summary for the
harness traceCLI.
Enums§
- Session
Event - One event in the recorded session. Owned (no borrows) so it round-trips through serde without lifetime gymnastics.
Functions§
- format_
event_ short - Tiny helper used by the CLI: convert a single event to a single line of pretty-printed text (does NOT include the timestamp prefix).
- format_
event_ verbose - Multi-line, content-rich version of
format_event_short. - read_
session - Read a recorded JSONL session log back into memory.
- replay_
as_ mock - Build a
harness_models::MockModelthat returns each recordedPostModeloutput in order. Pair with a freshAgentLoopto replay the run. - replay_
as_ mock_ via_ events - Backwards-compatible alias.