文件历史

提交图

326 次代码提交

作者 SHA1 备注 提交日期
Nikolay Vitkov d886968863 [Prototype] Heapsnapshot diff tool 2026-05-20 12:57:14 +02:00
lmlm a9fb555c80 fix: include saved image paths in CLI JSON output (#2070)
Fixes #1910

Summary:
- save image content before returning structured CLI JSON output
- include saved image metadata in `structuredContent.images`
- add coverage for JSON output with image content

Tests:
- `npm test -- tests/daemon/client.test.ts`
- `npx eslint src/daemon/client.ts tests/daemon/client.test.ts && npx
prettier --check src/daemon/client.ts tests/daemon/client.test.ts`

Co-authored-by: Nicholas Roscino <nroscino@google.com>
2026-05-18 13:46:41 +00:00
yulunz d0e6539ef4 fix: disable NetworkManager in DevTools (#1834)
Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
2026-05-18 12:31:52 +00:00
Alex Rudenko 213720b69c fix: improve geolocation emulation (#2036)
- add a message about successful configuration
- add a message about the currently emulated geolocation
- switch to comma separate format instead of `x` separator.

Tested with https://www.audero.it/demo/geolocation-api-demo.html
2026-05-18 12:13:12 +00:00
Nikolay Vitkov b2b05a0670 chore(memory): expose retainer logic (#2056)
Allows the LLM to query the heapsnapshot further to understand what the
retainer path logic.
2026-05-18 09:54:00 +00:00
dependabot[bot] 20021469dc chore(deps-dev): bump puppeteer from 24.43.0 to 25.0.2 in the bundled group across 1 directory (#2045)
Bumps the bundled group with 1 update in the / directory:
[puppeteer](https://github.com/puppeteer/puppeteer).

Updates `puppeteer` from 24.43.0 to 25.0.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/puppeteer/puppeteer/releases">puppeteer's
releases</a>.</em></p>
<blockquote>
<h2>puppeteer-core: v25.0.2</h2>
<h2><a
href="https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v25.0.1...puppeteer-core-v25.0.2">25.0.2</a>
(2026-05-15)</h2>
<h3>🛠️ Fixes</h3>
<ul>
<li>update docs text (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14992">#14992</a>)
(<a
href="https://github.com/puppeteer/puppeteer/commit/36527b8b9dd856e11a372b46cba23409e5613573">36527b8</a>)</li>
</ul>
<h3>Dependencies</h3>
<ul>
<li>The following workspace dependencies were updated
<ul>
<li>dependencies
<ul>
<li><code>@​puppeteer/browsers</code> bumped from 3.0.1 to 3.0.2</li>
</ul>
</li>
</ul>
</li>
</ul>
<h2>puppeteer: v25.0.2</h2>
<h2><a
href="https://github.com/puppeteer/puppeteer/compare/puppeteer-v25.0.1...puppeteer-v25.0.2">25.0.2</a>
(2026-05-15)</h2>
<h3>♻️ Chores</h3>
<ul>
<li><strong>puppeteer:</strong> Synchronize puppeteer versions</li>
</ul>
<h3>Dependencies</h3>
<ul>
<li>The following workspace dependencies were updated
<ul>
<li>dependencies
<ul>
<li><code>@​puppeteer/browsers</code> bumped from 3.0.1 to 3.0.2</li>
<li>puppeteer-core bumped from 25.0.1 to 25.0.2</li>
</ul>
</li>
</ul>
</li>
</ul>
<h2>puppeteer-core: v25.0.1</h2>
<h2><a
href="https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v25.0.0...puppeteer-core-v25.0.1">25.0.1</a>
(2026-05-13)</h2>
<h3>🛠️ Fixes</h3>
<ul>
<li>enabled features should take precedence over disabled features (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14985">#14985</a>)
(<a
href="https://github.com/puppeteer/puppeteer/commit/f6fd7c29f92e6183b2fd48f0571957306c58d440">f6fd7c2</a>)</li>
<li>roll to Chrome 148.0.7778.167 (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14980">#14980</a>)
(<a
href="https://github.com/puppeteer/puppeteer/commit/84c46fede6b02a1e9a00104b97b28c263f0c84df">84c46fe</a>)</li>
<li>roll to Firefox 150.0.3 (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14983">#14983</a>)
(<a
href="https://github.com/puppeteer/puppeteer/commit/872f77822d6b6b9b6510752d838107a967241bdb">872f778</a>)</li>
</ul>
<h3>Dependencies</h3>
<ul>
<li>The following workspace dependencies were updated
<ul>
<li>dependencies
<ul>
<li><code>@​puppeteer/browsers</code> bumped from 3.0.0 to 3.0.1</li>
</ul>
</li>
</ul>
</li>
</ul>
<h2>puppeteer: v25.0.1</h2>
<h2><a
href="https://github.com/puppeteer/puppeteer/compare/puppeteer-v25.0.0...puppeteer-v25.0.1">25.0.1</a>
(2026-05-13)</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md">puppeteer's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/puppeteer/puppeteer/compare/puppeteer-v25.0.1...puppeteer-v25.0.2">25.0.2</a>
(2026-05-15)</h2>
<h3>♻️ Chores</h3>
<ul>
<li><strong>puppeteer:</strong> Synchronize puppeteer versions</li>
</ul>
<h3>Dependencies</h3>
<ul>
<li>The following workspace dependencies were updated
<ul>
<li>dependencies
<ul>
<li><code>@​puppeteer/browsers</code> bumped from 3.0.1 to 3.0.2</li>
</ul>
</li>
</ul>
</li>
</ul>
<h3>🛠️ Fixes</h3>
<ul>
<li>update docs text (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14992">#14992</a>)
(<a
href="https://github.com/puppeteer/puppeteer/commit/36527b8b9dd856e11a372b46cba23409e5613573">36527b8</a>)</li>
</ul>
<h2><a
href="https://github.com/puppeteer/puppeteer/compare/puppeteer-v25.0.0...puppeteer-v25.0.1">25.0.1</a>
(2026-05-13)</h2>
<h3>♻️ Chores</h3>
<ul>
<li><strong>puppeteer:</strong> Synchronize puppeteer versions</li>
</ul>
<h3>Dependencies</h3>
<ul>
<li>The following workspace dependencies were updated
<ul>
<li>dependencies
<ul>
<li><code>@​puppeteer/browsers</code> bumped from 3.0.0 to 3.0.1</li>
</ul>
</li>
</ul>
</li>
</ul>
<h3>🛠️ Fixes</h3>
<ul>
<li>enabled features should take precedence over disabled features (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14985">#14985</a>)
(<a
href="https://github.com/puppeteer/puppeteer/commit/f6fd7c29f92e6183b2fd48f0571957306c58d440">f6fd7c2</a>)</li>
<li>roll to Chrome 148.0.7778.167 (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14980">#14980</a>)
(<a
href="https://github.com/puppeteer/puppeteer/commit/84c46fede6b02a1e9a00104b97b28c263f0c84df">84c46fe</a>)</li>
<li>roll to Firefox 150.0.3 (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14983">#14983</a>)
(<a
href="https://github.com/puppeteer/puppeteer/commit/872f77822d6b6b9b6510752d838107a967241bdb">872f778</a>)</li>
</ul>
<h2><a
href="https://github.com/puppeteer/puppeteer/compare/puppeteer-v24.43.1...puppeteer-v25.0.0">25.0.0</a>
(2026-05-12)</h2>
<h3>⚠ BREAKING CHANGES</h3>
<ul>
<li>remove deprecated Puppeteer.product (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14977">#14977</a>)</li>
<li>bump min NodeJS to 22 (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14973">#14973</a>)</li>
<li>return a Promise for executablePath, defaultArgs (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14965">#14965</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/puppeteer/puppeteer/commit/3aadc38c533caa8df87f381868291ede870883e2"><code>3aadc38</code></a>
chore: release main (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14993">#14993</a>)</li>
<li><a
href="https://github.com/puppeteer/puppeteer/commit/36527b8b9dd856e11a372b46cba23409e5613573"><code>36527b8</code></a>
fix: update docs text (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14992">#14992</a>)</li>
<li><a
href="https://github.com/puppeteer/puppeteer/commit/3ea7bd54b97965fb0e1b83a2c017720162785c92"><code>3ea7bd5</code></a>
fix: capitalize &quot;Chrome&quot; in troubleshooting.md (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14991">#14991</a>)</li>
<li><a
href="https://github.com/puppeteer/puppeteer/commit/ae72fdbec9720c982fc2ed818036d7be9b2aa1dc"><code>ae72fdb</code></a>
chore: Tiny punctuation update in troubleshooting.md (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14990">#14990</a>)</li>
<li><a
href="https://github.com/puppeteer/puppeteer/commit/1597fde55de1e7b3c31032aa43dce0607b4307d3"><code>1597fde</code></a>
chore: release main (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14982">#14982</a>)</li>
<li><a
href="https://github.com/puppeteer/puppeteer/commit/f6fd7c29f92e6183b2fd48f0571957306c58d440"><code>f6fd7c2</code></a>
fix: enabled features should take precedence over disabled features (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14985">#14985</a>)</li>
<li><a
href="https://github.com/puppeteer/puppeteer/commit/bf05fb9bf5bac997e365eda2e31c6067e5ec1677"><code>bf05fb9</code></a>
fix: update browsers to trigger release (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14984">#14984</a>)</li>
<li><a
href="https://github.com/puppeteer/puppeteer/commit/872f77822d6b6b9b6510752d838107a967241bdb"><code>872f778</code></a>
fix: roll to Firefox 150.0.3 (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14983">#14983</a>)</li>
<li><a
href="https://github.com/puppeteer/puppeteer/commit/84c46fede6b02a1e9a00104b97b28c263f0c84df"><code>84c46fe</code></a>
fix: roll to Chrome 148.0.7778.167 (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14980">#14980</a>)</li>
<li><a
href="https://github.com/puppeteer/puppeteer/commit/ee655d8292f37cc33f279746ef72613e5ccb5db8"><code>ee655d8</code></a>
chore(main): release ng-schematics 0.8.0 (<a
href="https://redirect.github.com/puppeteer/puppeteer/issues/14978">#14978</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/puppeteer/puppeteer/compare/puppeteer-v24.43.0...puppeteer-v25.0.2">compare
view</a></li>
</ul>
</details>
<br />

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
2026-05-17 06:34:22 +00:00
lmlm 041b208378 fix: report unknown tool arguments (#2064)
## Summary
- register tool input schemas as passthrough so extra named arguments
reach ToolHandler validation
- report unknown arguments with an explicit error that names the unknown
and expected arguments
- stop before invoking tool handlers when unknown arguments are present
- add ToolHandler coverage for reporting an extra argument

Fixes #1940

## Tests
- `npm run check-format`
- `npx tsc --noEmitOnError false` *(emits build artifacts but still
reports the existing `chrome-devtools-frontend` type conflict in
`ModelImpl.ts`)*
- `node --experimental-strip-types --no-warnings=ExperimentalWarning
scripts/post-build.ts`
- `NODE_TEST_REPORTER=spec npm run test:no-build --
tests/ToolHandler.test.ts`
2026-05-15 15:52:57 +00:00
yulunz e14a74c859 chore: disallow underscores followed by numbers in metrics names (#2058)
Underscore followed by numbers is not encouraged in the proto style
guide. See "Underscores in Identifiers" in
https://protobuf.dev/programming-guides/style/.

This recently became an issue because we have `list_3p_developer_tools`
and `execute_3p_developer_tool` which would have been dis-allowed. This
change replaces them with `list3p_developer_tools` and
`execute3p_developer_tool` respectively, as suggested by the style
guide.

This only affects the logged version. The tool name is still the
existing one.

This transformation is also applied to other similar places, like flag
names, tool name in error logging, and tool args.

The `tool_name_metrics.json` was manually updated because we never
landed the server side change because it was disallowed by proto style
check.
2026-05-14 20:31:44 +00:00
@masamaru0513 90d368d343 feat: support filePath in evaluate_script (#2054)
## Summary

Adds an optional `filePath` parameter to `evaluate_script` that saves
the script output to a file instead of returning it inline.

Refs #153

## Motivation

Issue #153 requested `filePath` support for `take_snapshot` and
`evaluate_script`. `take_snapshot` was addressed in #463. PR #248
previously attempted this but was closed due to conflicts. This PR
implements the same feature on the current codebase, completing the
remaining piece.

## Changes

- Add optional `filePath` parameter to the `evaluate_script` schema
- Add `context.validatePath(filePath)` call for path validation
- Pass `{filePath, context}` options to `performEvaluation()`
- In `performEvaluation()`: when `filePath` is provided, save output via
`context.saveFile()` with `.json` extension; otherwise return inline as
before
- Update `docs/tool-reference.md` via `npm run docs:generate`
- Add unit test for file output

## Key design decisions

- **Same pattern as existing tools**: Follows the `context.saveFile()`
pattern established by `take_snapshot` (#463), `take_screenshot`,
`get_network_request` (#795), and performance tools (#686).
- **Minimal change surface**: Only `performEvaluation()` gains an
optional `options` parameter. No new interfaces or abstractions.
- **Backwards compatible**: `filePath` is optional. When omitted,
behavior is identical to before.

## Testing

**Unit test added** (`tests/tools/script.test.ts`):
- Call `evaluate_script` with `filePath` set to a temp file
- Assert response contains "Output saved to"
- Assert file content matches the JSON-serialized return value
- Clean up temp file in `finally` block

**Manual testing performed**:
- `() => document.title` with `filePath: /tmp/test.json` → file contains
`"Example Domain"`
- `() => document.title` without `filePath` → inline ```json block
returned (no regression)
- `() => Array.from({length: 100}, ...)` with `filePath` → 100-item
array saved correctly
- `filePath` pointing to non-existent directory → directory
auto-created, file saved
- Relative path (`test.json`) → resolved to CWD, absolute path shown in
response
- Function that throws → error returned, no partial file created
- Existing file as `filePath` → file overwritten completely

---------

Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
2026-05-14 08:33:27 +00:00
yulunz 71ccdb0dbf chore: better organize telemetry utilities (#2057)
There is no behavior change. 

This groups utilities into two modules:
- `transformation.ts`: for any logic related to mutating / filtering of
the names, values of telemetry entries.
- `metricsRegistry.ts`: for any logic that related to the maintenance of
metrics.json files.
2026-05-14 05:33:40 +00:00
Nikolay Vitkov f6a12be091 refactor: waitForResult helpers (#2041) 2026-05-13 12:31:33 +00:00
yulunz 9a1ebc724b chore: log read / write errors when persisting the telemetry state file (#2016)
This adds logging to the read & write operations to the telemetry state
file. In particular,

- for read, no error is logged if the state file doesn't exist, which is
expected to happen when the user is new. An error is logged otherwise
(e.g. file format error, errors when reading an existing file like
permission issue).
- for write, any error in the path will be logged.

This commit also puts the instantiation of the `Persistence` object out
of the `ClearcutLogger` object to avoid circular dependency.
2026-05-12 21:23:05 +00:00
Roger b5948582a0 feat: report new URL after actions that trigger navigation (#1853)
## Summary

- Input tools (`click`, `fill`, `press_key`, `hover`, `drag`,
`type_text`, `fill_form`, `click_at`) and `evaluate_script` now append a
`Page navigated to <url>.` line to the response when the action triggers
a cross-document navigation.
- `WaitForHelper.waitForEventsAfterAction` returns `{navigated:
boolean}` instead of `void`, surfacing the navigation signal that was
already being detected internally.
- No change to `navigate_page` or `new_page` since they already report
the URL explicitly.

Fixes #243

## Why

Today, if a `click` causes a page navigation, the response says
*"Successfully clicked on the element"* with no indication that the page
URL changed. The agent has to make an extra `list_pages` call to
discover where it landed. This saves that round-trip for every
navigation-triggering action.

## Design

The existing `waitForNavigationStarted` in `WaitForHelper` already knows
whether a cross-document navigation started. We propagate that signal as
`{navigated: boolean}` through the return value of
`waitForEventsAfterAction` → `McpPage` → `ContextPage` interface, and
let each handler append the URL line when `navigated` is true.

Same-document (history API) navigations remain filtered out by the
existing `waitForNavigationStarted` logic, matching current behavior.
Click-opens-new-tab is a separate concern (#367).

## Test plan

- [x] New test: click on a link that causes navigation → response
includes `Page navigated to <url>.`
- [x] New test: click on a button that doesn't navigate → no navigation
line in response
- [x] Full test suite (563 tests) passes
- [x] TypeScript typecheck clean
- [x] ESLint + Prettier clean
2026-05-12 15:06:21 +00:00
Alex Rudenko 85f935b2be fix: do not use getSelectedMcpPage (#2039)
Drive-by: clean up formatting and arg use.

Refs: https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/2033
2026-05-12 11:56:52 +00:00
Alex Rudenko 178b790493 refactor: extract ToolHandler (#2032)
Follow-up for
https://github.com/ChromeDevTools/chrome-devtools-mcp/pull/2030
2026-05-11 14:56:47 +00:00
dependabot[bot] aa5e21cd02 chore(deps): bump fast-uri from 3.1.0 to 3.1.2 (#2024)
Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.0 to
3.1.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/fastify/fast-uri/releases">fast-uri's
releases</a>.</em></p>
<blockquote>
<h2>v3.1.2</h2>
<h2>⚠️ Security Release</h2>
<ul>
<li>Fix for <a
href="https://github.com/fastify/fast-uri/security/advisories/GHSA-v39h-62p7-jpjc">https://github.com/fastify/fast-uri/security/advisories/GHSA-v39h-62p7-jpjc</a></li>
</ul>
<h2>What's Changed</h2>
<ul>
<li>Handle malformed fragment decoding as a parse error by <a
href="https://github.com/mcollina"><code>@​mcollina</code></a> in <a
href="https://redirect.github.com/fastify/fast-uri/pull/171">fastify/fast-uri#171</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/fastify/fast-uri/compare/v3.1.1...v3.1.2">https://github.com/fastify/fast-uri/compare/v3.1.1...v3.1.2</a></p>
<h2>v3.1.1</h2>
<h2>⚠️ Security Release</h2>
<ul>
<li>Fix for <a
href="https://github.com/fastify/fast-uri/security/advisories/GHSA-q3j6-qgpj-74h6">https://github.com/fastify/fast-uri/security/advisories/GHSA-q3j6-qgpj-74h6</a></li>
</ul>
<h2>What's Changed</h2>
<ul>
<li>build(deps-dev): bump tsd from 0.32.0 to 0.33.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/fastify/fast-uri/pull/148">fastify/fast-uri#148</a></li>
<li>build(deps): bump actions/checkout from 4 to 5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/fastify/fast-uri/pull/149">fastify/fast-uri#149</a></li>
<li>chore(.npmrc): ignore scripts by <a
href="https://github.com/Fdawgs"><code>@​Fdawgs</code></a> in <a
href="https://redirect.github.com/fastify/fast-uri/pull/150">fastify/fast-uri#150</a></li>
<li>build(deps-dev): remove <code>@​fastify/pre-commit</code> by <a
href="https://github.com/Fdawgs"><code>@​Fdawgs</code></a> in <a
href="https://redirect.github.com/fastify/fast-uri/pull/151">fastify/fast-uri#151</a></li>
<li>build(deps): bump actions/setup-node from 4 to 5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/fastify/fast-uri/pull/152">fastify/fast-uri#152</a></li>
<li>ci(ci): add concurrency config by <a
href="https://github.com/Fdawgs"><code>@​Fdawgs</code></a> in <a
href="https://redirect.github.com/fastify/fast-uri/pull/153">fastify/fast-uri#153</a></li>
<li>build(deps): bump actions/setup-node from 5 to 6 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/fastify/fast-uri/pull/154">fastify/fast-uri#154</a></li>
<li>build(deps): bump actions/checkout from 5 to 6 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/fastify/fast-uri/pull/156">fastify/fast-uri#156</a></li>
<li>chore(license): standardise license notice by <a
href="https://github.com/Fdawgs"><code>@​Fdawgs</code></a> in <a
href="https://redirect.github.com/fastify/fast-uri/pull/159">fastify/fast-uri#159</a></li>
<li>style: remove trailing whitespace by <a
href="https://github.com/Fdawgs"><code>@​Fdawgs</code></a> in <a
href="https://redirect.github.com/fastify/fast-uri/pull/161">fastify/fast-uri#161</a></li>
<li>ci: remove unused github files by <a
href="https://github.com/Tony133"><code>@​Tony133</code></a> in <a
href="https://redirect.github.com/fastify/fast-uri/pull/162">fastify/fast-uri#162</a></li>
<li>chore: update readme by <a
href="https://github.com/Tony133"><code>@​Tony133</code></a> in <a
href="https://redirect.github.com/fastify/fast-uri/pull/164">fastify/fast-uri#164</a></li>
<li>build(deps): bump
fastify/workflows/.github/workflows/plugins-ci-package-manager.yml from
5 to 6 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/fastify/fast-uri/pull/165">fastify/fast-uri#165</a></li>
<li>build(deps): bump fastify/workflows/.github/workflows/plugins-ci.yml
from 5 to 6 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/fastify/fast-uri/pull/166">fastify/fast-uri#166</a></li>
<li>build(deps-dev): bump neostandard from 0.12.2 to 0.13.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/fastify/fast-uri/pull/167">fastify/fast-uri#167</a></li>
<li>ci: add lock-threads workflow by <a
href="https://github.com/Fdawgs"><code>@​Fdawgs</code></a> in <a
href="https://redirect.github.com/fastify/fast-uri/pull/169">fastify/fast-uri#169</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/Tony133"><code>@​Tony133</code></a> made
their first contribution in <a
href="https://redirect.github.com/fastify/fast-uri/pull/162">fastify/fast-uri#162</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/fastify/fast-uri/compare/v3.1.0...v3.1.1">https://github.com/fastify/fast-uri/compare/v3.1.0...v3.1.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/fastify/fast-uri/commit/919dd8ea7689fcc220d0d9b71307f5095e723ef9"><code>919dd8e</code></a>
Bumped v3.1.2</li>
<li><a
href="https://github.com/fastify/fast-uri/commit/c65ba573714af6b8e19e481d9444c27bc4355d07"><code>c65ba57</code></a>
fixup: linting</li>
<li><a
href="https://github.com/fastify/fast-uri/commit/6c86c17c3d76fb93aa3700ec6c0fa00faeb97293"><code>6c86c17</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/fastify/fast-uri/commit/a95158ad308df4d92bbde4eba699ce5165e9f796"><code>a95158a</code></a>
Handle malformed fragment decoding without throwing (<a
href="https://redirect.github.com/fastify/fast-uri/issues/171">#171</a>)</li>
<li><a
href="https://github.com/fastify/fast-uri/commit/cea547c91c6aae610041b17b75792ca4aa035a6d"><code>cea547c</code></a>
Bumped v3.1.1</li>
<li><a
href="https://github.com/fastify/fast-uri/commit/876ce79b662c3e5015e4e7dffe6f37752ad34f35"><code>876ce79</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/fastify/fast-uri/commit/dcdf690b71a7bb3a19887ada65a9ab160d83bcc0"><code>dcdf690</code></a>
ci: add lock-threads workflow (<a
href="https://redirect.github.com/fastify/fast-uri/issues/169">#169</a>)</li>
<li><a
href="https://github.com/fastify/fast-uri/commit/c860e6589b1ac346f66e114b4eadb9613768108c"><code>c860e65</code></a>
build(deps-dev): bump neostandard from 0.12.2 to 0.13.0 (<a
href="https://redirect.github.com/fastify/fast-uri/issues/167">#167</a>)</li>
<li><a
href="https://github.com/fastify/fast-uri/commit/9b4c6dc82fde0ca44e674403ece9185d85bb6d5f"><code>9b4c6dc</code></a>
build(deps): bump fastify/workflows/.github/workflows/plugins-ci.yml (<a
href="https://redirect.github.com/fastify/fast-uri/issues/166">#166</a>)</li>
<li><a
href="https://github.com/fastify/fast-uri/commit/85d09a9f7aa76b32c2bb005a90a71e144c361d24"><code>85d09a9</code></a>
build(deps): bump
fastify/workflows/.github/workflows/plugins-ci-package-mana...</li>
<li>Additional commits viewable in <a
href="https://github.com/fastify/fast-uri/compare/v3.1.0...v3.1.2">compare
view</a></li>
</ul>
</details>
<br />

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
2026-05-11 11:26:11 +00:00
Alex Rudenko 8e06761572 fix: only require a page in page-scoped tools (#2030)
getSelectedMcpPage and getPageById throw if the page is not found, so
these should only be called for page-scoped tools.
2026-05-11 09:39:23 +00:00
Samiya Caur 64a02d8c8e test: fix flaky navigate_page with open dialog test (#2020)
Attempt to fix flakiness reported in #2019
2026-05-08 11:20:49 +00:00
yulunz 06e0ab6022 feat: add an error logging method (#2006) 2026-05-07 23:06:18 +00:00
Piotr Paulski 407c2bd03f fix: Make fill_form more appealing when filling forms with checkboxes (#1971)
Fixes #1942

Verified using `npm run eval --
scripts/eval_scenarios/fill_select_and_checkboxes_test.ts`

Without this change, I observed 7 runs using fill_form for all controls
at once, 14 runs using click to select checkboxes and 10 runs that did
nothing (total 31 runs)

After this change: 9 fill_form using runs (passes), 1 click based
approach and 10 no-attempt fails (20 runs total)

Depending how we count the no-attempt runs, its either increase from 23%
to 45% or 33% to 90% in eval pass rate.

Co-authored-by: Piotr Paulski <piotrpaulski@chromium.org>
2026-05-07 15:00:52 +00:00
yulunz a0d6ea1a62 chore: make Clearcut logger a global singleton (#1999)
We will add a error logging method to ClearcutLogger in a follow-up PR.
Since the error can happen anywhere in the stack, the logger instance
has to be readily available (i.e. w/o passing the logger instance
everywhere). This commit registers the instantiated logger as a global
singleton, and makes it possible to retrieve it by a static method
(`ClearcutLogger.get()`) wherever we need it.
2026-05-07 05:46:24 +00:00
Wolfgang Beyer 7548c97663 feat: support third-party developer tools (#1982)
Enables "third-party developer tools" feature. This allows the inspected
web page to expose tools which provide debugging information to Chrome
DevTools for Agents.

Third-party developer tools enable web applications to expose internal
state, component hierarchies, or specific debug data that cannot be
deduced through static analysis. This allows Chrome DevTools for Agents
to provide richer, more actionable context to AI agents during debugging
sessions.

2 additional tools are enabled in Chrome DevTools for Agents for
interacting with third-party developer tools:
`list_3p_developer_tools()` and `execute_3p_developer_tool`.

Code changes in this PR:
- Rename "in-page tools" to "third-party developer tools"
- Unhide
- Make available in CLI
- Add documentation
2026-05-06 12:43:34 +00:00
Alex Rudenko f45f0681a2 fix: make sure env variables are consistently applied when parsing args (#1994)
This PR moves the checks for CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS and
CI env vars to parseArguments making sure it is correctly applied by the
daemon and in tests. It also updates the tests to set explicit
CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS as it might not always be
inherited. This change is likely to affect the metrics collected and
might explain some fluctuations we observed.
2026-05-05 15:44:55 +00:00
Alex Rudenko da0441d425 docs: extract WebMCP into its own category (#1993)
Extracting WebMCP tools into a separate category for better grouping in
the docs. This changes `--experimentalWebmcp` to
`--categoryExperimentalWebmcp` to align with other experimental
categories. Debugging category was not a good fit since the tools
provided by WebMCP are not necessarily used for debugging.

cc @beaufortfrancois
2026-05-05 12:50:42 +00:00
cooleryu 510ec0f48b fix(input): stop native select option clicks from timing out (#1960)
## Summary

Teach the `click` tool to handle accessibility snapshot targets that
point at an `option` inside a native, single-select `<select>` element.

When the target is a native select option, `click` now selects that
option through the owning `<select>` element instead of asking Puppeteer
to click an option node that has no clickable box while the dropdown is
collapsed. Other option-like targets, including custom ARIA options,
continue through the normal click path.

## Motivation

Fixes #1941.

The text snapshot can expose native `<option>` nodes with stable uids.
This makes it natural for an agent to call `click` on an option uid
after seeing the desired option in the snapshot.

However, a collapsed native `<select>` does not expose its child
`<option>` nodes as directly clickable page boxes. In that state, the
option can exist in the DOM and accessibility tree while still having no
clickable geometry. Puppeteer therefore waits for the option to become
interactive and eventually times out.

The existing `fill` tool already handles selecting native `<select>`
options. This change keeps that guidance explicit in the `click` tool
description, while also making `click(option_uid)` robust for the native
select case that appears in the snapshot.

## Changes

- Added a constrained native select fallback in `click`:
  - Only runs for single-click requests.
  - Only runs when the snapshot node role is `option`.
- Only handles real `HTMLOptionElement` nodes owned by a native
`<select>`.
- Does not handle disabled selects, disabled options, disabled
optgroups, or multi-selects.
- Falls back to the existing locator click behavior for all other
targets.
- Dispatches `input` and `change` events when selecting a different
native option.
- Updated the `click` tool description to steer agents toward `fill` for
native `<select>` option selection.
- Regenerated CLI/tool reference docs with `npm run gen`.
- Added regression coverage for:
  - Clicking an option uid in a collapsed native `<select>`.
  - Clicking an option uid inside a native `<optgroup>`.
- Clicking a custom ARIA `role="option"` element through the normal
click path.

## Test Plan

Passed:

```bash
npm run test -- tests/tools/input.test.ts
npm run check-format
```

Also attempted:

```bash
npm run test
```

The full suite hit unrelated local failures outside this change area:

- `tests/tools/network.test.ts`: snapshot ordering difference for
redirected requests.
- `tests/tools/screenshot.test.ts`: `Page.captureScreenshot` failed for
the large full-page screenshot case with `Page is too large`.

The changed input tool tests pass locally.

## Risk

Low. The fallback is intentionally narrow:

- It is gated by the accessibility role being `option`.
- It verifies the DOM node is an actual `HTMLOptionElement`.
- It only applies to native, non-disabled, single-select `<select>`
controls.
- It does not reinterpret custom combobox/listbox implementations.
- It preserves the existing locator click path for non-native option
targets.

The main behavior change is that `click(option_uid)` can now succeed for
native collapsed dropdowns that previously timed out.

## Related Issue

Closes #1941.

## Maintainer Context

This targets a small but high-impact mismatch between the snapshot
representation and browser interaction semantics.

The snapshot correctly exposes native options because they exist in the
accessibility tree. The click implementation previously treated that uid
like any other clickable element, but collapsed native options do not
have normal clickable layout boxes. This PR makes the native select case
explicit without expanding `click` into a general custom dropdown
heuristic.

The tool description still recommends `fill` for native `<select>`
selection so agents are guided toward the more direct tool. The code
fallback exists for the common case where an agent already selected an
option uid from the snapshot.
2026-05-04 09:12:43 +00:00
Alex Rudenko a90378adf3 fix: always allow tmpdir access with client roots (#1984)
This PR changes the implementation to allow access to tmpdir even if the
client is not configured it explicitly because several tools default to
the tmpdir for outputs. Many clients like gemini-cli/claude do not
configure the tmp dir as a root by default.
2026-04-30 12:25:35 +00:00
Nicholas Roscino b2b3e99d67 feat(cli): generate commands for conditional tools (#1962)
This PR adds all tools in the CLI interface. When a tool is not enabled
the server responds with an error guiding the user on how to enable the
category or the experiment.

Closes:
https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/1933
2026-04-30 07:59:08 +00:00
Samiya Caur 6ce254e541 fix: add proactive tool rejection when dialog is open (#1978)
Adding proactive rejection of tool execution for tools which currently
get blocked due to open dialogs (related to #1069 )
2026-04-29 13:59:50 +00:00
Samiya Caur f1afe842ae test: add tests for checking behavior when dialog is open (#1977)
This is the first part of adding tests for checking tool behavior when a
dialog is already open (related to #1069)

In future CL, I will be focusing on tools which currently get blocked
due to open dialogs. As part of those CLs, proactive rejection of tool
execution will be implemented.
2026-04-29 10:38:27 +00:00
yulunz bf3cb58d27 fix(telemetry): bucketize string length (#1972)
Only the string length needs to be bucketized. We can log the array size
as-is.
2026-04-29 05:32:52 +00:00
Samiya Caur 06b331f403 fix: handle errors due to open dialogs during tool calls (#1953)
This change is part of the fix for #1069 
- Errors during tool calls are now consumed and handled as part of
McpResponse format
2026-04-28 16:45:48 +00:00
Nikolay Vitkov 66dacb83fd chore(memory): sort all by retainer size (#1963)
This is a better measurement as if object self size is X and the
retainerSize Y. X will always be smaller then Y, there Y will be the
actual size on the Heap.
2026-04-28 14:32:04 +00:00
Alex Rudenko def53ddf1d feat: support MCP client roots feature (#1945)
This PR implements
https://modelcontextprotocol.io/specification/2025-11-25/client/roots If
client specifies roots, all reads and writes to the file system
originating in tool calls will denied (including tmp files). The client
specified empty list of roots, all filesystem access will be restricted.

Closes https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/1860

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piotr Paulski <piotrpaulski@chromium.org>
2026-04-27 11:55:30 +00:00
Alex Rudenko 80bee1e6cd fix: note about missing elements should not show in verbose mode (#1950)
Closes https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/1947
2026-04-24 07:29:05 +00:00
Nikolay Vitkov 136da6a350 build: add dev source maps (#1948)
This allows setting up a debugger script with either enabled debugging
port or tools like VS Code or Antigravity.
2026-04-23 18:35:34 +00:00
@masamaru0513 dbddb2e4ef feat: group identical consecutive console messages in list_console_messages (#1939)
## Summary

Group consecutive identical console messages in `list_console_messages`,
similar to Chrome DevTools' console grouping behavior.

Fixes #904

## Changes

- Introduce `GroupedConsoleFormatter` subclass that extends
`ConsoleFormatter` and overrides `toString()` / `toJSON()` for
count-aware formatting
- Add `ConsoleFormatter.groupConsecutive()` static method that groups
consecutive messages with the same type, text, and argument count
- Apply grouping **before pagination** so grouped counts are accurate
and page sizes reflect the collapsed view
- Add unit tests for grouping logic, string formatting, and JSON output

## Key design decisions

- **`GroupedConsoleFormatter` subclass**: Keeps the existing formatter
interface clean — no new methods added to `ConsoleFormatter`.
`ConsoleFormatter` and `GroupedConsoleFormatter` are interchangeable via
the same interface.
- **Grouping before pagination** (not at format time): This was the
feedback on #963 and #1025 — grouping at format time breaks pagination
counts. This implementation groups in `McpResponse` before calling
`paginate()`.
- **No `lastId`**: Since grouped messages are truly identical, only the
first message's ID is needed.
- **`argCount` matching**: Prevents false grouping of messages with the
same text but different argument counts.

## Output example

```
msgid=1 [log] hello world (1 args) [5 times]
```

## Testing

- Unit tests in `tests/formatters/ConsoleFormatterGrouping.test.ts`
- Manual verification: identical messages (×5), mixed pattern (A,A,B,A,A
→ A×2, B×1, A×2)
2026-04-23 09:55:18 +00:00
Nikolay Vitkov 9f5dd6229c chore(memory): expose way to get the nodes (#1916)
The next step for the memory debugging is to provide the nodes that the
aggregates have, from which you can get the retainers of the object.
2026-04-23 09:44:06 +00:00
Wolfgang Beyer e046c23563 chore: in-page tool output: stash DOM elements and preprocess for serialization (#1877)
Improvements for handling in-page tool responses. In order to
successfully pass an in-page tool response from the page context to the
MCP server, the response needs to be serializable. The code walks the
response object an performs the following changes:

- DOM elements are stashed onto the window object and replaced with an
ID. On the MCP server side this ID is used to map back to the
corresponding UID in the page snapshot generated from the accessibility
tree.
- Circular references are replaced with a string.
- Class instances (which can be complex or non-serializable) are
replaced with a string.
- Functions are replaced with a string.

If the in-page tool response contains DOM elements which are not part of
the page snapshot, a new snapshot is created add the missing elements
are added explicitly.
2026-04-22 14:51:09 +00:00
Alex Rudenko 85b89931ed feat: support webm format in screencast (#1934)
Modifies the experimental screencast command to support `.webm` in
addition to `.mp4`. Renamed `path` to `filePath` to align with other
tools.
2026-04-22 13:51:51 +00:00
Alex Rudenko b377454b1b feat: add an option to customize ffmpeg path (#1937)
This PR adds experimental flag to customize `experimentalScreencast`
that allows specifying a different path to the ffmpeg binary.
2026-04-22 12:22:20 +00:00
Alex Rudenko d50255778a feat: support experimental allowlist for navigate tool calls (#1935)
This PR adds an experimental allowlist for the page navigate tool call
(requires `--experimentalNavigationAllowlist`, off by default). The
feature uses a list of URLPatterns to decline navigations that land on
disallowed URLs. If that happens, the client can update the allowlist
and re-try. The purpose of the this feature is to offer additional
guardrails on top of the MCP server. It does not restrict subresources
or JS/iframe navigations in any way. The performance impact is minimized
by turning off interception as soon as the navigation request is done.
2026-04-22 12:16:10 +00:00
Alex Rudenko 82b67b07d3 refactor: add support for CLI sessionIds in tests (#1919)
Closes https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/1119
2026-04-22 08:15:36 +00:00
Nicholas Roscino a1612be8e0 test: refactor tests to reduce duplication (#1926) 2026-04-21 16:07:45 +00:00
Nicholas Roscino 3ff21cf30d feat: support Chrome extensions debugging (#1922)
Adds ability to install, uninstall and reload extensions, trigger
extension actions and inspect extension pages, service workers and
content scripts. Specify `--categoryExtensions` to enable.

Closes https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/1173
Closes https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/96

---------

Co-authored-by: Mathias Bynens <mathias@qiwi.be>
Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
2026-04-21 14:03:15 +00:00
Nicholas Roscino 86ffd58c2f test: add test for console log from content script (#1920)
This PR adds a test to prove extension content script can be captured in
logs for pages
2026-04-21 10:35:39 +00:00
Nikolay Vitkov 9211c6b52d chore(memory): expose a tool for getting the inital data. (#1909)
This refactors the code to extract the Id logic from the PageCollector
and provide it in the heapsnapshot.
We need to use an UID as we need the internal ClassKey to query the
heapsnapshot, but that is a strange string (usually looking like
`,ClassName`) which may get the LLM confused as we use comma separated
output.
2026-04-20 18:39:48 +00:00
Nicholas Roscino ec895f195a refactor: use puppeteer Extension API (#1911)
This PR refactor the extension usages using the new Puppeteer API.

Requires puppeteer release before merging
2026-04-20 14:38:48 +00:00
Mukunda Rao Katta 3a24d71f2c test: save WebP responses with the right extension (#1901)
## Summary
- fix the WebP MIME type match in daemon response handling
- save  responses with a  suffix instead of falling back to 
- add a regression test for WebP image handling

## Testing
- npm run build
- node --test --test-name-pattern="parsing"
build/tests/daemon/client.test.js

Fixes #1898
2026-04-20 12:05:47 +00:00
Nikolay Vitkov da33cb5b95 feat: auto handle dialogs during script evaluation (#1839)
Provide a argument to LLM to handle dialogs that come up during code
execution.

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-04-20 06:42:05 +00:00
yulunz 0a6aaa52eb chore: generate a json file for flag usage metrics (#1881)
This is the second most highly touched metric areas - so let's automate
this portion first. The approach is similar to what we have for tool
call args. The append-only logic will be added in the follow-up PR:
#1882
2026-04-17 18:50:31 +00:00