fix: add operator.read and operator.write to default CLI scopes

The 2026.2.19-2 release tightened scope enforcement on the gateway
handshake, but the default CLI operator scopes only included admin,
approvals, and pairing. Cron announce delivery and sub-agent result
delivery use methods gated behind operator.write (e.g. "send", "poll"),
causing a scope-upgrade rejection: `gateway closed (1008): pairing
required`.

Add operator.read and operator.write to the default scope set across all
runtime bundles (Node.js, browser Control UI, macOS CLI, OpenClawKit).

Fixes #21787

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
YuzuruS
2026-02-21 18:59:42 +09:00
committed by Ayaan Zaidi
parent b77e53da67
commit 3f00f0cbe8
7 changed files with 26 additions and 6 deletions

View File

@@ -318,7 +318,7 @@ public actor GatewayChannelActor {
let primaryLocale = Locale.preferredLanguages.first ?? Locale.current.identifier
let options = self.connectOptions ?? GatewayConnectOptions(
role: "operator",
scopes: ["operator.admin", "operator.approvals", "operator.pairing"],
scopes: ["operator.admin", "operator.read", "operator.write", "operator.approvals", "operator.pairing"],
caps: [],
commands: [],
permissions: [:],