Merge branch 'main' into feat/trusted-proxies-cidr-support
This commit is contained in:
commit
bb251dccf8
4
.github/dependabot.yml
vendored
4
.github/dependabot.yml
vendored
@ -64,9 +64,9 @@ updates:
|
|||||||
- patch
|
- patch
|
||||||
open-pull-requests-limit: 5
|
open-pull-requests-limit: 5
|
||||||
|
|
||||||
# Swift Package Manager - shared ClawdbotKit
|
# Swift Package Manager - shared MoltbotKit
|
||||||
- package-ecosystem: swift
|
- package-ecosystem: swift
|
||||||
directory: /apps/shared/ClawdbotKit
|
directory: /apps/shared/MoltbotKit
|
||||||
schedule:
|
schedule:
|
||||||
interval: weekly
|
interval: weekly
|
||||||
cooldown:
|
cooldown:
|
||||||
|
|||||||
4
.gitignore
vendored
4
.gitignore
vendored
@ -19,14 +19,14 @@ ui/test-results/
|
|||||||
# Bun build artifacts
|
# Bun build artifacts
|
||||||
*.bun-build
|
*.bun-build
|
||||||
apps/macos/.build/
|
apps/macos/.build/
|
||||||
apps/shared/ClawdbotKit/.build/
|
apps/shared/MoltbotKit/.build/
|
||||||
**/ModuleCache/
|
**/ModuleCache/
|
||||||
bin/
|
bin/
|
||||||
bin/clawdbot-mac
|
bin/clawdbot-mac
|
||||||
bin/docs-list
|
bin/docs-list
|
||||||
apps/macos/.build-local/
|
apps/macos/.build-local/
|
||||||
apps/macos/.swiftpm/
|
apps/macos/.swiftpm/
|
||||||
apps/shared/ClawdbotKit/.swiftpm/
|
apps/shared/MoltbotKit/.swiftpm/
|
||||||
Core/
|
Core/
|
||||||
apps/ios/*.xcodeproj/
|
apps/ios/*.xcodeproj/
|
||||||
apps/ios/*.xcworkspace/
|
apps/ios/*.xcworkspace/
|
||||||
|
|||||||
@ -48,4 +48,4 @@
|
|||||||
--allman false
|
--allman false
|
||||||
|
|
||||||
# Exclusions
|
# Exclusions
|
||||||
--exclude .build,.swiftpm,DerivedData,node_modules,dist,coverage,xcuserdata,Peekaboo,Swabble,apps/android,apps/ios,apps/shared,apps/macos/Sources/ClawdisProtocol,apps/macos/Sources/ClawdbotProtocol
|
--exclude .build,.swiftpm,DerivedData,node_modules,dist,coverage,xcuserdata,Peekaboo,Swabble,apps/android,apps/ios,apps/shared,apps/macos/Sources/MoltbotProtocol
|
||||||
|
|||||||
@ -18,7 +18,7 @@ excluded:
|
|||||||
- coverage
|
- coverage
|
||||||
- "*.playground"
|
- "*.playground"
|
||||||
# Generated (protocol-gen-swift.ts)
|
# Generated (protocol-gen-swift.ts)
|
||||||
- apps/macos/Sources/ClawdbotProtocol/GatewayModels.swift
|
- apps/macos/Sources/MoltbotProtocol/GatewayModels.swift
|
||||||
|
|
||||||
analyzer_rules:
|
analyzer_rules:
|
||||||
- unused_declaration
|
- unused_declaration
|
||||||
|
|||||||
@ -9,6 +9,7 @@ Status: unreleased.
|
|||||||
- Rebrand: rename the npm package/CLI to `moltbot`, add a `moltbot` compatibility shim, and move extensions to the `@moltbot/*` scope.
|
- Rebrand: rename the npm package/CLI to `moltbot`, add a `moltbot` compatibility shim, and move extensions to the `@moltbot/*` scope.
|
||||||
- Commands: group /help and /commands output with Telegram paging. (#2504) Thanks @hougangdev.
|
- Commands: group /help and /commands output with Telegram paging. (#2504) Thanks @hougangdev.
|
||||||
- macOS: limit project-local `node_modules/.bin` PATH preference to debug builds (reduce PATH hijacking risk).
|
- macOS: limit project-local `node_modules/.bin` PATH preference to debug builds (reduce PATH hijacking risk).
|
||||||
|
- macOS: finish Moltbot app rename for macOS sources, bundle identifiers, and shared kit paths. (#2844) Thanks @fal3.
|
||||||
- Tools: add per-sender group tool policies and fix precedence. (#1757) Thanks @adam91holt.
|
- Tools: add per-sender group tool policies and fix precedence. (#1757) Thanks @adam91holt.
|
||||||
- Agents: summarize dropped messages during compaction safeguard pruning. (#2509) Thanks @jogi47.
|
- Agents: summarize dropped messages during compaction safeguard pruning. (#2509) Thanks @jogi47.
|
||||||
- Skills: add multi-image input support to Nano Banana Pro skill. (#1958) Thanks @tyler6204.
|
- Skills: add multi-image input support to Nano Banana Pro skill. (#1958) Thanks @tyler6204.
|
||||||
|
|||||||
@ -13,7 +13,7 @@ android {
|
|||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
getByName("main") {
|
getByName("main") {
|
||||||
assets.srcDir(file("../../shared/ClawdbotKit/Sources/ClawdbotKit/Resources"))
|
assets.srcDir(file("../../shared/MoltbotKit/Sources/MoltbotKit/Resources"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@ open Clawdbot.xcodeproj
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Shared packages
|
## Shared packages
|
||||||
- `../shared/ClawdbotKit` — shared types/constants used by iOS (and later macOS bridge + gateway routing).
|
- `../shared/MoltbotKit` — shared types/constants used by iOS (and later macOS bridge + gateway routing).
|
||||||
|
|
||||||
## fastlane
|
## fastlane
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@ -24,37 +24,37 @@ Sources/Status/VoiceWakeToast.swift
|
|||||||
Sources/Voice/VoiceTab.swift
|
Sources/Voice/VoiceTab.swift
|
||||||
Sources/Voice/VoiceWakeManager.swift
|
Sources/Voice/VoiceWakeManager.swift
|
||||||
Sources/Voice/VoiceWakePreferences.swift
|
Sources/Voice/VoiceWakePreferences.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotChatUI/ChatComposer.swift
|
../shared/MoltbotKit/Sources/MoltbotChatUI/ChatComposer.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotChatUI/ChatMarkdownRenderer.swift
|
../shared/MoltbotKit/Sources/MoltbotChatUI/ChatMarkdownRenderer.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotChatUI/ChatMarkdownPreprocessor.swift
|
../shared/MoltbotKit/Sources/MoltbotChatUI/ChatMarkdownPreprocessor.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotChatUI/ChatMessageViews.swift
|
../shared/MoltbotKit/Sources/MoltbotChatUI/ChatMessageViews.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotChatUI/ChatModels.swift
|
../shared/MoltbotKit/Sources/MoltbotChatUI/ChatModels.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotChatUI/ChatPayloadDecoding.swift
|
../shared/MoltbotKit/Sources/MoltbotChatUI/ChatPayloadDecoding.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotChatUI/ChatSessions.swift
|
../shared/MoltbotKit/Sources/MoltbotChatUI/ChatSessions.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotChatUI/ChatSheets.swift
|
../shared/MoltbotKit/Sources/MoltbotChatUI/ChatSheets.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotChatUI/ChatTheme.swift
|
../shared/MoltbotKit/Sources/MoltbotChatUI/ChatTheme.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotChatUI/ChatTransport.swift
|
../shared/MoltbotKit/Sources/MoltbotChatUI/ChatTransport.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotChatUI/ChatView.swift
|
../shared/MoltbotKit/Sources/MoltbotChatUI/ChatView.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotChatUI/ChatViewModel.swift
|
../shared/MoltbotKit/Sources/MoltbotChatUI/ChatViewModel.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotKit/AnyCodable.swift
|
../shared/MoltbotKit/Sources/MoltbotKit/AnyCodable.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotKit/BonjourEscapes.swift
|
../shared/MoltbotKit/Sources/MoltbotKit/BonjourEscapes.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotKit/BonjourTypes.swift
|
../shared/MoltbotKit/Sources/MoltbotKit/BonjourTypes.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotKit/BridgeFrames.swift
|
../shared/MoltbotKit/Sources/MoltbotKit/BridgeFrames.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotKit/CameraCommands.swift
|
../shared/MoltbotKit/Sources/MoltbotKit/CameraCommands.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotKit/CanvasA2UIAction.swift
|
../shared/MoltbotKit/Sources/MoltbotKit/CanvasA2UIAction.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotKit/CanvasA2UICommands.swift
|
../shared/MoltbotKit/Sources/MoltbotKit/CanvasA2UICommands.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotKit/CanvasA2UIJSONL.swift
|
../shared/MoltbotKit/Sources/MoltbotKit/CanvasA2UIJSONL.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotKit/CanvasCommandParams.swift
|
../shared/MoltbotKit/Sources/MoltbotKit/CanvasCommandParams.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotKit/CanvasCommands.swift
|
../shared/MoltbotKit/Sources/MoltbotKit/CanvasCommands.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotKit/Capabilities.swift
|
../shared/MoltbotKit/Sources/MoltbotKit/Capabilities.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotKit/ClawdbotKitResources.swift
|
../shared/MoltbotKit/Sources/MoltbotKit/ClawdbotKitResources.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotKit/DeepLinks.swift
|
../shared/MoltbotKit/Sources/MoltbotKit/DeepLinks.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotKit/JPEGTranscoder.swift
|
../shared/MoltbotKit/Sources/MoltbotKit/JPEGTranscoder.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotKit/NodeError.swift
|
../shared/MoltbotKit/Sources/MoltbotKit/NodeError.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotKit/ScreenCommands.swift
|
../shared/MoltbotKit/Sources/MoltbotKit/ScreenCommands.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotKit/StoragePaths.swift
|
../shared/MoltbotKit/Sources/MoltbotKit/StoragePaths.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotKit/SystemCommands.swift
|
../shared/MoltbotKit/Sources/MoltbotKit/SystemCommands.swift
|
||||||
../shared/ClawdbotKit/Sources/ClawdbotKit/TalkDirective.swift
|
../shared/MoltbotKit/Sources/MoltbotKit/TalkDirective.swift
|
||||||
../../Swabble/Sources/SwabbleKit/WakeWordGate.swift
|
../../Swabble/Sources/SwabbleKit/WakeWordGate.swift
|
||||||
Sources/Voice/TalkModeManager.swift
|
Sources/Voice/TalkModeManager.swift
|
||||||
Sources/Voice/TalkOrbOverlay.swift
|
Sources/Voice/TalkOrbOverlay.swift
|
||||||
|
|||||||
@ -11,7 +11,7 @@ settings:
|
|||||||
|
|
||||||
packages:
|
packages:
|
||||||
MoltbotKit:
|
MoltbotKit:
|
||||||
path: ../shared/ClawdbotKit
|
path: ../shared/MoltbotKit
|
||||||
Swabble:
|
Swabble:
|
||||||
path: ../../Swabble
|
path: ../../Swabble
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"originHash" : "f847d54db16b371dbb1a79271d50436cdec572179b0f0cf14cfe1b75df8dfbc2",
|
"originHash" : "c86f22da7772193c6f161fc9db81747cc00c8b8c96b45f9479de1e65c2c4b17e",
|
||||||
"pins" : [
|
"pins" : [
|
||||||
{
|
{
|
||||||
"identity" : "axorcist",
|
"identity" : "axorcist",
|
||||||
@ -24,7 +24,7 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/steipete/ElevenLabsKit",
|
"location" : "https://github.com/steipete/ElevenLabsKit",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "c8679fbd37416a8780fe43be88a497ff16209e2d",
|
"revision" : "7e3c948d8340abe3977014f3de020edf221e9269",
|
||||||
"version" : "0.1.0"
|
"version" : "0.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -78,8 +78,8 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/apple/swift-log.git",
|
"location" : "https://github.com/apple/swift-log.git",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "bc386b95f2a16ccd0150a8235e7c69eab2b866ca",
|
"revision" : "2778fd4e5a12a8aaa30a3ee8285f4ce54c5f3181",
|
||||||
"version" : "1.8.0"
|
"version" : "1.9.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -96,8 +96,8 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/swiftlang/swift-subprocess.git",
|
"location" : "https://github.com/swiftlang/swift-subprocess.git",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "44922dfe46380cd354ca4b0208e717a3e92b13dd",
|
"revision" : "ba5888ad7758cbcbe7abebac37860b1652af2d9c",
|
||||||
"version" : "0.2.1"
|
"version" : "0.3.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -105,8 +105,8 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/apple/swift-system",
|
"location" : "https://github.com/apple/swift-system",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "395a77f0aa927f0ff73941d7ac35f2b46d47c9db",
|
"revision" : "7c6ad0fc39d0763e0b699210e4124afd5041c5df",
|
||||||
"version" : "1.6.3"
|
"version" : "1.6.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -20,7 +20,7 @@ let package = Package(
|
|||||||
.package(url: "https://github.com/apple/swift-log.git", from: "1.8.0"),
|
.package(url: "https://github.com/apple/swift-log.git", from: "1.8.0"),
|
||||||
.package(url: "https://github.com/sparkle-project/Sparkle", from: "2.8.1"),
|
.package(url: "https://github.com/sparkle-project/Sparkle", from: "2.8.1"),
|
||||||
.package(url: "https://github.com/steipete/Peekaboo.git", branch: "main"),
|
.package(url: "https://github.com/steipete/Peekaboo.git", branch: "main"),
|
||||||
.package(path: "../shared/ClawdbotKit"),
|
.package(path: "../shared/MoltbotKit"),
|
||||||
.package(path: "../../Swabble"),
|
.package(path: "../../Swabble"),
|
||||||
],
|
],
|
||||||
targets: [
|
targets: [
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# Clawdbot macOS app (dev + signing)
|
# Moltbot macOS app (dev + signing)
|
||||||
|
|
||||||
## Quick dev run
|
## Quick dev run
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ scripts/restart-mac.sh --sign # force code signing (requires cert)
|
|||||||
scripts/package-mac-app.sh
|
scripts/package-mac-app.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
Creates `dist/Clawdbot.app` and signs it via `scripts/codesign-mac-app.sh`.
|
Creates `dist/Moltbot.app` and signs it via `scripts/codesign-mac-app.sh`.
|
||||||
|
|
||||||
## Signing behavior
|
## Signing behavior
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import Foundation
|
|||||||
import OSLog
|
import OSLog
|
||||||
|
|
||||||
enum AgentWorkspace {
|
enum AgentWorkspace {
|
||||||
private static let logger = Logger(subsystem: "com.clawdbot", category: "workspace")
|
private static let logger = Logger(subsystem: "bot.molt", category: "workspace")
|
||||||
static let agentsFilename = "AGENTS.md"
|
static let agentsFilename = "AGENTS.md"
|
||||||
static let soulFilename = "SOUL.md"
|
static let soulFilename = "SOUL.md"
|
||||||
static let identityFilename = "IDENTITY.md"
|
static let identityFilename = "IDENTITY.md"
|
||||||
@ -58,7 +58,7 @@ enum AnthropicAuthResolver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum AnthropicOAuth {
|
enum AnthropicOAuth {
|
||||||
private static let logger = Logger(subsystem: "com.clawdbot", category: "anthropic-oauth")
|
private static let logger = Logger(subsystem: "bot.molt", category: "anthropic-oauth")
|
||||||
|
|
||||||
private static let clientId = "9d1c250a-e61b-44d9-88ed-5944d1962f5e"
|
private static let clientId = "9d1c250a-e61b-44d9-88ed-5944d1962f5e"
|
||||||
private static let authorizeURL = URL(string: "https://claude.ai/oauth/authorize")!
|
private static let authorizeURL = URL(string: "https://claude.ai/oauth/authorize")!
|
||||||
@ -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
|
||||||
{
|
{
|
||||||
@ -3,7 +3,7 @@ import Foundation
|
|||||||
import OSLog
|
import OSLog
|
||||||
|
|
||||||
final class AudioInputDeviceObserver {
|
final class AudioInputDeviceObserver {
|
||||||
private let logger = Logger(subsystem: "com.clawdbot", category: "audio.devices")
|
private let logger = Logger(subsystem: "bot.molt", category: "audio.devices")
|
||||||
private var isActive = false
|
private var isActive = false
|
||||||
private var devicesListener: AudioObjectPropertyListenerBlock?
|
private var devicesListener: AudioObjectPropertyListenerBlock?
|
||||||
private var defaultInputListener: AudioObjectPropertyListenerBlock?
|
private var defaultInputListener: AudioObjectPropertyListenerBlock?
|
||||||
@ -5,7 +5,7 @@ import OSLog
|
|||||||
@MainActor
|
@MainActor
|
||||||
final class CLIInstallPrompter {
|
final class CLIInstallPrompter {
|
||||||
static let shared = CLIInstallPrompter()
|
static let shared = CLIInstallPrompter()
|
||||||
private let logger = Logger(subsystem: "com.clawdbot", category: "cli.prompt")
|
private let logger = Logger(subsystem: "bot.molt", category: "cli.prompt")
|
||||||
private var isPrompting = false
|
private var isPrompting = false
|
||||||
|
|
||||||
func checkAndPromptIfNeeded(reason: String) {
|
func checkAndPromptIfNeeded(reason: String) {
|
||||||
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ actor CameraCaptureService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private let logger = Logger(subsystem: "com.clawdbot", category: "camera")
|
private let logger = Logger(subsystem: "bot.molt", category: "camera")
|
||||||
|
|
||||||
func listDevices() -> [CameraDeviceInfo] {
|
func listDevices() -> [CameraDeviceInfo] {
|
||||||
Self.availableCameras().map { device in
|
Self.availableCameras().map { device in
|
||||||
@ -10,7 +10,7 @@ final class CanvasFileWatcher: @unchecked Sendable {
|
|||||||
|
|
||||||
init(url: URL, onChange: @escaping () -> Void) {
|
init(url: URL, onChange: @escaping () -> Void) {
|
||||||
self.url = url
|
self.url = url
|
||||||
self.queue = DispatchQueue(label: "com.clawdbot.canvaswatcher")
|
self.queue = DispatchQueue(label: "bot.molt.canvaswatcher")
|
||||||
self.onChange = onChange
|
self.onChange = onChange
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8,7 +8,7 @@ import OSLog
|
|||||||
final class CanvasManager {
|
final class CanvasManager {
|
||||||
static let shared = CanvasManager()
|
static let shared = CanvasManager()
|
||||||
|
|
||||||
private static let logger = Logger(subsystem: "com.clawdbot", category: "CanvasManager")
|
private static let logger = Logger(subsystem: "bot.molt", category: "CanvasManager")
|
||||||
|
|
||||||
private var panelController: CanvasWindowController?
|
private var panelController: CanvasWindowController?
|
||||||
private var panelSessionKey: String?
|
private var panelSessionKey: String?
|
||||||
@ -3,7 +3,7 @@ import Foundation
|
|||||||
import OSLog
|
import OSLog
|
||||||
import WebKit
|
import WebKit
|
||||||
|
|
||||||
private let canvasLogger = Logger(subsystem: "com.clawdbot", category: "Canvas")
|
private let canvasLogger = Logger(subsystem: "bot.molt", category: "Canvas")
|
||||||
|
|
||||||
final class CanvasSchemeHandler: NSObject, WKURLSchemeHandler {
|
final class CanvasSchemeHandler: NSObject, WKURLSchemeHandler {
|
||||||
private let root: URL
|
private let root: URL
|
||||||
@ -1,6 +1,6 @@
|
|||||||
import AppKit
|
import AppKit
|
||||||
|
|
||||||
let canvasWindowLogger = Logger(subsystem: "com.clawdbot", category: "Canvas")
|
let canvasWindowLogger = Logger(subsystem: "bot.molt", category: "Canvas")
|
||||||
|
|
||||||
enum CanvasLayout {
|
enum CanvasLayout {
|
||||||
static let panelSize = NSSize(width: 520, height: 680)
|
static let panelSize = NSSize(width: 520, height: 680)
|
||||||
@ -2,7 +2,7 @@ import MoltbotProtocol
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
enum MoltbotConfigFile {
|
enum MoltbotConfigFile {
|
||||||
private static let logger = Logger(subsystem: "com.clawdbot", category: "config")
|
private static let logger = Logger(subsystem: "bot.molt", category: "config")
|
||||||
|
|
||||||
static func url() -> URL {
|
static func url() -> URL {
|
||||||
MoltbotPaths.configURL
|
MoltbotPaths.configURL
|
||||||
@ -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,
|
||||||
@ -13,7 +13,7 @@ final class ConfigFileWatcher: @unchecked Sendable {
|
|||||||
|
|
||||||
init(url: URL, onChange: @escaping () -> Void) {
|
init(url: URL, onChange: @escaping () -> Void) {
|
||||||
self.url = url
|
self.url = url
|
||||||
self.queue = DispatchQueue(label: "com.clawdbot.configwatcher")
|
self.queue = DispatchQueue(label: "bot.molt.configwatcher")
|
||||||
self.onChange = onChange
|
self.onChange = onChange
|
||||||
self.watchedDir = url.deletingLastPathComponent()
|
self.watchedDir = url.deletingLastPathComponent()
|
||||||
self.targetPath = url.path
|
self.targetPath = url.path
|
||||||
@ -5,7 +5,7 @@ import OSLog
|
|||||||
final class ConnectionModeCoordinator {
|
final class ConnectionModeCoordinator {
|
||||||
static let shared = ConnectionModeCoordinator()
|
static let shared = ConnectionModeCoordinator()
|
||||||
|
|
||||||
private let logger = Logger(subsystem: "com.clawdbot", category: "connection")
|
private let logger = Logger(subsystem: "bot.molt", category: "connection")
|
||||||
private var lastMode: AppState.ConnectionMode?
|
private var lastMode: AppState.ConnectionMode?
|
||||||
|
|
||||||
/// Apply the requested connection mode by starting/stopping local gateway,
|
/// Apply the requested connection mode by starting/stopping local gateway,
|
||||||
@ -1,7 +1,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
let launchdLabel = "com.clawdbot.mac"
|
let launchdLabel = "bot.molt.mac"
|
||||||
let gatewayLaunchdLabel = "com.clawdbot.gateway"
|
let gatewayLaunchdLabel = "bot.molt.gateway"
|
||||||
let onboardingVersionKey = "moltbot.onboardingVersion"
|
let onboardingVersionKey = "moltbot.onboardingVersion"
|
||||||
let currentOnboardingVersion = 7
|
let currentOnboardingVersion = 7
|
||||||
let pauseDefaultsKey = "moltbot.pauseEnabled"
|
let pauseDefaultsKey = "moltbot.pauseEnabled"
|
||||||
@ -76,7 +76,7 @@ final class ControlChannel {
|
|||||||
private(set) var lastPingMs: Double?
|
private(set) var lastPingMs: Double?
|
||||||
private(set) var authSourceLabel: String?
|
private(set) var authSourceLabel: String?
|
||||||
|
|
||||||
private let logger = Logger(subsystem: "com.clawdbot", category: "control")
|
private let logger = Logger(subsystem: "bot.molt", category: "control")
|
||||||
|
|
||||||
private var eventTask: Task<Void, Never>?
|
private var eventTask: Task<Void, Never>?
|
||||||
private var recoveryTask: Task<Void, Never>?
|
private var recoveryTask: Task<Void, Never>?
|
||||||
@ -22,7 +22,7 @@ final class CronJobsStore {
|
|||||||
var lastError: String?
|
var lastError: String?
|
||||||
var statusMessage: String?
|
var statusMessage: String?
|
||||||
|
|
||||||
private let logger = Logger(subsystem: "com.clawdbot", category: "cron.ui")
|
private let logger = Logger(subsystem: "bot.molt", category: "cron.ui")
|
||||||
private var refreshTask: Task<Void, Never>?
|
private var refreshTask: Task<Void, Never>?
|
||||||
private var runsTask: Task<Void, Never>?
|
private var runsTask: Task<Void, Never>?
|
||||||
private var eventTask: Task<Void, Never>?
|
private var eventTask: Task<Void, Never>?
|
||||||
@ -4,7 +4,7 @@ import Foundation
|
|||||||
import OSLog
|
import OSLog
|
||||||
import Security
|
import Security
|
||||||
|
|
||||||
private let deepLinkLogger = Logger(subsystem: "com.clawdbot", category: "DeepLink")
|
private let deepLinkLogger = Logger(subsystem: "bot.molt", category: "DeepLink")
|
||||||
|
|
||||||
@MainActor
|
@MainActor
|
||||||
final class DeepLinkHandler {
|
final class DeepLinkHandler {
|
||||||
@ -10,7 +10,7 @@ import OSLog
|
|||||||
final class DevicePairingApprovalPrompter {
|
final class DevicePairingApprovalPrompter {
|
||||||
static let shared = DevicePairingApprovalPrompter()
|
static let shared = DevicePairingApprovalPrompter()
|
||||||
|
|
||||||
private let logger = Logger(subsystem: "com.clawdbot", category: "device-pairing")
|
private let logger = Logger(subsystem: "bot.molt", category: "device-pairing")
|
||||||
private var task: Task<Void, Never>?
|
private var task: Task<Void, Never>?
|
||||||
private var isStopping = false
|
private var isStopping = false
|
||||||
private var isPresenting = false
|
private var isPresenting = false
|
||||||
@ -6,7 +6,7 @@ final class DockIconManager: NSObject, @unchecked Sendable {
|
|||||||
static let shared = DockIconManager()
|
static let shared = DockIconManager()
|
||||||
|
|
||||||
private var windowsObservation: NSKeyValueObservation?
|
private var windowsObservation: NSKeyValueObservation?
|
||||||
private let logger = Logger(subsystem: "com.clawdbot", category: "DockIconManager")
|
private let logger = Logger(subsystem: "bot.molt", category: "DockIconManager")
|
||||||
|
|
||||||
override private init() {
|
override private init() {
|
||||||
super.init()
|
super.init()
|
||||||
@ -189,7 +189,7 @@ struct ExecApprovalsResolvedDefaults {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum ExecApprovalsStore {
|
enum ExecApprovalsStore {
|
||||||
private static let logger = Logger(subsystem: "com.clawdbot", category: "exec-approvals")
|
private static let logger = Logger(subsystem: "bot.molt", category: "exec-approvals")
|
||||||
private static let defaultAgentId = "main"
|
private static let defaultAgentId = "main"
|
||||||
private static let defaultSecurity: ExecSecurity = .deny
|
private static let defaultSecurity: ExecSecurity = .deny
|
||||||
private static let defaultAsk: ExecAsk = .onMiss
|
private static let defaultAsk: ExecAsk = .onMiss
|
||||||
@ -8,7 +8,7 @@ import OSLog
|
|||||||
final class ExecApprovalsGatewayPrompter {
|
final class ExecApprovalsGatewayPrompter {
|
||||||
static let shared = ExecApprovalsGatewayPrompter()
|
static let shared = ExecApprovalsGatewayPrompter()
|
||||||
|
|
||||||
private let logger = Logger(subsystem: "com.clawdbot", category: "exec-approvals.gateway")
|
private let logger = Logger(subsystem: "bot.molt", category: "exec-approvals.gateway")
|
||||||
private var task: Task<Void, Never>?
|
private var task: Task<Void, Never>?
|
||||||
|
|
||||||
struct GatewayApprovalRequest: Codable, Sendable {
|
struct GatewayApprovalRequest: Codable, Sendable {
|
||||||
@ -589,7 +589,7 @@ private enum ExecHostExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private final class ExecApprovalsSocketServer: @unchecked Sendable {
|
private final class ExecApprovalsSocketServer: @unchecked Sendable {
|
||||||
private let logger = Logger(subsystem: "com.clawdbot", category: "exec-approvals.socket")
|
private let logger = Logger(subsystem: "bot.molt", category: "exec-approvals.socket")
|
||||||
private let socketPath: String
|
private let socketPath: String
|
||||||
private let token: String
|
private let token: String
|
||||||
private let onPrompt: @Sendable (ExecApprovalPromptRequest) async -> ExecApprovalDecision
|
private let onPrompt: @Sendable (ExecApprovalPromptRequest) async -> ExecApprovalDecision
|
||||||
@ -4,7 +4,7 @@ import MoltbotProtocol
|
|||||||
import Foundation
|
import Foundation
|
||||||
import OSLog
|
import OSLog
|
||||||
|
|
||||||
private let gatewayConnectionLogger = Logger(subsystem: "com.clawdbot", category: "gateway.connection")
|
private let gatewayConnectionLogger = Logger(subsystem: "bot.molt", category: "gateway.connection")
|
||||||
|
|
||||||
enum GatewayAgentChannel: String, Codable, CaseIterable, Sendable {
|
enum GatewayAgentChannel: String, Codable, CaseIterable, Sendable {
|
||||||
case last
|
case last
|
||||||
@ -7,7 +7,7 @@ import OSLog
|
|||||||
final class GatewayConnectivityCoordinator {
|
final class GatewayConnectivityCoordinator {
|
||||||
static let shared = GatewayConnectivityCoordinator()
|
static let shared = GatewayConnectivityCoordinator()
|
||||||
|
|
||||||
private let logger = Logger(subsystem: "com.clawdbot", category: "gateway.connectivity")
|
private let logger = Logger(subsystem: "bot.molt", category: "gateway.connectivity")
|
||||||
private var endpointTask: Task<Void, Never>?
|
private var endpointTask: Task<Void, Never>?
|
||||||
private var lastResolvedURL: URL?
|
private var lastResolvedURL: URL?
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ actor GatewayEndpointStore {
|
|||||||
"custom",
|
"custom",
|
||||||
]
|
]
|
||||||
private static let remoteConnectingDetail = "Connecting to remote gateway…"
|
private static let remoteConnectingDetail = "Connecting to remote gateway…"
|
||||||
private static let staticLogger = Logger(subsystem: "com.clawdbot", category: "gateway-endpoint")
|
private static let staticLogger = Logger(subsystem: "bot.molt", category: "gateway-endpoint")
|
||||||
private enum EnvOverrideWarningKind: Sendable {
|
private enum EnvOverrideWarningKind: Sendable {
|
||||||
case token
|
case token
|
||||||
case password
|
case password
|
||||||
@ -230,7 +230,7 @@ actor GatewayEndpointStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private let deps: Deps
|
private let deps: Deps
|
||||||
private let logger = Logger(subsystem: "com.clawdbot", category: "gateway-endpoint")
|
private let logger = Logger(subsystem: "bot.molt", category: "gateway-endpoint")
|
||||||
|
|
||||||
private var state: GatewayEndpointState
|
private var state: GatewayEndpointState
|
||||||
private var subscribers: [UUID: AsyncStream<GatewayEndpointState>.Continuation] = [:]
|
private var subscribers: [UUID: AsyncStream<GatewayEndpointState>.Continuation] = [:]
|
||||||
@ -68,7 +68,7 @@ struct GatewayCommandResolution {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum GatewayEnvironment {
|
enum GatewayEnvironment {
|
||||||
private static let logger = Logger(subsystem: "com.clawdbot", category: "gateway.env")
|
private static let logger = Logger(subsystem: "bot.molt", category: "gateway.env")
|
||||||
private static let supportedBindModes: Set<String> = ["loopback", "tailnet", "lan", "auto"]
|
private static let supportedBindModes: Set<String> = ["loopback", "tailnet", "lan", "auto"]
|
||||||
|
|
||||||
static func gatewayPort() -> Int {
|
static func gatewayPort() -> Int {
|
||||||
@ -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 {
|
||||||
@ -1,7 +1,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
enum GatewayLaunchAgentManager {
|
enum GatewayLaunchAgentManager {
|
||||||
private static let logger = Logger(subsystem: "com.clawdbot", category: "gateway.launchd")
|
private static let logger = Logger(subsystem: "bot.molt", category: "gateway.launchd")
|
||||||
private static let disableLaunchAgentMarker = ".clawdbot/disable-launchagent"
|
private static let disableLaunchAgentMarker = ".clawdbot/disable-launchagent"
|
||||||
|
|
||||||
private static var disableLaunchAgentMarkerURL: URL {
|
private static var disableLaunchAgentMarkerURL: URL {
|
||||||
@ -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.
|
||||||
@ -45,7 +45,7 @@ final class GatewayProcessManager {
|
|||||||
#if DEBUG
|
#if DEBUG
|
||||||
private var testingConnection: GatewayConnection?
|
private var testingConnection: GatewayConnection?
|
||||||
#endif
|
#endif
|
||||||
private let logger = Logger(subsystem: "com.clawdbot", category: "gateway.process")
|
private let logger = Logger(subsystem: "bot.molt", category: "gateway.process")
|
||||||
|
|
||||||
private let logLimit = 20000 // characters to keep in-memory
|
private let logLimit = 20000 // characters to keep in-memory
|
||||||
private let environmentRefreshMinInterval: TimeInterval = 30
|
private let environmentRefreshMinInterval: TimeInterval = 30
|
||||||
@ -72,7 +72,7 @@ enum HealthState: Equatable {
|
|||||||
final class HealthStore {
|
final class HealthStore {
|
||||||
static let shared = HealthStore()
|
static let shared = HealthStore()
|
||||||
|
|
||||||
private static let logger = Logger(subsystem: "com.clawdbot", category: "health")
|
private static let logger = Logger(subsystem: "bot.molt", category: "health")
|
||||||
|
|
||||||
private(set) var snapshot: HealthSnapshot?
|
private(set) var snapshot: HealthSnapshot?
|
||||||
private(set) var lastSuccess: Date?
|
private(set) var lastSuccess: Date?
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user