isGrantedAtRung
isGrantedAtRung(
toolName,rung,gatedTools):boolean
Defined in: core/dist/config/tool-descriptions.d.ts:120
Is toolName auto-approved (granted, free, no prompt and no rating) at rung?
Parameters
Section titled “Parameters”toolName
Section titled “toolName”string
The registered tool name.
"read-only" | "write" | "auto-safe" | "full-auto" | "bypass"
The rung in force for the session.
gatedTools
Section titled “gatedTools”readonly string[]
The names the gate actually wires into the approval interrupt. This is the
parameter that keeps the descriptions honest: a tool the gate does not gate cannot require
approval, whatever a rung’s table row says about tool classes, so it is granted. Both backends
pass the same set they hand to interruptOn / humanInTheLoopMiddleware.
Order:
bypassgrants everything (§2.5) — the gate is off.- A tool the gate does not gate is granted at every rung (§4.3’s scope boundary).
- A gated tool is granted only where the rung’s own grant covers its access class: read tools
from
read-onlyup (§2.1), write tools fromwriteup (§2.2, and §2.3/§2.4 which grant “everythingwritegrants”). A gated tool with no access class — the shell, a network call, an MCP tool — is granted at no rung butbypass.
Returns
Section titled “Returns”boolean