Skip to content

Own browser service M3: exports, page assets, WebMCP, auth handoff, history, no-network proof (#113) - #127

Merged
SSFSKIM merged 19 commits into
mainfrom
feat/own-browser-service-m3
Oct 14, 2026
Merged

SSFSKIM merged 19 commits into
mainfrom
feat/own-browser-service-m3

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 14, 2026

Copy link
Copy Markdown
Owner

M3 of the own browser service (#113, child 1 of #114): the optional features. Spec: docs/doperpowers/specs/2026-10-13-own-browser-service-design.md (Plan of Work M3; execution rulings in its Decision Log and Surprises dated 2026-10-14). The default stays vendor.

What changed

  • exports.mjs: GSuite export and YouTube transcript fetch in the page with the person's session, as the vendor's do (the service makes no network call of its own); tab_content_export forwarded to the backend; files under tmpdir()/browser-use/exports; titles truncated by UTF-8 bytes.
  • assets.mjs: page assets listed from resource timing and bundled from Chrome's loaded copy or, failing that, fetched in the page's context, cross-origin included (session ruling); never a caller-supplied URL; at most 4 acquired at a time.
  • byte-bounds.mjs: 64 MiB per exported file and per asset, the vendor route's own ceiling (the extension-to-host message limit), so nothing that succeeds on the vendor fails on cua.
  • botdetect.mjs (the report returns the vendor's answer and records nothing), browser_user_get_tab_context over the backend's executeTabRead (refused by cua's host as by the vendor).
  • webmcp.mjs (list/invoke, after-cell notifications, the vendor's limits), authhandoff.mjs (the local form: marks handoff, returns user_took_over, the vendor's BX validation, no QR path, no network), history.mjs (ungated; unavailable without a host announcing history).
  • test/browser-service/no-network.test.mjs: every feature under a fake nodeRepl whose fetch, config, telemetry and createElicitation throw, zero allowances, including the in-page asset fallback.
  • Corpus: capabilities/page-assets (a cross-origin asset on a second fixture port with no Chrome copy), reads/visible-dom-dense (shadow DOM, select values, contenteditable, deep nesting, an off-screen element before a 250-element grid), export-rejections now passing on cua.

Validation Evidence

  • At 64adc37 (re-run by the executor session): HOME=/tmp/cua-scratch-home npm test → # pass 1642, # fail 0, # skipped 8 (the first run had one failure in the pre-existing, untouched test/mcp-upstream.test.mjs "the anchor leads the group…", which passes 3/3 alone and on re-run; tracked with Harden two load-sensitive tests (extension-host in-flight commands, mcp-upstream descendant reaping) #123's flakes); npm run test:mods → 32 pass; claude plugin validate . → ✔ Validation passed with warnings (the known warning).
  • Live on the mini (profile ssfs), docs/evidence/2026-10-13-own-browser-service-parity/m3-diff.txt:
    • fresh whole-corpus vendor run vs the cua run at a91c143 over every case except the three download cases → 0 unexpected differences (56 cases, 143 cells, 12 expected)
    • all 59 cases → 6 unexpected differences (59 cases, 151 cells, 12 expected): exactly the three download cases, failing identically on both services (see below)
    • reads/visible-dom-dense at ecda595 → 0 unexpected differences, byte-identical 200-element listings on both services
    • capabilities/page-assets → 0 unexpected differences on both services (m3-1-review evidence)
  • Reviews: two task reviews (sol) clean after fix waves; whole-branch doperpowers:reviewer-high: "correct", no material findings.

Unresolved Review Findings

  • The three download cases are pending a re-run (downloads/chooser, downloads/media, downloads/two-tabs). During the M3 whole-corpus run they failed identically on vendor and cua because the mini's ssh session can no longer read ~/Downloads: a macOS Downloads-folder privacy consent is pending on the mini's console, which is the owner's to answer. They passed at M2 (Own browser service M2: dialogs, downloads, file chooser, clipboard, logs, viewport, raw CDP (#113) #126). Once the consent is granted, they are re-run on both services and the evidence is appended to m3-diff.txt; this PR is updated with the result.

Residue

  • none

…ction report, user tab context

exports.mjs ports L1/qY/WY/Jv and F1/jg/V6/Uu: the GSuite export and the YouTube
transcript each fetch their one URL inside the page (as the vendor's do, with the
person's own session), never through nodeRepl.fetch, and write under the temporary
directory's browser-use/exports; tab_content_export goes to the backend as the
vendor's does. assets.mjs ports Ff (list and bundle), with the page fetch limited
to the page's own origin in place of the vendor's approval. botdetect.mjs answers
the report with the hostname and records nothing (the vendor's is telemetry; no QR
decoder is needed). tab-context.mjs ports getTabContext over executeTabRead, which
cua's host refuses as it does for the vendor. The pageAssets and botDetection
capability documents join docs-content; export-rejections gains the format cell.
…e context, byte bounds, title truncation

Page assets the inventory found the page loading are fetched inside the page with
the person's session whatever their origin (the session's ruling), never a URL a
caller names. Exports and assets are bounded at 50 MiB per file and 200 MiB per
bundle (byte-bounds.mjs): in the page by a bounded body read before base64
expansion, and again on the trusted side before decoding, each with a fixed
sentence. Export titles are cut to 200 UTF-8 bytes on a character boundary so the
file name stays under 255 bytes. The fixture gains a second listener serving one
cross-origin asset with CORS, and the corpus a capabilities/page-assets case
proving the in-page fallback on both services.
…e-assets and export-rejections on vendor and cua at 8664ca9 (0 unexpected differences)
…xport and in-flight asset acquisition

A cleaned Markdown export is re-encoded, and invalid UTF-8 grows threefold as
replacement characters, so the 50 MiB bound is checked on the bytes written too.
A bundle acquires at most four assets at once (the order of the result stays the
inventory's) and reads none once its budget is spent, so memory in flight is
bounded whatever the inventory's size.
…ceiling

The vendor has no byte limits of its own; what bounds it is the transport: Chrome
caps a message to a native host at 64 MiB and cua's host decodes at most that from
its peer (the extension, or MAWS's primitive server). The per-file bound is now
64 MiB (was 50), so nothing the vendor carries fails on cua; the 200 MiB bundle
total is removed (the vendor has none, and assets arriving one after another make
its only ceiling the disk); a cleaned Markdown export is written as the vendor
writes it, within 3 x 64 MiB by the input bound. The four-asset acquisition pool
stays: it bounds memory and fails nothing.
…ns, the local auth handoff, user history, the no-network proof, the dense visible-DOM case
… on vendor and cua (0 unexpected over 56 cases; the three file-reading download cases blocked on both by the mini's Downloads privacy consent)
…n-page asset fallback, the submit-click check of browserAuth requests, the off-screen button before the dense grid
…ni's consent; spec Progress and execution report
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant