AfterInvocationEvent
Defined in: src/hooks/events.ts:155
Event triggered at the end of an agent request. Fired after all processing completes, regardless of success or error. Uses reverse callback ordering for proper cleanup semantics.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AfterInvocationEvent(data): AfterInvocationEvent;Defined in: src/hooks/events.ts:160
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
data | { agent: LocalAgent; invocationState: InvocationState; } |
data.agent | LocalAgent |
data.invocationState | InvocationState |
Returns
Section titled “Returns”AfterInvocationEvent
Overrides
Section titled “Overrides”Properties
Section titled “Properties”readonly type: "afterInvocationEvent";Defined in: src/hooks/events.ts:156
readonly agent: LocalAgent;Defined in: src/hooks/events.ts:157
invocationState
Section titled “invocationState”readonly invocationState: InvocationState;Defined in: src/hooks/events.ts:158
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): Pick<AfterInvocationEvent, "type">;Defined in: src/hooks/events.ts:174
Serializes for wire transport, excluding the agent reference and invocationState. Called automatically by JSON.stringify().
Returns
Section titled “Returns”Pick<AfterInvocationEvent, "type">