Skip to main content

Module source

Module source 

Source
Expand description

Where an agent block’s transcript is read from.

An agent’s output is stored in the agent’s own zone in the global transcript store (agent:<definitionId>:current) and, until it stops being written (SPEC_AGENT_TRANSCRIPT_SINGLE_COPY_2026_10_19), also in the block’s own store. A reader that wants “the block’s recent output” asks here which copy to use: the agent’s zone when it has content (the copy the pane reads, see global_output_source), the block’s own otherwise.

The reads go through the WAL reader pool (read_snapshot), so they never queue behind the store’s single writer.

Structs§

Tail
What a tail read found.
TranscriptSource
The store and zone a block’s transcript is read from.

Constants§

OWN_NEWER_SLACK_MS
How much newer (ms) the block’s own copy must be than the agent’s zone to be read instead of it. Both are written for every line, one after the other, so their times differ by milliseconds in a healthy session; a copy that is seconds ahead is the one still being written.

Functions§

own_is_newer
Whether the block’s own copy of the transcript is the live one and the agent’s zone is behind it: the own copy has content and was modified more than slack_ms after the zone. A container agent’s turns that never reached the zone left every reader quoting the zone’s last line, hours old. Each is (size, modts).