Expand description
Per-run NDJSON output capture. Agent and stage stdout/stderr are untrusted evidence: they are stored as ordered chunks, never parsed as lines and never routed through the dispatcher.
Structs§
- Agent
Output - Output
Page - Output
Record - Output
Staleness - The reusable output-silence signal for one running agent stage. The file is authoritative: reopening after daemon restart reconstructs both the last append instant and the silence episode from its final complete agent record.
- Page
Query - One read of the captured log: everything after a cursor, optionally narrowed to a stage and trimmed to a trailing window.
- RunLog
Writer - Append-only writer shared by the stdout and stderr reader threads of one run. Sequence numbers are capture order across both pipes.
- Stage
Filter - Selects the records belonging to one flow stage. Stage records carry
their stage name; agent records captured before stages were tagged carry
none, so
agent_fallbacklets the flow’s agent stage claim them.
Enums§
- Output
Chunk - One captured chunk. UTF-8 chunks stay readable; anything else round-trips through base64 rather than being lossily converted.
- Output
Source - Output
Stream
Constants§
- PAGE_
LIMIT - One socket page of records, and the window a bare
sloop logstails. - TAIL_
LIMIT - An explicit
tailmay ask for more than one default page — that is the point of asking — but not for an unbounded slice of an untrusted log.
Functions§
- output_
staleness - Measures agent-output silence from the last complete record, falling back to the durable stage start when the agent has not written anything yet.
- read_
agent_ output - Reassembles each agent stream from every complete captured record. Test and merge output is deliberately excluded from vendor classification.
- read_
filtered_ page - Reads one page under a filter.
next_cursoradvances past every record the read consumed, not just the ones it returned: a filtered-out record is still evidence that has been examined, so a follower resuming from the cursor neither replays it nor stalls behind it. - read_
page - Reads a finite page of records with
sequence > after, in order. A missing file is an empty page: the run may exist before any output does. - stage_
output_ tail - The trailing
lineslines one stage execution captured, decoded as text. - visit_
agent_ output - Visits decoded agent chunks in capture order without retaining the whole log. A malformed or crash-truncated record does not hide earlier evidence.