Skip to main content

Module event_log

Module event_log 

Source
Expand description

Event log: serialize turn events to JSONL files.

Provides event persistence integrated with SessionContext, shared across CLI, Web, and other consumers.

Note: save_turn_log performs synchronous file I/O. Consumers should call it via tokio::task::spawn_blocking in async contexts to avoid blocking the runtime.

Functions§

event_to_jsonl
Convert a RuntimeEvent to a JSONL line.
event_to_value
Convert a RuntimeEvent to a JSON Value (shared by event_log and render).
save_turn_log
Save all events from a turn to a JSONL file.