Expand description
The Audit’s index of what agents do (docs/specs/SPEC_AUDIT_LIVE_LOG_OF_EVERY_AGENT_ACTION_2026_11_03.md §3.2).
Every output line of every agent is appended in one place (transcript::append), and its tool calls, thinking
blocks and turn ends are already in it. This module reads those lines as they pass and writes one small row for
each to activity-YYYY-MM-DD.jsonl, one file a day, so a day can be dropped by date. The row holds the agent,
the kind, a scrubbed one-line summary and where the line landed in the agent’s history; the transcript keeps the
full call. Nothing is recorded twice, only indexed.
What is kept: the agent, the kind, a summary that never copies a raw call (see scrub), times, outcome, cost
and byte positions. Never: a Vault value, a secret, a thought’s text, a tool’s result.
The rows go to the same place the jekt audit file does ([reactive::audit_store::write_path]’s folder): the
shared audit folder, or the srv’s own while it does not use the shared one.
Re-exports§
pub use store::day_files;pub use store::install_for_this_srv;pub use store::record;pub use store::DayFile;
Modules§
- line
- Reading one stream-json transcript line for the rows it holds: a tool call, a thinking block or a turn’s end.
- scrub
- The one-line summaries of tool calls. A summary is made when the row is written and never copies a raw call: a command is cut to its start, a path is the path, a MuxAPI tool is its tool and action. Text that still looks like a secret is dropped, and the row says only which tool it was.
- store
- The day files:
activity-YYYY-MM-DD.jsonlin the audit folder, appended by a writer thread (the recording is queued, so the transcript’s hot path does no I/O here), and dropped when older thanKEEP_DAYS.
Structs§
- Activity
Row - One indexed action.
agentis the agent’s UID (the id in its transcript zone), turned into a name when listed.
Constants§
- KEEP_
DAYS - How long a day’s file is kept (days). The transcript still holds the full call, so what goes is only the index.
Functions§
- note_
records - Indexes the transcript lines
records(newline-terminated, as written) that landed inzonefrom byteat. Called for every transcript write; a line that is not a tool call, a thinking block or a turn end costs a substring test.