Skip to content

refactor(computer-use): one canonical wire contract + node-host provider seam - #123509

Merged
steipete merged 2 commits into
mainfrom
steipete/cu-provider-seam
Aug 14, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/cu-provider-seam

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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.act wire payload, while CUA also registered screen.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-use surface for the canonical TypeBox wire schemas and node-host provider registration. The shared helper registers the command pair and dangerous policy once; cua-computer keeps its existing availability polling, lazy driver, serialized execution, frame binding, action mapping, cancellation, refusals, and disposal behind openExecution.

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.
  • Codex autoreview (--mode local) — clean, no accepted/actionable findings.

LOC split from git diff --numstat:

  • Production runtime: +344/-216 (net +128).
    • New SDK seam: +220/-0.
    • Existing production consumers outside the seam: +124/-216 (net -92).
  • Tests: +130/-30 (net +100).
  • Tooling/package metadata: +11/-3 (net +8).
  • Docs/changelog: +22/-0 (net +22).

@clawsweeper

clawsweeper Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation cli CLI command changes scripts Repository scripts agents Agent runtime and tooling plugin: cua-computer size: L maintainer Maintainer-authored PR labels Aug 14, 2026
@steipete
steipete marked this pull request as ready for review August 14, 2026 06:08
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 14, 2026
@clawsweeper

clawsweeper Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 14, 2026, 2:10 AM ET / 06:10 UTC.

ClawSweeper review

What this changes

This 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 readiness

⚠️ Ready for maintainer review - 5 items remain

Keep 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
Reviewed head: b2f6e8c3ec65d891dfb2152940df35bff250218d
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The supplied rationale and targeted validation are useful, but the public SDK and shared command-policy boundary could not be independently inspected in this review environment.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-associated internal refactor claims no user-visible behavior change; the supplied targeted harness evidence is supplemental, and contributor real-behavior proof is not required by this gate.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-associated internal refactor claims no user-visible behavior change; the supplied targeted harness evidence is supplemental, and contributor real-behavior proof is not required by this gate.
Evidence reviewed 3 items PR scope: The supplied PR body states that the new public SDK entry point owns screen.snapshot, computer.act, and the dangerous computer.act invoke policy while CUA retains driver lifecycle and execution.
Inspection infrastructure failure: Read-only inspection could not begin: the sandbox returned “bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted” for an attempted AGENTS.md read, so current source, history, tests, and scoped policy could not be independently verified.
Related campaign evidence: The supplied context links the open computer-use campaign plan and the merged parity-fixtures PR; they establish adjacent campaign work but do not prove this new SDK contract is safe or already implemented on main.
Findings None None.
Security None None.

How this fits together

Computer-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]
Loading

Decision needed

Question Recommendation
Should the new public Computer Use provider SDK contract and centralized dangerous-command policy be accepted as the stable plugin boundary for the campaign? Approve after boundary verification: Review the exact-head contract, allowlist policy, provider lifecycle, and existing CUA behavior before accepting this as the canonical SDK surface.

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

  • Resolve merge risk (P1) - The new public plugin SDK entry point is a compatibility-sensitive contract; provider implementations may depend on its validation, registration, and lifecycle semantics.
  • Resolve merge risk (P1) - Centralizing the dangerous computer.act invoke policy changes a security boundary shared by future providers, so its allowlist and cleanup behavior need direct source and runtime review before landing.
  • Resolve merge risk (P1) - The review environment could not read the checkout, preventing independent verification of current-main behavior, scoped instructions, tests, and history.
  • Complete next step (P2) - A maintainer must decide and verify the new public SDK and shared authorization boundary; this is not a safe autonomous repair task.
Agent review details

Security

None.

PR surface

Source +138, Tests +100, Docs +21, Config +4, Other +4. Total +267 across 14 files.

View PR surface stats
Area Files Added Removed Net
Source 7 354 216 +138
Tests 2 130 30 +100
Docs 2 21 0 +21
Config 1 4 0 +4
Generated 0 0 0 0
Other 2 7 3 +4
Total 14 516 249 +267

