Skip to content

rulvar API reference


rulvar API reference / @rulvar/rulvar / compilePermissionChain

Function: compilePermissionChain()

ts
function compilePermissionChain(engine?, profile?): CompiledPermissionChain;

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

Merges the engine-wide config and the profile config into one chain. Layers concatenate engine-first; since rules only deny or ask, ordering within a layer cannot change the verdict. The profile's canUseTool wins over the engine's (a single slot by construction). A declared preset compiles INTO the same layers, after the host-authored rules, never as a fifth layer (M5-T05).

Parameters

ParameterType
engine?PermissionConfig
profile?AgentProfilePermissions

Returns

CompiledPermissionChain