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

@@ -6,15 +6,15 @@ enum LogLocator {
return URL(fileURLWithPath: override)
}
return URL(fileURLWithPath: "/tmp/clawdbot")
return URL(fileURLWithPath: "/tmp/moltbot")
}
private static var stdoutLog: URL {
logDir.appendingPathComponent("clawdbot-stdout.log")
logDir.appendingPathComponent("moltbot-stdout.log")
}
private static var gatewayLog: URL {
logDir.appendingPathComponent("clawdbot-gateway.log")
logDir.appendingPathComponent("moltbot-gateway.log")
}
private static func ensureLogDirExists() {
@@ -25,7 +25,7 @@ enum LogLocator {
(try? url.resourceValues(forKeys: [.contentModificationDateKey]).contentModificationDate) ?? .distantPast
}
/// Returns the newest log file under /tmp/clawdbot/ (rolling or stdout), or nil if none exist.
/// Returns the newest log file under /tmp/moltbot/ (rolling or stdout), or nil if none exist.
static func bestLogFile() -> URL? {
self.ensureLogDirExists()
let fm = FileManager()
@@ -35,7 +35,7 @@ enum LogLocator {
options: [.skipsHiddenFiles])) ?? []
return files
.filter { $0.lastPathComponent.hasPrefix("clawdbot") && $0.pathExtension == "log" }
.filter { $0.lastPathComponent.hasPrefix("moltbot") && $0.pathExtension == "log" }
.max { lhs, rhs in
self.modificationDate(for: lhs) < self.modificationDate(for: rhs)
}