chromedevtools--chrome-devtools-mcp
4e69ed4bca
Bumps the bundled group with 2 updates: [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/typescript-sdk) and [puppeteer](https://github.com/puppeteer/puppeteer). Updates `@modelcontextprotocol/sdk` from 1.21.1 to 1.24.1 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/modelcontextprotocol/typescript-sdk/releases"><code>@modelcontextprotocol/sdk</code>'s releases</a>.</em></p> <blockquote> <h2>1.24.1</h2> <h2>What's Changed</h2> <ul> <li>fix(streamableHttp): fix infinite retries when maxRetries is set to 0 by <a href="https://github.com/mrorigo"><code>@mrorigo</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1216">modelcontextprotocol/typescript-sdk#1216</a></li> <li>chore: update protocol version to 2025-11-25 by <a href="https://github.com/dsp-ant"><code>@dsp-ant</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1218">modelcontextprotocol/typescript-sdk#1218</a></li> <li>chore: bump version for release by <a href="https://github.com/felixweinberger"><code>@felixweinberger</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1219">modelcontextprotocol/typescript-sdk#1219</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/mrorigo"><code>@mrorigo</code></a> made their first contribution in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1216">modelcontextprotocol/typescript-sdk#1216</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/modelcontextprotocol/typescript-sdk/compare/1.24.0...1.24.1">https://github.com/modelcontextprotocol/typescript-sdk/compare/1.24.0...1.24.1</a></p> <h2>1.24.0</h2> <h2>Summary</h2> <p>This release brings us up to speed with the latest MCP spec <code>2025-11-25</code>. Take a look at the <a href="https://modelcontextprotocol.io/specification/2025-11-25">latest spec</a> as well as the release <a href="https://blog.modelcontextprotocol.io/posts/2025-11-25-first-mcp-anniversary/">blog post.</a></p> <h2>What's Changed</h2> <ul> <li>fix: update spec links from latest to draft by <a href="https://github.com/domdomegg"><code>@domdomegg</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1171">modelcontextprotocol/typescript-sdk#1171</a></li> <li>Make sure to consume HTTP error response bodies by <a href="https://github.com/GreenStage"><code>@GreenStage</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1173">modelcontextprotocol/typescript-sdk#1173</a></li> <li>docs: add GET request handling for streamableHttp stateless mode by <a href="https://github.com/saharis9988"><code>@saharis9988</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1161">modelcontextprotocol/typescript-sdk#1161</a></li> <li>SEP-1686: Tasks by <a href="https://github.com/LucaButBoring"><code>@LucaButBoring</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1041">modelcontextprotocol/typescript-sdk#1041</a></li> <li>Fix JSON parse error on SSE events with empty data by <a href="https://github.com/felixweinberger"><code>@felixweinberger</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1184">modelcontextprotocol/typescript-sdk#1184</a></li> <li>Fix StreamableHTTPClientTransport instantiation by <a href="https://github.com/yuwzho"><code>@yuwzho</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/944">modelcontextprotocol/typescript-sdk#944</a></li> <li>feat: eslint rule to prefer node protocols by <a href="https://github.com/mattzcarey"><code>@mattzcarey</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1187">modelcontextprotocol/typescript-sdk#1187</a></li> <li>fix: call tasks/result to deliver side-channel messages by <a href="https://github.com/felixweinberger"><code>@felixweinberger</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1185">modelcontextprotocol/typescript-sdk#1185</a></li> <li>Add invalid_target oauth error (rfc 8707) by <a href="https://github.com/GreenStage"><code>@GreenStage</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1183">modelcontextprotocol/typescript-sdk#1183</a></li> <li>fix(client): use StreamableHTTPError instead of plain Error in send() by <a href="https://github.com/yamadashy"><code>@yamadashy</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1178">modelcontextprotocol/typescript-sdk#1178</a></li> <li>coerce 'expires_in' to be a number by <a href="https://github.com/adam-kuhn"><code>@adam-kuhn</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1111">modelcontextprotocol/typescript-sdk#1111</a></li> <li>Allow HTTP issuer URLs when MCP_DEV_MODE is enabled by <a href="https://github.com/jerome3o-anthropic"><code>@jerome3o-anthropic</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1189">modelcontextprotocol/typescript-sdk#1189</a></li> <li>fix: update registerTool signature for proper typed ToolCallback by <a href="https://github.com/mattzcarey"><code>@mattzcarey</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1188">modelcontextprotocol/typescript-sdk#1188</a></li> <li>SEP-1046: Client credentials flow for M2M without user interaction by <a href="https://github.com/KKonstantinov"><code>@KKonstantinov</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1157">modelcontextprotocol/typescript-sdk#1157</a></li> <li>adds the transitive <code>@types/express-serve-static-core</code> dependency as a direct devDependency by <a href="https://github.com/mgyarmathy"><code>@mgyarmathy</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1078">modelcontextprotocol/typescript-sdk#1078</a></li> <li>Fix optional argument handling in prompts for Zod V4 by <a href="https://github.com/filip-bartuska-ipf"><code>@filip-bartuska-ipf</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1199">modelcontextprotocol/typescript-sdk#1199</a></li> <li>fix hanging stdio servers by <a href="https://github.com/mattzcarey"><code>@mattzcarey</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1200">modelcontextprotocol/typescript-sdk#1200</a></li> <li>README refactor by <a href="https://github.com/KKonstantinov"><code>@KKonstantinov</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1197">modelcontextprotocol/typescript-sdk#1197</a></li> <li>[Docs] Fix typo by <a href="https://github.com/koic"><code>@koic</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1067">modelcontextprotocol/typescript-sdk#1067</a></li> <li>feat: add closeSSEStream callback to RequestHandlerExtra by <a href="https://github.com/felixweinberger"><code>@felixweinberger</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1166">modelcontextprotocol/typescript-sdk#1166</a></li> <li>fix: improve SSE reconnection behavior by <a href="https://github.com/felixweinberger"><code>@felixweinberger</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1191">modelcontextprotocol/typescript-sdk#1191</a></li> <li>fix: normalize headers in sse transport by <a href="https://github.com/marcrasi"><code>@marcrasi</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/856">modelcontextprotocol/typescript-sdk#856</a></li> <li>feat: add closeStandaloneSSEStream for GET stream polling by <a href="https://github.com/felixweinberger"><code>@felixweinberger</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1203">modelcontextprotocol/typescript-sdk#1203</a></li> <li>fix: normalize null to undefined in ElicitResultSchema content field by <a href="https://github.com/mattzcarey"><code>@mattzcarey</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1204">modelcontextprotocol/typescript-sdk#1204</a></li> <li>Modify Origin header validation in validateRequestHeaders (streamableHttp.ts and sse.ts) to allow requests without an Origin, as they are not relevant to server DNS rebinding protection. by <a href="https://github.com/jacopoc"><code>@jacopoc</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1205">modelcontextprotocol/typescript-sdk#1205</a></li> <li>fix: allow zod 4 transformations by <a href="https://github.com/mattzcarey"><code>@mattzcarey</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1213">modelcontextprotocol/typescript-sdk#1213</a></li> <li>feat: backwards-compatible createMessage overloads for SEP-1577 by <a href="https://github.com/felixweinberger"><code>@felixweinberger</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1212">modelcontextprotocol/typescript-sdk#1212</a></li> <li>chore: bump version for release by <a href="https://github.com/felixweinberger"><code>@felixweinberger</code></a> in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1215">modelcontextprotocol/typescript-sdk#1215</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/GreenStage"><code>@GreenStage</code></a> made their first contribution in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1173">modelcontextprotocol/typescript-sdk#1173</a></li> <li><a href="https://github.com/saharis9988"><code>@saharis9988</code></a> made their first contribution in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1161">modelcontextprotocol/typescript-sdk#1161</a></li> <li><a href="https://github.com/yuwzho"><code>@yuwzho</code></a> made their first contribution in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/944">modelcontextprotocol/typescript-sdk#944</a></li> <li><a href="https://github.com/yamadashy"><code>@yamadashy</code></a> made their first contribution in <a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1178">modelcontextprotocol/typescript-sdk#1178</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/6dd7cd4e16cf7ece373dff4138e9a065aa1c6ae7"><code>6dd7cd4</code></a> chore: bump version for release (<a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/issues/1219">#1219</a>)</li> <li><a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/600859f10586e5d49910a04ed877901bfec171b3"><code>600859f</code></a> chore: update protocol version to 2025-11-25 (<a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/issues/1218">#1218</a>)</li> <li><a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/bfad917cad8d84c40047ae352b7611b61377ef59"><code>bfad917</code></a> fix(streamableHttp): fix infinite retries when maxRetries is set to 0 (<a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/issues/1216">#1216</a>)</li> <li><a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/356b7e61c83af723a0b7ad67d8193de70a5f03ca"><code>356b7e6</code></a> chore: bump version for release (<a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/issues/1215">#1215</a>)</li> <li><a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/09623e2aa5044f9e9da62c73d820a8250b9d97ed"><code>09623e2</code></a> Merge commit from fork</li> <li><a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/cf51343cc12fc83db34d07b7d7269b73d413cc06"><code>cf51343</code></a> feat: backwards-compatible createMessage overloads for SEP-1577 (<a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/issues/1212">#1212</a>)</li> <li><a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/82041262dc9cee1c27b787edeee828a0ed51e122"><code>8204126</code></a> fix: allow zod 4 transformations (<a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/issues/1213">#1213</a>)</li> <li><a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/608360047dc6899f1cf4f0226eb62fe7b11b3898"><code>6083600</code></a> Modify Origin header validation in validateRequestHeaders (streamableHttp.ts ...</li> <li><a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/a6ee2cb3c234960b6c448eb9ffb4e442233e6c10"><code>a6ee2cb</code></a> fix: normalize null to undefined in ElicitResultSchema content field (<a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/issues/1204">#1204</a>)</li> <li><a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/4b651b8fe17a567c8563b98c8fd677d9df688c0a"><code>4b651b8</code></a> feat: add closeStandaloneSSEStream for GET stream polling (<a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/issues/1203">#1203</a>)</li> <li>Additional commits viewable in <a href="https://github.com/modelcontextprotocol/typescript-sdk/compare/1.21.1...1.24.1">compare view</a></li> </ul> </details> <details> <summary>Maintainer changes</summary> <p>This version was pushed to npm by <a href="https://www.npmjs.com/~pcarleton">pcarleton</a>, a new releaser for <code>@modelcontextprotocol/sdk</code> since your current version.</p> </details> <br /> Updates `puppeteer` from 24.31.0 to 24.32.0 <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: v24.32.0</h2> <h2><a href="https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v24.31.0...puppeteer-core-v24.32.0">24.32.0</a> (2025-12-03)</h2> <h3>🎉 Features</h3> <ul> <li>add browser.screens, .addScreen and .removeScreen methods (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14445">#14445</a>) (<a href="https://github.com/puppeteer/puppeteer/commit/98ae5e75fda3d01c067dac6926370dba05cd720c">98ae5e7</a>)</li> <li>bluetooth emulation (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14448">#14448</a>) (<a href="https://github.com/puppeteer/puppeteer/commit/e181c1befaebadfa74ec4e1b6742f26187bd3a2a">e181c1b</a>)</li> <li>roll to Chrome 143.0.7499.40 (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14476">#14476</a>) (<a href="https://github.com/puppeteer/puppeteer/commit/b0e15aff5143b1c08d0ad66555cfc5c9a369d5dd">b0e15af</a>)</li> <li>support channel in puppeteer.connect (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14466">#14466</a>) (<a href="https://github.com/puppeteer/puppeteer/commit/bc3a52185d43618756c491e9cc930ca9340f9776">bc3a521</a>)</li> <li>support new page window positioning (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14446">#14446</a>) (<a href="https://github.com/puppeteer/puppeteer/commit/20881f8a52b8a29abaf6e5353dc8642474348fa0">20881f8</a>)</li> <li><strong>webdriver:</strong> bluetooth emulation via WebDriver BiDi (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14455">#14455</a>) (<a href="https://github.com/puppeteer/puppeteer/commit/e17263c815cb6638c035d0d91934ab8536f03b7b">e17263c</a>)</li> </ul> <h3>🛠️ Fixes</h3> <ul> <li>ignore non-page DevTools targets when handleDevToolsAsPage=true (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14472">#14472</a>) (<a href="https://github.com/puppeteer/puppeteer/commit/11bf1d205707e02c874cb6e3c5ee6f12b1e27f70">11bf1d2</a>)</li> <li>prevent accessibility nodes attributes with false from being ignored (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14475">#14475</a>) (<a href="https://github.com/puppeteer/puppeteer/commit/086a8ab650c424192ec8edf489fce90bad318bb2">086a8ab</a>)</li> <li>roll to Firefox 145.0.2 (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14462">#14462</a>) (<a href="https://github.com/puppeteer/puppeteer/commit/97ca8944d5fb5f169804f230d431a62cb600bbfc">97ca894</a>)</li> <li><strong>webdriver:</strong> allow for scripts to throw platform objects (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14456">#14456</a>) (<a href="https://github.com/puppeteer/puppeteer/commit/7c0d3d977b2c3370516c42218977bd4338421b28">7c0d3d9</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 2.10.13 to 2.11.0</li> </ul> </li> </ul> </li> </ul> <h2>puppeteer: v24.32.0</h2> <h2><a href="https://github.com/puppeteer/puppeteer/compare/puppeteer-v24.31.0...puppeteer-v24.32.0">24.32.0</a> (2025-12-03)</h2> <h3>🎉 Features</h3> <ul> <li>roll to Chrome 143.0.7499.40 (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14476">#14476</a>) (<a href="https://github.com/puppeteer/puppeteer/commit/b0e15aff5143b1c08d0ad66555cfc5c9a369d5dd">b0e15af</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 2.10.13 to 2.11.0</li> <li>puppeteer-core bumped from 24.31.0 to 24.32.0</li> </ul> </li> </ul> </li> </ul> </blockquote> </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-v24.31.0...puppeteer-v24.32.0">24.32.0</a> (2025-12-03)</h2> <h3>🎉 Features</h3> <ul> <li>add browser.screens, .addScreen and .removeScreen methods (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14445">#14445</a>) (<a href="https://github.com/puppeteer/puppeteer/commit/98ae5e75fda3d01c067dac6926370dba05cd720c">98ae5e7</a>)</li> <li>bluetooth emulation (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14448">#14448</a>) (<a href="https://github.com/puppeteer/puppeteer/commit/e181c1befaebadfa74ec4e1b6742f26187bd3a2a">e181c1b</a>)</li> <li>roll to Chrome 143.0.7499.40 (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14476">#14476</a>) (<a href="https://github.com/puppeteer/puppeteer/commit/b0e15aff5143b1c08d0ad66555cfc5c9a369d5dd">b0e15af</a>)</li> <li>support channel in puppeteer.connect (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14466">#14466</a>) (<a href="https://github.com/puppeteer/puppeteer/commit/bc3a52185d43618756c491e9cc930ca9340f9776">bc3a521</a>)</li> <li>support new page window positioning (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14446">#14446</a>) (<a href="https://github.com/puppeteer/puppeteer/commit/20881f8a52b8a29abaf6e5353dc8642474348fa0">20881f8</a>)</li> <li><strong>webdriver:</strong> bluetooth emulation via WebDriver BiDi (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14455">#14455</a>) (<a href="https://github.com/puppeteer/puppeteer/commit/e17263c815cb6638c035d0d91934ab8536f03b7b">e17263c</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 2.10.13 to 2.11.0</li> </ul> </li> </ul> </li> </ul> <h3>🛠️ Fixes</h3> <ul> <li>ignore non-page DevTools targets when handleDevToolsAsPage=true (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14472">#14472</a>) (<a href="https://github.com/puppeteer/puppeteer/commit/11bf1d205707e02c874cb6e3c5ee6f12b1e27f70">11bf1d2</a>)</li> <li>prevent accessibility nodes attributes with false from being ignored (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14475">#14475</a>) (<a href="https://github.com/puppeteer/puppeteer/commit/086a8ab650c424192ec8edf489fce90bad318bb2">086a8ab</a>)</li> <li>roll to Firefox 145.0.2 (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14462">#14462</a>) (<a href="https://github.com/puppeteer/puppeteer/commit/97ca8944d5fb5f169804f230d431a62cb600bbfc">97ca894</a>)</li> <li><strong>webdriver:</strong> allow for scripts to throw platform objects (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14456">#14456</a>) (<a href="https://github.com/puppeteer/puppeteer/commit/7c0d3d977b2c3370516c42218977bd4338421b28">7c0d3d9</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/puppeteer/puppeteer/commit/c324e1bb5b1a33e793324669d402fd2e32e28707"><code>c324e1b</code></a> chore: release main (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14454">#14454</a>)</li> <li><a href="https://github.com/puppeteer/puppeteer/commit/b0e15aff5143b1c08d0ad66555cfc5c9a369d5dd"><code>b0e15af</code></a> feat: roll to Chrome 143.0.7499.40 (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14476">#14476</a>)</li> <li><a href="https://github.com/puppeteer/puppeteer/commit/086a8ab650c424192ec8edf489fce90bad318bb2"><code>086a8ab</code></a> fix: prevent accessibility nodes attributes with false from being ignored (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/1">#1</a>...</li> <li><a href="https://github.com/puppeteer/puppeteer/commit/11bf1d205707e02c874cb6e3c5ee6f12b1e27f70"><code>11bf1d2</code></a> fix: ignore non-page DevTools targets when handleDevToolsAsPage=true (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14472">#14472</a>)</li> <li><a href="https://github.com/puppeteer/puppeteer/commit/bc3a52185d43618756c491e9cc930ca9340f9776"><code>bc3a521</code></a> feat: support channel in puppeteer.connect (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14466">#14466</a>)</li> <li><a href="https://github.com/puppeteer/puppeteer/commit/4913b9bdf966889bb7ffc48703fc9ab8e8271ff1"><code>4913b9b</code></a> test: update canary expectations (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14467">#14467</a>)</li> <li><a href="https://github.com/puppeteer/puppeteer/commit/45f82aff4343d0bb00871a084f734f87934b2f65"><code>45f82af</code></a> test: fix more path related issues in tests (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14465">#14465</a>)</li> <li><a href="https://github.com/puppeteer/puppeteer/commit/372b2806cee3893c6935afa98cc9b836b7c1cce1"><code>372b280</code></a> fix: avoid hard-coded separators in chrome.ts (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14464">#14464</a>)</li> <li><a href="https://github.com/puppeteer/puppeteer/commit/e17263c815cb6638c035d0d91934ab8536f03b7b"><code>e17263c</code></a> feat(webdriver): bluetooth emulation via WebDriver BiDi (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14455">#14455</a>)</li> <li><a href="https://github.com/puppeteer/puppeteer/commit/97ca8944d5fb5f169804f230d431a62cb600bbfc"><code>97ca894</code></a> fix: roll to Firefox 145.0.2 (<a href="https://redirect.github.com/puppeteer/puppeteer/issues/14462">#14462</a>)</li> <li>Additional commits viewable in <a href="https://github.com/puppeteer/puppeteer/compare/puppeteer-v24.31.0...puppeteer-v24.32.0">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> --------- 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>
500 行
17 KiB
TypeScript
500 行
17 KiB
TypeScript
/**
|
|
* @license
|
|
* Copyright 2025 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import assert from 'node:assert';
|
|
import {readFile, rm} from 'node:fs/promises';
|
|
import {tmpdir} from 'node:os';
|
|
import {join} from 'node:path';
|
|
import {describe, it} from 'node:test';
|
|
|
|
import {
|
|
getImageContent,
|
|
getMockAggregatedIssue,
|
|
getMockRequest,
|
|
getMockResponse,
|
|
getTextContent,
|
|
html,
|
|
stabilizeResponseOutput,
|
|
withMcpContext,
|
|
} from './utils.js';
|
|
|
|
describe('McpResponse', () => {
|
|
it('list pages', async t => {
|
|
await withMcpContext(async (response, context) => {
|
|
response.setIncludePages(true);
|
|
const result = await response.handle('test', context);
|
|
assert.equal(result[0].type, 'text');
|
|
t.assert.snapshot?.(getTextContent(result[0]));
|
|
});
|
|
});
|
|
|
|
it('allows response text lines to be added', async t => {
|
|
await withMcpContext(async (response, context) => {
|
|
response.appendResponseLine('Testing 1');
|
|
response.appendResponseLine('Testing 2');
|
|
const result = await response.handle('test', context);
|
|
assert.equal(result[0].type, 'text');
|
|
t.assert.snapshot?.(getTextContent(result[0]));
|
|
});
|
|
});
|
|
|
|
it('does not include anything in response if snapshot is null', async () => {
|
|
await withMcpContext(async (response, context) => {
|
|
const page = context.getSelectedPage();
|
|
page.accessibility.snapshot = async () => null;
|
|
const result = await response.handle('test', context);
|
|
assert.equal(result[0].type, 'text');
|
|
assert.deepStrictEqual(getTextContent(result[0]), `# test response`);
|
|
});
|
|
});
|
|
|
|
it('returns correctly formatted snapshot for a simple tree', async t => {
|
|
await withMcpContext(async (response, context) => {
|
|
const page = context.getSelectedPage();
|
|
await page.setContent(
|
|
html`<button>Click me</button
|
|
><input
|
|
type="text"
|
|
value="Input"
|
|
/>`,
|
|
);
|
|
await page.focus('button');
|
|
response.includeSnapshot();
|
|
const result = await response.handle('test', context);
|
|
assert.equal(result[0].type, 'text');
|
|
t.assert.snapshot?.(getTextContent(result[0]));
|
|
});
|
|
});
|
|
|
|
it('returns values for textboxes', async t => {
|
|
await withMcpContext(async (response, context) => {
|
|
const page = context.getSelectedPage();
|
|
await page.setContent(
|
|
html`<label
|
|
>username<input
|
|
name="username"
|
|
value="mcp"
|
|
/></label>`,
|
|
);
|
|
await page.focus('input');
|
|
response.includeSnapshot();
|
|
const result = await response.handle('test', context);
|
|
assert.equal(result[0].type, 'text');
|
|
t.assert.snapshot?.(getTextContent(result[0]));
|
|
});
|
|
});
|
|
|
|
it('returns verbose snapshot', async t => {
|
|
await withMcpContext(async (response, context) => {
|
|
const page = context.getSelectedPage();
|
|
await page.setContent(html`<aside>test</aside>`);
|
|
response.includeSnapshot({
|
|
verbose: true,
|
|
});
|
|
const result = await response.handle('test', context);
|
|
assert.equal(result[0].type, 'text');
|
|
t.assert.snapshot?.(getTextContent(result[0]));
|
|
});
|
|
});
|
|
|
|
it('saves snapshot to file', async t => {
|
|
const filePath = join(tmpdir(), 'test-screenshot.png');
|
|
try {
|
|
await withMcpContext(async (response, context) => {
|
|
const page = context.getSelectedPage();
|
|
await page.setContent(html`<aside>test</aside>`);
|
|
response.includeSnapshot({
|
|
verbose: true,
|
|
filePath,
|
|
});
|
|
const result = await response.handle('test', context);
|
|
assert.equal(result[0].type, 'text');
|
|
t.assert.snapshot?.(stabilizeResponseOutput(getTextContent(result[0])));
|
|
});
|
|
const content = await readFile(filePath, 'utf-8');
|
|
t.assert.snapshot?.(stabilizeResponseOutput(content));
|
|
} finally {
|
|
await rm(filePath, {force: true});
|
|
}
|
|
});
|
|
|
|
it('adds throttling setting when it is not null', async t => {
|
|
await withMcpContext(async (response, context) => {
|
|
context.setNetworkConditions('Slow 3G');
|
|
const result = await response.handle('test', context);
|
|
assert.equal(result[0].type, 'text');
|
|
t.assert.snapshot?.(getTextContent(result[0]));
|
|
});
|
|
});
|
|
|
|
it('does not include throttling setting when it is null', async () => {
|
|
await withMcpContext(async (response, context) => {
|
|
const result = await response.handle('test', context);
|
|
context.setNetworkConditions(null);
|
|
assert.equal(result[0].type, 'text');
|
|
assert.strictEqual(getTextContent(result[0]), `# test response`);
|
|
});
|
|
});
|
|
it('adds image when image is attached', async () => {
|
|
await withMcpContext(async (response, context) => {
|
|
response.attachImage({data: 'imageBase64', mimeType: 'image/png'});
|
|
const result = await response.handle('test', context);
|
|
assert.strictEqual(getTextContent(result[0]), `# test response`);
|
|
assert.equal(result[1].type, 'image');
|
|
assert.strictEqual(getImageContent(result[1]).data, 'imageBase64');
|
|
assert.strictEqual(getImageContent(result[1]).mimeType, 'image/png');
|
|
});
|
|
});
|
|
|
|
it('adds cpu throttling setting when it is over 1', async t => {
|
|
await withMcpContext(async (response, context) => {
|
|
context.setCpuThrottlingRate(4);
|
|
const result = await response.handle('test', context);
|
|
t.assert.snapshot?.(getTextContent(result[0]));
|
|
});
|
|
});
|
|
|
|
it('does not include cpu throttling setting when it is 1', async () => {
|
|
await withMcpContext(async (response, context) => {
|
|
context.setCpuThrottlingRate(1);
|
|
const result = await response.handle('test', context);
|
|
assert.strictEqual(getTextContent(result[0]), `# test response`);
|
|
});
|
|
});
|
|
|
|
it('adds a prompt dialog', async t => {
|
|
await withMcpContext(async (response, context) => {
|
|
const page = context.getSelectedPage();
|
|
const dialogPromise = new Promise<void>(resolve => {
|
|
page.on('dialog', () => {
|
|
resolve();
|
|
});
|
|
});
|
|
page.evaluate(() => {
|
|
prompt('message', 'default');
|
|
});
|
|
await dialogPromise;
|
|
const result = await response.handle('test', context);
|
|
await context.getDialog()?.dismiss();
|
|
t.assert.snapshot?.(getTextContent(result[0]));
|
|
});
|
|
});
|
|
|
|
it('adds an alert dialog', async t => {
|
|
await withMcpContext(async (response, context) => {
|
|
const page = context.getSelectedPage();
|
|
const dialogPromise = new Promise<void>(resolve => {
|
|
page.on('dialog', () => {
|
|
resolve();
|
|
});
|
|
});
|
|
page.evaluate(() => {
|
|
alert('message');
|
|
});
|
|
await dialogPromise;
|
|
const result = await response.handle('test', context);
|
|
await context.getDialog()?.dismiss();
|
|
t.assert.snapshot?.(getTextContent(result[0]));
|
|
});
|
|
});
|
|
|
|
it('add network requests when setting is true', async t => {
|
|
await withMcpContext(async (response, context) => {
|
|
response.setIncludeNetworkRequests(true);
|
|
context.getNetworkRequests = () => {
|
|
return [getMockRequest({stableId: 1}), getMockRequest({stableId: 2})];
|
|
};
|
|
const result = await response.handle('test', context);
|
|
t.assert.snapshot?.(getTextContent(result[0]));
|
|
});
|
|
});
|
|
|
|
it('does not include network requests when setting is false', async () => {
|
|
await withMcpContext(async (response, context) => {
|
|
response.setIncludeNetworkRequests(false);
|
|
context.getNetworkRequests = () => {
|
|
return [getMockRequest()];
|
|
};
|
|
const result = await response.handle('test', context);
|
|
assert.strictEqual(getTextContent(result[0]), `# test response`);
|
|
});
|
|
});
|
|
|
|
it('add network request when attached with POST data', async t => {
|
|
await withMcpContext(async (response, context) => {
|
|
response.setIncludeNetworkRequests(true);
|
|
const httpResponse = getMockResponse();
|
|
httpResponse.buffer = () => {
|
|
return Promise.resolve(Buffer.from(JSON.stringify({response: 'body'})));
|
|
};
|
|
httpResponse.headers = () => {
|
|
return {
|
|
'Content-Type': 'application/json',
|
|
};
|
|
};
|
|
const request = getMockRequest({
|
|
method: 'POST',
|
|
hasPostData: true,
|
|
postData: JSON.stringify({request: 'body'}),
|
|
response: httpResponse,
|
|
});
|
|
context.getNetworkRequests = () => {
|
|
return [request];
|
|
};
|
|
context.getNetworkRequestById = () => {
|
|
return request;
|
|
};
|
|
response.attachNetworkRequest(1);
|
|
|
|
const result = await response.handle('test', context);
|
|
|
|
t.assert.snapshot?.(getTextContent(result[0]));
|
|
});
|
|
});
|
|
|
|
it('add network request when attached', async t => {
|
|
await withMcpContext(async (response, context) => {
|
|
response.setIncludeNetworkRequests(true);
|
|
const request = getMockRequest();
|
|
context.getNetworkRequests = () => {
|
|
return [request];
|
|
};
|
|
context.getNetworkRequestById = () => {
|
|
return request;
|
|
};
|
|
response.attachNetworkRequest(1);
|
|
const result = await response.handle('test', context);
|
|
t.assert.snapshot?.(getTextContent(result[0]));
|
|
});
|
|
});
|
|
|
|
it('adds console messages when the setting is true', async t => {
|
|
await withMcpContext(async (response, context) => {
|
|
response.setIncludeConsoleData(true);
|
|
const page = context.getSelectedPage();
|
|
const consoleMessagePromise = new Promise<void>(resolve => {
|
|
page.on('console', () => {
|
|
resolve();
|
|
});
|
|
});
|
|
page.evaluate(() => {
|
|
console.log('Hello from the test');
|
|
});
|
|
await consoleMessagePromise;
|
|
const result = await response.handle('test', context);
|
|
assert.ok(getTextContent(result[0]));
|
|
t.assert.snapshot?.(getTextContent(result[0]));
|
|
});
|
|
});
|
|
|
|
it('adds a message when no console messages exist', async t => {
|
|
await withMcpContext(async (response, context) => {
|
|
response.setIncludeConsoleData(true);
|
|
const result = await response.handle('test', context);
|
|
assert.ok(getTextContent(result[0]));
|
|
t.assert.snapshot?.(getTextContent(result[0]));
|
|
});
|
|
});
|
|
|
|
it("doesn't list the issue message if mapping returns null", async () => {
|
|
await withMcpContext(async (response, context) => {
|
|
const mockAggregatedIssue = getMockAggregatedIssue();
|
|
const mockDescription = {
|
|
file: 'not-existing-description-file.md',
|
|
links: [],
|
|
};
|
|
mockAggregatedIssue.getDescription.returns(mockDescription);
|
|
response.setIncludeConsoleData(true);
|
|
context.getConsoleData = () => {
|
|
return [mockAggregatedIssue];
|
|
};
|
|
|
|
const result = await response.handle('test', context);
|
|
const text = getTextContent(result[0]);
|
|
assert.ok(text.includes('<no console messages found>'));
|
|
});
|
|
});
|
|
|
|
it('throws error if mapping returns null on get issue details', async () => {
|
|
await withMcpContext(async (response, context) => {
|
|
const mockAggregatedIssue = getMockAggregatedIssue();
|
|
const mockDescription = {
|
|
file: 'not-existing-description-file.md',
|
|
links: [],
|
|
};
|
|
mockAggregatedIssue.getDescription.returns(mockDescription);
|
|
response.attachConsoleMessage(1);
|
|
context.getConsoleMessageById = () => {
|
|
return mockAggregatedIssue;
|
|
};
|
|
|
|
try {
|
|
await response.handle('test', context);
|
|
} catch (e) {
|
|
assert.ok(e.message.includes("Can't provide detals for the msgid 1"));
|
|
}
|
|
});
|
|
});
|
|
});
|
|
|
|
describe('McpResponse network request filtering', () => {
|
|
it('filters network requests by resource type', async t => {
|
|
await withMcpContext(async (response, context) => {
|
|
response.setIncludeNetworkRequests(true, {
|
|
resourceTypes: ['script', 'stylesheet'],
|
|
});
|
|
context.getNetworkRequests = () => {
|
|
return [
|
|
getMockRequest({resourceType: 'script'}),
|
|
getMockRequest({resourceType: 'image'}),
|
|
getMockRequest({resourceType: 'stylesheet'}),
|
|
getMockRequest({resourceType: 'document'}),
|
|
];
|
|
};
|
|
const result = await response.handle('test', context);
|
|
t.assert.snapshot?.(getTextContent(result[0]));
|
|
});
|
|
});
|
|
|
|
it('filters network requests by single resource type', async t => {
|
|
await withMcpContext(async (response, context) => {
|
|
response.setIncludeNetworkRequests(true, {
|
|
resourceTypes: ['image'],
|
|
});
|
|
context.getNetworkRequests = () => {
|
|
return [
|
|
getMockRequest({resourceType: 'script'}),
|
|
getMockRequest({resourceType: 'image'}),
|
|
getMockRequest({resourceType: 'stylesheet'}),
|
|
];
|
|
};
|
|
const result = await response.handle('test', context);
|
|
t.assert.snapshot?.(getTextContent(result[0]));
|
|
});
|
|
});
|
|
|
|
it('shows no requests when filter matches nothing', async t => {
|
|
await withMcpContext(async (response, context) => {
|
|
response.setIncludeNetworkRequests(true, {
|
|
resourceTypes: ['font'],
|
|
});
|
|
context.getNetworkRequests = () => {
|
|
return [
|
|
getMockRequest({resourceType: 'script'}),
|
|
getMockRequest({resourceType: 'image'}),
|
|
getMockRequest({resourceType: 'stylesheet'}),
|
|
];
|
|
};
|
|
const result = await response.handle('test', context);
|
|
t.assert.snapshot?.(getTextContent(result[0]));
|
|
});
|
|
});
|
|
|
|
it('shows all requests when no filters are provided', async t => {
|
|
await withMcpContext(async (response, context) => {
|
|
response.setIncludeNetworkRequests(true);
|
|
context.getNetworkRequests = () => {
|
|
return [
|
|
getMockRequest({resourceType: 'script'}),
|
|
getMockRequest({resourceType: 'image'}),
|
|
getMockRequest({resourceType: 'stylesheet'}),
|
|
getMockRequest({resourceType: 'document'}),
|
|
getMockRequest({resourceType: 'font'}),
|
|
];
|
|
};
|
|
const result = await response.handle('test', context);
|
|
|
|
t.assert.snapshot?.(getTextContent(result[0]));
|
|
});
|
|
});
|
|
|
|
it('shows all requests when empty resourceTypes array is provided', async t => {
|
|
await withMcpContext(async (response, context) => {
|
|
response.setIncludeNetworkRequests(true, {
|
|
resourceTypes: [],
|
|
});
|
|
context.getNetworkRequests = () => {
|
|
return [
|
|
getMockRequest({resourceType: 'script'}),
|
|
getMockRequest({resourceType: 'image'}),
|
|
getMockRequest({resourceType: 'stylesheet'}),
|
|
getMockRequest({resourceType: 'document'}),
|
|
getMockRequest({resourceType: 'font'}),
|
|
];
|
|
};
|
|
const result = await response.handle('test', context);
|
|
t.assert.snapshot?.(getTextContent(result[0]));
|
|
});
|
|
});
|
|
});
|
|
|
|
describe('McpResponse network pagination', () => {
|
|
it('returns all requests when pagination is not provided', async () => {
|
|
await withMcpContext(async (response, context) => {
|
|
const requests = Array.from({length: 5}, () => getMockRequest());
|
|
context.getNetworkRequests = () => requests;
|
|
response.setIncludeNetworkRequests(true);
|
|
const result = await response.handle('test', context);
|
|
const text = getTextContent(result[0]);
|
|
assert.ok(text.includes('Showing 1-5 of 5 (Page 1 of 1).'));
|
|
assert.ok(!text.includes('Next page:'));
|
|
assert.ok(!text.includes('Previous page:'));
|
|
});
|
|
});
|
|
|
|
it('returns first page by default', async () => {
|
|
await withMcpContext(async (response, context) => {
|
|
const requests = Array.from({length: 30}, (_, idx) =>
|
|
getMockRequest({method: `GET-${idx}`}),
|
|
);
|
|
context.getNetworkRequests = () => {
|
|
return requests;
|
|
};
|
|
response.setIncludeNetworkRequests(true, {pageSize: 10});
|
|
const result = await response.handle('test', context);
|
|
const text = getTextContent(result[0]);
|
|
assert.ok(text.includes('Showing 1-10 of 30 (Page 1 of 3).'));
|
|
assert.ok(text.includes('Next page: 1'));
|
|
assert.ok(!text.includes('Previous page:'));
|
|
});
|
|
});
|
|
|
|
it('returns subsequent page when pageIdx provided', async () => {
|
|
await withMcpContext(async (response, context) => {
|
|
const requests = Array.from({length: 25}, (_, idx) =>
|
|
getMockRequest({method: `GET-${idx}`}),
|
|
);
|
|
context.getNetworkRequests = () => requests;
|
|
response.setIncludeNetworkRequests(true, {
|
|
pageSize: 10,
|
|
pageIdx: 1,
|
|
});
|
|
const result = await response.handle('test', context);
|
|
const text = getTextContent(result[0]);
|
|
assert.ok(text.includes('Showing 11-20 of 25 (Page 2 of 3).'));
|
|
assert.ok(text.includes('Next page: 2'));
|
|
assert.ok(text.includes('Previous page: 0'));
|
|
});
|
|
});
|
|
|
|
it('handles invalid page number by showing first page', async () => {
|
|
await withMcpContext(async (response, context) => {
|
|
const requests = Array.from({length: 5}, () => getMockRequest());
|
|
context.getNetworkRequests = () => requests;
|
|
response.setIncludeNetworkRequests(true, {
|
|
pageSize: 2,
|
|
pageIdx: 10, // Invalid page number
|
|
});
|
|
const result = await response.handle('test', context);
|
|
const text = getTextContent(result[0]);
|
|
assert.ok(
|
|
text.includes('Invalid page number provided. Showing first page.'),
|
|
);
|
|
assert.ok(text.includes('Showing 1-2 of 5 (Page 1 of 3).'));
|
|
});
|
|
});
|
|
});
|