chrome-devtools-mcp 1.11.0 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (389) hide show
  1. package/README.md +73 -21
  2. package/{build → out/Default/gen}/src/BrowserManager.js +49 -18
  3. package/out/Default/gen/src/LogpointManager.js +307 -0
  4. package/{build → out/Default/gen}/src/McpContext.js +439 -133
  5. package/{build → out/Default/gen}/src/McpPage.js +368 -59
  6. package/{build → out/Default/gen}/src/McpResponse.js +90 -47
  7. package/out/Default/gen/src/NetworkOverrideManager.js +419 -0
  8. package/{build → out/Default/gen}/src/TextSnapshot.js +37 -18
  9. package/out/Default/gen/src/ToolHandler.js +512 -0
  10. package/{build → out/Default/gen}/src/bin/chrome-devtools-mcp-main.js +6 -4
  11. package/{build → out/Default/gen}/src/bin/chrome-devtools.js +4 -4
  12. package/{build → out/Default/gen}/src/collectors/PageCollector.js +28 -12
  13. package/{build → out/Default/gen}/src/collectors/ServiceWorkerCollector.js +2 -2
  14. package/out/Default/gen/src/collectors/constants.js +7 -0
  15. package/out/Default/gen/src/config/ConfigParser.js +162 -0
  16. package/{build → out/Default/gen}/src/config/ConfigWatcher.js +3 -2
  17. package/out/Default/gen/src/config/ServerConfig.js +251 -0
  18. package/{build → out/Default/gen}/src/config/browser-options.js +13 -4
  19. package/{build → out/Default/gen}/src/config/category-options.js +10 -0
  20. package/{build → out/Default/gen}/src/config/cli-options.js +223 -22
  21. package/{build → out/Default/gen}/src/config/mcp-options.js +62 -36
  22. package/{build → out/Default/gen}/src/config/puppeteer-options.js +4 -2
  23. package/{build → out/Default/gen}/src/daemon/client.js +3 -3
  24. package/{build → out/Default/gen}/src/daemon/daemon.js +7 -3
  25. package/{build → out/Default/gen}/src/daemon/utils.js +2 -1
  26. package/{build → out/Default/gen}/src/devtools/DevToolsCommentBridge.js +28 -5
  27. package/{build → out/Default/gen}/src/devtools/DevtoolsUtils.js +94 -20
  28. package/{build → out/Default/gen}/src/formatters/ConsoleFormatter.js +28 -1
  29. package/{build → out/Default/gen}/src/formatters/HeapSnapshotFormatter.js +14 -18
  30. package/out/Default/gen/src/formatters/LogpointFormatter.js +62 -0
  31. package/{build → out/Default/gen}/src/formatters/NetworkFormatter.js +70 -17
  32. package/out/Default/gen/src/formatters/NetworkOverridesFormatter.js +49 -0
  33. package/out/Default/gen/src/formatters/RemoteObjectFormatter.js +231 -0
  34. package/{build → out/Default/gen}/src/formatters/SnapshotFormatter.js +13 -3
  35. package/out/Default/gen/src/formatters/WebAuthnFormatter.js +56 -0
  36. package/out/Default/gen/src/index.js +435 -0
  37. package/out/Default/gen/src/processors/HeapSnapshotManager.js +569 -0
  38. package/{build → out/Default/gen}/src/telemetry/transformation.js +1 -1
  39. package/{build → out/Default/gen}/src/third_party/THIRD_PARTY_NOTICES +796 -712
  40. package/out/Default/gen/src/third_party/bundled-packages.json +11 -0
  41. package/out/Default/gen/src/third_party/cli.js +9023 -0
  42. package/out/Default/gen/src/third_party/devtools-formatter-worker.js +31904 -0
  43. package/out/Default/gen/src/third_party/devtools-heap-snapshot-worker.js +26467 -0
  44. package/out/Default/gen/src/third_party/index.js +201574 -0
  45. package/out/Default/gen/src/third_party/lighthouse-devtools-mcp-bundle.js +60395 -0
  46. package/out/Default/gen/src/tools/ToolDefinition.js +180 -0
  47. package/{build → out/Default/gen}/src/tools/categories.js +4 -0
  48. package/{build → out/Default/gen}/src/tools/comments.js +46 -4
  49. package/{build → out/Default/gen}/src/tools/console.js +8 -6
  50. package/{build → out/Default/gen}/src/tools/css.js +1 -0
  51. package/{build → out/Default/gen}/src/tools/emulation.js +5 -4
  52. package/{build → out/Default/gen}/src/tools/extensions.js +6 -1
  53. package/{build → out/Default/gen}/src/tools/input.js +23 -28
  54. package/{build → out/Default/gen}/src/tools/lighthouse.js +30 -8
  55. package/out/Default/gen/src/tools/logpoints.js +51 -0
  56. package/{build → out/Default/gen}/src/tools/memory.js +59 -53
  57. package/out/Default/gen/src/tools/network.js +260 -0
  58. package/{build → out/Default/gen}/src/tools/pages.js +48 -6
  59. package/{build → out/Default/gen}/src/tools/performance.js +33 -7
  60. package/{build → out/Default/gen}/src/tools/pwa.js +7 -0
  61. package/{build → out/Default/gen}/src/tools/screencast.js +3 -1
  62. package/{build → out/Default/gen}/src/tools/screenshot.js +23 -7
  63. package/{build → out/Default/gen}/src/tools/script.js +38 -6
  64. package/{build → out/Default/gen}/src/tools/slim/tools.js +21 -5
  65. package/{build → out/Default/gen}/src/tools/snapshot.js +29 -5
  66. package/{build → out/Default/gen}/src/tools/thirdPartyDeveloper.js +6 -20
  67. package/out/Default/gen/src/tools/toolNames.js +10 -0
  68. package/{build → out/Default/gen}/src/tools/tools.js +4 -0
  69. package/out/Default/gen/src/tools/webauthn.js +51 -0
  70. package/{build → out/Default/gen}/src/tools/webmcp.js +5 -19
  71. package/out/Default/gen/src/utils/TaskRunner.js +151 -0
  72. package/{build → out/Default/gen}/src/utils/WaitForHelper.js +16 -2
  73. package/{build → out/Default/gen}/src/utils/bytes.js +2 -12
  74. package/{build → out/Default/gen}/src/utils/check-for-updates.js +8 -2
  75. package/out/Default/gen/src/utils/disclaimers.js +27 -0
  76. package/{build → out/Default/gen}/src/utils/errorHandling.js +3 -0
  77. package/{build → out/Default/gen}/src/utils/keyboard.js +15 -5
  78. package/out/Default/gen/src/utils/logger.js +131 -0
  79. package/out/Default/gen/src/utils/network.js +81 -0
  80. package/out/Default/gen/src/utils/raceWithSignal.js +26 -0
  81. package/out/Default/gen/src/utils/resourceType.js +27 -0
  82. package/out/Default/gen/src/utils/text.js +44 -0
  83. package/out/Default/gen/src/utils/timeout.js +14 -0
  84. package/{build → out/Default/gen}/src/utils/url.js +73 -17
  85. package/{build → out/Default/gen}/src/version.js +1 -1
  86. package/package.json +26 -32
  87. package/skills/a11y-debugging/SKILL.md +3 -8
  88. package/skills/chrome-devtools/SKILL.md +2 -0
  89. package/skills/chrome-devtools-cli/SKILL.md +12 -1
  90. package/build/src/ToolHandler.js +0 -360
  91. package/build/src/config/ConfigParser.js +0 -264
  92. package/build/src/index.js +0 -282
  93. package/build/src/processors/HeapSnapshotManager.js +0 -307
  94. package/build/src/third_party/bundled-packages.json +0 -11
  95. package/build/src/third_party/devtools-formatter-worker.js +0 -16625
  96. package/build/src/third_party/devtools-heap-snapshot-worker.js +0 -12084
  97. package/build/src/third_party/index.js +0 -189603
  98. package/build/src/third_party/lighthouse-devtools-mcp-bundle.js +0 -58435
  99. package/build/src/tools/ToolDefinition.js +0 -92
  100. package/build/src/tools/network.js +0 -128
  101. package/build/src/utils/logger.js +0 -62
  102. package/build/src/utils/text.js +0 -15
  103. /package/{build → out/Default/gen}/src/McpWorker.js +0 -0
  104. /package/{build → out/Default/gen}/src/SlimMcpResponse.js +0 -0
  105. /package/{build → out/Default/gen}/src/bin/check-latest-version.js +0 -0
  106. /package/{build → out/Default/gen}/src/bin/chrome-devtools-mcp.js +0 -0
  107. /package/{build → out/Default/gen}/src/config/ConfigLocator.js +0 -0
  108. /package/{build → out/Default/gen}/src/config/cli-commands.js +0 -0
  109. /package/{build → out/Default/gen}/src/config/tool-options.js +0 -0
  110. /package/{build → out/Default/gen}/src/daemon/types.js +0 -0
  111. /package/{build → out/Default/gen}/src/devtools/McpHostBindingAdapter.js +0 -0
  112. /package/{build → out/Default/gen}/src/devtools/issueDescriptions.js +0 -0
  113. /package/{build → out/Default/gen}/src/formatters/CommentFormatter.js +0 -0
  114. /package/{build → out/Default/gen}/src/formatters/CssFormatter.js +0 -0
  115. /package/{build → out/Default/gen}/src/formatters/IssueFormatter.js +0 -0
  116. /package/{build → out/Default/gen}/src/processors/ChunkedTraceParser.js +0 -0
  117. /package/{build → out/Default/gen}/src/processors/PerformanceTrace.js +0 -0
  118. /package/{build → out/Default/gen}/src/telemetry/ClearcutLogger.js +0 -0
  119. /package/{build → out/Default/gen}/src/telemetry/WatchdogClient.js +0 -0
  120. /package/{build → out/Default/gen}/src/telemetry/errors.js +0 -0
  121. /package/{build → out/Default/gen}/src/telemetry/flagUtils.js +0 -0
  122. /package/{build → out/Default/gen}/src/telemetry/metricsRegistry.js +0 -0
  123. /package/{build → out/Default/gen}/src/telemetry/persistence.js +0 -0
  124. /package/{build → out/Default/gen}/src/telemetry/types.js +0 -0
  125. /package/{build → out/Default/gen}/src/telemetry/watchdog/ClearcutSender.js +0 -0
  126. /package/{build → out/Default/gen}/src/telemetry/watchdog/main.js +0 -0
  127. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/CoepCoopSandboxedIframeCannotNavigateToCoopPage.md +0 -0
  128. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/CoepCorpNotSameOrigin.md +0 -0
  129. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/CoepCorpNotSameOriginAfterDefaultedToSameOriginByCoep.md +0 -0
  130. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/CoepCorpNotSameSite.md +0 -0
  131. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/CoepFrameResourceNeedsCoepHeader.md +0 -0
  132. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/CompatibilityModeQuirks.md +0 -0
  133. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/CookieAttributeValueExceedsMaxSize.md +0 -0
  134. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/LowTextContrast.md +0 -0
  135. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/SameSiteNoneInsecureErrorRead.md +0 -0
  136. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/SameSiteNoneInsecureErrorSet.md +0 -0
  137. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/SameSiteNoneInsecureWarnRead.md +0 -0
  138. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/SameSiteNoneInsecureWarnSet.md +0 -0
  139. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/SameSiteUnspecifiedLaxAllowUnsafeRead.md +0 -0
  140. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/SameSiteUnspecifiedLaxAllowUnsafeSet.md +0 -0
  141. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/bounceTrackingMitigations.md +0 -0
  142. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/clientHintMetaTagAllowListInvalidOrigin.md +0 -0
  143. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/clientHintMetaTagModifiedHTML.md +0 -0
  144. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/connectionAllowlistEmbeddingRequirementNotSatisfied.md +0 -0
  145. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/connectionAllowlistIFrameAttributeLoosensEmbeddingRequirement.md +0 -0
  146. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/connectionAllowlistInvalidAllowConnectionAllowlistFrom.md +0 -0
  147. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/connectionAllowlistInvalidAllowlistItemType.md +0 -0
  148. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/connectionAllowlistInvalidHeader.md +0 -0
  149. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/connectionAllowlistInvalidUrlPattern.md +0 -0
  150. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/connectionAllowlistItemNotInnerList.md +0 -0
  151. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/connectionAllowlistMoreThanOneList.md +0 -0
  152. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/connectionAllowlistReportingEndpointNotToken.md +0 -0
  153. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieCrossSiteRedirectDowngrade.md +0 -0
  154. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieExcludeDomainNonAscii.md +0 -0
  155. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieExcludePortMismatch.md +0 -0
  156. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieExcludeSchemeMismatch.md +0 -0
  157. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieExcludeThirdPartyPhaseoutRead.md +0 -0
  158. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieExcludeThirdPartyPhaseoutSet.md +0 -0
  159. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieWarnDomainNonAscii.md +0 -0
  160. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieWarnMetadataGrantRead.md +0 -0
  161. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieWarnMetadataGrantReadOptOut.md +0 -0
  162. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieWarnMetadataGrantSet.md +0 -0
  163. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieWarnMetadataGrantSetOptOut.md +0 -0
  164. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieWarnThirdPartyPhaseoutRead.md +0 -0
  165. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cookieWarnThirdPartyPhaseoutSet.md +0 -0
  166. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/corsAllowCredentialsRequired.md +0 -0
  167. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/corsDisabledScheme.md +0 -0
  168. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/corsDisallowedByMode.md +0 -0
  169. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/corsHeaderDisallowedByPreflightResponse.md +0 -0
  170. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/corsInvalidHeaderValues.md +0 -0
  171. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/corsLocalNetworkAccessPermissionDenied.md +0 -0
  172. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/corsMethodDisallowedByPreflightResponse.md +0 -0
  173. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/corsNoCorsRedirectModeNotFollow.md +0 -0
  174. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/corsOriginMismatch.md +0 -0
  175. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/corsPreflightResponseInvalid.md +0 -0
  176. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/corsRedirectContainsCredentials.md +0 -0
  177. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/corsWildcardOriginNotAllowed.md +0 -0
  178. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cspEvalViolation.md +0 -0
  179. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cspInlineViolation.md +0 -0
  180. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cspTrustedTypesPolicyViolation.md +0 -0
  181. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cspTrustedTypesSinkViolation.md +0 -0
  182. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/cspURLViolation.md +0 -0
  183. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/deprecation.md +0 -0
  184. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestAccountsEmptyList.md +0 -0
  185. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestAccountsHttpNotFound.md +0 -0
  186. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestAccountsInvalidContentType.md +0 -0
  187. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestAccountsInvalidResponse.md +0 -0
  188. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestAccountsNoResponse.md +0 -0
  189. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestDnsFetchFailed.md +0 -0
  190. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestDnsInvalidRecord.md +0 -0
  191. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownHttpNotFound.md +0 -0
  192. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownInvalidContentType.md +0 -0
  193. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownInvalidResponse.md +0 -0
  194. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownNoResponse.md +0 -0
  195. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestInvalidEmail.md +0 -0
  196. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestJwksHttpNotFound.md +0 -0
  197. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestJwksInvalidResponse.md +0 -0
  198. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestKeyBindingSigningFailed.md +0 -0
  199. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestRpOriginIsOpaque.md +0 -0
  200. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenHttpNotFound.md +0 -0
  201. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenInvalidContentType.md +0 -0
  202. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenInvalidResponse.md +0 -0
  203. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenInvalidSdJwt.md +0 -0
  204. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenMalformedSdJwt.md +0 -0
  205. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenNoResponse.md +0 -0
  206. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidAudience.md +0 -0
  207. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidIssuedAt.md +0 -0
  208. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidNonce.md +0 -0
  209. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidSdHash.md +0 -0
  210. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidTyp.md +0 -0
  211. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingAud.md +0 -0
  212. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingCnf.md +0 -0
  213. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingIat.md +0 -0
  214. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingNonce.md +0 -0
  215. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingSdHash.md +0 -0
  216. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbSignatureFailed.md +0 -0
  217. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidEmail.md +0 -0
  218. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidEmailVerified.md +0 -0
  219. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidHolderKey.md +0 -0
  220. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidIssuedAt.md +0 -0
  221. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidIssuer.md +0 -0
  222. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtJwksMissingKeys.md +0 -0
  223. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingCnf.md +0 -0
  224. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingEmail.md +0 -0
  225. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingIat.md +0 -0
  226. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingIss.md +0 -0
  227. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtSignatureFailed.md +0 -0
  228. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtUnsupportedHeaderAlg.md +0 -0
  229. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestUserLoggedOut.md +0 -0
  230. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestWellKnownAccountsEndpointCrossOrigin.md +0 -0
  231. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestWellKnownHttpNotFound.md +0 -0
  232. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestWellKnownInvalidContentType.md +0 -0
  233. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestWellKnownInvalidResponse.md +0 -0
  234. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestWellKnownIssuanceEndpointCrossOrigin.md +0 -0
  235. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestWellKnownListEmpty.md +0 -0
  236. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestWellKnownMissingAccountsEndpoint.md +0 -0
  237. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestWellKnownMissingIssuanceEndpoint.md +0 -0
  238. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestWellKnownNoResponse.md +0 -0
  239. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/emailVerificationRequestWellKnownUnsupportedSigningAlgorithm.md +0 -0
  240. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestAccountsBlockedByConnectionAllowlist.md +0 -0
  241. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestAccountsHttpNotFound.md +0 -0
  242. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestAccountsInvalidResponse.md +0 -0
  243. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestAccountsNoResponse.md +0 -0
  244. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestApprovalDeclined.md +0 -0
  245. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestCanceled.md +0 -0
  246. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestConfigBlockedByConnectionAllowlist.md +0 -0
  247. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestErrorFetchingSignin.md +0 -0
  248. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestErrorIdToken.md +0 -0
  249. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestIdTokenBlockedByConnectionAllowlist.md +0 -0
  250. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestIdTokenHttpNotFound.md +0 -0
  251. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidRequest.md +0 -0
  252. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidResponse.md +0 -0
  253. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestIdTokenNoResponse.md +0 -0
  254. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestInvalidSigninResponse.md +0 -0
  255. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestManifestHttpNotFound.md +0 -0
  256. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestManifestInvalidResponse.md +0 -0
  257. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestManifestNoResponse.md +0 -0
  258. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestTooManyRequests.md +0 -0
  259. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthRequestWellKnownBlockedByConnectionAllowlist.md +0 -0
  260. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidAccountsResponse.md +0 -0
  261. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidConfigOrWellKnown.md +0 -0
  262. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoAccountSharingPermission.md +0 -0
  263. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoApiPermission.md +0 -0
  264. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoReturningUserFromFetchedAccounts.md +0 -0
  265. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotIframe.md +0 -0
  266. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotPotentiallyTrustworthy.md +0 -0
  267. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSameOrigin.md +0 -0
  268. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSignedInWithIdp.md +0 -0
  269. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/fetchingPartitionedBlobURL.md +0 -0
  270. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericBackUINavigationWouldSkipAd.md +0 -0
  271. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormAriaLabelledByToNonExistingIdError.md +0 -0
  272. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormAutocompleteAttributeEmptyError.md +0 -0
  273. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormDuplicateIdForInputError.md +0 -0
  274. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormEmptyIdAndNameAttributesForInputError.md +0 -0
  275. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormInputAssignedAutocompleteValueToIdOrNameAttributeError.md +0 -0
  276. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormInputHasWrongButWellIntendedAutocompleteValueError.md +0 -0
  277. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormInputWithNoLabelError.md +0 -0
  278. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormLabelForMatchesNonExistingIdError.md +0 -0
  279. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormLabelForNameError.md +0 -0
  280. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormLabelHasNeitherForNorNestedInputError.md +0 -0
  281. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormModelContextMissingToolDescription.md +0 -0
  282. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormModelContextMissingToolName.md +0 -0
  283. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormModelContextParameterMissingName.md +0 -0
  284. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormModelContextParameterMissingTitleAndDescription.md +0 -0
  285. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericFormModelContextRequiredParameterMissingName.md +0 -0
  286. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericGeolocationPromptWithoutUserGesture.md +0 -0
  287. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericNavigationEntryMarkedSkippable.md +0 -0
  288. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/genericResponseWasBlockedByORB.md +0 -0
  289. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/heavyAd.md +0 -0
  290. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/lazyLoadImageZeroSize.md +0 -0
  291. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/mixedContent.md +0 -0
  292. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/navigatingPartitionedBlobURL.md +0 -0
  293. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementActivationDisabled.md +0 -0
  294. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluder.md +0 -0
  295. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluderParent.md +0 -0
  296. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementCspFrameAncestorsMissing.md +0 -0
  297. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementFencedFrameDisallowed.md +0 -0
  298. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementFontSizeTooLarge.md +0 -0
  299. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementFontSizeTooSmall.md +0 -0
  300. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementGeolocationDeprecated.md +0 -0
  301. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementInsetBoxShadowUnsupported.md +0 -0
  302. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementInvalidDisplayStyle.md +0 -0
  303. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementInvalidSizeValue.md +0 -0
  304. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementInvalidType.md +0 -0
  305. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementInvalidTypeActivation.md +0 -0
  306. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementLowContrast.md +0 -0
  307. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementNonOpaqueColor.md +0 -0
  308. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementPaddingBottomUnsupported.md +0 -0
  309. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementPaddingRightUnsupported.md +0 -0
  310. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementPermissionsPolicyBlocked.md +0 -0
  311. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementRegistrationFailed.md +0 -0
  312. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementRequestInProgress.md +0 -0
  313. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementSecurityChecksFailed.md +0 -0
  314. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementTypeNotSupported.md +0 -0
  315. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/permissionElementUntrustedEvent.md +0 -0
  316. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/placeholderDescriptionForInvisibleIssues.md +0 -0
  317. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/propertyRuleInvalidNameIssue.md +0 -0
  318. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/propertyRuleIssue.md +0 -0
  319. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedOptGroupChild.md +0 -0
  320. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedSelectChild.md +0 -0
  321. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentAttributesSelectDescendant.md +0 -0
  322. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentLegendChild.md +0 -0
  323. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentOptionChild.md +0 -0
  324. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/selectElementAccessibilityNonPhrasingContentOptionChild.md +0 -0
  325. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/selectivePermissionsIntervention.md +0 -0
  326. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedArrayBuffer.md +0 -0
  327. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryUseErrorCrossOriginNoCorsRequest.md +0 -0
  328. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryUseErrorDictionaryLoadFailure.md +0 -0
  329. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryUseErrorMatchingDictionaryNotUsed.md +0 -0
  330. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryUseErrorUnexpectedContentDictionaryHeader.md +0 -0
  331. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorCossOriginNoCorsRequest.md +0 -0
  332. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorDisallowedBySettings.md +0 -0
  333. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorExpiredResponse.md +0 -0
  334. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorFeatureDisabled.md +0 -0
  335. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInsufficientResources.md +0 -0
  336. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidMatchField.md +0 -0
  337. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidStructuredHeader.md +0 -0
  338. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidTTLField.md +0 -0
  339. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNavigationRequest.md +0 -0
  340. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNoMatchField.md +0 -0
  341. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonIntegerTTLField.md +0 -0
  342. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonListMatchDestField.md +0 -0
  343. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonSecureContext.md +0 -0
  344. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringIdField.md +0 -0
  345. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringInMatchDestList.md +0 -0
  346. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringMatchField.md +0 -0
  347. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonTokenTypeField.md +0 -0
  348. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorRequestAborted.md +0 -0
  349. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorShuttingDown.md +0 -0
  350. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorTooLongIdField.md +0 -0
  351. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sharedDictionaryWriteErrorUnsupportedType.md +0 -0
  352. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriInvalidSignatureHeader.md +0 -0
  353. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriInvalidSignatureInputHeader.md +0 -0
  354. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriMissingSignatureHeader.md +0 -0
  355. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriMissingSignatureInputHeader.md +0 -0
  356. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureHeaderValueIsIncorrectLength.md +0 -0
  357. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureHeaderValueIsNotByteSequence.md +0 -0
  358. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureHeaderValueIsParameterized.md +0 -0
  359. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentName.md +0 -0
  360. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentType.md +0 -0
  361. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidDerivedComponentParameter.md +0 -0
  362. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidHeaderComponentParameter.md +0 -0
  363. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidParameter.md +0 -0
  364. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureInputHeaderKeyIdLength.md +0 -0
  365. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingLabel.md +0 -0
  366. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingRequiredParameters.md +0 -0
  367. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureInputHeaderValueMissingComponents.md +0 -0
  368. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriSignatureInputHeaderValueNotInnerList.md +0 -0
  369. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriValidationFailedIntegrityMismatch.md +0 -0
  370. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriValidationFailedInvalidLength.md +0 -0
  371. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriValidationFailedSignatureExpired.md +0 -0
  372. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/sriValidationFailedSignatureMismatch.md +0 -0
  373. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/stylesheetLateImport.md +0 -0
  374. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/stylesheetRequestFailed.md +0 -0
  375. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/summaryElementAccessibilityInteractiveContentSummaryDescendant.md +0 -0
  376. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestLength.md +0 -0
  377. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestType.md +0 -0
  378. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/unencodedDigestMalformedDictionary.md +0 -0
  379. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/unencodedDigestUnknownAlgorithm.md +0 -0
  380. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/webInstallManifestMissingId.md +0 -0
  381. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/webInstallManifestMissingNameOrShortName.md +0 -0
  382. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/webInstallManifestParsingOrNetworkError.md +0 -0
  383. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/webInstallNoManifest.md +0 -0
  384. /package/{build → out/Default/gen}/src/third_party/issue-descriptions/webInstallStartUrlInvalid.md +0 -0
  385. /package/{build → out/Default/gen}/src/types.js +0 -0
  386. /package/{build → out/Default/gen}/src/utils/files.js +0 -0
  387. /package/{build → out/Default/gen}/src/utils/id.js +0 -0
  388. /package/{build → out/Default/gen}/src/utils/pagination.js +0 -0
  389. /package/{build → out/Default/gen}/src/utils/polyfill.js +0 -0
