Rulvar API reference / @rulvar/core / enforceToolsetAttestation
Function: enforceToolsetAttestation()
function enforceToolsetAttestation(
agentType,
attestation,
resolved): void;Defined in: packages/core/src/tools/toolset-hash.ts:228
Holds a spawn's resolved toolset to its profile's attested pin (RV1514): a hash mismatch is a typed ConfigError before any provider call or budget admission. With per-tool hashes on the attestation the refusal names the drift (changed / missing / unexpected); without them it lists the resolved per-tool hashes, so the pin can be corrected from the refusal itself. When the pin carries the authority side (RV1802), a contract-clean resolution is additionally held to the attested authorityHash, so risk, needsApproval, executor, and executorSpec drift refuses at the same pre-wire site; a legacy contract-only pin keeps its documented posture and passes it.
Parameters
| Parameter | Type |
|---|---|
agentType | string |
attestation | ToolsetAttestation |
resolved | ResolvedToolset |
Returns
void