You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(core): introduce TrustGateError for setApprovalMode (#4175 Wave 4 PR 17)
Adds a named subclass `TrustGateError` thrown by `Config.setApprovalMode`
when the requested mode would grant privileged tool autonomy in a folder
the user has not marked as trusted. Daemon mutation routes can now
recognize this rejection class without depending on message text.
Extends `mapDomainErrorToErrorKind` in `packages/cli/src/serve/status.ts`
to map `TrustGateError → 'auth_env_error'`. Matches by `err.name` rather
than `instanceof` because cross-package bundling can produce duplicate
class instances where `instanceof` returns false. Test covers both the
real class and a name-synthesized instance.
Foundation for the `POST /session/:id/approval-mode` route landing in a
follow-up commit in this PR.
🤖 Generated with [Qwen Code](https://github.com/QwenLM/qwen-code)
0 commit comments