feat: add optional Cua Driver computer backend - #65
Conversation
|
Not a review of the Cua backend itself — a note on the CI hunk, which closes something I had found The two lines that matter: - run: bun install --frozen-lockfile && bun run typecheck
working-directory: agent-computer
I checked it is free rather than assuming — What the same reasoning still leaves open, after this lands:
I am not suggesting you widen this PR — the Cua backend is the change, and |
|
Closing this, and to be clear it's not a code problem — the refactor is clean, it doesn't touch the governed path, and no browsing data or credential leaves the customer's network. The reason is fit for where the product is: it adds 15 closed-source prebuilt native binaries (@trycua/cua-driver plus @ubjs/* pinned to a 0.31.0-3 pre-release) with OS-level screen-capture and input-injection rights, exercised in CI only by a fake driver. For the enterprise reviews we're aiming at, that dependency shape doesn't pass, and it buys nothing today while Playwright stays the default backend. What would change the call: a real customer asking for it, the binaries vendored and digest-pinned, and a real-driver smoke in CI. Reopen at that point and it's a fast yes. |
What this changes
Adds an opt-in
COMPUTER_BACKEND=cua-driverimplementation behind the existing computer-service contract. Playwright remains the default.The Cua Driver backend:
PROFILES_DIR/cua-driver, separate from Playwright profiles;agent-computerimage and the all-in-one production image.The production packaging starts Xvfb and Openbox only for the Cua backend. It keeps Chromium and the display under
pwuser, waits for graceful browser/profile shutdown before stopping X11, and builds both container paths in CI.Where it runs
PROFILES_DIR/cua-driver; live Cua sessions remain process-local, like the existing live Playwright browser.agent-computerreplica owns the browsers and profiles assigned to that deployment instance; the supervisor's per-Bot container model remains the isolation path.Boundary and audit
COMPUTER_TOKEN.Changelog
COMPUTER_BACKEND=cua-driver. The new configuration and operational differences are documented in the README and deployment, configuration, and architecture guides.Known limitations
egress: nullfor this backend.Proof
Candidate:
53e5a8868ee85ea5131ea89d6353c1685b849eabagent-computertypechecks passed.agent-computer: 99 tests passed.agent-computer/Dockerfileand the root productionDockerfilebuilt successfully from the candidate.pwuser; navigation and native screenshot passed.docker stop --timeout 20loggedSIGTERM: closing the browser so its profile is flushedbefore X11 exited.READY TO SUBMIT.