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
{{ message }}
Repository navigation
Commit cb68abf
Browse filesBrowse the repository at this point in the historyBrowse files
Show pending approval and reapproval state in Command Center, keep command-trust requests manual, and provide request-bound approval and reconnect guidance. Depends on core diagnostics from openclaw/openclaw#92547.
Copy file name to clipboardExpand all lines: docs/CONNECTION_ARCHITECTURE.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -166,7 +166,7 @@ Setup codes (from QR scan or paste) decode to `{ url, bootstrapToken }` via `Set
166
166
5. Gateway returns `hello-ok.auth.deviceToken` after pairing
167
167
6. Connection manager persists the device token to the identity file
168
168
169
-
**Auto-approval**: When the node requires pairing and the operator has `operator.admin` or `operator.pairing` scope, `GatewayConnectionManager` automatically approves the node pairing request, waits 1 second, then reconnects the node.
169
+
**Approval boundaries**: `GatewayConnectionManager` leaves node-pair command-trust requests and reapproval pending for explicit operator approval. It may automatically approve and reconnect only an explicitly typed device-pair request used for a device role upgrade.
170
170
171
171
## SSH tunnel integration
172
172
@@ -224,12 +224,11 @@ Connection tests live in `tests/OpenClaw.Connection.Tests/`:
-`ConnectionDiagnosticsTests` — ring buffer diagnostics
233
233
234
234
The heaviest remaining gap is Windows shell UI behavior (tray clicks, tooltip visibility, WinUI menu routing). Cover pure decision logic in unit tests; use manual or integration smoke tests for shell behavior.
Copy file name to clipboardExpand all lines: docs/CONNECTION_PROTOCOL_RESEARCH.md
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -403,11 +403,11 @@ Windows implications:
403
403
when system capability is enabled. Those requests require admin to approve.
404
404
- A bounded QR/bootstrap operator token should not auto-approve node command
405
405
trust.
406
-
-Auto-approval diagnostics must report missing `operator.admin` vs missing
407
-
`operator.pairing` instead of a generic failure.
408
-
-`_lastAutoApprovedRequestId` must not permanently suppress recovery if the
409
-
approve RPC succeeded but the post-approval reconnect failed or the gateway
410
-
reuses the same request id.
406
+
-`GatewayConnectionManager` only auto-approves explicitly typed device-pair
407
+
role upgrades. Node-pair command trust, including reapproval, remains pending
408
+
for an explicit operator decision.
409
+
- Device role-upgrade auto-approval diagnostics must report missing
410
+
`operator.admin` instead of a generic failure.
411
411
412
412
## Flow 7: local WSL setup-engine flow
413
413
@@ -454,7 +454,7 @@ Reliability risks:
454
454
| QR bootstrap immediate credential |`ApplySetupCodeAsync`, `CredentialResolver`| Preserved shared token can win over fresh bootstrap token. | Fixed | Force the fresh bootstrap token for the immediate setup-code connect. |
455
455
| QR post-bootstrap operator reconnect |`GatewayConnectionManager`| LKG gateway may return only node token on bootstrap; operator must reconnect via preserved shared token. | Fixed | Schedule post-bootstrap operator reconnect using durable operator token or preserved shared token. |
456
456
| Node token parsing |`WindowsNodeClient`| Parses direct `auth.deviceToken` for node. | Aligned for direct node connect | Validate post-approval reconnect. |
457
-
| Node command trust |`GatewayConnectionManager.OnNodePairingStatusChangedAsync`|Auto-approves when request id and approval scope helper allow it. |Likely surgical fix | Separate node-pair authority and missing-scope handling. |
457
+
| Node command trust |`GatewayConnectionManager.OnNodePairingStatusChangedAsync`|Explicit node-pair and unknown requests remain pending; only explicitly typed device-pair role upgrades may auto-approve. |Fixed | Preserve explicit operator approval for command trust and reapproval. |
458
458
| Approval scope helper |`OperatorScopeHelper.CanApproveDevices`| Checks only admin/pairing. | Needs protocol-specific split | Do not add `operator.approvals` for `node.pair.*`; add clearer helpers. |
459
459
| Capability registration |`NodeConnector`, `App.xaml.cs`, `NodeService`| Event-before-connect pattern exists; app warns if binding unavailable. | Likely surgical fix | Fail/hold/reconnect on binding miss instead of silently connecting with no commands. |
460
460
| Stale node events |`GatewayConnectionManager` node handlers | Operator events are generation-guarded; node handlers are not equivalently guarded. | Likely surgical fix | Add generation or client-instance stale-event guard. |
@@ -502,8 +502,10 @@ Existing coverage:
502
502
HTML for token/auth error markers, not just HTTP status.
503
503
-`app.status` validation includes negotiated operator scopes and asserts the
504
504
operator has `operator.admin` and `operator.pairing` on the normal local
505
-
setup/shared-token path so Windows node command-trust auto-approval can
506
-
complete without a leftover approval banner.
505
+
setup/shared-token path. Explicitly configured SetupEngine onboarding may
506
+
use those scopes to approve command trust without a leftover approval
Copy file name to clipboardExpand all lines: docs/MISSION_CONTROL.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -438,7 +438,7 @@ Deliverables:
438
438
- broad file system access if relevant
439
439
- screen capture/graphics capture guidance
440
440
- First read-only Command Center slice is implemented. It surfaces these settings pages and explanatory rows, but intentionally does not query, request, or exercise device permissions.
441
-
- Capability diagnostics copy is implemented for declared commands, gateway allowlist status, and privacy-sensitive opt-ins.
441
+
- Capability diagnostics distinguish approved/effective commands from pending declarations, surface pending approval/reapproval, and keep privacy-sensitive opt-ins explicit.
442
442
- Mac-style onboarding security warning: **implemented in Setup Wizard Node Mode step, warning users that approved agents can run local commands and access enabled screen/camera/location/browser/canvas surfaces**
443
443
- Topology choice onboarding: **first Settings guide implemented with local, WSL, SSH tunnel, and remote/Tailscale presets**
444
444
- Exec approval dialog with sanitizer and three-button flow: **implemented for local `Prompt` policy decisions with Allow once / Always allow / Deny**
Copy file name to clipboardExpand all lines: docs/WINDOWS_NODE_TESTING.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,12 @@ The Windows Node feature allows the tray app to receive commands from the OpenCl
37
37
### 4. Command Center
38
38
- Open the tray status detail or launch `openclaw://commandcenter`
39
39
- In Node Mode, verify the window shows gateway channel health from node `health` events plus a synthesized local Windows node when operator `node.list` is not connected
40
-
- Check diagnostics for pairing approval, stale health, all-stopped channels, allowlist filtering, browser control host availability for `browser.proxy`, and usage-cost gaps
40
+
- Check diagnostics for pairing approval, pending reapproval, stale health, all-stopped channels, allowlist filtering, browser control host availability for `browser.proxy`, and usage-cost gaps
41
+
- When only the synthesized local Windows node is available, verify its locally declared capabilities/commands are labeled unverified and are not counted as approved/effective
42
+
- For `pending-reapproval`, verify effective capabilities/commands remain unchanged, pending declarations are listed separately, and the copy action emits `openclaw nodes approve <pendingRequestId>`
43
+
- During a changed-command handshake, verify authoritative `pending-reapproval` replaces the generic node-pair approval card and exposes only the node-list trust command; explicitly typed device role-upgrade, Node mode off/hidden, and failure cards remain higher priority
44
+
- If the gateway omits a safe pending request ID, verify the copy action emits `openclaw nodes pending`, labels it as discovery only, and does not offer reconnect-after-approval yet
45
+
- Approve the request explicitly, reconnect the node, and verify the effective capability/command counts update and the pending reapproval warning clears
41
46
- Use "Copy fix" only for safe repair commands; privacy-sensitive commands remain informational unless you explicitly opt in on the gateway
Copy file name to clipboardExpand all lines: docs/gateway-node-integration.md
+17-10Lines changed: 17 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,18 +78,25 @@ After changing config:
78
78
openclaw gateway restart
79
79
```
80
80
81
-
After changing the node's command list (code change), you must **re-pair**:
81
+
After changing the node's command list, approve the pending reapproval request:
82
82
```bash
83
-
openclaw devices list # find old device
84
-
openclaw devices reject <id># reject the old pairing
85
-
# Node will auto-reconnect and create a new pairing request
86
-
openclaw devices list # find new request
87
-
openclaw devices approve <id># approve with updated commands
83
+
openclaw nodes pending
84
+
openclaw nodes approve <pendingRequestId>
88
85
```
89
86
90
-
### 1.4 Why Re-Pairing is Needed
87
+
`openclaw nodes pending` only discovers request IDs; it does not approve declarations.
91
88
92
-
The gateway snapshots the node's declared `commands` array at **pairing approval time**. If you change the node's code to add new commands and restart it, the gateway still uses the old snapshot. You must reject the old pairing and approve a new one.
89
+
Older gateways without pending reapproval support may still require rejecting and re-pairing the node.
90
+
91
+
### 1.4 Why Reapproval is Needed
92
+
93
+
The gateway snapshots the node's declared `commands` array at **pairing approval time**. When a newer gateway detects changed declarations, `node.list` and `node.describe` keep the existing `caps`, `commands`, and `permissions` as the approved/effective snapshot and report the proposed replacement under `pendingDeclaredCaps`, `pendingDeclaredCommands`, and `pendingDeclaredPermissions`. Approve the reported request explicitly:
94
+
95
+
```powershell
96
+
openclaw nodes approve <pendingRequestId>
97
+
```
98
+
99
+
Then reconnect the node and verify the effective command and capability counts update. Pending declarations are never effective before approval. Older gateways that do not report pending reapproval fields may still require rejecting and re-pairing the node.
93
100
94
101
### 1.5 `denyCommands`
95
102
@@ -313,7 +320,7 @@ For the first-party Windows companion node, the practical local solution is:
313
320
1. Keep declaring the correct command names from the Windows node.
314
321
2. Send canonical connect metadata: `platform: "windows"` and
315
322
`deviceFamily: "Windows"`.
316
-
3.Re-pair after command-list changes because the gateway snapshots commands at approval time.
323
+
3.Reapprove command-list changes because the gateway snapshots commands at approval time; older gateways may require re-pairing.
317
324
318
325
### 5.1 Gateway Node Allowlist Configuration
319
326
@@ -333,7 +340,7 @@ camera.clip
333
340
screen.record
334
341
```
335
342
336
-
After changing either `gateway.nodes.allowCommands` or `gateway.nodes.denyCommands`, re-approve or re-pair the Windows node. Approved device records may keep a snapshot of the commands that were visible at approval time, so a gateway restart alone may not refresh existing approvals.
343
+
After changing either `gateway.nodes.allowCommands` or `gateway.nodes.denyCommands`, check Command Center for `pending-reapproval`. Copy and run its exact `openclaw nodes approve <pendingRequestId>` command, reconnect the Windows node, and verify the effective command and capability counts update. A gateway restart alone does not approve pending declarations. Older gateways without pending reapproval diagnostics may still require re-pairing.
0 commit comments