Scoped view of a single tool call's lifecycle.
Yielded on run.tool_calls once per tool-started event. Fields
are populated as events arrive:
tool_call_id, tool_name, input: stable from the start event.output_deltas: a StreamChannel of delta chunks. Iterate (sync or
async) to consume partial output in arrival order.output: terminal payload from tool-finished, or None if the
call failed or is still in flight.error: terminal error string from tool-error, or None if the
call succeeded or is still in flight.completed: True once a terminal event (tool-finished or
tool-error) has been observed.ToolCallStream is not meant to be constructed by end users — it's
produced by ToolCallTransformer as events flow through the mux.
The channel of streamed tool-output-delta payloads.
Iterate (sync or async depending on how the run was started) to consume partial output in arrival order. The log closes when the tool finishes or errors.