[Repo Assist] fix: add operator.write scope to gateway connect handshake (closes #112)#113
Draft
github-actions[bot] wants to merge 1 commit intomasterfrom
Draft
Conversation
The connect message in SendConnectMessageAsync declared scopes ["operator.admin", "operator.approvals", "operator.pairing"] but omitted "operator.write". The gateway requires this scope for chat.send requests, causing both the built-in QuickSend dialog and custom clients to fail with: Gateway request failed: missing scope: operator.write Closes #112 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
28 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This is an automated draft PR from Repo Assist.
Summary
The
connectmessage sent during the WebSocket handshake declared these scopes:This affected both the built-in QuickSend dialog (
QuickSendDialog) and any custom client built against the same protocol.Root Cause
SendConnectMessageAsyncinOpenClawGatewayClient.cs(line 303) simply never includedoperator.writein the scopes array.Fix
Add
"operator.write"to the scopes array in the connect handshake. One-line change.Trade-offs
None. The scope is required for an existing, intentional feature. Adding it does not broaden permissions beyond what the feature already assumes.
Test Status
dotnet test tests/OpenClaw.Shared.Tests/— 503 passed, 18 skipped, 0 failed ✅Closes #112