Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/executor / subprocessTool

Function: subprocessTool()

ts
function subprocessTool<S>(init): ToolDef<S>;

Defined in: packages/executor/src/subprocess.ts:339

Defines a tool that runs under a subprocess (or container) executor. The returned ToolDef declares executor: 'subprocess' and carries the command on executorSpec; its execute closure exists only as a guard, and throws if ever called in process, because dispatch routes to the registered executor instead. Register that executor on the engine for the tool to run.

Type Parameters

Type Parameter
S extends SchemaSpec

Parameters

ParameterType
initSubprocessToolInit&lt;S&gt;

Returns

ToolDef&lt;S&gt;