ToolInterrupt
Defined in: 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.
Extends
Section titled “Extends”Error
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ToolInterrupt( message, data?, state?): ToolInterrupt;Defined in: tool/tool.interrupt.ts:12
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
message |
string |
data? |
unknown |
state? |
unknown |
Returns
Section titled “Returns”ToolInterrupt
Overrides
Section titled “Overrides”Error.constructorProperties
Section titled “Properties”readonly optional data?: unknown;Defined in: tool/tool.interrupt.ts:9
state?
Section titled “state?”readonly optional state?: unknown;Defined in: tool/tool.interrupt.ts:10