@@ -4,7 +4,8 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import path from 'node:path';
7
- import { lighthouseRunner, generateReport, zod, } from '../third_party/index.js';
7
+ import { NetworkOverridesFormatter } from '../formatters/NetworkOverridesFormatter.js';
8
+ import { generateReport, zod, } from '../third_party/index.js';
8
9
  import { ToolCategory } from './categories.js';
9
10
  import { startTrace } from './performance.js';
10
11
  import { definePageTool, } from './ToolDefinition.js';
@@ -21,6 +22,12 @@ const MAX_NODES_PER_AUDIT = 10;
21
22
  const isRecord = (value) => {
22
23
  return typeof value === 'object' && value !== null;
23
24
  };
25
+ // Lighthouse's navigation mode only accepts the URL schemes in
26
+ // `allowedProtocols` (core/lib/url-utils.js) and throws a bare `INVALID_URL`
27
+ // for anything else, such as file:// or about:blank.
28
+ const isInvalidUrlError = (error) => {
29
+ return isRecord(error) && error.code === 'INVALID_URL';
30
+ };
24
31
  const getString = (value) => {
25
32
  return typeof value === 'string' ? value : undefined;
26
33
  };
@@ -144,6 +151,7 @@ export const lighthouseAudit = definePageTool((args) => ({
144
151
  .describe('Directory for reports. If omitted, uses temporary files.'),
145
152
  },
146
153
  blockedByDialog: true,
154
+ concurrency: 'exclusive',
147
155
  verifyFilesSchema: {
148
156
  outputDirPath: true,
149
157
  },
@@ -188,14 +196,19 @@ export const lighthouseAudit = definePageTool((args) => ({
188
196
  let result;
189
197
  try {
190
198
  if (mode === 'navigation') {
191
- result = await lighthouseRunner.navigation(page.pptrPage, page.pptrPage.url(), {
192
- flags,
193
- });
199
+ try {
200
+ result = await page.lighthouseNavigation(flags);
201
+ }
202
+ catch (error) {
203
+ if (isInvalidUrlError(error)) {
204
+ const url = page.pptrPage.url();
205
+ throw new Error(`Lighthouse "navigation" mode cannot audit ${url}: it only supports http:, https:, chrome: and chrome-extension: URLs. Use mode "snapshot" to audit the page in its current state.`, { cause: error });
206
+ }
207
+ throw error;
208
+ }
194
209
  }
195
210
  else {
196
- result = await lighthouseRunner.snapshot(page.pptrPage, {
197
- flags,
198
- });
211
+ result = await page.lighthouseSnapshot(flags);
199
212
  }
200
213
  if (!result) {
201
214
  throw new Error('Lighthouse audit failed.');
@@ -205,10 +218,15 @@ export const lighthouseAudit = definePageTool((args) => ({
205
218
  await page.restoreEmulation();
206
219
  }
207
220
  const lhr = result.lhr;
221
+ const { warning } = new NetworkOverridesFormatter(page.listNetworkMocks()).toJSON();
222
+ if (warning) {
223
+ lhr.runWarnings.push(warning);
224
+ response.appendResponseLine(warning);
225
+ }
208
226
  const reportPaths = [];
209
227
  const encoder = new TextEncoder();
210
228
  const savePromises = formats.map(async (format) => {
211
- const report = generateReport(lhr, format);
229
+ const report = await generateReport(lhr, format);
212
230
  const data = encoder.encode(report);
213
231
  if (outputDirPath) {
214
232
  const reportPath = path.join(outputDirPath, `report`);
@@ -225,6 +243,10 @@ export const lighthouseAudit = definePageTool((args) => ({
225
243
  }
226
244
  reportPaths.push(res.value);
227
245
  }
246
+ // Lighthouse sets runtimeError when it could not load the page; the categories are unscored.
247
+ if (lhr.runtimeError) {
248
+ throw new Error(`Lighthouse could not audit the page (${lhr.runtimeError.code}): ${lhr.runtimeError.message} Reports: ${reportPaths.join(', ')}`);
249
+ }
228
250
  const categoryScores = Object.values(lhr.categories).map(c => ({
229
251
  id: c.id,
230
252
  title: c.title,
@@ -0,0 +1,51 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { LogpointFormatter } from '../formatters/LogpointFormatter.js';
7
+ import { LOGPOINT_FORMAT, LogpointError, parseLogpoint, } from '../LogpointManager.js';
8
+ import { zod } from '../third_party/index.js';
9
+ import { ToolCategory } from './categories.js';
10
+ import { definePageTool } from './ToolDefinition.js';
11
+ import { GET_CONSOLE_MESSAGE_TOOL_NAME, LIST_CONSOLE_MESSAGES_TOOL_NAME, } from './toolNames.js';
12
+ const SET_LOGPOINTS_TOOL_NAME = 'set_logpoints';
13
+ export const setLogpoints = definePageTool(() => ({
14
+ name: SET_LOGPOINTS_TOOL_NAME,
15
+ description: `Set the complete set of logpoints of the selected page: logpoints not in the list are removed, new ones are added, and an empty list removes all. A logpoint logs expressions to the console every time a line executes, without pausing or changing the source, like logpoints in the DevTools Sources panel. Locations are script URLs or original source files resolved through source maps (not available with --no-source-maps; scripts in workers and out-of-process iframes are not supported). A location in a generated script moves to its original source line when a source map covers it, and locations on the same line become one logpoint with the last expression. Output appears in ${LIST_CONSOLE_MESSAGES_TOOL_NAME}; an expression that throws produces an error message without text. Logpoints survive reloads and navigations until removed or the page is closed. The response lists the resulting logpoints and where they are bound.`,
16
+ annotations: {
17
+ category: ToolCategory.DEBUGGING,
18
+ readOnlyHint: false,
19
+ conditions: ['javascriptEvaluation'],
20
+ },
21
+ schema: {
22
+ logpoints: zod
23
+ .array(zod.string())
24
+ .describe(`Logpoints formatted as ${LOGPOINT_FORMAT}. The url is a script URL or the path of an original source file from a source map, exact or as a path suffix (e.g. "src/app.ts"). Line and column numbers are 1-based in the coordinates of the url; a line without executable code moves to the next possible location. The expression is evaluated like console.log() arguments in the scope of the location, where local variables are accessible by their original names, and runs before the line executes, so a variable declared on that line is not set yet. ${LIST_CONSOLE_MESSAGES_TOOL_NAME} shows objects as [object Object]: read them with ${GET_CONSOLE_MESSAGE_TOOL_NAME}, or log JSON.stringify(value) for plain data. Example: "src/cart.ts:42 'cart total:', cart.total, cart.items.length". Pass an empty array to remove all logpoints.`),
25
+ },
26
+ blockedByDialog: false,
27
+ concurrency: 'page',
28
+ verifyFilesSchema: {},
29
+ handler: async (request, response) => {
30
+ let logpoints;
31
+ try {
32
+ logpoints = await request.page.setLogpoints(request.params.logpoints.map(parseLogpoint));
33
+ }
34
+ catch (error) {
35
+ if (error instanceof LogpointError) {
36
+ // The other logpoints were applied; report the resulting state.
37
+ response.appendResponseLine(new LogpointFormatter(error.logpoints).toString());
38
+ }
39
+ throw error;
40
+ }
41
+ response.appendResponseLine(new LogpointFormatter(logpoints).toString());
42
+ if (logpoints.length === 0) {
43
+ return;
44
+ }
45
+ if (logpoints.some(logpoint => logpoint.sourceMapped)) {
46
+ response.appendResponseLine('Source-mapped locations are re-resolved automatically when a matching source map loads again (for example after a reload with a regenerated bundle). Note: on the first page load after a rebuild, code that runs during the load itself is not logged yet; if a load-time logpoint stays silent right after a rebuild, reload once more before concluding that the line does not run.');
47
+ }
48
+ response.appendResponseLine(`Logged output appears in ${LIST_CONSOLE_MESSAGES_TOOL_NAME} once a line executes; objects show as [object Object] there, ${GET_CONSOLE_MESSAGE_TOOL_NAME} shows them as JSON.`);
49
+ },
50
+ }));
51
+ //# sourceMappingURL=logpoints.js.map
@@ -7,7 +7,7 @@ import { MAX_NAME_LENGTH } from '../formatters/HeapSnapshotFormatter.js';
7
7
  import { zod } from '../third_party/index.js';
8
8
  import { byteSizeRangeSchema } from '../utils/bytes.js';
9
9
  import { ToolCategory } from './categories.js';
10
- import { definePageTool, defineTool } from './ToolDefinition.js';
10
+ import { defineBrowserlessTool, definePageTool, } from './ToolDefinition.js';
11
11
  const HEAP_SNAPSHOT_FILTERS = [
12
12
  'objectsRetainedByDetachedDomNodes',
13
13
  'objectsRetainedByConsole',
@@ -23,18 +23,19 @@ const maxNameLengthSchema = zod
23
23
  .min(1)
24
24
  .optional()
25
25
  .describe(`Maximum length of names before truncation. Defaults to ${MAX_NAME_LENGTH}.`);
26
+ const DEFAULT_HEAP_SNAPSHOT_PAGE_SIZE = 50;
26
27
  const pageIdxSchema = zod
27
28
  .number()
28
29
  .int()
29
30
  .nonnegative()
30
- .optional()
31
- .describe('The page index for pagination.');
31
+ .default(0)
32
+ .describe('The zero-based page index. Defaults to 0 (the first page).');
32
33
  const pageSizeSchema = zod
33
34
  .number()
34
35
  .int()
35
36
  .positive()
36
- .optional()
37
- .describe('The page size for pagination.');
37
+ .default(DEFAULT_HEAP_SNAPSHOT_PAGE_SIZE)
38
+ .describe(`The maximum number of items to return per page. Defaults to ${DEFAULT_HEAP_SNAPSHOT_PAGE_SIZE}.`);
38
39
  export const takeHeapSnapshot = definePageTool(() => ({
39
40
  name: 'take_heapsnapshot',
40
41
  description: `Capture a heap snapshot of the target page. Use to analyze the memory distribution of JavaScript objects and debug memory leaks.`,
@@ -48,6 +49,7 @@ export const takeHeapSnapshot = definePageTool(() => ({
48
49
  .describe('A path to a .heapsnapshot file to save the heapsnapshot to.'),
49
50
  },
50
51
  blockedByDialog: true,
52
+ concurrency: 'exclusive',
51
53
  verifyFilesSchema: {
52
54
  filePath: true,
53
55
  },
@@ -60,7 +62,7 @@ export const takeHeapSnapshot = definePageTool(() => ({
60
62
  response.appendResponseLine(`Heap snapshot saved to ${snapshotPath}`);
61
63
  },
62
64
  }));
63
- export const getHeapSnapshotSummary = defineTool(() => ({
65
+ export const getHeapSnapshotSummary = defineBrowserlessTool(() => ({
64
66
  name: 'get_heapsnapshot_summary',
65
67
  description: 'Loads and caches a memory heapsnapshot and returns snapshot summary stats, including native contexts and their sizes, and retained by context summary.',
66
68
  annotations: {
@@ -69,7 +71,9 @@ export const getHeapSnapshotSummary = defineTool(() => ({
69
71
  conditions: ['memoryDebugging'],
70
72
  },
71
73
  schema: {
72
- filePath: zod.string().describe('A path to a .heapsnapshot file to read.'),
74
+ filePath: zod
75
+ .string()
76
+ .describe('A path to a .heapsnapshot file to read.'),
73
77
  maxNameLength: maxNameLengthSchema,
74
78
  },
75
79
  blockedByDialog: false,
@@ -86,7 +90,7 @@ export const getHeapSnapshotSummary = defineTool(() => ({
86
90
  });
87
91
  },
88
92
  }));
89
- export const getHeapSnapshotDetails = defineTool(() => ({
93
+ export const getHeapSnapshotDetails = defineBrowserlessTool(() => ({
90
94
  name: 'get_heapsnapshot_details',
91
95
  description: 'Loads and caches a memory heapsnapshot and returns all available information including statistics, static data, and aggregated node information. Supports pagination for aggregates.',
92
96
  annotations: {
@@ -95,7 +99,9 @@ export const getHeapSnapshotDetails = defineTool(() => ({
95
99
  conditions: ['memoryDebugging'],
96
100
  },
97
101
  schema: {
98
- filePath: zod.string().describe('A path to a .heapsnapshot file to read.'),
102
+ filePath: zod
103
+ .string()
104
+ .describe('A path to a .heapsnapshot file to read.'),
99
105
  filterName: zod
100
106
  .enum(HEAP_SNAPSHOT_FILTERS)
101
107
  .optional()
@@ -105,18 +111,8 @@ export const getHeapSnapshotDetails = defineTool(() => ({
105
111
  .optional()
106
112
  .describe('The object ID (nodeId) of the specific native context to filter by when filterName is attributedToSpecificNativeContext.'),
107
113
  maxNameLength: maxNameLengthSchema,
108
- pageIdx: zod
109
- .number()
110
- .int()
111
- .nonnegative()
112
- .optional()
113
- .describe('The page index for pagination of aggregates.'),
114
- pageSize: zod
115
- .number()
116
- .int()
117
- .positive()
118
- .optional()
119
- .describe('The page size for pagination of aggregates.'),
114
+ pageIdx: pageIdxSchema,
115
+ pageSize: pageSizeSchema,
120
116
  },
121
117
  blockedByDialog: false,
122
118
  verifyFilesSchema: {
@@ -131,7 +127,7 @@ export const getHeapSnapshotDetails = defineTool(() => ({
131
127
  });
132
128
  },
133
129
  }));
134
- export const getHeapSnapshotClassNodes = defineTool(() => ({
130
+ export const getHeapSnapshotClassNodes = defineBrowserlessTool(() => ({
135
131
  name: 'get_heapsnapshot_class_nodes',
136
132
  description: 'Loads and caches a memory heapsnapshot and returns instances of a specific class with their IDs.',
137
133
  annotations: {
@@ -140,7 +136,9 @@ export const getHeapSnapshotClassNodes = defineTool(() => ({
140
136
  conditions: ['memoryDebugging'],
141
137
  },
142
138
  schema: {
143
- filePath: zod.string().describe('A path to a .heapsnapshot file to read.'),
139
+ filePath: zod
140
+ .string()
141
+ .describe('A path to a .heapsnapshot file to read.'),
144
142
  id: zod.number().describe('The ID for the class, obtained from details.'),
145
143
  filterName: zod
146
144
  .enum(HEAP_SNAPSHOT_FILTERS)
@@ -167,7 +165,7 @@ export const getHeapSnapshotClassNodes = defineTool(() => ({
167
165
  });
168
166
  },
169
167
  }));
170
- export const getHeapSnapshotRetainers = defineTool(() => ({
168
+ export const getHeapSnapshotRetainers = defineBrowserlessTool(() => ({
171
169
  name: 'get_heapsnapshot_retainers',
172
170
  description: 'Loads and caches a memory heapsnapshot and returns retainers for a specific node ID.',
173
171
  annotations: {
@@ -180,7 +178,9 @@ export const getHeapSnapshotRetainers = defineTool(() => ({
180
178
  filePath: true,
181
179
  },
182
180
  schema: {
183
- filePath: zod.string().describe('A path to a .heapsnapshot file to read.'),
181
+ filePath: zod
182
+ .string()
183
+ .describe('A path to a .heapsnapshot file to read.'),
184
184
  nodeId: zod.number().describe('The node ID to get retainers for.'),
185
185
  maxNameLength: maxNameLengthSchema,
186
186
  pageIdx: pageIdxSchema,
@@ -195,7 +195,7 @@ export const getHeapSnapshotRetainers = defineTool(() => ({
195
195
  });
196
196
  },
197
197
  }));
198
- export const closeHeapSnapshot = defineTool(() => ({
198
+ export const closeHeapSnapshot = defineBrowserlessTool(() => ({
199
199
  name: 'close_heapsnapshot',
200
200
  description: 'Closes a previously loaded and cached memory heapsnapshot, freeing its memory.',
201
201
  annotations: {
@@ -220,7 +220,7 @@ export const closeHeapSnapshot = defineTool(() => ({
220
220
  response.appendResponseLine(`Closed heap snapshot: ${request.params.filePath}`);
221
221
  },
222
222
  }));
223
- export const getHeapSnapshotRetainingPaths = defineTool(() => ({
223
+ export const getHeapSnapshotRetainingPaths = defineBrowserlessTool(() => ({
224
224
  name: 'get_heapsnapshot_retaining_paths',
225
225
  description: 'Loads and caches a memory heapsnapshot and returns retaining paths for a specific node ID. This helps to understand why a node is not being garbage collected.',
226
226
  annotations: {
@@ -233,7 +233,9 @@ export const getHeapSnapshotRetainingPaths = defineTool(() => ({
233
233
  },
234
234
  blockedByDialog: false,
235
235
  schema: {
236
- filePath: zod.string().describe('A path to a .heapsnapshot file to read.'),
236
+ filePath: zod
237
+ .string()
238
+ .describe('A path to a .heapsnapshot file to read.'),
237
239
  nodeId: zod.number().describe('The node ID to get retaining paths for.'),
238
240
  maxDepth: zod
239
241
  .number()
@@ -256,7 +258,7 @@ export const getHeapSnapshotRetainingPaths = defineTool(() => ({
256
258
  });
257
259
  },
258
260
  }));
259
- export const getHeapSnapshotEdges = defineTool(() => ({
261
+ export const getHeapSnapshotEdges = defineBrowserlessTool(() => ({
260
262
  name: 'get_heapsnapshot_edges',
261
263
  description: 'Loads and caches a memory heapsnapshot and returns outgoing edges (references) for a specific node ID.',
262
264
  annotations: {
@@ -269,7 +271,9 @@ export const getHeapSnapshotEdges = defineTool(() => ({
269
271
  filePath: true,
270
272
  },
271
273
  schema: {
272
- filePath: zod.string().describe('A path to a .heapsnapshot file to read.'),
274
+ filePath: zod
275
+ .string()
276
+ .describe('A path to a .heapsnapshot file to read.'),
273
277
  nodeId: zod.number().describe('The node ID to get outgoing edges for.'),
274
278
  sortBy: zod
275
279
  .enum(['retainedSize', 'selfSize', 'name'])
@@ -298,7 +302,7 @@ export const getHeapSnapshotEdges = defineTool(() => ({
298
302
  });
299
303
  },
300
304
  }));
301
- export const getHeapSnapshotDominators = defineTool(() => ({
305
+ export const getHeapSnapshotDominators = defineBrowserlessTool(() => ({
302
306
  name: 'get_heapsnapshot_dominators',
303
307
  description: 'Loads and caches a memory heapsnapshot and returns the dominator chain for a specific node ID. This helps to identify which objects are keeping the target node alive.',
304
308
  annotations: {
@@ -311,7 +315,9 @@ export const getHeapSnapshotDominators = defineTool(() => ({
311
315
  filePath: true,
312
316
  },
313
317
  schema: {
314
- filePath: zod.string().describe('A path to a .heapsnapshot file to read.'),
318
+ filePath: zod
319
+ .string()
320
+ .describe('A path to a .heapsnapshot file to read.'),
315
321
  nodeId: zod
316
322
  .number()
317
323
  .describe('The node ID to get the dominator chain for.'),
@@ -324,7 +330,7 @@ export const getHeapSnapshotDominators = defineTool(() => ({
324
330
  });
325
331
  },
326
332
  }));
327
- export const compareHeapSnapshots = defineTool(() => ({
333
+ export const compareHeapSnapshots = defineBrowserlessTool(() => ({
328
334
  name: 'compare_heapsnapshots',
329
335
  description: 'Loads and caches two memory heapsnapshots and returns the comparison. If classIndex is provided, returns detailed diff for that class, otherwise returns summary diff.',
330
336
  annotations: {
@@ -356,6 +362,8 @@ export const compareHeapSnapshots = defineTool(() => ({
356
362
  if (request.params.classIndex !== undefined) {
357
363
  const classDiffResult = await context.getHeapSnapshotDetailedClassDiff(request.params.baseFilePath, request.params.currentFilePath, request.params.classIndex);
358
364
  response.setHeapSnapshotDetailedClassDiff(classDiffResult, {
365
+ pageIdx: request.params.pageIdx,
366
+ pageSize: request.params.pageSize,
359
367
  maxNameLength: request.params.maxNameLength,
360
368
  });
361
369
  }
@@ -369,7 +377,7 @@ export const compareHeapSnapshots = defineTool(() => ({
369
377
  }
370
378
  },
371
379
  }));
372
- export const getHeapSnapshotDuplicateStrings = defineTool(() => ({
380
+ export const getHeapSnapshotDuplicateStrings = defineBrowserlessTool(() => ({
373
381
  name: 'get_heapsnapshot_duplicate_strings',
374
382
  description: 'Loads and caches a memory heapsnapshot and returns duplicate strings grouped by their value.',
375
383
  annotations: {
@@ -382,7 +390,9 @@ export const getHeapSnapshotDuplicateStrings = defineTool(() => ({
382
390
  filePath: true,
383
391
  },
384
392
  schema: {
385
- filePath: zod.string().describe('A path to a .heapsnapshot file to read.'),
393
+ filePath: zod
394
+ .string()
395
+ .describe('A path to a .heapsnapshot file to read.'),
386
396
  pageIdx: pageIdxSchema,
387
397
  pageSize: pageSizeSchema,
388
398
  maxNameLength: maxNameLengthSchema,
@@ -396,7 +406,7 @@ export const getHeapSnapshotDuplicateStrings = defineTool(() => ({
396
406
  });
397
407
  },
398
408
  }));
399
- export const getHeapSnapshotObjectDetails = defineTool(() => ({
409
+ export const getHeapSnapshotObjectDetails = defineBrowserlessTool(() => ({
400
410
  name: 'get_heapsnapshot_object_details',
401
411
  description: 'Loads and caches a memory heapsnapshot and returns detailed information about a specific object by its node ID, including size, type, distance, and DOM detachedness.',
402
412
  annotations: {
@@ -409,7 +419,9 @@ export const getHeapSnapshotObjectDetails = defineTool(() => ({
409
419
  filePath: true,
410
420
  },
411
421
  schema: {
412
- filePath: zod.string().describe('A path to a .heapsnapshot file to read.'),
422
+ filePath: zod
423
+ .string()
424
+ .describe('A path to a .heapsnapshot file to read.'),
413
425
  nodeId: zod.number().describe('The node ID to get object details for.'),
414
426
  maxNameLength: maxNameLengthSchema,
415
427
  },
@@ -420,7 +432,7 @@ export const getHeapSnapshotObjectDetails = defineTool(() => ({
420
432
  });
421
433
  },
422
434
  }));
423
- export const queryHeapSnapshotObjects = defineTool(() => ({
435
+ export const queryHeapSnapshotObjects = defineBrowserlessTool(() => ({
424
436
  name: 'query_heapsnapshot_objects',
425
437
  description: 'Loads and caches a memory heapsnapshot and queries objects matching specific filters (className, propertyName, nodeType, retainedSize, selfSize, isDetached, sortBy).',
426
438
  annotations: {
@@ -431,7 +443,9 @@ export const queryHeapSnapshotObjects = defineTool(() => ({
431
443
  blockedByDialog: false,
432
444
  verifyFilesSchema: { filePath: true },
433
445
  schema: {
434
- filePath: zod.string().describe('A path to a .heapsnapshot file to read.'),
446
+ filePath: zod
447
+ .string()
448
+ .describe('A path to a .heapsnapshot file to read.'),
435
449
  className: zod
436
450
  .string()
437
451
  .optional()
@@ -477,7 +491,7 @@ export const queryHeapSnapshotObjects = defineTool(() => ({
477
491
  });
478
492
  },
479
493
  }));
480
- export const analyzeHeapSnapshotContexts = defineTool(() => ({
494
+ export const analyzeHeapSnapshotContexts = defineBrowserlessTool(() => ({
481
495
  name: 'analyze_heapsnapshot_contexts',
482
496
  description: 'Loads and caches a memory heapsnapshot to identify and rank closure contexts holding dead captured fields—variables no remaining live closure can read. Scopes are ranked globally by the retained size of these dead values to provide a prioritizing heuristic, rather than an exact measure of reclaimable bytes.',
483
497
  annotations: {
@@ -490,7 +504,9 @@ export const analyzeHeapSnapshotContexts = defineTool(() => ({
490
504
  filePath: true,
491
505
  },
492
506
  schema: {
493
- filePath: zod.string().describe('A path to a .heapsnapshot file to read.'),
507
+ filePath: zod
508
+ .string()
509
+ .describe('A path to a .heapsnapshot file to read.'),
494
510
  retainedSize: byteSizeRangeSchema('Inclusive range for the dead-field score of a context (e.g. "10KB", "1MB-2MB", "-1MB", or "1MB-"). A single value is treated as a minimum.').optional(),
495
511
  scopeInfoNodeId: zod
496
512
  .number()
@@ -498,18 +514,8 @@ export const analyzeHeapSnapshotContexts = defineTool(() => ({
498
514
  .optional()
499
515
  .describe('Only return contexts declared by the scope with this ScopeInfo node id, as reported in the scope header of a previous call.'),
500
516
  maxNameLength: maxNameLengthSchema,
501
- pageIdx: zod
502
- .number()
503
- .int()
504
- .nonnegative()
505
- .optional()
506
- .describe('The zero-based page index. Defaults to 0.'),
507
- pageSize: zod
508
- .number()
509
- .int()
510
- .positive()
511
- .optional()
512
- .describe('The number of contexts to return per page. Defaults to 20.'),
517
+ pageIdx: pageIdxSchema,
518
+ pageSize: pageSizeSchema,
513
519
  },
514
520
  handler: async (request, response, context) => {
515
521
  const analysis = await context.analyzeHeapSnapshotContexts(request.params.filePath);