chrome-devtools-mcp 0.17.1 → 0.17.2

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 (261) hide show
  1. package/README.md +4 -1
  2. package/package.json +3 -3
  3. package/build/src/DevToolsConnectionAdapter.js +0 -69
  4. package/build/src/DevtoolsUtils.js +0 -340
  5. package/build/src/McpContext.js +0 -603
  6. package/build/src/McpResponse.js +0 -490
  7. package/build/src/Mutex.js +0 -37
  8. package/build/src/PageCollector.js +0 -309
  9. package/build/src/WaitForHelper.js +0 -139
  10. package/build/src/browser.js +0 -182
  11. package/build/src/cli.js +0 -295
  12. package/build/src/formatters/ConsoleFormatter.js +0 -240
  13. package/build/src/formatters/IssueFormatter.js +0 -190
  14. package/build/src/formatters/NetworkFormatter.js +0 -226
  15. package/build/src/formatters/SnapshotFormatter.js +0 -134
  16. package/build/src/index.js +0 -21
  17. package/build/src/issue-descriptions.js +0 -39
  18. package/build/src/logger.js +0 -36
  19. package/build/src/main.js +0 -196
  20. package/build/src/polyfill.js +0 -7
  21. package/build/src/telemetry/ClearcutLogger.js +0 -102
  22. package/build/src/telemetry/WatchdogClient.js +0 -60
  23. package/build/src/telemetry/flagUtils.js +0 -45
  24. package/build/src/telemetry/metricUtils.js +0 -14
  25. package/build/src/telemetry/persistence.js +0 -53
  26. package/build/src/telemetry/types.js +0 -33
  27. package/build/src/telemetry/watchdog/ClearcutSender.js +0 -201
  28. package/build/src/telemetry/watchdog/main.js +0 -127
  29. package/build/src/third_party/THIRD_PARTY_NOTICES +0 -2011
  30. package/build/src/third_party/bundled-packages.json +0 -8
  31. package/build/src/third_party/devtools-formatter-worker.js +0 -15449
  32. package/build/src/third_party/index.js +0 -172791
  33. package/build/src/third_party/issue-descriptions/CoepCoopSandboxedIframeCannotNavigateToCoopPage.md +0 -4
  34. package/build/src/third_party/issue-descriptions/CoepCorpNotSameOrigin.md +0 -8
  35. package/build/src/third_party/issue-descriptions/CoepCorpNotSameOriginAfterDefaultedToSameOriginByCoep.md +0 -18
  36. package/build/src/third_party/issue-descriptions/CoepCorpNotSameSite.md +0 -7
  37. package/build/src/third_party/issue-descriptions/CoepFrameResourceNeedsCoepHeader.md +0 -10
  38. package/build/src/third_party/issue-descriptions/CompatibilityModeQuirks.md +0 -5
  39. package/build/src/third_party/issue-descriptions/CookieAttributeValueExceedsMaxSize.md +0 -5
  40. package/build/src/third_party/issue-descriptions/LowTextContrast.md +0 -5
  41. package/build/src/third_party/issue-descriptions/SameSiteExcludeContextDowngradeRead.md +0 -8
  42. package/build/src/third_party/issue-descriptions/SameSiteExcludeContextDowngradeSet.md +0 -8
  43. package/build/src/third_party/issue-descriptions/SameSiteExcludeNavigationContextDowngrade.md +0 -8
  44. package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureErrorRead.md +0 -8
  45. package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureErrorSet.md +0 -8
  46. package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureWarnRead.md +0 -8
  47. package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureWarnSet.md +0 -8
  48. package/build/src/third_party/issue-descriptions/SameSiteUnspecifiedLaxAllowUnsafeRead.md +0 -9
  49. package/build/src/third_party/issue-descriptions/SameSiteUnspecifiedLaxAllowUnsafeSet.md +0 -9
  50. package/build/src/third_party/issue-descriptions/SameSiteWarnCrossDowngradeRead.md +0 -8
  51. package/build/src/third_party/issue-descriptions/SameSiteWarnCrossDowngradeSet.md +0 -8
  52. package/build/src/third_party/issue-descriptions/SameSiteWarnStrictLaxDowngradeStrict.md +0 -8
  53. package/build/src/third_party/issue-descriptions/arInsecureContext.md +0 -7
  54. package/build/src/third_party/issue-descriptions/arInvalidInfoHeader.md +0 -5
  55. package/build/src/third_party/issue-descriptions/arInvalidRegisterOsSourceHeader.md +0 -5
  56. package/build/src/third_party/issue-descriptions/arInvalidRegisterOsTriggerHeader.md +0 -5
  57. package/build/src/third_party/issue-descriptions/arInvalidRegisterSourceHeader.md +0 -5
  58. package/build/src/third_party/issue-descriptions/arInvalidRegisterTriggerHeader.md +0 -5
  59. package/build/src/third_party/issue-descriptions/arNavigationRegistrationUniqueScopeAlreadySet.md +0 -5
  60. package/build/src/third_party/issue-descriptions/arNavigationRegistrationWithoutTransientUserActivation.md +0 -6
  61. package/build/src/third_party/issue-descriptions/arNoRegisterOsSourceHeader.md +0 -5
  62. package/build/src/third_party/issue-descriptions/arNoRegisterOsTriggerHeader.md +0 -5
  63. package/build/src/third_party/issue-descriptions/arNoRegisterSourceHeader.md +0 -5
  64. package/build/src/third_party/issue-descriptions/arNoRegisterTriggerHeader.md +0 -5
  65. package/build/src/third_party/issue-descriptions/arNoWebOrOsSupport.md +0 -4
  66. package/build/src/third_party/issue-descriptions/arOsSourceIgnored.md +0 -18
  67. package/build/src/third_party/issue-descriptions/arOsTriggerIgnored.md +0 -19
  68. package/build/src/third_party/issue-descriptions/arPermissionPolicyDisabled.md +0 -8
  69. package/build/src/third_party/issue-descriptions/arSourceAndTriggerHeaders.md +0 -9
  70. package/build/src/third_party/issue-descriptions/arSourceIgnored.md +0 -13
  71. package/build/src/third_party/issue-descriptions/arTriggerIgnored.md +0 -12
  72. package/build/src/third_party/issue-descriptions/arUntrustworthyReportingOrigin.md +0 -10
  73. package/build/src/third_party/issue-descriptions/arWebAndOsHeaders.md +0 -11
  74. package/build/src/third_party/issue-descriptions/bounceTrackingMitigations.md +0 -3
  75. package/build/src/third_party/issue-descriptions/clientHintMetaTagAllowListInvalidOrigin.md +0 -4
  76. package/build/src/third_party/issue-descriptions/clientHintMetaTagModifiedHTML.md +0 -4
  77. package/build/src/third_party/issue-descriptions/connectionAllowlistInvalidAllowlistItemType.md +0 -12
  78. package/build/src/third_party/issue-descriptions/connectionAllowlistInvalidHeader.md +0 -12
  79. package/build/src/third_party/issue-descriptions/connectionAllowlistInvalidUrlPattern.md +0 -8
  80. package/build/src/third_party/issue-descriptions/connectionAllowlistItemNotInnerList.md +0 -12
  81. package/build/src/third_party/issue-descriptions/connectionAllowlistMoreThanOneList.md +0 -7
  82. package/build/src/third_party/issue-descriptions/connectionAllowlistReportingEndpointNotToken.md +0 -10
  83. package/build/src/third_party/issue-descriptions/cookieCrossSiteRedirectDowngrade.md +0 -12
  84. package/build/src/third_party/issue-descriptions/cookieExcludeBlockedWithinRelatedWebsiteSet.md +0 -4
  85. package/build/src/third_party/issue-descriptions/cookieExcludeDomainNonAscii.md +0 -11
  86. package/build/src/third_party/issue-descriptions/cookieExcludePortMismatch.md +0 -8
  87. package/build/src/third_party/issue-descriptions/cookieExcludeSchemeMismatch.md +0 -7
  88. package/build/src/third_party/issue-descriptions/cookieExcludeThirdPartyPhaseoutRead.md +0 -6
  89. package/build/src/third_party/issue-descriptions/cookieExcludeThirdPartyPhaseoutSet.md +0 -6
  90. package/build/src/third_party/issue-descriptions/cookieWarnDomainNonAscii.md +0 -11
  91. package/build/src/third_party/issue-descriptions/cookieWarnMetadataGrantRead.md +0 -4
  92. package/build/src/third_party/issue-descriptions/cookieWarnMetadataGrantSet.md +0 -4
  93. package/build/src/third_party/issue-descriptions/cookieWarnThirdPartyPhaseoutRead.md +0 -6
  94. package/build/src/third_party/issue-descriptions/cookieWarnThirdPartyPhaseoutSet.md +0 -6
  95. package/build/src/third_party/issue-descriptions/corsAllowCredentialsRequired.md +0 -6
  96. package/build/src/third_party/issue-descriptions/corsDisabledScheme.md +0 -7
  97. package/build/src/third_party/issue-descriptions/corsDisallowedByMode.md +0 -7
  98. package/build/src/third_party/issue-descriptions/corsHeaderDisallowedByPreflightResponse.md +0 -5
  99. package/build/src/third_party/issue-descriptions/corsInsecurePrivateNetwork.md +0 -10
  100. package/build/src/third_party/issue-descriptions/corsInvalidHeaderValues.md +0 -7
  101. package/build/src/third_party/issue-descriptions/corsLocalNetworkAccessPermissionDenied.md +0 -19
  102. package/build/src/third_party/issue-descriptions/corsMethodDisallowedByPreflightResponse.md +0 -5
  103. package/build/src/third_party/issue-descriptions/corsNoCorsRedirectModeNotFollow.md +0 -5
  104. package/build/src/third_party/issue-descriptions/corsOriginMismatch.md +0 -6
  105. package/build/src/third_party/issue-descriptions/corsPreflightAllowPrivateNetworkError.md +0 -10
  106. package/build/src/third_party/issue-descriptions/corsPreflightResponseInvalid.md +0 -5
  107. package/build/src/third_party/issue-descriptions/corsPrivateNetworkPermissionDenied.md +0 -10
  108. package/build/src/third_party/issue-descriptions/corsRedirectContainsCredentials.md +0 -5
  109. package/build/src/third_party/issue-descriptions/corsWildcardOriginNotAllowed.md +0 -8
  110. package/build/src/third_party/issue-descriptions/cspEvalViolation.md +0 -9
  111. package/build/src/third_party/issue-descriptions/cspInlineViolation.md +0 -10
  112. package/build/src/third_party/issue-descriptions/cspTrustedTypesPolicyViolation.md +0 -5
  113. package/build/src/third_party/issue-descriptions/cspTrustedTypesSinkViolation.md +0 -8
  114. package/build/src/third_party/issue-descriptions/cspURLViolation.md +0 -10
  115. package/build/src/third_party/issue-descriptions/deprecation.md +0 -3
  116. package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsHttpNotFound.md +0 -1
  117. package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsInvalidResponse.md +0 -1
  118. package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsNoResponse.md +0 -1
  119. package/build/src/third_party/issue-descriptions/federatedAuthRequestApprovalDeclined.md +0 -1
  120. package/build/src/third_party/issue-descriptions/federatedAuthRequestCanceled.md +0 -1
  121. package/build/src/third_party/issue-descriptions/federatedAuthRequestErrorFetchingSignin.md +0 -1
  122. package/build/src/third_party/issue-descriptions/federatedAuthRequestErrorIdToken.md +0 -1
  123. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenHttpNotFound.md +0 -1
  124. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidRequest.md +0 -1
  125. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidResponse.md +0 -1
  126. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenNoResponse.md +0 -1
  127. package/build/src/third_party/issue-descriptions/federatedAuthRequestInvalidSigninResponse.md +0 -1
  128. package/build/src/third_party/issue-descriptions/federatedAuthRequestManifestHttpNotFound.md +0 -1
  129. package/build/src/third_party/issue-descriptions/federatedAuthRequestManifestInvalidResponse.md +0 -1
  130. package/build/src/third_party/issue-descriptions/federatedAuthRequestManifestNoResponse.md +0 -1
  131. package/build/src/third_party/issue-descriptions/federatedAuthRequestTooManyRequests.md +0 -1
  132. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidAccountsResponse.md +0 -1
  133. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidConfigOrWellKnown.md +0 -1
  134. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoAccountSharingPermission.md +0 -1
  135. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoApiPermission.md +0 -1
  136. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoReturningUserFromFetchedAccounts.md +0 -1
  137. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotIframe.md +0 -1
  138. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotPotentiallyTrustworthy.md +0 -1
  139. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSameOrigin.md +0 -1
  140. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSignedInWithIdp.md +0 -1
  141. package/build/src/third_party/issue-descriptions/fetchingPartitionedBlobURL.md +0 -7
  142. package/build/src/third_party/issue-descriptions/genericFormAriaLabelledByToNonExistingIdError.md +0 -8
  143. package/build/src/third_party/issue-descriptions/genericFormAutocompleteAttributeEmptyError.md +0 -5
  144. package/build/src/third_party/issue-descriptions/genericFormDuplicateIdForInputError.md +0 -5
  145. package/build/src/third_party/issue-descriptions/genericFormEmptyIdAndNameAttributesForInputError.md +0 -5
  146. package/build/src/third_party/issue-descriptions/genericFormInputAssignedAutocompleteValueToIdOrNameAttributeError.md +0 -5
  147. package/build/src/third_party/issue-descriptions/genericFormInputHasWrongButWellIntendedAutocompleteValueError.md +0 -5
  148. package/build/src/third_party/issue-descriptions/genericFormInputWithNoLabelError.md +0 -5
  149. package/build/src/third_party/issue-descriptions/genericFormLabelForMatchesNonExistingIdError.md +0 -5
  150. package/build/src/third_party/issue-descriptions/genericFormLabelForNameError.md +0 -5
  151. package/build/src/third_party/issue-descriptions/genericFormLabelHasNeitherForNorNestedInputError.md +0 -5
  152. package/build/src/third_party/issue-descriptions/genericNavigationEntryMarkedSkippable.md +0 -7
  153. package/build/src/third_party/issue-descriptions/genericResponseWasBlockedByORB.md +0 -4
  154. package/build/src/third_party/issue-descriptions/heavyAd.md +0 -10
  155. package/build/src/third_party/issue-descriptions/mixedContent.md +0 -5
  156. package/build/src/third_party/issue-descriptions/navigatingPartitionedBlobURL.md +0 -5
  157. package/build/src/third_party/issue-descriptions/permissionElementActivationDisabled.md +0 -7
  158. package/build/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluder.md +0 -9
  159. package/build/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluderParent.md +0 -9
  160. package/build/src/third_party/issue-descriptions/permissionElementCspFrameAncestorsMissing.md +0 -5
  161. package/build/src/third_party/issue-descriptions/permissionElementFencedFrameDisallowed.md +0 -5
  162. package/build/src/third_party/issue-descriptions/permissionElementFontSizeTooLarge.md +0 -5
  163. package/build/src/third_party/issue-descriptions/permissionElementFontSizeTooSmall.md +0 -5
  164. package/build/src/third_party/issue-descriptions/permissionElementGeolocationDeprecated.md +0 -5
  165. package/build/src/third_party/issue-descriptions/permissionElementInsetBoxShadowUnsupported.md +0 -5
  166. package/build/src/third_party/issue-descriptions/permissionElementInvalidDisplayStyle.md +0 -5
  167. package/build/src/third_party/issue-descriptions/permissionElementInvalidSizeValue.md +0 -5
  168. package/build/src/third_party/issue-descriptions/permissionElementInvalidType.md +0 -5
  169. package/build/src/third_party/issue-descriptions/permissionElementInvalidTypeActivation.md +0 -5
  170. package/build/src/third_party/issue-descriptions/permissionElementLowContrast.md +0 -5
  171. package/build/src/third_party/issue-descriptions/permissionElementNonOpaqueColor.md +0 -5
  172. package/build/src/third_party/issue-descriptions/permissionElementPaddingBottomUnsupported.md +0 -6
  173. package/build/src/third_party/issue-descriptions/permissionElementPaddingRightUnsupported.md +0 -6
  174. package/build/src/third_party/issue-descriptions/permissionElementPermissionsPolicyBlocked.md +0 -5
  175. package/build/src/third_party/issue-descriptions/permissionElementRegistrationFailed.md +0 -5
  176. package/build/src/third_party/issue-descriptions/permissionElementRequestInProgress.md +0 -5
  177. package/build/src/third_party/issue-descriptions/permissionElementSecurityChecksFailed.md +0 -5
  178. package/build/src/third_party/issue-descriptions/permissionElementTypeNotSupported.md +0 -5
  179. package/build/src/third_party/issue-descriptions/permissionElementUntrustedEvent.md +0 -7
  180. package/build/src/third_party/issue-descriptions/placeholderDescriptionForInvisibleIssues.md +0 -3
  181. package/build/src/third_party/issue-descriptions/propertyRuleInvalidNameIssue.md +0 -3
  182. package/build/src/third_party/issue-descriptions/propertyRuleIssue.md +0 -7
  183. package/build/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedOptGroupChild.md +0 -7
  184. package/build/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedSelectChild.md +0 -7
  185. package/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentAttributesSelectDescendant.md +0 -3
  186. package/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentLegendChild.md +0 -3
  187. package/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentOptionChild.md +0 -3
  188. package/build/src/third_party/issue-descriptions/selectElementAccessibilityNonPhrasingContentOptionChild.md +0 -3
  189. package/build/src/third_party/issue-descriptions/sharedArrayBuffer.md +0 -7
  190. package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorCrossOriginNoCorsRequest.md +0 -1
  191. package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorDictionaryLoadFailure.md +0 -3
  192. package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorMatchingDictionaryNotUsed.md +0 -3
  193. package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorUnexpectedContentDictionaryHeader.md +0 -1
  194. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorCossOriginNoCorsRequest.md +0 -1
  195. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorDisallowedBySettings.md +0 -1
  196. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorExpiredResponse.md +0 -3
  197. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorFeatureDisabled.md +0 -3
  198. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInsufficientResources.md +0 -1
  199. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidMatchField.md +0 -1
  200. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidStructuredHeader.md +0 -1
  201. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidTTLField.md +0 -1
  202. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNavigationRequest.md +0 -3
  203. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNoMatchField.md +0 -1
  204. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonIntegerTTLField.md +0 -1
  205. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonListMatchDestField.md +0 -1
  206. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonSecureContext.md +0 -3
  207. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringIdField.md +0 -1
  208. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringInMatchDestList.md +0 -1
  209. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringMatchField.md +0 -1
  210. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonTokenTypeField.md +0 -1
  211. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorRequestAborted.md +0 -1
  212. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorShuttingDown.md +0 -1
  213. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorTooLongIdField.md +0 -3
  214. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorUnsupportedType.md +0 -3
  215. package/build/src/third_party/issue-descriptions/sriInvalidSignatureHeader.md +0 -14
  216. package/build/src/third_party/issue-descriptions/sriInvalidSignatureInputHeader.md +0 -15
  217. package/build/src/third_party/issue-descriptions/sriMissingSignatureHeader.md +0 -8
  218. package/build/src/third_party/issue-descriptions/sriMissingSignatureInputHeader.md +0 -7
  219. package/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsIncorrectLength.md +0 -11
  220. package/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsNotByteSequence.md +0 -14
  221. package/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsParameterized.md +0 -15
  222. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentName.md +0 -8
  223. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentType.md +0 -13
  224. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidDerivedComponentParameter.md +0 -4
  225. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidHeaderComponentParameter.md +0 -5
  226. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidParameter.md +0 -11
  227. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderKeyIdLength.md +0 -12
  228. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingLabel.md +0 -6
  229. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingRequiredParameters.md +0 -8
  230. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderValueMissingComponents.md +0 -11
  231. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderValueNotInnerList.md +0 -11
  232. package/build/src/third_party/issue-descriptions/sriValidationFailedIntegrityMismatch.md +0 -10
  233. package/build/src/third_party/issue-descriptions/sriValidationFailedInvalidLength.md +0 -5
  234. package/build/src/third_party/issue-descriptions/sriValidationFailedSignatureExpired.md +0 -6
  235. package/build/src/third_party/issue-descriptions/sriValidationFailedSignatureMismatch.md +0 -11
  236. package/build/src/third_party/issue-descriptions/stylesheetLateImport.md +0 -4
  237. package/build/src/third_party/issue-descriptions/stylesheetRequestFailed.md +0 -3
  238. package/build/src/third_party/issue-descriptions/summaryElementAccessibilityInteractiveContentSummaryDescendant.md +0 -3
  239. package/build/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestLength.md +0 -12
  240. package/build/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestType.md +0 -17
  241. package/build/src/third_party/issue-descriptions/unencodedDigestMalformedDictionary.md +0 -14
  242. package/build/src/third_party/issue-descriptions/unencodedDigestUnknownAlgorithm.md +0 -15
  243. package/build/src/tools/ToolDefinition.js +0 -20
  244. package/build/src/tools/categories.js +0 -24
  245. package/build/src/tools/console.js +0 -85
  246. package/build/src/tools/emulation.js +0 -169
  247. package/build/src/tools/extensions.js +0 -79
  248. package/build/src/tools/input.js +0 -343
  249. package/build/src/tools/network.js +0 -120
  250. package/build/src/tools/pages.js +0 -323
  251. package/build/src/tools/performance.js +0 -188
  252. package/build/src/tools/screenshot.js +0 -84
  253. package/build/src/tools/script.js +0 -71
  254. package/build/src/tools/snapshot.js +0 -52
  255. package/build/src/tools/tools.js +0 -31
  256. package/build/src/trace-processing/parse.js +0 -84
  257. package/build/src/utils/ExtensionRegistry.js +0 -35
  258. package/build/src/utils/keyboard.js +0 -296
  259. package/build/src/utils/pagination.js +0 -49
  260. package/build/src/utils/string.js +0 -36
  261. package/build/src/utils/types.js +0 -6
