openclaw-windows-node/README.md
Régis Brid f2fa038bd0
Companion application refactoring (#272)
* feat: unified Hub window with NavigationView, slim tray menu, and inline toggles

Consolidate 8 separate windows into a single Hub app:
- New HubWindow with NavigationView (Chat, Home, Activity, Settings pages)
- Chat page embeds gateway Control UI via WebView2 (default landing page)
- Home page with live status cards, quick actions, and activity feed
- Settings page with Expander sections, Test Connection, SSH tunnel fields
- Activity page with category filters and live ActivityStreamService binding
- Slim tray menu: status + 3 inline toggles + Hub/QuickSend + Settings/Exit
- Acrylic backdrop on tray flyout, auto-collapsing nav, page transitions
- Deep links (openclaw://) redirected to Hub pages
- Deleted 5 old windows: StatusDetail, ActivityStream, NotificationHistory, WebChat, Settings
- WebView2 event handler cleanup on page Unloaded (code review fix)
- Deferred page init to avoid null Settings during Frame.Navigate

25 files changed, 1350 insertions(+), 2033 deletions(-) — net code reduction

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: settings validation, CSS sidebar hiding, toggle labels, and SSH tunnel support

- Settings save validates gateway URL and SSH tunnel fields before saving
- Test Connection supports SSH tunnel mode (starts temp tunnel for test)
- SSH toggle auto-updates gateway URL field (shows loopback in tunnel mode)
- Chat page injects CSS to hide web Control UI sidebar (no dual navigation)
- Tray toggle switches hide On/Off labels to prevent clipping

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* feat: full native UI with 12 pages, config editor, dual connection, and live gateway data

New pages: Sessions, Channels, Usage, Nodes, Cron, Skills, Config, About
- Sessions: live session list with reset/delete/compact actions
- Channels: channel health cards with start/stop controls
- Usage: cost breakdown, provider stats, daily costs
- Nodes: node inventory with capabilities and device ID copy
- Cron: scheduled jobs with run/remove actions (gateway wired)
- Skills: installed skills status (gateway wired)
- Config: TreeView + detail panel with editable values via config.set protocol
- About: version info, debug tools, documentation links

Infrastructure:
- Dual WebSocket connection: operator client (UI data) + node client (commands)
- 14 new gateway methods: cron.*, skills.*, config.* with JsonElement.Clone()
- Data caching in HubWindow for instant page navigation
- Session startedAt parsing fix (handles number + string timestamps)
- Hub window synced after settings reconnect
- Tray test updated for Auto scrollbar

Build: 0 errors | Tests: 774 passing (652 shared + 122 tray)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* UX Round 2: Agent events, discovery, pairing, models, presence, menu redesign, timer removal

Features:
- Agent Events page with stream filters and 400-event ring buffer
- Gateway discovery via mDNS (Zeroconf) with scan UI in General page
- Node/Device pairing UI with approve/reject in Nodes page
- Models list in Sessions page via models.list gateway method
- Instances page rewired to presence data from handshake snapshot
- Context cards in tray menu (session summary + token usage bars)
- Pairing pending count in tray menu

Menu & UX:
- Merged status + toggle into rich header card with status dot
- Permission toggles section (browser, camera, exec, canvas, screen)
- Renamed hub to Windows Companion with smart disconnect navigation
- Custom title bar with live connection status + gateway version
- Single-click tray -> chat, double-click -> hub
- Chat window pre-warmed on startup, hides instead of closing

Architecture:
- Removed all background timers (10s poll + 30s health check)
- On-demand data loading only (pages fetch on navigation)
- Fixed ParseSessions to merge instead of clear-then-rebuild (no flicker)
- Fixed HandleAgentEvent sessionKey parsing (was reading from root, not payload)
- Symmetric subscribe/unsubscribe for all new gateway events
- Caches cleared on disconnect, seeded into HubWindow on open

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Restructure navigation: agents as hierarchical nav items under Gateway

- Replace flat Agent section with hierarchical Agents > {agentId} > {sub-pages} structure
- Move Conversations shortcut to top level, pointing to SessionsPage
- Remove AgentSelectorNav ComboBox, replaced with dynamic nav tree (RebuildAgentNavItems)
- Add FindAndSelectNavItem for recursive nested nav item selection
- Add agent: tag parsing (ResolveAgentPageType, ParseAgentIdFromTag)
- Update NavigateTo with legacy flat tag mapping to new agent: prefix format
- Strip Zone B (Agent Roster) and Zone C (Capability Toggles) from HomePage
- Remove Node Mode toggle from SettingsPage (lives in CapabilitiesPage)
- Update command palette to use agent-scoped tags
- NavigateToDefault now goes to Home instead of Conversations

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* UX Round 3: Hearth redesign, hierarchical nav, command palette, agent APIs

Navigation restructure:
- 16 flat pages → domain-grouped hierarchical nav (Gateway, This Computer)
- Each agent gets expandable nav item with Sessions, Events, Skills, Workspace
- Dynamic agent nav built from agents.list gateway response
- Nodes nested under Instances (superset relationship)
- Cron moved to gateway section (gateway-wide, not per-agent)
- Connection page extracted from Settings into Gateway section
- Settings simplified to local-only (startup, notifications)

New pages:
- ConnectionPage — gateway URL, token, SSH tunnel, discovery, status
- CapabilitiesPage — device toggles + node status indicator
- WorkspacePage — TabView per-file viewer via agents.files.list/get
- BindingsPage — routing rules viewer (channel→agent)
- ConversationsPage — cross-agent session browser (legacy)

Command palette (Ctrl+K / Ctrl+F):
- Inline overlay with light dismiss (click outside, Escape, Enter)
- 20+ navigation + 5 toggle + dynamic session commands
- Fuzzy substring filtering

Home page (The Hearth):
- Molty status indicator with colored ring
- Natural language status text
- Quick action buttons

Agent-scoped data:
- Sessions, Skills pass agentId to gateway calls
- Agent Events filtered by sessionKey prefix
- Workspace scoped to current agent in hierarchy

Real gateway APIs:
- agents.list → dynamic nav + agent roster
- agents.files.list/get → workspace file viewer
- Cached agents list for hub seeding on open

Architecture:
- Canvas window styled with Mica + custom title bar
- Open Canvas menu item uses NodeService.ShowCanvasWindow()

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* feat(tray): add rich session tooltips and connected devices section

- Add rich ToolTip to each session label showing model, provider,
  channel, thinking level, token breakdown, context window, status,
  and age
- Add Connected Devices section between context summary and Permissions
  with online indicator dots, platform badges, and rich tooltips
- Show connected client count from presence data in status header subtitle

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Redesign session and device tray menu with rich compact cards

Replace plain text session/device rows with structured Grid cards featuring:
- Status dot (green/amber/gray) + name + model/platform badge + chevron
- Token usage with percentage and color-coded progress bar
- Channel badges and capability icons for devices
- Section headers with right-aligned summary stats

Add AddFlyoutCustomItem() to TrayMenuWindow for custom UIElement
flyout items with hover-to-show and click-to-navigate behavior.

Build detailed side flyout panels with headers, token breakdowns,
capability listings, and session metadata.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* UX Round 4: Chat popup, rich tray menu, schema config editor

Chat panel:
- Tray-anchored borderless popup (bottom-right, DPI-aware)
- WS_EX_TOOLWINDOW + no caption/frame (hidden from taskbar)
- Auto-hide on deactivate, instant show (no animation — WebView2 incompatible)
- Single-click toggle, double-click opens Hub (400ms detection)
- Chat window recreated on settings change (stale URL fix)

Tray menu:
- Rich 2-line session cards: status dot, model badge, token progress bar
- Rich device cards: capability emoji strip, platform badge
- Flyout detail panels: non-interactive TextBlocks (not menu items)
- Session flyout: model/provider, channel, ASCII token bar, thinking/verbose
- Device flyout: capabilities merged with commands (cap as header, cmds indented)
- Dynamic capability toggles under local device (from node.Capabilities)
- Flyout dismisses on any menu item hover (including separators/headers/toggles)
- Section headers with aggregates (sessions/tokens, online/caps)
- AddFlyoutCustomItem + AddToggleItem indent support

Schema config editor:
- SchemaConfigEditor UserControl renders from JSON Schema
- Supports string/number/boolean/enum/array/nested objects
- Sensitive field detection (PasswordBox)
- Fallback RenderConfigDirectly when schema unavailable
- Config detail panel uses schema for selected tree node
- Pending changes preserved on save failure

Command palette:
- Rebuilt as inline overlay Grid (light dismiss: Escape + click-outside)
- Ctrl+F added as alternate shortcut
- TextBox replaces AutoSuggestBox (proper Escape handling)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* UX Round 5: Connection dashboard, tray polish, review fixes

Connection Management:
- Redesigned ConnectionPage with 6-section card layout: status card with
  live gateway info, gateway discovery picker with mDNS scan, setup code
  paste (from openclaw qr), manual connection expander, device identity
  card with pairing status and copyable approval command, connection log
- Auto-discovery when disconnected or unconfigured
- Setup code applies both bootstrapToken and Token for immediate connect
- PreferredGatewayId persisted in settings

Tray Menu Polish:
- Compact 3-column ToggleButton grid for capability toggles (all 7 shown)
- Split header subtitle into 2 lines (connection details + node status)
- Auth failure warning shown inline
- Reconnect and Connection quick actions
- Dropped 'Open' prefix from action items, added bottom padding

Hub Window:
- Removed XAML KeyboardAccelerators (caused tooltip flicker on hover)
- Replaced with PreviewKeyDown handler for Ctrl+K/F
- Added ReconnectAction, LastGatewaySelf, node state properties

Connection Lifecycle Fixes (from 3-model rubber-duck review):
- Capability toggles now use ReconnectNodeServiceOnly() instead of full
  teardown — no longer kills gateway client or chat window
- Reconnect action uses lightweight ReconnectGateway() (preserves chat)
- SyncHubNodeState() pushes live pairing/identity to hub on every
  node status and pairing change
- Gateway matching uses host:port comparison (not full URL with scheme)
- Discovery service disposed on page Unloaded
- Connection log refreshes on every status change
- SanitizeUrl guards against port -1
- Null-conditional restored on _hub?.RaiseSettingsSaved()
- Synthesized current gateway entry doesn't mutate cached list

Other:
- Instant single-click chat toggle (removed double-click debounce)
- Catch-all ShowHub(action) for menu nav tags
- SSH tunnel section flattened (removed redundant nested expander)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* UX Round 6: Token bar ProgressBar, title bar search, MCP toggle

Session flyout:
- Replaced ASCII token bar (█░) with WinUI ProgressBar (green/orange/red)
- Built flyout as native UIElement (StackPanel) instead of text items
- Added AddFlyoutCustomItem(UIElement, UIElement, action) overload

Title bar search:
- Replaced hidden command palette overlay with AutoSuggestBox in title bar
- Standard Windows pattern, always visible, Ctrl+K/F focuses it
- Lobster icon 14px → 20px, title shortened to 'OpenClaw'
- Removed overlay XAML, smoke layer, and palette methods

MCP server toggle:
- Added Local MCP Server card on Capabilities page
- Toggle, endpoint URL display, Copy Token/URL buttons
- Shows token readiness status

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix session flyout to match device flyout style

Replaced custom UIElement session flyout panel with simple
TrayMenuFlyoutItem list matching the device flyout pattern.
ProgressBar stays in the main menu session card only.
Removed unused AddFlyoutCustomItem(UIElement, UIElement) overload
and ShowCascadingFlyoutElement helper.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* UX Round 7: Nav restructure, App MCP, config editor, review fixes

Navigation:
- Sessions, Agent Events, Skills promoted to top-level with agent filter
- Agents folded to one level (direct nav → Workspace)
- Instances merged into Nodes with Connected Clients section
- Title restored to 'OpenClaw Windows Companion'
- Title bar: 48px height, responsive search (Ctrl+E), lobster 20px

Config page:
- Schema-driven tree (objects only, no leaf nodes)
- Editor + Raw JSON tabs
- config.patch sends { raw, baseHash } (hash from config.get response)
- Subtitle shows actual config file path from gateway
- All expanders open by default

App MCP capability (10 tools):
- app.navigate/status/sessions/agents/nodes/config.get
- app.settings.get/set with security allowlist (no secrets)
- app.menu/search for tray and command palette testing
- All handlers return structured data (not stringified JSON)
- Sessions filter by session key prefix (not channel)

Bug fixes:
- AgentEventsPage: init NRE guard, filter applies to display
- CapabilitiesPage: MCP toggle suppress during init
- SessionsPage: removed unused agent filter
- Config save: proper baseHash from gateway hash field

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* 5-model adversarial review fixes + regression tests

Fixes from Opus 4.7, Sonnet 4.5, GPT-5.4, GPT-5.2, Opus 4.6 reviews:
- Guard IndexOutOfRangeException on empty session Status
- Fix TCS hang when DispatcherQueue unavailable in app.navigate
- Static s_emptyObject replacing leaked JsonDocument in config tree
- Always prune stale sessions (removed incomingKeys.Count > 0 guard)
- try/catch/finally on 6 async void handlers (Channels, Sessions, Config)
- Seed ALL cached data before NavigateToDefault in ShowHub
- Move CurrentStatus/_cachedCommands inside DispatcherQueue in UpdateStatus
- Raw JSON tab uses 'parsed' not wrapper object
- Null-safe Subtitle in search handler
- Invalidate command cache on agent switch
- Dispose SemaphoreSlim in GatewayDiscoveryService

Regression tests (9 new):
- AppCapabilityTests: category, commands, CanHandle, handlers, errors
- SessionInfo empty Status guard
- ParseSessions empty array clears sessions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Tray menu: header redesign, dismiss fix, session reliability

Header:
- Split into brand header (🦞 OpenClaw) + Gateway section
- Gateway section: status dot, version/host:port, node status, labeled
  ToggleButton ('Connected'/'Disconnected') with tooltip
- Gateway info clickable → opens Connection page
- Menu dismisses after connect/disconnect toggle (avoids stale header)

Dismiss:
- Unified 150ms delayed foreground check for all deactivation cases
- Checks this window, flyout child, and owner parent before dismissing
- Fixes: click-away dismisses everything, hover between items doesn't
- Set _isShown=true in ShowAtCursor (was missing, broke dismiss guard)

Sessions:
- Removed connection status gate — show cached sessions always
- Zero gateway requests on menu open (health check was clearing sessions
  via ParseSessions in the response)
- Session cards click → 'sessions' top-level route

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Connection UX: localhost probe, auth errors, token prompt, gateway switching

Discovery:
- Localhost probe enumerates listening TCP ports via GetActiveTcpListeners
- Probes for gateway HTML signature (<title>OpenClaw Control</title>)
- Excludes MCP port (8765) to avoid false positives
- Runs in parallel with mDNS, results merged

Connection page:
- Auth error InfoBar with contextual guidance (token/pairing/password/signature)
- HubWindow.LastAuthError forwarded from OnAuthenticationFailed
- Cleared on successful connect and new connection attempts
- Token prompt always shows when switching gateways (pre-fills current token)
- Cancel button on token prompt
- Discovery list refreshes after connecting to show ✓

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Prepare UX experiments branch for PR

Fix gateway discovery host resolution, harden branch-introduced security paths, complete localization coverage, remove newly introduced dead code, refresh documentation, wire functional UX flows, and stabilize the Config page rendering path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix MCP-only tray startup

Initialize the local node service when MCP mode is enabled even if gateway node mode is disabled, so MCP-only tray launches start the HTTP server used by integration tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Ranjesh Jaganathan <ranjeshj@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-04 20:48:24 -07:00

21 KiB

🦞 OpenClaw Windows Hub

A Windows companion suite for OpenClaw - the AI-powered personal assistant.

Made with 🦞 love by Scott Hanselman and Molty

Molty - Windows Tray App

Molty - Command Palette

Projects

This monorepo contains four projects:

Project Description
OpenClaw.Tray.WinUI System tray application (WinUI 3) for quick access to OpenClaw
OpenClaw.Shared Shared gateway client library
OpenClaw.Cli CLI validator for WebSocket connect/send/probe using tray settings
OpenClaw.CommandPalette PowerToys Command Palette extension

🚀 Quick Start

End-user installer? See docs/SETUP.md for a step-by-step installation guide (no build required).

Prerequisites

Build

Use the build script to check prerequisites and build:

# Check prerequisites
.\build.ps1 -CheckOnly

# Build all projects
.\build.ps1

# Build specific project
.\build.ps1 -Project WinUI

Or build directly with dotnet:

# Build all (use build.ps1 for best results)
dotnet build

# Build WinUI (requires runtime identifier for WebView2 support)
dotnet build src/OpenClaw.Tray.WinUI/OpenClaw.Tray.WinUI.csproj -r win-arm64  # ARM64
dotnet build src/OpenClaw.Tray.WinUI/OpenClaw.Tray.WinUI.csproj -r win-x64    # x64

# Build MSIX package (for camera/mic consent prompts)
dotnet build src/OpenClaw.Tray.WinUI -r win-arm64 -p:PackageMsix=true  # ARM64 MSIX
dotnet build src/OpenClaw.Tray.WinUI -r win-x64 -p:PackageMsix=true    # x64 MSIX

Run Tray App

# Run the exe directly (path includes runtime identifier)
.\src\OpenClaw.Tray.WinUI\bin\Debug\net10.0-windows10.0.19041.0\win-arm64\OpenClaw.Tray.WinUI.exe  # ARM64
.\src\OpenClaw.Tray.WinUI\bin\Debug\net10.0-windows10.0.19041.0\win-x64\OpenClaw.Tray.WinUI.exe    # x64

Run CLI WebSocket Validator

Use the CLI to validate gateway connectivity and chat.send outside the tray UI.

# Show help
dotnet run --project src/OpenClaw.Cli -- --help

# Use tray settings from %APPDATA%\OpenClawTray\settings.json and send one message
dotnet run --project src/OpenClaw.Cli -- --message "quick send validation"

# Loop sends and also probe sessions/usage/nodes APIs
dotnet run --project src/OpenClaw.Cli -- --repeat 5 --delay-ms 1000 --probe-read --verbose

# Override gateway URL/token for isolated testing
dotnet run --project src/OpenClaw.Cli -- --url ws://127.0.0.1:18789 --token "<token>" --message "override test"

📦 OpenClaw.Tray (Molty)

Modern Windows 11-style system tray companion that connects to your local OpenClaw gateway.

Features

  • 🦞 Lobster branding - Pixel-art lobster tray icon with status colors
  • 🎨 Modern UI - Windows 11 flyout menu with dark/light mode support
  • 💬 Quick Send - Send messages via global hotkey (Ctrl+Alt+Shift+C)
  • 🔄 Auto-updates - Automatic updates from GitHub Releases
  • 🌐 Web Chat - Embedded chat window with WebView2
  • 📊 Live Status - Real-time sessions, channels, and usage display
  • 🧭 Command Center - Dense gateway, channel, usage, node, pairing, and allowlist diagnostics from one window
  • Activity Stream - Command Center page for live session, usage, node, and notification events
  • 🔔 Toast Notifications - Clickable Windows notifications with smart categorization
  • 📡 Channel Control - Start/stop Telegram & WhatsApp from the menu
  • 🖥️ Node Observability - Node inventory with online/offline state and copyable summary
  • Cron Jobs - Quick access to scheduled tasks
  • 🚀 Auto-start - Launch with Windows
  • ⚙️ Settings - Full configuration page
  • 🎯 First-run onboarding — 6-screen setup wizard (connection, permissions, chat, configuration)

Quick Send scope requirement

Quick Send uses the gateway chat.send method and requires the operator device to have operator.write scope.

If Quick Send fails with missing scope: operator.write, Molty now copies identity + remediation guidance to your clipboard, including:

  • operator role and client.id used by the tray app
  • gateway-reported operator device id (if provided)
  • currently granted scopes (if provided)

For this specific error (missing scope: operator.write), the cause is an operator token scope issue. Update the token used by the tray app so it includes operator.write, then retry Quick Send.

If Quick Send fails with pairing required / NOT_PAIRED, that is a device approval issue. Approve the tray device in gateway pairing approvals, reconnect, and retry.

Menu Sections

  • Status - Gateway connection status with click-to-view details
  • Command Center - Hub with diagnostics, channel health, usage, sessions, nodes, and copyable repair commands
  • Sessions - Active agent sessions with preview and per-session controls
  • Usage - Provider/cost summary with quick jump to activity details
  • Channels - Telegram/WhatsApp status with toggle control
  • Nodes - Online/offline node inventory and copyable summary
  • Recent Activity - Timestamped event stream for sessions, usage, nodes, and notifications
  • Actions - Dashboard, Web Chat, Quick Send, Activity Stream, History
  • Support & Debug - Logs, config, diagnostics folder, redacted support context, browser setup, port/capability/node/channel/activity summaries, and managed SSH tunnel restart
  • Settings - Configuration and auto-start

Mac Parity Status

Comparing against openclaw-menubar (macOS Swift menu bar app):

Feature Mac Windows Notes
Menu bar/tray icon Color-coded status
Gateway status display Connected/Disconnected
PID display Command Center shows gateway listener process/PID
Channel status Mac: Discord / Win: Telegram+WhatsApp
Sessions count
Last check timestamp Shown in tray tooltip
Gateway start/stop/restart ⚠️ Windows can restart the managed SSH tunnel from tray Support & Debug and Command Center; external gateway process control is not implemented
View Logs
Open Web UI
Refresh Auto-refresh on menu open
Launch at Login
Notifications toggle

Windows-Only Features

These features are available in Windows but not in the Mac app:

Feature Description
Quick Send hotkey Ctrl+Alt+Shift+C global hotkey
Embedded Web Chat WebView2-based chat window
Toast notifications Clickable Windows notifications
Channel control Start/stop Telegram & WhatsApp
Modern flyout menu Windows 11-style with dark/light mode
Deep links openclaw:// URL scheme with IPC
First-run onboarding 6-screen guided setup wizard (Welcome → Connection → Wizard → Permissions → Chat → Ready)
PowerToys integration Command Palette extension

🔌 Node Mode (Agent Control)

When Node Mode is enabled in Settings, your Windows PC becomes a node that the OpenClaw agent can control - just like the Mac app! The agent can:

Capability Commands Description
System system.notify, system.run, system.run.prepare, system.which, system.execApprovals.get, system.execApprovals.set Show Windows toast notifications, execute commands with policy controls
Canvas canvas.present, canvas.hide, canvas.navigate, canvas.eval, canvas.snapshot, canvas.a2ui.push, canvas.a2ui.pushJSONL, canvas.a2ui.reset Display and control a WebView2 window
Screen screen.snapshot, screen.record Capture screenshots and fixed-duration MP4 screen recordings
Camera camera.list, camera.snap, camera.clip Enumerate cameras and capture still photos or short video clips
Location location.get Return Windows geolocation when permission is available
Device device.info, device.status Return Windows host/app metadata and lightweight status
Text-to-speech tts.speak Speak text aloud through Windows speech synthesis, or ElevenLabs when configured

Packaged installs declare camera, microphone, and location capabilities. Windows may ask for consent the first time a node capability uses one of those protected resources.

Node Setup

  1. Enable Node Mode in Settings (enabled by default)

  2. First connection creates a pairing request on the gateway

  3. Approve the device on your gateway:

    openclaw devices list          # Find your Windows device
    openclaw devices approve <id>  # Approve it
    
  4. Configure gateway allowCommands - Add the commands you want to allow under gateway.nodes in ~/.openclaw/openclaw.json:

    {
      "gateway": {
        "nodes": {
          "allowCommands": [
            "system.notify",
            "system.run",
            "system.run.prepare",
            "system.which",
            "system.execApprovals.get",
            "system.execApprovals.set",
            "canvas.present",
            "canvas.hide",
            "canvas.navigate",
            "canvas.eval",
            "canvas.snapshot",
            "canvas.a2ui.push",
            "canvas.a2ui.pushJSONL",
            "canvas.a2ui.reset",
            "screen.snapshot",
            "camera.list",
            "camera.snap",
            "camera.clip",
            "location.get",
            "device.info",
            "device.status",
            "tts.speak"
          ]
        }
      }
    }
    

    ⚠️ Important: The gateway has a server-side allowlist. Commands must be listed explicitly - wildcards like canvas.* don't work! Privacy-sensitive commands such as screen.record and agent-driven audio playback via tts.speak should only be added to allowCommands when you explicitly want to allow them.

  5. Test it from your Mac/gateway:

     # Show a notification
     openclaw nodes notify --node <id> --title "Hello" --body "From Mac!"
    
     # Open a canvas window
     openclaw nodes canvas present --node <id> --url "https://example.com"
    
     # Execute JavaScript (note: CLI sends "javaScript" param)
     openclaw nodes canvas eval --node <id> --javaScript "document.title"
    
     # Render A2UI JSONL in the canvas (pass the file contents as a string)
     openclaw nodes canvas a2ui push --node <id> --jsonl "$(cat ./ui.jsonl)"
    
     # Take a screenshot
     openclaw nodes invoke --node <id> --command screen.snapshot --params '{"screenIndex":0,"format":"png"}'
    
     # Record a short screen clip (requires explicitly allowing screen.record on the gateway)
     openclaw nodes screen record --node <id> --duration 3000 --fps 10 --screen 0 --no-audio --out /tmp/openclaw-windows-screen-record-test.mp4 --json
    
     # List cameras
     openclaw nodes invoke --node <id> --command camera.list
    
     # Take a photo (NV12/MediaCapture fallback)
     openclaw nodes invoke --node <id> --command camera.snap --params '{"deviceId":"<device-id>","format":"jpeg","quality":80}'
    
     # Speak text aloud on the Windows node (requires TTS enabled in Settings and tts.speak allowed on the gateway)
     openclaw nodes invoke --node <id> --command tts.speak --params '{"text":"Hello from OpenClaw","provider":"windows"}'
    
     # Execute a command on the Windows node
     openclaw nodes invoke --node <id> --command system.run --params '{"command":"Get-Process | Select -First 5","shell":"powershell","timeoutMs":10000}'
    
     # View exec approval policy
     openclaw nodes invoke --node <id> --command system.execApprovals.get
    
     # Update exec approval policy (add custom rules)
     openclaw nodes invoke --node <id> --command system.execApprovals.set --params '{"rules":[{"pattern":"echo *","action":"allow"},{"pattern":"*","action":"deny"}],"defaultAction":"deny"}'
    

    📷 Camera permission: Desktop builds rely on Windows Privacy settings. Packaged MSIX builds will show the system consent prompt.

    🔒 Exec Policy: system.run is gated by an approval policy on the Windows node at %LOCALAPPDATA%\OpenClawTray\exec-policy.json (schema: { "defaultAction": "...", "rules": [...] }). This is separate from gateway-side ~/.openclaw/exec-approvals.json.

    Rules are matched against the full command line. Known wrapper payloads such as cmd /c ..., powershell -Command ..., pwsh -EncodedCommand ..., and bash -c ... are also evaluated before execution. Dangerous environment overrides like PATH, PATHEXT, NODE_OPTIONS, GIT_SSH_COMMAND, LD_*, and DYLD_* are rejected.

Command Center diagnostics

Open the status detail/Command Center from the tray menu or with openclaw://commandcenter. It shows:

  • channel health from gateway health events, including node-mode health received without a separate operator connection

  • active sessions, usage/cost data, node inventory, declared commands, and Mac parity notes

  • allowlist diagnostics that separate safe companion commands from privacy-sensitive opt-ins like screen.record, camera.snap, and camera.clip

  • copyable repair commands for safe allowlist fixes and pending pairing approval

  • recent activity and node invoke results through the Activity Stream, storing command names/status/duration only (not payloads, screenshots, recordings, or secrets)

    openclaw nodes invoke --node <id> --command system.execApprovals.set --params '{"rules":[{"pattern":"powershell.exe","action":"allow"},{"pattern":"pwsh.exe","action":"allow"},{"pattern":"echo *","action":"allow"},{"pattern":"*","action":"deny"}],"defaultAction":"deny"}'
    

    🔐 Web Chat secure context: Remote web chat requires https:// (or localhost). If using a self-signed cert, trust it in Windows (Trusted Root Certification Authorities) or use an SSH tunnel to localhost.

Node Status in Tray Menu

The tray menu shows node connection status:

  • 🔌 Node Mode section appears when enabled
  • Waiting for approval... - Device needs approval on gateway
  • Paired & Connected - Ready to receive commands
  • Click the device ID to copy it for the approval command

OpenClaw registers the openclaw:// URL scheme for automation and integration:

Link Description
openclaw://settings Open the Settings page
openclaw://setup Open Setup Wizard
openclaw://chat Open the Chat page
openclaw://commandcenter Open Command Center diagnostics
openclaw://activity Open the Activity page
openclaw://history Open the Activity page filtered to notification history
openclaw://dashboard Open Dashboard in browser
openclaw://dashboard/sessions Open specific dashboard page
openclaw://dashboard/channels Open Channels dashboard page
openclaw://dashboard/skills Open Skills dashboard page
openclaw://dashboard/cron Open Cron dashboard page
openclaw://healthcheck Run a manual health check
openclaw://check-updates Run a manual update check
openclaw://logs Open the current tray log file
openclaw://log-folder Open the logs folder
openclaw://config Open the config folder
openclaw://diagnostics Open the diagnostics JSONL folder
openclaw://support-context Copy redacted support context
openclaw://debug-bundle Copy a combined debug bundle for support
openclaw://browser-setup Copy browser.proxy/browser-control setup guidance
openclaw://port-diagnostics Copy gateway/browser/tunnel port diagnostics with owner PID stop hints
openclaw://capability-diagnostics Copy permissions, allowlist, and parity diagnostics
openclaw://node-inventory Copy node capabilities, commands, and policy status
openclaw://channel-summary Copy channel health and start/stop availability
openclaw://activity-summary Copy recent tray activity for troubleshooting
openclaw://extensibility-summary Copy channel, skills, and cron dashboard surface guidance
openclaw://restart-ssh-tunnel Restart the tray-managed SSH tunnel when enabled
openclaw://send?message=Hello Open Quick Send with pre-filled text
openclaw://agent?message=Hello Send message directly to the connected gateway

Deep links work even when Molty is already running - they're forwarded via IPC.

📦 OpenClaw.CommandPalette

PowerToys Command Palette extension for quick OpenClaw access.

Commands

  • 🦞 Open Dashboard - Launch the OpenClaw web dashboard
  • 💬 Dashboard: Sessions - Open the sessions dashboard
  • 📡 Dashboard: Channels - Open the channel configuration dashboard
  • 🧩 Dashboard: Skills - Open the skills dashboard
  • ⏱️ Dashboard: Cron - Open the scheduled jobs dashboard
  • 💬 Web Chat - Open the embedded Chat page
  • 📝 Quick Send - Open the Quick Send dialog to compose a message
  • 🧭 Setup Wizard - Open pairing/setup
  • 🧭 Command Center - Open diagnostics and support actions
  • 🔄 Run Health Check - Refresh connection health
  • ⬇️ Check for Updates - Run a manual GitHub Releases update check
  • Activity Stream - Open recent activity
  • 📋 Notification History - Open notification history in the Activity page
  • ⚙️ Settings - Open the OpenClaw Tray Settings page
  • 📄 Open Log File / 📁 Logs / 🗂️ Config / 🧪 Diagnostics - Open support files and folders
  • 📋 Copy Support Context - Copy redacted Command Center metadata
  • 🧰 Copy Debug Bundle - Copy combined support, port, capability, node, channel, and activity diagnostics
  • 🌐 Copy Browser Setup - Copy browser.proxy and node-host setup guidance
  • 🔌 Copy Port Diagnostics - Copy gateway/browser/tunnel port owners and stop hints
  • 🛡️ Copy Capability Diagnostics - Copy permission, allowlist, and parity diagnostics
  • 🖥️ Copy Node Inventory - Copy node capabilities, commands, and policy status
  • 📡 Copy Channel Summary - Copy channel health and start/stop availability
  • Copy Activity Summary - Copy recent tray activity
  • 🧩 Copy Extensibility Summary - Copy channel, skills, and cron surface guidance
  • 🔁 Restart SSH Tunnel - Restart the tray-managed SSH tunnel when enabled

Installation

  1. Run the OpenClaw Tray installer and tick "Install PowerToys Command Palette extension", or
  2. Register manually: Add-AppxPackage -Register "$env:LOCALAPPDATA\OpenClawTray\CommandPalette\AppxManifest.xml" -ForceApplicationShutdown
  3. Open Command Palette (Win+Alt+Space) and type "OpenClaw" to see commands

See docs/POWERTOYS.md for detailed setup and troubleshooting.

📦 OpenClaw.Shared

Shared library containing:

  • OpenClawGatewayClient - WebSocket client for gateway protocol
  • IOpenClawLogger - Logging interface
  • Data models (SessionInfo, ChannelHealth, etc.)
  • Channel control (start/stop channels via gateway)

Development

Project Structure

openclaw-windows-node/
├── src/
│   ├── OpenClaw.Shared/           # Shared gateway library
│   ├── OpenClaw.Tray.WinUI/       # System tray app (WinUI 3)
│   └── OpenClaw.CommandPalette/   # PowerToys extension
├── tests/
│   ├── OpenClaw.Shared.Tests/     # Shared library tests
│   └── OpenClaw.Tray.Tests/       # Tray app helper tests
├── docs/
│   └── molty1.png                 # Screenshot
├── openclaw-windows-node.slnx     # Solution file
├── README.md
├── LICENSE
└── .gitignore

Configuration

Settings are stored in:

  • Settings: %APPDATA%\OpenClawTray\settings.json
  • Logs: %LOCALAPPDATA%\OpenClawTray\openclaw-tray.log

Default gateway: ws://localhost:18789

First Run

On first run, Molty launches a guided onboarding wizard that walks you through setup:

  1. Welcome — introduces OpenClaw and starts the setup flow
  2. Connection — choose Local gateway, Remote gateway, or configure later. Paste a setup code or enter gateway URL and token manually. Tests the connection with Ed25519 device authentication.
  3. Wizard — gateway-driven configuration steps (AI provider selection, personality setup, communication channels). Steps are defined by your gateway.
  4. Permissions — reviews Windows system permissions (notifications, camera, microphone, screen capture, location) and links to system settings to grant them.
  5. Chat — meet your agent in a live chat powered by the gateway's web UI.
  6. Ready — summary of available features, option to launch at startup, and a Finish button.

For detailed setup instructions, see docs/SETUP.md. For the full onboarding architecture, see docs/ONBOARDING_WIZARD.md.

License

MIT License - see LICENSE


Formerly known as Moltbot, formerly known as Clawdbot