Skip to content

Latest commit

 

History

History

cm-browser

README.md

CookieMonster browser

The desktop browser uses main-owned Electron WebContentsView tabs. Tabs belong to a chat session and retain their pages when switching tabs, switching sessions, or hiding the browser panel. Closing a tab respects its beforeunload handler. Pop-ups open as new tabs and preserve normal opener behavior.

Autonomous agent browsing

CM Browser is the default desktop browser for agent tasks. The model starts with browser_read_state, creates a tab with browser_create_tab when needed, then uses browser_navigate. Creation initializes upload interception before authorizing the blank tab. Create, select and close use standing task authority for agent-controlled tabs, without routine native approval. Explicit OpenCode ask/deny rules still apply. Selecting or creating a tab reveals the browser panel.

Agent tabs use the existing persistent CM profile, including its website logins. Private tabs protect that tab's contents and state, not account isolation: an agent can open its own tab to a signed-in service. User-created, duplicated, restored and popup tabs remain private unless explicitly shared. Private lifecycle targets retain native confirmation without gaining page access. Restoring a saved task does not require manual setup before the agent can create a fresh tab; restored tabs remain private.

Take over browser pauses all browser tools for the task, revokes its tab access, and prevents replacement-tab creation. Use it before entering credentials or working manually. Resume agent restores only previously authorized, live, transfer-guarded tabs that remain eligible. An explicitly revoked, closed, crashed, or quarantined tab is not restored. Switching tasks does not clear the pause. Pause state and creation provenance are process-local; a relaunch restores URL/history only, with fresh private tabs. The global Agent Access switch remains a persistent kill switch and clears pending resume grants.

Ordinary browsing has no per-website access prompt. Vault operations, file selection, history access, download policy, device permissions and unsaved-page confirmation remain separate. The model instruction asks for confirmation before consequential actions; this is not a new native transaction-classification or enforcement mechanism.

Chrome DevTools defaults to disabled in fresh configs. Existing MCP definitions, including explicit Chrome opt-ins, are preserved across launches. Set CM_CHROME_DEVTOOLS=1 when launching the desktop app to enable it explicitly for debugging. Native browser_* tools are outside the execute MCP catalog, and model guidance forbids silently switching browsers or bypassing takeover.

The initial implementation requires the desktop app open, visible and on the task. It does not add unattended or minimized-window operation. The plugin and Electron main changes take effect on a subsequent app launch; renderer hot reload alone is insufficient. See autonomous browser qualification.

