Rulvar API reference / @rulvar/core / ToolDef
Interface: ToolDef<S>
Defined in: packages/core/src/l0/spi/toolsource.ts:61
A defined tool. The identity projection is the ToolContract { name, description, parameters, version }: exactly what the model sees and exactly what toolsetHash hashes; execute and every other non-contract field are excluded by construction.
Type Parameters
| Type Parameter | Default type |
|---|---|
S extends SchemaSpec | SchemaSpec |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
description | readonly | string | - | packages/core/src/l0/spi/toolsource.ts:64 |
execute | public | (input, ctx) => Promise<unknown> | - | packages/core/src/l0/spi/toolsource.ts:82 |
executor | readonly | ToolExecutor | Default 'inprocess'. | packages/core/src/l0/spi/toolsource.ts:69 |
executorSpec? | readonly | Json | Opaque policy data for a non-inprocess executor: what THIS tool's declared executor should run (for a subprocess adapter, the command and its argv). Never identity: excluded from toolsetHash exactly like executor and risk, and ignored for 'inprocess'. The engine passes it verbatim to the ToolExecutorProvider (RV-216). Its JCS digest enters the authority attestation (RV1802). | packages/core/src/l0/spi/toolsource.ts:78 |
kind | readonly | "tool" | - | packages/core/src/l0/spi/toolsource.ts:62 |
name | readonly | string | - | packages/core/src/l0/spi/toolsource.ts:63 |
needsApproval | readonly | boolean | Default false; the terminal permission default asks when true. | packages/core/src/l0/spi/toolsource.ts:80 |
parameters | readonly | S | - | packages/core/src/l0/spi/toolsource.ts:65 |
risk? | readonly | ToolRisk | - | packages/core/src/l0/spi/toolsource.ts:81 |
version? | readonly | string | Opaque contract version; part of toolsetHash. | packages/core/src/l0/spi/toolsource.ts:67 |