Skip to content

Allow Cua Driver to target macOS Ventura#1498

Open
iqdoctor wants to merge 3 commits into
trycua:mainfrom
strato-space:clarify-cua-driver-macos-floor
Open

Allow Cua Driver to target macOS Ventura#1498
iqdoctor wants to merge 3 commits into
trycua:mainfrom
strato-space:clarify-cua-driver-macos-floor

Conversation

@iqdoctor
Copy link
Copy Markdown

@iqdoctor iqdoctor commented May 13, 2026

Summary

This attempts to make Cua Driver build and launch on macOS 13 Ventura, including Intel Macs such as MacBookPro14,3 whose latest Software Update offering is Ventura 13.7.8.

Changes:

  • lower the Swift package platform from .macOS(.v14) to .macOS(.v13)
  • lower CuaDriver.app LSMinimumSystemVersion from 14.0 to 13.0
  • remove the macOS-14-only Observation framework usage from the agent cursor overlay
  • keep the cursor overlay rendering through TimelineView, which already samples renderer state every frame
  • add installer preflight for macOS version detection so unsupported pre-Ventura systems fail clearly
  • update Cua Driver docs and the bundled skill README to describe macOS 13+ support

Why

cua-driver-v0.1.9 fixed the Intel/x86_64 release artifact issue from #1493 / #1494. On an Intel MacBookPro14,3 running macOS 13.7.8, the installed v0.1.9 binary is now correctly universal, but it fails before permission checks:

dyld: Library not loaded: /usr/lib/swift/libswiftObservation.dylib
Referenced from: /Applications/CuaDriver.app/Contents/MacOS/cua-driver (built for macOS 14.0 which is newer than running OS)

Local machine context:

Mac: MacBook Pro
Model Identifier: MacBookPro14,3
Architecture: x86_64
macOS: 13.7.8 (22H730)
Installed Cua Driver: 0.1.9
Installed binary: Mach-O universal binary with x86_64 + arm64 slices

softwareupdate --list-full-installers on that machine only lists Ventura 13.7.8 and older installers, not Sonoma or later.

Related context

Validation

Ran locally on the Ventura Intel host:

git diff --check
bash -n libs/cua-driver/scripts/install.sh
plutil -lint libs/cua-driver/App/CuaDriver/Info.plist

All passed.

I could not run a local Swift build on this host because it only has Command Line Tools / Swift 5.8.1, and swift build fails before package resolution with:

xcrun: error: unable to lookup item 'PlatformPath' from command line tools installation

Please treat upstream macOS-15 Swift 6 CI as the compile gate. If CI produces a testable x86_64 artifact, I can validate --version and basic runtime behavior on the physical Intel Ventura machine.

Summary by CodeRabbit

  • Improvements

    • Extended compatibility to macOS 13 (Ventura) or later, reducing minimum requirement from macOS 14 (Sonoma).
  • New Features

    • Added runtime macOS version validation during installation to ensure system compatibility.
  • Documentation

    • Updated system requirements across installation, introduction, and integration guides.

Review Change Stack

Lower the declared driver platform floor to macOS 13 and remove the macOS 14 Observation dependency from the cursor overlay so Intel Ventura Macs can test the same x86_64 release path fixed by the recent packaging work.

Constraint: MacBookPro14,3 only receives Ventura 13.7.8 through Software Update, while Cua Driver 0.1.9 currently declares macOS 14.0 and links libswiftObservation.

Rejected: Document-only unsupported-Mac clarification | it would preserve the dyld crash path instead of testing a narrow Ventura compatibility patch.

Confidence: medium

Scope-risk: moderate

Directive: Verify on upstream macos-15 Swift 6 CI and on a physical Intel Ventura Mac before claiming full host-automation support.

Tested: git diff --check; bash -n libs/cua-driver/scripts/install.sh; plutil -lint libs/cua-driver/App/CuaDriver/Info.plist

Not-tested: swift build locally, blocked by Command Line Tools xcrun PlatformPath error and no full Xcode install on this host; runtime Cua Driver tool calls on Ventura.
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 13, 2026

