Repository navigation
cua's own Chrome extension and native host: Chrome without a ChatGPT account (#10) - #80
Merged
Merged
Conversation
…ent Decision Log entry
…e, short socket paths, self-hosted CRX on Linux, Store key handling, one route per home, OOPIF/handoff/turn_id/timeout semantics, H3 split
…ntRequestHeaderEnabled, no login, network default vs off (--vendor --network); backend-path discovery live/dead; extension id jkejaaijdfpohkdhankllbekkhmnippb; evidence
… 5 s unanswered-getInfo cost, CUA_EXTENSION_ID)
…emove S0 socket paths in a finally
…d protocol over the cua extension's primitives
Sessions bound to socket clients, per-session tab ownership ("tab owned by another session"), per-turn
cleanup (unmarked created tabs closed, deliverable and claimed released open, handoff kept detached and
resumed next turn; a late turnEnded leaves the next turn's tabs), executeCdp passthrough with the 10 s
timeout and detach, OOPIF targets, user-cancel never re-attached, getInfo from the host's own state with
no agentRequestHeaderEnabled. runHost: listens at $CUA_HOME/chrome/b/<sha256(instanceId)[:12]>.sock only
after hello, <name>.json status, <name>.log, home_missing / protocol_mismatch / already_served refusals,
1 MB host->extension cap, exit on port close. protocol.mjs promoted from the probe's frame.mjs with the
shared JSON-RPC peer; extension.mjs holds CUA_EXTENSION_ID and the host name. Tests against a fake cua
extension (test/helpers/fake-cua-extension.mjs).
…nst the real host with the fake extension on its stdio launchVendor in vendor-layer.mjs is the one launch path for M7, S0 and H1 (spawn, stderr, handshake, per-cell js + M7RESULT, turn_ended, stop). host-layer.mjs judges getInfo kept as chrome, createTab then attach, a Runtime.evaluate answered by the fake reaching the agent's cell, turn-end closing the created tab, no identity check, and the host's exit; evidence in docs/evidence/2026-10-07-h1-host-probe.md.
…st signature, socket-path bound 103 bytes / 37 chars) and the early H4 gate measurement
… or status; a late turnEnded resumes a handoff tab into the current turn; the log is renamed only after listening; notification handler errors are logged; Chrome-internal tabs are not claimed
cua chrome register (now the cua route; --vendor keeps the ChatGPT extension's) writes io.github.ssfskim.cua manifests naming $CUA_HOME/chrome/host, a launcher that bakes CUA_HOME and execs this node on the checkout's host.mjs with Node's own stderr appended to chrome/logs/launcher.log; refuses another home's manifest (other_home; --replace backs it up and records its launcher, unregister restores it byte for byte) and a home whose socket path would exceed 103 bytes. The route is whichever record was written last (src/chrome/route.mjs). On the cua route cua serve and the listing launch set BROWSER_USE_BACKEND_PATHS to the cua-route bindings' sockets plus those present (src/chrome/discovery.mjs); presence of cua's extension counts an unpacked load (Local Extension Settings/<id>/); bindings record their route and the other route's are rebind_required; doctor reports cua's extension, registration and launcher targets, and the sockets that accept a connection, skips codex.login and omits chrome.host.config. The vendor acceptance runner passes --vendor.
…wn attachment (adopt it); H3a decisions
…t are not registrations keep the route; route-aware missing-extension wording; checks header; second-register record assertion
…y gives CUA_EXTENSION_ID), proven against the real host under a chrome.* stub: hello and the kept instance id, per-session tab groups, debugger relay with child sessions and OOPIF targets, alreadyHeld, hostRefused in the popup, detach-all on port drop with the 5 s and alarm retries, message_too_large
…ebuggee (Chromium raises it only for this extension's own attachment), and the stub and H1's fake drop the fictional foreign refusal; Chromium-shaped getTargets (OOPIF type other, attached by any client); CDP errors as JSON strings and 'Detached while handling command.' in the stub; concurrent creates share one group; backoff after a lasting refusal kept in storage.session; the popup follows the worker's changes
…backoff clears it and tries once at once (re-renders never retry); the restart test models a dead worker (its port closes, Chrome keeps the attachments)
…eFacts, no login gate and the profile's own socket as the live host on the cua route), discovery, cross-site iframe and goto-latency cells, the user-tab claim (with its documented exception), turn-end marking, two-client refusal and Chrome-after-serve scenarios; serve-with-store checks the route's extension
…ifests byte-identical, cua manifests absent after unregister), the empty BROWSER_USE_BACKEND_PATHS hiding live vendor sockets; live items BLOCKED on the owner's unpacked load
…h the owner's key, id checked against the manifest key, update_url added) and update.xml; dist/ ignored
…erver); update.sh --ext publishes a packed dist (CRX before update.xml), installs the Caddyfile under the live site address after caddy validate, reloads Caddy, leaves the relay running
…te it checks the bound profile's own host (pre-listed socket, status naming the id, pid running host.mjs) and that it owns no tab after end_task, and needs no Codex login; the vendor route's runtimes check is unchanged
…the cua route: --extension hosted|store (hosted: the relay's update.xml) in the one managed force-list, the wait loop uses the presence rule and cua's host socket, both sign-in steps leave the checklist; --repo uploads a git bundle for an unpushed ref
…e relay's /ext/, force-installed over HTTPS on the Tart VM and a throwaway Hetzner VM; acceptance 7 PASS (Hetzner doctor ok:true, hosts.live 1, verify problems [], linux-chrome PASS, no sign-in); server deleted
…in parallel arrays (a path with a space no longer splits; test); READMEs: update.sh --ext replaces the live Caddyfile keeping only its site line, the CRX's update_url comes from the packer's --base-url, --repo takes a branch
…im PASSes only with an accepted origin-access request for that origin during the claim and read; getInfo's missing header field checked on the host's raw answer; a home with auth.json is refused on the cua route; scenarios after a latched stop are BLOCKED; a restart with no starting pid fails; the open task's failure bounded at 15 s; goto latency per scenario for C2 too; the infobar is the owner's observation
…fest's key) always, the CRX and update.xml with CUA_EXTENSION_KEY (a refused key writes nothing); npm run extension:pack; package files gain extension/
…its popup, not the ChatGPT extension (H2's hand-off; codes and shapes unchanged); the Codex login is worded as the ChatGPT extension route's
…ua chrome register, profiles; the ChatGPT extension route, cua login and --vendor in their own subsection until removal; the Codex login optional), Linux and configuration rows, CLAUDE.md, cua-remote Part A, the new-Mac onboarding, cloud VM hosted or store (Chrome takes later updates from the installed CRX's update_url), npm run extension:pack in the relay docs
…, a disable/enable only for the ChatGPT extension
…e placed no live backend; no label on this route); README: the cua-route live acceptance needs a never-logged-in scratch home, the extension adds no page scripts (the agent acts through Chrome's debugger), the placed vendor host is used only after register --vendor; touched lines rewrapped to 120 columns
…LOCKED on the owner
… input with transparent text (a password input, or one masked by -webkit-text-security, drew the owner's password manager's frame into the page and Chrome refused the debugger on the tab); browser-surface finds the getBrowser rule in profiles_list's description (moved there by #73); closeOwnTab polls the listing for 2 s (close returns before Chrome drops the tab)
…tch home (runner 40/40 twice, Chrome restart 11/11, vendor manifests byte-identical); evidence, spec Progress, Surprises and final Outcomes
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.
Closes #10
cua drives Chrome through its own extension ("cua", id
jkejaaijdfpohkdhankllbekkhmnippb) and native host instead of OpenAI's ChatGPT extension, so the browser surface needs no ChatGPT or OpenAI account and nocua login. The agent-facing API is unchanged: the vendor's pinnedbrowser-service.mjsstill servescua.getBrowser(...),createBrowserTab,tab.playwright; only the backend under it is cua's.src/chrome/host.mjs,protocol.mjs,extension.mjs): a Node program Chrome spawns per profile through a launcher; it serves the vendor backend protocol on$CUA_HOME/chrome/b/<12-hex>.sockwith per-session, per-turn tab ownership (handoff/deliverable marks, lateturnEnded, timeouts, user cancel, severalcua serveclients). ItsgetInfoomitsagentRequestHeaderEnabled, which is what removes the login (S0).extension/): a thin MV3 relay of Chrome's tab, group and debugger primitives over native messaging, plus a minimal popup.cua chrome registernow means the cua route; the ChatGPT route stays ascua chrome register --vendoruntil the Store listing. Discovery usesBROWSER_USE_BACKEND_PATHS; doctor, profiles and binding know both routes.scripts/extension-pack.mjs(CRX3 +update.xml) and the relay's/ext/route; the cloud VM template force-installs the self-hosted CRX (--extension hosted|store) with no sign-in step.npm run extension:pack(Store zip withoutkey); README, CLAUDE.md, the cua-remote skill and the cloud-VM docs updated; plugin 0.4.0.Spec:
docs/doperpowers/specs/2026-10-07-own-chrome-extension-design.md. Execution report:docs/doperpowers/specs/2026-10-07-own-chrome-extension-execution-report.md.Do not merge yet. Acceptance 1 (after registration) and 3–6 still have to run live on the Mac. They need the owner to load
extension/unpacked in Chrome profileDefaultonce, and later to quit and reopen Chrome. The commands are in the execution report under "Finishing H3b live".Validation Evidence
npm testnode scripts/probe-chrome-contract.mjs --fixtures --report /tmp/cua-final-fx.json{"PASS":15,"FAIL":0,"BLOCKED":0}node scripts/probe-chrome-contract.mjs --vendor --network defaultCodex auth token is unavailable. Evidence:docs/evidence/2026-10-07-s0-no-header-spike.mdnode scripts/probe-chrome-contract.mjs --vendor --backend hostdocs/evidence/2026-10-07-h1-host-probe.md)create-hetzner.sh --extension hosted --location fsn1; same on the Tart VMok:true;chrome.hosts.livepass (1);verify.mjsproblems: [];linux-chrome.mjsPASS. 3 m 45 s from nothing; server deleted (docs/evidence/2026-10-07-own-extension-linux.md)io.github.ssfskim.cua.jsonabsent again (docs/evidence/2026-10-07-own-extension-acceptance.md)npm run extension:pack, with and withoutCUA_EXTENSION_KEYkey; CRX id, crx_id andupdate.xmlappid all equalCUA_EXTENSION_ID; signature verifiesff25913..3eae3f9Unresolved Review Findings
Minor findings from the task reviews, each left on purpose. All are also in
tech-debt-tracker.mdunder "cua's own Chrome extension and host":src/chrome/host.mjs:attachanddetachon the same tab are not serialized, as the vendor extension serializes them. A detach that races an attach leaves the debuggee held until the turn ends. Left because turn-end cleanup bounds it.src/chrome/host.mjsandextension/background.js: a refused host keeps itschrome/logs/<pid>.log. The extension retriesalready_servedandlisten_failedevery 5 s, because those refusals are transient. Left because it is bounded and the logs help diagnosis. A sweep would close it.src/chrome/registration.mjs:chooseVendorRoutecan set the vendor record's mtime into the future under clock skew.src/runtime/doctor.mjs: theagent.*rows fail for a non-default home on a machine whose agent belongs to another home. Seen on the Tart VM's separate test home; not specific to this change.update_url. No version bump was published.runtime.sendMessagealso delivers to the sender.test/extension-pack.test.mjsneedsunzip.Owner actions
extension/unpacked inDefault. Later, quit and reopen Chrome when the restart runner asks.key.pemat its root (built outside the repo), Unlisted visibility, the drafted description and permission justifications, and what to send back (the Store URL). The extension's icons are placeholders, so real artwork is needed for the listing.Residue
None beyond what is registered: #78 (Store listing, owner action) and #79 (removing the ChatGPT extension route, blocked by #78). The minors above are logged in
tech-debt-tracker.md.