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
@@ -1,264 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2026 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- var _a;
7
- import { yargs, hideBin } from '../third_party/index.js';
8
- import { readFileSync } from 'node:fs';
9
- import { mcpOptions, getMcpOptionsForViaCli, CLI_EXAMPLES, CONFLICTING_ARGS, IMPLICATIONS, DEFAULT_FILESYSTEM_ROOT, isReloadableOption, withoutDefaults, } from './mcp-options.js';
10
- import { getErrorMessage } from '../utils/errorHandling.js';
11
- import { ConfigLocator } from './ConfigLocator.js';
12
- function isPlainObject(value) {
13
- return typeof value === 'object' && value !== null && !Array.isArray(value);
14
- }
15
- function stripYargsPositionalArgs(parsed) {
16
- const copy = { ...parsed };
17
- delete copy._;
18
- delete copy.$0;
19
- return copy;
20
- }
21
- function isMcpOptionKey(key) {
22
- return key in mcpOptions;
23
- }
24
- function copyOption(target, source, key) {
25
- if (key in source) {
26
- target[key] = source[key];
27
- }
28
- else {
29
- delete target[key];
30
- }
31
- }
32
- const explicitArgsByParsed = new WeakMap();
33
- export class ConfigParser {
34
- version;
35
- argv;
36
- env;
37
- exitProcess;
38
- #configPath;
39
- #usageStatisticsNoticeShown = false;
40
- configLocator;
41
- constructor(version, argv = process.argv, env = process.env, exitProcess = true, configLocator) {
42
- this.version = version;
43
- this.argv = argv;
44
- this.env = env;
45
- this.exitProcess = exitProcess;
46
- this.configLocator = configLocator ?? new ConfigLocator();
47
- }
48
- /**
49
- * The config file resolved by the last `parse()` call, if any.
50
- */
51
- get configPath() {
52
- return this.#configPath;
53
- }
54
- buildCliParser(options = mcpOptions) {
55
- const yargsInstance = yargs(hideBin(this.argv));
56
- return yargsInstance
57
- .scriptName('npx chrome-devtools-mcp@latest')
58
- .parserConfiguration({
59
- 'strip-aliased': true,
60
- 'strip-dashed': true,
61
- })
62
- .options(options)
63
- .showHelpOnFail(false, 'Specify --help for available options')
64
- .example(CLI_EXAMPLES)
65
- .wrap(Math.min(120, yargsInstance.terminalWidth()))
66
- .help()
67
- .version(this.version);
68
- }
69
- /**
70
- * Step 1: parses the CLI flags without applying defaults, so the result only
71
- * contains what the user passed. `--help` and `--version` print and exit the
72
- * process; parse errors throw.
73
- */
74
- parseCliArgs() {
75
- const parsed = this.buildCliParser(withoutDefaults(mcpOptions))
76
- .fail(false)
77
- .parseSync();
78
- return stripYargsPositionalArgs(parsed);
79
- }
80
- /**
81
- * Step 2: reads the JSON config file and runs it through yargs to reject
82
- * unknown keys and apply coercions, without applying defaults.
83
- */
84
- parseConfigFile(configPath) {
85
- try {
86
- const fileContent = JSON.parse(readFileSync(configPath, 'utf-8'));
87
- if (!isPlainObject(fileContent)) {
88
- throw new Error('Config must be a JSON object');
89
- }
90
- const parsed = yargs([])
91
- .parserConfiguration({
92
- 'strip-aliased': true,
93
- 'camel-case-expansion': false,
94
- })
95
- .options(withoutDefaults(mcpOptions))
96
- .config(fileContent)
97
- .strict()
98
- .fail(false)
99
- .exitProcess(false)
100
- .parseSync([]);
101
- return stripYargsPositionalArgs(parsed);
102
- }
103
- catch (err) {
104
- throw new Error(`Invalid JSON config file: ${getErrorMessage(err)}`);
105
- }
106
- }
107
- warnUnknownArgs(cliArgs) {
108
- const allowedArgs = new Set(Object.keys(mcpOptions));
109
- const unknownArgs = Object.keys(cliArgs).filter(arg => !allowedArgs.has(arg));
110
- if (unknownArgs.length > 0) {
111
- console.error(`Unknown arguments: ${unknownArgs.map(arg => `--${arg}`)}`);
112
- }
113
- }
114
- /**
115
- * Step 4: rejects mutually exclusive inputs. Only explicit inputs are checked,
116
- * so defaults never conflict.
117
- */
118
- static validateConflicts(explicitArgs) {
119
- const activeArgs = new Set();
120
- for (const [key, val] of Object.entries(explicitArgs)) {
121
- if (val !== undefined && val !== false) {
122
- activeArgs.add(key);
123
- }
124
- }
125
- for (const group of CONFLICTING_ARGS) {
126
- const activeInGroup = group.filter(arg => activeArgs.has(arg));
127
- if (activeInGroup.length > 1) {
128
- const [arg1, arg2] = activeInGroup;
129
- throw new Error(`Arguments ${String(arg1)} and ${String(arg2)} are mutually exclusive`);
130
- }
131
- }
132
- }
133
- static validateImplications(explicitArgs) {
134
- for (const [key, implied] of IMPLICATIONS) {
135
- const isKeySet = explicitArgs[key] !== undefined && explicitArgs[key] !== false;
136
- const isImpliedSet = explicitArgs[implied] !== undefined && explicitArgs[implied] !== false;
137
- if (isKeySet && !isImpliedSet) {
138
- throw new Error(`Implications failed:\n ${String(key)} -> ${String(implied)}`);
139
- }
140
- }
141
- }
142
- /**
143
- * Step 5: fills in defaults for everything that was not set explicitly.
144
- * `viaCli` is an explicit input like any other; it selects which defaults
145
- * apply.
146
- */
147
- applyDefaults(explicitArgs) {
148
- const isViaCli = explicitArgs.viaCli === true;
149
- const baseOptions = isViaCli ? getMcpOptionsForViaCli() : mcpOptions;
150
- const resolvedArgs = { ...explicitArgs };
151
- // `channel` only applies when Chrome is launched by channel. Leaving it
152
- // unset otherwise keeps it out of telemetry (computeFlagUsage).
153
- const launchesByChannel = !resolvedArgs.browserUrl &&
154
- !resolvedArgs.wsEndpoint &&
155
- !resolvedArgs.executablePath;
156
- for (const [key, option] of Object.entries(baseOptions)) {
157
- if (key === 'channel' && !launchesByChannel) {
158
- continue;
159
- }
160
- if (resolvedArgs[key] === undefined &&
161
- 'default' in option) {
162
- resolvedArgs[key] = option.default;
163
- }
164
- }
165
- if (isViaCli) {
166
- if (resolvedArgs.filesystemRoot === DEFAULT_FILESYSTEM_ROOT &&
167
- explicitArgs.allowUnrestrictedPaths !== false) {
168
- resolvedArgs.allowUnrestrictedPaths = true;
169
- resolvedArgs.filesystemRoot = undefined;
170
- }
171
- const connectsToExistingBrowser = resolvedArgs.autoConnect ||
172
- resolvedArgs.browserUrl ||
173
- resolvedArgs.wsEndpoint;
174
- if (explicitArgs.isolated === undefined &&
175
- resolvedArgs.userDataDir === undefined &&
176
- !connectsToExistingBrowser) {
177
- resolvedArgs.isolated = true;
178
- }
179
- if (resolvedArgs.categoryExtensions === undefined &&
180
- !connectsToExistingBrowser) {
181
- resolvedArgs.categoryExtensions = true;
182
- }
183
- }
184
- if (this.env['CI'] || this.env['CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS']) {
185
- if (!this.#usageStatisticsNoticeShown) {
186
- this.#usageStatisticsNoticeShown = true;
187
- console.error("turning off usage statistics. process.env['CI'] || process.env['CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS'] is set.");
188
- }
189
- resolvedArgs.usageStatistics = false;
190
- }
191
- if (resolvedArgs.categoryExperimentalThirdParty === undefined &&
192
- this.env['CHROME_DEVTOOLS_MCP_CATEGORY_EXPERIMENTAL_THIRD_PARTY']) {
193
- resolvedArgs.categoryExperimentalThirdParty = true;
194
- }
195
- // The merge and the default loop lose the static type that yargs infers from
196
- // `mcpOptions`. Every value was produced by the same option definitions (CLI
197
- // parser, strict config-file parser, option defaults), so the shape matches.
198
- const parsed = resolvedArgs;
199
- explicitArgsByParsed.set(parsed, {
200
- parser: this,
201
- explicitArgs: { ...explicitArgs },
202
- });
203
- return parsed;
204
- }
205
- parse() {
206
- try {
207
- const cliArgs = this.parseCliArgs();
208
- this.#configPath = cliArgs.config ?? this.configLocator.locate(this.env);
209
- this.warnUnknownArgs(cliArgs);
210
- return this.#resolve(cliArgs);
211
- }
212
- catch (error) {
213
- if (this.exitProcess) {
214
- console.error(getErrorMessage(error));
215
- process.exit(1);
216
- }
217
- throw error;
218
- }
219
- }
220
- /**
221
- * Re-reads the config file resolved by `parse()` and merges it with the CLI
222
- * arguments again. Unlike `parse()`, it does not discover a new config file
223
- * and throws on invalid configuration instead of exiting the process.
224
- */
225
- reload() {
226
- return this.#resolve(this.parseCliArgs());
227
- }
228
- #resolve(cliArgs) {
229
- const configPath = this.#configPath;
230
- const configFileArgs = configPath ? this.parseConfigFile(configPath) : {};
231
- // Step 3: merges the explicit inputs. The CLI wins over the config file.
232
- const explicitArgs = {
233
- ...configFileArgs,
234
- ...cliArgs,
235
- ...(configPath ? { config: configPath } : {}),
236
- };
237
- _a.validateConflicts(explicitArgs);
238
- _a.validateImplications(explicitArgs);
239
- return this.applyDefaults(explicitArgs);
240
- }
241
- /**
242
- * Merges explicit inputs so that a running server continues with `next` for
243
- * reloadable options and `previous` for everything else, then validates and
244
- * applies defaults.
245
- */
246
- static mergeReloadableOptions(previous, next) {
247
- const previousEntry = explicitArgsByParsed.get(previous);
248
- const nextEntry = explicitArgsByParsed.get(next);
249
- const previousExplicit = previousEntry?.explicitArgs ?? previous;
250
- const nextExplicit = nextEntry?.explicitArgs ?? next;
251
- const merged = { ...previousExplicit };
252
- for (const name of Object.keys(mcpOptions)) {
253
- if (isMcpOptionKey(name) && isReloadableOption(name)) {
254
- copyOption(merged, nextExplicit, name);
255
- }
256
- }
257
- _a.validateConflicts(merged);
258
- _a.validateImplications(merged);
259
- const parser = nextEntry?.parser ?? previousEntry?.parser ?? new _a('');
260
- return parser.applyDefaults(merged);
261
- }
262
- }
263
- _a = ConfigParser;
264
- //# sourceMappingURL=ConfigParser.js.map
@@ -1,282 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2026 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import path from 'node:path';
7
- import { pathToFileURL } from 'node:url';
8
- import { BrowserManager } from './BrowserManager.js';
9
- import { loadIssueDescriptions } from './devtools/issueDescriptions.js';
10
- import { McpContext } from './McpContext.js';
11
- import { HeapSnapshotManager } from './processors/HeapSnapshotManager.js';
12
- import { ClearcutLogger } from './telemetry/ClearcutLogger.js';
13
- import { FilePersistence } from './telemetry/persistence.js';
14
- import { McpServer as SdkMcpServer, Mutex, puppeteer, } from './third_party/index.js';
15
- import { ToolHandler } from './ToolHandler.js';
16
- import { isAvailableInMode, } from './tools/ToolDefinition.js';
17
- import { createTools } from './tools/tools.js';
18
- import { logger } from './utils/logger.js';
19
- import { VERSION } from './version.js';
20
- puppeteer.setFollowSymlinks(false);
21
- /**
22
- * Timeout for a `roots/list` that a tool call is waiting on, matching the 5s
23
- * default used for page operations. `getContext()` awaits it while
24
- * `ToolHandler` holds the tool mutex, so leaving it unbounded lets a client
25
- * that negotiates `roots` but does not answer block every tool for the SDK's
26
- * default of 60s. Background refreshes are not bounded by this, so roots a
27
- * slow client sends late still land.
28
- */
29
- const ROOTS_REQUEST_TIMEOUT = 5_000;
30
- export class McpServer {
31
- server;
32
- #serverArgs;
33
- #browserManager;
34
- #context;
35
- #heapSnapshotManager = new HeapSnapshotManager();
36
- /**
37
- * Client roots stay valid across browser reconnects and only the client can
38
- * invalidate them through a `roots/list_changed` notification. CLI-configured
39
- * roots are read from `#serverArgs` when combining roots.
40
- */
41
- #lastClientRoots;
42
- #toolMutex = new Mutex();
43
- #tools = new Map();
44
- constructor(serverArgs, options) {
45
- this.#serverArgs = serverArgs;
46
- this.#browserManager = options.browserManager;
47
- if (this.#serverArgs.usageStatistics) {
48
- ClearcutLogger.initialize({
49
- persistence: new FilePersistence(),
50
- logFile: this.#serverArgs.logFile,
51
- appVersion: VERSION,
52
- clearcutEndpoint: this.#serverArgs.clearcutEndpoint,
53
- clearcutForceFlushIntervalMs: this.#serverArgs.clearcutForceFlushIntervalMs,
54
- clearcutIncludePidHeader: this.#serverArgs.clearcutIncludePidHeader,
55
- });
56
- }
57
- this.server = new SdkMcpServer({
58
- name: 'chrome_devtools',
59
- title: 'Chrome DevTools MCP server',
60
- version: VERSION,
61
- }, {
62
- capabilities: { logging: {}, tools: { listChanged: true } },
63
- // Enabling or updating many tools at once sends a single notification.
64
- debouncedNotificationMethods: ['notifications/tools/list_changed'],
65
- });
66
- this.server.server.setRequestHandler('logging/setLevel', () => {
67
- return {};
68
- });
69
- this.server.server.oninitialized = () => {
70
- const clientName = this.server.server.getClientVersion()?.name;
71
- if (clientName) {
72
- ClearcutLogger.get()?.setClientName(clientName);
73
- }
74
- if (this.server.server.getClientCapabilities()?.roots) {
75
- void this.#updateRoots();
76
- this.server.server.setNotificationHandler('notifications/roots/list_changed', () => {
77
- void this.#updateRoots();
78
- });
79
- }
80
- else if (!this.#serverArgs.allowUnrestrictedPaths &&
81
- (this.#serverArgs.filesystemRoot ?? []).length === 0) {
82
- console.warn('[chrome-devtools-mcp] The connecting client did not negotiate the MCP roots ' +
83
- 'capability. Tools that read or write local files will be restricted to the OS temp directory. ' +
84
- 'To restore the previous unrestricted behavior, start the server with ' +
85
- '--allow-unrestricted-paths.');
86
- }
87
- };
88
- }
89
- async connect(transport) {
90
- return await this.server.connect(transport);
91
- }
92
- async callTool(name, args = {}) {
93
- const toolHandler = this.#tools.get(name)?.handler;
94
- if (!toolHandler) {
95
- return {
96
- content: [
97
- {
98
- type: 'text',
99
- text: `Tool ${name} not found`,
100
- },
101
- ],
102
- isError: true,
103
- };
104
- }
105
- const parseResult = await toolHandler.registeredInputSchema.safeParseAsync(args);
106
- if (!parseResult.success) {
107
- return {
108
- content: [
109
- {
110
- type: 'text',
111
- text: `Input validation error: Invalid arguments for tool ${name}: ${parseResult.error.issues
112
- .map(issue => `${issue.path.length > 0 ? `${issue.path.join('.')}: ` : ''}${issue.message}`)
113
- .join(', ')}`,
114
- },
115
- ],
116
- isError: true,
117
- };
118
- }
119
- return await toolHandler.handle(parseResult.data);
120
- }
121
- /**
122
- * Closes the MCP connection and disposes internal context/listeners.
123
- */
124
- async close() {
125
- try {
126
- this.#context?.dispose();
127
- }
128
- catch (err) {
129
- logger?.('Failed to dispose context', err);
130
- }
131
- finally {
132
- this.#context = undefined;
133
- }
134
- this.#heapSnapshotManager.dispose();
135
- await Promise.allSettled([
136
- this.#browserManager.close(),
137
- this.server.close(),
138
- ]);
139
- }
140
- [Symbol.dispose]() {
141
- this.close().catch(err => {
142
- logger?.('Failed to dispose McpServer', err);
143
- });
144
- }
145
- async [Symbol.asyncDispose]() {
146
- await this.close();
147
- }
148
- static async from(serverArgs, options) {
149
- const server = new McpServer(serverArgs, options);
150
- await server.#init();
151
- return server;
152
- }
153
- async #init() {
154
- for (const tool of createTools(this.#serverArgs)) {
155
- // Slim and regular tools may share names, only register the current mode.
156
- if (isAvailableInMode(tool, this.#serverArgs)) {
157
- this.#registerTool(tool);
158
- }
159
- }
160
- await loadIssueDescriptions();
161
- }
162
- #combinedRoots() {
163
- const configuredRoots = (this.#serverArgs.allowUnrestrictedPaths
164
- ? []
165
- : (this.#serverArgs.filesystemRoot ?? [])).map(root => {
166
- const rootPath = path.resolve(root);
167
- return {
168
- uri: pathToFileURL(rootPath).href,
169
- name: path.basename(rootPath) || rootPath,
170
- };
171
- });
172
- if (configuredRoots.length === 0 && this.#lastClientRoots === undefined) {
173
- return undefined;
174
- }
175
- return [...configuredRoots, ...(this.#lastClientRoots ?? [])];
176
- }
177
- /**
178
- * `timeout` is only passed where a tool call is waiting on the result – the
179
- * background refreshes below block nobody, so bounding them would just discard
180
- * roots a slow client was about to send
181
- */
182
- async #updateRoots(timeout) {
183
- if (!this.server.server.getClientCapabilities()?.roots) {
184
- return;
185
- }
186
- try {
187
- const result = await this.server.server.request({ method: 'roots/list' }, timeout === undefined ? undefined : { timeout });
188
- this.#lastClientRoots = result.roots;
189
- this.#context?.setRoots(this.#combinedRoots());
190
- }
191
- catch (e) {
192
- logger?.('Failed to list roots', e);
193
- }
194
- }
195
- async #getContext() {
196
- const browser = await this.#browserManager.ensureBrowser();
197
- if (this.#context?.browser !== browser) {
198
- this.#context?.dispose();
199
- this.#context = await McpContext.from(browser, logger, {
200
- experimentalDevToolsDebugging: this.#serverArgs.experimentalDevtools ?? false,
201
- experimentalIncludeAllPages: this.#serverArgs.experimentalIncludeAllPages,
202
- performanceCrux: this.#serverArgs.performanceCrux,
203
- sourceMaps: this.#serverArgs.sourceMaps,
204
- allowlist: this.#serverArgs.allowedUrlPattern,
205
- blocklist: this.#serverArgs.blockedUrlPattern,
206
- allowUnrestrictedPaths: this.#serverArgs.allowUnrestrictedPaths,
207
- // Surfaces a one-time note in the next response after a reconnect.
208
- reconnected: this.#context !== undefined,
209
- categoryExtensions: this.#serverArgs.categoryExtensions,
210
- heapSnapshotManager: this.#heapSnapshotManager,
211
- onNotification: (message) => {
212
- void this.server
213
- .sendLoggingMessage({
214
- level: 'info',
215
- data: message,
216
- })
217
- .catch(e => {
218
- logger?.('Failed to send MCP notification', e);
219
- });
220
- },
221
- });
222
- this.#context.setRoots(this.#combinedRoots());
223
- if (this.#lastClientRoots === undefined) {
224
- // Nothing listed yet, so this call has to wait – bounded, since it is
225
- // holding the tool mutex, and a later background refresh still lands
226
- await this.#updateRoots(ROOTS_REQUEST_TIMEOUT);
227
- }
228
- else {
229
- // Carry the known roots over and refresh out of band, so a reconnect
230
- // never pays for a client round-trip
231
- void this.#updateRoots();
232
- }
233
- }
234
- return this.#context;
235
- }
236
- #createToolHandler(tool) {
237
- return new ToolHandler(tool, this.#serverArgs, () => this.#getContext(), this.#toolMutex, () => this.#browserManager.abandonPendingAttempt());
238
- }
239
- #registerTool(tool) {
240
- const handler = this.#createToolHandler(tool);
241
- const registeredTool = this.server.registerTool(tool.name, {
242
- description: tool.description,
243
- inputSchema: handler.registeredInputSchema,
244
- annotations: tool.annotations,
245
- }, handler.handle);
246
- if (handler.disabled) {
247
- registeredTool.disable();
248
- }
249
- this.#tools.set(tool.name, { handler, registeredTool });
250
- }
251
- }
252
- /**
253
- * Creates and initializes a Chrome DevTools MCP server instance.
254
- *
255
- * Maintained as a public API for backwards compatibility because external
256
- * consumers and integrations rely on `createMcpServer()`. For new code,
257
- * prefer using `McpServer.from(serverArgs, options)`.
258
- */
259
- export async function createMcpServer(serverArgs, options) {
260
- const browserManager = new BrowserManager(serverArgs, {
261
- logFile: options.logFile,
262
- });
263
- const server = await McpServer.from(serverArgs, {
264
- browserManager,
265
- ...options,
266
- });
267
- return { server: server.server };
268
- }
269
- export const logDisclaimers = (args) => {
270
- console.error(`chrome-devtools-mcp exposes content of the browser instance to the MCP clients allowing them to inspect,
271
- debug, and modify any data in the browser or DevTools.
272
- Avoid sharing sensitive or personal information that you do not want to share with MCP clients.`);
273
- if (!args.slim && args.performanceCrux) {
274
- console.error(`Performance tools may send trace URLs to the Google CrUX API to fetch real-user experience data. To disable, run with --no-performance-crux.`);
275
- }
276
- if (!args.slim && args.usageStatistics) {
277
- console.error(`
278
- Google collects usage statistics to improve Chrome DevTools MCP. To opt-out, run with --no-usage-statistics.
279
- For more details, visit: https://github.com/ChromeDevTools/chrome-devtools-mcp#usage-statistics`);
280
- }
281
- };
282
- //# sourceMappingURL=index.js.map