fix(macos): complete Clawd → Molt rename in Swift code and build scripts
Fix incomplete rename that broke macOS app builds: - Update Package.swift to use ClawdbotKit package identifier (SPM uses path name) - Fix argument order in ClawdbotKit Package.swift (dependencies before path) - Add path properties to macos Package.swift targets pointing to Clawdbot* directories - Update notification name references (.clawdbotSelectSettingsTab → .moltbotSelectSettingsTab) - Update CommandResolver method calls (clawdbotCommand → moltbotCommand, etc.) - Update self.clawdbotOAuthDirEnv → self.moltbotOAuthDirEnv - Fix resource paths in package-mac-app.sh (Sources/Moltbot → Sources/Clawdbot) - Fix icon filename reference (Moltbot.icns → Clawdbot.icns) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
640c8d1554
commit
de0665ab8b
@ -27,15 +27,16 @@ let package = Package(
|
|||||||
.target(
|
.target(
|
||||||
name: "MoltbotIPC",
|
name: "MoltbotIPC",
|
||||||
dependencies: [],
|
dependencies: [],
|
||||||
|
path: "Sources/ClawdbotIPC",
|
||||||
swiftSettings: [
|
swiftSettings: [
|
||||||
.enableUpcomingFeature("StrictConcurrency"),
|
.enableUpcomingFeature("StrictConcurrency"),
|
||||||
]),
|
]),
|
||||||
.target(
|
.target(
|
||||||
name: "MoltbotDiscovery",
|
name: "MoltbotDiscovery",
|
||||||
dependencies: [
|
dependencies: [
|
||||||
.product(name: "MoltbotKit", package: "MoltbotKit"),
|
.product(name: "MoltbotKit", package: "ClawdbotKit"),
|
||||||
],
|
],
|
||||||
path: "Sources/MoltbotDiscovery",
|
path: "Sources/ClawdbotDiscovery",
|
||||||
swiftSettings: [
|
swiftSettings: [
|
||||||
.enableUpcomingFeature("StrictConcurrency"),
|
.enableUpcomingFeature("StrictConcurrency"),
|
||||||
]),
|
]),
|
||||||
@ -44,9 +45,9 @@ let package = Package(
|
|||||||
dependencies: [
|
dependencies: [
|
||||||
"MoltbotIPC",
|
"MoltbotIPC",
|
||||||
"MoltbotDiscovery",
|
"MoltbotDiscovery",
|
||||||
.product(name: "MoltbotKit", package: "MoltbotKit"),
|
.product(name: "MoltbotKit", package: "ClawdbotKit"),
|
||||||
.product(name: "MoltbotChatUI", package: "MoltbotKit"),
|
.product(name: "MoltbotChatUI", package: "ClawdbotKit"),
|
||||||
.product(name: "MoltbotProtocol", package: "MoltbotKit"),
|
.product(name: "MoltbotProtocol", package: "ClawdbotKit"),
|
||||||
.product(name: "SwabbleKit", package: "swabble"),
|
.product(name: "SwabbleKit", package: "swabble"),
|
||||||
.product(name: "MenuBarExtraAccess", package: "MenuBarExtraAccess"),
|
.product(name: "MenuBarExtraAccess", package: "MenuBarExtraAccess"),
|
||||||
.product(name: "Subprocess", package: "swift-subprocess"),
|
.product(name: "Subprocess", package: "swift-subprocess"),
|
||||||
@ -55,11 +56,12 @@ let package = Package(
|
|||||||
.product(name: "PeekabooBridge", package: "Peekaboo"),
|
.product(name: "PeekabooBridge", package: "Peekaboo"),
|
||||||
.product(name: "PeekabooAutomationKit", package: "Peekaboo"),
|
.product(name: "PeekabooAutomationKit", package: "Peekaboo"),
|
||||||
],
|
],
|
||||||
|
path: "Sources/Clawdbot",
|
||||||
exclude: [
|
exclude: [
|
||||||
"Resources/Info.plist",
|
"Resources/Info.plist",
|
||||||
],
|
],
|
||||||
resources: [
|
resources: [
|
||||||
.copy("Resources/Moltbot.icns"),
|
.copy("Resources/Clawdbot.icns"),
|
||||||
.copy("Resources/DeviceModels"),
|
.copy("Resources/DeviceModels"),
|
||||||
],
|
],
|
||||||
swiftSettings: [
|
swiftSettings: [
|
||||||
@ -69,10 +71,10 @@ let package = Package(
|
|||||||
name: "MoltbotMacCLI",
|
name: "MoltbotMacCLI",
|
||||||
dependencies: [
|
dependencies: [
|
||||||
"MoltbotDiscovery",
|
"MoltbotDiscovery",
|
||||||
.product(name: "MoltbotKit", package: "MoltbotKit"),
|
.product(name: "MoltbotKit", package: "ClawdbotKit"),
|
||||||
.product(name: "MoltbotProtocol", package: "MoltbotKit"),
|
.product(name: "MoltbotProtocol", package: "ClawdbotKit"),
|
||||||
],
|
],
|
||||||
path: "Sources/MoltbotMacCLI",
|
path: "Sources/ClawdbotMacCLI",
|
||||||
swiftSettings: [
|
swiftSettings: [
|
||||||
.enableUpcomingFeature("StrictConcurrency"),
|
.enableUpcomingFeature("StrictConcurrency"),
|
||||||
]),
|
]),
|
||||||
@ -82,9 +84,10 @@ let package = Package(
|
|||||||
"MoltbotIPC",
|
"MoltbotIPC",
|
||||||
"Moltbot",
|
"Moltbot",
|
||||||
"MoltbotDiscovery",
|
"MoltbotDiscovery",
|
||||||
.product(name: "MoltbotProtocol", package: "MoltbotKit"),
|
.product(name: "MoltbotProtocol", package: "ClawdbotKit"),
|
||||||
.product(name: "SwabbleKit", package: "swabble"),
|
.product(name: "SwabbleKit", package: "swabble"),
|
||||||
],
|
],
|
||||||
|
path: "Tests/ClawdbotIPCTests",
|
||||||
swiftSettings: [
|
swiftSettings: [
|
||||||
.enableUpcomingFeature("StrictConcurrency"),
|
.enableUpcomingFeature("StrictConcurrency"),
|
||||||
.enableExperimentalFeature("SwiftTesting"),
|
.enableExperimentalFeature("SwiftTesting"),
|
||||||
|
|||||||
@ -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
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
@ -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 {
|
||||||
|
|||||||
@ -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.
|
||||||
|
|||||||
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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.
|
||||||
|
|||||||
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -26,11 +26,11 @@ let package = Package(
|
|||||||
]),
|
]),
|
||||||
.target(
|
.target(
|
||||||
name: "MoltbotKit",
|
name: "MoltbotKit",
|
||||||
path: "Sources/ClawdbotKit",
|
|
||||||
dependencies: [
|
dependencies: [
|
||||||
"MoltbotProtocol",
|
"MoltbotProtocol",
|
||||||
.product(name: "ElevenLabsKit", package: "ElevenLabsKit"),
|
.product(name: "ElevenLabsKit", package: "ElevenLabsKit"),
|
||||||
],
|
],
|
||||||
|
path: "Sources/ClawdbotKit",
|
||||||
resources: [
|
resources: [
|
||||||
.process("Resources"),
|
.process("Resources"),
|
||||||
],
|
],
|
||||||
@ -39,7 +39,6 @@ let package = Package(
|
|||||||
]),
|
]),
|
||||||
.target(
|
.target(
|
||||||
name: "MoltbotChatUI",
|
name: "MoltbotChatUI",
|
||||||
path: "Sources/ClawdbotChatUI",
|
|
||||||
dependencies: [
|
dependencies: [
|
||||||
"MoltbotKit",
|
"MoltbotKit",
|
||||||
.product(
|
.product(
|
||||||
@ -47,6 +46,7 @@ let package = Package(
|
|||||||
package: "textual",
|
package: "textual",
|
||||||
condition: .when(platforms: [.macOS, .iOS])),
|
condition: .when(platforms: [.macOS, .iOS])),
|
||||||
],
|
],
|
||||||
|
path: "Sources/ClawdbotChatUI",
|
||||||
swiftSettings: [
|
swiftSettings: [
|
||||||
.enableUpcomingFeature("StrictConcurrency"),
|
.enableUpcomingFeature("StrictConcurrency"),
|
||||||
]),
|
]),
|
||||||
|
|||||||
@ -140,7 +140,7 @@ mkdir -p "$APP_ROOT/Contents/Resources"
|
|||||||
mkdir -p "$APP_ROOT/Contents/Frameworks"
|
mkdir -p "$APP_ROOT/Contents/Frameworks"
|
||||||
|
|
||||||
echo "📄 Copying Info.plist template"
|
echo "📄 Copying Info.plist template"
|
||||||
INFO_PLIST_SRC="$ROOT_DIR/apps/macos/Sources/Moltbot/Resources/Info.plist"
|
INFO_PLIST_SRC="$ROOT_DIR/apps/macos/Sources/Clawdbot/Resources/Info.plist"
|
||||||
if [ ! -f "$INFO_PLIST_SRC" ]; then
|
if [ ! -f "$INFO_PLIST_SRC" ]; then
|
||||||
echo "ERROR: Info.plist template missing at $INFO_PLIST_SRC" >&2
|
echo "ERROR: Info.plist template missing at $INFO_PLIST_SRC" >&2
|
||||||
exit 1
|
exit 1
|
||||||
@ -201,11 +201,11 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "🖼 Copying app icon"
|
echo "🖼 Copying app icon"
|
||||||
cp "$ROOT_DIR/apps/macos/Sources/Moltbot/Resources/Moltbot.icns" "$APP_ROOT/Contents/Resources/Moltbot.icns"
|
cp "$ROOT_DIR/apps/macos/Sources/Clawdbot/Resources/Clawdbot.icns" "$APP_ROOT/Contents/Resources/Moltbot.icns"
|
||||||
|
|
||||||
echo "📦 Copying device model resources"
|
echo "📦 Copying device model resources"
|
||||||
rm -rf "$APP_ROOT/Contents/Resources/DeviceModels"
|
rm -rf "$APP_ROOT/Contents/Resources/DeviceModels"
|
||||||
cp -R "$ROOT_DIR/apps/macos/Sources/Moltbot/Resources/DeviceModels" "$APP_ROOT/Contents/Resources/DeviceModels"
|
cp -R "$ROOT_DIR/apps/macos/Sources/Clawdbot/Resources/DeviceModels" "$APP_ROOT/Contents/Resources/DeviceModels"
|
||||||
|
|
||||||
echo "📦 Copying model catalog"
|
echo "📦 Copying model catalog"
|
||||||
MODEL_CATALOG_SRC="$ROOT_DIR/node_modules/@mariozechner/pi-ai/dist/models.generated.js"
|
MODEL_CATALOG_SRC="$ROOT_DIR/node_modules/@mariozechner/pi-ai/dist/models.generated.js"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user