chrome-devtools-mcp 0.17.0 → 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 (258) hide show
  1. package/README.md +49 -10
  2. package/package.json +5 -4
  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/clearcut-logger.js +0 -102
  22. package/build/src/telemetry/flag-utils.js +0 -45
  23. package/build/src/telemetry/metric-utils.js +0 -14
  24. package/build/src/telemetry/persistence.js +0 -53
  25. package/build/src/telemetry/types.js +0 -33
  26. package/build/src/telemetry/watchdog/clearcut-sender.js +0 -201
  27. package/build/src/telemetry/watchdog/main.js +0 -127
  28. package/build/src/telemetry/watchdog-client.js +0 -60
  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 -172770
  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/cookieCrossSiteRedirectDowngrade.md +0 -12
  78. package/build/src/third_party/issue-descriptions/cookieExcludeBlockedWithinRelatedWebsiteSet.md +0 -4
  79. package/build/src/third_party/issue-descriptions/cookieExcludeDomainNonAscii.md +0 -11
  80. package/build/src/third_party/issue-descriptions/cookieExcludePortMismatch.md +0 -8
  81. package/build/src/third_party/issue-descriptions/cookieExcludeSchemeMismatch.md +0 -7
  82. package/build/src/third_party/issue-descriptions/cookieExcludeThirdPartyPhaseoutRead.md +0 -6
  83. package/build/src/third_party/issue-descriptions/cookieExcludeThirdPartyPhaseoutSet.md +0 -6
  84. package/build/src/third_party/issue-descriptions/cookieWarnDomainNonAscii.md +0 -11
  85. package/build/src/third_party/issue-descriptions/cookieWarnMetadataGrantRead.md +0 -4
  86. package/build/src/third_party/issue-descriptions/cookieWarnMetadataGrantSet.md +0 -4
  87. package/build/src/third_party/issue-descriptions/cookieWarnThirdPartyPhaseoutRead.md +0 -6
  88. package/build/src/third_party/issue-descriptions/cookieWarnThirdPartyPhaseoutSet.md +0 -6
  89. package/build/src/third_party/issue-descriptions/corsAllowCredentialsRequired.md +0 -6
  90. package/build/src/third_party/issue-descriptions/corsDisabledScheme.md +0 -7
  91. package/build/src/third_party/issue-descriptions/corsDisallowedByMode.md +0 -7
  92. package/build/src/third_party/issue-descriptions/corsHeaderDisallowedByPreflightResponse.md +0 -5
  93. package/build/src/third_party/issue-descriptions/corsInsecurePrivateNetwork.md +0 -10
  94. package/build/src/third_party/issue-descriptions/corsInvalidHeaderValues.md +0 -7
  95. package/build/src/third_party/issue-descriptions/corsLocalNetworkAccessPermissionDenied.md +0 -19
  96. package/build/src/third_party/issue-descriptions/corsMethodDisallowedByPreflightResponse.md +0 -5
  97. package/build/src/third_party/issue-descriptions/corsNoCorsRedirectModeNotFollow.md +0 -5
  98. package/build/src/third_party/issue-descriptions/corsOriginMismatch.md +0 -6
  99. package/build/src/third_party/issue-descriptions/corsPreflightAllowPrivateNetworkError.md +0 -10
  100. package/build/src/third_party/issue-descriptions/corsPreflightResponseInvalid.md +0 -5
  101. package/build/src/third_party/issue-descriptions/corsPrivateNetworkPermissionDenied.md +0 -10
  102. package/build/src/third_party/issue-descriptions/corsRedirectContainsCredentials.md +0 -5
  103. package/build/src/third_party/issue-descriptions/corsWildcardOriginNotAllowed.md +0 -8
  104. package/build/src/third_party/issue-descriptions/cspEvalViolation.md +0 -9
  105. package/build/src/third_party/issue-descriptions/cspInlineViolation.md +0 -10
  106. package/build/src/third_party/issue-descriptions/cspTrustedTypesPolicyViolation.md +0 -5
  107. package/build/src/third_party/issue-descriptions/cspTrustedTypesSinkViolation.md +0 -8
  108. package/build/src/third_party/issue-descriptions/cspURLViolation.md +0 -10
  109. package/build/src/third_party/issue-descriptions/deprecation.md +0 -3
  110. package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsHttpNotFound.md +0 -1
  111. package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsInvalidResponse.md +0 -1
  112. package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsNoResponse.md +0 -1
  113. package/build/src/third_party/issue-descriptions/federatedAuthRequestApprovalDeclined.md +0 -1
  114. package/build/src/third_party/issue-descriptions/federatedAuthRequestCanceled.md +0 -1
  115. package/build/src/third_party/issue-descriptions/federatedAuthRequestClientMetadataHttpNotFound.md +0 -1
  116. package/build/src/third_party/issue-descriptions/federatedAuthRequestClientMetadataInvalidResponse.md +0 -1
  117. package/build/src/third_party/issue-descriptions/federatedAuthRequestClientMetadataNoResponse.md +0 -1
  118. package/build/src/third_party/issue-descriptions/federatedAuthRequestErrorFetchingSignin.md +0 -1
  119. package/build/src/third_party/issue-descriptions/federatedAuthRequestErrorIdToken.md +0 -1
  120. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenHttpNotFound.md +0 -1
  121. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidRequest.md +0 -1
  122. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidResponse.md +0 -1
  123. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenNoResponse.md +0 -1
  124. package/build/src/third_party/issue-descriptions/federatedAuthRequestInvalidSigninResponse.md +0 -1
  125. package/build/src/third_party/issue-descriptions/federatedAuthRequestManifestHttpNotFound.md +0 -1
  126. package/build/src/third_party/issue-descriptions/federatedAuthRequestManifestInvalidResponse.md +0 -1
  127. package/build/src/third_party/issue-descriptions/federatedAuthRequestManifestNoResponse.md +0 -1
  128. package/build/src/third_party/issue-descriptions/federatedAuthRequestTooManyRequests.md +0 -1
  129. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidAccountsResponse.md +0 -1
  130. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidConfigOrWellKnown.md +0 -1
  131. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoAccountSharingPermission.md +0 -1
  132. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoApiPermission.md +0 -1
  133. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoReturningUserFromFetchedAccounts.md +0 -1
  134. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotIframe.md +0 -1
  135. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotPotentiallyTrustworthy.md +0 -1
  136. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSameOrigin.md +0 -1
  137. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSignedInWithIdp.md +0 -1
  138. package/build/src/third_party/issue-descriptions/fetchingPartitionedBlobURL.md +0 -7
  139. package/build/src/third_party/issue-descriptions/genericFormAriaLabelledByToNonExistingIdError.md +0 -8
  140. package/build/src/third_party/issue-descriptions/genericFormAutocompleteAttributeEmptyError.md +0 -5
  141. package/build/src/third_party/issue-descriptions/genericFormDuplicateIdForInputError.md +0 -5
  142. package/build/src/third_party/issue-descriptions/genericFormEmptyIdAndNameAttributesForInputError.md +0 -5
  143. package/build/src/third_party/issue-descriptions/genericFormInputAssignedAutocompleteValueToIdOrNameAttributeError.md +0 -5
  144. package/build/src/third_party/issue-descriptions/genericFormInputHasWrongButWellIntendedAutocompleteValueError.md +0 -5
  145. package/build/src/third_party/issue-descriptions/genericFormInputWithNoLabelError.md +0 -5
  146. package/build/src/third_party/issue-descriptions/genericFormLabelForMatchesNonExistingIdError.md +0 -5
  147. package/build/src/third_party/issue-descriptions/genericFormLabelForNameError.md +0 -5
  148. package/build/src/third_party/issue-descriptions/genericFormLabelHasNeitherForNorNestedInputError.md +0 -5
  149. package/build/src/third_party/issue-descriptions/genericNavigationEntryMarkedSkippable.md +0 -7
  150. package/build/src/third_party/issue-descriptions/genericResponseWasBlockedByORB.md +0 -4
  151. package/build/src/third_party/issue-descriptions/heavyAd.md +0 -10
  152. package/build/src/third_party/issue-descriptions/mixedContent.md +0 -5
  153. package/build/src/third_party/issue-descriptions/navigatingPartitionedBlobURL.md +0 -5
  154. package/build/src/third_party/issue-descriptions/permissionElementActivationDisabled.md +0 -7
  155. package/build/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluder.md +0 -9
  156. package/build/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluderParent.md +0 -9
  157. package/build/src/third_party/issue-descriptions/permissionElementCspFrameAncestorsMissing.md +0 -5
  158. package/build/src/third_party/issue-descriptions/permissionElementFencedFrameDisallowed.md +0 -5
  159. package/build/src/third_party/issue-descriptions/permissionElementFontSizeTooLarge.md +0 -5
  160. package/build/src/third_party/issue-descriptions/permissionElementFontSizeTooSmall.md +0 -5
  161. package/build/src/third_party/issue-descriptions/permissionElementGeolocationDeprecated.md +0 -5
  162. package/build/src/third_party/issue-descriptions/permissionElementInsetBoxShadowUnsupported.md +0 -5
  163. package/build/src/third_party/issue-descriptions/permissionElementInvalidDisplayStyle.md +0 -5
  164. package/build/src/third_party/issue-descriptions/permissionElementInvalidSizeValue.md +0 -5
  165. package/build/src/third_party/issue-descriptions/permissionElementInvalidType.md +0 -5
  166. package/build/src/third_party/issue-descriptions/permissionElementInvalidTypeActivation.md +0 -5
  167. package/build/src/third_party/issue-descriptions/permissionElementLowContrast.md +0 -5
  168. package/build/src/third_party/issue-descriptions/permissionElementNonOpaqueColor.md +0 -5
  169. package/build/src/third_party/issue-descriptions/permissionElementPaddingBottomUnsupported.md +0 -6
  170. package/build/src/third_party/issue-descriptions/permissionElementPaddingRightUnsupported.md +0 -6
  171. package/build/src/third_party/issue-descriptions/permissionElementPermissionsPolicyBlocked.md +0 -5
  172. package/build/src/third_party/issue-descriptions/permissionElementRegistrationFailed.md +0 -5
  173. package/build/src/third_party/issue-descriptions/permissionElementRequestInProgress.md +0 -5
  174. package/build/src/third_party/issue-descriptions/permissionElementSecurityChecksFailed.md +0 -5
  175. package/build/src/third_party/issue-descriptions/permissionElementTypeNotSupported.md +0 -5
  176. package/build/src/third_party/issue-descriptions/permissionElementUntrustedEvent.md +0 -7
  177. package/build/src/third_party/issue-descriptions/placeholderDescriptionForInvisibleIssues.md +0 -3
  178. package/build/src/third_party/issue-descriptions/propertyRuleInvalidNameIssue.md +0 -3
  179. package/build/src/third_party/issue-descriptions/propertyRuleIssue.md +0 -7
  180. package/build/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedOptGroupChild.md +0 -7
  181. package/build/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedSelectChild.md +0 -7
  182. package/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentAttributesSelectDescendant.md +0 -3
  183. package/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentLegendChild.md +0 -3
  184. package/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentOptionChild.md +0 -3
  185. package/build/src/third_party/issue-descriptions/selectElementAccessibilityNonPhrasingContentOptionChild.md +0 -3
  186. package/build/src/third_party/issue-descriptions/sharedArrayBuffer.md +0 -7
  187. package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorCrossOriginNoCorsRequest.md +0 -1
  188. package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorDictionaryLoadFailure.md +0 -3
  189. package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorMatchingDictionaryNotUsed.md +0 -3
  190. package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorUnexpectedContentDictionaryHeader.md +0 -1
  191. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorCossOriginNoCorsRequest.md +0 -1
  192. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorDisallowedBySettings.md +0 -1
  193. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorExpiredResponse.md +0 -3
  194. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorFeatureDisabled.md +0 -3
  195. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInsufficientResources.md +0 -1
  196. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidMatchField.md +0 -1
  197. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidStructuredHeader.md +0 -1
  198. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidTTLField.md +0 -1
  199. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNavigationRequest.md +0 -3
  200. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNoMatchField.md +0 -1
  201. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonIntegerTTLField.md +0 -1
  202. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonListMatchDestField.md +0 -1
  203. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonSecureContext.md +0 -3
  204. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringIdField.md +0 -1
  205. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringInMatchDestList.md +0 -1
  206. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringMatchField.md +0 -1
  207. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonTokenTypeField.md +0 -1
  208. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorRequestAborted.md +0 -1
  209. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorShuttingDown.md +0 -1
  210. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorTooLongIdField.md +0 -3
  211. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorUnsupportedType.md +0 -3
  212. package/build/src/third_party/issue-descriptions/sriInvalidSignatureHeader.md +0 -14
  213. package/build/src/third_party/issue-descriptions/sriInvalidSignatureInputHeader.md +0 -15
  214. package/build/src/third_party/issue-descriptions/sriMissingSignatureHeader.md +0 -8
  215. package/build/src/third_party/issue-descriptions/sriMissingSignatureInputHeader.md +0 -7
  216. package/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsIncorrectLength.md +0 -11
  217. package/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsNotByteSequence.md +0 -14
  218. package/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsParameterized.md +0 -15
  219. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentName.md +0 -8
  220. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentType.md +0 -13
  221. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidDerivedComponentParameter.md +0 -4
  222. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidHeaderComponentParameter.md +0 -5
  223. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidParameter.md +0 -11
  224. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderKeyIdLength.md +0 -12
  225. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingLabel.md +0 -6
  226. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingRequiredParameters.md +0 -8
  227. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderValueMissingComponents.md +0 -11
  228. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderValueNotInnerList.md +0 -11
  229. package/build/src/third_party/issue-descriptions/sriValidationFailedIntegrityMismatch.md +0 -10
  230. package/build/src/third_party/issue-descriptions/sriValidationFailedInvalidLength.md +0 -5
  231. package/build/src/third_party/issue-descriptions/sriValidationFailedSignatureExpired.md +0 -6
  232. package/build/src/third_party/issue-descriptions/sriValidationFailedSignatureMismatch.md +0 -11
  233. package/build/src/third_party/issue-descriptions/stylesheetLateImport.md +0 -4
  234. package/build/src/third_party/issue-descriptions/stylesheetRequestFailed.md +0 -3
  235. package/build/src/third_party/issue-descriptions/summaryElementAccessibilityInteractiveContentSummaryDescendant.md +0 -3
  236. package/build/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestLength.md +0 -12
  237. package/build/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestType.md +0 -17
  238. package/build/src/third_party/issue-descriptions/unencodedDigestMalformedDictionary.md +0 -14
  239. package/build/src/third_party/issue-descriptions/unencodedDigestUnknownAlgorithm.md +0 -15
  240. package/build/src/tools/ToolDefinition.js +0 -20
  241. package/build/src/tools/categories.js +0 -24
  242. package/build/src/tools/console.js +0 -85
  243. package/build/src/tools/emulation.js +0 -169
  244. package/build/src/tools/extensions.js +0 -79
  245. package/build/src/tools/input.js +0 -343
  246. package/build/src/tools/network.js +0 -120
  247. package/build/src/tools/pages.js +0 -323
  248. package/build/src/tools/performance.js +0 -188
  249. package/build/src/tools/screenshot.js +0 -84
  250. package/build/src/tools/script.js +0 -71
  251. package/build/src/tools/snapshot.js +0 -52
  252. package/build/src/tools/tools.js +0 -31
  253. package/build/src/trace-processing/parse.js +0 -84
  254. package/build/src/utils/ExtensionRegistry.js +0 -35
  255. package/build/src/utils/keyboard.js +0 -296
  256. package/build/src/utils/pagination.js +0 -49
  257. package/build/src/utils/string.js +0 -36
  258. package/build/src/utils/types.js +0 -6
