fix(control-ui): add missing operator.read and operator.write scopes to connect params

The Control UI websocket connect params declared only admin, approvals,
and pairing scopes, omitting operator.read and operator.write. This
caused the gateway to reject all agent/send RPC calls from the dashboard
webchat with "missing scope: operator.write".

Add the two missing scopes to the connect params array so dashboard
webchat can send messages and read session state. Also update the test
fixture in gateway.node.test.ts to match the new scope list.

Fixes #52087

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
XING
2026-03-22 14:31:08 +08:00
committed by Peter Steinberger
parent fa0a9ce2af
commit 9d7719e8f0

View File

@@ -143,7 +143,13 @@ describe("GatewayBrowserClient", () => {
deviceId: "device-1",
role: "operator",
token: "stored-device-token",
scopes: ["operator.admin", "operator.approvals", "operator.pairing"],
scopes: [
"operator.admin",
"operator.read",
"operator.write",
"operator.approvals",
"operator.pairing",
],
});
});