isToolGatedAtRung
isToolGatedAtRung(
options):boolean
Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/config/shell-policy.ts:931
The one rule: does rung gate this tool — i.e. must this call be decided rather than simply
run? Everything else in this area is a projection of this predicate over a set of names.
- The shell is gated whenever the shell gate is on, at EVERY rung (
bypassincluded, so §2.5’s deny list can still fire — see thebypassarm ofGthAgentRunner.decideToolApproval). - At the two deterministic rungs, a tool is gated when the rung’s own grant does not cover its
access class (isAccessClassGrantedAtRung). At
manualthat leaves only the built-in READ tools free; atwrite, the built-in read and write tools. The write built-ins, the shell, MCP tools and custom/agent-authored tools all escalate to the human. - At
assisted,autoandbypassnothing but the shell is gated. That split is deliberate and load-bearing, not tidiness. At a rated rung a gated non-shell call reaches thesubject.kind !== 'shell'arm ofGthAgentRunner.decideToolApproval, which floors it atdestructiveand sends it to the human with no rating call, because §4.3 keeps the rater on the shell until [[EXT-30]]. Gating there would silently turn every MCP call atassistedinto a human prompt — a UX change belonging to EXT-30, not to the two rungs whose published descriptions this predicate makes true.
gateShell only ever WIDENS the result. At a deterministic rung the shell is gated by its own
(absent) access class if it is bound at all, so gateShell: false does not exempt it — an
exemption keyed to one tool NAME is the defect class this predicate exists to remove. In practice
a disabled shell tool is never bound, so the two agree.
This takes no bound toolset, which is what lets GthAgentRunner ask it about a single
arriving call: the runner sees only the names the graph registered, and a graph builder that
registers tools of its own leaves them off that list. A decision that consulted a bound list
would grant such a tool at manual purely because the runner could not see it.
Parameters
Section titled “Parameters”options
Section titled “options”gateShell
Section titled “gateShell”boolean
"manual" | "write" | "assisted" | "auto" | "bypass"
toolName
Section titled “toolName”string
Returns
Section titled “Returns”boolean