ToolResultEvent
Defined in: src/hooks/events.ts:665
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:671
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
data | { agent: LocalAgent; result: ToolResultBlock; invocationState: InvocationState; } & HookableEventData |
Returns
Section titled “Returns”ToolResultEvent
Overrides
Section titled “Overrides”Properties
Section titled “Properties”invocationContext?
Section titled “invocationContext?”readonly invocationContext?: InvocationContext;Defined in: src/hooks/events.ts:100
The request this event belongs to (undefined outside one); pass it to InvokeOptions.invocationContext to join it.
Inherited from
Section titled “Inherited from”HookableEvent.invocationContext
readonly type: "toolResultEvent";Defined in: src/hooks/events.ts:666
readonly agent: LocalAgent;Defined in: src/hooks/events.ts:667
result
Section titled “result”readonly result: ToolResultBlock;Defined in: src/hooks/events.ts:668
invocationState
Section titled “invocationState”readonly invocationState: InvocationState;Defined in: src/hooks/events.ts:669
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): Pick<ToolResultEvent, "type" | "result">;Defined in: src/hooks/events.ts:684
Serializes for wire transport, excluding the agent reference and invocationState. Called automatically by JSON.stringify().
Returns
Section titled “Returns”Pick<ToolResultEvent, "type" | "result">