@@ -1,169 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- *
6
- */
7
- import { zod, PredefinedNetworkConditions } from '../third_party/index.js';
8
- import { ToolCategory } from './categories.js';
9
- import { defineTool } from './ToolDefinition.js';
10
- const throttlingOptions = [
11
- 'No emulation',
12
- 'Offline',
13
- ...Object.keys(PredefinedNetworkConditions),
14
- ];
15
- export const emulate = defineTool({
16
- name: 'emulate',
17
- description: `Emulates various features on the selected page.`,
18
- annotations: {
19
- category: ToolCategory.EMULATION,
20
- readOnlyHint: false,
21
- },
22
- schema: {
23
- networkConditions: zod
24
- .enum(throttlingOptions)
25
- .optional()
26
- .describe(`Throttle network. Set to "No emulation" to disable. If omitted, conditions remain unchanged.`),
27
- cpuThrottlingRate: zod
28
- .number()
29
- .min(1)
30
- .max(20)
31
- .optional()
32
- .describe('Represents the CPU slowdown factor. Set the rate to 1 to disable throttling. If omitted, throttling remains unchanged.'),
33
- geolocation: zod
34
- .object({
35
- latitude: zod
36
- .number()
37
- .min(-90)
38
- .max(90)
39
- .describe('Latitude between -90 and 90.'),
40
- longitude: zod
41
- .number()
42
- .min(-180)
43
- .max(180)
44
- .describe('Longitude between -180 and 180.'),
45
- })
46
- .nullable()
47
- .optional()
48
- .describe('Geolocation to emulate. Set to null to clear the geolocation override.'),
49
- userAgent: zod
50
- .string()
51
- .nullable()
52
- .optional()
53
- .describe('User agent to emulate. Set to null to clear the user agent override.'),
54
- colorScheme: zod
55
- .enum(['dark', 'light', 'auto'])
56
- .optional()
57
- .describe('Emulate the dark or the light mode. Set to "auto" to reset to the default.'),
58
- viewport: zod
59
- .object({
60
- width: zod.number().int().min(0).describe('Page width in pixels.'),
61
- height: zod.number().int().min(0).describe('Page height in pixels.'),
62
- deviceScaleFactor: zod
63
- .number()
64
- .min(0)
65
- .optional()
66
- .describe('Specify device scale factor (can be thought of as dpr).'),
67
- isMobile: zod
68
- .boolean()
69
- .optional()
70
- .describe('Whether the meta viewport tag is taken into account. Defaults to false.'),
71
- hasTouch: zod
72
- .boolean()
73
- .optional()
74
- .describe('Specifies if viewport supports touch events. This should be set to true for mobile devices.'),
75
- isLandscape: zod
76
- .boolean()
77
- .optional()
78
- .describe('Specifies if viewport is in landscape mode. Defaults to false.'),
79
- })
80
- .nullable()
81
- .optional()
82
- .describe('Viewport to emulate. Set to null to reset to the default viewport.'),
83
- },
84
- handler: async (request, _response, context) => {
85
- const page = context.getSelectedPage();
86
- const { networkConditions, cpuThrottlingRate, geolocation, userAgent, viewport, } = request.params;
87
- if (networkConditions) {
88
- if (networkConditions === 'No emulation') {
89
- await page.emulateNetworkConditions(null);
90
- context.setNetworkConditions(null);
91
- }
92
- else if (networkConditions === 'Offline') {
93
- await page.emulateNetworkConditions({
94
- offline: true,
95
- download: 0,
96
- upload: 0,
97
- latency: 0,
98
- });
99
- context.setNetworkConditions('Offline');
100
- }
101
- else if (networkConditions in PredefinedNetworkConditions) {
102
- const networkCondition = PredefinedNetworkConditions[networkConditions];
103
- await page.emulateNetworkConditions(networkCondition);
104
- context.setNetworkConditions(networkConditions);
105
- }
106
- }
107
- if (cpuThrottlingRate) {
108
- await page.emulateCPUThrottling(cpuThrottlingRate);
109
- context.setCpuThrottlingRate(cpuThrottlingRate);
110
- }
111
- if (geolocation !== undefined) {
112
- if (geolocation === null) {
113
- await page.setGeolocation({ latitude: 0, longitude: 0 });
114
- context.setGeolocation(null);
115
- }
116
- else {
117
- await page.setGeolocation(geolocation);
118
- context.setGeolocation(geolocation);
119
- }
120
- }
121
- if (userAgent !== undefined) {
122
- if (userAgent === null) {
123
- await page.setUserAgent({
124
- userAgent: undefined,
125
- });
126
- context.setUserAgent(null);
127
- }
128
- else {
129
- await page.setUserAgent({
130
- userAgent,
131
- });
132
- context.setUserAgent(userAgent);
133
- }
134
- }
135
- if (request.params.colorScheme) {
136
- if (request.params.colorScheme === 'auto') {
137
- await page.emulateMediaFeatures([
138
- { name: 'prefers-color-scheme', value: '' },
139
- ]);
140
- context.setColorScheme(null);
141
- }
142
- else {
143
- await page.emulateMediaFeatures([
144
- {
145
- name: 'prefers-color-scheme',
146
- value: request.params.colorScheme,
147
- },
148
- ]);
149
- context.setColorScheme(request.params.colorScheme);
150
- }
151
- }
152
- if (viewport !== undefined) {
153
- if (viewport === null) {
154
- await page.setViewport(null);
155
- context.setViewport(null);
156
- }
157
- else {
158
- const defaults = {
159
- deviceScaleFactor: 1,
160
- isMobile: false,
161
- hasTouch: false,
162
- isLandscape: false,
163
- };
164
- await page.setViewport({ ...defaults, ...viewport });
165
- context.setViewport({ ...defaults, ...viewport });
166
- }
167
- }
168
- },
169
- });
@@ -1,79 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2026 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { zod } from '../third_party/index.js';
7
- import { ToolCategory } from './categories.js';
8
- import { defineTool } from './ToolDefinition.js';
9
- const EXTENSIONS_CONDITION = 'experimentalExtensionSupport';
10
- export const installExtension = defineTool({
11
- name: 'install_extension',
12
- description: 'Installs a Chrome extension from the given path.',
13
- annotations: {
14
- category: ToolCategory.EXTENSIONS,
15
- readOnlyHint: false,
16
- conditions: [EXTENSIONS_CONDITION],
17
- },
18
- schema: {
19
- path: zod
20
- .string()
21
- .describe('Absolute path to the unpacked extension folder.'),
22
- },
23
- handler: async (request, response, context) => {
24
- const { path } = request.params;
25
- const id = await context.installExtension(path);
26
- response.appendResponseLine(`Extension installed. Id: ${id}`);
27
- },
28
- });
29
- export const uninstallExtension = defineTool({
30
- name: 'uninstall_extension',
31
- description: 'Uninstalls a Chrome extension by its ID.',
32
- annotations: {
33
- category: ToolCategory.EXTENSIONS,
34
- readOnlyHint: false,
35
- conditions: [EXTENSIONS_CONDITION],
36
- },
37
- schema: {
38
- id: zod.string().describe('ID of the extension to uninstall.'),
39
- },
40
- handler: async (request, response, context) => {
41
- const { id } = request.params;
42
- await context.uninstallExtension(id);
43
- response.appendResponseLine(`Extension uninstalled. Id: ${id}`);
44
- },
45
- });
46
- export const listExtensions = defineTool({
47
- name: 'list_extensions',
48
- description: 'Lists all extensions via this server, including their name, ID, version, and enabled status.',
49
- annotations: {
50
- category: ToolCategory.EXTENSIONS,
51
- readOnlyHint: true,
52
- conditions: [EXTENSIONS_CONDITION],
53
- },
54
- schema: {},
55
- handler: async (_request, response, _context) => {
56
- response.setListExtensions();
57
- },
58
- });
59
- export const reloadExtension = defineTool({
60
- name: 'reload_extension',
61
- description: 'Reloads an unpacked Chrome extension by its ID.',
62
- annotations: {
63
- category: ToolCategory.EXTENSIONS,
64
- readOnlyHint: false,
65
- conditions: [EXTENSIONS_CONDITION],
66
- },
67
- schema: {
68
- id: zod.string().describe('ID of the extension to reload.'),
69
- },
70
- handler: async (request, response, context) => {
71
- const { id } = request.params;
72
- const extension = context.getExtension(id);
73
- if (!extension) {
74
- throw new Error(`Extension with ID ${id} not found.`);
75
- }
76
- await context.installExtension(extension.path);
77
- response.appendResponseLine('Extension reloaded.');
78
- },
79
- });
@@ -1,343 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { logger } from '../logger.js';
7
- import { zod } from '../third_party/index.js';
8
- import { parseKey } from '../utils/keyboard.js';
9
- import { ToolCategory } from './categories.js';
10
- import { defineTool } from './ToolDefinition.js';
11
- const dblClickSchema = zod
12
- .boolean()
13
- .optional()
14
- .describe('Set to true for double clicks. Default is false.');
15
- const includeSnapshotSchema = zod
16
- .boolean()
17
- .optional()
18
- .describe('Whether to include a snapshot in the response. Default is false.');
19
- function handleActionError(error, uid) {
20
- logger('failed to act using a locator', error);
21
- throw new Error(`Failed to interact with the element with uid ${uid}. The element did not become interactive within the configured timeout.`, {
22
- cause: error,
23
- });
24
- }
25
- export const click = defineTool({
26
- name: 'click',
27
- description: `Clicks on the provided element`,
28
- annotations: {
29
- category: ToolCategory.INPUT,
30
- readOnlyHint: false,
31
- },
32
- schema: {
33
- uid: zod
34
- .string()
35
- .describe('The uid of an element on the page from the page content snapshot'),
36
- dblClick: dblClickSchema,
37
- includeSnapshot: includeSnapshotSchema,
38
- },
39
- handler: async (request, response, context) => {
40
- const uid = request.params.uid;
41
- const handle = await context.getElementByUid(uid);
42
- try {
43
- await context.waitForEventsAfterAction(async () => {
44
- await handle.asLocator().click({
45
- count: request.params.dblClick ? 2 : 1,
46
- });
47
- });
48
- response.appendResponseLine(request.params.dblClick
49
- ? `Successfully double clicked on the element`
50
- : `Successfully clicked on the element`);
51
- if (request.params.includeSnapshot) {
52
- response.includeSnapshot();
53
- }
54
- }
55
- catch (error) {
56
- handleActionError(error, uid);
57
- }
58
- finally {
59
- void handle.dispose();
60
- }
61
- },
62
- });
63
- export const clickAt = defineTool({
64
- name: 'click_at',
65
- description: `Clicks at the provided coordinates`,
66
- annotations: {
67
- category: ToolCategory.INPUT,
68
- readOnlyHint: false,
69
- conditions: ['computerVision'],
70
- },
71
- schema: {
72
- x: zod.number().describe('The x coordinate'),
73
- y: zod.number().describe('The y coordinate'),
74
- dblClick: dblClickSchema,
75
- includeSnapshot: includeSnapshotSchema,
76
- },
77
- handler: async (request, response, context) => {
78
- const page = context.getSelectedPage();
79
- await context.waitForEventsAfterAction(async () => {
80
- await page.mouse.click(request.params.x, request.params.y, {
81
- clickCount: request.params.dblClick ? 2 : 1,
82
- });
83
- });
84
- response.appendResponseLine(request.params.dblClick
85
- ? `Successfully double clicked at the coordinates`
86
- : `Successfully clicked at the coordinates`);
87
- if (request.params.includeSnapshot) {
88
- response.includeSnapshot();
89
- }
90
- },
91
- });
92
- export const hover = defineTool({
93
- name: 'hover',
94
- description: `Hover over the provided element`,
95
- annotations: {
96
- category: ToolCategory.INPUT,
97
- readOnlyHint: false,
98
- },
99
- schema: {
100
- uid: zod
101
- .string()
102
- .describe('The uid of an element on the page from the page content snapshot'),
103
- includeSnapshot: includeSnapshotSchema,
104
- },
105
- handler: async (request, response, context) => {
106
- const uid = request.params.uid;
107
- const handle = await context.getElementByUid(uid);
108
- try {
109
- await context.waitForEventsAfterAction(async () => {
110
- await handle.asLocator().hover();
111
- });
112
- response.appendResponseLine(`Successfully hovered over the element`);
113
- if (request.params.includeSnapshot) {
114
- response.includeSnapshot();
115
- }
116
- }
117
- catch (error) {
118
- handleActionError(error, uid);
119
- }
120
- finally {
121
- void handle.dispose();
122
- }
123
- },
124
- });
125
- // The AXNode for an option doesn't contain its `value`. We set text content of the option as value.
126
- // If the form is a combobox, we need to find the correct option by its text value.
127
- // To do that, loop through the children while checking which child's text matches the requested value (requested value is actually the text content).
128
- // When the correct option is found, use the element handle to get the real value.
129
- async function selectOption(handle, aXNode, value) {
130
- let optionFound = false;
131
- for (const child of aXNode.children) {
132
- if (child.role === 'option' && child.name === value && child.value) {
133
- optionFound = true;
134
- const childHandle = await child.elementHandle();
135
- if (childHandle) {
136
- try {
137
- const childValueHandle = await childHandle.getProperty('value');
138
- try {
139
- const childValue = await childValueHandle.jsonValue();
140
- if (childValue) {
141
- await handle.asLocator().fill(childValue.toString());
142
- }
143
- }
144
- finally {
145
- void childValueHandle.dispose();
146
- }
147
- break;
148
- }
149
- finally {
150
- void childHandle.dispose();
151
- }
152
- }
153
- }
154
- }
155
- if (!optionFound) {
156
- throw new Error(`Could not find option with text "${value}"`);
157
- }
158
- }
159
- async function fillFormElement(uid, value, context) {
160
- const handle = await context.getElementByUid(uid);
161
- try {
162
- const aXNode = context.getAXNodeByUid(uid);
163
- if (aXNode && aXNode.role === 'combobox') {
164
- await selectOption(handle, aXNode, value);
165
- }
166
- else {
167
- // Increase timeout for longer input values.
168
- const timeoutPerChar = 10; // ms
169
- const fillTimeout = context.getSelectedPage().getDefaultTimeout() +
170
- value.length * timeoutPerChar;
171
- await handle.asLocator().setTimeout(fillTimeout).fill(value);
172
- }
173
- }
174
- catch (error) {
175
- handleActionError(error, uid);
176
- }
177
- finally {
178
- void handle.dispose();
179
- }
180
- }
181
- export const fill = defineTool({
182
- name: 'fill',
183
- description: `Type text into a input, text area or select an option from a <select> element.`,
184
- annotations: {
185
- category: ToolCategory.INPUT,
186
- readOnlyHint: false,
187
- },
188
- schema: {
189
- uid: zod
190
- .string()
191
- .describe('The uid of an element on the page from the page content snapshot'),
192
- value: zod.string().describe('The value to fill in'),
193
- includeSnapshot: includeSnapshotSchema,
194
- },
195
- handler: async (request, response, context) => {
196
- await context.waitForEventsAfterAction(async () => {
197
- await fillFormElement(request.params.uid, request.params.value, context);
198
- });
199
- response.appendResponseLine(`Successfully filled out the element`);
200
- if (request.params.includeSnapshot) {
201
- response.includeSnapshot();
202
- }
203
- },
204
- });
205
- export const drag = defineTool({
206
- name: 'drag',
207
- description: `Drag an element onto another element`,
208
- annotations: {
209
- category: ToolCategory.INPUT,
210
- readOnlyHint: false,
211
- },
212
- schema: {
213
- from_uid: zod.string().describe('The uid of the element to drag'),
214
- to_uid: zod.string().describe('The uid of the element to drop into'),
215
- includeSnapshot: includeSnapshotSchema,
216
- },
217
- handler: async (request, response, context) => {
218
- const fromHandle = await context.getElementByUid(request.params.from_uid);
219
- const toHandle = await context.getElementByUid(request.params.to_uid);
220
- try {
221
- await context.waitForEventsAfterAction(async () => {
222
- await fromHandle.drag(toHandle);
223
- await new Promise(resolve => setTimeout(resolve, 50));
224
- await toHandle.drop(fromHandle);
225
- });
226
- response.appendResponseLine(`Successfully dragged an element`);
227
- if (request.params.includeSnapshot) {
228
- response.includeSnapshot();
229
- }
230
- }
231
- finally {
232
- void fromHandle.dispose();
233
- void toHandle.dispose();
234
- }
235
- },
236
- });
237
- export const fillForm = defineTool({
238
- name: 'fill_form',
239
- description: `Fill out multiple form elements at once`,
240
- annotations: {
241
- category: ToolCategory.INPUT,
242
- readOnlyHint: false,
243
- },
244
- schema: {
245
- elements: zod
246
- .array(zod.object({
247
- uid: zod.string().describe('The uid of the element to fill out'),
248
- value: zod.string().describe('Value for the element'),
249
- }))
250
- .describe('Elements from snapshot to fill out.'),
251
- includeSnapshot: includeSnapshotSchema,
252
- },
253
- handler: async (request, response, context) => {
254
- for (const element of request.params.elements) {
255
- await context.waitForEventsAfterAction(async () => {
256
- await fillFormElement(element.uid, element.value, context);
257
- });
258
- }
259
- response.appendResponseLine(`Successfully filled out the form`);
260
- if (request.params.includeSnapshot) {
261
- response.includeSnapshot();
262
- }
263
- },
264
- });
265
- export const uploadFile = defineTool({
266
- name: 'upload_file',
267
- description: 'Upload a file through a provided element.',
268
- annotations: {
269
- category: ToolCategory.INPUT,
270
- readOnlyHint: false,
271
- },
272
- schema: {
273
- uid: zod
274
- .string()
275
- .describe('The uid of the file input element or an element that will open file chooser on the page from the page content snapshot'),
276
- filePath: zod.string().describe('The local path of the file to upload'),
277
- includeSnapshot: includeSnapshotSchema,
278
- },
279
- handler: async (request, response, context) => {
280
- const { uid, filePath } = request.params;
281
- const handle = (await context.getElementByUid(uid));
282
- try {
283
- try {
284
- await handle.uploadFile(filePath);
285
- }
286
- catch {
287
- // Some sites use a proxy element to trigger file upload instead of
288
- // a type=file element. In this case, we want to default to
289
- // Page.waitForFileChooser() and upload the file this way.
290
- try {
291
- const page = context.getSelectedPage();
292
- const [fileChooser] = await Promise.all([
293
- page.waitForFileChooser({ timeout: 3000 }),
294
- handle.asLocator().click(),
295
- ]);
296
- await fileChooser.accept([filePath]);
297
- }
298
- catch {
299
- throw new Error(`Failed to upload file. The element could not accept the file directly, and clicking it did not trigger a file chooser.`);
300
- }
301
- }
302
- if (request.params.includeSnapshot) {
303
- response.includeSnapshot();
304
- }
305
- response.appendResponseLine(`File uploaded from ${filePath}.`);
306
- }
307
- finally {
308
- void handle.dispose();
309
- }
310
- },
311
- });
312
- export const pressKey = defineTool({
313
- name: 'press_key',
314
- description: `Press a key or key combination. Use this when other input methods like fill() cannot be used (e.g., keyboard shortcuts, navigation keys, or special key combinations).`,
315
- annotations: {
316
- category: ToolCategory.INPUT,
317
- readOnlyHint: false,
318
- },
319
- schema: {
320
- key: zod
321
- .string()
322
- .describe('A key or a combination (e.g., "Enter", "Control+A", "Control++", "Control+Shift+R"). Modifiers: Control, Shift, Alt, Meta'),
323
- includeSnapshot: includeSnapshotSchema,
324
- },
325
- handler: async (request, response, context) => {
326
- const page = context.getSelectedPage();
327
- const tokens = parseKey(request.params.key);
328
- const [key, ...modifiers] = tokens;
329
- await context.waitForEventsAfterAction(async () => {
330
- for (const modifier of modifiers) {
331
- await page.keyboard.down(modifier);
332
- }
333
- await page.keyboard.press(key);
334
- for (const modifier of modifiers.toReversed()) {
335
- await page.keyboard.up(modifier);
336
- }
337
- });
338
- response.appendResponseLine(`Successfully pressed key: ${request.params.key}`);
339
- if (request.params.includeSnapshot) {
340
- response.includeSnapshot();
341
- }
342
- },
343
- });