parseApprovalsArg
parseApprovalsArg(
args):ApprovalsAction|null
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:889
CFG-27/EXT-70 — parse the /approvals argument: no arg SHOWS the current posture; any of the
five mode names switches to it; trust / untrust move which of a server’s annotation hints are
believed (§4.7.1). Returns null for an unrecognized first argument so the command renders a
usage hint instead of guessing.
All five names are accepted, not the four the picker offers. write is a modifier of
manual rather than a posture of its own, so it leaves quick access — but it stays fully
settable here and in config, which is the whole of what “demoted” means.
The retired ask spelling is NOT accepted as an alias — 2.0 is a deliberate break, and a silent
alias would leave the user believing in a vocabulary the gate no longer has. It is named, with
both of its replacements, by the config-layer error in RETIRED_APPROVAL_MODES.
Only the subcommand token is lower-cased. A server key is the user’s own mcpServers key
(§4.7.5) and is case-sensitive, so folding it would name a different server — one that believes
nothing, silently, while the notice reported success. A hint is matched case-insensitively
against the fixed vocabulary and echoed back in its canonical spelling, so readonlyhint
resolves rather than vanishing, and what lands in the policy is the name the derivation reads.
Parameters
Section titled “Parameters”string[]
Returns
Section titled “Returns”ApprovalsAction | null