Skip to content

ToolInterrupt

Defined in: shared/src/tool/tool.interrupt.ts:8

Thrown by a tool to suspend the run and hand control back to the caller for a decision (e.g. human approval). data is shown to the caller; state is the tool’s private checkpoint, returned verbatim as the resumption’s state when the caller answers. Across an HTTP boundary the type is lost, so transports serialise it into an envelope and reconstruct it on the far side.

  • Error
new ToolInterrupt(
message,
data?,
state?): ToolInterrupt;

Defined in: shared/src/tool/tool.interrupt.ts:12

Parameter Type
message string
data? unknown
state? unknown

ToolInterrupt

Error.constructor
readonly optional data?: unknown;

Defined in: shared/src/tool/tool.interrupt.ts:9


readonly optional state?: unknown;

Defined in: shared/src/tool/tool.interrupt.ts:10