ToolResultEvent
Defined in: src/hooks/events.ts:590
Event triggered when a tool execution completes. Wraps the tool result block after a tool finishes execution.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ToolResultEvent(data): ToolResultEvent;Defined in: src/hooks/events.ts:596
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
data | { agent: LocalAgent; result: ToolResultBlock; invocationState: InvocationState; } |
data.agent | LocalAgent |
data.result | ToolResultBlock |
data.invocationState | InvocationState |
Returns
Section titled “Returns”ToolResultEvent
Overrides
Section titled “Overrides”Properties
Section titled “Properties”readonly type: "toolResultEvent";Defined in: src/hooks/events.ts:591
readonly agent: LocalAgent;Defined in: src/hooks/events.ts:592
result
Section titled “result”readonly result: ToolResultBlock;Defined in: src/hooks/events.ts:593
invocationState
Section titled “invocationState”readonly invocationState: InvocationState;Defined in: src/hooks/events.ts:594
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): Pick<ToolResultEvent, "type" | "result">;Defined in: src/hooks/events.ts:607
Serializes for wire transport, excluding the agent reference and invocationState. Called automatically by JSON.stringify().
Returns
Section titled “Returns”Pick<ToolResultEvent, "type" | "result">