Skip to main content

Interface: InterruptContext

Defined in: packages/core/src/interrupt/context.ts:17

Properties

emit?

optional emit?: (event) => void | Promise<void>

Defined in: packages/core/src/interrupt/context.ts:25

Emit stream events (interrupt_request).

Parameters

event
interruptId

string

spec

{ cancelLabel?: string; confirmLabel?: string; id?: string; kind: "confirm"; prompt: string; } | { id?: string; kind: "text"; maxLength?: number; placeholder?: string; prompt: string; } | { id?: string; kind: "choice"; multiple?: boolean; options: object[]; prompt: string; } | { id?: string; kind: "number"; max: number; min: number; prompt: string; step?: number; } | { accept?: string[]; id?: string; kind: "file"; maxBytes?: number; prompt: string; } | { id?: string; kind: "encrypted"; prompt: string; purpose?: "password" | "secret" | "api_key"; }

toolCallId

string

toolName

string

type

"interrupt_request"

Returns

void | Promise<void>


nextSeq

nextSeq: number

Defined in: packages/core/src/interrupt/context.ts:33

Monotonic seq for stable interrupt ids within one execute.


onInterruptRequired?

optional onInterruptRequired?: OnInterruptRequired

Defined in: packages/core/src/interrupt/context.ts:23

In-process Alert-style handler (CLI / same-process hosts).


responses

responses: Map<string, InterruptAnswer | { cancelled: true; reason?: string; }>

Defined in: packages/core/src/interrupt/context.ts:21

Seeded answers from ProcessOptions.interruptResponses (replay).


toolCallId

toolCallId: string

Defined in: packages/core/src/interrupt/context.ts:18


toolName

toolName: string

Defined in: packages/core/src/interrupt/context.ts:19