Skip to content

docs(computer-use): state the authorization chokepoint explicitly - #124355

Merged
steipete merged 1 commit into
mainfrom
steipete/cu-trust-model
Aug 16, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/cu-trust-model

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The computer-use trust-model text made the app-owned CUA daemon's unrestricted mode look inconsistent with Gateway device and scope approval. It did not identify which layer authorizes actions, or distinguish local socket and loopback reachability from identity and authorization.

Why This Change Was Made

This states the intended boundary directly: the Gateway is the authorization chokepoint and the driver is a dumb effector. It explains why CUA Driver 0.19.3 bounded mode cannot represent OpenClaw's runtime-discovered target model, what the private Unix socket excludes, what remains inside the same-user boundary, and why loopback alone grants no operator scope.

No runtime, protocol, configuration, SQLite, or provider behavior changes.

Opaque-ref lifecycle assessment

The TypeScript CUA and native Swift implementations agree on the core observation rules today:

  • Provider/lifecycle generation rotation clears the app, window, and observation maps (extensions/cua-computer/src/frame.ts:107, apps/macos/Sources/OpenClaw/ComputerActionServiceV2.swift:606).
  • A new window observation replaces the previous one, and both providers bind element refs to that single current observation plus its window ref (extensions/cua-computer/src/frame.ts:161, apps/macos/Sources/OpenClaw/ComputerActionServiceV2.swift:301).
  • Missing, forged, replaced, or generation-stale window/observation/element refs fail as COMPUTER_STALE_OBSERVATION on the normal resolution path (extensions/cua-computer/src/frame.ts:97, apps/macos/Sources/OpenClaw/ComputerActionService.swift:492).

They do not fully agree on lifecycle semantics:

  1. Native list_windows clears every existing window ref before minting the new inventory (apps/macos/Sources/OpenClaw/ComputerActionServiceV2.swift:193). CUA projectWindows retains the generation-wide map and issueWindowRef reuses matching refs, so a window ref omitted from a later inventory remains locally resolvable until driver rejection or generation rotation (extensions/cua-computer/src/driver-result.ts:298, extensions/cua-computer/src/frame.ts:141).
  2. If provider authority changes while an awaited action is in flight, CUA reports COMPUTER_STALE_OBSERVATION (extensions/cua-computer/src/driver-result.ts:230), while the native execution queue reports lifecycleChanged before returning the result (apps/macos/Sources/OpenClaw/ComputerActionService.swift:243).

Because these are real divergences, this PR does not add a shared contract test that would claim parity. The follow-up should first choose the canonical window-ref lifetime and in-flight generation error, then add fixture-based contract tests to both implementations without unifying the TypeScript and Swift code.

User Impact

Operators can now read one coherent authorization model: OpenClaw authorizes computer use at the Gateway, while the provider daemon and socket only execute already-authorized work. The same-user and loopback limits are explicit rather than implied.

Evidence

  • pnpm format docs/nodes/computer-use.md
  • pnpm docs:check-mdx docs/nodes/computer-use.md
  • OPENCLAW_HEAVY_CHECK_LOCK_SCOPE=worktree pnpm tsgo
  • OPENCLAW_HEAVY_CHECK_LOCK_SCOPE=worktree pnpm check:test-types
  • git diff --check
  • .agents/skills/autoreview/scripts/autoreview --mode local (clean)
  • .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main (clean)

No Swift or TypeScript files were changed, so the focused Swift and CUA test suites were not required.

@clawsweeper

clawsweeper Bot commented Aug 16, 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 size: XS maintainer Maintainer-authored PR labels Aug 16, 2026
@steipete
steipete marked this pull request as ready for review August 16, 2026 02:25
@steipete
steipete merged commit 289a9ca into main Aug 16, 2026
101 checks passed
@steipete
steipete deleted the steipete/cu-trust-model branch August 16, 2026 02:30
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant