Repository navigation
feat(macos): add embedded CUA computer provider - #123635
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 14, 2026, 11:47 AM ET / 15:47 UTC. ClawSweeper reviewWhat this changesThis PR adds an embedded CUA driver option to the macOS Computer Control setting, with app-owned daemon lifecycle, MCP worker transport, packaging, and provider-specific command dispatch. Regression provenancePossible regression — probable (reviewed change; reproduction). No predecessor PR is attributed. Merge readiness⛔ Blocked by patch quality or review findings - 10 items remain Keep open and do not merge: enabling the CUA plugin by default on Darwin makes its global dangerous-command policy remove the existing Peekaboo Priority: P1 Review scores
Verification
How this fits togetherThe macOS app advertises screen and computer-control commands to Gateway; Gateway then applies command policy before the agent’s computer tool can invoke them. The selected provider supplies snapshots and actions through the existing native path or the new embedded CUA host. flowchart LR
Settings[Mac provider setting] --> App[macOS app]
App --> Host[Embedded CUA host]
Host --> Worker[Node worker]
Worker --> Gateway[Gateway command policy]
Gateway --> Tool[Computer tool]
Tool --> Desktop[Desktop snapshots and actions]
Before merge
Findings
Agent review detailsSecurityNeeds attention: The PR adds an unrestricted TCC-bearing driver boundary, and its previously reported worker-socket authentication defect remains unresolved. PR surfaceSource +727, Tests +423, Docs +19, Config 0, Other +2248. Total +3417 across 35 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Scope CUA’s dangerous policy to nodes that advertise the CUA provider so it cannot change Peekaboo’s existing default, authenticate the embedded-worker endpoint, add an upgrade regression, then record a redacted signed-app TCC run. Do we have a high-confidence way to reproduce the issue? Yes—source-reproducible: activate the Darwin CUA plugin without an explicit gateway allow entry; its dangerous policy removes computer.act despite the normal macOS default. Current policy coverage demonstrates that exact allowlist behavior. Is this the best way to solve the issue? No. App-owned CUA lifecycle is a plausible TCC boundary, but global CUA policy must not govern the unrelated Peekaboo provider, and the worker endpoint needs authentication plus real signed-app proof. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 59533cb0fb4a. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
1a85995 to
a7f5294
Compare
|
Merged via squash.
|
…r.act v2) (#123464) * docs(plan): computer-use campaign plan — two-provider background computer use (CUA + Peekaboo) behind computer.act v2 * docs(plan): resolve W0-PIN — pinned 0.19.3 already contains inherited IPC and consent adapter * docs(plan): W0 complete — parity fixtures landed (#123469) * docs(plan): W1-SEAM landed (#123509) * docs(plan): W1 complete — v2 contract landed (#123544) * docs(plan): W2-CUA landed (#123604) * docs(plan): W2-MAC landed (#123635) * docs(plan): note picker screenshot evidence belongs to W2-UX * docs(plan): avoid inline-html placeholder in tracker note
* feat(macos): embed CUA computer provider * fix(macos): clarify embedded CUA trust posture * fix(macos): contain embedded CUA daemon lifecycle * fix(macos): reap orphaned CUA daemons * fix(macos): record the spawned CUA daemon pid so reaping can terminate orphans * chore(macos): refresh native i18n baseline for the computer control provider picker * style(macos): satisfy swiftlint on the embedded CUA host and connect params * refactor(gateway): move optional connect params to GatewayConnectOptions
…r.act v2) (openclaw#123464) * docs(plan): computer-use campaign plan — two-provider background computer use (CUA + Peekaboo) behind computer.act v2 * docs(plan): resolve W0-PIN — pinned 0.19.3 already contains inherited IPC and consent adapter * docs(plan): W0 complete — parity fixtures landed (openclaw#123469) * docs(plan): W1-SEAM landed (openclaw#123509) * docs(plan): W1 complete — v2 contract landed (openclaw#123544) * docs(plan): W2-CUA landed (openclaw#123604) * docs(plan): W2-MAC landed (openclaw#123635) * docs(plan): note picker screenshot evidence belongs to W2-UX * docs(plan): avoid inline-html placeholder in tracker note
Campaign plan: https://github.com/openclaw/openclaw/blob/steipete/computer-use-plan/docs/plan/computer-use.md
Landed chain: #123509 → #123544 → #123604
What Problem This Solves
OpenClaw.app could not use the CUA provider without giving the driver a separate macOS TCC identity: a daemon spawned by the Gateway or TypeScript worker inherits that process's responsibility chain, not the signed app's Accessibility and Screen Recording grants. The Mac node also had no node-local provider choice, and native snapshot/action dispatch always won over the worker.
Why This Change Was Made
The signed app now owns the complete embedded-daemon lifecycle and exposes a generation-scoped private socket to its TypeScript node worker. Settings chooses exactly one provider—Peekaboo by default or CUA—with provider-selected manifest merging and dispatch, no per-call fallback, and worker/proxy teardown before daemon replacement.
The CUA worker uses the pinned 0.19.3 MCP proxy instead of
CuaDriver.connect: upstream authenticates trusted SDK sessions to the daemon's exact parent PID, so the sibling worker cannot attach through that API. Packaging downloads the pinned universal binary, verifies SHA-256733e28a3782ac8d325f8fce8b5d97486c1054af755b40dfd086151b34c79377e, stages it in Resources, and signs the nested executable before the app bundle.User Impact
Mac users keep today's Peekaboo behavior by default. Packaged builds add a Computer Control provider picker; selecting CUA starts the app-owned embedded host, advertises the v2 CUA capability descriptor only after socket readiness, and makes failures visibly unavailable instead of mixing providers. Development builds without the artifact show
CUA (driver not bundled)as unavailable and never searchPATH.Evidence
Before:
After:
swift test --package-path apps/macos --enable-code-coverage --parallel— passed (exactmacos-swiftCI test invocation)swift build --package-path apps/macos --product OpenClaw --configuration release— passednode scripts/run-vitest.mjs extensions/cua-computer— passed (68 tests)node scripts/run-vitest.mjs test/scripts/package-mac-app.test.ts— passed (48 tests)pnpm tsgoandpnpm check:test-types— passedpnpm deadcode:full— passedpnpm check:import-cycles— 0 runtime value cyclespnpm check:madge-import-cycles— 0 cyclespnpm format:check,pnpm check:docs, native state schema guard, shell syntax, andgit diff --check— passedx86_64 arm64, and installed mode0755.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main— clean, no accepted/actionable findingsProduction LOC: +1715/-68 (net +1647) | Tests: +934/-3 (net +931). The production growth is the new TCC/lifecycle ownership boundary plus the bounded MCP client required by the upstream parent-PID contract; no protocol, SQLite, pairing, or arming semantics changed.
Live TCC proof pending coordinator. This PR intentionally stops at deterministic lifecycle, transport, packaging, and dispatch proof; the coordinator will run the signed-app Accessibility/Screen Recording inheritance scenario on real hardware before landing.