ToolStreamEvent
Defined in: src/tools/tool.ts:58
Event yielded during tool execution to report streaming progress. Tools can yield zero or more of these events before returning the final ToolResult.
Example
Section titled “Example”const streamEvent = new ToolStreamEvent({ data: 'Processing step 1...'})
// Or with structured dataconst streamEvent = new ToolStreamEvent({ data: { progress: 50, message: 'Halfway complete' }})Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ToolStreamEvent(eventData): ToolStreamEvent;Defined in: src/tools/tool.ts:70
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
eventData | { data?: unknown; } |
eventData.data? | unknown |
Returns
Section titled “Returns”ToolStreamEvent
Properties
Section titled “Properties”readonly type: "toolStreamEvent";Defined in: src/tools/tool.ts:62
Discriminator for tool stream events.
Implementation of
Section titled “Implementation of”readonly optional data?: unknown;Defined in: src/tools/tool.ts:68
Caller-provided data for the progress update. Can be any type of data the tool wants to report.