Repository navigation
docs(computer-use): one vocabulary for apps and browser tabs - #38
Merged
Merged
Conversation
This was referenced Nov 9, 2026
Design note: computer_* and preview_* keep their names but share preview_act's step verbs, integer refs carried per target, the apps element line, and ref-keyed diffs after every act. Covers what stays different, upstream's Cua stack, migration, and a phased plan starting with computer_action taking the shared verbs.
maschwenk
force-pushed
the
docs/unified-computer-surface
branch
from
November 9, 2026 01:14
8ec12c2 to
e26be35
Compare
maschwenk
marked this pull request as ready for review
November 9, 2026 01:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
start on item 5 from the bake-off: one vocabulary for agents driving apps and browser tabs. design note only,
docs/internals/computer-use.md, no code yetrecommendation
computer_*andpreview_*as two families, but both speak the same steps, refs and output. not one family with a target selector, since only snapshot and act overlap and everything else is per target anyway. and not a codex-style js repl: codex's models are trained on theirs and ours arent, and codex's firstgetAppon the bake-off page was ~23k chars, ~20k of it api docspreview_actflat shape ({action:"click", ref:12}).preview_*belongs to upstream and they already folded the per-action tools intopreview_act, socomputer_*(fork-only) is what moves.pressalways means a key now,clickabsorbspress/click_at, andhoverabsorbsmove/move_atariaSnapshot({mode:"ai"})refs already follow ourcarryRefsrule (8 of 10 carried over, a renamed element gets a new ref, removed refs never come back). only catch is that navigation restarts ate1, so tabs keep an int → playwright ref map whose counter never resets~/+/removed:diff that computer_action got in the diffs PR belowfirst step
computer_actionsteps take the shared verbs. only fork-only files change: a flat mcp step schema maps onto the worker's existing actions, so the native worker stays as is. ~6 files, +180/−150. verified withplanSteptests per verb, plus the 11-step bake-off on chrome ported from the worker protocol to mcp calls throughcomputer-use-dev.ts(same dom events as codex, cursor and front app untouched, responses under ~600 chars)tradeoff: two families means two tool names per verb forever, and tabs and apps still deliver input differently (tab typing is one insertText event, tab scroll is js, no wheel). the note says tabs should report
viathe way apps do instead of pretending they're the samedecided (11-08)
node scripts/computer-use-dev.ts bakeoffand computer_action takes the shared verbs, plus reflowed elements go on onemoved:line instead of a~line each (hover/scroll responses ~4.1k → ~450 chars)preview_observe/preview_execute: port them as is in the next upstream sync, retire them oncepreview_acttakes steps + returns diffs (step 4)plan (lives here, AGENTS.md keeps plans out of the repo)
Every step is accepted by the 11-step bake-off:
isTrusted.scripts/computer-use-dev.ts, so it can run against Chrome as an app and against a preview tab.The steps:
computer_actionsteps take the shared verbs. Fork-only. A flat MCP step schema maps onto the worker's existing actions, sonativeWorker.tsandmacNative.tsdon't change.protocol.ts,ComputerUse.ts,computer/tools.ts,ComputerUse.test.ts, the runbook andcomputer-use-dev.ts. About +180/−150.planSteptests for each verb (a click on a pressable element becomes the accessibility press; a click atx,ybecomes an exact point), then the bake-off on Chrome.preview_act. This is needed anyway. It portspreview_observeandpreview_executeunchanged.ariaSnapshot({ mode: "ai", boxes: true })into elements with integer refs, and the apps formatter moves into a shared module.preview_acttakesreforname+role.preview_acttakesstepsand returns the diff.preview_observeandpreview_executego away (BrowserExecutor.tsalone is 302 lines).via.First step: step 1. It is about 330 lines in fork-only files with no upstream conflict. After it, an agent using both families sees one set of verbs.
refs