diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2da6cba62abd..7151f3a968ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2049,6 +2049,7 @@ jobs: CmuxBrowser CmuxCanvasUI CmuxCloudMachines + CmuxComputerUse CmuxCore CmuxRemoteDaemon CmuxRemoteWorkspace diff --git a/CLI/CMUXCLI+AgentHibernationSessionEnd.swift b/CLI/CMUXCLI+AgentHibernationSessionEnd.swift index 330ef7cfe9f3..c73cf3024061 100644 --- a/CLI/CMUXCLI+AgentHibernationSessionEnd.swift +++ b/CLI/CMUXCLI+AgentHibernationSessionEnd.swift @@ -1,4 +1,5 @@ import Foundation +import CmuxFoundation struct ClaudeHookProcessGeneration: Codable, Equatable { let pid: Int diff --git a/CLI/CodexTurnLedger.swift b/CLI/CodexTurnLedger.swift index d52791c52d5b..fee9178ae4a1 100644 --- a/CLI/CodexTurnLedger.swift +++ b/CLI/CodexTurnLedger.swift @@ -1,4 +1,5 @@ import Foundation +import CmuxFoundation /// Durable, bounded owner and settlement state for Codex hooks. /// diff --git a/CLI/CodexTurnLedgerModels.swift b/CLI/CodexTurnLedgerModels.swift index 47e0e8222885..484e802e1bdb 100644 --- a/CLI/CodexTurnLedgerModels.swift +++ b/CLI/CodexTurnLedgerModels.swift @@ -1,4 +1,5 @@ import Foundation +import CmuxFoundation /// The process identity carried by one Codex hook invocation. /// diff --git a/Packages/macOS/CmuxComputerUse/Package.swift b/Packages/macOS/CmuxComputerUse/Package.swift new file mode 100644 index 000000000000..0b9f1c3d75ec --- /dev/null +++ b/Packages/macOS/CmuxComputerUse/Package.swift @@ -0,0 +1,22 @@ +// swift-tools-version: 6.0 +import PackageDescription + +let package = Package( + name: "CmuxComputerUse", + platforms: [.macOS(.v14)], + products: [.library(name: "CmuxComputerUse", targets: ["CmuxComputerUse"])], + dependencies: [ + .package(path: "../CmuxControlSocket"), + .package(path: "../CmuxFoundation"), + .package(path: "../CmuxSettings") + ], + targets: [ + .target( + name: "CmuxComputerUse", + dependencies: ["CmuxControlSocket", "CmuxFoundation", "CmuxSettings"], + // Lane A preserves the executable target's language mode. + swiftSettings: [.swiftLanguageMode(.v5)] + ), + .testTarget(name: "CmuxComputerUseTests", dependencies: ["CmuxComputerUse"]) + ] +) diff --git a/Packages/macOS/CmuxComputerUse/README.md b/Packages/macOS/CmuxComputerUse/README.md new file mode 100644 index 000000000000..5b89a611b3f9 --- /dev/null +++ b/Packages/macOS/CmuxComputerUse/README.md @@ -0,0 +1,183 @@ +# CmuxComputerUse + +Lane A extraction of the dependency audit’s #1 cluster: **ComputerUseRuntime + dependency closure**. Baseline: `02f943788d7177b7998f200e3cbda22eae661c45`. The original cluster contains **11 files / 2,946 physical lines**, with **0 observed outgoing app-target blocking symbols** (0 / 2,946). Other zero-blocker clusters tie on that ratio; the report ranks this one first by lines moved. + +This package contains the existing helper runtime and its supporting process identity, cursor artwork, permission, path and session types. It preserves the existing function bodies and app-owned resources. + +## Every introduced boundary + +1. **Module:** `CmuxComputerUse`, a local library under `Packages/macOS/`, depending on the existing `CmuxControlSocket` and `CmuxSettings` packages. AppKit, Foundation, Darwin, Dispatch, CoreServices and Security remain SDK imports. +2. **Build wiring:** remove the 11 moved file references and their source-build entries; link the library to `cmux` and `cmuxTests` (the targets used by the `cmux` and `cmux-unit` schemes); regenerate workspace package membership. +3. **Consumers:** add `import CmuxComputerUse` to the 45 app source files listed below, and `@testable import CmuxComputerUse` to the 31 existing test files that name moved types. No umbrella re-export, forwarding shim or duplicated source is added. +4. **Visibility:** the exact declarations promoted to `public` are listed below. Helpers not consumed by the app stay internal/private; existing tests reach internals through `@testable`. +5. **Construction:** explicitly spell `ComputerUseSessionScope.init(id:driverSessionID:)`, assigning the same two stored properties as the previously synthesized memberwise initializer. Swift does not synthesize a public memberwise initializer across modules. +6. **Language mode:** compile the new target in Swift 5 mode, matching the executable target. This deliberately excludes a Swift 6 concurrency migration from the pure-move experiment. Existing namespace enums, cached icon state and lifecycle behavior are preserved. +7. **Resource ownership:** `ComputerUseHelperIcon.icns` and the bundled Computer Use helper stay in the executable bundle; `Bundle.main` lookups are unchanged. There is no new resource bundle or path injection. + +No new protocols, dependency-injection closures, adapters, managers, singleton accessors, forwarding functions or runtime branches were introduced. Doc comments accompany newly exported declarations. + +## Validation + +- `swift build --package-path Packages/macOS/CmuxComputerUse`: passed with Xcode Swift 6.2.4. +- `swift test --package-path Packages/macOS/CmuxComputerUse`: two Swift Testing tests passed (session matching/construction and permission-phase transitions). +- SwiftSyntax token comparison: all 11 moved files match the baseline after ignoring comments, `public` modifiers and the one explicitly documented memberwise initializer. +- Xcode project normalization, package grouping, lockfile policy and `git diff --check`: passed. +- Full app and `cmux-unit` build/test validation is still required. The available local environment has no configured Mac build fleet; standalone package success does not prove all host consumers compile. +- No user-visible strings or localization resources changed. + +## Reproduce on the Air + +Compare the baseline commit above against this branch. Use the same Xcode, configuration, package caches and derived-data policy for both runs. The package intentionally keeps the app’s language mode; performance differences must be measured, not inferred from this extraction. + +```sh +swift test --package-path Packages/macOS/CmuxComputerUse +./scripts/reload.sh --tag lane-a-cua +``` + +Run the `cmux-unit` scheme through the project’s remote/CI validation path as well; the standalone package tests do not compile the whole app test target. + +## Construction without the app + +```swift +import CmuxComputerUse +let scope = ComputerUseSessionScope(id: "row", driverSessionID: "session") +assert(scope.matches(driverSessionID: "session-mcp-child")) +``` + +## Moved files + +- `Sources/AgentPIDProcessIdentity.swift` → `Packages/macOS/CmuxFoundation/Sources/CmuxFoundation/Process/AgentPIDProcessIdentity.swift` (not this package: the file was a member of both the app and the `cmux-cli` target, and the CLI does not link `CmuxComputerUse`; `CmuxFoundation` is linked by both) +- `Sources/App/AgentCursorPointerView.swift` → `Sources/CmuxComputerUse/AgentCursorPointerView.swift` +- `Sources/App/ComputerUseDaemonProfile.swift` → `Sources/CmuxComputerUse/ComputerUseDaemonProfile.swift` +- `Sources/App/ComputerUseDaemonReadiness.swift` → `Sources/CmuxComputerUse/ComputerUseDaemonReadiness.swift` +- `Sources/App/ComputerUseHelperLaunchConfiguration.swift` → `Sources/CmuxComputerUse/ComputerUseHelperLaunchConfiguration.swift` +- `Sources/App/ComputerUsePermissionRequestOutcome.swift` → `Sources/CmuxComputerUse/ComputerUsePermissionRequestOutcome.swift` +- `Sources/App/ComputerUsePermissionStatus.swift` → `Sources/CmuxComputerUse/ComputerUsePermissionStatus.swift` +- `Sources/App/ComputerUseRuntimePaths.swift` → `Sources/CmuxComputerUse/ComputerUseRuntimePaths.swift` +- `Sources/App/ComputerUseRuntimePermissionPhase.swift` → `Sources/CmuxComputerUse/ComputerUseRuntimePermissionPhase.swift` +- `Sources/App/ComputerUseRuntimeService.swift` → `Sources/CmuxComputerUse/ComputerUseRuntimeService.swift` +- `Sources/App/ComputerUseSessionScope.swift` → `Sources/CmuxComputerUse/ComputerUseSessionScope.swift` + +## Public declarations + +Each entry is a visibility seam. The single new initializer is also the construction seam described above. Enum cases inherit their enclosing public enum’s visibility. + +- `AgentCursorPointerView.swift:83`: `public enum ComputerUseHelperIconRenderer {` +- `AgentCursorPointerView.swift:87`: `public static func image(darkMode: Bool? = nil) -> NSImage? {` +- `AgentCursorPointerView.swift:113`: `public final class AgentCursorPointerView: NSView {` +- `AgentCursorPointerView.swift:115`: `public override var isOpaque: Bool { false }` +- `AgentCursorPointerView.swift:117`: `public override var isFlipped: Bool { true }` +- `AgentCursorPointerView.swift:119`: `public override var acceptsFirstResponder: Bool { false }` +- `AgentCursorPointerView.swift:122`: `public override init(frame frameRect: NSRect) {` +- `AgentCursorPointerView.swift:134`: `public required init?(coder: NSCoder) {` +- `AgentCursorPointerView.swift:139`: `public override func viewDidMoveToWindow() {` +- `AgentCursorPointerView.swift:145`: `public override func viewDidChangeBackingProperties() {` +- `AgentCursorPointerView.swift:151`: `public override func hitTest(_ point: NSPoint) -> NSView? {` +- `AgentCursorPointerView.swift:160`: `public override func draw(_ dirtyRect: NSRect) {` +- `ComputerUsePermissionRequestOutcome.swift:2`: `public enum ComputerUseSystemPermission: String, Hashable, Sendable {` +- `ComputerUseRuntimePaths.swift:5`: `public struct ComputerUseRuntimePaths: Sendable {` +- `ComputerUseRuntimePaths.swift:7`: `public static let daemonSocketEnvironmentKey = "CMUX_CUA_SOCKET_PATH"` +- `ComputerUseRuntimePaths.swift:9`: `public static let codexDaemonSocketEnvironmentKey = "CMUX_CUA_CODEX_SOCKET_PATH"` +- `ComputerUseRuntimePaths.swift:11`: `public static let stateDirectoryEnvironmentKey = "CMUX_CUA_STATE_DIR"` +- `ComputerUseRuntimePaths.swift:13`: `public static let runtimeScopeEnvironmentKey = "CMUX_CUA_RUNTIME_SCOPE"` +- `ComputerUseRuntimePaths.swift:15`: `public static let clientExecutableEnvironmentKey = "CMUX_CUA_CLIENT_PATH"` +- `ComputerUseRuntimePaths.swift:17`: `public static let authenticationTokenEnvironmentKey = "CMUX_CUA_SOCKET_AUTH_TOKEN"` +- `ComputerUseRuntimePaths.swift:19`: `public static let hostAuthenticationTokenEnvironmentKey = "CMUX_CUA_SOCKET_HOST_AUTH_TOKEN"` +- `ComputerUseRuntimePaths.swift:21`: `public static let authenticationTokenFileEnvironmentKey = "CMUX_CUA_AUTH_TOKEN_FILE"` +- `ComputerUseRuntimePaths.swift:24`: `public let scope: String` +- `ComputerUseRuntimePaths.swift:26`: `public let authenticationToken: String` +- `ComputerUseRuntimePaths.swift:32`: `public let hostAuthenticationToken: String` +- `ComputerUseRuntimePaths.swift:34`: `public let computerUseDirectoryURL: URL` +- `ComputerUseRuntimePaths.swift:36`: `public let runtimeDirectoryURL: URL` +- `ComputerUseRuntimePaths.swift:38`: `public let daemonSocketURL: URL` +- `ComputerUseRuntimePaths.swift:40`: `public let codexDaemonSocketURL: URL` +- `ComputerUseRuntimePaths.swift:42`: `public let authenticationTokenFileURL: URL` +- `ComputerUseRuntimePaths.swift:44`: `public let stateDirectoryURL: URL` +- `ComputerUseRuntimePaths.swift:46`: `public let permissionDatabaseDirectoryURL: URL` +- `ComputerUseRuntimePaths.swift:48`: `public let installedHelperDirectoryURL: URL` +- `ComputerUseRuntimePaths.swift:50`: `public let installedHelperAppURL: URL` +- `ComputerUseRuntimePaths.swift:52`: `public let installedHelperExecutableURL: URL` +- `ComputerUseRuntimePaths.swift:55`: `public init(` +- `ComputerUseRuntimeService.swift:10`: `public enum ComputerUseDirectScreenCaptureVerification: Equatable, Sendable {` +- `ComputerUseRuntimeService.swift:22`: `public final class ComputerUseRuntimeService {` +- `ComputerUseRuntimeService.swift:30`: `public let applicationName: String` +- `ComputerUseRuntimeService.swift:32`: `public let stateAuthenticationKey: Data` +- `ComputerUseRuntimeService.swift:60`: `public init(` +- `ComputerUseRuntimeService.swift:95`: `public var helperAppURL: URL? {` +- `ComputerUseRuntimeService.swift:104`: `public var presentationIcon: NSImage? {` +- `ComputerUseRuntimeService.swift:161`: `public var stateDirectoryURL: URL {` +- `ComputerUseRuntimeService.swift:166`: `public func status() -> (accessibility: Bool, screenRecording: Bool) {` +- `ComputerUseRuntimeService.swift:171`: `public var permissionStatusIsKnown: Bool {` +- `ComputerUseRuntimeService.swift:178`: `public func setInitialOnboardingCompletion(_ completed: Bool) {` +- `ComputerUseRuntimeService.swift:184`: `public func onboardingWasPresented() {` +- `ComputerUseRuntimeService.swift:189`: `public func onboardingWasCompleted() {` +- `ComputerUseRuntimeService.swift:197`: `public nonisolated func permissionStatusEvents() -> AsyncStream {` +- `ComputerUseRuntimeService.swift:206`: `public func setEnabled(_ requested: Bool) async {` +- `ComputerUseRuntimeService.swift:235`: `public func ensureStandaloneHelperInstalled() async -> URL? {` +- `ComputerUseRuntimeService.swift:249`: `public func refreshHelperStatus() async -> (accessibility: Bool, screenRecording: Bool) {` +- `ComputerUseRuntimeService.swift:296`: `public func refreshHelperStatusAfterPermissionChange() async` +- `ComputerUseRuntimeService.swift:325`: `public func openAccessibilitySettings() async -> Bool {` +- `ComputerUseRuntimeService.swift:332`: `public func openScreenRecordingSettings() async -> Bool {` +- `ComputerUseRuntimeService.swift:444`: `public func verifyDirectScreenCaptureOutcome()` +- `ComputerUseRuntimeService.swift:549`: `public func endDriverSession(` +- `ComputerUseRuntimeService.swift:621`: `public func setDriverCursorVisible(` +- `ComputerUseRuntimeService.swift:700`: `public func reassertDriverCursor(` +- `ComputerUseRuntimeService.swift:910`: `public var helperBuildReplacedHandler: (@MainActor () -> Void)?` +- `ComputerUseRuntimeService.swift:1335`: `public func stopForTermination() {` +- `ComputerUseSessionScope.swift:4`: `public struct ComputerUseSessionScope: Sendable {` +- `ComputerUseSessionScope.swift:6`: `public let id: String` +- `ComputerUseSessionScope.swift:8`: `public let driverSessionID: String` +- `ComputerUseSessionScope.swift:14`: `public init(id: String, driverSessionID: String) {` +- `ComputerUseSessionScope.swift:20`: `public static func driverSessionID(surfaceID: UUID) -> String {` +- `ComputerUseSessionScope.swift:25`: `public static func isManagedDriverSessionID(_ candidate: String) -> Bool {` +- `ComputerUseSessionScope.swift:31`: `public static func driverSessionID(containing candidate: String) -> String? {` +- `ComputerUseSessionScope.swift:43`: `public static func isManagedProxySessionID(` +- `ComputerUseSessionScope.swift:56`: `public func matches(driverSessionID candidate: String?) -> Bool {` + +## App import sites + +- `Sources/AgentHibernationSessionEndResolution.swift` +- `Sources/AgentPortRootIdentity.swift` +- `Sources/App/AgentHibernationController+Confirmation.swift` +- `Sources/App/AgentHibernationController+ProcessExitWaiting.swift` +- `Sources/App/AgentHibernationController+ProcessSignaling.swift` +- `Sources/App/AgentHibernationController+ProcessTermination.swift` +- `Sources/App/AgentHibernationController+SessionEndIntent.swift` +- `Sources/App/AgentHibernationController.swift` +- `Sources/App/AgentHibernationProcessExitEpoch.swift` +- `Sources/App/AgentHibernationProcessSnapshotCoordinator.swift` +- `Sources/App/ComputerUseCuaState.swift` +- `Sources/App/ComputerUseCursorOverlayController.swift` +- `Sources/App/ComputerUseLiveDriverSession.swift` +- `Sources/App/ComputerUseLiveSessionProjection.swift` +- `Sources/App/ComputerUseMenuBarController.swift` +- `Sources/App/ComputerUseMenuBarRow.swift` +- `Sources/App/ComputerUseMenuBarSnapshotStore.swift` +- `Sources/App/ComputerUseOnboardingView.swift` +- `Sources/App/ComputerUseOnboardingWindowController.swift` +- `Sources/App/ComputerUseStateRepository.swift` +- `Sources/App/ComputerUseUXCoordinator.swift` +- `Sources/App/ComputerUseWatchTargetController.swift` +- `Sources/AppDelegate.swift` +- `Sources/DockSplitStore+SessionSnapshot.swift` +- `Sources/HostSettingsActions.swift` +- `Sources/LiveAgentSessionOwner.swift` +- `Sources/LiveAgentSessionOwnerIndex.swift` +- `Sources/LiveAgentSessionOwnerObservation.swift` +- `Sources/PIDPresence.swift` +- `Sources/PortScanner+Process.swift` +- `Sources/PortScanner+Publication.swift` +- `Sources/PortScanner.swift` +- `Sources/RestorableAgentProcessLiveness+ProcessIdentity.swift` +- `Sources/RestorableAgentSession.swift` +- `Sources/RestoredAgentCompletedGeneration.swift` +- `Sources/RestoredAgentLifecycleCoordinator.swift` +- `Sources/RestoredAgentLiveness.swift` +- `Sources/SharedLiveAgentIndexLoader.swift` +- `Sources/TerminalTTYSessionIdentity.swift` +- `Sources/VaultAgentProcessScanner+ForkParentFallback.swift` +- `Sources/Workspace+DetachedSurfaceTransfer.swift` +- `Sources/Workspace+PanelLifecycle.swift` +- `Sources/Workspace.swift` +- `Sources/WorkspaceSidebarAgentRuntimeObservationModel.swift` +- `Sources/cmuxApp.swift` diff --git a/Sources/App/AgentCursorPointerView.swift b/Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/AgentCursorPointerView.swift similarity index 80% rename from Sources/App/AgentCursorPointerView.swift rename to Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/AgentCursorPointerView.swift index fb3b10be82b9..05690bff6575 100644 --- a/Sources/App/AgentCursorPointerView.swift +++ b/Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/AgentCursorPointerView.swift @@ -80,10 +80,11 @@ private enum ComputerUseCursorArtwork { /// records translation 257.8472/257.8472, scale 45.7900, roundness 16.5, and a /// 59% gradient midpoint. @MainActor -enum ComputerUseHelperIconRenderer { +public enum ComputerUseHelperIconRenderer { private static var cachedImage: NSImage? - static func image(darkMode: Bool? = nil) -> NSImage? { + /// The image exposed to the host application. + public static func image(darkMode: Bool? = nil) -> NSImage? { // Icon Composer owns appearance, mask, plate, rim, and lighting. Keep // this parameter for call-site compatibility while the source has one // shared macOS rendition. @@ -109,12 +110,16 @@ enum ComputerUseHelperIconRenderer { /// with the cmux brand gradient (#12c7f5 -> #2d8cff -> #6c5cff) and a white /// outline, as a stable AppKit view. @MainActor -final class AgentCursorPointerView: NSView { - override var isOpaque: Bool { false } - override var isFlipped: Bool { true } - override var acceptsFirstResponder: Bool { false } +public final class AgentCursorPointerView: NSView { + /// The is opaque exposed to the host application. + public override var isOpaque: Bool { false } + /// The is flipped exposed to the host application. + public override var isFlipped: Bool { true } + /// The accepts first responder exposed to the host application. + public override var acceptsFirstResponder: Bool { false } - override init(frame frameRect: NSRect) { + /// Creates a AgentCursorPointerView with the supplied values. + public override init(frame frameRect: NSRect) { super.init(frame: frameRect) wantsLayer = true layer?.masksToBounds = false @@ -124,22 +129,26 @@ final class AgentCursorPointerView: NSView { setAccessibilityElement(false) } + /// Creates a AgentCursorPointerView with the supplied values. @available(*, unavailable) - required init?(coder: NSCoder) { + public required init?(coder: NSCoder) { nil } - override func viewDidMoveToWindow() { + /// The view did move to window exposed to the host application. + public override func viewDidMoveToWindow() { super.viewDidMoveToWindow() needsDisplay = true } - override func viewDidChangeBackingProperties() { + /// The view did change backing properties exposed to the host application. + public override func viewDidChangeBackingProperties() { super.viewDidChangeBackingProperties() needsDisplay = true } - override func hitTest(_ point: NSPoint) -> NSView? { + /// The hit test exposed to the host application. + public override func hitTest(_ point: NSPoint) -> NSView? { nil } @@ -147,7 +156,8 @@ final class AgentCursorPointerView: NSView { /// silhouette occupies ~11.2 units of that box, so this renders a ~17pt cursor. private static let skyScale: CGFloat = 1.5 - override func draw(_ dirtyRect: NSRect) { + /// The draw exposed to the host application. + public override func draw(_ dirtyRect: NSRect) { guard let context = NSGraphicsContext.current?.cgContext else { return } // The icon renderer calls this same path/gradient without an outline; diff --git a/Sources/App/ComputerUseDaemonProfile.swift b/Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/ComputerUseDaemonProfile.swift similarity index 100% rename from Sources/App/ComputerUseDaemonProfile.swift rename to Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/ComputerUseDaemonProfile.swift diff --git a/Sources/App/ComputerUseDaemonReadiness.swift b/Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/ComputerUseDaemonReadiness.swift similarity index 100% rename from Sources/App/ComputerUseDaemonReadiness.swift rename to Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/ComputerUseDaemonReadiness.swift diff --git a/Sources/App/ComputerUseHelperLaunchConfiguration.swift b/Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/ComputerUseHelperLaunchConfiguration.swift similarity index 99% rename from Sources/App/ComputerUseHelperLaunchConfiguration.swift rename to Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/ComputerUseHelperLaunchConfiguration.swift index ddafbec1a28d..60a84a22e648 100644 --- a/Sources/App/ComputerUseHelperLaunchConfiguration.swift +++ b/Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/ComputerUseHelperLaunchConfiguration.swift @@ -1,4 +1,5 @@ import Foundation +import CmuxFoundation /// LaunchServices arguments and environment for the cmux-cua helper daemon. struct ComputerUseHelperLaunchConfiguration: Equatable, Sendable { diff --git a/Sources/App/ComputerUsePermissionRequestOutcome.swift b/Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/ComputerUsePermissionRequestOutcome.swift similarity index 87% rename from Sources/App/ComputerUsePermissionRequestOutcome.swift rename to Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/ComputerUsePermissionRequestOutcome.swift index 2c99748b78dc..5511c6d15df6 100644 --- a/Sources/App/ComputerUsePermissionRequestOutcome.swift +++ b/Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/ComputerUsePermissionRequestOutcome.swift @@ -1,5 +1,5 @@ /// A macOS permission owned by the standalone Computer Use helper. -enum ComputerUseSystemPermission: String, Hashable, Sendable { +public enum ComputerUseSystemPermission: String, Hashable, Sendable { case accessibility case screenRecording = "screen_recording" } diff --git a/Sources/App/ComputerUsePermissionStatus.swift b/Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/ComputerUsePermissionStatus.swift similarity index 100% rename from Sources/App/ComputerUsePermissionStatus.swift rename to Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/ComputerUsePermissionStatus.swift diff --git a/Sources/App/ComputerUseRuntimePaths.swift b/Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/ComputerUseRuntimePaths.swift similarity index 75% rename from Sources/App/ComputerUseRuntimePaths.swift rename to Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/ComputerUseRuntimePaths.swift index 9c147cda69ea..2f57a85238d5 100644 --- a/Sources/App/ComputerUseRuntimePaths.swift +++ b/Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/ComputerUseRuntimePaths.swift @@ -2,36 +2,57 @@ import Darwin import Foundation /// Filesystem paths shared by the app-owned cmux-cua runtime and agent wrappers. -struct ComputerUseRuntimePaths: Sendable { - static let daemonSocketEnvironmentKey = "CMUX_CUA_SOCKET_PATH" - static let codexDaemonSocketEnvironmentKey = "CMUX_CUA_CODEX_SOCKET_PATH" - static let stateDirectoryEnvironmentKey = "CMUX_CUA_STATE_DIR" - static let runtimeScopeEnvironmentKey = "CMUX_CUA_RUNTIME_SCOPE" - static let clientExecutableEnvironmentKey = "CMUX_CUA_CLIENT_PATH" - static let authenticationTokenEnvironmentKey = "CMUX_CUA_SOCKET_AUTH_TOKEN" - static let hostAuthenticationTokenEnvironmentKey = "CMUX_CUA_SOCKET_HOST_AUTH_TOKEN" - static let authenticationTokenFileEnvironmentKey = "CMUX_CUA_AUTH_TOKEN_FILE" +public struct ComputerUseRuntimePaths: Sendable { + /// The daemon socket environment key exposed to the host application. + public static let daemonSocketEnvironmentKey = "CMUX_CUA_SOCKET_PATH" + /// The codex daemon socket environment key exposed to the host application. + public static let codexDaemonSocketEnvironmentKey = "CMUX_CUA_CODEX_SOCKET_PATH" + /// The state directory environment key exposed to the host application. + public static let stateDirectoryEnvironmentKey = "CMUX_CUA_STATE_DIR" + /// The runtime scope environment key exposed to the host application. + public static let runtimeScopeEnvironmentKey = "CMUX_CUA_RUNTIME_SCOPE" + /// The client executable environment key exposed to the host application. + public static let clientExecutableEnvironmentKey = "CMUX_CUA_CLIENT_PATH" + /// The authentication token environment key exposed to the host application. + public static let authenticationTokenEnvironmentKey = "CMUX_CUA_SOCKET_AUTH_TOKEN" + /// The host authentication token environment key exposed to the host application. + public static let hostAuthenticationTokenEnvironmentKey = "CMUX_CUA_SOCKET_HOST_AUTH_TOKEN" + /// The authentication token file environment key exposed to the host application. + public static let authenticationTokenFileEnvironmentKey = "CMUX_CUA_AUTH_TOKEN_FILE" - let scope: String - let authenticationToken: String + /// The scope exposed to the host application. + public let scope: String + /// The authentication token exposed to the host application. + public let authenticationToken: String /// Ephemeral capability reserved for host-only daemon operations. /// /// Unlike `authenticationToken`, this is never persisted or exposed to /// terminal agents. A new cmux process therefore has to replace or relaunch /// an orphaned helper before it can configure or stop that helper. - let hostAuthenticationToken: String - let computerUseDirectoryURL: URL - let runtimeDirectoryURL: URL - let daemonSocketURL: URL - let codexDaemonSocketURL: URL - let authenticationTokenFileURL: URL - let stateDirectoryURL: URL - let permissionDatabaseDirectoryURL: URL - let installedHelperDirectoryURL: URL - let installedHelperAppURL: URL - let installedHelperExecutableURL: URL + public let hostAuthenticationToken: String + /// The computer use directory url exposed to the host application. + public let computerUseDirectoryURL: URL + /// The runtime directory url exposed to the host application. + public let runtimeDirectoryURL: URL + /// The daemon socket url exposed to the host application. + public let daemonSocketURL: URL + /// The codex daemon socket url exposed to the host application. + public let codexDaemonSocketURL: URL + /// The authentication token file url exposed to the host application. + public let authenticationTokenFileURL: URL + /// The state directory url exposed to the host application. + public let stateDirectoryURL: URL + /// The permission database directory url exposed to the host application. + public let permissionDatabaseDirectoryURL: URL + /// The installed helper directory url exposed to the host application. + public let installedHelperDirectoryURL: URL + /// The installed helper app url exposed to the host application. + public let installedHelperAppURL: URL + /// The installed helper executable url exposed to the host application. + public let installedHelperExecutableURL: URL - init( + /// Creates a ComputerUseRuntimePaths with the supplied values. + public init( homeDirectoryURL: URL = FileManager.default.homeDirectoryForCurrentUser, socketRootDirectoryURL: URL = FileManager.default.temporaryDirectory, userIdentifier: uid_t = getuid(), diff --git a/Sources/App/ComputerUseRuntimePermissionPhase.swift b/Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/ComputerUseRuntimePermissionPhase.swift similarity index 100% rename from Sources/App/ComputerUseRuntimePermissionPhase.swift rename to Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/ComputerUseRuntimePermissionPhase.swift diff --git a/Sources/App/ComputerUseRuntimeService.swift b/Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/ComputerUseRuntimeService.swift similarity index 97% rename from Sources/App/ComputerUseRuntimeService.swift rename to Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/ComputerUseRuntimeService.swift index 6ac48eaae57d..56e9878f2766 100644 --- a/Sources/App/ComputerUseRuntimeService.swift +++ b/Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/ComputerUseRuntimeService.swift @@ -5,8 +5,10 @@ import CoreServices import Darwin import Foundation import Security +import CmuxFoundation -enum ComputerUseDirectScreenCaptureVerification: Equatable, Sendable { +/// The computer use direct screen capture verification exposed to the host application. +public enum ComputerUseDirectScreenCaptureVerification: Equatable, Sendable { case ready case notCapturable case unavailable @@ -18,15 +20,17 @@ enum ComputerUseDirectScreenCaptureVerification: Equatable, Sendable { /// driver binary. It installs the helper, launches that app through /// LaunchServices, and reads permission status exclusively over the daemon UDS. @MainActor -final class ComputerUseRuntimeService { +public final class ComputerUseRuntimeService { static let helperAppName = "cmux Computer Use" nonisolated private static let helperExecutableName = "cmux-cua" private static let systemSettingsBundleIdentifier = "com.apple.systempreferences" let paths: ComputerUseRuntimePaths - let applicationName: String - let stateAuthenticationKey: Data + /// The application name exposed to the host application. + public let applicationName: String + /// The state authentication key exposed to the host application. + public let stateAuthenticationKey: Data private let bundledHelperAppURL: URL? private let transport: SocketTransport @@ -53,7 +57,8 @@ final class ComputerUseRuntimeService { /// `DisableComputerUse` (MDM), read on every enable and start. private let isDisabledByPolicy: () -> Bool - init( + /// Creates a ComputerUseRuntimeService with the supplied values. + public init( bundle: Bundle = .main, paths: ComputerUseRuntimePaths = ComputerUseRuntimePaths(), transport: SocketTransport = SocketTransport(), @@ -87,7 +92,8 @@ final class ComputerUseRuntimeService { readinessPublicationTask?.cancel() } - var helperAppURL: URL? { + /// The helper app url exposed to the host application. + public var helperAppURL: URL? { installedHelperURL } @@ -96,7 +102,7 @@ final class ComputerUseRuntimeService { /// Keep `helperAppURL` restricted to the installed helper because permission /// interactions need that independently registered URL. Presentation can use /// the identical nested app immediately, avoiding a generic first frame. - var presentationIcon: NSImage? { + public var presentationIcon: NSImage? { let candidate = installedHelperURL ?? bundledHelperAppURL let darkMode = NSApp.effectiveAppearance.bestMatch( from: [.darkAqua, .aqua] @@ -152,31 +158,36 @@ final class ComputerUseRuntimeService { return status == noErr } - var stateDirectoryURL: URL { + /// The state directory url exposed to the host application. + public var stateDirectoryURL: URL { paths.stateDirectoryURL } - func status() -> (accessibility: Bool, screenRecording: Bool) { + /// The status exposed to the host application. + public func status() -> (accessibility: Bool, screenRecording: Bool) { (cachedStatus.accessibility, cachedStatus.screenRecording) } - var permissionStatusIsKnown: Bool { + /// The permission status is known exposed to the host application. + public var permissionStatusIsKnown: Bool { cachedStatus.isKnown } /// Seeds the host gate from the capture verification persisted by the last /// completed onboarding run. This is called before the enabled setting is /// reconciled, so starting the helper can publish the correct first value. - func setInitialOnboardingCompletion(_ completed: Bool) { + public func setInitialOnboardingCompletion(_ completed: Bool) { guard !desiredEnabled else { return } permissionPhase = .disabled(onboardingComplete: completed) } - func onboardingWasPresented() { + /// The onboarding was presented exposed to the host application. + public func onboardingWasPresented() { transitionPermissionPhase(.onboardingPresented) } - func onboardingWasCompleted() { + /// The onboarding was completed exposed to the host application. + public func onboardingWasCompleted() { transitionPermissionPhase(.onboardingCompleted) } @@ -184,7 +195,7 @@ final class ComputerUseRuntimeService { /// /// The event is only a refresh trigger; the helper remains the sole /// authority for whether either permission is actually granted. - nonisolated func permissionStatusEvents() -> AsyncStream { + public nonisolated func permissionStatusEvents() -> AsyncStream { let directoryURL = paths.permissionDatabaseDirectoryURL return Self.mergedFileSystemEvents(at: [ directoryURL, @@ -193,7 +204,7 @@ final class ComputerUseRuntimeService { } /// Reconciles the helper daemon with the live `computerUse.enabled` setting. - func setEnabled(_ requested: Bool) async { + public func setEnabled(_ requested: Bool) async { // `DisableComputerUse` (MDM) wins over the user setting on every apply; // the managed-policy extension re-applies on a transition. let newValue = requested && !isDisabledByPolicy() @@ -222,7 +233,7 @@ final class ComputerUseRuntimeService { /// Installs the nested helper at its independently registered top-level URL. @discardableResult - func ensureStandaloneHelperInstalled() async -> URL? { + public func ensureStandaloneHelperInstalled() async -> URL? { await serializeHelperLifecycle(cancelledResult: nil as URL?) { [weak self] in guard let self else { return nil } return await self.ensureStandaloneHelperInstalledWithinLifecycle() @@ -236,7 +247,7 @@ final class ComputerUseRuntimeService { /// helper: opening Settings is not authorization to override the enabled /// preference or interrupt an active Computer Use request. @discardableResult - func refreshHelperStatus() async -> (accessibility: Bool, screenRecording: Bool) { + public func refreshHelperStatus() async -> (accessibility: Bool, screenRecording: Bool) { guard acceptsNewLaunches, !Task.isCancelled else { return status() } permissionRefreshGeneration &+= 1 let generation = permissionRefreshGeneration @@ -283,7 +294,7 @@ final class ComputerUseRuntimeService { /// starts, so onboarding uses this explicit path for its drag and TCC-event /// callbacks. Other passive status reads remain lifecycle-neutral. @discardableResult - func refreshHelperStatusAfterPermissionChange() async + public func refreshHelperStatusAfterPermissionChange() async -> (accessibility: Bool, screenRecording: Bool) { guard acceptsNewLaunches, !Task.isCancelled else { return status() } @@ -311,13 +322,15 @@ final class ComputerUseRuntimeService { } } - func openAccessibilitySettings() async -> Bool { + /// The open accessibility settings exposed to the host application. + public func openAccessibilitySettings() async -> Bool { await openSystemSettings( "x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility" ) } - func openScreenRecordingSettings() async -> Bool { + /// The open screen recording settings exposed to the host application. + public func openScreenRecordingSettings() async -> Bool { await openSystemSettings( "x-apple.systempreferences:com.apple.preference.security?Privacy_ScreenCapture" ) @@ -428,7 +441,8 @@ final class ComputerUseRuntimeService { await verifyDirectScreenCaptureOutcome() == .ready } - func verifyDirectScreenCaptureOutcome() + /// The verify direct screen capture outcome exposed to the host application. + public func verifyDirectScreenCaptureOutcome() async -> ComputerUseDirectScreenCaptureVerification { await serializeHelperLifecycle(cancelledResult: .unavailable) { [weak self] in @@ -533,7 +547,7 @@ final class ComputerUseRuntimeService { /// Ends one exact cmux-managed proxy generation through the authenticated /// helper that owns its lifecycle state. - func endDriverSession( + public func endDriverSession( _ driverSessionID: String, proxySessionID: String ) async -> Bool { @@ -605,7 +619,7 @@ final class ComputerUseRuntimeService { /// exact authenticated proxy generation that wrote the current state. The /// stable identity carries the choice into later calls; the exact identity /// owns the cursor feed that may already be visible. - func setDriverCursorVisible( + public func setDriverCursorVisible( _ visible: Bool, driverSessionID: String, proxySessionID: String? = nil, @@ -684,7 +698,7 @@ final class ComputerUseRuntimeService { /// a cmux focus transition. This is strictly an ordering repair: lifecycle /// visibility is owned by `setDriverCursorVisible` and cannot be changed by /// a stale focus request. - func reassertDriverCursor( + public func reassertDriverCursor( driverSessionID: String, proxySessionID: String? = nil, targetWindowID: UInt32, @@ -894,7 +908,7 @@ final class ComputerUseRuntimeService { /// code signature, so any cached "capture verified" state is stale the /// moment the installed build changes and must be re-verified through /// onboarding rather than surprising the user mid-session. - var helperBuildReplacedHandler: (@MainActor () -> Void)? + public var helperBuildReplacedHandler: (@MainActor () -> Void)? private func ensureStandaloneHelperInstalledWithinLifecycle() async -> URL? { guard acceptsNewLaunches, !Task.isCancelled, prepareRuntimeForLaunch() else { return nil } @@ -1319,7 +1333,7 @@ final class ComputerUseRuntimeService { /// Synchronously prevents relaunch and stops the out-of-process helper. /// App termination cannot rely on an unstructured async task surviving exit. - func stopForTermination() { + public func stopForTermination() { desiredEnabled = false acceptsNewLaunches = false permissionRefreshGeneration &+= 1 diff --git a/Sources/App/ComputerUseSessionScope.swift b/Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/ComputerUseSessionScope.swift similarity index 51% rename from Sources/App/ComputerUseSessionScope.swift rename to Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/ComputerUseSessionScope.swift index ec88252ec809..86187636eb4e 100644 --- a/Sources/App/ComputerUseSessionScope.swift +++ b/Packages/macOS/CmuxComputerUse/Sources/CmuxComputerUse/ComputerUseSessionScope.swift @@ -1,20 +1,34 @@ import Foundation /// Stable driver-session identity for one live cmux agent surface. -struct ComputerUseSessionScope: Sendable { - let id: String - let driverSessionID: String +public struct ComputerUseSessionScope: Sendable { + /// The id exposed to the host application. + public let id: String + /// The driver session id exposed to the host application. + public let driverSessionID: String - static func driverSessionID(surfaceID: UUID) -> String { + /// Creates the same scope previously provided by the memberwise initializer. + /// - Parameters: + /// - id: The host's live surface row identifier. + /// - driverSessionID: The standalone driver's stable session identifier. + public init(id: String, driverSessionID: String) { + self.id = id + self.driverSessionID = driverSessionID + } + + /// The driver session id exposed to the host application. + public static func driverSessionID(surfaceID: UUID) -> String { "cmux-\(surfaceID.uuidString)" } - static func isManagedDriverSessionID(_ candidate: String) -> Bool { + /// The is managed driver session id exposed to the host application. + public static func isManagedDriverSessionID(_ candidate: String) -> Bool { guard candidate.hasPrefix("cmux-") else { return false } return UUID(uuidString: String(candidate.dropFirst("cmux-".count))) != nil } - static func driverSessionID(containing candidate: String) -> String? { + /// The driver session id exposed to the host application. + public static func driverSessionID(containing candidate: String) -> String? { if isManagedDriverSessionID(candidate) { return candidate } @@ -26,7 +40,7 @@ struct ComputerUseSessionScope: Sendable { } /// Accepts the stable forced-proxy session or one of its managed child generations. - static func isManagedProxySessionID( + public static func isManagedProxySessionID( _ candidate: String, for driverSessionID: String ) -> Bool { @@ -38,7 +52,8 @@ struct ComputerUseSessionScope: Sendable { return candidate.hasPrefix(prefix) && candidate.count > prefix.count } - func matches(driverSessionID candidate: String?) -> Bool { + /// The matches exposed to the host application. + public func matches(driverSessionID candidate: String?) -> Bool { guard let candidate else { return false } return candidate == driverSessionID || candidate.hasPrefix("\(driverSessionID)-mcp-") diff --git a/Packages/macOS/CmuxComputerUse/Tests/CmuxComputerUseTests/ComputerUseSessionScopeTests.swift b/Packages/macOS/CmuxComputerUse/Tests/CmuxComputerUseTests/ComputerUseSessionScopeTests.swift new file mode 100644 index 000000000000..6734a5434d9e --- /dev/null +++ b/Packages/macOS/CmuxComputerUse/Tests/CmuxComputerUseTests/ComputerUseSessionScopeTests.swift @@ -0,0 +1,22 @@ +import Foundation +import Testing +@testable import CmuxComputerUse + +struct ComputerUseSessionScopeTests { + @Test func matchesOnlyItsStableSessionAndChildGenerations() { + let identifier = ComputerUseSessionScope.driverSessionID(surfaceID: UUID()) + let scope = ComputerUseSessionScope(id: "row", driverSessionID: identifier) + #expect(scope.id == "row") + #expect(scope.matches(driverSessionID: identifier)) + #expect(scope.matches(driverSessionID: identifier + "-mcp-child")) + #expect(!scope.matches(driverSessionID: "unrelated")) + #expect(!scope.matches(driverSessionID: nil)) + } + + @Test func helperReplacementRequiresOnboardingAgain() { + let phase = ComputerUseRuntimePermissionPhase.ready.applying(.helperReplaced) + #expect(phase == .onboardingRequired) + #expect(!phase.isReady) + #expect(phase.applying(.onboardingCompleted).isReady) + } +} diff --git a/Sources/AgentPIDProcessIdentity.swift b/Packages/macOS/CmuxFoundation/Sources/CmuxFoundation/Process/AgentPIDProcessIdentity.swift similarity index 80% rename from Sources/AgentPIDProcessIdentity.swift rename to Packages/macOS/CmuxFoundation/Sources/CmuxFoundation/Process/AgentPIDProcessIdentity.swift index 79bb66a18221..d195caf8f53c 100644 --- a/Sources/AgentPIDProcessIdentity.swift +++ b/Packages/macOS/CmuxFoundation/Sources/CmuxFoundation/Process/AgentPIDProcessIdentity.swift @@ -1,11 +1,16 @@ -import Darwin +public import Darwin -struct AgentPIDProcessIdentity: Equatable, Hashable, Sendable { - let pid: pid_t - let startSeconds: Int64 - let startMicroseconds: Int64 +/// The agent pidprocess identity exposed to the host application. +public struct AgentPIDProcessIdentity: Equatable, Hashable, Sendable { + /// The pid exposed to the host application. + public let pid: pid_t + /// The start seconds exposed to the host application. + public let startSeconds: Int64 + /// The start microseconds exposed to the host application. + public let startMicroseconds: Int64 - init(pid: pid_t, startSeconds: Int64, startMicroseconds: Int64) { + /// Creates a AgentPIDProcessIdentity with the supplied values. + public init(pid: pid_t, startSeconds: Int64, startMicroseconds: Int64) { self.pid = pid self.startSeconds = startSeconds self.startMicroseconds = startMicroseconds @@ -24,7 +29,7 @@ struct AgentPIDProcessIdentity: Equatable, Hashable, Sendable { /// reaped, which `proc_pidinfo` refused. Zombies are rejected explicitly so /// a readable identity keeps meaning the process is running — callers such /// as session restore treat it as proof the agent is still alive. - init?(pid: pid_t) { + public init?(pid: pid_t) { guard let snapshot = Self.processSnapshot(pid: pid) else { return nil } self = snapshot.identity } @@ -32,7 +37,7 @@ struct AgentPIDProcessIdentity: Equatable, Hashable, Sendable { /// Reads identity and ancestry from one kernel snapshot so callers do not /// accidentally combine a reused pid with metadata from different process /// generations. Zombies are rejected just as in `init?(pid:)`. - static func processSnapshot( + public static func processSnapshot( pid: pid_t ) -> (identity: AgentPIDProcessIdentity, parentPID: pid_t)? { guard let entry = processTableEntry(pid: pid), !entry.hasExited else { return nil } @@ -52,7 +57,7 @@ struct AgentPIDProcessIdentity: Equatable, Hashable, Sendable { /// `kill(pid, 0)` cannot distinguish it from a running process. It runs no /// code and can own no resources, so callers weighing whether a PID might /// still hold something read it as gone. - static func hasExitedWithoutReaping(pid: pid_t) -> Bool { + public static func hasExitedWithoutReaping(pid: pid_t) -> Bool { processTableEntry(pid: pid)?.hasExited ?? false } diff --git a/Sources/AgentHibernationSessionEndResolution.swift b/Sources/AgentHibernationSessionEndResolution.swift index 5294c719a0eb..1e73d9047b2b 100644 --- a/Sources/AgentHibernationSessionEndResolution.swift +++ b/Sources/AgentHibernationSessionEndResolution.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Foundation @MainActor diff --git a/Sources/AgentPortRootIdentity.swift b/Sources/AgentPortRootIdentity.swift index d5ce5cdbcb63..181329e93878 100644 --- a/Sources/AgentPortRootIdentity.swift +++ b/Sources/AgentPortRootIdentity.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Foundation /// Stable identity for one agent root, including process birth when available. diff --git a/Sources/App/AgentHibernationController+Confirmation.swift b/Sources/App/AgentHibernationController+Confirmation.swift index 5453efc7189c..d8c57a170320 100644 --- a/Sources/App/AgentHibernationController+Confirmation.swift +++ b/Sources/App/AgentHibernationController+Confirmation.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Foundation extension AgentHibernationController { diff --git a/Sources/App/AgentHibernationController+ProcessExitWaiting.swift b/Sources/App/AgentHibernationController+ProcessExitWaiting.swift index be45e154f29e..c04ebcffaa94 100644 --- a/Sources/App/AgentHibernationController+ProcessExitWaiting.swift +++ b/Sources/App/AgentHibernationController+ProcessExitWaiting.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Darwin import Foundation diff --git a/Sources/App/AgentHibernationController+ProcessSignaling.swift b/Sources/App/AgentHibernationController+ProcessSignaling.swift index 5adec24025cd..df24f4727bb9 100644 --- a/Sources/App/AgentHibernationController+ProcessSignaling.swift +++ b/Sources/App/AgentHibernationController+ProcessSignaling.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Darwin import Foundation diff --git a/Sources/App/AgentHibernationController+ProcessTermination.swift b/Sources/App/AgentHibernationController+ProcessTermination.swift index 60ba78f1f2d3..f870f3f7a268 100644 --- a/Sources/App/AgentHibernationController+ProcessTermination.swift +++ b/Sources/App/AgentHibernationController+ProcessTermination.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Darwin import Foundation diff --git a/Sources/App/AgentHibernationController+SessionEndIntent.swift b/Sources/App/AgentHibernationController+SessionEndIntent.swift index 2e3fb3e3ff01..e50afe4ce848 100644 --- a/Sources/App/AgentHibernationController+SessionEndIntent.swift +++ b/Sources/App/AgentHibernationController+SessionEndIntent.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Foundation /// Identifies one agent process generation whose SessionEnd belongs to a diff --git a/Sources/App/AgentHibernationController.swift b/Sources/App/AgentHibernationController.swift index 13c11dbab403..0e3d4e70e2e9 100644 --- a/Sources/App/AgentHibernationController.swift +++ b/Sources/App/AgentHibernationController.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Foundation import CmuxWorkspaces diff --git a/Sources/App/AgentHibernationProcessExitEpoch.swift b/Sources/App/AgentHibernationProcessExitEpoch.swift index 96503a73814b..4a7d4514ecb6 100644 --- a/Sources/App/AgentHibernationProcessExitEpoch.swift +++ b/Sources/App/AgentHibernationProcessExitEpoch.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Darwin import Foundation diff --git a/Sources/App/AgentHibernationProcessSnapshotCoordinator.swift b/Sources/App/AgentHibernationProcessSnapshotCoordinator.swift index 4eff3906cb4c..917cfca2eb88 100644 --- a/Sources/App/AgentHibernationProcessSnapshotCoordinator.swift +++ b/Sources/App/AgentHibernationProcessSnapshotCoordinator.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Darwin import Foundation diff --git a/Sources/App/ComputerUseCuaState.swift b/Sources/App/ComputerUseCuaState.swift index ae0e7888ec5b..8e78607018d0 100644 --- a/Sources/App/ComputerUseCuaState.swift +++ b/Sources/App/ComputerUseCuaState.swift @@ -1,6 +1,8 @@ +import CmuxComputerUse import CryptoKit import Darwin import Foundation +import CmuxFoundation /// A validated snapshot written by the local cmux-cua runtime. struct ComputerUseCuaState: Equatable, Sendable { diff --git a/Sources/App/ComputerUseCursorOverlayController.swift b/Sources/App/ComputerUseCursorOverlayController.swift index e8072d0c241f..75c7e926d94c 100644 --- a/Sources/App/ComputerUseCursorOverlayController.swift +++ b/Sources/App/ComputerUseCursorOverlayController.swift @@ -1,3 +1,4 @@ +import CmuxComputerUse import AppKit import Combine import Darwin diff --git a/Sources/App/ComputerUseLiveDriverSession.swift b/Sources/App/ComputerUseLiveDriverSession.swift index 05fb49cd0bf4..081f8160ba67 100644 --- a/Sources/App/ComputerUseLiveDriverSession.swift +++ b/Sources/App/ComputerUseLiveDriverSession.swift @@ -1,4 +1,6 @@ +import CmuxComputerUse import Foundation +import CmuxFoundation /// The logical agent session and process roots currently assigned to a Computer Use driver session. struct ComputerUseLiveDriverSession: Equatable, Sendable { diff --git a/Sources/App/ComputerUseLiveSessionProjection.swift b/Sources/App/ComputerUseLiveSessionProjection.swift index 41301318dac8..2fda78b0310a 100644 --- a/Sources/App/ComputerUseLiveSessionProjection.swift +++ b/Sources/App/ComputerUseLiveSessionProjection.swift @@ -1,4 +1,6 @@ +import CmuxComputerUse import Foundation +import CmuxFoundation /// Tracks the last agent-turn completion for each stable Computer Use driver. /// diff --git a/Sources/App/ComputerUseMenuBarController.swift b/Sources/App/ComputerUseMenuBarController.swift index 00bceb8a40af..4fadc71c149a 100644 --- a/Sources/App/ComputerUseMenuBarController.swift +++ b/Sources/App/ComputerUseMenuBarController.swift @@ -1,7 +1,9 @@ +import CmuxComputerUse import AppKit import Combine import Darwin import Foundation +import CmuxFoundation /// Owns the dedicated computer-use status item and renders value-only session snapshots. @MainActor diff --git a/Sources/App/ComputerUseMenuBarRow.swift b/Sources/App/ComputerUseMenuBarRow.swift index df455d978d48..e575e44baa19 100644 --- a/Sources/App/ComputerUseMenuBarRow.swift +++ b/Sources/App/ComputerUseMenuBarRow.swift @@ -1,4 +1,6 @@ +import CmuxComputerUse import Foundation +import CmuxFoundation /// Immutable display and action data for one live agent session in the computer-use menu. struct ComputerUseMenuBarRow: Equatable, Identifiable, Sendable { diff --git a/Sources/App/ComputerUseMenuBarSnapshotStore.swift b/Sources/App/ComputerUseMenuBarSnapshotStore.swift index cf159469e8d5..91fcf2e8dbf0 100644 --- a/Sources/App/ComputerUseMenuBarSnapshotStore.swift +++ b/Sources/App/ComputerUseMenuBarSnapshotStore.swift @@ -1,3 +1,4 @@ +import CmuxComputerUse import AppKit import Combine import Darwin diff --git a/Sources/App/ComputerUseOnboardingView.swift b/Sources/App/ComputerUseOnboardingView.swift index e411b0b341c5..7c68db488601 100644 --- a/Sources/App/ComputerUseOnboardingView.swift +++ b/Sources/App/ComputerUseOnboardingView.swift @@ -1,3 +1,4 @@ +import CmuxComputerUse import AppKit import SwiftUI diff --git a/Sources/App/ComputerUseOnboardingWindowController.swift b/Sources/App/ComputerUseOnboardingWindowController.swift index 0b105eeeb330..b1da2e4ee02a 100644 --- a/Sources/App/ComputerUseOnboardingWindowController.swift +++ b/Sources/App/ComputerUseOnboardingWindowController.swift @@ -1,3 +1,4 @@ +import CmuxComputerUse import AppKit import Combine import SwiftUI diff --git a/Sources/App/ComputerUseStateRepository.swift b/Sources/App/ComputerUseStateRepository.swift index 40f7b237f9de..3dddbf8d4c07 100644 --- a/Sources/App/ComputerUseStateRepository.swift +++ b/Sources/App/ComputerUseStateRepository.swift @@ -1,3 +1,4 @@ +import CmuxComputerUse import Foundation /// Reads and validates the computer-use driver's untrusted per-process state files. diff --git a/Sources/App/ComputerUseUXCoordinator.swift b/Sources/App/ComputerUseUXCoordinator.swift index f3baef0cb1e8..de4f99706779 100644 --- a/Sources/App/ComputerUseUXCoordinator.swift +++ b/Sources/App/ComputerUseUXCoordinator.swift @@ -1,3 +1,4 @@ +import CmuxComputerUse import AppKit import CMUXAgentLaunch import CmuxSettings diff --git a/Sources/App/ComputerUseWatchTargetController.swift b/Sources/App/ComputerUseWatchTargetController.swift index d3af64aadc7b..8ca5d981c1bd 100644 --- a/Sources/App/ComputerUseWatchTargetController.swift +++ b/Sources/App/ComputerUseWatchTargetController.swift @@ -1,7 +1,9 @@ +import CmuxComputerUse import AppKit import Combine import Darwin import Foundation +import CmuxFoundation // MARK: - Dedupe decision (pure, injectable) diff --git a/Sources/AppDelegate.swift b/Sources/AppDelegate.swift index d3642b6a8e86..a845797b777c 100644 --- a/Sources/AppDelegate.swift +++ b/Sources/AppDelegate.swift @@ -1,3 +1,4 @@ +import CmuxComputerUse import CmuxCloudMachines import AppKit import CmuxAppKitSupportUI diff --git a/Sources/DockSplitStore+SessionSnapshot.swift b/Sources/DockSplitStore+SessionSnapshot.swift index 6b0c586a7c99..1fe1c3527a9b 100644 --- a/Sources/DockSplitStore+SessionSnapshot.swift +++ b/Sources/DockSplitStore+SessionSnapshot.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Bonsplit import CmuxWorkspaces import Darwin diff --git a/Sources/HostSettingsActions.swift b/Sources/HostSettingsActions.swift index 0165d7289abf..645b68af1f5f 100644 --- a/Sources/HostSettingsActions.swift +++ b/Sources/HostSettingsActions.swift @@ -1,3 +1,4 @@ +import CmuxComputerUse import AppKit import CMUXMobileCore import CmuxWorkspaces diff --git a/Sources/LiveAgentSessionOwner.swift b/Sources/LiveAgentSessionOwner.swift index 95bca8500682..34bcbc6add2c 100644 --- a/Sources/LiveAgentSessionOwner.swift +++ b/Sources/LiveAgentSessionOwner.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Foundation /// A process-generation-validated owner of one managed Vault session. diff --git a/Sources/LiveAgentSessionOwnerIndex.swift b/Sources/LiveAgentSessionOwnerIndex.swift index 46dde06efa93..3c3c8ba8cfb1 100644 --- a/Sources/LiveAgentSessionOwnerIndex.swift +++ b/Sources/LiveAgentSessionOwnerIndex.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Darwin import Foundation diff --git a/Sources/LiveAgentSessionOwnerObservation.swift b/Sources/LiveAgentSessionOwnerObservation.swift index 23973d06cb89..dc7f26cf92a5 100644 --- a/Sources/LiveAgentSessionOwnerObservation.swift +++ b/Sources/LiveAgentSessionOwnerObservation.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Darwin import Foundation diff --git a/Sources/PIDPresence.swift b/Sources/PIDPresence.swift index b68af2dfe567..d25cef8ef9e5 100644 --- a/Sources/PIDPresence.swift +++ b/Sources/PIDPresence.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Darwin /// Best-effort operating-system evidence that a process ID still exists. diff --git a/Sources/PortScanner+Publication.swift b/Sources/PortScanner+Publication.swift index 21735434903a..af0fe5320bdb 100644 --- a/Sources/PortScanner+Publication.swift +++ b/Sources/PortScanner+Publication.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import CmuxCore import Foundation diff --git a/Sources/RestorableAgentProcessLiveness+ProcessIdentity.swift b/Sources/RestorableAgentProcessLiveness+ProcessIdentity.swift index 167558920e71..2369ad2de0dd 100644 --- a/Sources/RestorableAgentProcessLiveness+ProcessIdentity.swift +++ b/Sources/RestorableAgentProcessLiveness+ProcessIdentity.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import CmuxWorkspaces extension RestorableAgentProcessLiveness { diff --git a/Sources/RestorableAgentSession.swift b/Sources/RestorableAgentSession.swift index 15a998f0e19d..5e55d5390985 100644 --- a/Sources/RestorableAgentSession.swift +++ b/Sources/RestorableAgentSession.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Darwin import Foundation import CMUXAgentLaunch diff --git a/Sources/RestoredAgentCompletedGeneration.swift b/Sources/RestoredAgentCompletedGeneration.swift index f8c0aefac198..3e80fc1808ac 100644 --- a/Sources/RestoredAgentCompletedGeneration.swift +++ b/Sources/RestoredAgentCompletedGeneration.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Foundation /// Records the process generation that a restored terminal already completed. diff --git a/Sources/RestoredAgentLifecycleCoordinator.swift b/Sources/RestoredAgentLifecycleCoordinator.swift index 266a535f5e7c..dd2674df605e 100644 --- a/Sources/RestoredAgentLifecycleCoordinator.swift +++ b/Sources/RestoredAgentLifecycleCoordinator.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import CmuxWorkspaces import Foundation import Observation diff --git a/Sources/RestoredAgentLiveness.swift b/Sources/RestoredAgentLiveness.swift index 3a1a0f4ba439..4272c590d9d1 100644 --- a/Sources/RestoredAgentLiveness.swift +++ b/Sources/RestoredAgentLiveness.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Foundation /// The one evaluator for "is this restored or hook-published agent still diff --git a/Sources/SharedLiveAgentIndexLoader.swift b/Sources/SharedLiveAgentIndexLoader.swift index b788325ba11e..480d710aab2b 100644 --- a/Sources/SharedLiveAgentIndexLoader.swift +++ b/Sources/SharedLiveAgentIndexLoader.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Darwin import Foundation diff --git a/Sources/TerminalTTYSessionIdentity.swift b/Sources/TerminalTTYSessionIdentity.swift index 6d9f4536993a..7323edc48265 100644 --- a/Sources/TerminalTTYSessionIdentity.swift +++ b/Sources/TerminalTTYSessionIdentity.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Darwin import Foundation diff --git a/Sources/VaultAgentProcessScanner+ForkParentFallback.swift b/Sources/VaultAgentProcessScanner+ForkParentFallback.swift index bd43715f51f8..5948bbb71148 100644 --- a/Sources/VaultAgentProcessScanner+ForkParentFallback.swift +++ b/Sources/VaultAgentProcessScanner+ForkParentFallback.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Foundation import CMUXAgentLaunch extension RestorableAgentSessionIndex { diff --git a/Sources/Workspace+DetachedSurfaceTransfer.swift b/Sources/Workspace+DetachedSurfaceTransfer.swift index 61ba7d1e0e3b..c01dda9fe585 100644 --- a/Sources/Workspace+DetachedSurfaceTransfer.swift +++ b/Sources/Workspace+DetachedSurfaceTransfer.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Foundation import CmuxCore import CmuxWorkspaces diff --git a/Sources/Workspace+PanelLifecycle.swift b/Sources/Workspace+PanelLifecycle.swift index 37e1516a071c..aeb576803eca 100644 --- a/Sources/Workspace+PanelLifecycle.swift +++ b/Sources/Workspace+PanelLifecycle.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Bonsplit import CmuxSettings import CmuxCore diff --git a/Sources/WorkspaceSidebarAgentRuntimeObservationModel.swift b/Sources/WorkspaceSidebarAgentRuntimeObservationModel.swift index 83f277c6ea07..dce3e9953cf5 100644 --- a/Sources/WorkspaceSidebarAgentRuntimeObservationModel.swift +++ b/Sources/WorkspaceSidebarAgentRuntimeObservationModel.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Darwin import Foundation import Observation diff --git a/Sources/cmuxApp.swift b/Sources/cmuxApp.swift index 0f8647f1fb01..cc40c845caa4 100644 --- a/Sources/cmuxApp.swift +++ b/Sources/cmuxApp.swift @@ -1,3 +1,4 @@ +import CmuxComputerUse import AppKit import CmuxAppKitSupportUI import CmuxFoundation diff --git a/cmux.xcodeproj/project.pbxproj b/cmux.xcodeproj/project.pbxproj index 3f17ff3c4caf..649e27917846 100644 --- a/cmux.xcodeproj/project.pbxproj +++ b/cmux.xcodeproj/project.pbxproj @@ -48,7 +48,6 @@ C7A52F000000000000000002 /* AgentChatTranscriptService+Wire.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7A52F000000000000000001 /* AgentChatTranscriptService+Wire.swift */; }; ACA7C4A7000000000000000B /* AgentChatTranscriptService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACA7C4A7000000000000000C /* AgentChatTranscriptService.swift */; }; ACA7C4A70000000000000009 /* AgentChatTranscriptTailer.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACA7C4A7000000000000000A /* AgentChatTranscriptTailer.swift */; }; - C0A710A10000000000000002 /* AgentCursorPointerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A710A10000000000000001 /* AgentCursorPointerView.swift */; }; 79390005AA11BB22CC33DD05 /* AgentDeliveryTargetResolution.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79390006AA11BB22CC33DD06 /* AgentDeliveryTargetResolution.swift */; }; 93800001AA11BB22CC33EE01 /* AgentDeliveryTTYBindingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93800002AA11BB22CC33EE02 /* AgentDeliveryTTYBindingTests.swift */; }; A9F200000000000000000001 /* AgentExecutableResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9F100000000000000000001 /* AgentExecutableResolver.swift */; }; @@ -144,8 +143,6 @@ 79390003AA11BB22CC33DD03 /* AgentNotificationLiveRetargetTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79390004AA11BB22CC33DD04 /* AgentNotificationLiveRetargetTests.swift */; }; 7939000FAA11BB22CC33DD0F /* AgentNotificationMoveRaceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79390010AA11BB22CC33DD10 /* AgentNotificationMoveRaceTests.swift */; }; 79460001AA11BB22CC33EE01 /* AgentNotificationMutationBoundaryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79460002AA11BB22CC33EE02 /* AgentNotificationMutationBoundaryTests.swift */; }; - C3744E030000000000000001 /* AgentPIDProcessIdentity.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3744E040000000000000001 /* AgentPIDProcessIdentity.swift */; }; - C3744E030000000000000002 /* AgentPIDProcessIdentity.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3744E040000000000000001 /* AgentPIDProcessIdentity.swift */; }; B79500130000000000000001 /* AgentPortPublicationHistory.swift in Sources */ = {isa = PBXBuildFile; fileRef = B79500130000000000000002 /* AgentPortPublicationHistory.swift */; }; B79500120000000000000001 /* AgentPortRootIdentity.swift in Sources */ = {isa = PBXBuildFile; fileRef = B79500120000000000000002 /* AgentPortRootIdentity.swift */; }; B79500050000000000000001 /* AgentPortScanPublication.swift in Sources */ = {isa = PBXBuildFile; fileRef = B79500050000000000000002 /* AgentPortScanPublication.swift */; }; @@ -1280,6 +1277,8 @@ D0F4A0000000000000000004 /* CmuxCloudTunnelCore in Frameworks */ = {isa = PBXBuildFile; productRef = D0F4A0000000000000000002 /* CmuxCloudTunnelCore */; }; 5E55500000000000000000E3 /* CmuxCommandPalette in Frameworks */ = {isa = PBXBuildFile; productRef = 5E55500000000000000000E2 /* CmuxCommandPalette */; }; 5E55500000000000000000E4 /* CmuxCommandPalette in Frameworks */ = {isa = PBXBuildFile; productRef = 5E55500000000000000000E2 /* CmuxCommandPalette */; }; + C0C0A2026091900000000003 /* CmuxComputerUse in Frameworks */ = {isa = PBXBuildFile; productRef = C0C0A2026091900000000002 /* CmuxComputerUse */; }; + C0C0A2026091900000000004 /* CmuxComputerUse in Frameworks */ = {isa = PBXBuildFile; productRef = C0C0A2026091900000000002 /* CmuxComputerUse */; }; A5001650 /* CmuxConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5001651 /* CmuxConfig.swift */; }; A5FB1209 /* CmuxConfigActionDefinition.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FB120A /* CmuxConfigActionDefinition.swift */; }; A5FB1201 /* CmuxConfigActionSaver.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FB1202 /* CmuxConfigActionSaver.swift */; }; @@ -1564,10 +1563,7 @@ C0A716940000000000000002 /* ComputerUseCommandPaletteTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A716940000000000000001 /* ComputerUseCommandPaletteTests.swift */; }; C0A710020000000000000002 /* ComputerUseCuaState.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A710020000000000000001 /* ComputerUseCuaState.swift */; }; C0A710A00000000000000002 /* ComputerUseCursorOverlayController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A710A00000000000000001 /* ComputerUseCursorOverlayController.swift */; }; - C0A710C40000000000000002 /* ComputerUseDaemonProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A710C40000000000000001 /* ComputerUseDaemonProfile.swift */; }; - C0A710C50000000000000002 /* ComputerUseDaemonReadiness.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A710C50000000000000001 /* ComputerUseDaemonReadiness.swift */; }; C0A714100000000000000002 /* ComputerUseHelperIcon.icns in Resources */ = {isa = PBXBuildFile; fileRef = C0A714100000000000000001 /* ComputerUseHelperIcon.icns */; }; - C0A710C20000000000000002 /* ComputerUseHelperLaunchConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A710C20000000000000001 /* ComputerUseHelperLaunchConfiguration.swift */; }; C0A713020000000000000002 /* ComputerUseLiveDriverSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A713020000000000000001 /* ComputerUseLiveDriverSession.swift */; }; C0A713030000000000000002 /* ComputerUseLiveSessionProjection.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A713030000000000000001 /* ComputerUseLiveSessionProjection.swift */; }; C0A710FF0000000000000002 /* ComputerUseLiveSettingRepository.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A710FF0000000000000001 /* ComputerUseLiveSettingRepository.swift */; }; @@ -1584,14 +1580,8 @@ C0A710110000000000000002 /* ComputerUseOnboardingWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A710110000000000000001 /* ComputerUseOnboardingWindowController.swift */; }; C0A711210000000000000002 /* ComputerUseOnboardingWindowPlacement.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A711210000000000000001 /* ComputerUseOnboardingWindowPlacement.swift */; }; C0A716950000000000000002 /* ComputerUseOnboardingWindowTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A716950000000000000001 /* ComputerUseOnboardingWindowTests.swift */; }; - C0A713000000000000000002 /* ComputerUsePermissionRequestOutcome.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A713000000000000000001 /* ComputerUsePermissionRequestOutcome.swift */; }; C0A711300000000000000002 /* ComputerUsePermissionRowAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A711300000000000000001 /* ComputerUsePermissionRowAction.swift */; }; - C0A710C30000000000000002 /* ComputerUsePermissionStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A710C30000000000000001 /* ComputerUsePermissionStatus.swift */; }; - C0A710C10000000000000002 /* ComputerUseRuntimePaths.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A710C10000000000000001 /* ComputerUseRuntimePaths.swift */; }; - D1F00A110000000000000002 /* ComputerUseRuntimePermissionPhase.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1F00A110000000000000001 /* ComputerUseRuntimePermissionPhase.swift */; }; - C0A710010000000000000002 /* ComputerUseRuntimeService.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A710010000000000000001 /* ComputerUseRuntimeService.swift */; }; D1F00A120000000000000002 /* ComputerUseSessionPresentationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1F00A120000000000000001 /* ComputerUseSessionPresentationController.swift */; }; - C0A710030000000000000002 /* ComputerUseSessionScope.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A710030000000000000001 /* ComputerUseSessionScope.swift */; }; C0A710050000000000000002 /* ComputerUseStateRepository.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A710050000000000000001 /* ComputerUseStateRepository.swift */; }; C0A710040000000000000002 /* ComputerUseStateScan.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A710040000000000000001 /* ComputerUseStateScan.swift */; }; C0A710160000000000000002 /* ComputerUseTargetIdentity.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A710160000000000000001 /* ComputerUseTargetIdentity.swift */; }; @@ -4122,7 +4112,6 @@ C7A52F000000000000000001 /* AgentChatTranscriptService+Wire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "AgentChatTranscriptService+Wire.swift"; sourceTree = ""; }; ACA7C4A7000000000000000C /* AgentChatTranscriptService.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "AgentChatTranscriptService.swift"; sourceTree = ""; }; ACA7C4A7000000000000000A /* AgentChatTranscriptTailer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "AgentChatTranscriptTailer.swift"; sourceTree = ""; }; - C0A710A10000000000000001 /* AgentCursorPointerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App/AgentCursorPointerView.swift; sourceTree = ""; }; 79390006AA11BB22CC33DD06 /* AgentDeliveryTargetResolution.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AgentDeliveryTargetResolution.swift; sourceTree = ""; }; 93800002AA11BB22CC33EE02 /* AgentDeliveryTTYBindingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AgentDeliveryTTYBindingTests.swift; sourceTree = ""; }; A9F100000000000000000001 /* AgentExecutableResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AgentExecutableResolver.swift; sourceTree = ""; }; @@ -4216,7 +4205,6 @@ 79390004AA11BB22CC33DD04 /* AgentNotificationLiveRetargetTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AgentNotificationLiveRetargetTests.swift; sourceTree = ""; }; 79390010AA11BB22CC33DD10 /* AgentNotificationMoveRaceTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AgentNotificationMoveRaceTests.swift; sourceTree = ""; }; 79460002AA11BB22CC33EE02 /* AgentNotificationMutationBoundaryTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AgentNotificationMutationBoundaryTests.swift; sourceTree = ""; }; - C3744E040000000000000001 /* AgentPIDProcessIdentity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AgentPIDProcessIdentity.swift; sourceTree = ""; }; B79500130000000000000002 /* AgentPortPublicationHistory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AgentPortPublicationHistory.swift; sourceTree = ""; }; B79500120000000000000002 /* AgentPortRootIdentity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AgentPortRootIdentity.swift; sourceTree = ""; }; B79500050000000000000002 /* AgentPortScanPublication.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AgentPortScanPublication.swift; sourceTree = ""; }; @@ -5520,10 +5508,7 @@ C0A716940000000000000001 /* ComputerUseCommandPaletteTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ComputerUseCommandPaletteTests.swift"; sourceTree = ""; }; C0A710020000000000000001 /* ComputerUseCuaState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App/ComputerUseCuaState.swift; sourceTree = ""; }; C0A710A00000000000000001 /* ComputerUseCursorOverlayController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App/ComputerUseCursorOverlayController.swift; sourceTree = ""; }; - C0A710C40000000000000001 /* ComputerUseDaemonProfile.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App/ComputerUseDaemonProfile.swift; sourceTree = ""; }; - C0A710C50000000000000001 /* ComputerUseDaemonReadiness.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App/ComputerUseDaemonReadiness.swift; sourceTree = ""; }; C0A714100000000000000001 /* ComputerUseHelperIcon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = ComputerUseHelperIcon.icns; sourceTree = ""; }; - C0A710C20000000000000001 /* ComputerUseHelperLaunchConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App/ComputerUseHelperLaunchConfiguration.swift; sourceTree = ""; }; C0A713020000000000000001 /* ComputerUseLiveDriverSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App/ComputerUseLiveDriverSession.swift; sourceTree = ""; }; C0A713030000000000000001 /* ComputerUseLiveSessionProjection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App/ComputerUseLiveSessionProjection.swift; sourceTree = ""; }; C0A710FF0000000000000001 /* ComputerUseLiveSettingRepository.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App/ComputerUseLiveSettingRepository.swift; sourceTree = ""; }; @@ -5540,14 +5525,8 @@ C0A710110000000000000001 /* ComputerUseOnboardingWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App/ComputerUseOnboardingWindowController.swift; sourceTree = ""; }; C0A711210000000000000001 /* ComputerUseOnboardingWindowPlacement.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App/ComputerUseOnboardingWindowPlacement.swift; sourceTree = ""; }; C0A716950000000000000001 /* ComputerUseOnboardingWindowTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ComputerUseOnboardingWindowTests.swift"; sourceTree = ""; }; - C0A713000000000000000001 /* ComputerUsePermissionRequestOutcome.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App/ComputerUsePermissionRequestOutcome.swift; sourceTree = ""; }; C0A711300000000000000001 /* ComputerUsePermissionRowAction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App/ComputerUsePermissionRowAction.swift; sourceTree = ""; }; - C0A710C30000000000000001 /* ComputerUsePermissionStatus.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App/ComputerUsePermissionStatus.swift; sourceTree = ""; }; - C0A710C10000000000000001 /* ComputerUseRuntimePaths.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App/ComputerUseRuntimePaths.swift; sourceTree = ""; }; - D1F00A110000000000000001 /* ComputerUseRuntimePermissionPhase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App/ComputerUseRuntimePermissionPhase.swift; sourceTree = ""; }; - C0A710010000000000000001 /* ComputerUseRuntimeService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App/ComputerUseRuntimeService.swift; sourceTree = ""; }; D1F00A120000000000000001 /* ComputerUseSessionPresentationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App/ComputerUseSessionPresentationController.swift; sourceTree = ""; }; - C0A710030000000000000001 /* ComputerUseSessionScope.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App/ComputerUseSessionScope.swift; sourceTree = ""; }; C0A710050000000000000001 /* ComputerUseStateRepository.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App/ComputerUseStateRepository.swift; sourceTree = ""; }; C0A710040000000000000001 /* ComputerUseStateScan.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App/ComputerUseStateScan.swift; sourceTree = ""; }; C0A710160000000000000001 /* ComputerUseTargetIdentity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App/ComputerUseTargetIdentity.swift; sourceTree = ""; }; @@ -7932,6 +7911,7 @@ D0F3A0000000000000000003 /* CmuxCloudImagePaste in Frameworks */, 5996379F78D24368B729D109 /* CmuxCloudMachines in Frameworks */, 5E55500000000000000000E3 /* CmuxCommandPalette in Frameworks */, + C0C0A2026091900000000003 /* CmuxComputerUse in Frameworks */, C750100000000000000000A3 /* CmuxControlSocket in Frameworks */, CC0DE00000000000000000A3 /* CmuxCore in Frameworks */, CC0033E15A1B2C3D4E5F0013 /* CmuxDiffComments in Frameworks */, @@ -8040,6 +8020,7 @@ D0F3A0000000000000000004 /* CmuxCloudImagePaste in Frameworks */, D0F4A0000000000000000003 /* CmuxCloudTunnelCore in Frameworks */, 5E55500000000000000000E4 /* CmuxCommandPalette in Frameworks */, + C0C0A2026091900000000004 /* CmuxComputerUse in Frameworks */, A79840010000000000000003 /* CmuxControlSocket in Frameworks */, CC0DE00000000000000000A4 /* CmuxCore in Frameworks */, A500D015A1B2C3D4E5F60718 /* CMUXDebugLog in Frameworks */, @@ -9102,8 +9083,6 @@ C0A710070000000000000001 /* ComputerUseMenuBarSnapshot.swift */, C0A710080000000000000001 /* ComputerUseMenuBarSnapshotStore.swift */, C0A710020000000000000001 /* ComputerUseCuaState.swift */, - C0A710C50000000000000001 /* ComputerUseDaemonReadiness.swift */, - C0A710C40000000000000001 /* ComputerUseDaemonProfile.swift */, C0A711200000000000000001 /* ComputerUseOnboardingStep.swift */, C0A712400000000000000001 /* ComputerUseOnboardingHostingView.swift */, C0A711300000000000000001 /* ComputerUsePermissionRowAction.swift */, @@ -9120,18 +9099,10 @@ C0A716910000000000000001 /* ExternalWindowSamplingService.swift */, C0A712510000000000000001 /* ExternalWindowCompanionPresenter.swift */, C0A710190000000000000001 /* ComputerUseWindowDragRegion.swift */, - C0A710C20000000000000001 /* ComputerUseHelperLaunchConfiguration.swift */, C0A713020000000000000001 /* ComputerUseLiveDriverSession.swift */, C0A713030000000000000001 /* ComputerUseLiveSessionProjection.swift */, - C0A713000000000000000001 /* ComputerUsePermissionRequestOutcome.swift */, - C0A710C30000000000000001 /* ComputerUsePermissionStatus.swift */, - C0A710C10000000000000001 /* ComputerUseRuntimePaths.swift */, - D1F00A110000000000000001 /* ComputerUseRuntimePermissionPhase.swift */, - C0A710010000000000000001 /* ComputerUseRuntimeService.swift */, - C0A710030000000000000001 /* ComputerUseSessionScope.swift */, D1F00A120000000000000001 /* ComputerUseSessionPresentationController.swift */, C0A710050000000000000001 /* ComputerUseStateRepository.swift */, - C0A710A10000000000000001 /* AgentCursorPointerView.swift */, C0A710A00000000000000001 /* ComputerUseCursorOverlayController.swift */, C0A713010000000000000001 /* ComputerUseWatchTargetActivity.swift */, D1F00A100000000000000001 /* ComputerUseWatchTargetController.swift */, @@ -9312,7 +9283,6 @@ 8300A0030000000000000003 /* Workspace+SSHConnectionBroker.swift */, 791102020000000000000001 /* RemoteDisconnectPreparationService.swift */, C0DE43000000000000000008 /* Workspace+AgentChat.swift */, - C3744E040000000000000001 /* AgentPIDProcessIdentity.swift */, 6799A0026799A0026799A002 /* WorkspaceSidebarAgentRuntimeObservationModel.swift */, ED4BE013ED4BE013ED4BE013 /* WorkspaceCloudBindingState.swift */, 4AF464BD9CEDF14931D55126 /* Workspace+Todos.swift */, @@ -12127,6 +12097,7 @@ E3B7A30000000000000000C2 /* CmuxBrowser */, E3B7A30000000000000000D2 /* CmuxNotifications */, F0C0A1000000000000000002 /* CmuxPhonePush */, + C0C0A2026091900000000002 /* CmuxComputerUse */, E3B7A30000000000000000F2 /* CmuxPanes */, E3B7A3000000000000000102 /* CmuxWorkspaces */, A500D013A1B2C3D4E5F60718 /* CMUXDebugLog */, @@ -12262,6 +12233,7 @@ 5E55500000000000000000E2 /* CmuxCommandPalette */, C0DE4A000000000000000004 /* CmuxSidebarProviderKit */, F0C0A1000000000000000002 /* CmuxPhonePush */, + C0C0A2026091900000000002 /* CmuxComputerUse */, 5E55200000000000000000B2 /* CmuxWindowing */, CC0DE00000000000000000A2 /* CmuxCore */, C01E00AA00000000000000A2 /* CmuxSyntaxHighlighting */, @@ -12374,6 +12346,7 @@ E3B7A30000000000000000C1 /* XCLocalSwiftPackageReference "CmuxBrowser" */, E3B7A30000000000000000D1 /* XCLocalSwiftPackageReference "CmuxNotifications" */, F0C0A1000000000000000001 /* XCLocalSwiftPackageReference "CmuxPhonePush" */, + C0C0A2026091900000000001 /* XCLocalSwiftPackageReference "CmuxComputerUse" */, E3B7A30000000000000000F1 /* XCLocalSwiftPackageReference "CmuxPanes" */, E3B7A3000000000000000101 /* XCLocalSwiftPackageReference "CmuxWorkspaces" */, C750100000000000000000A1 /* XCLocalSwiftPackageReference "CmuxControlSocket" */, @@ -12687,7 +12660,6 @@ C7A52F000000000000000002 /* AgentChatTranscriptService+Wire.swift in Sources */, ACA7C4A7000000000000000B /* AgentChatTranscriptService.swift in Sources */, ACA7C4A70000000000000009 /* AgentChatTranscriptTailer.swift in Sources */, - C0A710A10000000000000002 /* AgentCursorPointerView.swift in Sources */, 79390005AA11BB22CC33DD05 /* AgentDeliveryTargetResolution.swift in Sources */, A9F200000000000000000001 /* AgentExecutableResolver.swift in Sources */, A9F200000000000000000002 /* AgentExecutableResolverError.swift in Sources */, @@ -12752,7 +12724,6 @@ E506942F7E8A3C80F94EA4EB /* AgentNotificationAdmissionWaiters.swift in Sources */, 0A1107110000000000000010 /* AgentNotificationDelivery.swift in Sources */, A5D41234A1B2C3D4E5F60718 /* AgentNotificationGate.swift in Sources */, - C3744E030000000000000001 /* AgentPIDProcessIdentity.swift in Sources */, B79500130000000000000001 /* AgentPortPublicationHistory.swift in Sources */, B79500120000000000000001 /* AgentPortRootIdentity.swift in Sources */, B79500050000000000000001 /* AgentPortScanPublication.swift in Sources */, @@ -13477,9 +13448,6 @@ C0A7101B0000000000000002 /* ComputerUseAppDragSourceView.swift in Sources */, C0A710020000000000000002 /* ComputerUseCuaState.swift in Sources */, C0A710A00000000000000002 /* ComputerUseCursorOverlayController.swift in Sources */, - C0A710C40000000000000002 /* ComputerUseDaemonProfile.swift in Sources */, - C0A710C50000000000000002 /* ComputerUseDaemonReadiness.swift in Sources */, - C0A710C20000000000000002 /* ComputerUseHelperLaunchConfiguration.swift in Sources */, C0A713020000000000000002 /* ComputerUseLiveDriverSession.swift in Sources */, C0A713030000000000000002 /* ComputerUseLiveSessionProjection.swift in Sources */, C0A710FF0000000000000002 /* ComputerUseLiveSettingRepository.swift in Sources */, @@ -13495,14 +13463,8 @@ C0A710100000000000000002 /* ComputerUseOnboardingView.swift in Sources */, C0A710110000000000000002 /* ComputerUseOnboardingWindowController.swift in Sources */, C0A711210000000000000002 /* ComputerUseOnboardingWindowPlacement.swift in Sources */, - C0A713000000000000000002 /* ComputerUsePermissionRequestOutcome.swift in Sources */, C0A711300000000000000002 /* ComputerUsePermissionRowAction.swift in Sources */, - C0A710C30000000000000002 /* ComputerUsePermissionStatus.swift in Sources */, - C0A710C10000000000000002 /* ComputerUseRuntimePaths.swift in Sources */, - D1F00A110000000000000002 /* ComputerUseRuntimePermissionPhase.swift in Sources */, - C0A710010000000000000002 /* ComputerUseRuntimeService.swift in Sources */, D1F00A120000000000000002 /* ComputerUseSessionPresentationController.swift in Sources */, - C0A710030000000000000002 /* ComputerUseSessionScope.swift in Sources */, C0A710050000000000000002 /* ComputerUseStateRepository.swift in Sources */, C0A710040000000000000002 /* ComputerUseStateScan.swift in Sources */, C0A710160000000000000002 /* ComputerUseTargetIdentity.swift in Sources */, @@ -15193,7 +15155,6 @@ D36A00030000000000000003 /* AgentHibernationLifecycleState.swift in Sources */, 918100000000000000000101 /* AgentHookFailureStage.swift in Sources */, A76110010000000000000001 /* AgentHookNotificationPolicy.swift in Sources */, - C3744E030000000000000002 /* AgentPIDProcessIdentity.swift in Sources */, 89930002AABBCCDDEEFF0002 /* AgentProcessBindingResolution.swift in Sources */, 394139F275D94FB49356E9C7 /* AgentSurfaceResumeBindingClearOutcome.swift in Sources */, A10649260000000000000001 /* AutomationConfigMutationCoordinator.swift in Sources */, @@ -17165,6 +17126,10 @@ isa = XCLocalSwiftPackageReference; relativePath = Packages/macOS/CmuxPhonePush; }; + C0C0A2026091900000000001 /* XCLocalSwiftPackageReference "CmuxComputerUse" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = Packages/macOS/CmuxComputerUse; + }; E3B7A30000000000000000F1 /* XCLocalSwiftPackageReference "CmuxPanes" */ = { isa = XCLocalSwiftPackageReference; relativePath = Packages/macOS/CmuxPanes; @@ -17467,6 +17432,11 @@ package = F0C0A1000000000000000001 /* XCLocalSwiftPackageReference "CmuxPhonePush" */; productName = CmuxPhonePush; }; + C0C0A2026091900000000002 /* CmuxComputerUse */ = { + isa = XCSwiftPackageProductDependency; + package = C0C0A2026091900000000001 /* XCLocalSwiftPackageReference "CmuxComputerUse" */; + productName = CmuxComputerUse; + }; E3B7A30000000000000000F2 /* CmuxPanes */ = { isa = XCSwiftPackageProductDependency; package = E3B7A30000000000000000F1 /* XCLocalSwiftPackageReference "CmuxPanes" */; diff --git a/cmux.xcworkspace/contents.xcworkspacedata b/cmux.xcworkspace/contents.xcworkspacedata index 6da1454a9405..a5d0cdede992 100644 --- a/cmux.xcworkspace/contents.xcworkspacedata +++ b/cmux.xcworkspace/contents.xcworkspacedata @@ -153,6 +153,9 @@ + + diff --git a/cmuxTests/AgentHibernationProcessSignalBoundaryTests.swift b/cmuxTests/AgentHibernationProcessSignalBoundaryTests.swift index c873d4c270bb..a430cd4f1b5a 100644 --- a/cmuxTests/AgentHibernationProcessSignalBoundaryTests.swift +++ b/cmuxTests/AgentHibernationProcessSignalBoundaryTests.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Darwin import Foundation import os diff --git a/cmuxTests/AgentHibernationProcessSnapshotCoordinatorTests.swift b/cmuxTests/AgentHibernationProcessSnapshotCoordinatorTests.swift index 1f70902226f6..03ceccbd4c3e 100644 --- a/cmuxTests/AgentHibernationProcessSnapshotCoordinatorTests.swift +++ b/cmuxTests/AgentHibernationProcessSnapshotCoordinatorTests.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Darwin import Foundation import os diff --git a/cmuxTests/AgentHibernationProcessTerminationTests.swift b/cmuxTests/AgentHibernationProcessTerminationTests.swift index c66ae538dd5d..3135368b2dc6 100644 --- a/cmuxTests/AgentHibernationProcessTerminationTests.swift +++ b/cmuxTests/AgentHibernationProcessTerminationTests.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Darwin import Foundation import os diff --git a/cmuxTests/AgentHibernationSessionEndIntentTests.swift b/cmuxTests/AgentHibernationSessionEndIntentTests.swift index 72fd5828c1e3..54b056dca5db 100644 --- a/cmuxTests/AgentHibernationSessionEndIntentTests.swift +++ b/cmuxTests/AgentHibernationSessionEndIntentTests.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Foundation import Testing diff --git a/cmuxTests/AgentHibernationTerminationFailureTests.swift b/cmuxTests/AgentHibernationTerminationFailureTests.swift index cda960c263a8..a38d4415c4a7 100644 --- a/cmuxTests/AgentHibernationTerminationFailureTests.swift +++ b/cmuxTests/AgentHibernationTerminationFailureTests.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Darwin import Foundation import os diff --git a/cmuxTests/AgentHibernationTests.swift b/cmuxTests/AgentHibernationTests.swift index 4fdb208446d2..209da846c9c3 100644 --- a/cmuxTests/AgentHibernationTests.swift +++ b/cmuxTests/AgentHibernationTests.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Darwin import Foundation import Testing diff --git a/cmuxTests/AgentHibernationTrackingLifecycleTests.swift b/cmuxTests/AgentHibernationTrackingLifecycleTests.swift index 7e6924ba6c7b..c05c64c7bea2 100644 --- a/cmuxTests/AgentHibernationTrackingLifecycleTests.swift +++ b/cmuxTests/AgentHibernationTrackingLifecycleTests.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Foundation import Testing diff --git a/cmuxTests/AgentRestoreLiveOwnerAdmissionTests.swift b/cmuxTests/AgentRestoreLiveOwnerAdmissionTests.swift index 26fb8a3c230c..482eefccbc1f 100644 --- a/cmuxTests/AgentRestoreLiveOwnerAdmissionTests.swift +++ b/cmuxTests/AgentRestoreLiveOwnerAdmissionTests.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import CMUXAgentLaunch import Darwin import Foundation diff --git a/cmuxTests/AgentSessionAutoResumeSwiftTests.swift b/cmuxTests/AgentSessionAutoResumeSwiftTests.swift index 367e08b37dc6..373ad7d3d248 100644 --- a/cmuxTests/AgentSessionAutoResumeSwiftTests.swift +++ b/cmuxTests/AgentSessionAutoResumeSwiftTests.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Darwin import Foundation import CMUXAgentLaunch diff --git a/cmuxTests/AggregateMemoryRetentionTests.swift b/cmuxTests/AggregateMemoryRetentionTests.swift index 0cbbc0ecdb49..95bcd34dbb60 100644 --- a/cmuxTests/AggregateMemoryRetentionTests.swift +++ b/cmuxTests/AggregateMemoryRetentionTests.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Foundation import Darwin import Testing diff --git a/cmuxTests/CompletedRestoredAgentGenerationTests.swift b/cmuxTests/CompletedRestoredAgentGenerationTests.swift index 49dcaac41f99..092d617901bf 100644 --- a/cmuxTests/CompletedRestoredAgentGenerationTests.swift +++ b/cmuxTests/CompletedRestoredAgentGenerationTests.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Foundation import Testing diff --git a/cmuxTests/ComputerUseOnboardingWindowTests.swift b/cmuxTests/ComputerUseOnboardingWindowTests.swift index 302c9dad0f4b..dfae61ea5414 100644 --- a/cmuxTests/ComputerUseOnboardingWindowTests.swift +++ b/cmuxTests/ComputerUseOnboardingWindowTests.swift @@ -1,3 +1,4 @@ +@testable import CmuxComputerUse import AppKit import SwiftUI import Testing diff --git a/cmuxTests/ComputerUseUXTests.swift b/cmuxTests/ComputerUseUXTests.swift index 26e3ddd619e8..5a47a671582d 100644 --- a/cmuxTests/ComputerUseUXTests.swift +++ b/cmuxTests/ComputerUseUXTests.swift @@ -1,3 +1,4 @@ +@testable import CmuxComputerUse import AppKit import CMUXAgentLaunch import CmuxFoundation diff --git a/cmuxTests/DockSessionPersistenceTests.swift b/cmuxTests/DockSessionPersistenceTests.swift index bc1ce7d9bf2d..6e994d4b1375 100644 --- a/cmuxTests/DockSessionPersistenceTests.swift +++ b/cmuxTests/DockSessionPersistenceTests.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Foundation import Testing import CmuxControlSocket diff --git a/cmuxTests/DockTerminalReattachTests.swift b/cmuxTests/DockTerminalReattachTests.swift index 06bf91349d0d..121c4f8cc3b8 100644 --- a/cmuxTests/DockTerminalReattachTests.swift +++ b/cmuxTests/DockTerminalReattachTests.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import AppKit import CmuxWorkspaces import Combine diff --git a/cmuxTests/ForkParentFallbackGeneralizationTests.swift b/cmuxTests/ForkParentFallbackGeneralizationTests.swift index caf08225d7b8..ce039352abd6 100644 --- a/cmuxTests/ForkParentFallbackGeneralizationTests.swift +++ b/cmuxTests/ForkParentFallbackGeneralizationTests.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Darwin import Foundation import Testing diff --git a/cmuxTests/ForkParentFallbackResidualTests.swift b/cmuxTests/ForkParentFallbackResidualTests.swift index f47a66a2f075..238ae3b1705f 100644 --- a/cmuxTests/ForkParentFallbackResidualTests.swift +++ b/cmuxTests/ForkParentFallbackResidualTests.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import CMUXAgentLaunch import Darwin import Foundation diff --git a/cmuxTests/ForkParentFallbackSessionIndexTests.swift b/cmuxTests/ForkParentFallbackSessionIndexTests.swift index 81722c4d33ef..ff5b0c2d0153 100644 --- a/cmuxTests/ForkParentFallbackSessionIndexTests.swift +++ b/cmuxTests/ForkParentFallbackSessionIndexTests.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Darwin import Foundation import Testing diff --git a/cmuxTests/HermesFirstClassSupportTests.swift b/cmuxTests/HermesFirstClassSupportTests.swift index 4cb5a8a67a35..bb7d60fde8c4 100644 --- a/cmuxTests/HermesFirstClassSupportTests.swift +++ b/cmuxTests/HermesFirstClassSupportTests.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import AppKit import CMUXAgentLaunch import Foundation diff --git a/cmuxTests/HostSettingsShortcutNotificationTests.swift b/cmuxTests/HostSettingsShortcutNotificationTests.swift index 0c5714bbd836..b74b8626ad16 100644 --- a/cmuxTests/HostSettingsShortcutNotificationTests.swift +++ b/cmuxTests/HostSettingsShortcutNotificationTests.swift @@ -1,3 +1,4 @@ +@testable import CmuxComputerUse import Foundation import Testing diff --git a/cmuxTests/OwnedAgentDescendantLifecycleTests.swift b/cmuxTests/OwnedAgentDescendantLifecycleTests.swift index 67f0707c1309..2633400055f3 100644 --- a/cmuxTests/OwnedAgentDescendantLifecycleTests.swift +++ b/cmuxTests/OwnedAgentDescendantLifecycleTests.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Darwin import Foundation import Testing diff --git a/cmuxTests/PortScannerIdentityContinuityTests.swift b/cmuxTests/PortScannerIdentityContinuityTests.swift index a783cb8948a2..f99e561063f6 100644 --- a/cmuxTests/PortScannerIdentityContinuityTests.swift +++ b/cmuxTests/PortScannerIdentityContinuityTests.swift @@ -1,3 +1,4 @@ +@testable import CmuxComputerUse import CmuxCore import CmuxFoundation import Foundation diff --git a/cmuxTests/PortScannerPublicationTests.swift b/cmuxTests/PortScannerPublicationTests.swift index 684cde216551..c83397b65869 100644 --- a/cmuxTests/PortScannerPublicationTests.swift +++ b/cmuxTests/PortScannerPublicationTests.swift @@ -1,3 +1,4 @@ +@testable import CmuxComputerUse import CmuxCore import CmuxFoundation import Foundation diff --git a/cmuxTests/PortScannerTTYFreshnessTests.swift b/cmuxTests/PortScannerTTYFreshnessTests.swift index 77d0d15ba4e2..335c98320864 100644 --- a/cmuxTests/PortScannerTTYFreshnessTests.swift +++ b/cmuxTests/PortScannerTTYFreshnessTests.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Foundation import Testing diff --git a/cmuxTests/PortScannerTests.swift b/cmuxTests/PortScannerTests.swift index e3b065531ab2..9a024259d6fd 100644 --- a/cmuxTests/PortScannerTests.swift +++ b/cmuxTests/PortScannerTests.swift @@ -1,3 +1,4 @@ +@testable import CmuxComputerUse import CmuxCore import CmuxFoundation import Darwin diff --git a/cmuxTests/RestorableAgentProcessGenerationTests.swift b/cmuxTests/RestorableAgentProcessGenerationTests.swift index 9836e9c1c350..d39d290455b6 100644 --- a/cmuxTests/RestorableAgentProcessGenerationTests.swift +++ b/cmuxTests/RestorableAgentProcessGenerationTests.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Foundation import os import Testing diff --git a/cmuxTests/RestorableAgentSessionStalePIDTests.swift b/cmuxTests/RestorableAgentSessionStalePIDTests.swift index 93752b890eea..5bc259fd3996 100644 --- a/cmuxTests/RestorableAgentSessionStalePIDTests.swift +++ b/cmuxTests/RestorableAgentSessionStalePIDTests.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Darwin import Foundation import Testing diff --git a/cmuxTests/RestoredAgentShellActivityLivenessTests.swift b/cmuxTests/RestoredAgentShellActivityLivenessTests.swift index b286b69d1e9f..c6c10e92eb7d 100644 --- a/cmuxTests/RestoredAgentShellActivityLivenessTests.swift +++ b/cmuxTests/RestoredAgentShellActivityLivenessTests.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Foundation import Testing diff --git a/cmuxTests/SharedLiveAgentIndexAgentLivenessTests.swift b/cmuxTests/SharedLiveAgentIndexAgentLivenessTests.swift index a5f9dfa2e8d4..f6bf943dde34 100644 --- a/cmuxTests/SharedLiveAgentIndexAgentLivenessTests.swift +++ b/cmuxTests/SharedLiveAgentIndexAgentLivenessTests.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Foundation import os import Testing diff --git a/cmuxTests/SurfaceResumeExitedAgentLivenessTests.swift b/cmuxTests/SurfaceResumeExitedAgentLivenessTests.swift index 607b40fd19c3..5416f9a49e51 100644 --- a/cmuxTests/SurfaceResumeExitedAgentLivenessTests.swift +++ b/cmuxTests/SurfaceResumeExitedAgentLivenessTests.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Foundation import Testing diff --git a/cmuxTests/WorkspaceForkConversationContextMenuTests.swift b/cmuxTests/WorkspaceForkConversationContextMenuTests.swift index 8a45563f1b00..f6d6a91f4931 100644 --- a/cmuxTests/WorkspaceForkConversationContextMenuTests.swift +++ b/cmuxTests/WorkspaceForkConversationContextMenuTests.swift @@ -1,3 +1,4 @@ +import CmuxFoundation import Darwin import Foundation import os