Repository navigation
refactor(computer-use): one canonical wire contract + node-host provider seam - #123509
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 14, 2026, 2:10 AM ET / 06:10 UTC. ClawSweeper reviewWhat this changesThis PR adds a public Computer Use plugin SDK entry point that owns command validation and node-host registration, then adapts the bundled CUA computer provider to it. Merge readinessKeep open for human review: this adds a public plugin SDK contract and centralizes the dangerous computer command policy, but repository inspection could not run because the sandbox failed before any source or history command executed. Priority: P3 Review scores
Verification
How this fits togetherComputer-use requests travel from an agent tool through node-host commands to a registered provider such as the CUA plugin. The new shared SDK layer validates snapshot/action payloads and applies the dangerous-command invoke policy before provider execution. flowchart LR
A[Agent computer request] --> B[Node-host command]
B --> C[Shared Computer Use contract]
C --> D[Dangerous command policy]
D --> E[CUA provider execution]
E --> F[Snapshot or action result]
Decision needed
Why: This is a new public SDK and shared security-sensitive registration owner; the reviewer could not independently inspect the exact implementation due to sandbox failure. Before merge
Agent review detailsSecurityNone. PR surfaceSource +138, Tests +100, Docs +21, Config +4, Other +4. Total +267 across 14 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 a maintainer verifies the exported SDK contract, command-policy enforcement, provider execution cleanup, and compatibility with the existing CUA path on the exact head. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR proposes an SDK and ownership boundary rather than reporting a reproducible existing-behavior failure; the review environment also could not inspect the checkout. Is this the best way to solve the issue? Unclear: centralizing duplicated registration is plausible, but the new public provider lifecycle and dangerous-command policy need direct exact-head review before this can be judged the best durable boundary. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 6bd21a11222a. LabelsLabel changes:
Label justifications:
EvidenceWhat 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
|
|
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
…der seam (openclaw#123509) * refactor(computer-use): add provider seam * refactor(computer-use): retry provider open after failure; drop changelog entry
…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
Related: #123464
Related: #123469
Campaign: docs/plan/computer-use.md — W1-SEAM / W1a.
What Problem This Solves
The built-in computer tool and the bundled CUA fulfiller independently described the same
computer.actwire payload, while CUA also registeredscreen.snapshot,computer.act, and the dangerous-command policy itself. That left the contract and registration ownership duplicated before the provider campaign adds another fulfiller.Why This Change Was Made
This adds one narrow
openclaw/plugin-sdk/computer-usesurface for the canonical TypeBox wire schemas and node-host provider registration. The shared helper registers the command pair and dangerous policy once;cua-computerkeeps its existing availability polling, lazy driver, serialized execution, frame binding, action mapping, cancellation, refusals, and disposal behindopenExecution.Provider selection intentionally remains trivial: one registered provider per node host. This PR does not change the Gateway protocol, native macOS fulfiller, node capability advertisement, model-facing tool schema or description, action set, or any W1b behavior.
User Impact
No model-visible or operator-visible behavior changes. Plugin developers get one documented provider seam and one canonical inner-wire contract instead of copying command registration and validation.
Evidence
pnpm install— passed (1,318 packages, 16.6s).node scripts/run-vitest.mjs extensions/cua-computer src/agents/tools/computer-tool.test.ts src/agents/tools/computer-tool.node-resolution.test.ts src/cli/nodes-camera.test.ts src/plugins/computer-use-contract.test.ts src/node-host/plugin-node-host.test.ts— 5 shards, 9 files, 174 tests passed in 28.23s.node scripts/check-changed.mjs -- <15 changed files>— remote workload routing found no ready provider; the documented worktree-local fallback then passed every selected lane, including all core/extension/script/root typechecks, lint, import cycles, plugin boundaries, package exports, dead exports, and guards.pnpm plugin-sdk:surface:check— passed: 145 public entrypoints, 4,317 public exports, 2,574 callable exports.git diff --check— passed.--mode local) — clean, no accepted/actionable findings.LOC split from
git diff --numstat: