- README.md: Fix project table (OpenClaw.Tray → OpenClaw.Tray.WinUI), remove WinForms run command, add system.run.prepare and system.which to capability table and allowCommands JSON, remove '(investigating)' from canvas.a2ui commands - DEVELOPMENT.md: Remove OpenClaw.Tray/ from structure, add OpenClaw.Tray.Tests/, update test counts (88 → 571), fix CI section - build.ps1: Fix broken 'Tray' target to point at WinUI .csproj, remove WinForms from default build and run instructions - docs/VERSIONING.md: Remove reference to deleted OpenClaw.Tray.csproj - docs/TEST_COVERAGE.md: Full rewrite (88 → 571 tests, .NET 9 → 10) - docs/CODE_REVIEW.md: Update project names, test counts, .NET version - docs/WINDOWS_NODE_TESTING.md: Mark system.run as implemented, update capability descriptions - docs/WINDOWS_NODE_ARCHITECTURE.md: Add historical planning note, update current state table (Node mode now implemented) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
4.4 KiB
4.4 KiB
Windows Node Testing Guide
Overview
The Windows Node feature allows the tray app to receive commands from the OpenClaw agent (canvas, screenshots, notifications). This is experimental and must be explicitly enabled in Settings.
How to Enable
- Open the tray app
- Right-click → Settings
- Scroll to "ADVANCED (EXPERIMENTAL)"
- Toggle "Enable Node Mode" ON
- Click Save
What You Can Test Now
1. Settings Toggle
- Verify the toggle appears in Settings under "ADVANCED"
- Verify it saves and persists across app restarts
2. Node Connection
- Enable Node Mode and save
- Watch for "🔌 Node Mode Active" toast notification
- Check logs at
%LOCALAPPDATA%\OpenClawTray\openclaw-tray.logfor:[INFO] Starting Windows Node connection to ws://... [INFO] Node connected, waiting for challenge... [INFO] Sent node registration with X capabilities, Y commands [INFO] Node registered successfully! [INFO] Node status: Connected
3. Screen Capture Notification
- When the agent captures your screen, you should see "📸 Screen Captured" toast
- This is throttled to max once per 10 seconds
What Requires Gateway Support
These features need the gateway to send node.invoke commands:
| Command | Description | Expected Behavior |
|---|---|---|
canvas.present |
Show WebView2 window | Opens floating window with URL or HTML |
canvas.hide |
Hide canvas window | Closes the canvas window |
canvas.eval |
Execute JavaScript | Runs JS in canvas, returns result |
canvas.snapshot |
Capture canvas | Returns base64 PNG of canvas content |
screen.capture |
Take screenshot | Captures screen, shows notification, returns base64 |
screen.list |
List monitors | Returns array of monitor info |
system.notify |
Show notification | Displays toast notification |
camera.list |
Enumerate cameras | Returns device IDs and names |
camera.snap |
Capture photo | Returns base64 image (NV12 fallback) |
Capabilities Advertised
When the node connects, it advertises these capabilities:
canvas- WebView2-based canvas windowscreen- Screen capture via GDIsystem- Notifications, command execution (system.run,system.run.prepare,system.which), exec approval policycamera- MediaCapture photo capture (frame reader fallback)
Security Features
- URL Validation: Canvas blocks
file://,javascript:, localhost, private IPs, IPv6 localhost - Screen Capture Notification: User is notified when screen is captured
- Node Mode Toggle: Must be explicitly enabled by user
- Command Validation: Only alphanumeric commands with dots/hyphens allowed
Troubleshooting
Node doesn't connect
- Check that gateway URL and token are correct in Settings
- Check logs for connection errors
- Verify gateway is running and accessible
No "Node Mode Active" notification
- Ensure Windows notifications are enabled for the app
- Check if notification settings in the app are enabled
Canvas window doesn't appear
- Check logs for
canvas.presentcommand received - Verify URL is not blocked by security validation
Camera permission denied
- If you see "Camera access blocked", enable camera access for desktop apps in Windows Privacy settings
- Packaged MSIX builds will show the system consent prompt automatically
Remaining Work (Roadmap)
system.run + exec approvals✅ Implementedsystem.runwith PowerShell/cmd supportsystem.run.preparepre-flight commandsystem.whichcommand lookupsystem.execApprovalsallowlist flow
- screen.record
- Graphics Capture video recording (MP4/base64)
- camera.clip
- Short webcam video capture (MediaCapture + encoding)
- A2UI end-to-end
- Resolve tool policy/allowlist and validate JSONL rendering
- Packaging & consent prompts
- MSIX packaging with camera/screen capabilities for system prompts
- Test matrix & polish
- Canvas/screen/camera regression tests
- Handle timeouts/disconnects, reduce verbose logging
Files Involved
src/OpenClaw.Shared/WindowsNodeClient.cs- Node protocol clientsrc/OpenClaw.Shared/Capabilities/*.cs- Capability handlerssrc/OpenClaw.Tray.WinUI/Services/NodeService.cs- Orchestrates capabilitiessrc/OpenClaw.Tray.WinUI/Services/ScreenCaptureService.cs- GDI screen capturesrc/OpenClaw.Tray.WinUI/Windows/CanvasWindow.xaml- WebView2 canvas