Skip to content

Add tab awareness without the debugger banner (AGE-584) - #257

Merged
cursor[bot] merged 3 commits into
mainfrom
cursor/age-584-tab-awareness-ae3c
Oct 27, 2026
Merged

cursor[bot] merged 3 commits into
mainfrom
cursor/age-584-tab-awareness-ae3c

Conversation

@tedjames

Copy link
Copy Markdown
Member

Summary

Tab awareness MVP for AGE-584, on current main. One PR rather than a stack: the five slices share the service worker, connector, and capability gates, and each slice is called out below so it can be reviewed in order.

Chrome debugger banner is never hidden. No silent-debugger flag, policy, or bypass. listTabs, readTab, navigateTab, softClick, and softType do not call chrome.debugger. They do not call tabs.update({active:true}) or windows.update({focused:true}).

chromeTabId (from chrome.tabs) and DevTools-connected tabId stay separate in the tool descriptions, even when Chrome happens to use the same integer. Existing DevTools tools, including navigateBrowser, are unchanged.

1. Contracts and ID model

MCP schemas and descriptions live in browser-tools-mcp/src/tabs/contract.ts. listBrowserTabs / navigateBrowser are labeled as DevTools-connected. The new tools say chromeTabId is not a tabId.

Coverage sentence, exact:

Tabs the browser exposes through chrome.tabs in the windows it returns. Other Arc Spaces, Little Arc, pinned favorites, split-view partners, and slept tabs may be missing. Incognito is skipped. This is not every open tab.

2. listTabs

Service worker → connector → MCP → CLI (browser-tools listTabs) on the same invoke path as the other tools. Metadata only: windows and tabs the browser returns. Incognito is skipped. The exclude list is applied in the extension and again in the connector. Discarded tabs are reported asleep and are not reloaded.

3. navigateTab

Background only, gated like input: popup switch plus --allow-input / CLI --allow-actions. Creates a tab with active: false or updates an existing one with {url, active: false}. Limited to the visible normal window until Arc Spaces are measured (AGE-618). Reports final URL, whether a tab was created, and tabs that opened alongside it.

4. readTab

chrome.scripting.executeScript in the isolated world. No debugger. Discarded → asleep, no reload. Frozen → skip. chrome://, the web store, and pdf are refused. Loopback is already in the manifest (permissions.contains does not report those). Other origins need the popup button "Allow reading pages you have open" (<all_urls>), which is a user click. Secrets are scrubbed in the page and again in the connector.

5. softClick / softType

Main world so the native value setter and execCommand('insertText') reach React-style inputs. Outcome is worked or needs a real gesture (file picker, clipboard, popup, fullscreen, untrusted submit/link/checkbox, Google Docs/canvas, anti-bot, covered or missing box). trusted is always false. Submit uses form.requestSubmit(), not form.submit().

Tests

  • Unit: contracts, listing normalize, extension VM (safety wrapper, visible-window refuse, asleep read, loopback host access).
  • Integration: fake extension through connector, MCP, and invokeTool (CLI parity).
  • E2E in CI Chromium, DevTools closed: list, background navigate, read, file-picker gesture, type+submit. Asserts the active tab id, URL, and window do not change, the extension safety counters stay at 0 debugger calls and 0 focus changes, and chrome.debugger.sendCommand fails on both the original tab and the new tab (this extension never attached). Playwright's own CDP session marks targets attached; that is not chrome.debugger.attach.

On this branch: npm run typecheck, unit+integration 583 passed, e2e 73 passed. No npm publish, tag, or release.

Arc validation still open (Ted, Mac)

AGE-618 cells are still unmeasured. Until a probe shows tabs.update({active:false}) / tabs.create({active:false}) in another Space does not switch Space, background navigate stays in the visible window. listTabs must not be treated as every open tab: other Spaces, Little Arc, pinned favorites, split-view partners, and slept tabs may be missing. Incognito is skipped. Host access beyond localhost needs the user to click the popup grant. Soft worked means untrusted events were delivered, not a trusted user gesture. No background screenshots. Real-input debugger fallback (AGE-614) and agent browser (AGE-615) are out of scope. Security review of the soft-input and navigate gates is still an AGE-584 done-when item.

Open in Web Open in Cursor 

cursoragent and others added 3 commits October 27, 2026 04:36
listTabs, readTab, navigateTab, softClick, and softType use chrome.tabs
and chrome.scripting. They do not attach the debugger or change focus.
chromeTabId stays separate from the DevTools-connected tabId. Background
navigation stays in the visible window and is gated like other input.
Soft click and type report worked or needs a real gesture.

Co-authored-by: werbel.ted <werbel.ted@gmail.com>
Opening a tab had no live page, so the restricted-page check on navigate
did not run. chrome:// and the Web Store are refused there too. An http(s)
PDF can still load.

Co-authored-by: werbel.ted <werbel.ted@gmail.com>
The submitted page can still be loading when listTabs runs, so the title is
the URL. Poll until the title is present.

Co-authored-by: werbel.ted <werbel.ted@gmail.com>
@cursor
cursor Bot force-pushed the cursor/age-584-tab-awareness-ae3c branch from 2861741 to cfe0346 Compare October 27, 2026 04:36
@cursor
cursor Bot merged commit 2b30d11 into main Oct 27, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants