From 70383626dd010afa069047ee526eb54d4068a4f9 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 27 Oct 2026 03:56:07 +0000 Subject: [PATCH 1/2] Prepare 2.0.5 for the browser-tools CLI The 2.0.4 npm publish was cut from 936272d and does not include the CLI. Bump the published packages and record CLI parity, navigate, and the capability gates from #251. Co-authored-by: werbel.ted --- CHANGELOG.md | 36 +++++++++++++++++++++++++++++++ browser-tools-mcp/package.json | 2 +- browser-tools-server/package.json | 4 ++-- package-lock.json | 7 +++--- server.json | 4 ++-- 5 files changed, 45 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a637a77..cb2a07b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,32 @@ # Changelog +## 2.0.5 + +The `browser-tools` CLI. The packages published to npm as 2.0.4 were +hardening only: that publish was cut from 936272d, which is the local API +hardening and the capability gates in the section below, and it does not +include this command. + +- **`browser-tools` calls the same tools as the MCP server.** The binary + ships in `@agentdeskai/browser-tools-mcp`. A command is the tool name and + one JSON object of arguments + (`browser-tools getConsoleLogs '{"limit":20}'`). + `browser-tools resource ` reads the same resources + (`console-history`, `network-history`, `network-har`, `screenshot`, + `audit-report`). Connector flags match `browser-tools-mcp`, except + capability gating: the CLI takes `--allow-actions` (argv only), which maps + to the connector's input policy, and it rejects `--allow-eval` and + `--allow-input`. +- **`navigateBrowser` loads a URL in an existing tab without focusing it or + attaching the debugger.** The extension service worker calls + `chrome.tabs.update` with `active: false`. Pass the `tabId` of a tab that + has DevTools open (`listBrowserTabs`). It needs the session popup switch + and `--allow-input` on `browser-tools-mcp`, or `--allow-actions` on the + CLI. Local origins are allowed by default; other http(s) origins need + `--allow-input-origins`. +- `@agentdeskai/browser-tools-server` now requires + `@agentdeskai/browser-tools-mcp` `^2.0.5`. + ## 2.0.4 Low-severity hardening of the local connector, and the test runner is now Vitest 5. @@ -21,6 +48,15 @@ Low-severity hardening of the local connector, and the test runner is now Vitest embeds the connector are not gated by this. - **1.x is unsupported.** README and SECURITY.md tell anyone still on it to upgrade. The vulnerabilities fixed in 2.0 are not patched on 1.x. +- **Script evaluation and input default off (#251).** `--allow-eval` and + `--allow-input` are process flags with no environment-variable form. + Navigation, soft input, and real input share an origin allowlist that is + local by default (`--allow-input-origins`, `--exclude-origins`). The + DevTools panel switch covers real input and script evaluation. A + session-scoped popup switch, also default off, covers page actions that do + not use DevTools. The extension re-reads the tab URL before a decision. + Nothing here hides the debugger banner. These gates are in the 2.0.4 npm + packages; the `browser-tools` CLI that sits on top of them is 2.0.5. Vitest 5 is a dev dependency. Node 22.12 or newer is required to run the tests, which the existing Node 22.19 floor already satisfies. diff --git a/browser-tools-mcp/package.json b/browser-tools-mcp/package.json index fd22b42c..cc7464b6 100644 --- a/browser-tools-mcp/package.json +++ b/browser-tools-mcp/package.json @@ -1,6 +1,6 @@ { "name": "@agentdeskai/browser-tools-mcp", - "version": "2.0.4", + "version": "2.0.5", "description": "MCP server exposing live browser telemetry (console logs, network requests, screenshots, Lighthouse audits) from your real Chrome session", "mcpName": "io.github.AgentDeskAI/browser-tools-mcp", "type": "module", diff --git a/browser-tools-server/package.json b/browser-tools-server/package.json index ccd27b8b..251389ca 100644 --- a/browser-tools-server/package.json +++ b/browser-tools-server/package.json @@ -1,6 +1,6 @@ { "name": "@agentdeskai/browser-tools-server", - "version": "2.0.4", + "version": "2.0.5", "description": "Standalone connector for BrowserTools MCP. Only needed when several MCP clients must share one browser session — browser-tools-mcp now embeds this automatically.", "type": "module", "main": "index.js", @@ -36,6 +36,6 @@ "author": "AgentDesk AI", "license": "MIT", "dependencies": { - "@agentdeskai/browser-tools-mcp": "^2.0.4" + "@agentdeskai/browser-tools-mcp": "^2.0.5" } } diff --git a/package-lock.json b/package-lock.json index d70cbe25..79b20cb2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,7 @@ }, "browser-tools-mcp": { "name": "@agentdeskai/browser-tools-mcp", - "version": "2.0.4", + "version": "2.0.5", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.30.0", @@ -35,6 +35,7 @@ "zod": "^4.4.3" }, "bin": { + "browser-tools": "dist/tools-cli-bin.js", "browser-tools-connector": "dist/connector-bin.js", "browser-tools-mcp": "dist/index.js" }, @@ -50,10 +51,10 @@ }, "browser-tools-server": { "name": "@agentdeskai/browser-tools-server", - "version": "2.0.4", + "version": "2.0.5", "license": "MIT", "dependencies": { - "@agentdeskai/browser-tools-mcp": "^2.0.4" + "@agentdeskai/browser-tools-mcp": "^2.0.5" }, "bin": { "browser-tools-server": "index.js" diff --git a/server.json b/server.json index 0c8066c7..2d1c182c 100644 --- a/server.json +++ b/server.json @@ -2,7 +2,7 @@ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", "name": "io.github.AgentDeskAI/browser-tools-mcp", "description": "Console, network, screenshots and Lighthouse audits from your real Chrome session.", - "version": "2.0.4", + "version": "2.0.5", "repository": { "url": "https://github.com/AgentDeskAI/browser-tools-mcp", "source": "github" @@ -13,7 +13,7 @@ "registryType": "npm", "registryBaseUrl": "https://registry.npmjs.org", "identifier": "@agentdeskai/browser-tools-mcp", - "version": "2.0.4", + "version": "2.0.5", "transport": { "type": "stdio" }, From a38e9e424b35520fca1da68204a9770701469e5f Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 27 Oct 2026 04:28:37 +0000 Subject: [PATCH 2/2] Stop the inject-capture e2e failing on fixture page logs. The uncaught-error check required every buffered entry to be level error. Fetches and the late timer on the fixture page can log after injection, so that assertion failed when those landed during the wait. Only the injected error messages need to be error level. Co-authored-by: werbel.ted --- browser-tools-mcp/test/e2e/inject-capture.e2e.test.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/browser-tools-mcp/test/e2e/inject-capture.e2e.test.ts b/browser-tools-mcp/test/e2e/inject-capture.e2e.test.ts index 5dae4b31..1dafb607 100644 --- a/browser-tools-mcp/test/e2e/inject-capture.e2e.test.ts +++ b/browser-tools-mcp/test/e2e/inject-capture.e2e.test.ts @@ -157,7 +157,15 @@ describe.skipIf(!browserSupport.usable)("injected console capture", () => { expect(drained.some((e) => e.message.includes("INJECT-UNCAUGHT"))).toBe(true); expect(drained.some((e) => e.message.includes("INJECT-REJECTED"))).toBe(true); - expect(drained.every((e) => e.level === "error")).toBe(true); + // The fixture page also logs after load (fetches, a late timer). Those can + // land in the buffer during the wait and are not part of this assertion. + expect( + drained + .filter( + (e) => e.message.includes("INJECT-UNCAUGHT") || e.message.includes("INJECT-REJECTED") + ) + .every((e) => e.level === "error") + ).toBe(true); await page.close(); });