InterruptEvent
Defined in: src/hooks/events.ts:708
Event emitted when an interrupt is raised during agent execution. The interrupt.source
field discriminates between tool-callback and hook-callback origins. One event fires
per unanswered interrupt at the moment the agent stops to wait for responses.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new InterruptEvent(data): InterruptEvent;Defined in: src/hooks/events.ts:714
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
data | { agent: LocalAgent; interrupt: Interrupt; invocationState: InvocationState; } |
data.agent | LocalAgent |
data.interrupt | Interrupt |
data.invocationState | InvocationState |
Returns
Section titled “Returns”InterruptEvent
Overrides
Section titled “Overrides”Properties
Section titled “Properties”readonly type: "interruptEvent";Defined in: src/hooks/events.ts:709
readonly agent: LocalAgent;Defined in: src/hooks/events.ts:710
interrupt
Section titled “interrupt”readonly interrupt: Interrupt;Defined in: src/hooks/events.ts:711
invocationState
Section titled “invocationState”readonly invocationState: InvocationState;Defined in: src/hooks/events.ts:712
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): Pick<InterruptEvent, "type"> & { interrupt: { id: string; name: string; reason?: JSONValue; response?: JSONValue; source: InterruptSource; };};Defined in: src/hooks/events.ts:722
Serializes for wire transport, excluding agent and invocationState.
Returns
Section titled “Returns”Pick<InterruptEvent, "type"> & {
interrupt: {
id: string;
name: string;
reason?: JSONValue;
response?: JSONValue;
source: InterruptSource;
};
}