Expand description
Events for the record AgentMux keeps on this computer
(docs/specs/SPEC_LONG_RUNNING_ZERO_DEGRADATION_2026_11_16.md §6, task #47820): a stall of the host’s UI thread
or of srv’s runtime, written as one JSON line in a file for its month, events-YYYY-MM.jsonl, next to the
record’s days. srv reads them back (backend::record); the window host, a process of its own, writes the
ones it sees from here, so the writer is in this crate.
A line is {"t": ms, "kind": "ui_stall", ...numbers}: numbers and stable names only, never a title or a path.
Functions§
- append_
event - Append an event of
kindatt_mstodir’s file for the month.fieldsis a JSON object of numbers and short names;tandkindare added to it. BLOCKING (a file append). Errors are the caller’s to log; an event is never a reason for anything else to fail. - file_
name - The file for the month of
t_ms:events-2026-11.jsonl. - month_
of_ file - Whether
nameis an events file, and the month it holds as2026-11. - record_
dir - Where this AgentMux keeps its record: the
recordfolder of its channel (of a dev build’s own folder). Not the data folder: an installed AgentMux has one of those per version, and the record must outlast an upgrade. - record_
dir_ in record_dirfor the folders inpaths.