Repository navigation
feat(cli): share native Computer Use across Linux, macOS and Windows - #3646
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CLI chat and
execpreviously 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 sharedopenbitfun-computer-useservice and the portable tool contract.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 statusreports 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-cliandcargo 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