AgentResultEvent
Defined in: src/hooks/events.ts:681
Event triggered as the final event in the agent stream. Wraps the agent result containing the stop reason and last message.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AgentResultEvent(data): AgentResultEvent;Defined in: src/hooks/events.ts:687
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
data | { agent: LocalAgent; result: AgentResult; invocationState: InvocationState; } |
data.agent | LocalAgent |
data.result | AgentResult |
data.invocationState | InvocationState |
Returns
Section titled “Returns”AgentResultEvent
Overrides
Section titled “Overrides”Properties
Section titled “Properties”readonly type: "agentResultEvent";Defined in: src/hooks/events.ts:682
readonly agent: LocalAgent;Defined in: src/hooks/events.ts:683
result
Section titled “result”readonly result: AgentResult;Defined in: src/hooks/events.ts:684
invocationState
Section titled “invocationState”readonly invocationState: InvocationState;Defined in: src/hooks/events.ts:685
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): Pick<AgentResultEvent, "type" | "result">;Defined in: src/hooks/events.ts:698
Serializes for wire transport, excluding the agent reference and invocationState. Called automatically by JSON.stringify().
Returns
Section titled “Returns”Pick<AgentResultEvent, "type" | "result">