From d33cd4506158b8294c69ed382ac189f91678a130 Mon Sep 17 00:00:00 2001 From: Alex Fallah Date: Tue, 27 Jan 2026 11:04:39 -0500 Subject: [PATCH] fix(macOS): rename Clawdbot directories to Moltbot for naming consistency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Directory renames: - apps/macos/Sources/Clawdbot → Moltbot - apps/macos/Sources/ClawdbotDiscovery → MoltbotDiscovery - apps/macos/Sources/ClawdbotIPC → MoltbotIPC - apps/macos/Sources/ClawdbotMacCLI → MoltbotMacCLI - apps/macos/Sources/ClawdbotProtocol → MoltbotProtocol - apps/macos/Tests/ClawdbotIPCTests → MoltbotIPCTests - apps/shared/ClawdbotKit → MoltbotKit - apps/shared/MoltbotKit/Sources/Clawdbot* → Moltbot* - apps/shared/MoltbotKit/Tests/ClawdbotKitTests → MoltbotKitTests Resource renames: - Clawdbot.icns → Moltbot.icns Code fixes: - Update Package.swift paths to reference Moltbot* directories - Fix clawdbot* → moltbot* symbol references in Swift code: - clawdbotManagedPaths → moltbotManagedPaths - clawdbotExecutable → moltbotExecutable - clawdbotCommand → moltbotCommand - clawdbotNodeCommand → moltbotNodeCommand - clawdbotOAuthDirEnv → moltbotOAuthDirEnv - clawdbotSelectSettingsTab → moltbotSelectSettingsTab --- apps/macos/Sources/Moltbot/AnthropicOAuth.swift | 2 +- apps/macos/Sources/Moltbot/CLIInstallPrompter.swift | 2 +- apps/macos/Sources/Moltbot/CommandResolver.swift | 8 ++++---- apps/macos/Sources/Moltbot/GatewayEnvironment.swift | 4 ++-- .../Sources/Moltbot/GatewayLaunchAgentManager.swift | 2 +- apps/macos/Sources/Moltbot/MenuContentView.swift | 2 +- apps/macos/Sources/Moltbot/NodeServiceManager.swift | 2 +- .../Sources/Moltbot/OnboardingView+Actions.swift | 2 +- .../Resources/{Clawdbot.icns => Moltbot.icns} | Bin apps/macos/Sources/Moltbot/SettingsRootView.swift | 2 +- .../MoltbotIPCTests/CommandResolverTests.swift | 12 ++++++------ 11 files changed, 19 insertions(+), 19 deletions(-) rename apps/macos/Sources/Moltbot/Resources/{Clawdbot.icns => Moltbot.icns} (100%) diff --git a/apps/macos/Sources/Moltbot/AnthropicOAuth.swift b/apps/macos/Sources/Moltbot/AnthropicOAuth.swift index 447ad5bb3b..a13275d7ab 100644 --- a/apps/macos/Sources/Moltbot/AnthropicOAuth.swift +++ b/apps/macos/Sources/Moltbot/AnthropicOAuth.swift @@ -226,7 +226,7 @@ enum MoltbotOAuthStore { } static func oauthDir() -> URL { - if let override = ProcessInfo.processInfo.environment[self.clawdbotOAuthDirEnv]? + if let override = ProcessInfo.processInfo.environment[self.moltbotOAuthDirEnv]? .trimmingCharacters(in: .whitespacesAndNewlines), !override.isEmpty { diff --git a/apps/macos/Sources/Moltbot/CLIInstallPrompter.swift b/apps/macos/Sources/Moltbot/CLIInstallPrompter.swift index b091fc8b50..80cd695fd5 100644 --- a/apps/macos/Sources/Moltbot/CLIInstallPrompter.swift +++ b/apps/macos/Sources/Moltbot/CLIInstallPrompter.swift @@ -62,7 +62,7 @@ final class CLIInstallPrompter { SettingsTabRouter.request(tab) SettingsWindowOpener.shared.open() DispatchQueue.main.async { - NotificationCenter.default.post(name: .clawdbotSelectSettingsTab, object: tab) + NotificationCenter.default.post(name: .moltbotSelectSettingsTab, object: tab) } } diff --git a/apps/macos/Sources/Moltbot/CommandResolver.swift b/apps/macos/Sources/Moltbot/CommandResolver.swift index 99a738541e..427accbbf3 100644 --- a/apps/macos/Sources/Moltbot/CommandResolver.swift +++ b/apps/macos/Sources/Moltbot/CommandResolver.swift @@ -87,7 +87,7 @@ enum CommandResolver { // Dev-only convenience. Avoid project-local PATH hijacking in release builds. extras.insert(projectRoot.appendingPathComponent("node_modules/.bin").path, at: 0) #endif - let moltbotPaths = self.clawdbotManagedPaths(home: home) + let moltbotPaths = self.moltbotManagedPaths(home: home) if !moltbotPaths.isEmpty { extras.insert(contentsOf: moltbotPaths, at: 1) } @@ -207,7 +207,7 @@ enum CommandResolver { } static func hasAnyMoltbotInvoker(searchPaths: [String]? = nil) -> Bool { - if self.clawdbotExecutable(searchPaths: searchPaths) != nil { return true } + if self.moltbotExecutable(searchPaths: searchPaths) != nil { return true } if self.findExecutable(named: "pnpm", searchPaths: searchPaths) != nil { return true } if self.findExecutable(named: "node", searchPaths: searchPaths) != nil, self.nodeCliPath() != nil @@ -253,7 +253,7 @@ enum CommandResolver { // Use --silent to avoid pnpm lifecycle banners that would corrupt JSON outputs. return [pnpm, "--silent", "moltbot", subcommand] + extraArgs } - if let moltbotPath = self.clawdbotExecutable(searchPaths: searchPaths) { + if let moltbotPath = self.moltbotExecutable(searchPaths: searchPaths) { return [moltbotPath, subcommand] + extraArgs } @@ -275,7 +275,7 @@ enum CommandResolver { configRoot: [String: Any]? = nil, searchPaths: [String]? = nil) -> [String] { - self.clawdbotNodeCommand( + self.moltbotNodeCommand( subcommand: subcommand, extraArgs: extraArgs, defaults: defaults, diff --git a/apps/macos/Sources/Moltbot/GatewayEnvironment.swift b/apps/macos/Sources/Moltbot/GatewayEnvironment.swift index 2689d8604f..0dbcf97804 100644 --- a/apps/macos/Sources/Moltbot/GatewayEnvironment.swift +++ b/apps/macos/Sources/Moltbot/GatewayEnvironment.swift @@ -123,7 +123,7 @@ enum GatewayEnvironment { requiredGateway: expectedString, message: RuntimeLocator.describeFailure(err)) case let .success(runtime): - let gatewayBin = CommandResolver.clawdbotExecutable() + let gatewayBin = CommandResolver.moltbotExecutable() if gatewayBin == nil, projectEntrypoint == nil { return GatewayEnvironmentStatus( @@ -181,7 +181,7 @@ enum GatewayEnvironment { let projectRoot = CommandResolver.projectRoot() let projectEntrypoint = CommandResolver.gatewayEntrypoint(in: projectRoot) let status = self.check() - let gatewayBin = CommandResolver.clawdbotExecutable() + let gatewayBin = CommandResolver.moltbotExecutable() let runtime = RuntimeLocator.resolve(searchPaths: CommandResolver.preferredPaths()) guard case .ok = status.kind else { diff --git a/apps/macos/Sources/Moltbot/GatewayLaunchAgentManager.swift b/apps/macos/Sources/Moltbot/GatewayLaunchAgentManager.swift index 70c5a5eec7..cc78b7e10f 100644 --- a/apps/macos/Sources/Moltbot/GatewayLaunchAgentManager.swift +++ b/apps/macos/Sources/Moltbot/GatewayLaunchAgentManager.swift @@ -143,7 +143,7 @@ extension GatewayLaunchAgentManager { timeout: Double, quiet: Bool) async -> CommandResult { - let command = CommandResolver.clawdbotCommand( + let command = CommandResolver.moltbotCommand( subcommand: "gateway", extraArgs: self.withJsonFlag(args), // Launchd management must always run locally, even if remote mode is configured. diff --git a/apps/macos/Sources/Moltbot/MenuContentView.swift b/apps/macos/Sources/Moltbot/MenuContentView.swift index 3f22eda63f..118b78dc70 100644 --- a/apps/macos/Sources/Moltbot/MenuContentView.swift +++ b/apps/macos/Sources/Moltbot/MenuContentView.swift @@ -329,7 +329,7 @@ struct MenuContent: View { NSApp.activate(ignoringOtherApps: true) self.openSettings() DispatchQueue.main.async { - NotificationCenter.default.post(name: .clawdbotSelectSettingsTab, object: tab) + NotificationCenter.default.post(name: .moltbotSelectSettingsTab, object: tab) } } diff --git a/apps/macos/Sources/Moltbot/NodeServiceManager.swift b/apps/macos/Sources/Moltbot/NodeServiceManager.swift index bceba7c394..bcf17d9723 100644 --- a/apps/macos/Sources/Moltbot/NodeServiceManager.swift +++ b/apps/macos/Sources/Moltbot/NodeServiceManager.swift @@ -52,7 +52,7 @@ extension NodeServiceManager { timeout: Double, quiet: Bool) async -> CommandResult { - let command = CommandResolver.clawdbotCommand( + let command = CommandResolver.moltbotCommand( subcommand: "service", extraArgs: self.withJsonFlag(args), // Service management must always run locally, even if remote mode is configured. diff --git a/apps/macos/Sources/Moltbot/OnboardingView+Actions.swift b/apps/macos/Sources/Moltbot/OnboardingView+Actions.swift index 80dadcf94b..79e7d4d48a 100644 --- a/apps/macos/Sources/Moltbot/OnboardingView+Actions.swift +++ b/apps/macos/Sources/Moltbot/OnboardingView+Actions.swift @@ -47,7 +47,7 @@ extension OnboardingView { SettingsTabRouter.request(tab) self.openSettings() DispatchQueue.main.async { - NotificationCenter.default.post(name: .clawdbotSelectSettingsTab, object: tab) + NotificationCenter.default.post(name: .moltbotSelectSettingsTab, object: tab) } } diff --git a/apps/macos/Sources/Moltbot/Resources/Clawdbot.icns b/apps/macos/Sources/Moltbot/Resources/Moltbot.icns similarity index 100% rename from apps/macos/Sources/Moltbot/Resources/Clawdbot.icns rename to apps/macos/Sources/Moltbot/Resources/Moltbot.icns diff --git a/apps/macos/Sources/Moltbot/SettingsRootView.swift b/apps/macos/Sources/Moltbot/SettingsRootView.swift index 004f15827b..97520a31b5 100644 --- a/apps/macos/Sources/Moltbot/SettingsRootView.swift +++ b/apps/macos/Sources/Moltbot/SettingsRootView.swift @@ -77,7 +77,7 @@ struct SettingsRootView: View { .padding(.vertical, 22) .frame(width: SettingsTab.windowWidth, height: SettingsTab.windowHeight, alignment: .topLeading) .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading) - .onReceive(NotificationCenter.default.publisher(for: .clawdbotSelectSettingsTab)) { note in + .onReceive(NotificationCenter.default.publisher(for: .moltbotSelectSettingsTab)) { note in if let tab = note.object as? SettingsTab { withAnimation(.spring(response: 0.32, dampingFraction: 0.85)) { self.selectedTab = tab diff --git a/apps/macos/Tests/MoltbotIPCTests/CommandResolverTests.swift b/apps/macos/Tests/MoltbotIPCTests/CommandResolverTests.swift index 8bc84e51fe..d6abe45afe 100644 --- a/apps/macos/Tests/MoltbotIPCTests/CommandResolverTests.swift +++ b/apps/macos/Tests/MoltbotIPCTests/CommandResolverTests.swift @@ -34,7 +34,7 @@ import Testing let moltbotPath = tmp.appendingPathComponent("node_modules/.bin/moltbot") try self.makeExec(at: moltbotPath) - let cmd = CommandResolver.clawdbotCommand(subcommand: "gateway", defaults: defaults, configRoot: [:]) + let cmd = CommandResolver.moltbotCommand(subcommand: "gateway", defaults: defaults, configRoot: [:]) #expect(cmd.prefix(2).elementsEqual([moltbotPath.path, "gateway"])) } @@ -52,7 +52,7 @@ import Testing try FileManager().setAttributes([.posixPermissions: 0o755], ofItemAtPath: nodePath.path) try self.makeExec(at: scriptPath) - let cmd = CommandResolver.clawdbotCommand( + let cmd = CommandResolver.moltbotCommand( subcommand: "rpc", defaults: defaults, configRoot: [:], @@ -76,7 +76,7 @@ import Testing let pnpmPath = tmp.appendingPathComponent("node_modules/.bin/pnpm") try self.makeExec(at: pnpmPath) - let cmd = CommandResolver.clawdbotCommand(subcommand: "rpc", defaults: defaults, configRoot: [:]) + let cmd = CommandResolver.moltbotCommand(subcommand: "rpc", defaults: defaults, configRoot: [:]) #expect(cmd.prefix(4).elementsEqual([pnpmPath.path, "--silent", "moltbot", "rpc"])) } @@ -91,7 +91,7 @@ import Testing let pnpmPath = tmp.appendingPathComponent("node_modules/.bin/pnpm") try self.makeExec(at: pnpmPath) - let cmd = CommandResolver.clawdbotCommand( + let cmd = CommandResolver.moltbotCommand( subcommand: "health", extraArgs: ["--json", "--timeout", "5"], defaults: defaults, @@ -116,7 +116,7 @@ import Testing defaults.set("/tmp/id_ed25519", forKey: remoteIdentityKey) defaults.set("/srv/moltbot", forKey: remoteProjectRootKey) - let cmd = CommandResolver.clawdbotCommand( + let cmd = CommandResolver.moltbotCommand( subcommand: "status", extraArgs: ["--json"], defaults: defaults, @@ -157,7 +157,7 @@ import Testing let moltbotPath = tmp.appendingPathComponent("node_modules/.bin/moltbot") try self.makeExec(at: moltbotPath) - let cmd = CommandResolver.clawdbotCommand( + let cmd = CommandResolver.moltbotCommand( subcommand: "daemon", defaults: defaults, configRoot: ["gateway": ["mode": "local"]])