ToolStreamUpdateEvent
Defined in: src/hooks/events.ts:583
Event triggered for each streaming progress event from a tool during execution.
Wraps a ToolStreamEvent with agent context, keeping the tool authoring
interface unchanged — tools construct ToolStreamEvent without knowledge of agents
or hooks, and the agent layer wraps them at the boundary.
Consistent with ModelStreamUpdateEvent which wraps model streaming events the same way.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ToolStreamUpdateEvent(data): ToolStreamUpdateEvent;Defined in: src/hooks/events.ts:589
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
data | { agent: LocalAgent; event: ToolStreamEvent; invocationState: InvocationState; } |
data.agent | LocalAgent |
data.event | ToolStreamEvent |
data.invocationState | InvocationState |
Returns
Section titled “Returns”ToolStreamUpdateEvent
Overrides
Section titled “Overrides”Properties
Section titled “Properties”readonly type: "toolStreamUpdateEvent";Defined in: src/hooks/events.ts:584
readonly agent: LocalAgent;Defined in: src/hooks/events.ts:585
readonly event: ToolStreamEvent;Defined in: src/hooks/events.ts:586
invocationState
Section titled “invocationState”readonly invocationState: InvocationState;Defined in: src/hooks/events.ts:587
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): Pick<ToolStreamUpdateEvent, "type" | "event">;Defined in: src/hooks/events.ts:600
Serializes for wire transport, excluding the agent reference and invocationState. Called automatically by JSON.stringify().
Returns
Section titled “Returns”Pick<ToolStreamUpdateEvent, "type" | "event">