Repository navigation
refactor(cua-computer): replace daemon MCP with CUA Driver SDK - #117205
Conversation
c9eccb1 to
d5cc4d8
Compare
Dependency GuardThis PR changes dependency-related files. Maintainers should confirm these changes are intentional. Changed files:
Maintainer follow-up:
|
Dependency graph changes are blockedOpenClaw does not accept dependency graph changes through PRs unless a repository admin or security explicitly authorizes the current head SHA. Dependency updates are generated internally by maintainers so external PRs cannot change the resolved graph. Detected dependency graph changes:
Auto-scrub was not attempted because this PR changes package manifest dependency graph fields:
Dependency graph changes must be reviewed by security or handled by maintainers internally. Please remove lockfile changes manually if they are not needed. To remove lockfile changes, restore them from the target branch: git fetch origin
git checkout 'origin/main' -- 'pnpm-lock.yaml'
git commit -m 'chore: remove dependency lockfile change'
git pushIf this PR intentionally needs a dependency graph change, ask a repository admin or member of The action will approve the current head SHA ( |
d5cc4d8 to
e988e96
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 7:38 AM ET / 11:38 UTC. ClawSweeper reviewWhat this changesReplaces the experimental Windows/Linux Merge readinessKeep this PR open for human security/admin review. The branch has addressed the earlier retired-config migration finding and preserves the existing node command surface, but it replaces a separately launched daemon with a packaged native SDK running an unrestricted trusted desktop session and changes the resolved dependency graph; repository policy and the Dependency Guard require approval of the exact head before merge. Priority: P2 Review scores
Verification
How this fits togetherThe flowchart LR
A[Gateway agent tool request] --> B[Paired Windows or Linux node]
B --> C[CUA Computer plugin]
C --> D[Trusted CUA Driver session]
D --> E[Desktop capture or input]
E --> F[Snapshot frame or action result]
F --> A
Decision needed
Why: This is an intentional trust-boundary and supply-chain choice, not a mechanical defect a reviewer can safely resolve from the TypeScript diff alone; the repository Dependency Guard explicitly requires human authorization for the exact head. Before merge
Findings
Agent review detailsSecurityNeeds attention: The diff deliberately introduces a native SDK and an unrestricted trusted desktop session; no line-level exploit was established, but the exact dependency and authority boundary requires the repository’s required human approval. PR surfaceSource +3, Tests -651, Docs 0, Config 0, Other +152. Total -496 across 19 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land only after an authorized reviewer approves the exact native dependency graph and trusted-session boundary, and after the current-head supported-platform/package checks confirm the Doctor migration and node commands work in the built distribution. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug report: this PR is a transport refactor. The supplied comments contain after-fix macOS and isolated Linux desktop exercises, but this read-only review did not execute the native SDK. Is this the best way to solve the issue? Unclear: the direct SDK migration is coherent with the plugin ownership boundary and removes obsolete daemon machinery, but the exact upstream native SDK contract and package provenance need the required human approval before calling it the best final solution. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a530a7bd70d4. LabelsLabel justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
7305fb1 to
b303501
Compare
Local CUA hard-cut / upgrade proofRan on PR head
Limitation, explicitly not concealed: this local runner is macOS while the plugin supports Windows/Linux, and the native SDK requires desktop escalation here. This proves direct native construction/lifecycle and safe permission refusal, not a supported-platform snapshot/action success. No attempt was made to bypass host permissions or control the desktop. Also observed: after completing its migration work, isolated |
b303501 to
0c6628c
Compare
Direct-session repair and Linux desktop proofPR head: During local native validation, the released 0.14.1 SDK correctly reported that OpenClaw had created a trusted session without the required Proof:
The normal remote desktop routes remain unavailable in this environment: Hetzner has no token, Blacksmith Testbox is unauthenticated, and no CUA adapter is configured. The local-container lease auto-cleaned after the successful run. |
…law#117205) * chore(cua-computer): freeze CUA Driver 0.14.1 fixtures * refactor(cua-computer): use CUA Driver SDK directly * fix(cua-computer): repair CUA CI checks * style(cua-computer): format driver cleanup * fix(cua-computer): migrate retired driver path * fix(cua-computer): start direct driver sessions
What Problem This Solves
The Windows/Linux
cua-computerplugin still ran the retired CUA Driver 0.10daemon/MCP route. That leaves the node's durable
screen.snapshotandcomputer.actcapability dependent on a separately installed executable and anobsolete transport contract.
Why This Change Was Made
This PR supersedes the staged fixture-only plan and is the single CUA Driver
0.14.1 hard cut. The plugin now calls the published SDK directly through
CuaDriver.createConfiguredand one OpenClaw-owned trusted session per node-hostcommand execution. Its fixed authorization ceiling, session identifier, TTLs,
and desktop scope are never model-controlled.
It removes executable discovery,
driverPath, daemon spawning/retry, MCPclient/proxy contracts, 0.10 version gates, and runtime fallbacks. It retains
only the existing model-facing
screen.snapshotpluscomputer.actsurface;there is no raw/native MCP projection.
User Impact
Windows/Linux operators enable the plugin without installing or configuring a
cua-driverbinary. This is intentionally a hard cut: existingplugins.entries.cua-computer.config.driverPathconfiguration is no longeraccepted at runtime;
openclaw doctor --fixremoves that retired key beforestrict plugin validation. The former 0.10 daemon/MCP route is not retained.
Evidence
cua-driver-rs-v0.14.1(
41ae29b44b49b68c6e01c934fffbbe74d22e26fb) and@trycua/[email protected](
sha512-/o16k+vcTbdqwmvQqgFCKzrYksSQHz282qO8RkpD67GQoY4Vp3pyDndQexRJ8AbzNQpUt1bIXSAAaFBaMad6rg==).@modelcontextprotocol/[email protected]is removedfrom
extensions/cua-computer;@trycua/[email protected], its six platformpackages, and its
@ubjsruntime/native packages are added (17 resolvedpackages total). The repository Dependency Guard requires a repository admin
or
@openclaw/openclaw-secopsmember to approve the exact head0c6628cb6383cea4be322b1d240dde2d3345abdawith/allow-dependencies-change; this PR is waiting for that human approval.extensions/cua-computer/doctor-contract-api.tsprovides the plugin-ownedmigration and warning for the shipped
driverPathsetting. Its focused testproves removal before strict validation and idempotence; the bundled-metadata
test proves the sidecar ships for the doctor registry.
node scripts/run-vitest.mjs extensions/cua-computer/src/driver-client.test.ts extensions/cua-computer/src/commands.test.ts extensions/cua-computer/src/driver-contract-fixtures.test.tspassed: 3 files, 11 tests.
node scripts/run-oxlint.mjs extensions/cua-computer,pnpm deadcode:dependencies,pnpm deadcode:unused-files,pnpm docs:map:check,pnpm format:docs:check,pnpm format:check, andgit diff --check.autoreview --mode uncommitted: TruffleHog clean; no actionablefindings (
patch is correct, 0.99).startSessionexactly once withthe fixed OpenClaw-owned session id and desktop scope, and pair it with
endSessionbefore handle/runtime teardown. Focused CUA suite: 6 files,46 tests; extension type and lint proof passed.
local-container(not a remoteprovider): the isolated Xvfb host registered both node-host commands, returned
a real 320x180 PNG
screen.snapshot(2297 bytes) and frame id, then accepteda harmless center
computer.act(mouse_move)using that frame/reference width.origin/mainafe024e8c7990e9ced295f544c3cc5502c7136d4.The post-rebase CUA and bundled-sidecar proof passed (84 tests).
Testbox/Crabbox was unavailable because Blacksmith was unauthenticated and
managed provider auth was unavailable. The trusted local changed gate then
stopped at the inherited environment-count ratchet (516 names vs unchanged
origin/mainbudget 517); this PR adds/removes noOPENCLAW_*identifier.