Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/core / resolveToolset

Function: resolveToolset()

ts
function resolveToolset(
   specs, 
   session, 
   toolsets?, 
executors?): Promise<ResolvedToolset>;

Defined in: packages/core/src/tools/toolset-hash.ts:402

Expands registered names and sources, validates every tool name and duplicate names across the whole toolset (ConfigError at spawn time), and computes the toolsetHash over contracts sorted by name. The toolsets registry is the engine's defaults.toolsets snapshot; without one, string entries fail with the same unknown-name error as a miss, so nothing outside the declared registry is ever reachable.

Parameters

ParameterTypeDescription
specs| ToolsOption | undefined-
sessionToolSourceSession-
toolsets?Record&lt;string, ToolsOption&gt;-
executors?ReadonlySet&lt;string&gt;The engine's registered non-inprocess executor tags (RV-216). A tool declaring an executor absent from this set fails typed at spawn time, before any provider or model call; the default empty set preserves the pre-RV-216 behavior where only 'inprocess' is accepted.

Returns

Promise&lt;ResolvedToolset&gt;