Repository navigation
Description
Note: This repository enforces the Star Gate (
star-check) on pull requests — please ⭐ star this repository before submitting a PR so the requiredstar-checkcheck passes.
Context / Motivation
The macOS backend (platforms/macos.py, backends/ax.py, maccursor.py) is currently implemented and logic-tested only against fake Quartz/AX/Objective-C shims (tests/test_macos_logic.py, tests/test_cursor_macos.py). As noted in README.md (## Limitations), it has never been run or verified on a real Mac, so real-world compatibility on macOS (Apple Silicon arm64 and Intel x86_64) is currently unknown.
We need contributors on real macOS machines to run end-to-end verification, fix any ctypes/Quartz/AX/permission/scaling issues found, and bring macOS support from unverified preview to tested status.
Areas to Test & Verify
- Installation & Permissions:
python3 -m pip install '.[all]',computer-use-linux setup,computer-use-linux caps, and macOS Privacy & Security prompts (Accessibility, Screen Recording, Automation) when launched from Terminal.app, iTerm2, VS Code, etc. - Windows & Actions (
platforms/macos.py):CGWindowListCopyWindowInfowindow enumeration,AXUIElementactions (AXRaise,AXMinimized, close button), focus handling across Spaces/Mission Control. - Input (
CGEventPost/kCGHIDEventTap): left/right/middle click, double-click (kCGMouseEventClickState), drag (*Draggedevents), scroll, modifier combos (cmd,ctrl,alt,shift), and Unicode / non-ASCII text input (CGEventKeyboardSetUnicodeString). - Screenshots & Retina/Multi-Display Alignment:
screencapture -xcapture,Screenshot.scale(pixel vs point space),--window,--region,--screen, and--from-shotcoordinate accuracy on Retina displays and multi-monitor setups. - Accessibility Tree (
backends/ax.py): realobserve,tree,find,click-text,fill,do --after,wait, and snapshot ref stability (@sid:eN) on native Cocoa apps and browsers/Electron apps. - Visible Agent Cursor (
maccursor.py): ctypes Objective-C overlay (ignoresMouseEvents, no focus steal) — especially verifyingarm64objc_msgSendprototypes on Apple Silicon and multi-display behavior. - Terminals & Service:
Terminal.appandiTerm2AppleScript read/send (argv safety with special characters),tmuxpanes, and optional background service (CUL_SERVICE=1).
Relevant Code
core/computer_use_linux/platforms/macos.pycore/computer_use_linux/backends/ax.pycore/computer_use_linux/maccursor.pytests/test_macos_logic.py,tests/test_cursor_macos.pyREADME.md(## Install,## Limitations),docs/DEPENDENCIES.md,.github/workflows/ci.yml
Acceptance Criteria
- Execute end-to-end manual and automated checks on a real Mac (recording macOS version, architecture
arm64/x86_64, display scaling/monitors, and host terminal app). - Fix any crashes, ctypes/ABI bugs, coordinate mismatches, permission edge cases, or AX/cursor/terminal defects uncovered on real macOS, adding unit regression tests to
tests/test_macos_logic.py/tests/test_cursor_macos.py. - Update
README.md(## Limitations/ compatibility status) anddocs/DEPENDENCIES.mdwith verified macOS compatibility results and any remaining caveats. - (Optional/recommended) Add a
macos-latestheadless unit-test job to.github/workflows/ci.ymlso macOS-specific tests run on real macOS runners in CI.
How to Verify
python3 tests/test_macos_logic.py
python3 tests/test_cursor_macos.py
# On a real Mac with Accessibility + Screen Recording granted:
computer-use-linux setup
computer-use-linux caps
computer-use-linux windows
computer-use-linux screenshot --out /tmp/cul-macos.png
computer-use-linux observe
computer-use-linux cursor 200 200
Activity