@iqdoctor is attempting to deploy a commit to the Cua Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 65269050-b8d9-449f-bd6b-535dde3b8d61

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR downgrades the minimum macOS requirement from Sonoma (14) to Ventura (13) by removing the Swift Observation framework dependency from the cursor rendering code, updating build configuration and installation checks, and revising documentation to reflect the new minimum.

Changes

macOS Ventura (13) Support

Layer / File(s) Summary
Remove Observation framework from cursor rendering
libs/cua-driver/Sources/CuaDriverCore/Cursor/AgentCursorRenderer.swift, libs/cua-driver/Sources/CuaDriverCore/Cursor/AgentCursorView.swift
Remove import Observation and @Observable from AgentCursorRenderer, update its style property documentation to explain frame-by-frame sampling via TimelineView, and change AgentCursorView.renderer from @Bindable var to immutable let property.
Build configuration for macOS 13 minimum
libs/cua-driver/App/CuaDriver/Info.plist, libs/cua-driver/Package.swift
Update LSMinimumSystemVersion in Info.plist from 14.0 to 13.0 and platform minimum in Package.swift from .macOS(.v14) to .macOS(.v13).
Installation runtime version check
libs/cua-driver/scripts/install.sh
Add macOS version detection using sw_vers, validate the major version is numeric, and exit with error if the version is less than 13.
Documentation updates for macOS 13 support
docs/content/docs/cua-driver/guide/getting-started/installation.mdx, docs/content/docs/cua-driver/guide/getting-started/introduction.mdx, docs/content/docs/cua-driver/guide/getting-started/swift-integration.mdx, libs/cua-driver/Skills/cua-driver/README.md
Update documented minimum macOS from 14 (Sonoma) to 13 (Ventura) across all guides and README, adjusting dependency notes to reference Ventura+ API availability (Accessibility, ScreenCaptureKit, SkyLight private SPIs).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related issues

Poem

🐰 From Sonoma back to Ventura's green,
We ditch the Observation that macOS once decreed,
TimelineView ticks our cursor with grace,
No framework bindings needed in this place,
Ventura thirteen opens the gate. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and clearly describes the main change: lowering the macOS deployment target from version 14 (Sonoma) to version 13 (Ventura). This is reflected across all modified files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Remove direct SCScreenshotManager references so the driver can compile against the macOS 13 SDK, and keep the cursor overlay reads on the main actor after removing Observation.

Constraint: MacBookPro14,3 is capped at macOS 13.7.8 with CLT 14.3 / SDK 13.3, where SCScreenshotManager and libswiftObservation are unavailable.

Rejected: require Sonoma or Xcode 16 for local validation | this would not test the reported Intel Ventura host.

Confidence: medium

Scope-risk: moderate

Directive: Reintroduce SCScreenshotManager only behind a build path that still compiles with the macOS 13 SDK or through a runtime/dynamic shim.

Tested: Swift 6.1.3 build on x86_64 macOS 13.7.8 with -swift-version 5 and linker wrapper; built .build/CuaDriver.app; verified --version, minos 13.0, no libswiftObservation, correct bundle attribution, list_tools, list_apps, get_screen_size, get_window_state capture_mode=ax.

Not-tested: swift test cannot run under CommandLineTools-only Ventura because XCTest is unavailable; Screen Recording pixel capture remains blocked by local TCC grant for the ad-hoc .build app.

Co-authored-by: Oh My Codex <oh-my-codex@users.noreply.github.com>
@iqdoctor
Copy link
Copy Markdown
Author

Local Ventura validation update from the reported Intel host:

Environment:

  • MacBookPro14,3, x86_64
  • macOS 13.7.8 (22H730)
  • Command Line Tools 14.3 / macOS SDK 13.3
  • user-installed Swift 6.1.3 toolchain

