refactor: rename clawdbot to moltbot with legacy compat

This commit is contained in:
Peter Steinberger
2026-01-27 12:19:58 +00:00
parent 83460df96f
commit 6d16a658e5
1839 changed files with 11250 additions and 11199 deletions

View File

@@ -1,5 +1,5 @@
import ClawdbotKit
import ClawdbotProtocol
import MoltbotKit
import MoltbotProtocol
import Foundation
#if canImport(Darwin)
import Darwin
@@ -13,7 +13,7 @@ struct ConnectOptions {
var timeoutMs: Int = 15000
var json: Bool = false
var probe: Bool = false
var clientId: String = "clawdbot-macos"
var clientId: String = "moltbot-macos"
var clientMode: String = "ui"
var displayName: String?
var role: String = "operator"
@@ -101,10 +101,10 @@ func runConnect(_ args: [String]) async {
let opts = ConnectOptions.parse(args)
if opts.help {
print("""
clawdbot-mac connect
moltbot-mac connect
Usage:
clawdbot-mac connect [--url <ws://host:port>] [--token <token>] [--password <password>]
moltbot-mac connect [--url <ws://host:port>] [--token <token>] [--password <password>]
[--mode <local|remote>] [--timeout <ms>] [--probe] [--json]
[--client-id <id>] [--client-mode <mode>] [--display-name <name>]
[--role <role>] [--scopes <a,b,c>]
@@ -117,7 +117,7 @@ func runConnect(_ args: [String]) async {
--timeout <ms> Request timeout (default: 15000)
--probe Force a fresh health probe
--json Emit JSON
--client-id <id> Override client id (default: clawdbot-macos)
--client-id <id> Override client id (default: moltbot-macos)
--client-mode <m> Override client mode (default: ui)
--display-name <n> Override display name
--role <role> Override role (default: operator)
@@ -130,7 +130,7 @@ func runConnect(_ args: [String]) async {
let config = loadGatewayConfig()
do {
let endpoint = try resolveGatewayEndpoint(opts: opts, config: config)
let displayName = opts.displayName ?? Host.current().localizedName ?? "Clawdbot macOS Debug CLI"
let displayName = opts.displayName ?? Host.current().localizedName ?? "Moltbot macOS Debug CLI"
let connectOptions = GatewayConnectOptions(
role: opts.role,
scopes: opts.scopes,
@@ -207,7 +207,7 @@ private func printConnectOutput(_ output: ConnectOutput, json: Bool) {
return
}
print("Clawdbot macOS Gateway Connect")
print("Moltbot macOS Gateway Connect")
print("Status: \(output.status)")
print("URL: \(output.url)")
print("Mode: \(output.mode)")

View File

@@ -1,4 +1,4 @@
import ClawdbotDiscovery
import MoltbotDiscovery
import Foundation
struct DiscoveryOptions {
@@ -58,10 +58,10 @@ func runDiscover(_ args: [String]) async {
let opts = DiscoveryOptions.parse(args)
if opts.help {
print("""
clawdbot-mac discover
moltbot-mac discover
Usage:
clawdbot-mac discover [--timeout <ms>] [--json] [--include-local]
moltbot-mac discover [--timeout <ms>] [--json] [--include-local]
Options:
--timeout <ms> Discovery window in milliseconds (default: 2000)

View File

@@ -6,7 +6,7 @@ private struct RootCommand {
}
@main
struct ClawdbotMacCLI {
struct MoltbotMacCLI {
static func main() async {
let args = Array(CommandLine.arguments.dropFirst())
let command = parseRootCommand(args)
@@ -22,7 +22,7 @@ struct ClawdbotMacCLI {
case "wizard":
await runWizardCommand(command?.args ?? [])
default:
fputs("clawdbot-mac: unknown command\n", stderr)
fputs("moltbot-mac: unknown command\n", stderr)
printUsage()
exit(1)
}
@@ -36,21 +36,21 @@ private func parseRootCommand(_ args: [String]) -> RootCommand? {
private func printUsage() {
print("""
clawdbot-mac
moltbot-mac
Usage:
clawdbot-mac connect [--url <ws://host:port>] [--token <token>] [--password <password>]
moltbot-mac connect [--url <ws://host:port>] [--token <token>] [--password <password>]
[--mode <local|remote>] [--timeout <ms>] [--probe] [--json]
[--client-id <id>] [--client-mode <mode>] [--display-name <name>]
[--role <role>] [--scopes <a,b,c>]
clawdbot-mac discover [--timeout <ms>] [--json] [--include-local]
clawdbot-mac wizard [--url <ws://host:port>] [--token <token>] [--password <password>]
moltbot-mac discover [--timeout <ms>] [--json] [--include-local]
moltbot-mac wizard [--url <ws://host:port>] [--token <token>] [--password <password>]
[--mode <local|remote>] [--workspace <path>] [--json]
Examples:
clawdbot-mac connect
clawdbot-mac connect --url ws://127.0.0.1:18789 --json
clawdbot-mac discover --timeout 3000 --json
clawdbot-mac wizard --mode local
moltbot-mac connect
moltbot-mac connect --url ws://127.0.0.1:18789 --json
moltbot-mac discover --timeout 3000 --json
moltbot-mac wizard --mode local
""")
}

View File

@@ -21,7 +21,7 @@ struct GatewayEndpoint {
func loadGatewayConfig() -> GatewayConfig {
let url = FileManager().homeDirectoryForCurrentUser
.appendingPathComponent(".clawdbot")
.appendingPathComponent("clawdbot.json")
.appendingPathComponent("moltbot.json")
guard let data = try? Data(contentsOf: url) else { return GatewayConfig() }
guard let json = try? JSONSerialization.jsonObject(with: data) as? [String: Any] else {
return GatewayConfig()

View File

@@ -1,5 +1,5 @@
import ClawdbotKit
import ClawdbotProtocol
import MoltbotKit
import MoltbotProtocol
typealias ProtoAnyCodable = ClawdbotProtocol.AnyCodable
typealias KitAnyCodable = ClawdbotKit.AnyCodable
typealias ProtoAnyCodable = MoltbotProtocol.AnyCodable
typealias KitAnyCodable = MoltbotKit.AnyCodable

View File

@@ -1,5 +1,5 @@
import ClawdbotKit
import ClawdbotProtocol
import MoltbotKit
import MoltbotProtocol
import Darwin
import Foundation
@@ -71,10 +71,10 @@ func runWizardCommand(_ args: [String]) async {
let opts = WizardCliOptions.parse(args)
if opts.help {
print("""
clawdbot-mac wizard
moltbot-mac wizard
Usage:
clawdbot-mac wizard [--url <ws://host:port>] [--token <token>] [--password <password>]
moltbot-mac wizard [--url <ws://host:port>] [--token <token>] [--password <password>]
[--mode <local|remote>] [--workspace <path>] [--json]
Options:
@@ -253,13 +253,13 @@ actor GatewayWizardClient {
}
let osVersion = ProcessInfo.processInfo.operatingSystemVersion
let platform = "macos \(osVersion.majorVersion).\(osVersion.minorVersion).\(osVersion.patchVersion)"
let clientId = "clawdbot-macos"
let clientId = "moltbot-macos"
let clientMode = "ui"
let role = "operator"
let scopes: [String] = []
let client: [String: ProtoAnyCodable] = [
"id": ProtoAnyCodable(clientId),
"displayName": ProtoAnyCodable(Host.current().localizedName ?? "Clawdbot macOS Wizard CLI"),
"displayName": ProtoAnyCodable(Host.current().localizedName ?? "Moltbot macOS Wizard CLI"),
"version": ProtoAnyCodable("dev"),
"platform": ProtoAnyCodable(platform),
"deviceFamily": ProtoAnyCodable("Mac"),