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 053501c
Browse filesBrowse the repository at this point in the historyBrowse files
Expose read-only local MCP diagnostics for connection state and saved gateways. Add snapshot-derived projection, command docs, and regression coverage for credential-safe URL display and degenerate gateway records.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot App <[email protected]>
`GatewayConnectionSnapshot.NodeConnectionIntended` records the Node mode intent used by the manager's state machine. If Node mode is enabled but node startup is skipped, blocked, or missing a node credential, the manager publishes a blocked node snapshot (`NodeState=Error`, `NodeError=...`) instead of leaving the node idle and letting tray surfaces report a healthy connection.
125
125
126
+
### Status projection and legacy ledger
127
+
128
+
`GatewayConnectionManager.CurrentSnapshot` is the lifecycle truth. Tray/UI state
129
+
must treat `AppState.Status` / `ConnectionStatus` as a derived compatibility
130
+
projection only, produced from the manager snapshot by
131
+
`ConnectionStatusPresenter`. New connection diagnostics should read
132
+
`GatewayConnectionSnapshot`, `GatewayRegistry`, and `ConnectionDiagnostics`
133
+
directly instead of writing a second runtime model.
134
+
135
+
Current derived compatibility debt:
136
+
137
+
| Surface | Status | Notes |
138
+
|---|---|---|
139
+
|`AppState.Status`| Derived read-side adapter | The only writer is the manager `StateChanged` handler, which maps the snapshot through `ConnectionStatusPresenter` for older UI consumers. |
140
+
|`ConnectionStatus` enum | Retained | Still used by shared gateway/client and tray read-side surfaces. Do not remove it until protocol/client and UI consumers are separated in a smaller migration. |
141
+
| Command Center / tray projections | Mixed | New diagnostics use snapshot-derived DTOs. Some older warnings still read `AppStateSnapshot.Status`; those reads are compatibility gates, not lifecycle ownership. |
142
+
143
+
The local MCP `app.connection.status` command is the agent-facing projection of
144
+
this model. It reports effective mode/state, active gateway metadata,
Copy file name to clipboardExpand all lines: docs/MCP_MODE.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,7 @@ The capability list lives on `NodeService`, *not* on `WindowsNodeClient`. That s
63
63
`OpenClaw.Shared/Mcp/McpToolBridge.cs` is transport-agnostic JSON-RPC 2.0. It implements:
64
64
65
65
-`initialize` — protocol version `2024-11-05`, server info.
66
-
-`tools/list` — flattens `_capabilities` into MCP tools. Tool name = command name (`"screen.snapshot"`); description = `"{category} capability: {command}"`;`inputSchema` is permissive.
66
+
-`tools/list` — flattens `_capabilities` into MCP tools. Tool name = command name (`"screen.snapshot"`); known commands get curated descriptions from `McpToolBridge.CommandDescriptions`; unknown commands fall back to `"{category} capability: {command}"`.`inputSchema` is permissive.
67
67
-`tools/call` — finds the capability via `INodeCapability.CanHandle(name)`, builds a `NodeInvokeRequest` (the same struct the gateway path uses), calls `ExecuteAsync`, wraps the result as MCP `content[].text`. Tool failures come back as `result.isError = true`, not JSON-RPC errors (per MCP spec — JSON-RPC errors are reserved for protocol issues).
Copy file name to clipboardExpand all lines: docs/WINDOWS_NODE_TESTING.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
@@ -104,7 +104,7 @@ When the node connects, it advertises these capabilities:
104
104
-`tts` - Windows speech synthesis or ElevenLabs playback, when enabled in Settings
105
105
-`stt` - Local speech-to-text via Whisper.net, when enabled in Settings
106
106
107
-
Local MCP clients also see MCP-only `app.*` commands such as `app.navigate`, `app.status`, `app.chat.snapshot`/`app.chat.send`/`app.chat.reset`, and `app.chat.queue.list`/`app.chat.queue.cancel`. These are local testing and automation hooks registered with the tray's MCP server and are not advertised to the gateway WebSocket.
107
+
Local MCP clients also see MCP-only `app.*` commands such as `app.navigate`, `app.status`, `app.chat.snapshot`/`app.chat.send`/`app.chat.reset`, and `app.chat.queue.list`/`app.chat.queue.cancel`. Connection diagnostics and setup tools live under `app.connection.*`; use `app.connection.status` to inspect active gateway, operator/node credential state, MCP runtime status, browser proxy caveat, pending approval commands, and recent diagnostics, and `app.connection.gateways` to list saved gateway records without token values. These are local testing and automation hooks registered with the tray's MCP server and are not advertised to the gateway WebSocket.
"Cancel/remove one native chat outgoing queue entry before it is sent. Args: queuedMessageId (string, required), threadId/sessionKey (string, required; use the threadId returned by app.chat.queue.list or app.chat.snapshot). Only Queued/Failed entries can be removed; Sending entries may already have reached the gateway. Returns { canceled, threadId, queuedMessageId, remainingCount, error? }.",
287
+
["app.connection.status"]=
288
+
"READ-ONLY local MCP connection diagnostics. No args. Returns effective mode/state, active gateway metadata, operator/node credential resolution, MCP runtime state, browser proxy caveat, pending approval actions, retry hints, and recent diagnostic events.",
289
+
["app.connection.gateways"]=
290
+
"READ-ONLY saved gateway diagnostics. No args. Returns { activeGatewayId, count, gateways[] } with per-gateway id/name/url, active flag, lastConnected, credential presence booleans, SSH/browser-proxy configuration, and no token values.",
291
+
["app.connection.applySetupCode"]=
292
+
"Apply a setup/QR code to create or update the active gateway record and connect. Args: setupCode (string, required). Local MCP-only; not advertised to the gateway node transport. Returns { outcome, error, gatewayUrl, connected }.",
293
+
["app.connection.connectSharedToken"]=
294
+
"Connect the tray to a gateway using a shared token. Args: gatewayUrl (string, required), token (string, required). Persists the gateway record and active gateway. Local MCP-only. Returns { outcome, error, gatewayUrl, connected }.",
295
+
["app.connection.pendingApprovals"]=
296
+
"READ-ONLY pending pairing approval snapshot from the connected gateway. No args. Returns { connected, error, totalPending, devicePending[], nodePending[] }.",
297
+
["app.connection.approveDevicePairing"]=
298
+
"Approve a pending device pairing request through the connected operator client. Args: requestId or id (string, required). Local MCP-only. Returns the refreshed pending approvals payload plus decision metadata.",
299
+
["app.connection.rejectDevicePairing"]=
300
+
"Reject a pending device pairing request through the connected operator client. Args: requestId or id (string, required). Local MCP-only. Returns the refreshed pending approvals payload plus decision metadata.",
301
+
["app.connection.approveNodePairing"]=
302
+
"Approve a pending Windows node pairing or command-trust request through the connected operator client. Args: requestId or id (string, required). Local MCP-only. Returns the refreshed pending approvals payload plus decision metadata.",
303
+
["app.connection.rejectNodePairing"]=
304
+
"Reject a pending Windows node pairing or command-trust request through the connected operator client. Args: requestId or id (string, required). Local MCP-only. Returns the refreshed pending approvals payload plus decision metadata.",
305
+
["app.connection.reconnect"]=
306
+
"Reconnect the active gateway through GatewayConnectionManager. No args. Local MCP-only. Returns { reconnected, error? }.",
307
+
["app.connection.reconnectNode"]=
308
+
"Reconnect only the Windows node role for the active gateway through GatewayConnectionManager. No args. Local MCP-only. Returns { reconnected, error? }.",
0 commit comments