Skip to content

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?

string

The registered tool name.

"read-only" | "write" | "auto-safe" | "full-auto" | "bypass"

The rung in force for the session.

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:

  1. bypass grants everything (§2.5) — the gate is off.
  2. A tool the gate does not gate is granted at every rung (§4.3’s scope boundary).
  3. A gated tool is granted only where the rung’s own grant covers its access class: read tools from read-only up (§2.1), write tools from write up (§2.2, and §2.3/§2.4 which grant “everything write grants”). A gated tool with no access class — the shell, a network call, an MCP tool — is granted at no rung but bypass.

boolean