Review metrics

Metric Value Why it matters
Production versus test delta production +344/-216 (net +128); tests +130/-30 (net +100) The stated refactor replaces duplicated CUA code but adds a new public SDK surface, so the net production growth needs architectural and compatibility justification.
Public SDK surface 1 entry point added; stated public totals +11 exports and +4 callable exports A public plugin API expansion requires maintainer-visible contract review before it becomes an extension dependency.

Stored data model

Persistent data-model change detected: serialized state: extensions/cua-computer/src/commands.test.ts, serialized state: extensions/cua-computer/src/commands.ts, serialized state: src/plugins/computer-use-contract.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Verify the public provider contract before merge (recommended)
    Confirm that the exported schemas, registration collision behavior, execution reuse, disposal, and CUA migration preserve the intended plugin contract and command behavior.
  2. Pause public exposure
    Keep the canonicalization internal until maintainers explicitly choose the supported external provider lifecycle and compatibility policy.

Technical review

Best 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.

Labels

Label changes:

  • add P3: The PR describes an internal provider-boundary refactor with no claimed operator-visible behavior change.
  • add merge-risk: 🚨 compatibility: The branch exports a new public plugin SDK entry point whose registration and validation semantics can become external plugin contracts.
  • add merge-risk: 🚨 security-boundary: The shared helper takes ownership of the dangerous computer.act Gateway invoke policy, so an error could affect command authorization across providers.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-associated internal refactor claims no user-visible behavior change; the supplied targeted harness evidence is supplemental, and contributor real-behavior proof is not required by this gate.

Label justifications:

  • P3: The PR describes an internal provider-boundary refactor with no claimed operator-visible behavior change.
  • merge-risk: 🚨 compatibility: The branch exports a new public plugin SDK entry point whose registration and validation semantics can become external plugin contracts.
  • merge-risk: 🚨 security-boundary: The shared helper takes ownership of the dangerous computer.act Gateway invoke policy, so an error could affect command authorization across providers.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-associated internal refactor claims no user-visible behavior change; the supplied targeted harness evidence is supplemental, and contributor real-behavior proof is not required by this gate.

Evidence

What I checked:

  • PR scope: The supplied PR body states that the new public SDK entry point owns screen.snapshot, computer.act, and the dangerous computer.act invoke policy while CUA retains driver lifecycle and execution. (src/plugins/computer-use-contract.ts, b2f6e8c3ec65)
  • Inspection infrastructure failure: Read-only inspection could not begin: the sandbox returned “bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted” for an attempted AGENTS.md read, so current source, history, tests, and scoped policy could not be independently verified.
  • Related campaign evidence: The supplied context links the open computer-use campaign plan and the merged parity-fixtures PR; they establish adjacent campaign work but do not prove this new SDK contract is safe or already implemented on main. (d9646ad5d560)

Likely related people:

  • steipete: The supplied context attributes this PR, the related campaign plan, and the preceding merged provider-parity fixtures to this contributor; local feature-history verification was unavailable. (role: computer-use campaign contributor; confidence: medium; commits: f99fe1ab1626, b2f6e8c3ec65, d9646ad5d560; files: src/plugins/computer-use-contract.ts, extensions/cua-computer/src/commands.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Provide or confirm exact-head review evidence for the public SDK lifecycle, dangerous invoke policy, and CUA provider cleanup path.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 848a7e3 into main Aug 14, 2026
349 of 351 checks passed
@steipete
steipete deleted the steipete/cu-provider-seam branch August 14, 2026 06:32
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Aug 14, 2026
steipete added a commit that referenced this pull request Aug 14, 2026
…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
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 15, 2026
…der seam (openclaw#123509)

* refactor(computer-use): add provider seam

* refactor(computer-use): retry provider open after failure; drop changelog entry
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 15, 2026
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling cli CLI command changes docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. plugin: cua-computer rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant