Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/rulvar / ToolDef

Interface: ToolDef<S>

Defined in: packages/core/dist/index.d.ts

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 ParameterDefault type
S extends SchemaSpecSchemaSpec

Properties

PropertyModifierTypeDescriptionDefined in
descriptionreadonlystring-packages/core/dist/index.d.ts
executepublic(input, ctx) => Promise<unknown>-packages/core/dist/index.d.ts
executorreadonlyToolExecutorDefault 'inprocess'.packages/core/dist/index.d.ts
executorSpec?readonlyJsonOpaque 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/dist/index.d.ts
kindreadonly"tool"-packages/core/dist/index.d.ts
namereadonlystring-packages/core/dist/index.d.ts
needsApprovalreadonlybooleanDefault false; the terminal permission default asks when true.packages/core/dist/index.d.ts
parametersreadonlyS-packages/core/dist/index.d.ts
risk?readonlyToolRisk-packages/core/dist/index.d.ts
version?readonlystringOpaque contract version; part of toolsetHash.packages/core/dist/index.d.ts