diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e8bc1b75..7a908010d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,19 +33,19 @@ jobs: run: dotnet restore - name: Build Shared Library - run: dotnet build src/Moltbot.Shared -c Debug + run: dotnet build src/OpenClaw.Shared -c Debug - name: Build Tray App (WinForms) - run: dotnet build src/Moltbot.Tray -c Debug + run: dotnet build src/OpenClaw.Tray -c Debug - name: Build Tray App (WinUI) - run: dotnet build src/Moltbot.Tray.WinUI -c Debug + run: dotnet build src/OpenClaw.Tray.WinUI -c Debug - name: Build Tests - run: dotnet build tests/Moltbot.Shared.Tests -c Debug + run: dotnet build tests/OpenClaw.Shared.Tests -c Debug - name: Run Tests - run: dotnet test tests/Moltbot.Shared.Tests --no-build -c Debug --verbosity normal + run: dotnet test tests/OpenClaw.Shared.Tests --no-build -c Debug --verbosity normal outputs: semVer: ${{ steps.gitversion.outputs.semVer }} @@ -67,13 +67,13 @@ jobs: dotnet-version: 10.0.x - name: Restore WinUI Tray App - run: dotnet restore src/Moltbot.Tray.WinUI -r ${{ matrix.rid }} + run: dotnet restore src/OpenClaw.Tray.WinUI -r ${{ matrix.rid }} - name: Build WinUI Tray App (Release) - run: dotnet build src/Moltbot.Tray.WinUI --no-restore -c Release -r ${{ matrix.rid }} -p:Version=${{ needs.test.outputs.semVer }} + run: dotnet build src/OpenClaw.Tray.WinUI --no-restore -c Release -r ${{ matrix.rid }} -p:Version=${{ needs.test.outputs.semVer }} - name: Publish WinUI Tray App - run: dotnet publish src/Moltbot.Tray.WinUI -c Release -r ${{ matrix.rid }} --self-contained -p:Version=${{ needs.test.outputs.semVer }} -o publish + run: dotnet publish src/OpenClaw.Tray.WinUI -c Release -r ${{ matrix.rid }} --self-contained -p:Version=${{ needs.test.outputs.semVer }} -o publish - name: Azure Login for Signing if: startsWith(github.ref, 'refs/tags/v') @@ -100,7 +100,7 @@ jobs: - name: Upload Tray Artifact uses: actions/upload-artifact@v4 with: - name: moltbot-tray-${{ matrix.rid }} + name: openclaw-tray-${{ matrix.rid }} path: publish/ build-extension: @@ -119,16 +119,16 @@ jobs: dotnet-version: 10.0.x - name: Restore Command Palette Extension - run: dotnet restore src/Moltbot.CommandPalette + run: dotnet restore src/OpenClaw.CommandPalette - name: Build Command Palette Extension - run: dotnet build src/Moltbot.CommandPalette -c Debug -p:Platform=${{ matrix.platform }} + run: dotnet build src/OpenClaw.CommandPalette -c Debug -p:Platform=${{ matrix.platform }} - name: Upload Extension Artifact uses: actions/upload-artifact@v4 with: - name: moltbot-commandpalette-${{ matrix.platform }} - path: src/Moltbot.CommandPalette/bin/${{ matrix.platform }}/Debug/ + name: openclaw-commandpalette-${{ matrix.platform }} + path: src/OpenClaw.CommandPalette/bin/${{ matrix.platform }}/Debug/ release: needs: [test, build, build-extension] @@ -143,32 +143,32 @@ jobs: - name: Download win-x64 tray artifact uses: actions/download-artifact@v4 with: - name: moltbot-tray-win-x64 + name: openclaw-tray-win-x64 path: artifacts/tray-win-x64 - name: Download win-arm64 tray artifact uses: actions/download-artifact@v4 with: - name: moltbot-tray-win-arm64 + name: openclaw-tray-win-arm64 path: artifacts/tray-win-arm64 - name: Download win-x64 cmdpal artifact uses: actions/download-artifact@v4 with: - name: moltbot-commandpalette-x64 + name: openclaw-commandpalette-x64 path: artifacts/cmdpal-x64 - name: Download win-arm64 cmdpal artifact uses: actions/download-artifact@v4 with: - name: moltbot-commandpalette-arm64 + name: openclaw-commandpalette-arm64 path: artifacts/cmdpal-arm64 # Create ZIP files for Updatum auto-update (needs "win-x64" in filename) - name: Create Release ZIPs run: | - Compress-Archive -Path artifacts/tray-win-x64/* -DestinationPath MoltbotTray-${{ needs.test.outputs.majorMinorPatch }}-win-x64.zip - Compress-Archive -Path artifacts/tray-win-arm64/* -DestinationPath MoltbotTray-${{ needs.test.outputs.majorMinorPatch }}-win-arm64.zip + Compress-Archive -Path artifacts/tray-win-x64/* -DestinationPath OpenClawTray-${{ needs.test.outputs.majorMinorPatch }}-win-x64.zip + Compress-Archive -Path artifacts/tray-win-arm64/* -DestinationPath OpenClawTray-${{ needs.test.outputs.majorMinorPatch }}-win-arm64.zip # Inno Setup installer for x64 - name: Install Inno Setup @@ -225,18 +225,18 @@ jobs: with: generate_release_notes: true files: | - Output/MoltbotTray-Setup-x64.exe - Output/MoltbotTray-Setup-arm64.exe - MoltbotTray-${{ needs.test.outputs.majorMinorPatch }}-win-x64.zip - MoltbotTray-${{ needs.test.outputs.majorMinorPatch }}-win-arm64.zip + Output/OpenClawTray-Setup-x64.exe + Output/OpenClawTray-Setup-arm64.exe + OpenClawTray-${{ needs.test.outputs.majorMinorPatch }}-win-x64.zip + OpenClawTray-${{ needs.test.outputs.majorMinorPatch }}-win-arm64.zip body: | - ## Moltbot Windows Hub ${{ github.ref_name }} + ## OpenClaw Windows Hub ${{ github.ref_name }} ### Downloads - - **Installer (x64)**: `MoltbotTray-Setup-x64.exe` - Intel/AMD 64-bit - - **Installer (ARM64)**: `MoltbotTray-Setup-arm64.exe` - Windows on ARM (Surface, etc.) - - **Portable x64**: `MoltbotTray-${{ needs.test.outputs.majorMinorPatch }}-win-x64.zip` - - **Portable ARM64**: `MoltbotTray-${{ needs.test.outputs.majorMinorPatch }}-win-arm64.zip` + - **Installer (x64)**: `OpenClawTray-Setup-x64.exe` - Intel/AMD 64-bit + - **Installer (ARM64)**: `OpenClawTray-Setup-arm64.exe` - Windows on ARM (Surface, etc.) + - **Portable x64**: `OpenClawTray-${{ needs.test.outputs.majorMinorPatch }}-win-x64.zip` + - **Portable ARM64**: `OpenClawTray-${{ needs.test.outputs.majorMinorPatch }}-win-arm64.zip` ### Features - ๐Ÿฆž System tray integration with gateway status @@ -247,7 +247,7 @@ jobs: ### Requirements - Windows 10 version 1903 or later - [WebView2 Runtime](https://developer.microsoft.com/en-us/microsoft-edge/webview2/) - - Moltbot gateway running locally + - OpenClaw gateway running locally - PowerToys (for Command Palette extension) ### Quick Start diff --git a/CODE_REVIEW.md b/CODE_REVIEW.md index e4d11eb03..0dc38dade 100644 --- a/CODE_REVIEW.md +++ b/CODE_REVIEW.md @@ -1,15 +1,15 @@ -# Code Review - Moltbot Windows Hub +# Code Review - OpenClaw Windows Hub ## Overview -This document provides a comprehensive code review of the Moltbot Windows Hub repository, focusing on correctness, security, and best practices. +This document provides a comprehensive code review of the OpenClaw Windows Hub repository, focusing on correctness, security, and best practices. ## Executive Summary โœ… **Overall Assessment: Good** - The codebase is well-structured with proper separation of concerns, event-driven architecture, and correct async/await patterns. Some potential issues were identified around error handling, reconnection logic, and edge cases. ## Project Structure -- **Moltbot.Shared**: WebSocket gateway client and data models (โœ… Cross-platform compatible) -- **Moltbot.Tray**: Windows system tray application (โš ๏ธ Windows-only) -- **Moltbot.CommandPalette**: PowerToys extension (โš ๏ธ Windows-only) +- **OpenClaw.Shared**: WebSocket gateway client and data models (โœ… Cross-platform compatible) +- **OpenClaw.Tray**: Windows system tray application (โš ๏ธ Windows-only) +- **OpenClaw.CommandPalette**: PowerToys extension (โš ๏ธ Windows-only) ## Code Quality Analysis @@ -18,7 +18,7 @@ This document provides a comprehensive code review of the Moltbot Windows Hub re 1. **Architecture & Design Patterns** - Clean separation between networking (Shared) and UI (Tray) - Event-driven architecture with proper use of C# events - - Dependency injection for logging (IMoltbotLogger interface) + - Dependency injection for logging (IOpenClawLogger interface) - IDisposable pattern correctly implemented 2. **Async/Await Usage** @@ -40,7 +40,7 @@ This document provides a comprehensive code review of the Moltbot Windows Hub re #### 1. JSON Parsing Robustness (Medium Priority) -**Location**: `MoltbotGatewayClient.ParseSessions()` (lines 638-717) +**Location**: `OpenClawGatewayClient.ParseSessions()` (lines 638-717) **Issue**: Complex parsing logic with multiple format variations makes it fragile to schema changes. @@ -61,7 +61,7 @@ else if (sessions.ValueKind == JsonValueKind.Object) { /* ... */ } #### 2. Reconnection Loop Edge Cases (Medium Priority) -**Location**: `MoltbotGatewayClient.ReconnectWithBackoffAsync()` (lines 164-185) +**Location**: `OpenClawGatewayClient.ReconnectWithBackoffAsync()` (lines 164-185) **Issue**: Multiple paths can trigger reconnection simultaneously: - Manual reconnect in `CheckHealthAsync()` (line 92) @@ -232,7 +232,7 @@ public async Task SendChatMessageAsync(string message) - `SessionInfo`: Display text, ShortKey for various key formats - `GatewayUsageInfo`: Token formatting (K/M suffixes), cost display -2. **MoltbotGatewayClient Utilities** - Coverage of: +2. **OpenClawGatewayClient Utilities** - Coverage of: - `ClassifyNotification()`: All notification types (health, urgent, email, etc.) - `ClassifyTool()`: All tool-to-activity mappings - `ShortenPath()`: Path truncation edge cases @@ -260,7 +260,7 @@ public async Task SendChatMessageAsync(string message) ### ๐Ÿ› Issue: TruncateLabel Off-by-One Error -**Location**: `MoltbotGatewayClient.TruncateLabel()` line 849 +**Location**: `OpenClawGatewayClient.TruncateLabel()` line 849 **Current Code**: ```csharp @@ -282,7 +282,7 @@ All display text generation in Models.cs is correct: ### โš ๏ธ Cross-Platform Compatibility -**Moltbot.Shared** is mostly cross-platform, but: +**OpenClaw.Shared** is mostly cross-platform, but: - `SessionInfo.ShortKey` uses `Path.GetFileName()` which behaves differently on Windows vs Linux - On Linux, backslashes in paths are NOT treated as separators - **Recommendation**: Explicitly replace backslashes before using `Path.GetFileName()` @@ -349,7 +349,7 @@ if (Key.Contains('/') || Key.Contains('\\')) ## Conclusion -The Moltbot Windows Hub codebase demonstrates good software engineering practices with proper async/await usage, event-driven architecture, and resource management. The main areas for improvement are: +The OpenClaw Windows Hub codebase demonstrates good software engineering practices with proper async/await usage, event-driven architecture, and resource management. The main areas for improvement are: 1. **Testing**: Now addressed with 88 unit tests covering core functionality 2. **Error Handling**: Could be more consistent @@ -364,3 +364,4 @@ All critical functionality has been validated through the new unit test suite. T **Reviewer**: GitHub Copilot Coding Agent **Test Coverage**: 88 tests, all passing **Overall Grade**: B+ (Good, with room for improvement) + diff --git a/README.md b/README.md index 24e740d57..f58fde7f9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# ๐Ÿฆž Moltbot Windows Hub +# ๐Ÿฆž OpenClaw Windows Hub -A Windows companion suite for [Moltbot](https://moltbot.com) - the AI-powered personal assistant. +A Windows companion suite for [OpenClaw](https://openclaw.ai) - the AI-powered personal assistant. *Made with ๐Ÿฆž love by Scott Hanselman and Molty* @@ -14,9 +14,9 @@ This monorepo contains three projects: | Project | Description | |---------|-------------| -| **Moltbot.Tray** | System tray application for quick access to Moltbot | -| **Moltbot.Shared** | Shared gateway client library | -| **Moltbot.CommandPalette** | PowerToys Command Palette extension | +| **OpenClaw.Tray** | System tray application for quick access to OpenClaw | +| **OpenClaw.Shared** | Shared gateway client library | +| **OpenClaw.CommandPalette** | PowerToys Command Palette extension | ## ๐Ÿš€ Quick Start @@ -32,12 +32,12 @@ dotnet build ### Run Tray App ```bash -dotnet run --project src/Moltbot.Tray +dotnet run --project src/OpenClaw.Tray ``` -## ๐Ÿ“ฆ Moltbot.Tray (Molty) +## ๐Ÿ“ฆ OpenClaw.Tray (Molty) -Modern Windows 11-style system tray companion that connects to your local Moltbot gateway. +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 @@ -62,7 +62,7 @@ Modern Windows 11-style system tray companion that connects to your local Moltbo ### Mac Parity Status -Comparing against [moltbot-menubar](https://github.com/magimetal/moltbot-menubar) (macOS Swift menu bar app): +Comparing against [openclaw-menubar](https://github.com/magimetal/openclaw-menubar) (macOS Swift menu bar app): | Feature | Mac | Windows | Notes | |---------|-----|---------|-------| @@ -90,28 +90,28 @@ These features are available in Windows but not in the Mac app: | Toast notifications | Clickable Windows notifications | | Channel control | Start/stop Telegram & WhatsApp | | Modern flyout menu | Windows 11-style with dark/light mode | -| Deep links | `moltbot://` URL scheme with IPC | +| Deep links | `openclaw://` URL scheme with IPC | | First-run welcome | Guided onboarding for new users | | PowerToys integration | Command Palette extension | ### Deep Links -Moltbot registers the `moltbot://` URL scheme for automation and integration: +OpenClaw registers the `openclaw://` URL scheme for automation and integration: | Link | Description | |------|-------------| -| `moltbot://settings` | Open Settings dialog | -| `moltbot://chat` | Open Web Chat window | -| `moltbot://dashboard` | Open Dashboard in browser | -| `moltbot://dashboard/sessions` | Open specific dashboard page | -| `moltbot://send?message=Hello` | Open Quick Send with pre-filled text | -| `moltbot://agent?message=Hello` | Send message directly (with confirmation) | +| `openclaw://settings` | Open Settings dialog | +| `openclaw://chat` | Open Web Chat window | +| `openclaw://dashboard` | Open Dashboard in browser | +| `openclaw://dashboard/sessions` | Open specific dashboard page | +| `openclaw://send?message=Hello` | Open Quick Send with pre-filled text | +| `openclaw://agent?message=Hello` | Send message directly (with confirmation) | Deep links work even when Molty is already running - they're forwarded via IPC. -## ๐Ÿ“ฆ Moltbot.CommandPalette +## ๐Ÿ“ฆ OpenClaw.CommandPalette -PowerToys Command Palette extension for quick Moltbot access. +PowerToys Command Palette extension for quick OpenClaw access. ### Commands - **๐Ÿฆž Open Dashboard** - Launch web dashboard @@ -125,13 +125,13 @@ PowerToys Command Palette extension for quick Moltbot access. 1. Build the solution in Release mode 2. Deploy the MSIX package via Visual Studio 3. Open Command Palette (Win+Alt+Space) -4. Type "Moltbot" to see commands +4. Type "OpenClaw" to see commands -## ๐Ÿ“ฆ Moltbot.Shared +## ๐Ÿ“ฆ OpenClaw.Shared Shared library containing: -- `MoltbotGatewayClient` - WebSocket client for gateway protocol -- `IMoltbotLogger` - Logging interface +- `OpenClawGatewayClient` - WebSocket client for gateway protocol +- `IOpenClawLogger` - Logging interface - Data models (SessionInfo, ChannelHealth, etc.) - Channel control (start/stop channels via gateway) @@ -141,9 +141,9 @@ Shared library containing: ``` moltbot-windows-hub/ โ”œโ”€โ”€ src/ -โ”‚ โ”œโ”€โ”€ Moltbot.Shared/ # Shared gateway library -โ”‚ โ”œโ”€โ”€ Moltbot.Tray/ # System tray app -โ”‚ โ””โ”€โ”€ Moltbot.CommandPalette/ # PowerToys extension +โ”‚ โ”œโ”€โ”€ OpenClaw.Shared/ # Shared gateway library +โ”‚ โ”œโ”€โ”€ OpenClaw.Tray/ # System tray app +โ”‚ โ””โ”€โ”€ OpenClaw.CommandPalette/ # PowerToys extension โ”œโ”€โ”€ docs/ โ”‚ โ””โ”€โ”€ molty1.png # Screenshot โ”œโ”€โ”€ moltbot-windows-hub.sln @@ -155,8 +155,8 @@ moltbot-windows-hub/ ### Configuration Settings are stored in: -- Settings: `%APPDATA%\MoltbotTray\settings.json` -- Logs: `%LOCALAPPDATA%\MoltbotTray\moltbot-tray.log` +- Settings: `%APPDATA%\OpenClawTray\settings.json` +- Logs: `%LOCALAPPDATA%\OpenClawTray\openclaw-tray.log` Default gateway: `ws://localhost:18789` @@ -170,3 +170,8 @@ On first run without a token, Molty displays a welcome dialog that: ## License MIT License - see [LICENSE](LICENSE) + +--- + +*Formerly known as Moltbot, formerly known as Clawdbot* + diff --git a/TEST_COVERAGE.md b/TEST_COVERAGE.md index f3d8b1be9..d97da9f56 100644 --- a/TEST_COVERAGE.md +++ b/TEST_COVERAGE.md @@ -1,7 +1,7 @@ # Test Coverage Summary ## Overview -Comprehensive unit test suite added for the Moltbot.Shared library with **88 tests, all passing** โœ… +Comprehensive unit test suite added for the OpenClaw.Shared library with **88 tests, all passing** โœ… ## Test Statistics @@ -47,7 +47,7 @@ Comprehensive unit test suite added for the Moltbot.Shared library with **88 tes - โœ… Combined field formatting - โœ… Empty state handling -### MoltbotGatewayClientTests (20 tests) +### OpenClawGatewayClientTests (20 tests) #### Notification Classification (11 tests) - โœ… Health alerts (blood sugar, glucose, CGM, mg/dl) @@ -161,7 +161,7 @@ This test suite provides: ## Conclusion -The Moltbot.Shared library now has a solid foundation of unit tests covering all critical display logic and utility methods. The test suite is fast, reliable, and cross-platform compatible. Future development can build on this foundation with confidence. +The OpenClaw.Shared library now has a solid foundation of unit tests covering all critical display logic and utility methods. The test suite is fast, reliable, and cross-platform compatible. Future development can build on this foundation with confidence. --- diff --git a/installer.iss b/installer.iss index 310d1c724..cfa12ae39 100644 --- a/installer.iss +++ b/installer.iss @@ -1,8 +1,8 @@ -; Moltbot Tray Inno Setup Script (WinUI version) -#define MyAppName "Moltbot Tray" +; OpenClaw Tray Inno Setup Script (WinUI version) +#define MyAppName "OpenClaw Tray" #define MyAppPublisher "Scott Hanselman" #define MyAppURL "https://github.com/shanselman/moltbot-windows-hub" -#define MyAppExeName "Moltbot.Tray.WinUI.exe" +#define MyAppExeName "OpenClaw.Tray.WinUI.exe" ; MyAppArch should be passed via /DMyAppArch=x64 or /DMyAppArch=arm64 #ifndef MyAppArch @@ -17,15 +17,15 @@ AppPublisher={#MyAppPublisher} AppPublisherURL={#MyAppURL} AppSupportURL=https://github.com/shanselman/moltbot-windows-hub/issues AppUpdatesURL=https://github.com/shanselman/moltbot-windows-hub/releases -DefaultDirName={localappdata}\MoltbotTray +DefaultDirName={localappdata}\OpenClawTray DefaultGroupName={#MyAppName} DisableProgramGroupPage=yes -OutputBaseFilename=MoltbotTray-Setup-{#MyAppArch} +OutputBaseFilename=OpenClawTray-Setup-{#MyAppArch} Compression=lzma SolidCompression=yes WizardStyle=modern PrivilegesRequired=lowest -SetupIconFile=src\Moltbot.Tray.WinUI\Assets\moltbot.ico +SetupIconFile=src\OpenClaw.Tray.WinUI\Assets\openclaw.ico UninstallDisplayIcon={app}\{#MyAppExeName} #if MyAppArch == "arm64" ArchitecturesInstallIn64BitMode=arm64 @@ -45,7 +45,7 @@ Name: "english"; MessagesFile: "compiler:Default.isl" [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked -Name: "startupicon"; Description: "Start Moltbot Tray when Windows starts"; GroupDescription: "Startup:"; Flags: unchecked +Name: "startupicon"; Description: "Start OpenClaw Tray when Windows starts"; GroupDescription: "Startup:"; Flags: unchecked Name: "cmdpalette"; Description: "Install PowerToys Command Palette extension"; GroupDescription: "Integrations:"; Flags: unchecked [Files] @@ -67,4 +67,4 @@ Filename: "powershell.exe"; Parameters: "-ExecutionPolicy Bypass -Command ""Add- [UninstallRun] ; Unregister Command Palette extension on uninstall -Filename: "powershell.exe"; Parameters: "-ExecutionPolicy Bypass -Command ""Get-AppxPackage -Name '*Moltbot*' | Remove-AppxPackage"""; Flags: runhidden +Filename: "powershell.exe"; Parameters: "-ExecutionPolicy Bypass -Command ""Get-AppxPackage -Name '*OpenClaw*' | Remove-AppxPackage"""; Flags: runhidden diff --git a/moltbot-windows-hub.slnx b/moltbot-windows-hub.slnx index fd6a737f8..a4c90b8fa 100644 --- a/moltbot-windows-hub.slnx +++ b/moltbot-windows-hub.slnx @@ -1,10 +1,10 @@ - + - - - + + + diff --git a/src/Moltbot.CommandPalette/Assets/LockScreenLogo.scale-200.png b/src/OpenClaw.CommandPalette/Assets/LockScreenLogo.scale-200.png similarity index 100% rename from src/Moltbot.CommandPalette/Assets/LockScreenLogo.scale-200.png rename to src/OpenClaw.CommandPalette/Assets/LockScreenLogo.scale-200.png diff --git a/src/Moltbot.CommandPalette/Assets/SplashScreen.scale-200.png b/src/OpenClaw.CommandPalette/Assets/SplashScreen.scale-200.png similarity index 100% rename from src/Moltbot.CommandPalette/Assets/SplashScreen.scale-200.png rename to src/OpenClaw.CommandPalette/Assets/SplashScreen.scale-200.png diff --git a/src/Moltbot.CommandPalette/Assets/Square150x150Logo.scale-200.png b/src/OpenClaw.CommandPalette/Assets/Square150x150Logo.scale-200.png similarity index 100% rename from src/Moltbot.CommandPalette/Assets/Square150x150Logo.scale-200.png rename to src/OpenClaw.CommandPalette/Assets/Square150x150Logo.scale-200.png diff --git a/src/Moltbot.CommandPalette/Assets/Square44x44Logo.scale-200.png b/src/OpenClaw.CommandPalette/Assets/Square44x44Logo.scale-200.png similarity index 100% rename from src/Moltbot.CommandPalette/Assets/Square44x44Logo.scale-200.png rename to src/OpenClaw.CommandPalette/Assets/Square44x44Logo.scale-200.png diff --git a/src/Moltbot.CommandPalette/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/src/OpenClaw.CommandPalette/Assets/Square44x44Logo.targetsize-24_altform-unplated.png similarity index 100% rename from src/Moltbot.CommandPalette/Assets/Square44x44Logo.targetsize-24_altform-unplated.png rename to src/OpenClaw.CommandPalette/Assets/Square44x44Logo.targetsize-24_altform-unplated.png diff --git a/src/Moltbot.CommandPalette/Assets/StoreLogo.png b/src/OpenClaw.CommandPalette/Assets/StoreLogo.png similarity index 100% rename from src/Moltbot.CommandPalette/Assets/StoreLogo.png rename to src/OpenClaw.CommandPalette/Assets/StoreLogo.png diff --git a/src/Moltbot.CommandPalette/Assets/Wide310x150Logo.scale-200.png b/src/OpenClaw.CommandPalette/Assets/Wide310x150Logo.scale-200.png similarity index 100% rename from src/Moltbot.CommandPalette/Assets/Wide310x150Logo.scale-200.png rename to src/OpenClaw.CommandPalette/Assets/Wide310x150Logo.scale-200.png diff --git a/src/Moltbot.CommandPalette/Directory.Build.props b/src/OpenClaw.CommandPalette/Directory.Build.props similarity index 100% rename from src/Moltbot.CommandPalette/Directory.Build.props rename to src/OpenClaw.CommandPalette/Directory.Build.props diff --git a/src/Moltbot.CommandPalette/Directory.Packages.props b/src/OpenClaw.CommandPalette/Directory.Packages.props similarity index 100% rename from src/Moltbot.CommandPalette/Directory.Packages.props rename to src/OpenClaw.CommandPalette/Directory.Packages.props diff --git a/src/Moltbot.CommandPalette/Moltbot.CommandPalette.csproj b/src/OpenClaw.CommandPalette/OpenClaw.CommandPalette.csproj similarity index 97% rename from src/Moltbot.CommandPalette/Moltbot.CommandPalette.csproj rename to src/OpenClaw.CommandPalette/OpenClaw.CommandPalette.csproj index 2d6449150..f9e6ca63e 100644 --- a/src/Moltbot.CommandPalette/Moltbot.CommandPalette.csproj +++ b/src/OpenClaw.CommandPalette/OpenClaw.CommandPalette.csproj @@ -1,7 +1,7 @@ WinExe - Moltbot + OpenClaw app.manifest 10.0.26100.68-preview @@ -50,7 +50,7 @@ - + - Moltbot + OpenClaw A Lone Developer Assets\StoreLogo.png @@ -35,8 +35,8 @@ Executable="$targetnametoken$.exe" EntryPoint="$targetentrypoint$"> - - + + @@ -56,8 +56,8 @@ + DisplayName="OpenClaw" + Description="OpenClaw"> diff --git a/src/Moltbot.CommandPalette/Pages/MoltbotPage.cs b/src/OpenClaw.CommandPalette/Pages/OpenClawPage.cs similarity index 60% rename from src/Moltbot.CommandPalette/Pages/MoltbotPage.cs rename to src/OpenClaw.CommandPalette/Pages/OpenClawPage.cs index 165b98fc9..7b4af0965 100644 --- a/src/Moltbot.CommandPalette/Pages/MoltbotPage.cs +++ b/src/OpenClaw.CommandPalette/Pages/OpenClawPage.cs @@ -5,14 +5,14 @@ using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; -namespace Moltbot; +namespace OpenClaw; -internal sealed partial class MoltbotPage : ListPage +internal sealed partial class OpenClawPage : ListPage { - public MoltbotPage() + public OpenClawPage() { Icon = IconHelpers.FromRelativePath("Assets\\StoreLogo.png"); - Title = "Moltbot"; + Title = "OpenClaw"; Name = "Open"; } @@ -22,22 +22,22 @@ public override IListItem[] GetItems() new ListItem(new OpenUrlCommand("http://localhost:18789")) { Title = "๐Ÿฆž Open Dashboard", - Subtitle = "Open Moltbot web dashboard" + Subtitle = "Open OpenClaw web dashboard" }, - new ListItem(new OpenUrlCommand("moltbot://chat")) + new ListItem(new OpenUrlCommand("openclaw://chat")) { Title = "๐Ÿ’ฌ Web Chat", - Subtitle = "Open the Moltbot chat window" + Subtitle = "Open the OpenClaw chat window" }, - new ListItem(new OpenUrlCommand("moltbot://send")) + new ListItem(new OpenUrlCommand("openclaw://send")) { Title = "๐Ÿ“ Quick Send", - Subtitle = "Send a message to Moltbot" + Subtitle = "Send a message to OpenClaw" }, - new ListItem(new OpenUrlCommand("moltbot://settings")) + new ListItem(new OpenUrlCommand("openclaw://settings")) { Title = "โš™๏ธ Settings", - Subtitle = "Configure Moltbot Tray" + Subtitle = "Configure OpenClaw Tray" } ]; } diff --git a/src/Moltbot.CommandPalette/Program.cs b/src/OpenClaw.CommandPalette/Program.cs similarity index 90% rename from src/Moltbot.CommandPalette/Program.cs rename to src/OpenClaw.CommandPalette/Program.cs index fa4c18d29..1c435b1b2 100644 --- a/src/Moltbot.CommandPalette/Program.cs +++ b/src/OpenClaw.CommandPalette/Program.cs @@ -9,7 +9,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Moltbot; +namespace OpenClaw; public class Program { @@ -25,8 +25,8 @@ public static void Main(string[] args) // We are instantiating an extension instance once above, and returning it every time the callback in RegisterExtension below is called. // This makes sure that only one instance of SampleExtension is alive, which is returned every time the host asks for the IExtension object. // If you want to instantiate a new instance each time the host asks, create the new instance inside the delegate. - Moltbot extensionInstance = new(extensionDisposedEvent); - server.RegisterClass(() => extensionInstance); + OpenClaw extensionInstance = new(extensionDisposedEvent); + server.RegisterClass(() => extensionInstance); server.Start(); // This will make the main thread wait until the event is signalled by the extension class. diff --git a/src/Moltbot.CommandPalette/Properties/launchSettings.json b/src/OpenClaw.CommandPalette/Properties/launchSettings.json similarity index 69% rename from src/Moltbot.CommandPalette/Properties/launchSettings.json rename to src/OpenClaw.CommandPalette/Properties/launchSettings.json index 219d366e2..995b59184 100644 --- a/src/Moltbot.CommandPalette/Properties/launchSettings.json +++ b/src/OpenClaw.CommandPalette/Properties/launchSettings.json @@ -1,10 +1,10 @@ { "profiles": { - "Moltbot (Package)": { + "OpenClaw (Package)": { "commandName": "MsixPackage", "doNotLaunchApp": true }, - "Moltbot (Unpackaged)": { + "OpenClaw (Unpackaged)": { "commandName": "Project" } } diff --git a/src/Moltbot.CommandPalette/app.manifest b/src/OpenClaw.CommandPalette/app.manifest similarity index 94% rename from src/Moltbot.CommandPalette/app.manifest rename to src/OpenClaw.CommandPalette/app.manifest index 49ff8a89c..c2317a398 100644 --- a/src/Moltbot.CommandPalette/app.manifest +++ b/src/OpenClaw.CommandPalette/app.manifest @@ -1,6 +1,6 @@ - + diff --git a/src/Moltbot.CommandPalette/nuget.config b/src/OpenClaw.CommandPalette/nuget.config similarity index 100% rename from src/Moltbot.CommandPalette/nuget.config rename to src/OpenClaw.CommandPalette/nuget.config diff --git a/src/Moltbot.Shared/IMoltbotLogger.cs b/src/OpenClaw.Shared/IOpenClawLogger.cs similarity index 86% rename from src/Moltbot.Shared/IMoltbotLogger.cs rename to src/OpenClaw.Shared/IOpenClawLogger.cs index 371e0abb0..5eeb36c48 100644 --- a/src/Moltbot.Shared/IMoltbotLogger.cs +++ b/src/OpenClaw.Shared/IOpenClawLogger.cs @@ -1,10 +1,10 @@ -namespace Moltbot.Shared; +namespace OpenClaw.Shared; /// /// Simple logger interface for the gateway client. /// Implementations can write to file, console, debug output, etc. /// -public interface IMoltbotLogger +public interface IOpenClawLogger { void Info(string message); void Warn(string message); @@ -14,7 +14,7 @@ public interface IMoltbotLogger /// /// Default no-op logger for when logging isn't needed. /// -public class NullLogger : IMoltbotLogger +public class NullLogger : IOpenClawLogger { public static readonly NullLogger Instance = new(); public void Info(string message) { } @@ -25,7 +25,7 @@ public void Error(string message, Exception? ex = null) { } /// /// Console logger for simple debugging. /// -public class ConsoleLogger : IMoltbotLogger +public class ConsoleLogger : IOpenClawLogger { public void Info(string message) => Console.WriteLine($"[INFO] {message}"); public void Warn(string message) => Console.WriteLine($"[WARN] {message}"); diff --git a/src/Moltbot.Shared/Models.cs b/src/OpenClaw.Shared/Models.cs similarity index 98% rename from src/Moltbot.Shared/Models.cs rename to src/OpenClaw.Shared/Models.cs index d7ea7cd7f..3af642c81 100644 --- a/src/Moltbot.Shared/Models.cs +++ b/src/OpenClaw.Shared/Models.cs @@ -1,4 +1,4 @@ -namespace Moltbot.Shared; +namespace OpenClaw.Shared; public enum ConnectionStatus { @@ -50,7 +50,7 @@ public class AgentActivity : $"{(IsMain ? "Main" : "Sub")} ยท {Glyph} {Label}"; } -public class MoltbotNotification +public class OpenClawNotification { public string Title { get; set; } = ""; public string Message { get; set; } = ""; diff --git a/src/Moltbot.Shared/Moltbot.Shared.csproj b/src/OpenClaw.Shared/OpenClaw.Shared.csproj similarity index 81% rename from src/Moltbot.Shared/Moltbot.Shared.csproj rename to src/OpenClaw.Shared/OpenClaw.Shared.csproj index 750e32c90..778cfdba3 100644 --- a/src/Moltbot.Shared/Moltbot.Shared.csproj +++ b/src/OpenClaw.Shared/OpenClaw.Shared.csproj @@ -4,7 +4,7 @@ net9.0;net10.0 enable enable - Moltbot.Shared + OpenClaw.Shared diff --git a/src/Moltbot.Shared/MoltbotGatewayClient.cs b/src/OpenClaw.Shared/OpenClawGatewayClient.cs similarity index 98% rename from src/Moltbot.Shared/MoltbotGatewayClient.cs rename to src/OpenClaw.Shared/OpenClawGatewayClient.cs index 4222be936..b26d28f9e 100644 --- a/src/Moltbot.Shared/MoltbotGatewayClient.cs +++ b/src/OpenClaw.Shared/OpenClawGatewayClient.cs @@ -7,14 +7,14 @@ using System.Threading; using System.Threading.Tasks; -namespace Moltbot.Shared; +namespace OpenClaw.Shared; -public class MoltbotGatewayClient : IDisposable +public class OpenClawGatewayClient : IDisposable { private ClientWebSocket? _webSocket; private readonly string _gatewayUrl; private readonly string _token; - private readonly IMoltbotLogger _logger; + private readonly IOpenClawLogger _logger; private CancellationTokenSource _cts; private bool _disposed; private int _reconnectAttempts; @@ -26,13 +26,13 @@ public class MoltbotGatewayClient : IDisposable // Events public event EventHandler? StatusChanged; - public event EventHandler? NotificationReceived; + public event EventHandler? NotificationReceived; public event EventHandler? ActivityChanged; public event EventHandler? ChannelHealthUpdated; public event EventHandler? SessionsUpdated; public event EventHandler? UsageUpdated; - public MoltbotGatewayClient(string gatewayUrl, string token, IMoltbotLogger? logger = null) + public OpenClawGatewayClient(string gatewayUrl, string token, IOpenClawLogger? logger = null) { _gatewayUrl = gatewayUrl; _token = token; @@ -254,7 +254,7 @@ private async Task SendConnectMessageAsync(string? nonce = null) version = "1.0.0", platform = "windows", mode = "cli", - displayName = "Moltbot Windows Tray" + displayName = "OpenClaw Windows Tray" }, role = "operator", scopes = new[] { "operator.admin", "operator.approvals", "operator.pairing" }, @@ -263,7 +263,7 @@ private async Task SendConnectMessageAsync(string? nonce = null) permissions = new { }, auth = new { token = _token }, locale = "en-US", - userAgent = "moltbot-windows-tray/1.0.0" + userAgent = "openclaw-windows-tray/1.0.0" } }; await SendRawAsync(JsonSerializer.Serialize(msg)); @@ -840,7 +840,7 @@ private void ParseUsage(JsonElement usage) private void EmitNotification(string text) { var (title, type) = ClassifyNotification(text); - NotificationReceived?.Invoke(this, new MoltbotNotification + NotificationReceived?.Invoke(this, new OpenClawNotification { Title = title, Message = text.Length > 200 ? text[..200] + "โ€ฆ" : text, @@ -874,7 +874,7 @@ private static (string title, string type) ClassifyNotification(string text) if (lower.Contains("build") || lower.Contains("ci ") || lower.Contains("deploy")) return ("๐Ÿ”จ Build", "build"); - return ("๐Ÿค– Moltbot", "info"); + return ("๐Ÿค– OpenClaw", "info"); } // --- Utility --- diff --git a/src/Moltbot.Tray.WinUI/App.xaml b/src/OpenClaw.Tray.WinUI/App.xaml similarity index 89% rename from src/Moltbot.Tray.WinUI/App.xaml rename to src/OpenClaw.Tray.WinUI/App.xaml index 5373ccc19..8b7059053 100644 --- a/src/Moltbot.Tray.WinUI/App.xaml +++ b/src/OpenClaw.Tray.WinUI/App.xaml @@ -1,16 +1,16 @@ + xmlns:local="using:OpenClawTray"> - + diff --git a/src/Moltbot.Tray.WinUI/App.xaml.cs b/src/OpenClaw.Tray.WinUI/App.xaml.cs similarity index 96% rename from src/Moltbot.Tray.WinUI/App.xaml.cs rename to src/OpenClaw.Tray.WinUI/App.xaml.cs index 71b81c6a0..955416877 100644 --- a/src/Moltbot.Tray.WinUI/App.xaml.cs +++ b/src/OpenClaw.Tray.WinUI/App.xaml.cs @@ -1,11 +1,11 @@ using Microsoft.Toolkit.Uwp.Notifications; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; -using Moltbot.Shared; -using MoltbotTray.Dialogs; -using MoltbotTray.Helpers; -using MoltbotTray.Services; -using MoltbotTray.Windows; +using OpenClaw.Shared; +using OpenClawTray.Dialogs; +using OpenClawTray.Helpers; +using OpenClawTray.Services; +using OpenClawTray.Windows; using System; using System.Collections.Generic; using System.Diagnostics; @@ -18,20 +18,20 @@ using Updatum; using WinUIEx; -namespace MoltbotTray; +namespace OpenClawTray; public partial class App : Application { - private const string PipeName = "MoltbotTray-DeepLink"; + private const string PipeName = "OpenClawTray-DeepLink"; internal static readonly UpdatumManager AppUpdater = new("shanselman", "moltbot-windows-hub") { FetchOnlyLatestRelease = true, - InstallUpdateSingleFileExecutableName = "Moltbot.Tray.WinUI", + InstallUpdateSingleFileExecutableName = "OpenClaw.Tray.WinUI", }; private TrayIcon? _trayIcon; - private MoltbotGatewayClient? _gatewayClient; + private OpenClawGatewayClient? _gatewayClient; private SettingsManager? _settings; private GlobalHotkeyService? _globalHotkey; private System.Timers.Timer? _healthCheckTimer; @@ -63,7 +63,7 @@ public partial class App : Application private string[]? _startupArgs; private static readonly string CrashLogPath = Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), - "MoltbotTray", "crash.log"); + "OpenClawTray", "crash.log"); public App() { @@ -112,11 +112,11 @@ protected override async void OnLaunched(LaunchActivatedEventArgs args) _dispatcherQueue = Microsoft.UI.Dispatching.DispatcherQueue.GetForCurrentThread(); // Single instance check - keep mutex alive for app lifetime - _mutex = new Mutex(true, "MoltbotTray", out bool createdNew); + _mutex = new Mutex(true, "OpenClawTray", out bool createdNew); if (!createdNew) { // Forward deep link args to running instance - if (_startupArgs.Length > 1 && _startupArgs[1].StartsWith("moltbot://", StringComparison.OrdinalIgnoreCase)) + if (_startupArgs.Length > 1 && _startupArgs[1].StartsWith("openclaw://", StringComparison.OrdinalIgnoreCase)) { SendDeepLinkToRunningInstance(_startupArgs[1]); } @@ -168,7 +168,7 @@ protected override async void OnLaunched(LaunchActivatedEventArgs args) } // Process startup deep link - if (_startupArgs.Length > 1 && _startupArgs[1].StartsWith("moltbot://", StringComparison.OrdinalIgnoreCase)) + if (_startupArgs.Length > 1 && _startupArgs[1].StartsWith("openclaw://", StringComparison.OrdinalIgnoreCase)) { HandleDeepLink(_startupArgs[1]); } @@ -179,7 +179,7 @@ protected override async void OnLaunched(LaunchActivatedEventArgs args) private void InitializeTrayIcon() { var iconPath = IconHelper.GetStatusIconPath(ConnectionStatus.Disconnected); - _trayIcon = new TrayIcon(1, iconPath, "Moltbot Tray โ€” Disconnected"); + _trayIcon = new TrayIcon(1, iconPath, "OpenClaw Tray โ€” Disconnected"); _trayIcon.IsVisible = true; _trayIcon.Selected += OnTrayIconSelected; _trayIcon.ContextMenu += OnTrayContextMenu; @@ -299,7 +299,7 @@ private void BuildTrayMenuPopup(TrayMenuWindow menu) menu.AddMenuItem($"Status: {_currentStatus}", statusIcon, "status"); // Activity (if any) - if (_currentActivity != null && _currentActivity.Kind != Moltbot.Shared.ActivityKind.Idle) + if (_currentActivity != null && _currentActivity.Kind != OpenClaw.Shared.ActivityKind.Idle) { menu.AddMenuItem(_currentActivity.DisplayText, _currentActivity.Glyph, "", isEnabled: false); } @@ -394,7 +394,7 @@ private void BuildTrayMenu(MenuFlyout flyout) // Brand header var brandItem = new MenuFlyoutItem { - Text = "๐Ÿฆž Moltbot Tray", + Text = "๐Ÿฆž OpenClaw Tray", IsEnabled = false }; flyout.Items.Add(brandItem); @@ -416,7 +416,7 @@ private void BuildTrayMenu(MenuFlyout flyout) flyout.Items.Add(statusItem); // Activity (if any) - if (_currentActivity != null && _currentActivity.Kind != Moltbot.Shared.ActivityKind.Idle) + if (_currentActivity != null && _currentActivity.Kind != OpenClaw.Shared.ActivityKind.Idle) { var activityItem = new MenuFlyoutItem { @@ -545,7 +545,7 @@ private void InitializeGatewayClient() // Unsubscribe from old client if exists UnsubscribeGatewayEvents(); - _gatewayClient = new MoltbotGatewayClient(_settings.GatewayUrl, _settings.Token, new AppLogger()); + _gatewayClient = new OpenClawGatewayClient(_settings.GatewayUrl, _settings.Token, new AppLogger()); _gatewayClient.StatusChanged += OnConnectionStatusChanged; _gatewayClient.ActivityChanged += OnActivityChanged; _gatewayClient.NotificationReceived += OnNotificationReceived; @@ -628,7 +628,7 @@ private void OnUsageUpdated(object? sender, GatewayUsageInfo usage) _lastUsage = usage; } - private void OnNotificationReceived(object? sender, MoltbotNotification notification) + private void OnNotificationReceived(object? sender, OpenClawNotification notification) { if (_settings?.ShowNotifications != true) return; if (!ShouldShowNotification(notification)) return; @@ -645,7 +645,7 @@ private void OnNotificationReceived(object? sender, MoltbotNotification notifica try { var builder = new ToastContentBuilder() - .AddText(notification.Title ?? "Moltbot") + .AddText(notification.Title ?? "OpenClaw") .AddText(notification.Message); builder.Show(); @@ -656,7 +656,7 @@ private void OnNotificationReceived(object? sender, MoltbotNotification notifica } } - private bool ShouldShowNotification(MoltbotNotification notification) + private bool ShouldShowNotification(OpenClawNotification notification) { if (_settings == null) return true; @@ -731,13 +731,13 @@ private void UpdateTrayIcon() if (_trayIcon == null) return; var status = _currentStatus; - if (_currentActivity != null && _currentActivity.Kind != Moltbot.Shared.ActivityKind.Idle) + if (_currentActivity != null && _currentActivity.Kind != OpenClaw.Shared.ActivityKind.Idle) { status = ConnectionStatus.Connecting; // Use connecting icon for activity } var iconPath = IconHelper.GetStatusIconPath(status); - var tooltip = $"Moltbot Tray โ€” {_currentStatus}"; + var tooltip = $"OpenClaw Tray โ€” {_currentStatus}"; if (_currentActivity != null && !string.IsNullOrEmpty(_currentActivity.DisplayText)) { @@ -1144,7 +1144,7 @@ private void ExitApplication() Microsoft.UI.Dispatching.DispatcherQueue.GetForCurrentThread(); } -internal class AppLogger : IMoltbotLogger +internal class AppLogger : IOpenClawLogger { public void Info(string message) => Logger.Info(message); public void Warn(string message) => Logger.Warn(message); diff --git a/src/Moltbot.Tray.WinUI/Assets/moltbot.ico b/src/OpenClaw.Tray.WinUI/Assets/openclaw.ico similarity index 100% rename from src/Moltbot.Tray.WinUI/Assets/moltbot.ico rename to src/OpenClaw.Tray.WinUI/Assets/openclaw.ico diff --git a/src/Moltbot.Tray.WinUI/Dialogs/DownloadProgressDialog.cs b/src/OpenClaw.Tray.WinUI/Dialogs/DownloadProgressDialog.cs similarity index 96% rename from src/Moltbot.Tray.WinUI/Dialogs/DownloadProgressDialog.cs rename to src/OpenClaw.Tray.WinUI/Dialogs/DownloadProgressDialog.cs index 1315dc4ca..1839afd47 100644 --- a/src/Moltbot.Tray.WinUI/Dialogs/DownloadProgressDialog.cs +++ b/src/OpenClaw.Tray.WinUI/Dialogs/DownloadProgressDialog.cs @@ -3,7 +3,7 @@ using Microsoft.UI.Xaml.Media; using Updatum; -namespace MoltbotTray.Dialogs; +namespace OpenClawTray.Dialogs; public sealed class DownloadProgressDialog { diff --git a/src/Moltbot.Tray.WinUI/Dialogs/QuickSendDialog.cs b/src/OpenClaw.Tray.WinUI/Dialogs/QuickSendDialog.cs similarity index 91% rename from src/Moltbot.Tray.WinUI/Dialogs/QuickSendDialog.cs rename to src/OpenClaw.Tray.WinUI/Dialogs/QuickSendDialog.cs index fe0e23a30..8c50030a6 100644 --- a/src/Moltbot.Tray.WinUI/Dialogs/QuickSendDialog.cs +++ b/src/OpenClaw.Tray.WinUI/Dialogs/QuickSendDialog.cs @@ -2,32 +2,32 @@ using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Input; using Microsoft.UI.Xaml.Media; -using Moltbot.Shared; -using MoltbotTray.Helpers; -using MoltbotTray.Services; +using OpenClaw.Shared; +using OpenClawTray.Helpers; +using OpenClawTray.Services; using System; using System.Threading.Tasks; using WinUIEx; -namespace MoltbotTray.Dialogs; +namespace OpenClawTray.Dialogs; /// -/// Quick send dialog for sending messages to Moltbot. +/// Quick send dialog for sending messages to OpenClaw. /// public sealed class QuickSendDialog : WindowEx { - private readonly MoltbotGatewayClient _client; + private readonly OpenClawGatewayClient _client; private readonly TextBox _messageTextBox; private readonly Button _sendButton; private readonly TextBlock _statusText; private bool _isSending; - public QuickSendDialog(MoltbotGatewayClient client, string? prefillMessage = null) + public QuickSendDialog(OpenClawGatewayClient client, string? prefillMessage = null) { _client = client; // Window setup - Title = "Quick Send โ€” Moltbot"; + Title = "Settings โ€” OpenClaw Tray"; this.SetWindowSize(400, 200); this.CenterOnScreen(); this.SetIcon(IconHelper.GetStatusIconPath(ConnectionStatus.Connected)); diff --git a/src/Moltbot.Tray.WinUI/Dialogs/UpdateDialog.cs b/src/OpenClaw.Tray.WinUI/Dialogs/UpdateDialog.cs similarity index 98% rename from src/Moltbot.Tray.WinUI/Dialogs/UpdateDialog.cs rename to src/OpenClaw.Tray.WinUI/Dialogs/UpdateDialog.cs index 6274d567e..8782eed15 100644 --- a/src/Moltbot.Tray.WinUI/Dialogs/UpdateDialog.cs +++ b/src/OpenClaw.Tray.WinUI/Dialogs/UpdateDialog.cs @@ -4,7 +4,7 @@ using System; using System.Threading.Tasks; -namespace MoltbotTray.Dialogs; +namespace OpenClawTray.Dialogs; public enum UpdateDialogResult { diff --git a/src/Moltbot.Tray.WinUI/Dialogs/WelcomeDialog.cs b/src/OpenClaw.Tray.WinUI/Dialogs/WelcomeDialog.cs similarity index 92% rename from src/Moltbot.Tray.WinUI/Dialogs/WelcomeDialog.cs rename to src/OpenClaw.Tray.WinUI/Dialogs/WelcomeDialog.cs index a04d48052..c8869a621 100644 --- a/src/Moltbot.Tray.WinUI/Dialogs/WelcomeDialog.cs +++ b/src/OpenClaw.Tray.WinUI/Dialogs/WelcomeDialog.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; using WinUIEx; -namespace MoltbotTray.Dialogs; +namespace OpenClawTray.Dialogs; /// /// First-run welcome dialog for new users. @@ -17,10 +17,10 @@ public sealed class WelcomeDialog : WindowEx public WelcomeDialog() { - Title = "Welcome to Moltbot"; + Title = "Welcome to OpenClaw"; this.SetWindowSize(480, 440); this.CenterOnScreen(); - this.SetIcon("Assets\\moltbot.ico"); + this.SetIcon("Assets\\openclaw.ico"); // Apply Mica backdrop for modern Windows 11 look SystemBackdrop = new MicaBackdrop(); @@ -49,7 +49,7 @@ public WelcomeDialog() }); headerPanel.Children.Add(new TextBlock { - Text = "Welcome to Moltbot!", + Text = "Welcome to OpenClaw!", Style = (Style)Application.Current.Resources["TitleTextBlockStyle"], VerticalAlignment = VerticalAlignment.Center }); @@ -61,7 +61,7 @@ public WelcomeDialog() content.Children.Add(new TextBlock { - Text = "Moltbot Tray is your Windows companion for Moltbot, the AI-powered personal assistant.", + Text = "OpenClaw Tray is your Windows companion for OpenClaw, the AI-powered personal assistant.", TextWrapping = TextWrapping.Wrap }); @@ -73,7 +73,7 @@ public WelcomeDialog() }); var bulletList = new StackPanel { Spacing = 4, Margin = new Thickness(16, 0, 0, 0) }; - bulletList.Children.Add(new TextBlock { Text = "โ€ข A running Moltbot gateway" }); + bulletList.Children.Add(new TextBlock { Text = "โ€ข A running OpenClaw gateway" }); bulletList.Children.Add(new TextBlock { Text = "โ€ข Your API token from the dashboard" }); gettingStarted.Children.Add(bulletList); content.Children.Add(gettingStarted); diff --git a/src/Moltbot.Tray.WinUI/Helpers/BackdropHelper.cs b/src/OpenClaw.Tray.WinUI/Helpers/BackdropHelper.cs similarity index 99% rename from src/Moltbot.Tray.WinUI/Helpers/BackdropHelper.cs rename to src/OpenClaw.Tray.WinUI/Helpers/BackdropHelper.cs index 102876ce2..22d02a0c8 100644 --- a/src/Moltbot.Tray.WinUI/Helpers/BackdropHelper.cs +++ b/src/OpenClaw.Tray.WinUI/Helpers/BackdropHelper.cs @@ -3,7 +3,7 @@ using System.Runtime.InteropServices; using WinRT; -namespace MoltbotTray.Helpers; +namespace OpenClawTray.Helpers; /// /// Helper class to apply Mica backdrop with IsInputActive always true. diff --git a/src/Moltbot.Tray.WinUI/Helpers/IconHelper.cs b/src/OpenClaw.Tray.WinUI/Helpers/IconHelper.cs similarity index 96% rename from src/Moltbot.Tray.WinUI/Helpers/IconHelper.cs rename to src/OpenClaw.Tray.WinUI/Helpers/IconHelper.cs index f77e4aaca..d2181cd06 100644 --- a/src/Moltbot.Tray.WinUI/Helpers/IconHelper.cs +++ b/src/OpenClaw.Tray.WinUI/Helpers/IconHelper.cs @@ -1,10 +1,10 @@ -using Moltbot.Shared; +using OpenClaw.Shared; using System; using System.Drawing; using System.IO; using System.Runtime.InteropServices; -namespace MoltbotTray.Helpers; +namespace OpenClawTray.Helpers; /// /// Provides icon resources for the tray application. @@ -37,7 +37,7 @@ public static string GetStatusIconPath(ConnectionStatus status) // If specific icon doesn't exist, fall back to main icon if (!File.Exists(path)) { - path = Path.Combine(AssetsPath, "moltbot.ico"); + path = Path.Combine(AssetsPath, "openclaw.ico"); } return path; @@ -58,7 +58,7 @@ public static Icon GetAppIcon() { if (_appIcon != null) return _appIcon; - var iconPath = Path.Combine(AssetsPath, "moltbot.ico"); + var iconPath = Path.Combine(AssetsPath, "openclaw.ico"); if (File.Exists(iconPath)) { _appIcon = new Icon(iconPath); diff --git a/src/Moltbot.Tray.WinUI/Helpers/ThemeHelper.cs b/src/OpenClaw.Tray.WinUI/Helpers/ThemeHelper.cs similarity index 97% rename from src/Moltbot.Tray.WinUI/Helpers/ThemeHelper.cs rename to src/OpenClaw.Tray.WinUI/Helpers/ThemeHelper.cs index f1e0215d5..df3c018c3 100644 --- a/src/Moltbot.Tray.WinUI/Helpers/ThemeHelper.cs +++ b/src/OpenClaw.Tray.WinUI/Helpers/ThemeHelper.cs @@ -2,7 +2,7 @@ using Microsoft.Win32; using Windows.UI; -namespace MoltbotTray.Helpers; +namespace OpenClawTray.Helpers; /// /// Helpers for detecting and applying Windows theme (dark/light mode). diff --git a/src/Moltbot.Tray.WinUI/Moltbot.Tray.WinUI.csproj b/src/OpenClaw.Tray.WinUI/OpenClaw.Tray.WinUI.csproj similarity index 86% rename from src/Moltbot.Tray.WinUI/Moltbot.Tray.WinUI.csproj rename to src/OpenClaw.Tray.WinUI/OpenClaw.Tray.WinUI.csproj index 25ccf7b51..242589eeb 100644 --- a/src/Moltbot.Tray.WinUI/Moltbot.Tray.WinUI.csproj +++ b/src/OpenClaw.Tray.WinUI/OpenClaw.Tray.WinUI.csproj @@ -8,8 +8,8 @@ enable None true - Assets\moltbot.ico - MoltbotTray + Assets\openclaw.ico + OpenClawTray app.manifest @@ -19,7 +19,7 @@ - + diff --git a/src/Moltbot.Tray.WinUI/Services/AutoStartManager.cs b/src/OpenClaw.Tray.WinUI/Services/AutoStartManager.cs similarity index 93% rename from src/Moltbot.Tray.WinUI/Services/AutoStartManager.cs rename to src/OpenClaw.Tray.WinUI/Services/AutoStartManager.cs index 3ad411ecf..1e0c641cf 100644 --- a/src/Moltbot.Tray.WinUI/Services/AutoStartManager.cs +++ b/src/OpenClaw.Tray.WinUI/Services/AutoStartManager.cs @@ -1,7 +1,7 @@ using Microsoft.Win32; using System; -namespace MoltbotTray.Services; +namespace OpenClawTray.Services; /// /// Manages Windows auto-start registry entries. @@ -9,7 +9,7 @@ namespace MoltbotTray.Services; public static class AutoStartManager { private const string RegistryKey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; - private const string AppName = "MoltbotTray"; + private const string AppName = "OpenClawTray"; public static bool IsAutoStartEnabled() { diff --git a/src/Moltbot.Tray.WinUI/Services/DeepLinkHandler.cs b/src/OpenClaw.Tray.WinUI/Services/DeepLinkHandler.cs similarity index 87% rename from src/Moltbot.Tray.WinUI/Services/DeepLinkHandler.cs rename to src/OpenClaw.Tray.WinUI/Services/DeepLinkHandler.cs index 10b946fbd..ac00e749d 100644 --- a/src/Moltbot.Tray.WinUI/Services/DeepLinkHandler.cs +++ b/src/OpenClaw.Tray.WinUI/Services/DeepLinkHandler.cs @@ -2,15 +2,15 @@ using System; using System.Threading.Tasks; -namespace MoltbotTray.Services; +namespace OpenClawTray.Services; /// -/// Handles moltbot:// deep link URI scheme registration and processing. +/// Handles openclaw:// deep link URI scheme registration and processing. /// public static class DeepLinkHandler { - private const string UriScheme = "moltbot"; - private const string UriSchemeKey = @"SOFTWARE\Classes\moltbot"; + private const string UriScheme = "openclaw"; + private const string UriSchemeKey = @"SOFTWARE\Classes\openclaw"; public static void RegisterUriScheme() { @@ -19,7 +19,7 @@ public static void RegisterUriScheme() var exePath = Environment.ProcessPath ?? System.Reflection.Assembly.GetExecutingAssembly().Location; using var key = Registry.CurrentUser.CreateSubKey(UriSchemeKey); - key?.SetValue("", "URL:Moltbot Protocol"); + key?.SetValue("", "URL:OpenClaw Protocol"); key?.SetValue("URL Protocol", ""); using var iconKey = key?.CreateSubKey("DefaultIcon"); @@ -28,7 +28,7 @@ public static void RegisterUriScheme() using var commandKey = key?.CreateSubKey(@"shell\open\command"); commandKey?.SetValue("", $"\"{exePath}\" \"%1\""); - Logger.Info("URI scheme registered: moltbot://"); + Logger.Info("URI scheme registered: openclaw://"); } catch (Exception ex) { @@ -38,10 +38,10 @@ public static void RegisterUriScheme() public static void Handle(string uri, DeepLinkActions actions) { - if (!uri.StartsWith("moltbot://", StringComparison.OrdinalIgnoreCase)) + if (!uri.StartsWith("openclaw://", StringComparison.OrdinalIgnoreCase)) return; - var path = uri["moltbot://".Length..].TrimEnd('/'); + var path = uri["openclaw://".Length..].TrimEnd('/'); var queryIndex = path.IndexOf('?'); var query = queryIndex >= 0 ? path[(queryIndex + 1)..] : ""; path = queryIndex >= 0 ? path[..queryIndex] : path; diff --git a/src/Moltbot.Tray.WinUI/Services/GlobalHotkeyService.cs b/src/OpenClaw.Tray.WinUI/Services/GlobalHotkeyService.cs similarity index 97% rename from src/Moltbot.Tray.WinUI/Services/GlobalHotkeyService.cs rename to src/OpenClaw.Tray.WinUI/Services/GlobalHotkeyService.cs index 949f37499..4891a9f39 100644 --- a/src/Moltbot.Tray.WinUI/Services/GlobalHotkeyService.cs +++ b/src/OpenClaw.Tray.WinUI/Services/GlobalHotkeyService.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.InteropServices; -namespace MoltbotTray.Services; +namespace OpenClawTray.Services; /// /// Registers and handles global hotkeys using P/Invoke. @@ -151,13 +151,13 @@ private void MessageLoop() { lpfnWndProc = Marshal.GetFunctionPointerForDelegate(_wndProcDelegate), hInstance = GetModuleHandle(null), - lpszClassName = "MoltbotHotkeyWindow" + lpszClassName = "OpenClawHotkeyWindow" }; RegisterClass(ref wndClass); // Create message-only window (HWND_MESSAGE parent) - _hwnd = CreateWindowEx(0, "MoltbotHotkeyWindow", "", 0, 0, 0, 0, 0, + _hwnd = CreateWindowEx(0, "OpenClawHotkeyWindow", "", 0, 0, 0, 0, 0, new IntPtr(-3), // HWND_MESSAGE IntPtr.Zero, GetModuleHandle(null), IntPtr.Zero); diff --git a/src/Moltbot.Tray.WinUI/Services/Logger.cs b/src/OpenClaw.Tray.WinUI/Services/Logger.cs similarity index 88% rename from src/Moltbot.Tray.WinUI/Services/Logger.cs rename to src/OpenClaw.Tray.WinUI/Services/Logger.cs index 6adda6627..5eadc3be4 100644 --- a/src/Moltbot.Tray.WinUI/Services/Logger.cs +++ b/src/OpenClaw.Tray.WinUI/Services/Logger.cs @@ -1,7 +1,7 @@ using System; using System.IO; -namespace MoltbotTray.Services; +namespace OpenClawTray.Services; /// /// Simple file logger for the tray application. @@ -16,10 +16,10 @@ static Logger() { _logDirectory = Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), - "MoltbotTray"); + "OpenClawTray"); Directory.CreateDirectory(_logDirectory); - _logFilePath = Path.Combine(_logDirectory, "moltbot-tray.log"); + _logFilePath = Path.Combine(_logDirectory, "openclaw-tray.log"); // Rotate log if too large (> 5MB) try @@ -27,7 +27,7 @@ static Logger() var fileInfo = new FileInfo(_logFilePath); if (fileInfo.Exists && fileInfo.Length > 5 * 1024 * 1024) { - var backupPath = Path.Combine(_logDirectory, "moltbot-tray.log.old"); + var backupPath = Path.Combine(_logDirectory, "openclaw-tray.log.old"); if (File.Exists(backupPath)) File.Delete(backupPath); File.Move(_logFilePath, backupPath); } diff --git a/src/Moltbot.Tray.WinUI/Services/NotificationHistoryService.cs b/src/OpenClaw.Tray.WinUI/Services/NotificationHistoryService.cs similarity index 94% rename from src/Moltbot.Tray.WinUI/Services/NotificationHistoryService.cs rename to src/OpenClaw.Tray.WinUI/Services/NotificationHistoryService.cs index f9f9cb581..45021284f 100644 --- a/src/Moltbot.Tray.WinUI/Services/NotificationHistoryService.cs +++ b/src/OpenClaw.Tray.WinUI/Services/NotificationHistoryService.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace MoltbotTray.Services; +namespace OpenClawTray.Services; /// /// Stores notification history in memory with a configurable limit. @@ -20,7 +20,7 @@ public static void AddNotification(GatewayNotification notification) _history.Insert(0, new NotificationHistoryItem { Timestamp = DateTime.Now, - Title = notification.Title ?? "Moltbot", + Title = notification.Title ?? "OpenClaw", Message = notification.Message ?? "", Category = notification.Category, ActionUrl = notification.ActionUrl diff --git a/src/Moltbot.Tray.WinUI/Services/SettingsManager.cs b/src/OpenClaw.Tray.WinUI/Services/SettingsManager.cs similarity index 98% rename from src/Moltbot.Tray.WinUI/Services/SettingsManager.cs rename to src/OpenClaw.Tray.WinUI/Services/SettingsManager.cs index fc8a1f25f..4d455b980 100644 --- a/src/Moltbot.Tray.WinUI/Services/SettingsManager.cs +++ b/src/OpenClaw.Tray.WinUI/Services/SettingsManager.cs @@ -2,7 +2,7 @@ using System.IO; using System.Text.Json; -namespace MoltbotTray.Services; +namespace OpenClawTray.Services; /// /// Manages application settings with JSON persistence. @@ -11,7 +11,7 @@ public class SettingsManager { private static readonly string SettingsDirectory = Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), - "MoltbotTray"); + "OpenClawTray"); private static readonly string SettingsFilePath = Path.Combine(SettingsDirectory, "settings.json"); diff --git a/src/Moltbot.Tray.WinUI/Windows/NotificationHistoryWindow.xaml b/src/OpenClaw.Tray.WinUI/Windows/NotificationHistoryWindow.xaml similarity index 97% rename from src/Moltbot.Tray.WinUI/Windows/NotificationHistoryWindow.xaml rename to src/OpenClaw.Tray.WinUI/Windows/NotificationHistoryWindow.xaml index 5c34b6dcc..04ce0dc1b 100644 --- a/src/Moltbot.Tray.WinUI/Windows/NotificationHistoryWindow.xaml +++ b/src/OpenClaw.Tray.WinUI/Windows/NotificationHistoryWindow.xaml @@ -1,10 +1,10 @@ + Title="Notification History โ€” OpenClaw Tray"> diff --git a/src/Moltbot.Tray.WinUI/Windows/NotificationHistoryWindow.xaml.cs b/src/OpenClaw.Tray.WinUI/Windows/NotificationHistoryWindow.xaml.cs similarity index 96% rename from src/Moltbot.Tray.WinUI/Windows/NotificationHistoryWindow.xaml.cs rename to src/OpenClaw.Tray.WinUI/Windows/NotificationHistoryWindow.xaml.cs index 1c241439d..f64d8e89c 100644 --- a/src/Moltbot.Tray.WinUI/Windows/NotificationHistoryWindow.xaml.cs +++ b/src/OpenClaw.Tray.WinUI/Windows/NotificationHistoryWindow.xaml.cs @@ -1,15 +1,15 @@ using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; -using Moltbot.Shared; -using MoltbotTray.Helpers; -using MoltbotTray.Services; +using OpenClaw.Shared; +using OpenClawTray.Helpers; +using OpenClawTray.Services; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using WinUIEx; -namespace MoltbotTray.Windows; +namespace OpenClawTray.Windows; public sealed partial class NotificationHistoryWindow : WindowEx { diff --git a/src/Moltbot.Tray.WinUI/Windows/SettingsWindow.xaml b/src/OpenClaw.Tray.WinUI/Windows/SettingsWindow.xaml similarity index 97% rename from src/Moltbot.Tray.WinUI/Windows/SettingsWindow.xaml rename to src/OpenClaw.Tray.WinUI/Windows/SettingsWindow.xaml index a63f5f013..e022b1f31 100644 --- a/src/Moltbot.Tray.WinUI/Windows/SettingsWindow.xaml +++ b/src/OpenClaw.Tray.WinUI/Windows/SettingsWindow.xaml @@ -1,10 +1,10 @@ + Title="Settings โ€” OpenClaw Tray"> diff --git a/src/Moltbot.Tray.WinUI/Windows/SettingsWindow.xaml.cs b/src/OpenClaw.Tray.WinUI/Windows/SettingsWindow.xaml.cs similarity index 94% rename from src/Moltbot.Tray.WinUI/Windows/SettingsWindow.xaml.cs rename to src/OpenClaw.Tray.WinUI/Windows/SettingsWindow.xaml.cs index c16e66071..f4b3c7807 100644 --- a/src/Moltbot.Tray.WinUI/Windows/SettingsWindow.xaml.cs +++ b/src/OpenClaw.Tray.WinUI/Windows/SettingsWindow.xaml.cs @@ -1,13 +1,13 @@ using Microsoft.Toolkit.Uwp.Notifications; using Microsoft.UI.Xaml; -using Moltbot.Shared; -using MoltbotTray.Helpers; -using MoltbotTray.Services; +using OpenClaw.Shared; +using OpenClawTray.Helpers; +using OpenClawTray.Services; using System; using System.Threading.Tasks; using WinUIEx; -namespace MoltbotTray.Windows; +namespace OpenClawTray.Windows; public sealed partial class SettingsWindow : WindowEx { @@ -96,7 +96,7 @@ private async void OnTestConnection(object sender, RoutedEventArgs e) try { - var client = new MoltbotGatewayClient( + var client = new OpenClawGatewayClient( GatewayUrlTextBox.Text.Trim(), TokenTextBox.Text.Trim(), new TestLogger()); @@ -145,7 +145,7 @@ private void OnTestNotification(object sender, RoutedEventArgs e) { new ToastContentBuilder() .AddText("Test Notification") - .AddText("This is a test notification from Moltbot Tray.") + .AddText("This is a test notification from OpenClaw Tray.") .Show(); } catch (Exception ex) @@ -166,7 +166,7 @@ private void OnCancel(object sender, RoutedEventArgs e) Close(); } - private class TestLogger : IMoltbotLogger + private class TestLogger : IOpenClawLogger { public void Info(string message) { } public void Warn(string message) { } diff --git a/src/Moltbot.Tray.WinUI/Windows/StatusDetailWindow.xaml b/src/OpenClaw.Tray.WinUI/Windows/StatusDetailWindow.xaml similarity index 98% rename from src/Moltbot.Tray.WinUI/Windows/StatusDetailWindow.xaml rename to src/OpenClaw.Tray.WinUI/Windows/StatusDetailWindow.xaml index 06c6da364..9442cf340 100644 --- a/src/Moltbot.Tray.WinUI/Windows/StatusDetailWindow.xaml +++ b/src/OpenClaw.Tray.WinUI/Windows/StatusDetailWindow.xaml @@ -1,10 +1,10 @@ + Title="Status โ€” OpenClaw Tray"> diff --git a/src/Moltbot.Tray.WinUI/Windows/StatusDetailWindow.xaml.cs b/src/OpenClaw.Tray.WinUI/Windows/StatusDetailWindow.xaml.cs similarity index 97% rename from src/Moltbot.Tray.WinUI/Windows/StatusDetailWindow.xaml.cs rename to src/OpenClaw.Tray.WinUI/Windows/StatusDetailWindow.xaml.cs index 0059beb40..15b16788b 100644 --- a/src/Moltbot.Tray.WinUI/Windows/StatusDetailWindow.xaml.cs +++ b/src/OpenClaw.Tray.WinUI/Windows/StatusDetailWindow.xaml.cs @@ -1,15 +1,15 @@ using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Media; using Microsoft.UI; -using Moltbot.Shared; -using MoltbotTray.Helpers; +using OpenClaw.Shared; +using OpenClawTray.Helpers; using System; using System.Collections.Generic; using System.Linq; using WinUIEx; using Windows.UI; -namespace MoltbotTray.Windows; +namespace OpenClawTray.Windows; public sealed partial class StatusDetailWindow : WindowEx { diff --git a/src/Moltbot.Tray.WinUI/Windows/TrayMenuWindow.xaml b/src/OpenClaw.Tray.WinUI/Windows/TrayMenuWindow.xaml similarity index 91% rename from src/Moltbot.Tray.WinUI/Windows/TrayMenuWindow.xaml rename to src/OpenClaw.Tray.WinUI/Windows/TrayMenuWindow.xaml index 8cddd9251..11828ff6a 100644 --- a/src/Moltbot.Tray.WinUI/Windows/TrayMenuWindow.xaml +++ b/src/OpenClaw.Tray.WinUI/Windows/TrayMenuWindow.xaml @@ -1,10 +1,10 @@ diff --git a/src/Moltbot.Tray.WinUI/Windows/TrayMenuWindow.xaml.cs b/src/OpenClaw.Tray.WinUI/Windows/TrayMenuWindow.xaml.cs similarity index 99% rename from src/Moltbot.Tray.WinUI/Windows/TrayMenuWindow.xaml.cs rename to src/OpenClaw.Tray.WinUI/Windows/TrayMenuWindow.xaml.cs index 3849d7bc3..e942f6c59 100644 --- a/src/Moltbot.Tray.WinUI/Windows/TrayMenuWindow.xaml.cs +++ b/src/OpenClaw.Tray.WinUI/Windows/TrayMenuWindow.xaml.cs @@ -1,12 +1,12 @@ using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Input; -using MoltbotTray.Helpers; +using OpenClawTray.Helpers; using System; using System.Runtime.InteropServices; using WinUIEx; -namespace MoltbotTray.Windows; +namespace OpenClawTray.Windows; /// /// A popup window that displays the tray menu at the cursor position. diff --git a/src/Moltbot.Tray.WinUI/Windows/WebChatWindow.xaml b/src/OpenClaw.Tray.WinUI/Windows/WebChatWindow.xaml similarity index 96% rename from src/Moltbot.Tray.WinUI/Windows/WebChatWindow.xaml rename to src/OpenClaw.Tray.WinUI/Windows/WebChatWindow.xaml index a23f13b99..10b736dce 100644 --- a/src/Moltbot.Tray.WinUI/Windows/WebChatWindow.xaml +++ b/src/OpenClaw.Tray.WinUI/Windows/WebChatWindow.xaml @@ -1,10 +1,10 @@ + Title="OpenClaw Chat"> diff --git a/src/Moltbot.Tray.WinUI/Windows/WebChatWindow.xaml.cs b/src/OpenClaw.Tray.WinUI/Windows/WebChatWindow.xaml.cs similarity index 96% rename from src/Moltbot.Tray.WinUI/Windows/WebChatWindow.xaml.cs rename to src/OpenClaw.Tray.WinUI/Windows/WebChatWindow.xaml.cs index 1112ce983..c12f89d60 100644 --- a/src/Moltbot.Tray.WinUI/Windows/WebChatWindow.xaml.cs +++ b/src/OpenClaw.Tray.WinUI/Windows/WebChatWindow.xaml.cs @@ -1,8 +1,8 @@ using Microsoft.UI.Xaml; using Microsoft.Web.WebView2.Core; -using Moltbot.Shared; -using MoltbotTray.Helpers; -using MoltbotTray.Services; +using OpenClaw.Shared; +using OpenClawTray.Helpers; +using OpenClawTray.Services; using System; using System.Diagnostics; using System.IO; @@ -10,7 +10,7 @@ using WinUIEx; using Windows.Foundation; -namespace MoltbotTray.Windows; +namespace OpenClawTray.Windows; public sealed partial class WebChatWindow : WindowEx { @@ -64,7 +64,7 @@ private async Task InitializeWebViewAsync() // Set up user data folder via environment variable (WinUI 3 workaround) var userDataFolder = Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), - "MoltbotTray", "WebView2"); + "OpenClawTray", "WebView2"); Directory.CreateDirectory(userDataFolder); Environment.SetEnvironmentVariable("WEBVIEW2_USER_DATA_FOLDER", userDataFolder); diff --git a/src/Moltbot.Tray.WinUI/app.manifest b/src/OpenClaw.Tray.WinUI/app.manifest similarity index 91% rename from src/Moltbot.Tray.WinUI/app.manifest rename to src/OpenClaw.Tray.WinUI/app.manifest index 917a80a4c..bee661540 100644 --- a/src/Moltbot.Tray.WinUI/app.manifest +++ b/src/OpenClaw.Tray.WinUI/app.manifest @@ -1,6 +1,6 @@ - + diff --git a/src/Moltbot.Tray/.gitignore b/src/OpenClaw.Tray/.gitignore similarity index 100% rename from src/Moltbot.Tray/.gitignore rename to src/OpenClaw.Tray/.gitignore diff --git a/src/Moltbot.Tray/AutoStartManager.cs b/src/OpenClaw.Tray/AutoStartManager.cs similarity index 94% rename from src/Moltbot.Tray/AutoStartManager.cs rename to src/OpenClaw.Tray/AutoStartManager.cs index ff88a22dc..1d030ef2e 100644 --- a/src/Moltbot.Tray/AutoStartManager.cs +++ b/src/OpenClaw.Tray/AutoStartManager.cs @@ -4,12 +4,12 @@ using System.Reflection; using System.Windows.Forms; -namespace MoltbotTray; +namespace OpenClawTray; public static class AutoStartManager { private const string RegistryKeyPath = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; - private const string ApplicationName = "MoltbotTray"; + private const string ApplicationName = "OpenClawTray"; public static void SetAutoStart(bool enabled) { diff --git a/src/Moltbot.Tray/DEVELOPMENT.md b/src/OpenClaw.Tray/DEVELOPMENT.md similarity index 88% rename from src/Moltbot.Tray/DEVELOPMENT.md rename to src/OpenClaw.Tray/DEVELOPMENT.md index 91b0acdf8..92dac5842 100644 --- a/src/Moltbot.Tray/DEVELOPMENT.md +++ b/src/OpenClaw.Tray/DEVELOPMENT.md @@ -2,7 +2,7 @@ ## Architecture Overview -This Windows system tray application is built with .NET 10 and Windows Forms, designed to be lightweight and efficient while providing seamless integration with the Moltbot gateway. It mirrors the macOS menu bar app's functionality for Windows users. +This Windows system tray application is built with .NET 10 and Windows Forms, designed to be lightweight and efficient while providing seamless integration with the OpenClaw gateway. It mirrors the macOS menu bar app's functionality for Windows users. ### Component Architecture @@ -16,7 +16,7 @@ This Windows system tray application is built with .NET 10 and Windows Forms, de โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ events โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” - โ”‚ MoltbotGatewayClient โ”‚ + โ”‚ OpenClawGatewayClient โ”‚ โ”‚ - WebSocket connection โ”‚ โ”‚ - Protocol v3 handshake โ”‚ โ”‚ - Event parsing โ”‚ @@ -31,11 +31,11 @@ This Windows system tray application is built with .NET 10 and Windows Forms, de |-----------|------|---------| | **Program** | `Program.cs` | Entry point, single-instance mutex, URI scheme registration | | **TrayApplication** | `TrayApplication.cs` | Main `ApplicationContext` managing the tray icon, context menu, and UI event dispatch | -| **MoltbotGatewayClient** | `MoltbotGatewayClient.cs` | WebSocket client implementing gateway protocol v3 with event parsing, session tracking, and usage monitoring | -| **SettingsManager** | `SettingsManager.cs` | JSON-based settings persistence in `%APPDATA%\MoltbotTray\` | +| **OpenClawGatewayClient** | `OpenClawGatewayClient.cs` | WebSocket client implementing gateway protocol v3 with event parsing, session tracking, and usage monitoring | +| **SettingsManager** | `SettingsManager.cs` | JSON-based settings persistence in `%APPDATA%\OpenClawTray\` | | **SettingsDialog** | `SettingsDialog.cs` | Settings UI with URL/token config, test connection (with timeout), and notification preferences | -| **Logger** | `Logger.cs` | Thread-safe file + debug logger with automatic rotation (1MB), writes to `%LOCALAPPDATA%\MoltbotTray\moltbot-tray.log` | -| **DeepLinkHandler** | `DeepLinkHandler.cs` | `Moltbot://` URI scheme registration and processing for cross-app integration | +| **Logger** | `Logger.cs` | Thread-safe file + debug logger with automatic rotation (1MB), writes to `%LOCALAPPDATA%\OpenClawTray\openclaw-tray.log` | +| **DeepLinkHandler** | `DeepLinkHandler.cs` | `openclaw://` URI scheme registration and processing for cross-app integration | | **WebChatForm** | `WebChatForm.cs` | WebView2-based chat panel (singleton) with toolbar, fallback to browser | | **QuickSendDialog** | `QuickSendDialog.cs` | Lightweight dialog for sending messages (supports Ctrl+Enter) | | **StatusDetailForm** | `StatusDetailForm.cs` | Rich status view showing gateway connection, sessions, channels, usage, and app info | @@ -93,7 +93,7 @@ An activity badge (small corner dot) appears during tool execution: ### Settings Storage -Settings are stored as JSON in `%APPDATA%\MoltbotTray\settings.json`: +Settings are stored as JSON in `%APPDATA%\OpenClawTray\settings.json`: ```json { @@ -107,10 +107,10 @@ Settings are stored as JSON in `%APPDATA%\MoltbotTray\settings.json`: ### Deep Links -The app registers `Moltbot://` URI scheme for cross-app integration: +The app registers `openclaw://` URI scheme for cross-app integration: ``` -Moltbot://agent?message=Hello&key=optional-auth-key +openclaw://agent?message=Hello&key=optional-auth-key ``` Without a key, the user is prompted before sending. With a key, the message is sent directly. @@ -166,3 +166,4 @@ gh run list --repo shanselman/moltbot-windows-hub --limit 1 - Single-instance enforced via Mutex (deep link forwarding to running instance TODO) - Tray icon tooltip limited to 63 characters (full detail shown in context menu activity row) + diff --git a/src/Moltbot.Tray/DeepLinkHandler.cs b/src/OpenClaw.Tray/DeepLinkHandler.cs similarity index 81% rename from src/Moltbot.Tray/DeepLinkHandler.cs rename to src/OpenClaw.Tray/DeepLinkHandler.cs index 51d50d218..c5fd51e94 100644 --- a/src/Moltbot.Tray/DeepLinkHandler.cs +++ b/src/OpenClaw.Tray/DeepLinkHandler.cs @@ -1,24 +1,24 @@ using Microsoft.Win32; -using Moltbot.Shared; +using OpenClaw.Shared; using System; using System.Collections.Specialized; using System.Threading.Tasks; using System.Web; using System.Windows.Forms; -namespace MoltbotTray; +namespace OpenClawTray; /// -/// Handles moltbot:// URI scheme registration and processing. -/// Matches macOS deep link support (moltbot://agent?message=...) +/// Handles openclaw:// URI scheme registration and processing. +/// Matches macOS deep link support (openclaw://agent?message=...) /// public static class DeepLinkHandler { - private const string UriScheme = "Moltbot"; - private const string FriendlyName = "Moltbot Agent Command"; + private const string UriScheme = "OpenClaw"; + private const string FriendlyName = "OpenClaw Agent Command"; /// - /// Registers the moltbot:// URI scheme in the Windows registry. + /// Registers the openclaw:// URI scheme in the Windows registry. /// Requires elevation for HKCR, falls back to HKCU. /// public static void RegisterUriScheme() @@ -72,15 +72,15 @@ public static bool TryGetDeepLink(string[] args, out Uri? uri) } /// - /// Processes a moltbot:// deep link. + /// Processes a openclaw:// deep link. /// Supports: - /// moltbot://agent?message=... - /// moltbot://send?message=... (opens Quick Send with pre-filled text) - /// moltbot://dashboard - /// moltbot://chat - /// moltbot://settings + /// openclaw://agent?message=... + /// openclaw://send?message=... (opens Quick Send with pre-filled text) + /// openclaw://dashboard + /// openclaw://chat + /// openclaw://settings /// - public static async Task ProcessDeepLinkAsync(Uri uri, MoltbotGatewayClient client, Action? openDashboard = null, Action? openChat = null, Action? openSettings = null, Action? openQuickSend = null) + public static async Task ProcessDeepLinkAsync(Uri uri, OpenClawGatewayClient client, Action? openDashboard = null, Action? openChat = null, Action? openSettings = null, Action? openQuickSend = null) { Logger.Info($"Processing deep link: {uri}"); @@ -111,7 +111,7 @@ public static async Task ProcessDeepLinkAsync(Uri uri, MoltbotGatewayClient clie } } - private static async Task HandleAgentDeepLinkAsync(NameValueCollection query, MoltbotGatewayClient client) + private static async Task HandleAgentDeepLinkAsync(NameValueCollection query, OpenClawGatewayClient client) { var message = query["message"]; if (string.IsNullOrWhiteSpace(message)) @@ -128,8 +128,8 @@ private static async Task HandleAgentDeepLinkAsync(NameValueCollection query, Mo { var preview = message.Length > 100 ? message[..100] + "โ€ฆ" : message; var result = MessageBox.Show( - $"A deep link wants to send this message to Moltbot:\n\n\"{preview}\"\n\nAllow?", - "Moltbot Deep Link", + $"A deep link wants to send this message to OpenClaw:\n\n\"{preview}\"\n\nAllow?", + "OpenClaw Deep Link", MessageBoxButtons.YesNo, MessageBoxIcon.Question); diff --git a/src/Moltbot.Tray/DownloadProgressDialog.cs b/src/OpenClaw.Tray/DownloadProgressDialog.cs similarity index 96% rename from src/Moltbot.Tray/DownloadProgressDialog.cs rename to src/OpenClaw.Tray/DownloadProgressDialog.cs index b4c3cfa8a..8117e48bb 100644 --- a/src/Moltbot.Tray/DownloadProgressDialog.cs +++ b/src/OpenClaw.Tray/DownloadProgressDialog.cs @@ -4,7 +4,7 @@ using System.Windows.Forms; using Updatum; -namespace MoltbotTray; +namespace OpenClawTray; public class DownloadProgressDialog : ModernForm { @@ -17,7 +17,7 @@ public DownloadProgressDialog(UpdatumManager updater) _updater = updater; _updater.PropertyChanged += UpdaterOnPropertyChanged; - Text = "Downloading Update โ€” Moltbot Tray"; + Text = "Downloading Update โ€” OpenClaw Tray"; Size = new Size(420, 160); ControlBox = false; Icon = IconHelper.GetLobsterIcon(); diff --git a/src/Moltbot.Tray/GlobalHotkey.cs b/src/OpenClaw.Tray/GlobalHotkey.cs similarity index 99% rename from src/Moltbot.Tray/GlobalHotkey.cs rename to src/OpenClaw.Tray/GlobalHotkey.cs index ad2e5e71a..abfe8766c 100644 --- a/src/Moltbot.Tray/GlobalHotkey.cs +++ b/src/OpenClaw.Tray/GlobalHotkey.cs @@ -2,7 +2,7 @@ using System.Runtime.InteropServices; using System.Windows.Forms; -namespace MoltbotTray; +namespace OpenClawTray; /// /// Registers a system-wide hotkey that works even when the app is not focused. diff --git a/src/Moltbot.Tray/IconHelper.cs b/src/OpenClaw.Tray/IconHelper.cs similarity index 99% rename from src/Moltbot.Tray/IconHelper.cs rename to src/OpenClaw.Tray/IconHelper.cs index de3738754..200ac8a61 100644 --- a/src/Moltbot.Tray/IconHelper.cs +++ b/src/OpenClaw.Tray/IconHelper.cs @@ -1,6 +1,6 @@ using System.Drawing; -namespace MoltbotTray; +namespace OpenClawTray; /// /// Shared icon helper for creating the lobster icon used throughout the app. diff --git a/src/Moltbot.Tray/LICENSE b/src/OpenClaw.Tray/LICENSE similarity index 100% rename from src/Moltbot.Tray/LICENSE rename to src/OpenClaw.Tray/LICENSE diff --git a/src/Moltbot.Tray/Logger.cs b/src/OpenClaw.Tray/Logger.cs similarity index 85% rename from src/Moltbot.Tray/Logger.cs rename to src/OpenClaw.Tray/Logger.cs index 9f5b872f0..1b5205f56 100644 --- a/src/Moltbot.Tray/Logger.cs +++ b/src/OpenClaw.Tray/Logger.cs @@ -1,26 +1,26 @@ using System; using System.Diagnostics; using System.IO; -using Moltbot.Shared; +using OpenClaw.Shared; -namespace MoltbotTray; +namespace OpenClawTray; /// /// Simple file + debug logger for troubleshooting. -/// Writes to %LOCALAPPDATA%\MoltbotTray\moltbot-tray.log +/// Writes to %LOCALAPPDATA%\OpenClawTray\openclaw-tray.log /// public static class Logger { private static readonly string LogDir = Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), - "MoltbotTray"); - private static readonly string LogPath = Path.Combine(LogDir, "moltbot-tray.log"); + "OpenClawTray"); + private static readonly string LogPath = Path.Combine(LogDir, "openclaw-tray.log"); private static readonly object Lock = new(); private static bool _initialized; private static StreamWriter? _writer; - /// Get a logger instance that implements IMoltbotLogger for the shared library. - public static IMoltbotLogger Instance { get; } = new LoggerAdapter(); + /// Get a logger instance that implements IOpenClawLogger for the shared library. + public static IOpenClawLogger Instance { get; } = new LoggerAdapter(); public static void Info(string message) => Write("INFO", message); public static void Warn(string message) => Write("WARN", message); @@ -89,8 +89,8 @@ private static void Write(string level, string message) } } - /// Adapter to make the static Logger work with IMoltbotLogger interface. - private class LoggerAdapter : IMoltbotLogger + /// Adapter to make the static Logger work with IOpenClawLogger interface. + private class LoggerAdapter : IOpenClawLogger { public void Info(string message) => Logger.Info(message); public void Warn(string message) => Logger.Warn(message); diff --git a/src/Moltbot.Tray/ModernForm.cs b/src/OpenClaw.Tray/ModernForm.cs similarity index 98% rename from src/Moltbot.Tray/ModernForm.cs rename to src/OpenClaw.Tray/ModernForm.cs index d5549779a..da0c21dd8 100644 --- a/src/Moltbot.Tray/ModernForm.cs +++ b/src/OpenClaw.Tray/ModernForm.cs @@ -5,10 +5,10 @@ using System.Windows.Forms; using Microsoft.Win32; -namespace MoltbotTray; +namespace OpenClawTray; /// -/// Base form with Windows 11 modern styling - dark/light mode, rounded corners, Moltbot branding. +/// Base form with Windows 11 modern styling - dark/light mode, rounded corners, OpenClaw branding. /// Inherit from this for consistent look across all dialogs. /// public class ModernForm : Form @@ -123,7 +123,7 @@ private void ApplyModernStyling() } /// - /// Creates a styled button with Moltbot branding. + /// Creates a styled button with OpenClaw branding. /// protected Button CreateModernButton(string text, bool isPrimary = false) { diff --git a/src/Moltbot.Tray/ModernForm.resx b/src/OpenClaw.Tray/ModernForm.resx similarity index 100% rename from src/Moltbot.Tray/ModernForm.resx rename to src/OpenClaw.Tray/ModernForm.resx diff --git a/src/Moltbot.Tray/ModernTrayMenu.cs b/src/OpenClaw.Tray/ModernTrayMenu.cs similarity index 99% rename from src/Moltbot.Tray/ModernTrayMenu.cs rename to src/OpenClaw.Tray/ModernTrayMenu.cs index 426581970..c8834cb9e 100644 --- a/src/Moltbot.Tray/ModernTrayMenu.cs +++ b/src/OpenClaw.Tray/ModernTrayMenu.cs @@ -5,7 +5,7 @@ using System.Windows.Forms; using Microsoft.Win32; -namespace MoltbotTray; +namespace OpenClawTray; /// /// Modern flyout menu with Windows 11 styling - dark/light mode, rounded corners, acrylic blur. diff --git a/src/Moltbot.Tray/NotificationHistoryForm.cs b/src/OpenClaw.Tray/NotificationHistoryForm.cs similarity index 98% rename from src/Moltbot.Tray/NotificationHistoryForm.cs rename to src/OpenClaw.Tray/NotificationHistoryForm.cs index 9cac87d7d..db6df11c2 100644 --- a/src/Moltbot.Tray/NotificationHistoryForm.cs +++ b/src/OpenClaw.Tray/NotificationHistoryForm.cs @@ -3,7 +3,7 @@ using System.Drawing; using System.Windows.Forms; -namespace MoltbotTray; +namespace OpenClawTray; /// /// Shows recent notification history in a modern styled list view. @@ -58,7 +58,7 @@ private NotificationHistoryForm() private void InitializeComponent() { - Text = "Notification History โ€” Moltbot Tray"; + Text = "Notification History โ€” OpenClaw Tray"; Size = new Size(680, 500); MinimumSize = new Size(480, 340); FormBorderStyle = FormBorderStyle.Sizable; diff --git a/src/Moltbot.Tray/Moltbot.Tray.csproj b/src/OpenClaw.Tray/OpenClaw.Tray.csproj similarity index 78% rename from src/Moltbot.Tray/Moltbot.Tray.csproj rename to src/OpenClaw.Tray/OpenClaw.Tray.csproj index 179f165d8..bc08e1bac 100644 --- a/src/Moltbot.Tray/Moltbot.Tray.csproj +++ b/src/OpenClaw.Tray/OpenClaw.Tray.csproj @@ -8,11 +8,11 @@ enable true MSB3277 - moltbot.ico - Moltbot Windows Tray - Windows system tray companion app for Moltbot + openclaw.ico + OpenClaw Windows Tray + OpenClaw Scott Hanselman - Moltbot Tray + OpenClaw Tray Copyright ยฉ 2026 Scott Hanselman 1.0.0 1.0.0 @@ -23,7 +23,7 @@ - + diff --git a/src/Moltbot.Tray/Program.cs b/src/OpenClaw.Tray/Program.cs similarity index 90% rename from src/Moltbot.Tray/Program.cs rename to src/OpenClaw.Tray/Program.cs index fb1a65a37..185677df3 100644 --- a/src/Moltbot.Tray/Program.cs +++ b/src/OpenClaw.Tray/Program.cs @@ -1,4 +1,4 @@ -using MoltbotTray; +using OpenClawTray; using System; using System.Diagnostics; using System.IO.Pipes; @@ -7,33 +7,33 @@ using System.Windows.Forms; using Updatum; -namespace MoltbotTray; +namespace OpenClawTray; internal static class Program { - private const string PipeName = "MoltbotTray-DeepLink"; + private const string PipeName = "OpenClawTray-DeepLink"; internal static readonly UpdatumManager AppUpdater = new("shanselman", "moltbot-windows-hub") { FetchOnlyLatestRelease = true, - InstallUpdateSingleFileExecutableName = "Moltbot.Tray", + InstallUpdateSingleFileExecutableName = "OpenClaw.Tray", }; [STAThread] static void Main(string[] args) { // Single instance check - using var mutex = new Mutex(true, "MoltbotTray", out bool createdNew); + using var mutex = new Mutex(true, "OpenClawTray", out bool createdNew); if (!createdNew) { // Forward deep link args to running instance via named pipe - if (args.Length > 0 && args[0].StartsWith("moltbot://", StringComparison.OrdinalIgnoreCase)) + if (args.Length > 0 && args[0].StartsWith("openclaw://", StringComparison.OrdinalIgnoreCase)) { SendDeepLinkToRunningInstance(args[0]); } else { - MessageBox.Show("Moltbot Tray is already running.", "Moltbot Tray", + MessageBox.Show("OpenClaw Tray is already running.", "OpenClaw Tray", MessageBoxButtons.OK, MessageBoxIcon.Information); } return; @@ -123,7 +123,7 @@ private static async Task DownloadAndInstallUpdateAsync() } var confirmResult = MessageBox.Show( - "The update has been downloaded. Moltbot Tray will now restart to install the update.\n\nContinue?", + "The update has been downloaded. OpenClaw Tray will now restart to install the update.\n\nContinue?", "Install Update", MessageBoxButtons.YesNo, MessageBoxIcon.Question); @@ -170,7 +170,7 @@ private static void SendDeepLinkToRunningInstance(string uri) catch (Exception ex) { Logger.Warn($"Failed to forward deep link: {ex.Message}"); - MessageBox.Show($"Moltbot Tray is running but couldn't process the deep link.\n\nPlease try again.", + MessageBox.Show($"OpenClaw Tray is running but couldn't process the deep link.\n\nPlease try again.", "Deep Link Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } diff --git a/src/Moltbot.Tray/QuickSendDialog.cs b/src/OpenClaw.Tray/QuickSendDialog.cs similarity index 95% rename from src/Moltbot.Tray/QuickSendDialog.cs rename to src/OpenClaw.Tray/QuickSendDialog.cs index c4b292edb..19100a06d 100644 --- a/src/Moltbot.Tray/QuickSendDialog.cs +++ b/src/OpenClaw.Tray/QuickSendDialog.cs @@ -2,7 +2,7 @@ using System.Drawing; using System.Windows.Forms; -namespace MoltbotTray; +namespace OpenClawTray; public partial class QuickSendDialog : ModernForm { @@ -20,14 +20,14 @@ public QuickSendDialog() private void InitializeComponent() { - Text = "Quick Send โ€” Moltbot"; + Text = "Quick Send โ€” OpenClaw"; Size = new Size(520, 300); ShowInTaskbar = true; TopMost = true; Icon = IconHelper.GetLobsterIcon(); // Header label - var label = CreateModernLabel("Send a message to Moltbot:"); + var label = CreateModernLabel("Send a message to OpenClaw:"); label.Location = new Point(20, 20); label.Font = new Font("Segoe UI", 11F, FontStyle.Bold); label.ForeColor = AccentColor; diff --git a/src/Moltbot.Tray/README.md b/src/OpenClaw.Tray/README.md similarity index 85% rename from src/Moltbot.Tray/README.md rename to src/OpenClaw.Tray/README.md index e64639748..ab8d1b71e 100644 --- a/src/Moltbot.Tray/README.md +++ b/src/OpenClaw.Tray/README.md @@ -1,6 +1,6 @@ -# Moltbot Windows Tray +# OpenClaw Windows Tray -A Windows system tray companion for [Moltbot](https://github.com/Moltbot/Moltbot) โ€” the Windows equivalent of the macOS menu bar app. Provides desktop notifications, embedded chat, live agent activity monitoring, and gateway status tracking. +A Windows system tray companion for [OpenClaw](https://openclaw.ai) โ€” the Windows equivalent of the macOS menu bar app. Provides desktop notifications, embedded chat, live agent activity monitoring, and gateway status tracking. ## Features @@ -56,15 +56,15 @@ A Windows system tray companion for [Moltbot](https://github.com/Moltbot/Moltbot - **Esc** โ€” Cancel Quick Send ### Deep Links -- Registers `Moltbot://` URI scheme -- `Moltbot://agent?message=Hello` sends a message to the agent +- Registers `openclaw://` URI scheme +- `openclaw://agent?message=Hello` sends a message to the agent - Confirmation prompt for safety (bypass with `key` parameter) ### Quality of Life - **ARM64 support** โ€” native builds for Windows on ARM - **Auto-start** via Windows Registry - **Exponential backoff** on reconnect (1s โ†’ 60s) -- **File logging** to `%LOCALAPPDATA%\MoltbotTray\moltbot-tray.log` (with rotation at 1MB) +- **File logging** to `%LOCALAPPDATA%\OpenClawTray\openclaw-tray.log` (with rotation at 1MB) - **Open Log File** menu item for quick debugging - **Single instance** enforcement (mutex) - **Proper GDI handle cleanup** (no icon leaks) @@ -75,14 +75,14 @@ A Windows system tray companion for [Moltbot](https://github.com/Moltbot/Moltbot - Windows 10 version 1903+ (for toast notifications) - .NET 10 Runtime (included in self-contained builds) - [WebView2 Runtime](https://developer.microsoft.com/en-us/microsoft-edge/webview2/) (for chat panel) -- Moltbot gateway running (typically in WSL2) +- OpenClaw gateway running (typically in WSL2) ## Quick Start 1. Download the latest release from [Releases](https://github.com/shanselman/moltbot-windows-hub/releases) - **x64**: For Intel/AMD processors - **arm64**: For Windows on ARM (e.g., Surface Pro X, Snapdragon laptops) -2. Run `MoltbotTray.exe` +2. Run `OpenClawTray.exe` 3. Right-click tray icon โ†’ Settings 4. Enter gateway URL (`ws://localhost:18789`) and your token 5. Done โ€” you'll see the icon turn green when connected @@ -91,9 +91,9 @@ A Windows system tray companion for [Moltbot](https://github.com/Moltbot/Moltbot ```bash # In WSL2: -cat ~/.Moltbot/Moltbot.json | grep token +cat ~/.OpenClaw/OpenClaw.json | grep token # Or: -Moltbot config get gateway.auth.token +OpenClaw config get gateway.auth.token ``` ## Build from Source @@ -122,23 +122,23 @@ dotnet build -p:EnableWindowsTargeting=true -r win-x64 ``` โ”œโ”€โ”€ Program.cs # Entry point, single instance, deep link registration โ”œโ”€โ”€ TrayApplication.cs # Tray icon, menu, event wiring, UI updates -โ”œโ”€โ”€ MoltbotGatewayClient.cs # WebSocket client, protocol v3, event parsing, state tracking +โ”œโ”€โ”€ OpenClawGatewayClient.cs # WebSocket client, protocol v3, event parsing, state tracking โ”œโ”€โ”€ WebChatForm.cs # WebView2 chat panel (singleton, dark mode) โ”œโ”€โ”€ QuickSendDialog.cs # Quick message input (Enter to send, TopMost) โ”œโ”€โ”€ StatusDetailForm.cs # Rich status detail view (dark theme) โ”œโ”€โ”€ NotificationHistoryForm.cs # Scrollable notification history โ”œโ”€โ”€ GlobalHotkey.cs # Ctrl+Alt+Shift+C system-wide hotkey -โ”œโ”€โ”€ DeepLinkHandler.cs # Moltbot:// URI scheme handler +โ”œโ”€โ”€ DeepLinkHandler.cs # openclaw:// URI scheme handler โ”œโ”€โ”€ SettingsManager.cs # JSON config with notification filters โ”œโ”€โ”€ SettingsDialog.cs # Settings UI (connection, startup, notification filters) โ”œโ”€โ”€ AutoStartManager.cs # Windows Registry auto-start โ”œโ”€โ”€ Logger.cs # File + debug logger with rotation -โ””โ”€โ”€ MoltbotTray.csproj # .NET 10, Windows Forms, WebView2 +โ””โ”€โ”€ OpenClawTray.csproj # .NET 10, Windows Forms, WebView2 ``` ## macOS Parity Status -This Windows tray app aims for feature parity with the [Moltbot macOS menu bar app](https://github.com/Moltbot/Moltbot-macos). +This Windows tray app aims for feature parity with the [OpenClaw macOS menu bar app](https://openclaw.ai-macos). | Feature | macOS | Windows | Notes | |---------|:-----:|:-------:|-------| @@ -154,7 +154,7 @@ This Windows tray app aims for feature parity with the [Moltbot macOS menu bar a | Channel health display | โœ… | โœ… | Telegram, WhatsApp status | | Session awareness (main/sub) | โœ… | โœ… | Live session tracking | | Usage/token display | โœ… | โœ… | Input/output/total | -| Deep link URI scheme | โœ… | โœ… | `Moltbot://` | +| Deep link URI scheme | โœ… | โœ… | `openclaw://` | | Global hotkey | โ€” | โœ… | Ctrl+Alt+Shift+C | | Auto-start | โœ… | โœ… | Registry-based | | Quick send | โœ… | โœ… | Fire-and-forget to main session | @@ -171,7 +171,7 @@ This Windows tray app aims for feature parity with the [Moltbot macOS menu bar a ## Settings -Settings are stored in `%APPDATA%\MoltbotTray\settings.json`: +Settings are stored in `%APPDATA%\OpenClawTray\settings.json`: ```json { @@ -195,8 +195,8 @@ Settings are stored in `%APPDATA%\MoltbotTray\settings.json`: ## Troubleshooting **Can't connect?** -- Check gateway: `Moltbot gateway status` in WSL2 -- Verify token matches `~/.Moltbot/Moltbot.json` +- Check gateway: `OpenClaw gateway status` in WSL2 +- Verify token matches `~/.OpenClaw/OpenClaw.json` - Try WSL2 IP directly: `ws://:18789` (`wsl hostname -I`) **No notifications?** @@ -206,7 +206,7 @@ Settings are stored in `%APPDATA%\MoltbotTray\settings.json`: **WebChat blank?** - Install [WebView2 Runtime](https://developer.microsoft.com/en-us/microsoft-edge/webview2/) -- Check logs: `%LOCALAPPDATA%\MoltbotTray\moltbot-tray.log` +- Check logs: `%LOCALAPPDATA%\OpenClawTray\openclaw-tray.log` - Right-click tray โ†’ Open Log File **Global hotkey not working?** @@ -222,5 +222,7 @@ MIT - Built with .NET 10, Windows Forms, and [WebView2](https://developer.microsoft.com/en-us/microsoft-edge/webview2/) - Toast notifications via [Microsoft.Toolkit.Uwp.Notifications](https://github.com/CommunityToolkit/WindowsCommunityToolkit) -- Part of the [Moltbot](https://github.com/Moltbot/Moltbot) ecosystem +- Part of the [OpenClaw](https://openclaw.ai) ecosystem + + diff --git a/src/Moltbot.Tray/SettingsDialog.cs b/src/OpenClaw.Tray/SettingsDialog.cs similarity index 98% rename from src/Moltbot.Tray/SettingsDialog.cs rename to src/OpenClaw.Tray/SettingsDialog.cs index 604b559b3..d688df3c7 100644 --- a/src/Moltbot.Tray/SettingsDialog.cs +++ b/src/OpenClaw.Tray/SettingsDialog.cs @@ -1,10 +1,10 @@ using Microsoft.Toolkit.Uwp.Notifications; -using Moltbot.Shared; +using OpenClaw.Shared; using System; using System.Drawing; using System.Windows.Forms; -namespace MoltbotTray; +namespace OpenClawTray; public partial class SettingsDialog : ModernForm { @@ -42,7 +42,7 @@ public SettingsDialog(SettingsManager settings) private void InitializeComponent() { - Text = "Settings โ€” Moltbot Tray"; + Text = "Settings โ€” OpenClaw Tray"; Size = new Size(480, 600); ShowInTaskbar = false; AutoScroll = false; @@ -215,7 +215,7 @@ private void OnTestNotification(object? sender, EventArgs e) { new ToastContentBuilder() .AddText("๐Ÿฆž Test Notification") - .AddText("This is what a Moltbot notification looks like!") + .AddText("This is what an OpenClaw notification looks like!") .Show(); } catch @@ -282,7 +282,7 @@ private async void OnTestConnection(object? sender, EventArgs e) try { - var testClient = new MoltbotGatewayClient( + var testClient = new OpenClawGatewayClient( _gatewayUrlTextBox.Text.Trim(), _tokenTextBox.Text.Trim()); diff --git a/src/Moltbot.Tray/SettingsManager.cs b/src/OpenClaw.Tray/SettingsManager.cs similarity index 99% rename from src/Moltbot.Tray/SettingsManager.cs rename to src/OpenClaw.Tray/SettingsManager.cs index 57cc98f7f..8975ec7e1 100644 --- a/src/Moltbot.Tray/SettingsManager.cs +++ b/src/OpenClaw.Tray/SettingsManager.cs @@ -3,13 +3,13 @@ using System.IO; using System.Text.Json; -namespace MoltbotTray; +namespace OpenClawTray; public class SettingsManager { private static readonly string SettingsDirectory = Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), - "MoltbotTray"); + "OpenClawTray"); private static readonly string SettingsFile = Path.Combine(SettingsDirectory, "settings.json"); diff --git a/src/Moltbot.Tray/StatusDetailForm.cs b/src/OpenClaw.Tray/StatusDetailForm.cs similarity index 93% rename from src/Moltbot.Tray/StatusDetailForm.cs rename to src/OpenClaw.Tray/StatusDetailForm.cs index 87bcee674..f724643ea 100644 --- a/src/Moltbot.Tray/StatusDetailForm.cs +++ b/src/OpenClaw.Tray/StatusDetailForm.cs @@ -1,10 +1,10 @@ -using Moltbot.Shared; +using OpenClaw.Shared; using System; using System.Drawing; using System.Text; using System.Windows.Forms; -namespace MoltbotTray; +namespace OpenClawTray; /// /// Shows detailed gateway status, sessions, channels, and usage in a rich view. @@ -14,13 +14,13 @@ public class StatusDetailForm : ModernForm private RichTextBox _textBox = null!; private Button _refreshButton = null!; private Button _closeButton = null!; - private readonly MoltbotGatewayClient? _client; + private readonly OpenClawGatewayClient? _client; private readonly SettingsManager? _settings; private readonly ConnectionStatus _status; private static StatusDetailForm? _instance; - public static void ShowOrFocus(MoltbotGatewayClient? client, SettingsManager? settings, ConnectionStatus status) + public static void ShowOrFocus(OpenClawGatewayClient? client, SettingsManager? settings, ConnectionStatus status) { if (_instance != null && !_instance.IsDisposed) { @@ -33,7 +33,7 @@ public static void ShowOrFocus(MoltbotGatewayClient? client, SettingsManager? se _instance.Show(); } - private StatusDetailForm(MoltbotGatewayClient? client, SettingsManager? settings, ConnectionStatus status) + private StatusDetailForm(OpenClawGatewayClient? client, SettingsManager? settings, ConnectionStatus status) { _client = client; _settings = settings; @@ -44,7 +44,7 @@ private StatusDetailForm(MoltbotGatewayClient? client, SettingsManager? settings private void InitializeComponent() { - Text = "Moltbot Status"; + Text = "OpenClaw Status"; Size = new Size(540, 520); MinimumSize = new Size(420, 380); FormBorderStyle = FormBorderStyle.Sizable; @@ -111,7 +111,7 @@ private void RefreshStatus() var sb = new StringBuilder(); // Header - sb.AppendLine("๐Ÿฆž MOLTBOT STATUS"); + sb.AppendLine("๐Ÿฆž OPENCLAW STATUS"); sb.AppendLine(new string('โ”€', 40)); sb.AppendLine(); diff --git a/src/Moltbot.Tray/TrayApplication.cs b/src/OpenClaw.Tray/TrayApplication.cs similarity index 97% rename from src/Moltbot.Tray/TrayApplication.cs rename to src/OpenClaw.Tray/TrayApplication.cs index 6821df60c..b472d349f 100644 --- a/src/Moltbot.Tray/TrayApplication.cs +++ b/src/OpenClaw.Tray/TrayApplication.cs @@ -1,5 +1,5 @@ using Microsoft.Toolkit.Uwp.Notifications; -using Moltbot.Shared; +using OpenClaw.Shared; using System; using System.Collections.Generic; using System.Diagnostics; @@ -9,16 +9,16 @@ using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; -using ActivityKind = Moltbot.Shared.ActivityKind; +using ActivityKind = OpenClaw.Shared.ActivityKind; -namespace MoltbotTray; +namespace OpenClawTray; public class TrayApplication : ApplicationContext { private NotifyIcon? _notifyIcon; private ContextMenuStrip? _contextMenu; private ModernTrayMenu? _modernMenu; - private MoltbotGatewayClient? _gatewayClient; + private OpenClawGatewayClient? _gatewayClient; private SettingsManager? _settings; private System.Windows.Forms.Timer? _healthCheckTimer; private System.Windows.Forms.Timer? _sessionPollTimer; @@ -87,7 +87,7 @@ private void InitializeComponent() _contextMenu = new ContextMenuStrip(); // Title - var titleItem = new ToolStripMenuItem("โšก Moltbot Tray") { Enabled = false }; + var titleItem = new ToolStripMenuItem("โšก OpenClaw Tray") { Enabled = false }; _contextMenu.Items.Add(titleItem); _contextMenu.Items.Add(new ToolStripSeparator()); @@ -143,7 +143,7 @@ private void InitializeComponent() _notifyIcon = new NotifyIcon { Icon = CreateStatusIcon(ConnectionStatus.Disconnected), - Text = "Moltbot Tray โ€” Disconnected", + Text = "OpenClaw Tray โ€” Disconnected", Visible = true }; _notifyIcon.MouseClick += OnTrayIconClick; @@ -398,7 +398,7 @@ private async void InitializeAsync() { try { - _gatewayClient = new MoltbotGatewayClient(_settings!.GatewayUrl, _settings.Token, Logger.Instance); + _gatewayClient = new OpenClawGatewayClient(_settings!.GatewayUrl, _settings.Token, Logger.Instance); _gatewayClient.StatusChanged += OnStatusChanged; _gatewayClient.NotificationReceived += OnNotificationReceived; _gatewayClient.ActivityChanged += OnActivityChanged; @@ -469,7 +469,7 @@ private void OnStatusChanged(object? sender, ConnectionStatus status) _syncContext?.Post(_ => UpdateStatus(status), null); } - private void OnNotificationReceived(object? sender, MoltbotNotification n) + private void OnNotificationReceived(object? sender, OpenClawNotification n) { _syncContext?.Post(_ => ShowNotificationToast(n.Title, n.Message, n.Type), null); } @@ -509,8 +509,8 @@ private void UpdateStatus(ConnectionStatus status) SafeDestroyIcon(oldIcon); var tooltip = _currentActivity?.Kind != ActivityKind.Idle && !string.IsNullOrEmpty(_currentActivity?.DisplayText) - ? $"Moltbot โ€” {_currentActivity.DisplayText}" - : $"Moltbot โ€” {status}"; + ? $"OpenClaw โ€” {_currentActivity.DisplayText}" + : $"OpenClaw โ€” {status}"; // Add last check time (culture-aware) var checkTime = _lastCheckTime.ToShortTimeString(); @@ -1062,8 +1062,8 @@ private void OnOpenLogFile(object? sender, EventArgs e) { var logDir = System.IO.Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), - "MoltbotTray"); - var logPath = System.IO.Path.Combine(logDir, "moltbot-tray.log"); + "OpenClawTray"); + var logPath = System.IO.Path.Combine(logDir, "openclaw-tray.log"); if (System.IO.File.Exists(logPath)) { @@ -1090,7 +1090,7 @@ private async Task ReconnectAsync() _gatewayClient.Dispose(); } - _gatewayClient = new MoltbotGatewayClient(_settings!.GatewayUrl, _settings.Token, Logger.Instance); + _gatewayClient = new OpenClawGatewayClient(_settings!.GatewayUrl, _settings.Token, Logger.Instance); _gatewayClient.StatusChanged += OnStatusChanged; _gatewayClient.NotificationReceived += OnNotificationReceived; _gatewayClient.ActivityChanged += OnActivityChanged; diff --git a/src/Moltbot.Tray/UpdateDialog.cs b/src/OpenClaw.Tray/UpdateDialog.cs similarity index 97% rename from src/Moltbot.Tray/UpdateDialog.cs rename to src/OpenClaw.Tray/UpdateDialog.cs index bfd0bb07e..862d975de 100644 --- a/src/Moltbot.Tray/UpdateDialog.cs +++ b/src/OpenClaw.Tray/UpdateDialog.cs @@ -2,7 +2,7 @@ using System.Drawing; using System.Windows.Forms; -namespace MoltbotTray; +namespace OpenClawTray; public enum UpdateDialogResult { @@ -17,7 +17,7 @@ public class UpdateDialog : ModernForm public UpdateDialog(string version, string releaseNotes) { - Text = "Update Available โ€” Moltbot Tray"; + Text = "Update Available โ€” OpenClaw Tray"; Size = new Size(500, 420); Icon = IconHelper.GetLobsterIcon(); diff --git a/src/Moltbot.Tray/WebChatForm.cs b/src/OpenClaw.Tray/WebChatForm.cs similarity index 97% rename from src/Moltbot.Tray/WebChatForm.cs rename to src/OpenClaw.Tray/WebChatForm.cs index 7a2f57729..ae1522ba7 100644 --- a/src/Moltbot.Tray/WebChatForm.cs +++ b/src/OpenClaw.Tray/WebChatForm.cs @@ -7,10 +7,10 @@ using System.Windows.Forms; using Microsoft.Win32; -namespace MoltbotTray; +namespace OpenClawTray; /// -/// Embeds the Moltbot WebChat UI via WebView2 with modern Windows 11 styling. +/// Embeds the OpenClaw WebChat UI via WebView2 with modern Windows 11 styling. /// public class WebChatForm : ModernForm { @@ -45,7 +45,7 @@ private WebChatForm(string gatewayUrl, string token) private void InitializeComponent() { - Text = "Moltbot Chat"; + Text = "OpenClaw Chat"; Size = new Size(520, 750); MinimumSize = new Size(380, 450); FormBorderStyle = FormBorderStyle.Sizable; @@ -122,7 +122,7 @@ private async Task InitializeWebViewAsync() { var userDataDir = Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), - "MoltbotTray", "WebView2"); + "OpenClawTray", "WebView2"); var env = await CoreWebView2Environment.CreateAsync(userDataFolder: userDataDir); await _webView!.EnsureCoreWebView2Async(env); diff --git a/src/Moltbot.Tray/WelcomeDialog.cs b/src/OpenClaw.Tray/WelcomeDialog.cs similarity index 94% rename from src/Moltbot.Tray/WelcomeDialog.cs rename to src/OpenClaw.Tray/WelcomeDialog.cs index 45ef1f5db..cf2616d9b 100644 --- a/src/Moltbot.Tray/WelcomeDialog.cs +++ b/src/OpenClaw.Tray/WelcomeDialog.cs @@ -3,10 +3,10 @@ using System.Drawing; using System.Windows.Forms; -namespace MoltbotTray; +namespace OpenClawTray; /// -/// First-run welcome dialog to help users get started with Moltbot. +/// First-run welcome dialog to help users get started with OpenClaw. /// public class WelcomeDialog : ModernForm { @@ -58,7 +58,7 @@ private void InitializeComponent() // Instructions var instructionsLabel = CreateModernLabel( "To get started, you'll need an API token from your\n" + - "Moltbot dashboard. Click below to learn how to get one,\n" + + "OpenClaw dashboard. Click below to learn how to get one,\n" + "then paste your token in Settings."); instructionsLabel.Font = new Font("Segoe UI", 9.5f); instructionsLabel.Location = new Point(30, y); diff --git a/src/Moltbot.Tray/moltbot.ico b/src/OpenClaw.Tray/openclaw.ico similarity index 100% rename from src/Moltbot.Tray/moltbot.ico rename to src/OpenClaw.Tray/openclaw.ico diff --git a/src/Moltbot.Tray/screenshots/README.md b/src/OpenClaw.Tray/screenshots/README.md similarity index 100% rename from src/Moltbot.Tray/screenshots/README.md rename to src/OpenClaw.Tray/screenshots/README.md diff --git a/tests/Moltbot.Shared.Tests/ModelsTests.cs b/tests/OpenClaw.Shared.Tests/ModelsTests.cs similarity index 99% rename from tests/Moltbot.Shared.Tests/ModelsTests.cs rename to tests/OpenClaw.Shared.Tests/ModelsTests.cs index 171b8310e..63dda0cc5 100644 --- a/tests/Moltbot.Shared.Tests/ModelsTests.cs +++ b/tests/OpenClaw.Shared.Tests/ModelsTests.cs @@ -1,7 +1,7 @@ using Xunit; -using Moltbot.Shared; +using OpenClaw.Shared; -namespace Moltbot.Shared.Tests; +namespace OpenClaw.Shared.Tests; public class AgentActivityTests { diff --git a/tests/Moltbot.Shared.Tests/Moltbot.Shared.Tests.csproj b/tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj similarity index 88% rename from tests/Moltbot.Shared.Tests/Moltbot.Shared.Tests.csproj rename to tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj index 806cb18ad..c3222111d 100644 --- a/tests/Moltbot.Shared.Tests/Moltbot.Shared.Tests.csproj +++ b/tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj @@ -19,7 +19,7 @@ - + diff --git a/tests/Moltbot.Shared.Tests/MoltbotGatewayClientTests.cs b/tests/OpenClaw.Shared.Tests/OpenClawGatewayClientTests.cs similarity index 92% rename from tests/Moltbot.Shared.Tests/MoltbotGatewayClientTests.cs rename to tests/OpenClaw.Shared.Tests/OpenClawGatewayClientTests.cs index d01fd7bcf..dd5ca3252 100644 --- a/tests/Moltbot.Shared.Tests/MoltbotGatewayClientTests.cs +++ b/tests/OpenClaw.Shared.Tests/OpenClawGatewayClientTests.cs @@ -2,25 +2,25 @@ using System.Collections.Generic; using System.Linq; using Xunit; -using Moltbot.Shared; +using OpenClaw.Shared; -namespace Moltbot.Shared.Tests; +namespace OpenClaw.Shared.Tests; -public class MoltbotGatewayClientTests +public class OpenClawGatewayClientTests { // Test helper to access private methods through reflection private class GatewayClientTestHelper { - private readonly MoltbotGatewayClient _client; + private readonly OpenClawGatewayClient _client; public GatewayClientTestHelper() { - _client = new MoltbotGatewayClient("ws://localhost:18789", "test-token", new TestLogger()); + _client = new OpenClawGatewayClient("ws://localhost:18789", "test-token", new TestLogger()); } public string ClassifyNotification(string text) { - var method = typeof(MoltbotGatewayClient).GetMethod("ClassifyNotification", + var method = typeof(OpenClawGatewayClient).GetMethod("ClassifyNotification", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static); var result = method!.Invoke(null, new object[] { text }); var tuple = ((string title, string type))result!; @@ -29,7 +29,7 @@ public string ClassifyNotification(string text) public string GetNotificationTitle(string text) { - var method = typeof(MoltbotGatewayClient).GetMethod("ClassifyNotification", + var method = typeof(OpenClawGatewayClient).GetMethod("ClassifyNotification", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static); var result = method!.Invoke(null, new object[] { text }); var tuple = ((string title, string type))result!; @@ -38,7 +38,7 @@ public string GetNotificationTitle(string text) public ActivityKind ClassifyTool(string toolName) { - var method = typeof(MoltbotGatewayClient).GetMethod("ClassifyTool", + var method = typeof(OpenClawGatewayClient).GetMethod("ClassifyTool", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static); var result = method!.Invoke(null, new object[] { toolName }); return (ActivityKind)result!; @@ -46,7 +46,7 @@ public ActivityKind ClassifyTool(string toolName) public string ShortenPath(string path) { - var method = typeof(MoltbotGatewayClient).GetMethod("ShortenPath", + var method = typeof(OpenClawGatewayClient).GetMethod("ShortenPath", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static); var result = method!.Invoke(null, new object[] { path }); return (string)result!; @@ -54,7 +54,7 @@ public string ShortenPath(string path) public string TruncateLabel(string text, int maxLen = 60) { - var method = typeof(MoltbotGatewayClient).GetMethod("TruncateLabel", + var method = typeof(OpenClawGatewayClient).GetMethod("TruncateLabel", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static); var result = method!.Invoke(null, new object[] { text, maxLen }); return (string)result!; @@ -66,7 +66,7 @@ public SessionInfo[] GetSessionList() } } - private class TestLogger : IMoltbotLogger + private class TestLogger : IOpenClawLogger { public List Logs { get; } = new(); @@ -323,7 +323,7 @@ public void GetSessionList_SortsMainSessionFirst() public void Constructor_InitializesWithProvidedValues() { var logger = new TestLogger(); - var client = new MoltbotGatewayClient("ws://test:8080", "my-token", logger); + var client = new OpenClawGatewayClient("ws://test:8080", "my-token", logger); // Should not throw Assert.NotNull(client); @@ -332,7 +332,7 @@ public void Constructor_InitializesWithProvidedValues() [Fact] public void Constructor_UsesNullLogger_WhenNotProvided() { - var client = new MoltbotGatewayClient("ws://test:8080", "my-token"); + var client = new OpenClawGatewayClient("ws://test:8080", "my-token"); // Should not throw Assert.NotNull(client); diff --git a/tests/Moltbot.Shared.Tests/README.md b/tests/OpenClaw.Shared.Tests/README.md similarity index 93% rename from tests/Moltbot.Shared.Tests/README.md rename to tests/OpenClaw.Shared.Tests/README.md index 90b9ac3b1..c33380639 100644 --- a/tests/Moltbot.Shared.Tests/README.md +++ b/tests/OpenClaw.Shared.Tests/README.md @@ -1,10 +1,10 @@ -# Moltbot.Shared.Tests +# OpenClaw.Shared.Tests -Unit test suite for the Moltbot.Shared library. +Unit test suite for the OpenClaw.Shared library. ## Overview -This test project provides comprehensive coverage of the Moltbot.Shared library, focusing on: +This test project provides comprehensive coverage of the OpenClaw.Shared library, focusing on: - Data model display text generation - Gateway client utility methods - Notification classification @@ -59,7 +59,7 @@ dotnet test --filter "FullyQualifiedName~AgentActivityTests" - โœ… Combined field formatting - โœ… Empty state ("No usage data") -### MoltbotGatewayClientTests.cs (20 tests) +### OpenClawGatewayClientTests.cs (20 tests) #### Notification Classification (11 tests) - โœ… Health alerts (blood sugar, glucose, CGM, mg/dl) @@ -141,7 +141,7 @@ Some functionality is Windows-only (Tray app, PowerToys extension), but the Shar ## Contributing -When adding new functionality to `Moltbot.Shared`: +When adding new functionality to `OpenClaw.Shared`: 1. Add corresponding unit tests 2. Ensure tests are cross-platform compatible 3. Test edge cases (empty strings, null values, very long inputs) @@ -151,7 +151,7 @@ When adding new functionality to `Moltbot.Shared`: - xUnit 2.9.3 - Test framework - .NET 9.0 - Runtime -- Moltbot.Shared library +- OpenClaw.Shared library ## License diff --git a/tools/cmdpal-dev.ps1 b/tools/cmdpal-dev.ps1 index 45bb56e01..ab00108d4 100644 --- a/tools/cmdpal-dev.ps1 +++ b/tools/cmdpal-dev.ps1 @@ -9,7 +9,7 @@ param( $ErrorActionPreference = 'Stop' $RepoRoot = Split-Path -Parent $PSScriptRoot -$ProjectPath = "$RepoRoot\src\Moltbot.CommandPalette" +$ProjectPath = "$RepoRoot\src\OpenClaw.CommandPalette" # Detect architecture $Arch = if ([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture -eq 'Arm64') { 'arm64' } else { 'x64' } @@ -18,7 +18,7 @@ $OutputPath = "$ProjectPath\bin\$Arch\Debug\net10.0-windows10.0.26100.0\win-$Arc function Write-Step($msg) { Write-Host "`n>> $msg" -ForegroundColor Cyan } function Get-InstalledPackage { - Get-AppxPackage -Name "*Moltbot*" 2>$null + Get-AppxPackage -Name "*OpenClaw*" 2>$null } function Remove-ExtensionPackage { @@ -35,7 +35,7 @@ function Remove-ExtensionPackage { function Build-Extension { Write-Step "Building Command Palette ($Arch)..." Push-Location $RepoRoot - dotnet build src/Moltbot.CommandPalette -c Debug -p:Platform=$Arch + dotnet build src/OpenClaw.CommandPalette -c Debug -p:Platform=$Arch if ($LASTEXITCODE -ne 0) { throw "Build failed" } Pop-Location Write-Host "Build succeeded!" -ForegroundColor Green @@ -51,7 +51,7 @@ function Deploy-Extension { # Register for development (loose files, no MSIX needed) Add-AppxPackage -Register $manifest -ForceApplicationShutdown - Write-Host "Deployed! Open Command Palette, type 'Reload', then 'Moltbot'" -ForegroundColor Green + Write-Host "Deployed! Open Command Palette, type 'Reload', then 'OpenClaw'" -ForegroundColor Green } function Show-Status { @@ -76,6 +76,6 @@ switch ($Action) { Remove-ExtensionPackage Build-Extension Deploy-Extension - Write-Host "`n=== In Command Palette: type 'Reload' then 'Moltbot' ===" -ForegroundColor Magenta + Write-Host "`n=== In Command Palette: type 'Reload' then 'OpenClaw' ===" -ForegroundColor Magenta } }