Whole-tab Agent Access (#37)

One Agent Access grant authorises the selected native tab and all its documents, regardless of origin. Main owns the grant. Supported page operations, screenshots, diagnostics and site tools use it without another tool, receiving-origin or capture approval. Cross-origin navigation and redirects retain the grant but invalidate old document refs and pending source-bound captures.

Disable the tab grant or global access to cancel pending work and suppress late disclosure. Closure, renderer loss and owner replacement revoke authority. User-created, reopened, recovered and popup tabs start private; grants are not persisted or inherited. Agent-created tabs use the autonomous startup described above. Revocation cannot recall content already delivered or effects already dispatched. Native busy/rendering leases remain held until dispatched work settles.

This changes authority, not driver capability. Issue #37 does not add frame discovery or interaction capabilities; those are tracked separately. Screenshots still require a selected, attached native view and disclose all visible pixels without redaction.

Embedded documents and input (#39, #40)

An aggregate tab read includes bounded document records for native nested frames, including cross-origin, sandboxed and srcdoc documents. Each record identifies its frame and parent, reports read/truncated/unsupported/failed state and omission reasons, and carries its own opaque element refs. Open shadow content is readable. Closed roots, canvas and other nonsemantic rendered content require visual observation. Reading a clipped document does not establish that its controls are currently reachable by pointer input.

Click, hover, drag, fill, key, selection and scroll tools accept an explicit frameRef under the same tab grant. Main binds preparation to the exact action and current native document, verifies iframe ownership and supported affine geometry, and routes input to that document. Selection uses a fixed isolated script and emits untrusted DOM events. Perspective geometry is unsupported. Keyboard input requires the actual focused child frame; it never falls back to the top document. Use refs from the latest returned observation: old refs can expire as bounded snapshots are replaced. A failed observation after dispatch remains an uncertain outcome and never causes automatic replay.

The isolated --embedded-documents and --embedded-input fixtures use synthetic pages. On 3 October the actual bundled plugin and sidecar read the authenticated Teams embedded Outlook calendar after one tab grant, expanded hidden entries and navigated all seven tested day views. A fresh tab read safely reacquired the frame after calendar view replacement. See embedded-state qualification for loaded-item counts, source evidence and runtime provenance. This satisfies #39's authenticated read-state acceptance. Scroll/input failures and individual event-detail opening remain #40 qualification work. The running app's exact launch hashes were not pinned, and existing app/server instances were not restarted.

Fresh refs can target a visible portion of a growing control when its full center is clipped, while preserving the original point for controls that are already reachable. Both paths retain exact composed hit validation. Top-level and embedded fill use guarded native text insertion to preserve multiline drafts without Enter-to-send or per-character timeout. The --clipped-editor fixture verifies short and report-sized fills, clipped-anchor scrolling, covered/fully clipped refusals and positioned-control compatibility. See clipped-input qualification. Live #40 acceptance remains open; the existing app has not loaded these new changes.

Long authentication redirects

Native browsing supports HTTP(S) destinations through 65,536 characters, including redirects and page-originated navigation that follows an agent action. Explicit agent URL inputs retain their 2,048-character protocol bound. Supported long URL/history metadata and bookmarks remain usable, with the same origin, scheme and credential restrictions. See long-navigation qualification for the native POST/302 regression, omitted-fix provenance and limits of the real Microsoft observation.

Inactive tab resources (#47)

Live pages stay intact by default. Unload tab in an inactive tab's action menu asks for a URL/history-only recovery decision before releasing its renderer. The default answer is Cancel. The confirmation explains that other page state, including unsaved JavaScript work, cannot be restored. There is no automatic eviction based on age or memory.

Main protects active, pinned, loading, agent-accessible, busy and transferring tabs. A bounded read-only isolated-world inspection protects editable values, changed choices, selected files, playing media and unknown embedded or closed custom documents. Native capture checks and successful device permission grants protect capture sessions; those grants conservatively protect the document until navigation even if a track has stopped. Incomplete inspection protects the page. Approval is bound to the owner, exact document and deadline, and a second inspection precedes disposal. Chromium's native beforeunload can veto the close.

Recreated tabs retain their supported URL/title/history, position and pin metadata with a fresh private ID. They show (unloaded) without a perpetual loading spinner and make no page request until selected. Unloading does not add the tab to Recently closed, submit forms, replay tools/providers or force a native close. DOM inspection cannot prove that application state in JavaScript has been saved; the explicit confirmation is therefore required even for an apparently idle page.

See resource qualification for the reproducible synthetic visited-chat workload, measured memory/CPU, lifecycle checks and limits. Authenticated production workload savings, physical dialog accessibility, macOS and packaged builds remain unqualified.

The 3 October integration checks passed 128 focused desktop tests / 927 assertions and 22 mounted browser tests / 565 assertions, with app and desktop typechecks passing. Native resource, navigation and leave-confirmation fixtures passed independently. Scoped lint reported zero errors and existing warnings; the mounted tests emitted the existing multiple-Solid-instance warning. This is focused qualification rather than a full-repository pass.

Page-origin leave requests (#48)

Main-owned address/history/reload/close requests use asynchronous Stay/Leave confirmation. Unknown page links and forms retain the document and draft but cannot continue the original request after an asynchronous Leave answer on Electron 44.3.0. Native regression demonstrates the synchronous callback limitation and zero requests from vetoed links/GET/POST forms. Issue #48 remains open; a supported asynchronous native callback is needed to preserve original POST semantics. See leave qualification.

Bounded visual observation and input (#45)

Viewport screenshots reduce JPEG quality and resolution within a 46,080-byte image limit. Supported outputs retain at least half the captured raster and CSS viewport resolution and report actual dimensions, viewport dimensions and scale. A detailed image that cannot meet that limit at the supported minimum returns an explicit reason. Raster edges remain bounded to 4,096 pixels and total raster size to 4 megapixels. Screenshots include visible editable values without redaction.

A stable screenshot also supplies a one-use visualRef. browser_visual_action accepts click or hover coordinates in that returned raster. Main verifies native ownership, document identities, viewport/layout state, current pixels and native hit routing before dispatch. Navigation, layout changes, scrolling in any tracked document, revocation and reference reuse invalidate the action. Animated or unverifiable document tracking still permits a bounded screenshot but reports actionUnavailable and supplies no action ref. Static canvas and closed-root controls can use this path without another approval.

The isolated --visual fixture uses detailed synthetic pixels, canvas and closed-root controls, and a cross-site target with a confirmed out-of-process iframe session. These results do not establish authenticated-site, macOS or packaged-app qualification. Earlier capability and consent acceptance records below describe older implementations and are superseded by these current sections.

Targeted inspection and waits

browser_read_state accepts an optional selector with an explicit tabID, and an optional native frameRef. It reads the first matching subtree with its own traversal and output budget, so a control omitted from an aggregate snapshot can receive a real ref. inspection.matched=false reports an absent match. A targeted read remains bounded and can report truncation; it does not search shadow roots by selector.

Selectors support one ASCII compound: an optional tag followed by #id or .class tokens, such as button#open.primary. The maximum is 512 characters. Whitespace, attributes, pseudos, escapes, combinators, universal selectors and lists are rejected.

browser_wait_for_element selects the top document or an explicit frameRef, accepts a timeout from 1 to 15000 milliseconds, and reports the actual observedCondition. visible, the default, requires positive viewport intersection and Chromium opacity/visibility checks. attached requires a connected match even when hidden. ready requires a match and a document whose readyState is interactive or complete. A successful wait returns a fresh targeted snapshot; it does not establish clickability or prove a new reload. Replacement, navigation, revocation and cancellation interrupt the wait.

The isolated Windows Electron fixture bun scripts/browser-smoke.ts --targeted-read covers recovery of an omitted 320th control, an absent match, delayed visible content, hidden attached content, cancellation and document replacement. --embedded-documents covers a native nested-frame wait. These fixture results do not establish authenticated Teams parity.

Vault access, OS permissions, native file selection, transfer rules, profile-wide history and private-target lifecycle approvals remain separate. The grant is not permission to read saved credentials or choose local files automatically. The plugin and desktop must ship together. Historical acceptance records below describe earlier builds; their per-tool/per-origin/per-capture approval requirements are superseded by this section and are not current behavior.

Qualification (2 October 2026)

Implementation and qualification took place in the isolated browser-gaps worktree, preserving the original checkout and running development app. Independent, serial Windows Electron runs passed --site-access, --action-outcomes, --embedded-documents, --embedded-input, --navigation, --overlays, --delegation, --targeted-read, --visual, --resources and --leave-confirmation. Integration testing caught and corrected a conflict between leave-intent protection and superseding a held navigation; both fixtures pass together after that correction. Native fixtures use disposable profiles and synthetic data, with controlled confirmation answers.

The cm-browser suite passed 100 tests, its typecheck and plugin build passed, and app/desktop typechecks passed. Final desktop router tests passed 112 tests / 880 expectations; driver, visual, registry, frame and leave-confirmation tests passed 64 / 734. Earlier integration checks passed 71 bridge/delegation/session/operation tests, four mounted UI tests and 17 task-scope tests. These focused results are not a claim that every repository suite passes: existing unrelated Windows download-recovery and fixed-index translation baseline failures remain.

Authenticated Teams reading and navigation acceptance for #39/#40 remains unverified. Live visited tabs are not automatically reclaimed (#47), and unknown page-originated leave requests remain vetoed with guidance (#48). Perspective frame input, physical native-dialog accessibility, reviewed translations for new English fallback strings, macOS and packaged builds remain outside this qualification. No installed app/server was restarted and no real account data was modified.

Native UI and commit checkpoint

The browser panel now uses native surfaces, toolbar and address metrics, suggestion highlights, record searches, form controls, settings rows, menu icons and platform shortcut hints in the classic and new layouts. Browser tooltips stay above the native viewport. Existing tab-strip alignment CSS was preserved. The mounted Chromium review covers light/dark themes, LTR/RTL, narrow widths and 168 tooltip hovers, with screenshots published on the private browser-review-images evidence branch.

The commit checkpoint passed 410 tests with 6,620 assertions: 100 cm-browser tests, 275 focused desktop/browser/provider tests, 17 task-scope tests, 14 mounted browser tests and four shortcut/suggestion tests. Typechecks passed in app, desktop, cm-browser, plugin and opencode, and the browser plugin build passed. Independent native navigation and leave-confirmation reruns passed. Scoped lint has no errors; existing style warnings remain. These are focused checks, not a full-repository pass.

Native Electron corner inspection (#58), settings implementation (#59), and the native component migration (#62) are complete and their issues are closed. Their evidence and commit checkpoint are separate from the resource work documented above. Authenticated Teams checks (#39/#40) and unsupported page-originated leave intents (#48) remain open. Human PR review is still required before merge; this checkpoint does not represent a merge, release or qualification on macOS.

Using the browser

Operation outcomes and recovery (#38, #43)

Page action results report not_dispatched, dispatched_observed, or dispatched_uncertain. The last status means native input may have taken effect without a confirmed refreshed observation. Typed action causes distinguish native dispatch failure, failed or unavailable observation, cancellation, timeout and unknown transport outcome. Observe the current tab before deciding on further input; the browser does not replay the action automatically.

Main publishes running, settling, failed and interrupted-input quarantine states separately from the Agent Access grant. Taking over revokes agent authority immediately, while already-dispatched native work keeps its busy lease until it settles. Renderer loss revokes access and publishes the crash reason; load failures retain Chromium's error code and description. Monotonic state revisions prevent delayed UI responses from clearing newer failures or running status.

An uncertain key or pointer down quarantines that native view. Reloading and granting access again cannot repair it. The recovery banner offers Close tab; reopen the saved URL/history through Recently closed or Control/Command+Shift+T. The new tab starts with Agent Access off. Unsaved form content is not restored, so closure still respects the page's leave confirmation.

Open the browser panel, choose New tab, and enter an HTTP(S) address or search terms. Searches use DuckDuckGo (https://duck.com/?q=…) by default; Browser settings can explicitly select Google or Bing. The fixed HTTPS templates accept only the encoded query value. Bare domains and local development addresses navigate directly regardless of the selected engine. Back, forward, reload, and stop work on the selected tab. URL, selected text, picked elements, and screenshots can be attached to the chat draft.

Within the browser, Control/Command+L selects the address bar, +T opens a tab, +W closes the tab (respecting unsaved-page confirmation), and +R reloads. Control+Tab switches forward and Control+Shift+Tab switches backward. Control/Command+Shift+T reopens the most recently closed tab. Recently closed tabs are also listed in History. New blank tabs focus the address bar.

The address bar suggests local history, bookmarks, and other tabs in the current task. Up/Down and Enter choose a suggestion; Escape dismisses it. Selecting an open tab switches to it without creating a duplicate. Pressing Enter without selecting a suggestion keeps normal direct-address/search behaviour. Suggestions make no network requests; only submitting search text contacts the selected engine.

Normal tabs and pop-ups keep the same Chromium user agent and actual engine version. Electron's fallback is also Chromium-based because its popup creation can ignore per-tab overrides (electron/electron#45897); this fallback is process-wide, while browser cookies and permissions remain partitioned.

Cookies use the separate persistent persist:cm-browser partition, shared by browser tabs but isolated from the app and WPP login. Pages have no Node integration or access to the desktop preload API. Restore tabs is enabled by default. Returning to a task restores its saved page URLs, selected tab and supported back/forward history, with fresh tab IDs and agent access off; the vault starts locked on app relaunch. Recovery keeps up to 32 tabs per task, 20 recently closed tabs per task, and 50 recently saved tasks. Navigation recovery retains at most 20 URL/title entries around the selected page, never Chromium form/page state or POST bodies. See Browser recovery (#20) for fallback and privacy limits. Turning Restore tabs off deletes saved recovery data; open tabs and in-memory recently closed tabs remain available until the window closes. Camera, microphone and notification permissions default to Block and can be configured per origin in Browser settings. Notification controls require native capability; screen sharing, clipboard permission controls and location remain unsupported.

Downloads use Electron's authenticated browser transfer. Browser settings can choose the destination folder and whether to show a native Save dialog (on by default). Transfers eligible for restart recovery use a private staging file and publish to the chosen folder with exclusive creation, selecting a numbered sibling if a name already exists. Other automatic downloads retain the existing reservation flow. An unavailable destination falls back to the Save dialog. Active initial downloads support pause, resume and cancel through Electron DownloadItem. Application cancellation does not delete user destination files. Chromium can independently remove its own transfer files.

Download admission is recorded before destination setup. Up to 200 admission/finished records persist, with current-process live transfers protected from automatic history pruning; a full live-transfer limit or failed admission write prevents saving. Reopening unfinished records never starts a request or restores consent. Filename search, timestamps and individual removal remain available. Show in folder requires a completed regular file matching available size and recorded metadata; this is not a content-integrity or atomic filesystem guarantee. Clearing download history leaves user destination files on disk but discards unreferenced private recovery files. Files are never opened automatically.

Download recovery (#21)

Supported interrupted downloads offer Resume saved download. Each attempt requires a fresh native, default-cancel confirmation showing the initiating site, download server and original destination folder. Main rechecks current download rules for both origins. Recovery uses Chromium's authenticated session.fetch with the browser partition's current cookies, not saved authentication headers. The actual response must be HTTP 206 with matching strong ETag, Last-Modified, total length, exact Content-Range and identity encoding. Redirects, login failures and servers that ignore ranges fail without silently restarting from byte zero. Retry from the page remains available for unsupported transfers.

Initial eligibility requires a single HTTPS URL, or loopback HTTP for local development, known length and both validators. Recovery is not offered for redirected URL chains, weak/missing validators, unknown lengths, URL credentials, legacy history without checkpoints, or transfers interrupted before a checkpoint was saved. Original Save-dialog selection or automatic-folder preference supplies the destination; renderer commands supply only the record ID. Symlinked paths and replaced destination directories are rejected.

Checkpoints retain a SHA-256-validated copy of at most the first 64 MiB. They are refreshed at most every 30 seconds during progress, with a final attempt before cancelling an interrupted native transfer. A restart can therefore resume from an older prefix, not necessarily the last displayed byte count. Recovery streams the missing range into a separate private working file and publishes a new numbered file in the original folder without overwriting existing files. Recovered transfers have Cancel but no Pause control; cancelling explicitly discards their recovery record. Another crash retains the previous checkpoint. Private staging/working files and the final destination temporarily require extra disk space. Unreferenced private files are collected after transfers settle, history removal/clearing, or the next browser initialization.

The supported target is macOS. Run bun scripts/browser-smoke.ts --download-recovery from packages/desktop for the isolated crash/relaunch fixture. It uses only its own temporary profile, local server and child processes. See download persistence safeguards for privacy and platform limits.

Browser recovery (#20)

Electron navigationHistory.restore({ entries, index }) restores supported URL/title-only stacks, including recently closed tabs. Entries are explicitly projected on both read and write; pageState, history.state, form values, POST bodies, grants and unknown fields are not carried into recovery. At most 20 entries around the active index are retained, from a validated stack of at most 100 entries with URLs up to 2,048 characters and titles up to 512. Unsupported or malformed navigation metadata falls back to the validated saved URL. Existing URL-only records, including longer URLs, remain supported without truncating addresses. Malformed stores/collections are rejected without overwriting them or caching an incomplete group.

Pending or failed restoration retains its saved snapshot. Failed Reload, HTTP 204 and Stop do not replace it merely because a request started; successful navigation updates it, and replacement/closure invalidates the old callback. Failed restoration points to the existing Reload, address and close controls; ordinary load errors retain their existing copy. No automatic retry is added.

Recovery metadata is local plaintext. Websites can put sensitive information in URLs or titles, so this projection is not general data-loss prevention. Restored pages issue requests and execute site scripts using the browser partition's existing cookies/storage; not replaying POST bodies does not make those page loads side-effect-free. Turn Restore tabs off to delete saved recovery metadata. No agent grants or vault authentication are restored.

From packages/desktop, bun scripts/browser-smoke.ts --recovery uses a temporary profile and loopback server, kills only its owned seed process after a checkpoint, then relaunches with the same profile. It checks selected history index, Back/Forward, recently closed tabs, fresh private IDs, vault locked before any unlock, no restored form/history-state values and zero POST requests on relaunch. It also covers legacy/malformed metadata, failed Reload, redirects, HTTP 204, Stop, stale completion after replacement/close, and malformed-store preservation. This is an isolated process-crash test, not physical power-loss, packaged-app, native accessibility, macOS/Linux or real-provider assurance. Authentication/dialog answers are fixture seams; the new recovery copy has English fallback pending reviewed translations.

The separate #20 stale-running task incident remains open. Legacy/V2 execution ownership is process-local and the shared database has no exclusive execution-owner boundary; an empty local runner map cannot prove another process's work abandoned. This slice neither settles persisted transcripts nor automatically resumes tools/providers/publication. Durable settlement needs an agreed cross-process ownership/fencing design; partial output, child links, completed side effects and pending admissions must remain intact.

Links, bookmarks, and site controls

Browser settings choose separate destinations for app web links and local development links. Web links default to the system browser; localhost (including .localhost), IPv4 loopback and IPv6 loopback default to CookieMonster. An active task is required for internal routing; otherwise the system browser is used. Links followed inside browser pages retain normal in-tab navigation and popup behaviour. Right-click links in the app or browser to explicitly open in CookieMonster or the default browser. Internal links open a fresh tab with agent access off.

Tabs can be pinned, reordered within their pinned or unpinned section, duplicated, or closed in bulk. Pinned tabs stay at the left and bulk-close actions preserve them; they can still be closed individually. A duplicate is a fresh unpinned private tab at the current URL: it does not inherit agent access, native page state, device emulation, login operations, or the source tab's navigation stack. Left/Right, Home and End move keyboard focus and selection across the tab strip. Tab order and pin state use the existing URL/title-only recovery record, and every close still uses Chromium's beforeunload flow.

Bookmarks are local to the private browser profile, with up to 2,000 entries. Add the current page from the address toolbar; manage, edit, delete, order within a folder, and pin favourites in Bookmarks. Pinned entries appear on the new-tab page in stored order. Existing flat records migrate to the root folder without changing IDs, order or pin state. Folder paths support eight levels with 128 characters per segment; › separates levels in the editor and is therefore unsupported inside a folder name. Empty folders are not stored.

Import/export uses standard browser HTML bookmark files, parsed with parse5 without executing scripts or fetching resources. Supported nested folder structure and traversal order survive round trips. Imports skip unsupported URLs, keep the first duplicate from the source, preserve existing normalized-URL duplicates including their folder and pin state, and append genuinely new bookmarks in import order. Imports are limited to 5 MB, 2,000 supported bookmarks and 500 folders. Export retains CookieMonster pin state in an optional HTML attribute. Clearing history does not remove bookmarks.

Site controls beside the address bar show whether the loaded page used HTTP or HTTPS, without treating HTTPS as a trust verdict. Chromium certificate failures remain blocked. Controls reuse the exact-origin camera/microphone settings, revoke current-tab agent access, and inspect/clear site data through Chromium APIs. Inspection reports the number of cookies matching the current page plus Chromium's aggregate origin-storage usage and nonempty quota-managed categories; it never returns cookie values or stored records. Chromium does not expose a reliable per-origin HTTP-cache size through Electron, so the UI does not invent one. Reopening Site controls refreshes the inspection, and a manual refresh is available for data changed while the panel stays open.

Storage and cache clearing are all-time and target the selected origin. Chromium removes cookies for the registrable parent domain, which can sign out sibling subdomains and may remove cookies beyond the matching-cookie count. The inline explanation and default-Cancel native confirmation state this scope; no time-range control is offered. Open pages at the exact selected origin reload after clearing. Sibling-origin storage, unrelated browser origins, app/WPP sessions, bookmarks, history, downloads, passwords and permission rules remain separate. From packages/desktop, bun scripts/browser-smoke.ts --site-data verifies Chromium inspection, exact-origin storage removal, parent-domain cookie removal, exact-origin tab reloads and preservation of sibling/unrelated records and isolated partitions with a disposable profile.

Device preview (#24)

Show device toolbar exposes custom width/height from 160 to 4096 CSS pixels, named reusable size presets, Apply size, and Swap width and height. Presets persist in the private browser profile, are limited to 20 unique names, and contain dimensions only. Native emulation scales the preview to fit the panel, with device scale factor 1, unchanged page zoom and real Chromium identity. Page viewport metadata and zoom can affect layout. Swapping dimensions previews orientation layout, not device sensors; touch emulation is unavailable through this Electron API and mouse input is unchanged.

Each tab keeps its preview in memory across navigation and tab switches; resizing recalculates fit. Hide device toolbar restores the native baseline. Fresh, reopened and recovered tabs do not inherit preview settings, even when a named size remains available. Busy, loading, suspended, login, held-input and pending-close/reload targets reject changes. Changes invalidate stale snapshots, captures and consent without changing agent grants. Pending selection/picker/screenshot results cannot become valid again after switching away and back.

Zoom is stored for the exact HTTP(S) origin, including a non-default port, and is reapplied after navigation, in another open tab, and after URL/title-only recovery. Navigating to an origin without a rule explicitly restores 100%; Reset removes the current origin's rule. This uses Electron's Chromium zoom facility and does not emulate operating-system display scaling. Corrupt persisted zoom or preset collections are ignored for display and cannot be overwritten through the browser commands.

From packages/desktop, bun scripts/browser-smoke.ts covers preview and restoration; --capture-selection covers native capture round trips and --offer-arming covers the delayed-arming fixture regression. Run native variants separately and serially with disposable profiles. See preview evidence and limits, including the unresolved historical login-offer cause, unsupported touch and platform/physical-validation limits.

Browser menu and saved logins

The browser menu provides Chromium find-in-page (Control/Command+F), native printing (Control/Command+P), zoom, a configurable mobile preview (390 by 844 CSS pixels by default), screenshot-to-chat, downloads, history, imports, and browser data settings. Mobile preview retains the real Chromium user agent. History retains up to 2,000 recent visits across browser sessions, including repeat visits, with title/URL search, dates, individual deletion, and opening a visit in a new tab. Existing history rows receive stable IDs without inventing past visits. Recording can be disabled in Browser settings. The default search engine remains DuckDuckGo; missing, legacy DuckDuckGo, or invalid stored selections safely read as that default.

Password storage uses Node's AES-256-GCM implementation for an authenticated vault containing passwords, websites, usernames, and credential IDs. A fresh random key is protected with Electron safeStorage (Windows DPAPI, macOS Keychain, or the Linux secret store) on every write. It fails closed when OS encryption is unavailable, Linux falls back to basic_text, authentication fails, or a remote-debugging port/pipe is enabled. The general renderer storage API cannot access the private browser store. Browser history remains local plaintext. The agent browser tools have no vault API, and snapshots exclude editable values/content (not deliberately mirrored ordinary site text). See Password security for the threat model and outstanding assurance work.

Payment-card autofill, CookieMonster-managed passkeys, and cross-device sync are not supported. Their separate discovery proposals and acceptance gates are recorded in Future credential and sync proposals; no implementation or placeholder controls are authorized by that document.

Passwords and autofill can save a filled login before submission and fill a saved login on its exact origin, with agent access off. Saving and filling each require native confirmation naming the website and username. It never submits the form. Combined filling requires a single visible, unobscured password field and an unambiguous username field in the main document. Explicit username-only and password-only actions support multi-step logins on the same saved origin; username-only filling requires a uniquely identified username/email field. Each mode sends only its requested field to the page, over HTTPS (or HTTP loopback for development). Forms must use POST and same-origin submission destinations; form-less JavaScript logins are supported. Navigation, replaced fields, new-password fields, or concurrent agent access interrupt delivery. Redirect and popup SSO journeys support fresh, explicit account selection at each actual login origin; credentials are never automatically shared and affiliation is never inferred. Iframe login forms, foreign-origin form destinations, automatic cross-origin account selection, address/payment autofill, and cross-device sync are not implemented.

Automatic save/update offers run only with the vault already unlocked, on the active visible tab with agent access off. Unlock before signing in. Detection uses a dedicated isolated world and a main-process binding; no credentials pass through the app renderer or sidecar. It observes a trusted click/key gesture followed by a same-origin POST form submission, using the same field-visibility checks as manual filling. Same-origin username-first/password-second forms are supported within one minute. Passwords marked new-password, ambiguous fields, GET forms and cross-origin actions are excluded.

The submitted form must disappear and visible password/error fields must be absent before an offer appears. This is a conservative heuristic, not proof of authentication: the native prompt asks you to confirm sign-in succeeded. It offers Save/Update, Not now, and Never for this site; unchanged saved passwords produce no prompt. Updating preserves the credential ID and aborts if another operation changed the stored login while the prompt was open. No credential is written without consent and the original vault grant. Locking, hiding, switching tabs, agent access, navigation during a prompt, or timeout discard pending work. Browser settings can disable offers or remove site exclusions. Exclusions are ordinary profile preferences, not encrypted account records.

Formless JavaScript sign-ins, persistent/hidden login forms, cross-origin SSO, iframe forms, password-change forms with multiple password fields and unusual success/error UI may require manual saving. Failed sign-ins without recognizable error UI can still produce an offer; decline it. Temporary submitted credentials exist in main-process memory for up to one minute while eligible; JS strings are not guaranteed to be zeroized. Captures already dispatched from the isolated world cannot be recalled, but main rechecks the vault/access state before retaining or saving them.

Guided export imports (#22) use the Import panel's password CSV, cookie JSON and bookmark HTML buttons, followed by a native file picker and default-Cancel review before writes. Review shows valid, duplicate, add, replace, unchanged and unsupported counts as applicable, plus category scope and the plaintext-export warning. Only the shared CookieMonster browser profile changes, not app/WPP data or page/vault grants. No browser profile scraping, protected-database reading or OS bypass is provided.

Password CSV imports match normalized origin/username, retain existing account IDs and skip exact duplicates. Password and cookie source conflicts use the last row; cookie replacements, including session credentials, are explicit in consent. Bookmark imports keep existing normalized URLs and their titles, IDs and pins; new URLs use the first row. Password/bookmark changes use one strict atomic store write. Cancelling review makes no import writes, including no legacy-vault migration.

Cookie JSON accepts an array of objects with domain, name, value, and optional path, secure, httpOnly, hostOnly, sameSite, expirationDate, session. Accepted IPv4 domains, with or without a leading dot, normalize to Chromium's host-only identity before review, deduplication and destination checks. DNS host-only/domain scope remains distinct; DNS domain matching ignores case and an optional leading dot. Noncanonical IPv4 and IPv6 representations remain unsupported. Unknown fields, partition/container scope and unsupported flags reject the whole import rather than broadening scope. CSV parsing reuses csv-parse; insecure non-loopback password URLs are rejected. Files are limited to 5 MB, with 2,000 password/bookmark or 5,000 cookie rows. Plaintext exports remain on disk until the user removes them.

Native results report category counts. Cookie results distinguish successful, failed and unattempted writes and whether flushing succeeded; a failed flush does not claim durable saving. Cookie writes are sequential and may be partial: successful writes are flushed even after interruption, with no rollback or automatic replay. Original window/task/renderer and password-vault access are rechecked across awaits. A changed reviewed destination requires fresh review, with relevant cookie destinations checked again before each write. This is process-local protection, not atomic cookie or multiprocess concurrency assurance. See import evidence and limits.

Clear browsing data provides a category checklist and one native confirmation. Last hour, 24 hours, 7 days, 30 days, and all-time ranges apply to history and download records. Clearing history also removes matching recently closed tabs from memory and saved recovery. Electron does not expose time ranges for cache/site storage, so cache, cookies/site data (signing out browser websites), and passwords require all time; both UI and main enforce this. Open tabs and downloaded files remain. App and WPP login storage are separate.

The vault starts locked and requires Windows Hello or Touch ID to unlock. It locks again after a fixed five-minute interval, on device lock/sleep, hiding/minimizing/closing an app window, renderer teardown, or Lock now. Locked UI state contains no saved account metadata. Unsupported authentication setups (including Linux) stay locked. Windows development/packaging builds compile a small C++/WinRT helper with Visual Studio C++ tools and the Windows SDK; it ships under resources/vault-auth. macOS builds use Xcode's command-line tools to compile the AppKit account-entry helper into the same directory. Run bun scripts/build-vault-auth.ts if launching electron-vite directly instead of the normal predev step. Reauthentication is an app-level gate and does not add Windows app-bound encryption.

Main-process changes take effect on the next launch. Renderer hot reload can show the menu earlier; no running app or server is restarted by this implementation.

Development builds no longer open port 9222 automatically. CM_REMOTE_DEBUGGING=1 explicitly enables it in development; saved logins are unavailable in that mode. Packaged builds do not enable that port through this variable.

The isolated bun scripts/browser-smoke.ts --account-fill verification covers explicit per-origin redirects and popup SSO, cancellation/retry and stale consent, with synthetic credentials. It distinguishes fixture failures from stale-consent rejection and inspects callback fields/tickets/submission state before closing, including a DOM-only negative control. See #18 scope and evidence for the matrix and native/platform limits. Closure validation on 2026-09-22 passed this fixture on macOS arm64 / Electron 44.3.0 / Chromium 152.0.7977.78, plus 257 desktop browser tests, 19 browser-panel unit tests, 43 app browser tests and desktop/app typechecks. Dependencies #10/#17 are closed; independent correctness/spec and standards reviews found no acceptance gaps. This follow-up changes documentation only. Authentication and dialog answers remain controlled; real providers, physical accessibility, packaged builds, Linux and external security assurance remain separate work.

Encrypted password backup is available on macOS when the native secure-entry helper is installed. Each export/import requires a fresh device authentication; passphrases use a dedicated secure field, and exports never replace existing files. See password backup format and limits and the macOS validation record.

Browser settings

Settings reuse Electron session permission handlers and DownloadItem APIs. Camera/microphone rules are exact-origin, main-frame only, HTTPS or loopback, with Block/Ask/Allow. Ask uses a native prompt per request, and OS permission requirements still apply. Changing a rule requests a safety reload of matching open tabs, overriding reload vetoes but waiting for an outstanding agent close to settle. Existing capture ends on document replacement or closure; HTTP 204, Stop or stalled loading can delay disposal. See the lifecycle evidence below. The native test uses fake media devices, never the physical camera or microphone.

Notification controls in Settings and Site use Block/Ask/Allow when the running main process reports native capability. Ask is a default-Cancel native review that saves Allow for the exact origin. Even Allow requires a selected, visible, attached private main page, without agent control or pending unsafe work. Workers and child frames are denied. Stale consent is cancelled on navigation, task/tab/viewport changes, hiding, closing or policy changes. Notification-only edits do not reload pages or overwrite camera/microphone rules. Blocking prevents subsequent notification permission checks from succeeding, but cannot recall already-delivered notifications.

Delivery also requires OS notification settings and platform integration. The capability flag is not OS consent or delivery evidence. Manage delivery in the OS notification settings.

On macOS 15 or later, screen-sharing rules use the same exact-origin Block/Ask/Allow gate and Electron's native system-picker handoff. CookieMonster never enumerates or silently chooses a source: Apple asks the user to select a screen or window for every capture. Revoking screen-sharing Allow first replaces the active page with a local blank document, overriding unload vetoes and ending capture independently of the network, then restores the prior history. The native fixture starts a real tab-capture stream and verifies replacement while the original URL returns HTTP 204. Older macOS versions expose no screen-sharing control.

Clipboard rules cover Chromium read and sanitized-write permission paths. They retain the selected, visible, private-main-page boundary and deny agent-controlled or busy tabs. Clipboard rule changes apply immediately without a reload. The fixture exercises Electron's installed request/check handlers without reading or writing clipboard contents. Location remains blocked and has no control because this build has no approved geolocation provider/API key or macOS location usage declaration. See site-permission scope and evidence.

Show full URL controls the unfocused address display; editing always exposes the complete URL. Include screenshots with selections adds a screenshot to the same captured chat draft as Add Selection.

Agent access groups the global switch, current task's tab grants, history search and transfer defaults/exceptions. Opening settings grants nothing. Main reports whether the live WebContents URL supports website consent; saved/display URLs never grant access. It also reports lifetime transfer guarding and the resolved default or exact-origin transfer exception. Missing metadata is shown as unavailable, never inferred as allowed; Refresh access status rereads main. Status is a snapshot, not a permission grant, and main rechecks every operation.

The global switch immediately revokes every tab grant and invalidates snapshots; enabling it again restores neither grants nor refs. Tab revocation also aborts pending native consent. Native tab grants use an asynchronous unparented dialog on Windows/Linux and a separate sheet-owner window on macOS, not a modal dialog attached to settings. Global and tab revoke controls bypass the pending settings command. The native prompt defaults to Cancel, has an abort signal, and permits only one pending grant per owner. Navigation, tab removal, global/tab revocation, and owner hide/minimize/close/renderer teardown invalidate consent; source, tab, owner and access identity are rechecked after consent and upload-guard initialization. Consent covers the entire native tab. Cross-origin navigation and redirects retain authority but invalidate old document references. Blank tabs must first be navigated by the user before granting access.

Page tools use the main-owned tab grant without context.ask prompts. Page eligibility requires global access, a tab grant and a supported loaded document; driver capability and stale-reference checks remain enforced. History Never/Ask/Allow is independent of hosts and tab grants, but subject to the global switch; recording history remains a separate General setting. Opening an agent history result always requires native confirmation and creates a private tab.

The settings page links to the existing password manager, imports, browsing history, and data clearing. It deliberately does not advertise contact/payment autofill, automatic path-based uploads, or unrestricted agent CDP access, which are not implemented. WebMCP site tools are exposed through the agent tools described below, not as a settings claim. Controls requiring a newer main process are disabled during renderer hot reload until the next launch.

Agent uploads and downloads

Browser settings now include default transfer rules and exact-origin exceptions (scheme, host and port). Downloads support Ask (default), Allow and Block. Uploads support Choose files each time (default) and Block. Settings are validated and persisted in Electron main; malformed saved rules fail closed. These controls apply to tabs that have had agent access and connected opener/pop-up tabs for the rest of their lifetime, including delayed actions after access is revoked and manual transfers in those tabs. New unrelated private tabs keep normal browsing behaviour.

Downloads are checked at Electron's will-download boundary, including click, navigation and page-triggered downloads. Ask shows a native, default-cancel confirmation with the initiating page, filename and download URL before the ordinary save-location flow. Rules are keyed to the initiating page's origin, not the CDN/download URL. Allow still follows the user's Save dialog and destination preferences. Block or Cancel prevents saving; already active transfers use the existing Cancel control.

Uploads reuse Chromium's file chooser interception and file-input delivery. Top-document file inputs open a native picker naming the receiving origin. Supported direct-child HTTP(S) iframe choosers use the tab grant without receiving-origin confirmation, then open the native file picker. Child selection requires current global/tab agent access and transfer policies at both boundaries; private, revoked and unsupported child choosers remain cancelled. The user alone chooses files; no agent API accepts local paths or initiates a child file-input click. A page can read selected files immediately and submit them through its own script. Navigation, access-revision changes, rule changes or window destruction while choosing discard the result; a fresh top picker after revocation retains existing private-browsing behavior. Concurrent pickers are suppressed, and pending child selection excludes agent page operations. Directory inputs remain unsupported; native chooser filters are not copied from the page. Losing interception closes the guarded tab instead of silently restoring unrestricted selection. This is file-selection consent, not a network upload firewall: it does not prevent a page from transmitting data it already holds.

Agent history search

Agent access to browsing history is a profile-wide setting: Never, Ask each time (default), or Allow. It is separate from website consent in a tab; consenting to a history search can reveal saved visits to hosts the agent cannot browse. The global browser-agent switch also blocks these tools.

browser_search_history matches title or URL case-insensitively, with optional inclusive from/to Unix millisecond timestamps. It returns newest-first visits (including repeat visits), default 10 and maximum 20, with bounded titles, exact URLs and five-minute, task-bound result references. An oversized response fails explicitly rather than truncating URLs. Empty queries search all visits within the supplied dates. Ask uses a native default-cancel prompt displaying the query, UTC date bounds and result limit. History is read after approval. Pending approvals expire after one minute, and changing browser preferences invalidates pending approval and previously issued references.

browser_open_history accepts only a result reference from the same task and live app window. It always asks native confirmation showing the URL, opens a new tab with agent access off, and consumes the reference. Main rereads history before confirmation and before opening, so deleted visits cannot be reopened from an old result. Old browser builds reject these new operations. The tools work for tasks currently open in the app or with existing browser groups; unknown tasks cannot access the profile.

Deleting visits prevents future searches/opening through these tools. It cannot remove results already shared in chat. Search never exposes page bodies, vault data or a filesystem path. Native smoke coverage checks denied/allowed access, concurrent prompts, revoke/re-enable during approval, deletion while awaiting approval, cross-task references and private-tab opening.

Agent access

The September 19 follow-up completes scoped #11 implementation acceptance, including navigation read approval. Earlier OPEN checkpoints below are historical; packaged accessibility, platform and verified-localization validation remains under #19, with separate password-manager assurance under #34. See the updated evidence.

New tabs, including pop-ups, start with agent access disabled. The user must enable Allow agent access and accept the whole-tab native confirmation in each tab. No separate Add Host step is required. Revoking access interrupts further agent input and invalidates snapshots.

The page tools run in the OpenCode sidecar plugin and reach main through its parent port:

  • browser_read_state without tabID lists opted-in tabs for the current session with supported URLs, including opted-in blank tabs.
  • browser_read_state with tabID returns that tab's page and opaque element references.
  • browser_navigate, browser_click, browser_fill, and browser_press_key require an explicit tabID.
  • Navigation returns a destination snapshot under the same tab grant. Preparation does not read the source page, so recovery from blank, loading or oversized-source tabs remains available. Cancellation prevents further dispatch.
  • Click and fill references are bound to a specific tab and snapshot. Navigation and access revocation invalidate them.
  • All eight writes, including hover, scroll, select-option and drag, capture main's {tabID, origin, urlHash, revision, accessRevision} using private prepare_write before dispatch. urlHash is SHA-256 of the entire exact live source URL; the bounded origin identifies the source document. Long source paths/queries are not subject to the separate 2,048-character destination limit. Main rejects changed context, including long-source mutation, navigation away and back, reload and revoke/regrant. Navigation binds the source page without a destination-origin grant. This binding detects staleness; it is not a new approval or a second grant store.
  • Main-frame loading blocks page reads, input preparation and input dispatch, including checks around awaited driver commands. Navigation start, commit and DOM readiness invalidate page identity. Fresh navigation to an allowed destination remains available for recovery; stopping an old load and waiting for the destination are bounded and access-checked, with source/access and current destination-policy rechecks immediately before loadURL, without an intervening await. Settings show temporary loading separately from host denial and disable new grants while loading.
  • Main and the cm-browser plugin must ship together: writes without context fail closed, and the updated plugin requires prepare_write. This is private transport, not a public Protocol/HttpApi or generated-client change.
  • Every successful top-document snapshot response is checked again when main returns it and immediately before the sidecar posts it. This covers reads, navigation, click, hover, drag, select, fill, key input, scroll and waits. Navigation pins the actual destination URL and revision before capture, including redirects. A later navigation, reload, access change, owner change or host-policy change discards the captured URL, text and refs instead of returning stale data.

browser_hover({tabID, ref}) sends one trusted button-free mouse move and returns a fresh snapshot. Hover handlers may act, so it uses the tab grant and source-bound preparation. browser_click({tabID, ref, mode?}) preserves left-click by default; double sends two left pairs with click counts 1 and 2, revalidating the original ref after the first pair before any second input. Identical replacement rejects the second pair without undoing the first click. Click/fill also revalidate the original ref after the initial mouse move and before the first press, including the saved writable kind for fill. A changed center fails closed instead of chasing it with further moves. right sends a right pair and preserves DOM contextmenu handlers. All app-native menus on that tab are suppressed while the right-click operation is in flight, including simultaneous manual right-clicks at any coordinates. DOM handlers still run; other tabs, ordinary hover/left/double operations and later manual menus are unaffected. Suppression is released in finally after actual native settlement, including errors; cancellation may reply before that settlement and guard release. No input-origin attribution is attempted. Native menus are not snapshot-readable; blind menu keys are unsupported. These operations share the existing 15-second deadline, cancellation ownership and acknowledged-release quarantine rules.

From packages/desktop, bun scripts/browser-smoke.ts --interactions checks hover DOM menus, trusted double-click, identical replacement with zero second-pair input, post-move replacement/type/center changes with no press, stable fill, trusted DOM context menus, repeated same/different-coordinate native menu queries during held right-click settlement (success/cancel/reject), other-tab allowance and a later non-agent native-popup positive control. This isolated Windows Chromium fixture is not physical-input, concurrent-user, packaged-app or macOS/Linux assurance. The fixture also checks collapsed native single-select identity, changed-only untrusted events, already-selected no-op, disabled/multiple/cross-owner/snapshot/tab/replaced/moved/covered rejection, generic-option-ref refusal, stale approval and held cancellation/acknowledgement failures. Drag checks use fresh disposable views: trusted pointer-capture drops accepted and rejected by site code, identical replacement/ancestry changes before press, post-hover replacement/moved centers, destination replacement/reparenting/movement/disabling/overlay after pressed movement, no release with quarantine, cross-tab/snapshot zero input, and held native-move revocation retaining busy/rendering ownership until settlement. Parent review and broader platform assurance remain separate.

browser_drag({tabID, sourceRef, targetRef}) uses the same tab grant and source/access-bound preparation. Both distinct endpoints must be existing interactive refs from the same tab and retained snapshot. One synchronous isolated-world evaluation jointly applies the existing snapshot identity, ancestry, visibility, enabled and center-hit guards before any input, then again after the initial unpressed hover. Both centers must match their initial coordinates before press; moving targets are never chased.

The gesture sends one left press, four fixed interpolated pressed moves and one release. The exact original destination is revalidated at each movement boundary and before release, including its unchanged center; source movement after press is permitted. Changed or stale destination stops input without release, retry or cancelDragging, retaining quarantine unless release was acknowledged. Registration/owner, source/access, host policy and deadline are checked around every native await; busy/rendering/navigation ownership remains until native settlement. Already-dispatched effects cannot be recalled.

Success means the bounded pointer gesture completed, not that the site accepted a drop. Only snapshot-addressable controls are supported; plain noninteractive drop divs are not auto-discovered. Sites may use pointer capture or HTML5 drag loops. There is no arbitrary-coordinate or selector-discovery API, user duration/steps, universal HTML5 DnD, OS-file or native dragging.

browser_select_option({tabID, ref, optionRef}) chooses an option owned by a native single-select ref from the same tab and retained snapshot. Collapsed options are metadata, not visible hit-test targets: only opaque ref, label, selected and disabled are returned, never option values. Metadata is capped at 50 options per select and 200 per snapshot with explicit truncation; main reenforces counts and 160-character labels. Iteration shares existing traversal budgets without allocating an unbounded option array. Labels use the option label attribute or safe text, excluding editable ancestry. Native option refs cannot be used for click, fill, hover or scroll.

Selection uses the tab grant and source/access-bound preparation. One fixed synchronous isolated-world script jointly revalidates document/snapshot, actual select and option weak-node identity, unchanged ancestry, ownership/membership, and the visible enabled hit-tested select. Multiple selects and disabled select/optgroup/option targets are refused before effects. The native selected setter acts on the exact option, not its index, label or value. Bubbling input/change events have isTrusted=false and are emitted only on actual selection change; already-selected is a no-op. Site handlers may submit, navigate or mutate. Dispatched effects cannot be recalled; failed acknowledgement or final snapshot never automatically retries selection. No keyboard fallback, arbitrary page-script API or persistent listener/timer is added. Existing deadline (including final capture), policy checks around awaits, busy-through-native-settlement ownership and input quarantine apply.

browser_scroll({tabID, ref?, deltaX, deltaY, timeoutMs?}) sends one trusted Chromium wheel event. Both deltas must be finite integers in [-2000, 2000] CSS pixels and at least one must be nonzero. Without a ref, the event targets the viewport center; with a ref, it targets the center of that revalidated interactive element. Nested scrolling follows native hit testing, including scroll chaining at edges, site wheel cancellation and overscroll CSS. Empty/noninteractive containers cannot be directly targeted by ref. Successful dispatch does not guarantee movement or exact distance. Scroll uses the tab grant and source-bound preparation, with no automatic permission upgrade or down/up gesture.

browser_wait_for_element({tabID, selector, timeoutMs}) observes the current top-frame document for a visible match. Only one ASCII compound selector is supported, at most 512 characters: an optional tag matching [A-Za-z][A-Za-z0-9-]*, followed by zero or more #id or .class tokens whose names match [A-Za-z_][A-Za-z0-9_-]*. At least one token is required, for example button, #save, .primary, or button#save.primary. Whitespace, attributes, pseudo-classes/elements, escapes, combinators, universal selectors and lists are rejected in main before any DOM query with generic bad_request / Invalid CSS selector. Native syntax errors use the same message; no selector or page exception is echoed. In particular, correct and incorrect password-attribute guesses are both rejected, not distinguished by success versus timeout. The fixed isolated-world probe returns only boolean/status. Chromium IntersectionObserver supplies the actual viewport/clipping-chain intersection, including fixed elements escaping non-containing overflow ancestors, while checkVisibility checks opacity and CSS visibility. A positive intersection is not an occlusion or clickability guarantee. Iframes and shadow DOM are not searched. A fresh snapshot follows success, but a noninteractive match is not promised a ref.

browser_wait_for_navigation({tabID, url, timeoutMs}) observes an exact URL and finished main-frame load. It is level-triggered: an already-loaded matching URL succeeds immediately, not proof of a new same-URL reload, network idle or application readiness. It never initiates, stops or vetoes user navigation. This is the only observation operation admitted during loading; current and target hosts, task registration/owner and access epoch remain checked around awaits, and destination URL/revision are pinned before final capture. Element waits and scroll instead reject any source epoch change.

Waits use the existing tab grant without another read approval. Every timeout is a positive integer no greater than 15,000 ms; scroll defaults to 15,000 ms. One main deadline covers setup, probes, settling and final bounded snapshot, returning typed timeout or cancelled. Polling uses abortable main-process delays and short isolated-world IntersectionObserver samples, each with a timer capped at 100 ms and the remaining deadline. The sample disconnects its observer and clears its timer in finally before native settlement. Cancellation sends no cleanup or follow-on probe into the page; already-dispatched samples finish their own cleanup while busy/rendering ownership stays held. No persistent page listener or background polling service is installed. Results are observations, not guarantees that a dynamic page stays unchanged afterward.

Cancellation and deadlines end the agent reply without recalling an already-dispatched native command. Busy ownership, the rendering lease and navigation guard remain until that command settles. An interrupted key-down or mouse-press without an acknowledged release quarantines that WebContents: all subsequent agent page operations, including reads, write preparation and navigation, fail with recovery instructions. No automatic release is sent after cancellation or revocation because releasing can activate the page. Close the affected tab, open a new tab and grant agent access again. Reload, navigation, re-registration and access toggles do not clear quarantine. Closing still respects unsaved-page confirmation; neither cancellation nor quarantine rolls back page actions or disables manual input.

From packages/desktop, bun scripts/browser-smoke.ts --cancellation checks real Chromium key/mouse down events and button :active state, retained ownership while the driver completion is held, quarantine and new-view recovery. A fixture-only release demonstrates post-cancellation click activation. Reload resets the fixture's DOM event log and active state; this is not evidence that reload safely clears Chromium's internal input state. The fixture uses an isolated Electron profile and a deterministic completion hold, not physical input, naturally timed cancellation, or packaged-app/macOS/Linux assurance.

Agent success responses are checked as complete UTF-8 Response JSON against MAX_SNAPSHOT_BYTES (65,536 bytes), including page state, tab inventories, write preparation and history results. Oversized output returns unavailable with Browser response exceeds the size limit. Internal URLs remain complete for hashing and ref identity; no shortened URL is presented as an actual address. The existing page text/element reduction runs first. An oversized tab inventory fails as a whole, without pagination; recovery navigation to a short allowed URL still works with a known tab ID, otherwise the user must navigate manually. This bounds agent response data, not internal capture/storage, renderer state, the outer IPC envelope or plugin formatting. A response-size failure does not undo an already-dispatched action.

Main enforces the in-memory whole-tab grant in registry.ts for supported page tools and navigation. Issue #37 does not add frame discovery or interaction capabilities; those remain separately tracked. The legacy cm-browser-allowlist.json is not an access prerequisite. Agent navigation may change origins without another grant or tool approval. Grants are not persisted or shared with other tabs.

The renderer has only typed browser commands and fixed context operations, never an arbitrary JavaScript execution IPC endpoint. Main validates ownership against the app window's main frame.

Frame-aware workflows (#17)

Closure validation (2026-09-22, macOS arm64): the bounded implementation satisfies #17, and dependencies #13/#14 are closed. The serial bun scripts/browser-smoke.ts --frames passes on Electron 44.3.0 / Chromium 152.0.7977.78, including cross-origin reads/selects/uploads, replacement/navigation/revocation and child-password rejection. The separate default native suite also passes after correcting two fixture readiness assumptions: wait for a loaded, guarded child execution context rather than just Target.attachedToTarget, and wait for renderer viewport measurements after native resize. Before correction, the default suite repeatedly failed with Cannot find default execution context, then with stale 300×250 dimensions after restoring 800×500. No production authority or consent checks changed. The passing default run still emitted an observer-list reentrancy diagnostic and the expected fixture ERR_EMPTY_RESPONSE; passing assertions do not establish the cause of that diagnostic.

Current checks: desktop browser/provider tests 272 PASS / 3,174 expectations; complete cm-browser suite 91 PASS / 3,653; desktop and cm-browser typechecks PASS; formatting/whitespace PASS; scoped native-smoke lint 58 warnings / 0 errors. Native-i18n ran 12 PASS / 1 FAIL: the unrelated pa-PK locale-detection assertion expected pa but returned en; locale code was unchanged. Independent standards and correctness/spec reviews found no actionable frame-workflow gaps. Physical consent/accessibility, reviewed translations, packaged builds, Linux and external #34 assurance remain separate validation work.

Top browser_read_state({tabID}) exposes at most 32 eligible opaque frameRef/exact CDP securityOrigin pairs for ordinary visible direct HTTP(S) children, including same-origin and actual out-of-process iframes (OOPIF), without reading child bodies. Explicit browser_read_state({tabID, frameRef}) requires private document preparation under the same tab grant. Preparation pins the isolated-world document/root without reading body text or editable values; approved reads reuse the bounded fixed snapshot script without universal access. Child refs remain separate from top refs, with editable values/content excluded and at most ten retained snapshots per frame.

browser_select_option({tabID, frameRef, ref, optionRef}) supports native single-selects from the original child snapshot. Private prepare_frame_select binds a one-use document token to the operation, frame, select and option. It does not request another approval. Read/select tokens cannot interchange. Preparation does not refresh snapshots, even after later read preparation. The token is consumed before awaited validation; fixed synchronous document/root/generation/node/ancestry/option/deadline checks reject replaced, disabled, multiple or foreign controls. Options retain the 50-per-select/200-per-snapshot and 160-character label bounds, with no values exposed. Only actual changes emit untrusted input/change; already-selected is a no-op. The result is acknowledgement only, with no implicit child reread, top fallback or retry.

Supported native child file choosers use the tab grant and a native file picker; only user-selected paths reach the original input through DOM.setFileInputFiles. No agent path or child-click API exists. guardUploads remains the sole debugger/auto-attach/chooser owner, preserving root/child cancel: true interception and lifetime guarding after revocation. Native frame/session/backend-input identity, not URL matching, binds retained isolated-world input/document/root/parent and ancestry for at most 60 seconds. Source/access revisions, both host and transfer policies, visibility and native lifetime are checked through delivery. Pending pickers exclude agent page operations, concurrent pickers are suppressed, busy ownership lasts through settlement, and cleanup releases only chooser-owned handles. Private/revoked/unsupported child choosers cancel; guarded top-picker behavior remains intact. Directory inputs and automatic retry remain unsupported.

Main binds frame authority to task/tab/access, production WebContents owner ID, parent/loader, native CDP session/default-context and original document identity. Navigation, detach and document/context replacement invalidate the tab-wide frame epoch; both hosts are checked around awaits and through bridge/picker delivery. Successful production updateAgentHost writes advance a process-wide monotonic epoch, preventing receiver remove/readd (A-B-A) from reviving authority and conservatively invalidating unrelated pending work. Unobserved direct external file-edit A-B-A between checks is not covered. Metadata caps are 128 sessions and 256 contexts: overflow disables child support for the tab lifetime, not guarded top snapshots/pickers, including after frame-free navigation without reattachment. Only explicit overflow bypasses child discovery/session capture; ordinary native invalidations still reject.

Visibility is a conservative eligibility gate, not a blanket full-visibility guarantee. Owner scanning is capped at 4,000 elements; nested, sandboxed, srcdoc, inherited/opaque, shadow-owned, unmapped, transformed, overlapping, clipped and unsupported containment cases are omitted/refused. Clipping uses ancestor client boundaries rather than border boxes and rejects non-auto legacy clip on owners/ancestors. Checks persist across held read/select/upload work, but geometry/identity validation and cross-process dispatch or file delivery are not atomic. Already-dispatched selections or file exposure cannot be recalled, including when only acknowledgement is revoked. File-selection consent is not a network upload firewall.

Child passwords, keyboard/pointer operations and waits remain unsupported. Private parser/plugin boundaries reject unsupported frameRef and raw native frame/context/session arguments rather than silently targeting top; password scripts reject top !== self. Every top keyDown/keyUp/Input.insertText requires current non-detached native main-frame focus. Fill also revalidates original document/generation/node/ancestry, visibility, disabled/read-only state, saved writable kind and exact focus through open shadow roots around keyboard commands. Its focused-keyboard branch skips pointer-center hit-testing only after those checks; initial pointer preflight still rejects covered editors. Wheel hit testing rejects child hits and embedded owners, including OOPIF hits reporting the parent ID. Interrupted downs retain quarantine without unsafe release/replay/reset; pre-down rejection adds none.

Witnessed RED/GREEN evidence (2026-09-17): all eight top-input cases delivered unsafe trusted child keys/wheels or continued fill after theft/replacement before guards; the first partial fix still failed cross-origin wheel. Wrapping-editor RED stopped a 199-character fill after 128 trusted keydowns/127 keyups when native caret scrolling moved the unchanged focused editor offscreen; GREEN completes 201 trusted pairs with exact text and no quarantine. Native review RED reproduced unequal production window/WebContents owner IDs, receiver-policy A-B-A, both metadata caps breaking top reads, thick-border overflow and legacy clipping. Containment RED covered 11 discovery cases and held read/select/upload; expanded variants are GREEN coverage, not individually witnessed RED. Fixture startup/cleanup/duplicate-registration errors and clipping attempts without a positive baseline are not bug-specific RED; initial parser/read/select checkpoints have no clean RED-before-fix claim.

Latest serial bun scripts/browser-smoke.ts --frames from packages/desktop passed on Windows / Electron 42.3.3 / Chromium 148.0.7778.218: 81 upload, 57 read and 86 selection cases, plus discovery and existing regressions. The 12 containment-discovery and 72 held variants are included in the corresponding coverage totals, not additional passes to double-count. Coverage includes same-origin/proven-OOPIF identical-URL sibling isolation, fresh/replayed/wrong consent, retained snapshots, expiry, replacement/navigation/revoke, production host commands across approval/native tree/result/bridge/picker boundaries, unequal production owner IDs, and both synthetic caps followed by navigation and revoked OOPIF chooser cancellation. Read negatives dispatch no child snapshots; selection negatives assert zero successful selection results/DOM selection events, not zero validation scripts; upload negatives assert zero delivery commands/files. Positives affect only the receiver. Held pickers expose no files and block reads. Direct prepareLoginScript rejects all three modes in same-origin/OOPIF children without tickets or field changes; top-only native-command rejection and 16 credential-command negatives remain covered.

Latest supplied verification: desktop and cm-browser bun typecheck PASS; desktop bun test src/main/browser/ 154 tests / 2,252 expectations; cm-browser bun test 81 / 3,254; app native-i18n 9 / 458 and app bun typecheck PASS. The final parent bun scripts/browser-smoke.ts passed serially after all production corrections, including containment rejection; expected fixture ERR_EMPTY_RESPONSE and Chromium Mojo diagnostics did not fail the run. Default native and focused --frames are separate. Scoped lint: cumulative 23 files / 176 warnings / 0 errors before the five fixes; correction 8 files / 85 warnings / 0 errors; final 2 files / 35 warnings / 0 errors. These are distinct scopes, not warning-free or root-wide lint.

Approval answers, sidecar transport and selected paths are isolated fixture seams, using synthetic files/credentials, not physical consent/accessibility evidence. The two new typed native consent keys retain English fallback pending reviewed translations. Final independent correctness/spec and standards source reviews cleared the cumulative 24-file implementation against c8ce33864afefb012cc723a8484d91b3f40addd0 after all corrections; condensed documentation was checked separately by the parent. Physical/concurrent-input and native-dialog usability, packaged builds, macOS/Linux and external #34 assurance remain separate gates. This is bounded frame-aware capability; issue closure does not establish comprehensive visual assurance or Chromium/external security parity.

Unsaved-page leave confirmation (#48)

The native leave prompt is asynchronous, so a held decision does not block Electron's main event loop. Stay and cancellation preserve the current page. Leave retries only the exact user-requested address-bar navigation, history step, reload or tab close, once, after the original Chromium beforeunload veto settles and the tab/task/source checks still pass. Agent-requested closure uses the same prompt and keeps its native busy settlement until the close attempt settles; authority and deadline checks run again after the answer.

Close others and Close to right review unsaved tabs sequentially. Stay stops the batch and preserves the remaining tabs. A blocked page-requested navigation publishes a separate notice, so a successful agent operation cannot erase the guidance; the notice clears when the main document actually navigates.

Page-originated navigation has no safely replayable intent: main leaves Chromium's beforeunload veto in place and reports localized guidance to use browser navigation controls. It never retries a page link, form submission, POST, or other unknown page action. This can require the user to repeat a page link manually after addressing unsaved work; the browser cannot promise replay for those requests.

The focused isolated native fixture is bun scripts/browser-smoke.ts --leave-confirmation from packages/desktop. It exercises Stay/Leave navigation, closure, sequential bulk closure, back/forward/reload, a competing navigation, cancellation and an unknown page-originated request during a successful agent operation while measuring independent main-process timer progress. This fixture does not cover authenticated third-party pages or OS accessibility behavior.

Agent tab lifecycle (#16)

Closure validation (2026-09-21, macOS arm64): the existing implementation satisfies #16; dependency #11 is closed. The focused native fixture now waits for Electron’s actual hide event before restoring the window. Immediate hide/show skipped that event on macOS and incorrectly failed the consent-invalidation assertion. With the fixture corrected, bun scripts/browser-smoke.ts --tab-lifecycle passes on Electron 44.3.0 / Chromium 152.0.7977.78, revalidating native close acknowledgement after the Electron upgrade. Desktop browser/provider tests pass 272 tests / 3,174 expectations; the complete cm-browser suite passes 91 / 3,653; both package typechecks pass. Independent standards and correctness/spec reviews found no actionable issues. The default native smoke’s consent and window-detachment checks needed the same native hide-event wait (also applied to its vault-lock assertion). The broader run then failed outside #16 at cross-process iframe upload blocking: Chromium reported an observer-list reentrancy failure followed by Cannot find default execution context. The default suite is not claimed green. Scoped lint on both fixture files reports 63 warnings and zero errors; formatting and whitespace checks pass. Consent choices remain controlled on macOS; physical input, native-dialog accessibility, packaged builds, Linux and external #34 assurance are separate validation work, not claims of this issue’s completion.

browser_create_tab({}), browser_select_tab({tabID}) and browser_close_tab({tabID}) require their own named plugin approval and fresh default-cancel native consent for every action, independently of page-read permission. Main binds preparation to exactly one currently open task owner and its task/window epochs, active tab, target registration and source/access revisions. The global agent switch applies even with no tabs; off/on, task A-B-A, owner hide/restore and revoke/regrant invalidate pending authority. Native consent does not grant page access.

Creation accepts no URL and opens one about:blank tab with agent access off, without restoring saved tabs or making a recovery navigation. Explicit limit: an unloaded group with saved tabs or recently closed history returns typed unavailable with instructions to open the task's browser manually first. The complete saved record is preserved; nothing is merged, deleted or automatically restored. Empty or absent recovery still permits one private blank. Recovery is checked at preparation, admission and again after consent before mutation. Selection and closure require the exact task-owned ID; missing/foreign targets fail without fallback. Private tabs are not added to the agent inventory. Lifecycle results contain only the operation and opaque tab ID, never private URLs, titles, text or refs. Popup tabs remain private; closing a child does not close its opener.

Inactive tab resource use (#47)

On native session recovery, the saved active tab is restored immediately. Other saved tabs keep their saved URL, title and supported navigation history as metadata, but their renderer is not asked to load until the user selects that tab or issues a native browser command for it. Restored tabs keep Agent Access off. An explicit navigation to a dormant tab replaces its saved destination; it does not first load the old page. No provider, tool or form submission is replayed.

This is lazy restoration, not page eviction. Once a recovered page has loaded, it stays alive when inactive so its live form state, page state and history are retained. The browser does not attempt to infer that arbitrary pages are safe to discard; consequently, memory can still grow with tabs the user has already visited. The policy applies only to saved recovery tabs, not busy/transferring/loading tabs or arbitrary live pages.

From packages/desktop, bun scripts/browser-smoke.ts --resources runs an isolated Electron benchmark against 12 synthetic loopback pages. Across eight Windows runs on Electron 44.3.0 / Chromium 152.0.7977.78, eager restoration measured 12 renderer processes and 938–1,066 MiB combined renderer working set; restoring only the active saved tab measured 1 renderer and 80–88 MiB before selecting an inactive tab (11 remained dormant). The paired working-set difference was 855–978 MiB. The fixture also sampled 0% aggregate renderer CPU in these short samples; this is not an energy or sustained-CPU result. These are synthetic, process-memory observations, not guaranteed savings or packaged-app measurements; renderer assignment and memory vary by platform and runtime. Selecting a dormant tab loaded its saved destination, restored its prior history entry on explicit Back, and kept Agent Access off. A separate CDP lifecycle-freeze trial did not suppress synthetic hidden-page timers beyond Chromium's background throttling and showed no memory reduction, so no freeze policy ships.

Preparation tokens are main-only, one-use, action/target/task-bound, expire after 60 seconds and are capped at 128 with oldest eviction. Each execution has the existing 15-second operation deadline. Closure waits for actual native destruction or unload veto and never force-closes. Stay preserves the page; Leave is rechecked against the original authority and absolute deadline after the asynchronous prompt returns, before the guarded one-shot close described in #48. Preparation checks both the active source and target for busy state but holds no lease during plugin approval. Admission atomically checks and reserves each distinct source/target in the shared page-operation busy set before native consent can detach the source. Busy sources reject creation and other-target selection/closure before prompting. Pending lifecycle work blocks source reads, preparation, input and screenshots; no owner-lock bypass grants page authority. An early cancellation reply cannot recall dispatched native work: owner, distinct source/target busy and rendering leases, and bridge correlation ownership remain until actual native settlement. Cleanup releases only the acquired leases. Duplicate in-flight correlation IDs are silently ignored. Input quarantine rejects selection but permits separately consented closure, still subject to unload confirmation.

From packages/desktop, bun scripts/browser-smoke.ts --tab-lifecycle selects only this fixture in the isolated runner. On Windows on 2026-09-17, desktop bun typecheck passed before the serial native run, which passed on Electron 42.3.3 / Chromium 148.0.7778.218. The real plugin, bridge, router, owner and tabs exercise blank/private creation with zero recovery requests, exact targets, separate asks, denied/aborted consent, token reuse/mismatch/TTL/cap, global/task/window/viewport/access invalidation, revoke/regrant during plugin approval, private popup closure and quarantine recovery.

Trusted Electron mouse input arms an actual Chromium beforeunload handler. Real unload events exercise Stay, Leave and expired Leave; dialog choices are controlled, and expiry uses a fixture clock advance inside the synchronous dialog seam. A real debugger-paused renderer holds native close completion across cancellation: busy/render/correlation remain held until resume produces the actual veto, with one reply and no duplicate route or close. One real unparented Windows lifecycle consent dialog remains pending with its owner enabled, then closes through AbortSignal cancellation with zero mutation. Other consent responses are stubbed; the sidecar endpoint is an in-memory emitter. No synthetic emitted unload event is counted as native evidence.

Cumulative-finding regressions on 2026-09-17 were run RED before the production fixes: the native fixture showed both saved URLs, selected index and recently closed history replaced by a blank record; bun test src/main/browser/router.test.ts --test-name-pattern "tab lifecycle|cancelled tab" reported five failures exposing missing source admission/leases. After only the recovery fix, the native fixture separately failed screenshot must block create_tab admission while holding a real CDP capture result. These now pass. Recovery assertions compare complete before/after records, including closed-only recovery introduced after preparation, with zero recovery requests. No saved record is deleted to satisfy the test.

The expanded native fixture holds acknowledgements after actual Page.captureScreenshot and native keyDown execution; it is not a simulated busy flag. All three lifecycle actions reject at preparation/admission with no new prompt or source detachment. The screenshot is cancelled before delivery: no image/base64 is posted or saved. Controlled pending lifecycle consent blocks distinct-source read/preparation/screenshot/input in the opposite order, before and after early cancellation. The paused-renderer close verifies both distinct source and target busy/rendering leases remain until the real native veto. Unit source-busy cases use registered stubs and explicit busy flags; they are not native evidence.

After the fixes: bun test src/main/browser/ passed 154 tests / 2,234 expectations; desktop bun typecheck and serial bun scripts/browser-smoke.ts --tab-lifecycle passed. From packages/cm-browser, bun test passed 76 / 1,155; from packages/app, bun test src/i18n/desktop-native.test.ts passed 9 / 458. Fixture-only type errors and an outdated prompt-count assertion were corrected before the passing run.

Permission-revocation follow-up on 2026-09-17: the test-first native regression timed out waiting for replacement of the document holding two live fake camera/microphone tracks. Calling safety reload() during an outstanding agent close made the reload veto indistinguishable from the close veto. Merely deferring from will-prevent-unload with setImmediate also intermittently lost the reload; those failed/timeout runs are not passes.

Permission changes and site-data clearing now queue the safety reload while native close is outstanding. Revocation invalidates the close authority without overriding its veto. Settlement waits for actual destruction or Electron's close-only -before-unload-fired veto acknowledgement, then leaves that callback before independently reloading a surviving tab. Busy/render/correlation ownership remains through native close settlement; competing manual close/navigation/back/forward/reload/stop commands reject during agent close or safety-reload dispatch. During the attempt's loading phase, Stop is permitted once native main-frame loading is active; the other commands remain blocked until the attempt stops. A retained revocation obligation alone does not block manual recovery. Only a main-frame replacement-document commit (did-navigate) clears the reload obligation, never a navigation start or same-document hash/history change. Page-initiated cross-document main-frame navigation is blocked during the close. Cleanup is idempotent and removes the close listener; destroyed tabs receive no reload. No agent replay, release gesture or input-quarantine reset is added.

Same-document follow-up (2026-09-17): before this correction, the native hash regression failed Safety reload after hash with 0 !== 1 after actual native close-veto settlement. Two earlier paused-renderer attempts did not produce the required same-document navigation and are not bug-specific RED evidence. The final hash and history.pushState cases hold the native close invocation at a fixture seam, revoke permissions, perform real same-document navigation, verify its main-frame start precedes acknowledgement and the old document still holds two live fake tracks, then dispatch the real Chromium close. Both now pass: zero pre-acknowledgement reloads, a surviving tab, exactly one independent safety reload, replacement of the old document/stream globals, denied reacquisition, two separate unload veto events, one reply and eventual lease/listener cleanup. These two cases hold dispatch, not an already-running renderer close; the earlier paused-renderer regressions remain. After formatting, bun typecheck && bun scripts/browser-smoke.ts --tab-lifecycle passed the complete focused fixture on Windows / Electron 42.3.3 / Chromium 148.0.7778.218. History was GREEN but not separately witnessed RED; failed cross-document navigation was not separately exercised.

The expanded focused fixture passes revocation, cancellation plus revocation, and held cancellation-to-destruction on Electron 42.3.3 / Chromium 148.0.7778.218. It asserts native acknowledgement precedes reload, two distinct unload events for surviving tabs, exactly one close/reply, retained source/target busy ownership, manual-command rejection and listener cleanup. Actual fake-device getUserMedia supplies two initially live tracks. A committed reload with cleared document/stream globals and denied reacquisition witnesses old-document disposal; the test does not directly observe a track ended event or physical devices. The destruction case uses a non-vetoing beforeunload handler and proves zero safety reload calls. A fixture-only unclonable function return was corrected before the passing run. Desktop bun typecheck and bun scripts/browser-smoke.ts --tab-lifecycle passed; bun test src/main/browser/router.test.ts src/main/browser/registry.test.ts passed 83 tests / 683 expectations.

The internal acknowledgement is not a public Electron API: its close-only semantics were checked against Electron v42.3.3 shell/browser/api/electron_api_web_contents.cc and lib/browser/api/web-contents.ts; revalidate on upgrades. A renderer that never acknowledges or dies can retain close ownership and delay the queued safety reload; this is not instantaneous revocation of already-dispatched work. Physical-dialog acceptance, keyboard/screen-reader, naturally timed expiry, packaged-app and macOS/Linux assurance remain unverified. No live user pages, provider artifacts, installed-process changes or root-wide lint are involved in this follow-up. The parent's earlier full-native run (350, as reported by the parent) predates these fixes; the post-correction default full-native run recorded below supersedes that pending-run note. The new recovery copy uses typed native i18n with English fallback; translations and the separate consent standards refactor remain follow-up work.

HTTP 204 recovery correction (2026-09-17): the test-first native case retained the old live-media document after a 204 safety reload, then failed manual retry with Another browser operation is still running. Production now separates the persistent permissionReload obligation from permissionReloadPhase (dispatch/loading). The phase is set before calling native reload, advances only on cross-document main-frame navigation start, and clears on did-stop-loading after that start (or synchronous dispatch failure). The obligation still clears only on replacement-document commit. Forced unload handling applies only to an active safety attempt, never merely to an outstanding obligation or pending agent close. Manual retry explicitly starts another safety attempt; no automatic retry is added.

Both new native variants pass with actual fake camera/microphone tracks: ordinary permission change and permission change during an early-cancelled, debugger-paused agent close. HTTP 204 preserves the live document and obligation; retry and navigation are admitted after settlement, manual close respects Stay, Stop cancels a held response, and disconnected-response recovery remains usable. Eventual replacement clears the obligation and denies media reacquisition. Reentrant commands at the reload-call seam verify no synchronous pre-dispatch gap. A 204 loadURL rejects with expected ERR_FAILED; that fixture expectation was corrected after the first post-fix run. Disconnect checks emitted expected ERR_EMPTY_RESPONSE; if Chromium retains the old document, the obligation must remain. These tests do not establish immediate termination of already-live media after 204 or Stop: disposal still requires replacement or closure.

After formatting, two inadvertently concurrent invocations of bun typecheck && bun scripts/browser-smoke.ts --tab-lifecycle both passed; these are not claimed as serial runs. One subsequent serial default bun scripts/browser-smoke.ts also passed, including ordinary permission, beforeunload, snapshot, access-review, vault and download checks. Its output included the expected fixture ERR_EMPTY_RESPONSE and a Chromium Mojo diagnostic. The default run is separate from the focused lifecycle fixture. No broad unit suites were repeated for this correction; the parent's 154 browser / 2,234 expectations and 76 plugin / 1,155 expectations remain earlier evidence, not post-correction reruns.

Queued permission-request correction (2026-09-17): the saved post-commit regression was run before production changes. Its first run failed in fixture cleanup with ERR_HTTP_HEADERS_SENT because the held subresource was released twice; that is not bug-specific RED. After making release one-shot, the same command failed Post-commit revocation must dispatch exactly one fresh safety reload with 1 !== 2. The first reload had committed and acquired two live fake media tracks while a subresource remained held; two subsequent production site-permission commands coalesced but were never dispatched after loading stopped.

Production now keeps one permissionReloadQueued bit separate from the persistent obligation and active dispatch/loading phase. New permission/site-clear requests mark queued work; dispatch consumes it before calling native reload, preserving the reentrant dispatch lock. A main-frame document commit covers all pending prior changes, including requests received before that commit, and clears both obligation and queue. Without a commit, a newer queued request still needs one attempt after native loading stops. An already-attempted 204/Stop retains the obligation but does not automatically retry; manual reload explicitly requests another attempt. Native-close settlement only drains existing queued work, never invents a fresh revocation. Held-close acknowledgement and busy/render/correlation ownership are unchanged.

After correcting a fixture-only callback-narrowing type error, desktop bun typecheck followed by serial bun scripts/browser-smoke.ts --tab-lifecycle passed. After adding pre-commit coverage and formatting the two owned TypeScript files, both commands passed again, serially, on Windows / Electron 42.3.3 / Chromium 148.0.7778.218. GREEN covers post-commit success/204/Stop with coalescing, no failed-attempt replay and explicit manual recovery, plus pre-commit requests absorbed by a commit or attempted once after a first 204/Stop. Only the post-commit success variant was separately witnessed RED; the other five variants were GREEN coverage, not separate RED runs. The pre-commit cases hold real HTTP responses and count real document commits; they do not acquire media. Existing held-close, same-document, reentrant-dispatch and recovery regressions also passed. Expected disconnect checks emitted ERR_EMPTY_RESPONSE. Root-scoped bunx --no-install oxlint packages/desktop/src/main/browser/tabs.ts packages/desktop/src/main/browser/tab-lifecycle.fixture.ts reported 13 warnings and zero errors.

Final parent verification after the queued-request correction (2026-09-17): from packages/desktop, bun test src/main/browser/ src/main/wpp-bridge/proxy/providerConfig.test.ts passed 169 tests / 2,313 expectations, followed by one serial default bun scripts/browser-smoke.ts PASS. The default run emitted the expected fixture ERR_EMPTY_RESPONSE and Chromium Mojo diagnostic; it is separate from the focused lifecycle run above. From packages/cm-browser, bun test passed 76 tests / 1,155 expectations. Cumulative source reviews against 564ccd13d22033173563354ba08fc395f33deeb6 cleared all 16 task files on both correctness/spec and documented standards. Consent-plumbing duplication remains a deliberately deferred non-blocking heuristic. No root-wide lint was repeated.

A stalled load or unacknowledged native close can still delay queued work, and 204/Stop can retain live capture until replacement or closure. Fake-device document/global replacement and denied reacquisition are not direct track-ended, physical-device, packaged-app or macOS/Linux assurance. Configuration/model, installed processes and excluded files remain untouched.

Scoped agent console diagnostics (#25)

browser_observe_console({tabID, durationMs}) counts future console events by severity for one opted-in, task-owned tab. The interval defaults to 3 seconds and is bounded to 250–5,000 milliseconds. The tool uses the whole-tab grant without separate read, tool or native observation approval.

The response contains only debug, info, warning, error, other, and total integer counts. Production never reads, stores, logs, or returns the console message, its arguments, source URL, line number, or stack. This is redaction by construction rather than a text scrubber. Network requests, URLs, headers, bodies, cookies, storage, DOM content, vault data, passwords, autofill values, DevTools targets, and CDP are outside this console tool. Network observation is a separate operation below; neither operation exposes unrestricted debugging.

Preparation binds the exact tab, source URL hash, source and access revisions, tab grant, session, owner, and task epoch across preparation, observation and final delivery. Navigation, loading, access revocation, task/window ownership change, registration replacement, global disable, cancellation, deadline, or policy change fails closed. Main holds per-tab busy and rendering ownership while the listener exists and always removes the listener on success or failure. The operation never blocks user navigation and never retries.

Synthetic unit/router checks cover exact protocol bounds, denied/malformed output, owner/source invalidation, credential-bearing message/source sentinels, cancellation cleanup, and count-only delivery. bun scripts/browser-smoke.ts --diagnostics uses a temporary hidden Electron window and real Chromium console events; it passed on Windows / Electron 42.3.3 / Chromium 148.0.7778.218 on 2026-09-18. The native run proves event-level mapping and listener cleanup, not physical-dialog, accessibility, packaged-app, macOS/Linux, authenticated-site, or external security assurance.

Bounded network counts

browser_observe_network({tabID, durationMs}) counts HTTP(S) Fetch/XHR terminal events received during a 250-5,000 ms window, defaulting to 3,000 ms. It uses the same whole-tab grant as console observation, without another tool or native approval. The same source/task/access/owner checks apply through final delivery. Diagnostics neither require nor grant vault access; unlocking the vault does not authorize diagnostics.

Only events attributed by Electron to the captured live main frame and exact WebContents are eligible. Other tabs, separately attributed child frames, missing frames and detached frames are excluded. Ancestor-attributed dedicated-worker traffic and requests initiated before approval may count. This is not document-only traffic or post-approval request-start tracking. Cache, service-worker and native interception paths can omit events; zero counts do not establish page health or complete network coverage.

Output contains durationMs, http1xx through http5xx, other, failed and total. HTTP 4xx/5xx are completed responses, not transport failures; abort/error terminal events increment failed. Redirect hops are not tracked. Collection reads only attribution, resource type and completed status, never request URLs, referrers, headers, bodies, cookies, credentials or raw errors. Rich Electron event objects are neither retained nor returned. No request history, request-ID map, background collector, CDP attachment or unrestricted CDP tool is added.

One dispatcher owns the browser Session onCompleted/onErrorOccurred slots while approved observers exist. Cancelling one observer leaves others active; the last observer removes the handlers. These slots must remain exclusively owned by this dispatcher because Electron replaces earlier listeners. Other Sessions are unaffected. Each event checks authority and a monotonic receipt cutoff before reading its fields.

Final local verification on Windows, 2026-09-19, against the worktree based on 4536d8daf629a031b77de1294bfb7b51a7c9d7fa: desktop typecheck and tests passed (533 pass, 1 skip, 3,691 expectations); app typecheck and native-i18n tests passed (11 pass, 471 expectations). The earlier cm-browser typecheck, tests (88 pass) and bundle build passed; plugin source was unchanged by the final review fixes. The expanded isolated --diagnostics fixture passed real Fetch/XHR 2xx/4xx/5xx, final redirect response, transport failure, abort, foreign-tab/same-origin-child exclusion, shared-Session cancellation, already-in-flight completion and changed-source rejection. It uses synthetic loopback traffic and disposable windows, not real accounts. Unit/router/bridge checks cover consent denial, stale authority, privacy getters, malformed output, translated failure sanitization and final-delivery races.

After final formatting, focused diagnostics and then one full native smoke passed sequentially on Chromium 152.0.7977.78. The full run emitted the fixture ERR_EMPTY_RESPONSE, a Mojo Widget diagnostic and an ObserverList reentrancy check diagnostic despite completing successfully; this is not a warning-free or crash-free assurance claim. Scoped root oxlint over the 24 changed code files reported 175 warnings and zero errors, including fixture assertions and existing code. Formatting and whitespace checks passed. Independent Standards review found two issues, corrected with a typed error key preserving English and inline early-return status classification. The independent Spec worker failed to start; the parent reviewed the permission, collection and delivery boundaries instead, not an independent security audit.

These results do not verify physical network-consent usability/accessibility, cross-origin/OOPIF or worker attribution fixtures, cache/service-worker completeness, packaged builds, macOS/Linux, authenticated third-party sites, reviewed translations or external security assurance. New consent strings use the existing typed English fallback. Implementation completion is not release approval: platform/authenticated-site validation remains tracked under #19 and password-manager security assurance under #34. Broader CDP still requires a separate reviewed design.

WebMCP site tools (#26)

Electron 44.3.0 / Chromium 152 provides the experimental WebMCP runtime used by browser_list_site_tools and browser_execute_site_tool. Discovery exposes at most 32 tools registered by the current top document. It returns opaque refs plus bounded names, descriptions, input schemas and safety hints. Registration stack traces, DOM node IDs, frame IDs and cross-origin child tools are not exposed. All site metadata is labelled untrusted; it is data for choosing a tool, never an instruction to the agent.

Execution accepts one JSON object up to 8 KiB, with bounded depth and entry count. It uses the whole-tab grant without per-tool or native confirmation. Main binds the opaque tool ref, registration revision, argument hash, source URL, origin, access revision, owner and task across dispatch. Tool removal or replacement, navigation, loading, access revocation, owner changes, cancellation or deadline fail closed. CookieMonster invokes Chromium's WebMCP domain directly and exposes no general CDP tool.

Results are capped at 16 KiB and explicitly returned as untrusted site content. Website-supplied read-only or non-consequential hints do not grant authority; every call still requires the tab grant. Cancellation sends Chromium WebMCP.cancelInvocation. The Chromium 152 protocol calls successful completion Success; the current CDP draft calls it Completed, and the adapter accepts only those two terminal states.

Unit and router fixtures cover malicious metadata, child-frame omission, stale registration, access revocation, exact consent details, cancellation and bounded untrusted results. bun scripts/browser-smoke.ts --site-tools runs a temporary origin-isolated loopback site against real Electron/Chromium and covers discovery, execution, cancellation, navigation invalidation and removal. It passed on Windows / Electron 44.3.0 / Chromium 152.0.7977.78 on 2026-09-18. WebMCP remains experimental and subject to Chromium/spec changes. This evidence does not establish physical-dialog accessibility, authenticated third-party sites, packaged builds, macOS/Linux behavior or external security assurance.

Agent screenshots (#15)

Closure validation (2026-09-22, macOS arm64): screenshots now require the selected, natively attached tab before consent and throughout capture/delivery. Detached requests reject with zero native prompts/captures and release busy state without reattachment. This closes the known detached-start stall; changing selection or removing the native view during held capture/post also rejects disclosure. Already-dispatched native work still retains leases until actual settlement. The focused suite passes 26 capture/post rejection cases and real JPEG/pixel/size/zoom/DPR checks on Electron 44.3.0 / Chromium 152.0.7977.78. The isolated screenshot runner fixes its color profile to sRGB for portable synthetic swatches; production color behavior is unchanged. Owner-hide tests await the native event before restore. Desktop browser/provider tests pass 272 / 3,174 expectations; the complete cm-browser suite passes 91 / 3,653. Both package typechecks, separate default native smoke, formatting and whitespace checks pass. Scoped lint reports 71 warnings and zero errors across the four changed code files. The default run still emits the previously observed Chromium observer-list diagnostic; its cause is not established. No native copy or locale implementation changed; the unrelated pa-PK i18n failure recorded under #17 was not rerun. Independent correctness/spec and standards reviews found no actionable issues. One intermediate focused rerun exhausted the overall harness after the post owner-crash case; its cause was not established. A diagnostic repeat and the final focused run passed. Hold setup now races the operation reply and destroys only the fixture window on setup failure, so an early error reports its phase/code instead of waiting indefinitely for an unreached hold.

browser_screenshot({tabID}) requires a selected, attached, task-owned opted-in tab and source/access-bound prepare_write. The whole-tab grant includes visible pixels; no per-capture tool or native confirmation is required. Private tabs, including new pop-ups, cannot be captured; manual screenshot-to-draft is unchanged.

This shares all visible pixels, including passwords, editable values, canvas and cross-origin frames. No redaction or DLP is performed. Output is one JPEG attachment plus tab, exact source URL and raster dimensions, without DOM text/refs or base64 in textual output. There is no screenshot file, cache or temporary output in this capture path; a posted attachment may be retained in chat and cannot be recalled.

One fixed viewport-only Page.captureScreenshot uses JPEG quality 60, fromSurface: true, captureBeyondViewport: false. No scrolling, resizing, clips, arbitrary JavaScript, full-page capture or retries. Viewport preflight and decoded raster checks enforce 4096 per edge and 4,194,304 pixels; pixel dimensions are validated after native decode, not a predecode hard allocation guarantee. JPEG is at most 46,080 bytes / 61,440 base64 characters. Complete UTF-8 success JSON, including the exact URL, must still fit 65,536 bytes. Oversized images fail, never truncate.

Preparation, capture and delivery share at most 15 seconds. Main checks original registration, owner, source/navigation and access epochs, loading, global access, tab grant, cancellation and quarantine around awaits. Screenshots never veto user navigation. Pending capture aborts on existing revocation/navigation/unregister hooks; revoke/regrant and A-B-A navigation cannot revive a capture. Busy/rendering ownership lasts until native settlement after early cancellation/timeout. Immediately before sidecar post, the bridge requires the original captured authority guard; failure delivers only a generic typed error.

From packages/desktop, bun scripts/browser-smoke.ts --screenshots runs the focused isolated Electron fixture with two loopback origins and no real user pages. On Windows / Electron 42.3.3 on 2026-09-16, real CDP JPEGs decoded locally with unredacted green editable-field background, magenta revealed-value glyphs, red canvas and blue cross-origin iframe pixel assertions. At native device scale 1.25, zoom 1 and 1.25 produced 750x500 rasters (7,772 and 8,918 bytes); emulated device scales 1 and 1.5 produced 600x400 and 900x600 rasters (5,559 and 10,157 bytes). Scroll and layout were unchanged across each capture. A selected tab covered by another inactive fixture window also passed decoded-pixel checks without changing the focused Electron window.

Background-tab behavior: select the tab in its task’s browser panel before requesting a screenshot. Main rejects detached or nonselected tabs before native consent/capture, checks actual native view membership, and rechecks after consent cleanup and through delivery. Earlier Windows/macOS tests could start detached captures that timed out and held busy/rendering state until manual reattachment; that startup path is now refused, not automatically retried or selected. Detaching after native capture starts can still delay settlement, but cannot authorize image delivery. The runner disables CalculateNativeWinOcclusion; its checks do not establish unmodified OS-occlusion behavior.

Native 4097x100 and 2048x2049 emulated viewports fail preflight with zero captures. A fixture-only small preflight override lets their real oversized JPEG rasters reach the production decoder and fail after one capture, below the byte budget. A seeded high-entropy canvas produced 126,155 JPEG bytes and failed after exactly one capture, without retry. A real overlong history URL rejects the complete response; every observed bridge response is bounded to 65,536 bytes. Exact byte/edge/pixel/UTF-8 boundary tests remain in the protocol unit suite.

Historical fixture record: the actual router, tab consent handler and attachBrowserBridge ran in the fixture; only the sidecar endpoint was an in-memory emitter. Private/wrong-task requests caused no prompt/capture. Controlled dialog responses verified default/cancel index zero, per-capture prompts, disclosure copy, denial and abort with zero capture, including plugin permission Allow. These per-capture consent checks describe the earlier implementation and do not apply to #37. Deterministic holds after real native capture and between route response and actual bridge post exercised revoke, revoke/regrant, A-B-A navigation, same-ID unregister/re-register, global disable, policy denial, cancellation and deadline: exactly one error reply and zero delivered images. Early cancellation/timeout retained rendering, tab busy state and bridge correlation ownership until native settlement. Registry replacement used a fixture-owned alias of the real WebContents and stub consent; host policy changes used the router's predicate seam.

One bounded real unparented Windows consent dialog remained pending, left the owner enabled, and cancelled through its AbortSignal with zero captures. Other approvals are controlled, not physical clicks; keyboard, screen-reader, packaged-app, macOS/Linux and naturally timed race usability remain unverified. JPEG/base64/bitmap data stays inside the fixture process, with no image files or provider/parent image output. No installed app/server/bridge restart or deployment occurred. This is native evidence with an explicit background limitation, not a clean red-green claim for the saved overlapping code/unit implementation.

Current-tree verification rerun on 2026-09-16 preserved screenshots.fixture.ts and made no production changes. Serial checks: desktop bun typecheck passed, then bun scripts/browser-smoke.ts --screenshots completed with PASS screenshots and PASS native browser smoke, including all 16 capture/post rejection cases and real Windows dialog cancellation. Detached-background capture again reported LIMIT at the fixture's 1.5-second deadline; selected-covered capture passed. The run emitted a Chromium Mojo diagnostic. Desktop bun test src/main/browser/driver.test.ts src/main/browser/router.test.ts --test-name-pattern screenshot passed 20 tests (0 failures, 153 expectations); cm-browser bun test test/protocol.test.ts test/tools.test.ts --test-name-pattern screenshot passed 3 tests (0 failures, 36 expectations). No full native suite or root lint was run.

Snapshot semantics (#14)

Snapshots use fixed top-frame code in a dedicated CDP isolated world, not page JavaScript or raw AX output. Naming is a pragmatic subset: same-root aria-labelledby (up to eight IDs), aria-label, native labels (up to eight), image alternatives, safe content, then title/placeholder fallback. Value-only submit/reset/button labels are deliberately omitted. It is not the full accessible-name algorithm. Native checkbox/radio and option states take precedence over ARIA; supported custom roles expose checked (including mixed), selected, expanded and disabled states. Disabled controls remain visible but ref activation is refused.

Capture visits at most 4,000 body/open-shadow nodes, with depth 64, a shared 4,000 naming/text-node visit budget and 48,000 text-character read budget. Output caps are 200 controls, 160 characters per name/text, 256 title characters and 12,000 aggregate text characters; main reenforces output bounds and reports truncation. Aggregate traversal visits light children once. Naming follows automatically assigned projected text/elements and nested open roots by scanning host light children for actual assignedSlot identity, sharing the naming budgets and seen set without allocating assignment arrays. Automatic slot fallback is used only after a complete scan proves no assignments; exhaustion marks truncation instead. Manual slot projection naming is unsupported: its contribution (including slot fallback) is omitted with truncation rather than guessed from DOM order. Title/placeholder fallback cannot replace an otherwise empty name after that omission; safe explicit names such as aria-label remain supported. Aggregate text traversal is not a guarantee of rendered projection order. Closed roots and iframes are excluded; noninteractive shadow content is best effort and does not imply a ref. Browser-native layout/DOM methods are synchronous and not preemptable; these are traversal/output bounds, not a hard renderer CPU bound.

Input/textarea values and editable content are never read as names, aggregate text or identity, including username, OTP, revealed-password fields, label descendants and editable shadow-host ancestry. Explicit page-provided labels and ordinary text are still untrusted content: a website can deliberately mirror secrets into them. This is not general data-loss prevention.

Refs bind tab/snapshot, document generation and actual node identity through isolated-world WeakMap tokens, with weak node/DOM-root/composed-ancestry references for ten retained snapshots. Generation/node tokens use 128 random bits from crypto.getRandomValues, including on insecure HTTP pages. Fill additionally requires the saved and current writable kind to match: supported input type, textarea or contenteditable mode. Changed text-to-submit, readonly, noneditable and fresh unsuitable targets fail before any click/key dispatch; an explicit click remains separate. Names, positions, selectors and ordinals are not identity. Reordering within unchanged ancestry may keep the original ref usable; identical replacements, currently disconnected nodes, changed ancestry/roots/hosts and missing mappings fail closed. Before coordinate input, the original node must remain visible, enabled and the composed-tree center hit target (or its ancestor). Covered/clipped centers fail closed. These checks are not atomic with subsequent native dispatch, do not track every transient DOM mutation between samples, and do not guarantee that page handlers retain the same meaning. Existing source/access epochs, cancellation settlement and input quarantine remain authoritative.

From packages/desktop, bun scripts/browser-smoke.ts --snapshots exercises production router snapshots and plugin rendering with synthetic sentinels, native/custom labels and states, duplicate reorder/replacement click witnesses, nested roots/slots/host changes, moved ancestry, disconnection, overlays, mapping eviction/loss, main-world monkeypatches and deep/multibyte output. The default full smoke also runs this fixture. These are isolated Windows Chromium checks, not packaged-app, physical-input, screen-reader, macOS/Linux or external security assurance.

Verification

From packages/cm-browser: bun test, bun typecheck, and bun run build.

From packages/desktop: bun test src/main/browser/, bun typecheck, and bun scripts/browser-smoke.ts.

The native smoke script launches a separate Electron process with temporary user/session data and a loopback fixture server. It does not start the app or sidecar. It checks retained pages, session switching, navigation, pop-ups/opener behavior, cookie isolation, agent opt-in, real foreground/background input, stale references, failed-load recovery, context capture, overlay visibility, cancelled/confirmed tab closure, and download success/cancellation/interruption. Download tests assert Save dialog configuration, then choose a temporary destination programmatically; the native chooser itself still needs interactive verification.

From packages/app: bun typecheck, bun test --conditions=solid --preload ./happydom.ts ./src/components/browser-panel, and bun run test:browser. The mounted settings regression covers main eligibility versus displayed URL, absent/loading metadata, guarded-but-revoked tabs, default/exception policies, no upload Allow option, no grant on opening, and global/tab revocation during a pending grant command.

The focused desktop bun scripts/browser-smoke.ts --access-review also runs in the full smoke. It holds a streamed replacement document before dom-ready, verifies rejected input with zero driver input dispatch, checks commit identity and recovery, and exercises native long history URLs through plugin approval. Consent API-shape/serialization/late-answer checks use controlled responses. A separate Windows check opens the real native grant dialog, asserts the owner window remains enabled, and uses Electron mouse input on a fixture renderer Cancel button to abort the grant. This is not physical mouse, packaged settings layout, keyboard/screen-reader, macOS or Linux usability proof. See Password security for the verification record and evidence limits.

Final complete #11 source review ses_f5905c6a3ffeYlhAvgmZBvPSmg on 2026-09-16 covered all 21 tracked changes and the new mounted settings test against 80d7a6b2a, with no actionable findings after the destination-policy race and whole-response UTF-8 budget fixes. The destination witness uses a deterministic cancellation seam with real temporary main policy and zero observed destination requests, not naturally timed Chromium cancellation. Real Chromium history mutation produced a 65,568-byte URL and 84-byte page/list failures, followed by successful plugin-approved short navigation. Windows consent used the real unparented native dialog and Electron-injected renderer Cancel, not physical input. Source review and these fixtures do not establish packaged layout, keyboard/screen-reader, macOS/Linux usability, verified localization or external security assurance; #11 remains open for those evidence gaps. Missing bindings fail closed and main/plugin must ship together. Publication updates review evidence only; completed feature checks remain applicable.

Optional public-site smoke checks

From packages/desktop, set CM_BROWSER_LIVE_SMOKE=1 and run bun scripts/browser-smoke.ts. It uses a fresh temporary Electron profile, visits Example Domain, httpbin's form and Teams' unauthenticated entry, opens a public popup and downloads a synthetic httpbin attachment. It does not use real account sessions, submit credentials, restart the app, or alter the running profile. Public network/service availability can fail this optional check. Authenticated Teams flows, real OS picker interaction and macOS require separate interactive verification.

Website-consent regression: from packages/desktop, run bun scripts/browser-smoke.ts --site-access. This uses real Chromium and native tab commands with simulated dialog acceptance to verify empty legacy allowlists, private sibling tabs, blank tabs, same-site navigation, cross-site navigation and redirects retaining the grant, revocation and private reopening.