What blocked local testing before this follow-up commit:

  1. The system Swift 5.8.1 is too old for the current MCP dependency graph (modelcontextprotocol/swift-sdk uses Swift tools 6.1).
  2. With Swift 6.1.3 + SDK 13.3, a default build fails inside swift-sdk strict-concurrency diagnostics because Ventura's Network framework declarations do not make NWConnection.State Sendable. For local validation I had to compile with -Xswiftc -swift-version -Xswiftc 5.
  3. Cua itself still referenced SCScreenshotManager, which is not declared in the macOS 13 SDK. Commit 549bf4fd removes that direct reference and uses the older WindowServer-compatible capture path so the package can compile against SDK 13.
  4. Swift 6.1.3 emits -no_warn_duplicate_libraries; CLT 14.3's ld64-857.1 does not understand that option. For local validation I used a temporary clang wrapper that filters only that linker flag.

Validation that now passes locally on macOS 13.7.8:

  • built cua-driver as x86_64 with minos 13.0
  • built and ad-hoc signed .build/CuaDriver.app
  • verified --version returns 0.1.9
  • verified otool -l reports LC_BUILD_VERSION minos 13.0
  • verified otool -L has no libswiftObservation.dylib
  • verified doctor sees bundle attribution as com.trycua.driver
  • verified list_tools, list_apps, get_screen_size
  • verified get_window_state works in capture_mode: ax against Finder on the Ventura host

Remaining local limitation:

  • swift test cannot run on this machine with CommandLineTools only because XCTest is unavailable without full Xcode.
  • Pixel screenshot capture still needs a Screen Recording TCC grant for the ad-hoc .build/CuaDriver.app; AX mode works without that pixel path.

Allow daemon and MCP startup to proceed with only Accessibility when capture_mode is ax, and launch the installed app executable directly when a shell symlink needs CuaDriver.app bundle attribution.

Constraint: The local Ventura host has Accessibility granted but Screen Recording unavailable for the ad-hoc patched app; AX mode does not need pixel capture.

Rejected: keep requiring Screen Recording at daemon startup | this blocks AX-only operation even though get_window_state works without screenshots.

Confidence: medium

Scope-risk: moderate

Directive: Keep Screen Recording mandatory for som/vision modes, but do not gate AX-only sessions on pixel-capture permission.

Tested: Swift 6.1.3 build on x86_64 macOS 13.7.8 with -swift-version 5 and linker wrapper; installed /Applications/CuaDriver.app; ran cua-driver serve from shell; verified daemon status and get_window_state against Finder in capture_mode=ax.

Not-tested: Full pixel screenshot flow because Screen Recording remains ungranted for the ad-hoc local bundle; swift test remains blocked by missing XCTest under CommandLineTools-only Ventura.

Co-authored-by: Oh My Codex <oh-my-codex@users.noreply.github.com>
@iqdoctor
Copy link
Copy Markdown
Author

Follow-up after installing the patched build on the Ventura host:

  • Installed the locally built .build/CuaDriver.app to /Applications/CuaDriver.app on MacBookPro14,3 / macOS 13.7.8.
  • The prior installed cua-driver-v0.1.9 was backed up locally; it failed on this host with libswiftObservation.dylib missing and LSMinimumSystemVersion=14.0.
  • The patched installed app now runs via the normal symlink at ~/.local/bin/cua-driver.
  • otool -l /Applications/CuaDriver.app/Contents/MacOS/cua-driver reports minos 13.0.
  • otool -L has no libswiftObservation.dylib dependency.
  • Persistent config is set to capture_mode=ax for this Ventura validation.
  • cua-driver serve now starts the daemon successfully from the shell and binds ~/Library/Caches/cua-driver/cua-driver.sock.
  • cua-driver status reports the daemon running.
  • cua-driver call get_window_state '{"pid":403,"window_id":59}' --raw succeeds against Finder in AX mode.

This required commit 6d7eb5b0: in AX-only mode, daemon/MCP startup should require Accessibility but should not block on Screen Recording, because AX mode intentionally skips pixel capture.

Remaining local limitation: pixel screenshot tools still require a Screen Recording grant for the ad-hoc local app bundle. AX-mode automation is working on macOS 13.7.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant