Skip to content

feat(cli): share native Computer Use across Linux, macOS and Windows - #3646

Merged
bobleer merged 7 commits into
GCWing:mainfrom
bobleer:bob/cli-computer-use
Oct 31, 2026
Merged

bobleer merged 7 commits into
GCWing:mainfrom
bobleer:bob/cli-computer-use

Conversation

@bobleer

@bobleer bobleer commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

CLI chat and exec previously had no native Computer Use provider even when the same machine supported it in Desktop. Inject the existing Linux, macOS and Windows providers into CLI graphical hosts through a shared openbitfun-computer-use service and the portable tool contract.

  • Move native capture, accessibility, input and control-session ownership out of Desktop; keep its old module as a compatibility facade.
  • Add CLI status/enable/disable/explicit OS-permission commands, macOS main-run-loop support and native shutdown cleanup.
  • Load Linux GStreamer/Tesseract runtime libraries only when capture/OCR is used, so headless CLI startup does not require desktop libraries.
  • Preserve tool approval, cancellation, legacy payloads and remote-workspace rejection. SSH/headless, detached jobs, ACP and stdio servers do not acquire an implicit GUI provider.

Type and Areas

Feature/refactor: CLI, Desktop, shared native services, tool contracts, build dependencies and native test harnesses.

Motivation / Impact

CLI and Desktop now select the same native implementation on the executing host rather than making Computer Use a Desktop-only capability. It is enabled by default for new configurations; existing saved true/false values are preserved on upgrade. openbitfun computer-use status reports configuration, session availability and OS permissions. The optional enable/disable commands persist a preference, not a per-launch requirement. Existing system consent and approval remain required. No persisted configuration field or wire shape is replaced.

Verification

  • Latest-head CI completed successfully for 214084c68: all 14 PR checks passed, including Linux/macOS/Windows workspace and CLI jobs, shared native service tests on all three OSes, Frontend Build, DSH packaging, Linux x64/arm64 installer/package/Relay-image validation, and the Rust / CLI aggregate gate. Windows CI compiled and linked the native C backend and passed 147 shared-service tests.

  • cargo check --locked -p openbitfun-cli and cargo check --locked -p openbitfun-desktop --tests --features devtools: passed on macOS.

  • cargo test --locked -p openbitfun-computer-use --lib: 215 passed on macOS; 139 passed on Linux.

  • Core Computer Use unit tests: 106 passed. CLI provider/bootstrap and configuration/SSH contracts passed.

  • node scripts/test-native-ax-context.mjs --cli: real CLI observed a disposable native window, returned accessibility and image content, and stopped control.

  • macOS directed-input and full production Tool round-trip fixtures passed: screenshot, semantic/image clicks, Unicode input, OCR and stop, with stable foreground/binding.

  • Linux CLI compiled; real GTK/AT-SPI button/text fixture, generated GStreamer stream, Tesseract OCR, optional-library failure and Xft DPI geometry tests passed.

  • node scripts/test-windows-computer-use-native.mjs --check --target x86_64-pc-windows-msvc: production Rust library and tests type-checked; no Windows native execution/C-link evidence from the local host.

  • Config-contract tests: 144 passed, including absent legacy fields and persisted true/false round trips. Real CLI native fixture also passed without an enable command.

  • CLI terminal capability regression passed with no GUI provider: ControlHub now probes the actual registered terminal service. All 48 focused ControlHub regressions passed.

  • Configuration-read failures keep Computer Use disabled; malformed saved values are rejected instead of taking the enabled default. All 84 focused tool tests, 4 CLI Computer Use contracts and 15 CLI assembly contracts passed.

  • Native AppleScript process fixtures use the shared process launcher; 6 focused checks passed.

  • Core boundary contract tests: 156 passed. GitHub config, repository hygiene and git diff --check: passed.

  • Reproduced the Ubuntu 22.04 LLVM/libunwind header conflict and verified apt resolution by explicitly selecting libunwind-dev. Shared-provider unit tests now run on all three CI operating systems.

Reviewer Notes

AI-assisted, extensively tested locally with the limits above. Real Windows desktop interaction, Linux Wayland portal/PipeWire seat input, and all four remote scenarios have not been exercised end to end. Peer/mobile may drive an already provisioned graphical CLI runtime, but Desktop sharing/preview commands are not added to CLI peer capabilities. Detached GUI support still requires a negotiated capability.

The native owner migration and CLI wiring are kept in one atomic commit so both product hosts and their test/build paths remain consistent.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

@bobleer
bobleer merged commit 4d73551 into GCWing:main Oct 31, 2026
13 checks passed
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