Skip to content

Commit 98f48c2

Browse files
committed
feat: Add SkippedUpdateTag to settings and enhance update handling
- Introduced SkippedUpdateTag property in SettingsData and SettingsManager to remember skipped updates. - Updated App.xaml.cs to initialize settings before update checks and handle skipped updates. - Enhanced QuickSendDialog to provide detailed error messages and focus handling. - Improved WebSocketClientBase with better auto-reconnect logic and error handling. - Added integration tests for DeviceIdentity payload formats and OpenClawGatewayClient response handling. - Updated SettingsRoundTripTests to validate SkippedUpdateTag persistence.
1 parent c263c5c commit 98f48c2

18 files changed

Lines changed: 1553 additions & 75 deletions

‎AGENTS.md‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# AGENTS.md
2+
3+
## Required Validation After Every Change
4+
5+
All agents working in this repository must run validation after each code change before marking work complete.
6+
7+
Required steps:
8+
9+
1. Run full repo build:
10+
- `./build.ps1`
11+
2. Run shared tests:
12+
- `dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore`
13+
3. Run tray tests:
14+
- `dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore`
15+
16+
If a command fails:
17+
18+
1. Fix the issue.
19+
2. Re-run the failed command.
20+
3. Re-run all required validation commands before completion.
21+
22+
Notes:
23+
24+
- If a build/test is blocked by an environmental lock (for example running executable locking output assemblies), stop/close the locking process and rerun.
25+
- Do not claim completion without reporting validation results.

‎README.md‎

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ A Windows companion suite for [OpenClaw](https://openclaw.ai) - the AI-powered p
1010

1111
## Projects
1212

13-
This monorepo contains three projects:
13+
This monorepo contains four projects:
1414

1515
| Project | Description |
1616
|---------|-------------|
1717
| **OpenClaw.Tray.WinUI** | System tray application (WinUI 3) for quick access to OpenClaw |
1818
| **OpenClaw.Shared** | Shared gateway client library |
19+
| **OpenClaw.Cli** | CLI validator for WebSocket connect/send/probe using tray settings |
1920
| **OpenClaw.CommandPalette** | PowerToys Command Palette extension |
2021

2122
## 🚀 Quick Start
@@ -65,6 +66,24 @@ dotnet build src/OpenClaw.Tray.WinUI -r win-x64 -p:PackageMsix=true # x64 MSI
6566
.\src\OpenClaw.Tray.WinUI\bin\Debug\net10.0-windows10.0.19041.0\win-x64\OpenClaw.Tray.WinUI.exe # x64
6667
```
6768

69+
### Run CLI WebSocket Validator
70+
71+
Use the CLI to validate gateway connectivity and `chat.send` outside the tray UI.
72+
73+
```powershell
74+
# Show help
75+
dotnet run --project src/OpenClaw.Cli -- --help
76+
77+
# Use tray settings from %APPDATA%\OpenClawTray\settings.json and send one message
78+
dotnet run --project src/OpenClaw.Cli -- --message "quick send validation"
79+
80+
# Loop sends and also probe sessions/usage/nodes APIs
81+
dotnet run --project src/OpenClaw.Cli -- --repeat 5 --delay-ms 1000 --probe-read --verbose
82+
83+
# Override gateway URL/token for isolated testing
84+
dotnet run --project src/OpenClaw.Cli -- --url ws://127.0.0.1:18789 --token "<token>" --message "override test"
85+
```
86+
6887
## 📦 OpenClaw.Tray (Molty)
6988

7089
Modern Windows 11-style system tray companion that connects to your local OpenClaw gateway.
@@ -85,6 +104,20 @@ Modern Windows 11-style system tray companion that connects to your local OpenCl
85104
- ⚙️ **Settings** - Full configuration dialog
86105
- 🎯 **First-run experience** - Welcome dialog guides new users
87106

107+
#### Quick Send scope requirement
108+
109+
Quick Send uses the gateway `chat.send` method and requires the operator device to have `operator.write` scope.
110+
111+
If Quick Send fails with `missing scope: operator.write`, Molty now copies identity + remediation guidance to your clipboard, including:
112+
113+
- operator role and `client.id` used by the tray app
114+
- gateway-reported operator device id (if provided)
115+
- currently granted scopes (if provided)
116+
117+
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.
118+
119+
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.
120+
88121
### Menu Sections
89122
- **Status** - Gateway connection status with click-to-view details
90123
- **Sessions** - Active agent sessions with preview and per-session controls

‎build.ps1‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Builds all projects, checks prerequisites, and provides clear guidance.
77
88
.PARAMETER Project
9-
Which project to build: All, Tray, WinUI, Shared, CommandPalette
9+
Which project to build: All, Tray, WinUI, Shared, CommandPalette, Cli
1010
Default: All
1111
1212
.PARAMETER Configuration
@@ -23,7 +23,7 @@
2323
#>
2424

2525
param(
26-
[ValidateSet("All", "Tray", "WinUI", "Shared", "CommandPalette")]
26+
[ValidateSet("All", "Tray", "WinUI", "Shared", "CommandPalette", "Cli")]
2727
[string]$Project = "All",
2828

2929
[ValidateSet("Debug", "Release")]
@@ -187,12 +187,13 @@ function Build-Project($name, $path, $useRid = $false) {
187187

188188
$projects = @{
189189
"Shared" = @{ Path = "src/OpenClaw.Shared/OpenClaw.Shared.csproj"; UseRid = $false }
190+
"Cli" = @{ Path = "src/OpenClaw.Cli/OpenClaw.Cli.csproj"; UseRid = $false }
190191
"Tray" = @{ Path = "src/OpenClaw.Tray.WinUI/OpenClaw.Tray.WinUI.csproj"; UseRid = $true }
191192
"WinUI" = @{ Path = "src/OpenClaw.Tray.WinUI/OpenClaw.Tray.WinUI.csproj"; UseRid = $true }
192193
"CommandPalette" = @{ Path = "src/OpenClaw.CommandPalette/OpenClaw.CommandPalette.csproj"; UseRid = $false }
193194
}
194195

195-
$toBuild = if ($Project -eq "All") { @("Shared", "WinUI") } else { @($Project) }
196+
$toBuild = if ($Project -eq "All") { @("Shared", "Cli", "WinUI") } else { @($Project) }
196197

197198
# Always build Shared first if building other projects
198199
if ($Project -ne "Shared" -and $Project -ne "All" -and $toBuild -notcontains "Shared") {

‎moltbot-windows-hub.slnx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<Solution>
22
<Folder Name="/src/">
3+
<Project Path="src/OpenClaw.Cli/OpenClaw.Cli.csproj" />
34
<Project Path="src/OpenClaw.CommandPalette/OpenClaw.CommandPalette.csproj">
45
<Platform Project="x64" />
56
</Project>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<OutputType>Exe</OutputType>
4+
<TargetFramework>net10.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<ProjectReference Include="..\OpenClaw.Shared\OpenClaw.Shared.csproj" />
11+
</ItemGroup>
12+
</Project>

0 commit comments

Comments
 (0)