Skip to main content Module turn_output Copy item path Source AssistantTextCollector Incremental assistant text collector for one turn stream.
Keeps explicit state to avoid duplicate text from both delta and completed payloads. TurnStreamCollector Shared turn stream collector engine used by runtime prompt and artifact execution flows.
It filters by (thread_id, turn_id), accumulates assistant text, and reports terminal events. TurnTerminalEvent Terminal state of one turn observed from live stream events. parse_thread_id Parse thread id from common JSON-RPC result shapes.
Allocation: one String on match. Complexity: O(1). parse_turn_id Parse turn id from common JSON-RPC result shapes.
Allocation: one String on match. Complexity: O(1).