fix(macOS): rename Clawdbot directories to Moltbot for naming consistency

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
This commit is contained in:
Alex Fallah 2026-01-27 11:04:39 -05:00 committed by Shadow
parent c1a7917de7
commit d33cd45061
11 changed files with 19 additions and 19 deletions

View File

@ -226,7 +226,7 @@ enum MoltbotOAuthStore {
} }
static func oauthDir() -> URL { static func oauthDir() -> URL {
if let override = ProcessInfo.processInfo.environment[self.clawdbotOAuthDirEnv]? if let override = ProcessInfo.processInfo.environment[self.moltbotOAuthDirEnv]?
.trimmingCharacters(in: .whitespacesAndNewlines), .trimmingCharacters(in: .whitespacesAndNewlines),
!override.isEmpty !override.isEmpty
{ {

View File

@ -62,7 +62,7 @@ final class CLIInstallPrompter {
SettingsTabRouter.request(tab) SettingsTabRouter.request(tab)
SettingsWindowOpener.shared.open() SettingsWindowOpener.shared.open()
DispatchQueue.main.async { DispatchQueue.main.async {
NotificationCenter.default.post(name: .clawdbotSelectSettingsTab, object: tab) NotificationCenter.default.post(name: .moltbotSelectSettingsTab, object: tab)
} }
} }

View File

@ -87,7 +87,7 @@ enum CommandResolver {
// Dev-only convenience. Avoid project-local PATH hijacking in release builds. // Dev-only convenience. Avoid project-local PATH hijacking in release builds.
extras.insert(projectRoot.appendingPathComponent("node_modules/.bin").path, at: 0) extras.insert(projectRoot.appendingPathComponent("node_modules/.bin").path, at: 0)
#endif #endif
let moltbotPaths = self.clawdbotManagedPaths(home: home) let moltbotPaths = self.moltbotManagedPaths(home: home)
if !moltbotPaths.isEmpty { if !moltbotPaths.isEmpty {
extras.insert(contentsOf: moltbotPaths, at: 1) extras.insert(contentsOf: moltbotPaths, at: 1)
} }
@ -207,7 +207,7 @@ enum CommandResolver {
} }
static func hasAnyMoltbotInvoker(searchPaths: [String]? = nil) -> Bool { 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: "pnpm", searchPaths: searchPaths) != nil { return true }
if self.findExecutable(named: "node", searchPaths: searchPaths) != nil, if self.findExecutable(named: "node", searchPaths: searchPaths) != nil,
self.nodeCliPath() != nil self.nodeCliPath() != nil
@ -253,7 +253,7 @@ enum CommandResolver {
// Use --silent to avoid pnpm lifecycle banners that would corrupt JSON outputs. // Use --silent to avoid pnpm lifecycle banners that would corrupt JSON outputs.
return [pnpm, "--silent", "moltbot", subcommand] + extraArgs return [pnpm, "--silent", "moltbot", subcommand] + extraArgs
} }
if let moltbotPath = self.clawdbotExecutable(searchPaths: searchPaths) { if let moltbotPath = self.moltbotExecutable(searchPaths: searchPaths) {
return [moltbotPath, subcommand] + extraArgs return [moltbotPath, subcommand] + extraArgs
} }
@ -275,7 +275,7 @@ enum CommandResolver {
configRoot: [String: Any]? = nil, configRoot: [String: Any]? = nil,
searchPaths: [String]? = nil) -> [String] searchPaths: [String]? = nil) -> [String]
{ {
self.clawdbotNodeCommand( self.moltbotNodeCommand(
subcommand: subcommand, subcommand: subcommand,
extraArgs: extraArgs, extraArgs: extraArgs,
defaults: defaults, defaults: defaults,

View File

@ -123,7 +123,7 @@ enum GatewayEnvironment {
requiredGateway: expectedString, requiredGateway: expectedString,
message: RuntimeLocator.describeFailure(err)) message: RuntimeLocator.describeFailure(err))
case let .success(runtime): case let .success(runtime):
let gatewayBin = CommandResolver.clawdbotExecutable() let gatewayBin = CommandResolver.moltbotExecutable()
if gatewayBin == nil, projectEntrypoint == nil { if gatewayBin == nil, projectEntrypoint == nil {
return GatewayEnvironmentStatus( return GatewayEnvironmentStatus(
@ -181,7 +181,7 @@ enum GatewayEnvironment {
let projectRoot = CommandResolver.projectRoot() let projectRoot = CommandResolver.projectRoot()
let projectEntrypoint = CommandResolver.gatewayEntrypoint(in: projectRoot) let projectEntrypoint = CommandResolver.gatewayEntrypoint(in: projectRoot)
let status = self.check() let status = self.check()
let gatewayBin = CommandResolver.clawdbotExecutable() let gatewayBin = CommandResolver.moltbotExecutable()
let runtime = RuntimeLocator.resolve(searchPaths: CommandResolver.preferredPaths()) let runtime = RuntimeLocator.resolve(searchPaths: CommandResolver.preferredPaths())
guard case .ok = status.kind else { guard case .ok = status.kind else {

View File

@ -143,7 +143,7 @@ extension GatewayLaunchAgentManager {
timeout: Double, timeout: Double,
quiet: Bool) async -> CommandResult quiet: Bool) async -> CommandResult
{ {
let command = CommandResolver.clawdbotCommand( let command = CommandResolver.moltbotCommand(
subcommand: "gateway", subcommand: "gateway",
extraArgs: self.withJsonFlag(args), extraArgs: self.withJsonFlag(args),
// Launchd management must always run locally, even if remote mode is configured. // Launchd management must always run locally, even if remote mode is configured.

View File

@ -329,7 +329,7 @@ struct MenuContent: View {
NSApp.activate(ignoringOtherApps: true) NSApp.activate(ignoringOtherApps: true)
self.openSettings() self.openSettings()
DispatchQueue.main.async { DispatchQueue.main.async {
NotificationCenter.default.post(name: .clawdbotSelectSettingsTab, object: tab) NotificationCenter.default.post(name: .moltbotSelectSettingsTab, object: tab)
} }
} }

View File

@ -52,7 +52,7 @@ extension NodeServiceManager {
timeout: Double, timeout: Double,
quiet: Bool) async -> CommandResult quiet: Bool) async -> CommandResult
{ {
let command = CommandResolver.clawdbotCommand( let command = CommandResolver.moltbotCommand(
subcommand: "service", subcommand: "service",
extraArgs: self.withJsonFlag(args), extraArgs: self.withJsonFlag(args),
// Service management must always run locally, even if remote mode is configured. // Service management must always run locally, even if remote mode is configured.

View File

@ -47,7 +47,7 @@ extension OnboardingView {
SettingsTabRouter.request(tab) SettingsTabRouter.request(tab)
self.openSettings() self.openSettings()
DispatchQueue.main.async { DispatchQueue.main.async {
NotificationCenter.default.post(name: .clawdbotSelectSettingsTab, object: tab) NotificationCenter.default.post(name: .moltbotSelectSettingsTab, object: tab)
} }
} }

View File

@ -77,7 +77,7 @@ struct SettingsRootView: View {
.padding(.vertical, 22) .padding(.vertical, 22)
.frame(width: SettingsTab.windowWidth, height: SettingsTab.windowHeight, alignment: .topLeading) .frame(width: SettingsTab.windowWidth, height: SettingsTab.windowHeight, alignment: .topLeading)
.frame(maxWidth: .infinity, maxHeight: .infinity, 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 { if let tab = note.object as? SettingsTab {
withAnimation(.spring(response: 0.32, dampingFraction: 0.85)) { withAnimation(.spring(response: 0.32, dampingFraction: 0.85)) {
self.selectedTab = tab self.selectedTab = tab

View File

@ -34,7 +34,7 @@ import Testing
let moltbotPath = tmp.appendingPathComponent("node_modules/.bin/moltbot") let moltbotPath = tmp.appendingPathComponent("node_modules/.bin/moltbot")
try self.makeExec(at: moltbotPath) 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"])) #expect(cmd.prefix(2).elementsEqual([moltbotPath.path, "gateway"]))
} }
@ -52,7 +52,7 @@ import Testing
try FileManager().setAttributes([.posixPermissions: 0o755], ofItemAtPath: nodePath.path) try FileManager().setAttributes([.posixPermissions: 0o755], ofItemAtPath: nodePath.path)
try self.makeExec(at: scriptPath) try self.makeExec(at: scriptPath)
let cmd = CommandResolver.clawdbotCommand( let cmd = CommandResolver.moltbotCommand(
subcommand: "rpc", subcommand: "rpc",
defaults: defaults, defaults: defaults,
configRoot: [:], configRoot: [:],
@ -76,7 +76,7 @@ import Testing
let pnpmPath = tmp.appendingPathComponent("node_modules/.bin/pnpm") let pnpmPath = tmp.appendingPathComponent("node_modules/.bin/pnpm")
try self.makeExec(at: pnpmPath) 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"])) #expect(cmd.prefix(4).elementsEqual([pnpmPath.path, "--silent", "moltbot", "rpc"]))
} }
@ -91,7 +91,7 @@ import Testing
let pnpmPath = tmp.appendingPathComponent("node_modules/.bin/pnpm") let pnpmPath = tmp.appendingPathComponent("node_modules/.bin/pnpm")
try self.makeExec(at: pnpmPath) try self.makeExec(at: pnpmPath)
let cmd = CommandResolver.clawdbotCommand( let cmd = CommandResolver.moltbotCommand(
subcommand: "health", subcommand: "health",
extraArgs: ["--json", "--timeout", "5"], extraArgs: ["--json", "--timeout", "5"],
defaults: defaults, defaults: defaults,
@ -116,7 +116,7 @@ import Testing
defaults.set("/tmp/id_ed25519", forKey: remoteIdentityKey) defaults.set("/tmp/id_ed25519", forKey: remoteIdentityKey)
defaults.set("/srv/moltbot", forKey: remoteProjectRootKey) defaults.set("/srv/moltbot", forKey: remoteProjectRootKey)
let cmd = CommandResolver.clawdbotCommand( let cmd = CommandResolver.moltbotCommand(
subcommand: "status", subcommand: "status",
extraArgs: ["--json"], extraArgs: ["--json"],
defaults: defaults, defaults: defaults,
@ -157,7 +157,7 @@ import Testing
let moltbotPath = tmp.appendingPathComponent("node_modules/.bin/moltbot") let moltbotPath = tmp.appendingPathComponent("node_modules/.bin/moltbot")
try self.makeExec(at: moltbotPath) try self.makeExec(at: moltbotPath)
let cmd = CommandResolver.clawdbotCommand( let cmd = CommandResolver.moltbotCommand(
subcommand: "daemon", subcommand: "daemon",
defaults: defaults, defaults: defaults,
configRoot: ["gateway": ["mode": "local"]]) configRoot: ["gateway": ["mode": "local"]])