Skip to content

isGrantedAtRung

isGrantedAtRung(toolName, rung, gatedTools): boolean

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/dist/config/tool-descriptions.d.ts:166

Is toolName auto-approved (granted, free, no prompt and no rating) at rung?

string

The registered tool name.

"auto" | "manual" | "write" | "assisted" | "bypass"

The rung in force for the session.

readonly string[]

The LIVE gated set — what rung actually gates, i.e. resolveGatedToolNames for the rung in force. This is the parameter that keeps the descriptions honest: a tool the rung does not gate cannot require approval, whatever a rung’s table row says about tool classes, so it is granted. It is deliberately NOT the wider, rung-independent set the agent wires into interruptOn (resolveInterruptToolNames): a call the live rung does not gate is auto-approved the moment it arrives at the runner, so describing it as needing approval would be a promise nothing keeps.

Order:

  1. bypass grants everything (§2.5) — the gate is off.
  2. A tool the live rung does not gate cannot require approval, so it is granted at every rung.
  3. A gated tool is granted only where the rung’s own grant covers its access class — isAccessClassGrantedAtRung, the same rule resolveGatedToolNames selects the gated set with. At the two deterministic rungs those two uses are complementary by construction: a tool is gated there precisely when this returns false, so step 3 answers false for every tool step 2 let through, and the gate and the description say the same thing.

boolean