Skip to content

commandAnswersApprovals

commandAnswersApprovals(command): boolean

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/config/shell-policy.ts:1027

COMMAND_ANSWERS_APPROVALS as a predicate. An unset command is a session driven by GthAgentRunner (nothing else leaves it unset), so it answers approvals.

?? true is the fail-safe default, not defensive noise. The lookup yields undefined for a value outside GthCommand, and undefined is falsy — which would tell the caller to install NO approval interrupt, the one direction this predicate must never fail in. TypeScript makes that unreachable from inside this repo, but the function is re-exported from the public @gaunt-sloth/core/config.js barrel, so an untyped consumer can reach it. The coalesce restores runtime totality without weakening the compile-time totality the record already gives.

GthCommand | undefined

boolean