rulvar API reference / @rulvar/rulvar / ToolRuntime
Interface: ToolRuntime
Defined in: packages/core/dist/index.d.ts
The spawn's frozen toolset plus the per-call context factory, prepared by the ctx layer (M3-T01). The contracts are the canonical identity projection already hashed into the spawn's content key; the loop sends exactly them to the model.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
contracts | ToolContract[] | - | packages/core/dist/index.d.ts |
defs | ToolDef<SchemaSpec<unknown>>[] | - | packages/core/dist/index.d.ts |
permission? | (call) => Promise<PermissionGate> | Permission chain evaluation (M3-T03); absent = every call allowed. | packages/core/dist/index.d.ts |
Methods
contextFor()
ts
contextFor(toolName): ToolContext;Defined in: packages/core/dist/index.d.ts
Mints a per-call ToolContext (fresh tool span under the agent span).
Parameters
| Parameter | Type |
|---|---|
toolName | string |