SandboxInterrupt
Defined in: error/error.ts:17
Thrown by Sandbox.eval when an action interrupts the run (by throwing
ActionInterrupt from core). Carries everything a caller needs to persist
and later resume the run: the call log accumulated up to the interrupt (pass
it back to eval, together with a resumption targeting position), the
data snapshot at the interrupt, and the interrupting action’s own payload
and checkpoint under interrupt.
The call log may contain null slots: an interrupted call reserves its
position but never records, while concurrent calls started after it may
complete and record behind it.
Extends
Section titled “Extends”Error
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new SandboxInterrupt(message, options): SandboxInterrupt;Defined in: error/error.ts:27
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
message |
string |
options |
{ callLog: ( | { input: unknown; name: string; response: unknown; type: "action"; } | { response: number; type: "random"; } | { response: number; type: "now"; } | null)[]; console: { level: "log" | "info" | "warn" | "error" | "debug"; message: string; }[]; data: Record<string, unknown>; interrupt: { data?: unknown; state?: unknown; }; position: number; } |
options.callLog |
( | { input: unknown; name: string; response: unknown; type: "action"; } | { response: number; type: "random"; } | { response: number; type: "now"; } | null)[] |
options.console |
{ level: "log" | "info" | "warn" | "error" | "debug"; message: string; }[] |
options.data |
Record<string, unknown> |
options.interrupt |
{ data?: unknown; state?: unknown; } |
options.interrupt.data? |
unknown |
options.interrupt.state? |
unknown |
options.position |
number |
Returns
Section titled “Returns”SandboxInterrupt
Overrides
Section titled “Overrides”Error.constructorProperties
Section titled “Properties”callLog
Section titled “callLog”readonly callLog: ( | { input: unknown; name: string; response: unknown; type: "action";} | { response: number; type: "random";} | { response: number; type: "now";} | null)[];Defined in: error/error.ts:18
console
Section titled “console”readonly console: { level: "log" | "info" | "warn" | "error" | "debug"; message: string;}[];Defined in: error/error.ts:21
Console output captured up to the interrupt. A resumed run regenerates the full output.
level: "log" | "info" | "warn" | "error" | "debug";message
Section titled “message”message: string;readonly data: Record<string, unknown>;Defined in: error/error.ts:19
interrupt
Section titled “interrupt”readonly interrupt: { data?: unknown; state?: unknown;};Defined in: error/error.ts:25
The interrupting action’s caller-facing payload and private checkpoint.
optional data?: unknown;state?
Section titled “state?”optional state?: unknown;position
Section titled “position”readonly position: number;Defined in: error/error.ts:23
Call-log position of the action call that interrupted the run.