package/build/src/cli.js DELETED
@@ -1,295 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { yargs, hideBin } from './third_party/index.js';
7
- export const cliOptions = {
8
- autoConnect: {
9
- type: 'boolean',
10
- description: 'If specified, automatically connects to a browser (Chrome 144+) running in the user data directory identified by the channel param. Requires the remoted debugging server to be started in the Chrome instance via chrome://inspect/#remote-debugging.',
11
- conflicts: ['isolated', 'executablePath'],
12
- default: false,
13
- coerce: (value) => {
14
- if (!value) {
15
- return;
16
- }
17
- return value;
18
- },
19
- },
20
- browserUrl: {
21
- type: 'string',
22
- description: 'Connect to a running, debuggable Chrome instance (e.g. `http://127.0.0.1:9222`). For more details see: https://github.com/ChromeDevTools/chrome-devtools-mcp#connecting-to-a-running-chrome-instance.',
23
- alias: 'u',
24
- conflicts: 'wsEndpoint',
25
- coerce: (url) => {
26
- if (!url) {
27
- return;
28
- }
29
- try {
30
- new URL(url);
31
- }
32
- catch {
33
- throw new Error(`Provided browserUrl ${url} is not valid URL.`);
34
- }
35
- return url;
36
- },
37
- },
38
- wsEndpoint: {
39
- type: 'string',
40
- description: 'WebSocket endpoint to connect to a running Chrome instance (e.g., ws://127.0.0.1:9222/devtools/browser/<id>). Alternative to --browserUrl.',
41
- alias: 'w',
42
- conflicts: 'browserUrl',
43
- coerce: (url) => {
44
- if (!url) {
45
- return;
46
- }
47
- try {
48
- const parsed = new URL(url);
49
- if (parsed.protocol !== 'ws:' && parsed.protocol !== 'wss:') {
50
- throw new Error(`Provided wsEndpoint ${url} must use ws:// or wss:// protocol.`);
51
- }
52
- return url;
53
- }
54
- catch (error) {
55
- if (error.message.includes('ws://')) {
56
- throw error;
57
- }
58
- throw new Error(`Provided wsEndpoint ${url} is not valid URL.`);
59
- }
60
- },
61
- },
62
- wsHeaders: {
63
- type: 'string',
64
- description: 'Custom headers for WebSocket connection in JSON format (e.g., \'{"Authorization":"Bearer token"}\'). Only works with --wsEndpoint.',
65
- implies: 'wsEndpoint',
66
- coerce: (val) => {
67
- if (!val) {
68
- return;
69
- }
70
- try {
71
- const parsed = JSON.parse(val);
72
- if (typeof parsed !== 'object' || Array.isArray(parsed)) {
73
- throw new Error('Headers must be a JSON object');
74
- }
75
- return parsed;
76
- }
77
- catch (error) {
78
- throw new Error(`Invalid JSON for wsHeaders: ${error.message}`);
79
- }
80
- },
81
- },
82
- headless: {
83
- type: 'boolean',
84
- description: 'Whether to run in headless (no UI) mode.',
85
- default: false,
86
- },
87
- executablePath: {
88
- type: 'string',
89
- description: 'Path to custom Chrome executable.',
90
- conflicts: ['browserUrl', 'wsEndpoint'],
91
- alias: 'e',
92
- },
93
- isolated: {
94
- type: 'boolean',
95
- description: 'If specified, creates a temporary user-data-dir that is automatically cleaned up after the browser is closed. Defaults to false.',
96
- },
97
- userDataDir: {
98
- type: 'string',
99
- description: 'Path to the user data directory for Chrome. Default is $HOME/.cache/chrome-devtools-mcp/chrome-profile$CHANNEL_SUFFIX_IF_NON_STABLE',
100
- conflicts: ['browserUrl', 'wsEndpoint', 'isolated'],
101
- },
102
- channel: {
103
- type: 'string',
104
- description: 'Specify a different Chrome channel that should be used. The default is the stable channel version.',
105
- choices: ['stable', 'canary', 'beta', 'dev'],
106
- conflicts: ['browserUrl', 'wsEndpoint', 'executablePath'],
107
- },
108
- logFile: {
109
- type: 'string',
110
- describe: 'Path to a file to write debug logs to. Set the env variable `DEBUG` to `*` to enable verbose logs. Useful for submitting bug reports.',
111
- },
112
- viewport: {
113
- type: 'string',
114
- describe: 'Initial viewport size for the Chrome instances started by the server. For example, `1280x720`. In headless mode, max size is 3840x2160px.',
115
- coerce: (arg) => {
116
- if (arg === undefined) {
117
- return;
118
- }
119
- const [width, height] = arg.split('x').map(Number);
120
- if (!width || !height || Number.isNaN(width) || Number.isNaN(height)) {
121
- throw new Error('Invalid viewport. Expected format is `1280x720`.');
122
- }
123
- return {
124
- width,
125
- height,
126
- };
127
- },
128
- },
129
- proxyServer: {
130
- type: 'string',
131
- description: `Proxy server configuration for Chrome passed as --proxy-server when launching the browser. See https://www.chromium.org/developers/design-documents/network-settings/ for details.`,
132
- },
133
- acceptInsecureCerts: {
134
- type: 'boolean',
135
- description: `If enabled, ignores errors relative to self-signed and expired certificates. Use with caution.`,
136
- },
137
- experimentalDevtools: {
138
- type: 'boolean',
139
- describe: 'Whether to enable automation over DevTools targets',
140
- hidden: true,
141
- },
142
- experimentalVision: {
143
- type: 'boolean',
144
- describe: 'Whether to enable vision tools',
145
- hidden: true,
146
- },
147
- experimentalStructuredContent: {
148
- type: 'boolean',
149
- describe: 'Whether to output structured formatted content.',
150
- hidden: true,
151
- },
152
- experimentalIncludeAllPages: {
153
- type: 'boolean',
154
- describe: 'Whether to include all kinds of pages such as webviews or background pages as pages.',
155
- hidden: true,
156
- },
157
- experimentalInteropTools: {
158
- type: 'boolean',
159
- describe: 'Whether to enable interoperability tools',
160
- hidden: true,
161
- },
162
- chromeArg: {
163
- type: 'array',
164
- describe: 'Additional arguments for Chrome. Only applies when Chrome is launched by chrome-devtools-mcp.',
165
- },
166
- ignoreDefaultChromeArg: {
167
- type: 'array',
168
- describe: 'Explicitly disable default arguments for Chrome. Only applies when Chrome is launched by chrome-devtools-mcp.',
169
- },
170
- categoryEmulation: {
171
- type: 'boolean',
172
- default: true,
173
- describe: 'Set to false to exclude tools related to emulation.',
174
- },
175
- categoryPerformance: {
176
- type: 'boolean',
177
- default: true,
178
- describe: 'Set to false to exclude tools related to performance.',
179
- },
180
- categoryNetwork: {
181
- type: 'boolean',
182
- default: true,
183
- describe: 'Set to false to exclude tools related to network.',
184
- },
185
- categoryExtensions: {
186
- type: 'boolean',
187
- default: false,
188
- hidden: true,
189
- describe: 'Set to false to exclude tools related to extensions.',
190
- },
191
- performanceCrux: {
192
- type: 'boolean',
193
- default: true,
194
- describe: 'Set to false to disable sending URLs from performance traces to CrUX API to get field performance data.',
195
- },
196
- usageStatistics: {
197
- type: 'boolean',
198
- default: true,
199
- describe: 'Set to false to opt-out of usage statistics collection. Google collects usage data to improve the tool, handled under the Google Privacy Policy (https://policies.google.com/privacy). This is independent from Chrome browser metrics. Disabled if CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS or CI env variables are set.',
200
- },
201
- clearcutEndpoint: {
202
- type: 'string',
203
- hidden: true,
204
- describe: 'Endpoint for Clearcut telemetry.',
205
- },
206
- clearcutForceFlushIntervalMs: {
207
- type: 'number',
208
- hidden: true,
209
- describe: 'Force flush interval in milliseconds (for testing).',
210
- },
211
- clearcutIncludePidHeader: {
212
- type: 'boolean',
213
- hidden: true,
214
- describe: 'Include watchdog PID in Clearcut request headers (for testing).',
215
- },
216
- };
217
- export function parseArguments(version, argv = process.argv) {
218
- const yargsInstance = yargs(hideBin(argv))
219
- .scriptName('npx chrome-devtools-mcp@latest')
220
- .options(cliOptions)
221
- .check(args => {
222
- // We can't set default in the options else
223
- // Yargs will complain
224
- if (!args.channel &&
225
- !args.browserUrl &&
226
- !args.wsEndpoint &&
227
- !args.executablePath) {
228
- args.channel = 'stable';
229
- }
230
- return true;
231
- })
232
- .example([
233
- [
234
- '$0 --browserUrl http://127.0.0.1:9222',
235
- 'Connect to an existing browser instance via HTTP',
236
- ],
237
- [
238
- '$0 --wsEndpoint ws://127.0.0.1:9222/devtools/browser/abc123',
239
- 'Connect to an existing browser instance via WebSocket',
240
- ],
241
- [
242
- `$0 --wsEndpoint ws://127.0.0.1:9222/devtools/browser/abc123 --wsHeaders '{"Authorization":"Bearer token"}'`,
243
- 'Connect via WebSocket with custom headers',
244
- ],
245
- ['$0 --channel beta', 'Use Chrome Beta installed on this system'],
246
- ['$0 --channel canary', 'Use Chrome Canary installed on this system'],
247
- ['$0 --channel dev', 'Use Chrome Dev installed on this system'],
248
- ['$0 --channel stable', 'Use stable Chrome installed on this system'],
249
- ['$0 --logFile /tmp/log.txt', 'Save logs to a file'],
250
- ['$0 --help', 'Print CLI options'],
251
- [
252
- '$0 --viewport 1280x720',
253
- 'Launch Chrome with the initial viewport size of 1280x720px',
254
- ],
255
- [
256
- `$0 --chrome-arg='--no-sandbox' --chrome-arg='--disable-setuid-sandbox'`,
257
- 'Launch Chrome without sandboxes. Use with caution.',
258
- ],
259
- [
260
- `$0 --ignore-default-chrome-arg='--disable-extensions'`,
261
- 'Disable the default arguments provided by Puppeteer. Use with caution.',
262
- ],
263
- ['$0 --no-category-emulation', 'Disable tools in the emulation category'],
264
- [
265
- '$0 --no-category-performance',
266
- 'Disable tools in the performance category',
267
- ],
268
- ['$0 --no-category-network', 'Disable tools in the network category'],
269
- [
270
- '$0 --user-data-dir=/tmp/user-data-dir',
271
- 'Use a custom user data directory',
272
- ],
273
- [
274
- '$0 --auto-connect',
275
- 'Connect to a stable Chrome instance (Chrome 144+) running instead of launching a new instance',
276
- ],
277
- [
278
- '$0 --auto-connect --channel=canary',
279
- 'Connect to a canary Chrome instance (Chrome 144+) running instead of launching a new instance',
280
- ],
281
- [
282
- '$0 --no-usage-statistics',
283
- 'Do not send usage statistics https://github.com/ChromeDevTools/chrome-devtools-mcp#usage-statistics.',
284
- ],
285
- [
286
- '$0 --no-performance-crux',
287
- 'Disable CrUX (field data) integration in performance tools.',
288
- ],
289
- ]);
290
- return yargsInstance
291
- .wrap(Math.min(120, yargsInstance.terminalWidth()))
292
- .help()
293
- .version(version)
294
- .parseSync();
295
- }
@@ -1,240 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2026 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- var _a;
7
- import { createStackTraceForConsoleMessage, SymbolizedError, } from '../DevtoolsUtils.js';
8
- import { UncaughtError } from '../PageCollector.js';
9
- import * as DevTools from '../third_party/index.js';
10
- export class ConsoleFormatter {
11
- static #STACK_TRACE_MAX_LINES = 50;
12
- #id;
13
- #type;
14
- #text;
15
- #argCount;
16
- #resolvedArgs;
17
- #stack;
18
- #cause;
19
- #isIgnored;
20
- constructor(params) {
21
- this.#id = params.id;
22
- this.#type = params.type;
23
- this.#text = params.text;
24
- this.#argCount = params.argCount ?? 0;
25
- this.#resolvedArgs = params.resolvedArgs ?? [];
26
- this.#stack = params.stack;
27
- this.#cause = params.cause;
28
- this.#isIgnored = params.isIgnored;
29
- }
30
- static async from(msg, options) {
31
- const ignoreListManager = options?.devTools?.universe.context.get(DevTools.DevTools.IgnoreListManager);
32
- const isIgnored = options.isIgnoredForTesting ||
33
- (frame => {
34
- if (!ignoreListManager) {
35
- return false;
36
- }
37
- if (frame.uiSourceCode) {
38
- return ignoreListManager.isUserOrSourceMapIgnoreListedUISourceCode(frame.uiSourceCode);
39
- }
40
- if (frame.url) {
41
- return ignoreListManager.isUserIgnoreListedURL(frame.url);
42
- }
43
- return false;
44
- });
45
- if (msg instanceof UncaughtError) {
46
- const error = await SymbolizedError.fromDetails({
47
- devTools: options?.devTools,
48
- details: msg.details,
49
- targetId: msg.targetId,
50
- includeStackAndCause: options?.fetchDetailedData,
51
- resolvedStackTraceForTesting: options?.resolvedStackTraceForTesting,
52
- resolvedCauseForTesting: options?.resolvedCauseForTesting,
53
- });
54
- return new _a({
55
- id: options.id,
56
- type: 'error',
57
- text: error.message,
58
- stack: error.stackTrace,
59
- cause: error.cause,
60
- isIgnored,
61
- });
62
- }
63
- let resolvedArgs = [];
64
- if (options.resolvedArgsForTesting) {
65
- resolvedArgs = options.resolvedArgsForTesting;
66
- }
67
- else if (options.fetchDetailedData) {
68
- resolvedArgs = await Promise.all(msg.args().map(async (arg, i) => {
69
- try {
70
- const remoteObject = arg.remoteObject();
71
- if (remoteObject.type === 'object' &&
72
- remoteObject.subtype === 'error') {
73
- return await SymbolizedError.fromError({
74
- devTools: options.devTools,
75
- error: remoteObject,
76
- // @ts-expect-error Internal ConsoleMessage API
77
- targetId: msg._targetId(),
78
- });
79
- }
80
- return await arg.jsonValue();
81
- }
82
- catch {
83
- return `<error: Argument ${i} is no longer available>`;
84
- }
85
- }));
86
- }
87
- let stack;
88
- if (options.resolvedStackTraceForTesting) {
89
- stack = options.resolvedStackTraceForTesting;
90
- }
91
- else if (options.fetchDetailedData && options.devTools) {
92
- try {
93
- stack = await createStackTraceForConsoleMessage(options.devTools, msg);
94
- }
95
- catch {
96
- // ignore
97
- }
98
- }
99
- return new _a({
100
- id: options.id,
101
- type: msg.type(),
102
- text: msg.text(),
103
- argCount: resolvedArgs.length || msg.args().length,
104
- resolvedArgs,
105
- stack,
106
- isIgnored,
107
- });
108
- }
109
- // The short format for a console message.
110
- toString() {
111
- return `msgid=${this.#id} [${this.#type}] ${this.#text} (${this.#argCount} args)`;
112
- }
113
- // The verbose format for a console message, including all details.
114
- toStringDetailed() {
115
- const result = [
116
- `ID: ${this.#id}`,
117
- `Message: ${this.#type}> ${this.#text}`,
118
- this.#formatArgs(),
119
- this.#formatStackTrace(this.#stack, this.#cause, {
120
- includeHeading: true,
121
- }),
122
- ].filter(line => !!line);
123
- return result.join('\n');
124
- }
125
- #getArgs() {
126
- if (this.#resolvedArgs.length > 0) {
127
- const args = [...this.#resolvedArgs];
128
- // If there is no text, the first argument serves as text (see formatMessage).
129
- if (!this.#text) {
130
- args.shift();
131
- }
132
- return args;
133
- }
134
- return [];
135
- }
136
- #formatArg(arg) {
137
- if (arg instanceof SymbolizedError) {
138
- return [
139
- arg.message,
140
- this.#formatStackTrace(arg.stackTrace, arg.cause, {
141
- includeHeading: false,
142
- }),
143
- ]
144
- .filter(line => !!line)
145
- .join('\n');
146
- }
147
- return typeof arg === 'object' ? JSON.stringify(arg) : String(arg);
148
- }
149
- #formatArgs() {
150
- const args = this.#getArgs();
151
- if (!args.length) {
152
- return '';
153
- }
154
- const result = ['### Arguments'];
155
- for (const [key, arg] of args.entries()) {
156
- result.push(`Arg #${key}: ${this.#formatArg(arg)}`);
157
- }
158
- return result.join('\n');
159
- }
160
- #formatStackTrace(stackTrace, cause, opts) {
161
- if (!stackTrace) {
162
- return '';
163
- }
164
- const lines = this.#formatStackTraceInner(stackTrace, cause);
165
- const includedLines = lines.slice(0, _a.#STACK_TRACE_MAX_LINES);
166
- const reminderCount = lines.length - includedLines.length;
167
- return [
168
- opts.includeHeading ? '### Stack trace' : '',
169
- ...includedLines,
170
- reminderCount > 0 ? `... and ${reminderCount} more frames` : '',
171
- 'Note: line and column numbers use 1-based indexing',
172
- ]
173
- .filter(line => !!line)
174
- .join('\n');
175
- }
176
- #formatStackTraceInner(stackTrace, cause) {
177
- if (!stackTrace) {
178
- return [];
179
- }
180
- return [
181
- ...this.#formatFragment(stackTrace.syncFragment),
182
- ...stackTrace.asyncFragments
183
- .map(this.#formatAsyncFragment.bind(this))
184
- .flat(),
185
- ...this.#formatCause(cause),
186
- ];
187
- }
188
- #formatFragment(fragment) {
189
- const frames = fragment.frames.filter(frame => !this.#isIgnored(frame));
190
- return frames.map(this.#formatFrame.bind(this));
191
- }
192
- #formatAsyncFragment(fragment) {
193
- const formattedFrames = this.#formatFragment(fragment);
194
- if (formattedFrames.length === 0) {
195
- return [];
196
- }
197
- const separatorLineLength = 40;
198
- const prefix = `--- ${fragment.description || 'async'} `;
199
- const separator = prefix + '-'.repeat(separatorLineLength - prefix.length);
200
- return [separator, ...formattedFrames];
201
- }
202
- #formatFrame(frame) {
203
- let result = `at ${frame.name ?? '<anonymous>'}`;
204
- if (frame.uiSourceCode) {
205
- const location = frame.uiSourceCode.uiLocation(frame.line, frame.column);
206
- result += ` (${location.linkText(/* skipTrim */ false, /* showColumnNumber */ true)})`;
207
- }
208
- else if (frame.url) {
209
- result += ` (${frame.url}:${frame.line}:${frame.column})`;
210
- }
211
- return result;
212
- }
213
- #formatCause(cause) {
214
- if (!cause) {
215
- return [];
216
- }
217
- return [
218
- `Caused by: ${cause.message}`,
219
- ...this.#formatStackTraceInner(cause.stackTrace, cause.cause),
220
- ];
221
- }
222
- toJSON() {
223
- return {
224
- type: this.#type,
225
- text: this.#text,
226
- argsCount: this.#argCount,
227
- id: this.#id,
228
- };
229
- }
230
- toJSONDetailed() {
231
- return {
232
- id: this.#id,
233
- type: this.#type,
234
- text: this.#text,
235
- args: this.#getArgs().map(arg => typeof arg === 'object' ? arg : String(arg)),
236
- stackTrace: this.#stack,
237
- };
238
- }
239
- }
240
- _a = ConsoleFormatter;