Skip to main content

Module tail

Module tail 

Source
Expand description

The last lines of an agent’s transcript, for the readers that want only a few (Agents transcript, the previews in Agents conversations).

Both used to read the block’s whole output file (hundreds of MB for a long session) under the store’s one connection, on a tokio worker, to return at most 500 lines. On a busy machine that parked workers and the connection long enough for every other call to queue behind them: a GetControllerStatus that does no work of its own took 38 s (narko, 2026-10-29, CPU ~96%). This reads a bounded tail instead, and off_worker keeps what is left off the async workers.

Structs§

TailLines
What a transcript read found.

Functions§

off_worker
Run blocking work (store reads) off the async workers. A panic in f gives T::default(), as no result at all would for a best-effort reader.
tail_lines
The last requested lines of block_id’s transcript: a bounded tail read of the live file, else (an archived session) the whole-session read. Blocking.
tail_lines_for_readers
tail_lines for a reader that is not the agent itself (another agent, a device): a value srv holds secret is replaced by withhold::MARK in the lines it gets, whenever the line was stored.