@chenpx976/chrome-devtools-mcp 0.0.0-stage → 1.13.1

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 (398) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +223 -2
  3. package/out/Default/gen/src/ArcBrowser.js +128 -0
  4. package/out/Default/gen/src/BrowserManager.js +562 -0
  5. package/out/Default/gen/src/LogpointManager.js +287 -0
  6. package/out/Default/gen/src/McpContext.js +1031 -0
  7. package/out/Default/gen/src/McpPage.js +1427 -0
  8. package/out/Default/gen/src/McpResponse.js +1350 -0
  9. package/out/Default/gen/src/McpWorker.js +66 -0
  10. package/out/Default/gen/src/NetworkOverrideManager.js +447 -0
  11. package/out/Default/gen/src/SlimMcpResponse.js +23 -0
  12. package/out/Default/gen/src/TextSnapshot.js +336 -0
  13. package/out/Default/gen/src/ToolHandler.js +531 -0
  14. package/out/Default/gen/src/bin/check-latest-version.js +53 -0
  15. package/out/Default/gen/src/bin/chrome-devtools-mcp-main.js +80 -0
  16. package/out/Default/gen/src/bin/chrome-devtools-mcp.js +23 -0
  17. package/out/Default/gen/src/bin/chrome-devtools.js +213 -0
  18. package/out/Default/gen/src/collectors/PageCollector.js +325 -0
  19. package/out/Default/gen/src/collectors/ServiceWorkerCollector.js +198 -0
  20. package/out/Default/gen/src/collectors/constants.js +7 -0
  21. package/out/Default/gen/src/config/ConfigLocator.js +70 -0
  22. package/out/Default/gen/src/config/ConfigParser.js +163 -0
  23. package/out/Default/gen/src/config/ConfigWatcher.js +94 -0
  24. package/out/Default/gen/src/config/ServerConfig.js +284 -0
  25. package/out/Default/gen/src/config/browser-options.js +135 -0
  26. package/out/Default/gen/src/config/category-options.js +84 -0
  27. package/out/Default/gen/src/config/cli-commands.js +208 -0
  28. package/out/Default/gen/src/config/cli-options.js +2090 -0
  29. package/out/Default/gen/src/config/mcp-options.js +371 -0
  30. package/out/Default/gen/src/config/puppeteer-options.js +69 -0
  31. package/out/Default/gen/src/config/tool-options.js +60 -0
  32. package/out/Default/gen/src/daemon/client.js +281 -0
  33. package/out/Default/gen/src/daemon/daemon.js +280 -0
  34. package/out/Default/gen/src/daemon/types.js +7 -0
  35. package/out/Default/gen/src/daemon/utils.js +173 -0
  36. package/out/Default/gen/src/devtools/DevToolsCommentBridge.js +151 -0
  37. package/out/Default/gen/src/devtools/DevtoolsUtils.js +413 -0
  38. package/out/Default/gen/src/devtools/McpHostBindingAdapter.js +164 -0
  39. package/out/Default/gen/src/devtools/issueDescriptions.js +42 -0
  40. package/out/Default/gen/src/formatters/CommentFormatter.js +73 -0
  41. package/out/Default/gen/src/formatters/ConsoleFormatter.js +363 -0
  42. package/out/Default/gen/src/formatters/CssFormatter.js +883 -0
  43. package/out/Default/gen/src/formatters/HeapSnapshotFormatter.js +239 -0
  44. package/out/Default/gen/src/formatters/IssueFormatter.js +194 -0
  45. package/out/Default/gen/src/formatters/LogpointFormatter.js +62 -0
  46. package/out/Default/gen/src/formatters/NetworkFormatter.js +295 -0
  47. package/out/Default/gen/src/formatters/NetworkOverridesFormatter.js +57 -0
  48. package/out/Default/gen/src/formatters/RemoteObjectFormatter.js +231 -0
  49. package/out/Default/gen/src/formatters/SnapshotFormatter.js +172 -0
  50. package/out/Default/gen/src/formatters/WebAuthnFormatter.js +56 -0
  51. package/out/Default/gen/src/formatters/constants.js +8 -0
  52. package/out/Default/gen/src/index.js +434 -0
  53. package/out/Default/gen/src/processors/ChunkedTraceParser.js +361 -0
  54. package/out/Default/gen/src/processors/HeapSnapshotManager.js +595 -0
  55. package/out/Default/gen/src/processors/PerformanceTrace.js +132 -0
  56. package/out/Default/gen/src/telemetry/ClearcutLogger.js +271 -0
  57. package/out/Default/gen/src/telemetry/WatchdogClient.js +60 -0
  58. package/out/Default/gen/src/telemetry/errors.js +18 -0
  59. package/out/Default/gen/src/telemetry/flagUtils.js +89 -0
  60. package/out/Default/gen/src/telemetry/metricsRegistry.js +85 -0
  61. package/out/Default/gen/src/telemetry/persistence.js +82 -0
  62. package/out/Default/gen/src/telemetry/transformation.js +229 -0
  63. package/out/Default/gen/src/telemetry/types.js +36 -0
  64. package/out/Default/gen/src/telemetry/watchdog/ClearcutSender.js +213 -0
  65. package/out/Default/gen/src/telemetry/watchdog/main.js +142 -0
  66. package/out/Default/gen/src/third_party/THIRD_PARTY_NOTICES +3774 -0
  67. package/out/Default/gen/src/third_party/browser.js +808 -0
  68. package/out/Default/gen/src/third_party/bundled-packages.json +11 -0
  69. package/out/Default/gen/src/third_party/cli.js +139 -0
  70. package/out/Default/gen/src/third_party/devtools-formatter-worker.js +125 -0
  71. package/out/Default/gen/src/third_party/devtools-heap-snapshot-worker.js +111 -0
  72. package/out/Default/gen/src/third_party/index.js +128 -0
  73. package/out/Default/gen/src/third_party/issue-descriptions/CoepCoopSandboxedIframeCannotNavigateToCoopPage.md +4 -0
  74. package/out/Default/gen/src/third_party/issue-descriptions/CoepCorpNotSameOrigin.md +8 -0
  75. package/out/Default/gen/src/third_party/issue-descriptions/CoepCorpNotSameOriginAfterDefaultedToSameOriginByCoep.md +18 -0
  76. package/out/Default/gen/src/third_party/issue-descriptions/CoepCorpNotSameSite.md +7 -0
  77. package/out/Default/gen/src/third_party/issue-descriptions/CoepFrameResourceNeedsCoepHeader.md +10 -0
  78. package/out/Default/gen/src/third_party/issue-descriptions/CompatibilityModeQuirks.md +5 -0
  79. package/out/Default/gen/src/third_party/issue-descriptions/CookieAttributeValueExceedsMaxSize.md +5 -0
  80. package/out/Default/gen/src/third_party/issue-descriptions/LowTextContrast.md +5 -0
  81. package/out/Default/gen/src/third_party/issue-descriptions/SameSiteNoneInsecureErrorRead.md +8 -0
  82. package/out/Default/gen/src/third_party/issue-descriptions/SameSiteNoneInsecureErrorSet.md +8 -0
  83. package/out/Default/gen/src/third_party/issue-descriptions/SameSiteNoneInsecureWarnRead.md +8 -0
  84. package/out/Default/gen/src/third_party/issue-descriptions/SameSiteNoneInsecureWarnSet.md +8 -0
  85. package/out/Default/gen/src/third_party/issue-descriptions/SameSiteUnspecifiedLaxAllowUnsafeRead.md +9 -0
  86. package/out/Default/gen/src/third_party/issue-descriptions/SameSiteUnspecifiedLaxAllowUnsafeSet.md +9 -0
  87. package/out/Default/gen/src/third_party/issue-descriptions/bounceTrackingMitigations.md +3 -0
  88. package/out/Default/gen/src/third_party/issue-descriptions/clientHintMetaTagAllowListInvalidOrigin.md +4 -0
  89. package/out/Default/gen/src/third_party/issue-descriptions/clientHintMetaTagModifiedHTML.md +4 -0
  90. package/out/Default/gen/src/third_party/issue-descriptions/connectionAllowlistEmbeddingRequirementNotSatisfied.md +26 -0
  91. package/out/Default/gen/src/third_party/issue-descriptions/connectionAllowlistIFrameAttributeLoosensEmbeddingRequirement.md +19 -0
  92. package/out/Default/gen/src/third_party/issue-descriptions/connectionAllowlistInvalidAllowConnectionAllowlistFrom.md +21 -0
  93. package/out/Default/gen/src/third_party/issue-descriptions/connectionAllowlistInvalidAllowlistItemType.md +12 -0
  94. package/out/Default/gen/src/third_party/issue-descriptions/connectionAllowlistInvalidHeader.md +12 -0
  95. package/out/Default/gen/src/third_party/issue-descriptions/connectionAllowlistInvalidUrlPattern.md +8 -0
  96. package/out/Default/gen/src/third_party/issue-descriptions/connectionAllowlistItemNotInnerList.md +12 -0
  97. package/out/Default/gen/src/third_party/issue-descriptions/connectionAllowlistMoreThanOneList.md +7 -0
  98. package/out/Default/gen/src/third_party/issue-descriptions/connectionAllowlistReportingEndpointNotToken.md +10 -0
  99. package/out/Default/gen/src/third_party/issue-descriptions/cookieCrossSiteRedirectDowngrade.md +12 -0
  100. package/out/Default/gen/src/third_party/issue-descriptions/cookieExcludeDomainNonAscii.md +11 -0
  101. package/out/Default/gen/src/third_party/issue-descriptions/cookieExcludePortMismatch.md +8 -0
  102. package/out/Default/gen/src/third_party/issue-descriptions/cookieExcludeSchemeMismatch.md +7 -0
  103. package/out/Default/gen/src/third_party/issue-descriptions/cookieExcludeThirdPartyPhaseoutRead.md +6 -0
  104. package/out/Default/gen/src/third_party/issue-descriptions/cookieExcludeThirdPartyPhaseoutSet.md +6 -0
  105. package/out/Default/gen/src/third_party/issue-descriptions/cookieWarnDomainNonAscii.md +11 -0
  106. package/out/Default/gen/src/third_party/issue-descriptions/cookieWarnMetadataGrantRead.md +3 -0
  107. package/out/Default/gen/src/third_party/issue-descriptions/cookieWarnMetadataGrantReadOptOut.md +5 -0
  108. package/out/Default/gen/src/third_party/issue-descriptions/cookieWarnMetadataGrantSet.md +3 -0
  109. package/out/Default/gen/src/third_party/issue-descriptions/cookieWarnMetadataGrantSetOptOut.md +5 -0
  110. package/out/Default/gen/src/third_party/issue-descriptions/cookieWarnThirdPartyPhaseoutRead.md +6 -0
  111. package/out/Default/gen/src/third_party/issue-descriptions/cookieWarnThirdPartyPhaseoutSet.md +6 -0
  112. package/out/Default/gen/src/third_party/issue-descriptions/corsAllowCredentialsRequired.md +6 -0
  113. package/out/Default/gen/src/third_party/issue-descriptions/corsDisabledScheme.md +7 -0
  114. package/out/Default/gen/src/third_party/issue-descriptions/corsDisallowedByMode.md +7 -0
  115. package/out/Default/gen/src/third_party/issue-descriptions/corsHeaderDisallowedByPreflightResponse.md +5 -0
  116. package/out/Default/gen/src/third_party/issue-descriptions/corsInvalidHeaderValues.md +7 -0
  117. package/out/Default/gen/src/third_party/issue-descriptions/corsLocalNetworkAccessPermissionDenied.md +19 -0
  118. package/out/Default/gen/src/third_party/issue-descriptions/corsMethodDisallowedByPreflightResponse.md +5 -0
  119. package/out/Default/gen/src/third_party/issue-descriptions/corsNoCorsRedirectModeNotFollow.md +5 -0
  120. package/out/Default/gen/src/third_party/issue-descriptions/corsOriginMismatch.md +6 -0
  121. package/out/Default/gen/src/third_party/issue-descriptions/corsPreflightResponseInvalid.md +5 -0
  122. package/out/Default/gen/src/third_party/issue-descriptions/corsRedirectContainsCredentials.md +5 -0
  123. package/out/Default/gen/src/third_party/issue-descriptions/corsWildcardOriginNotAllowed.md +9 -0
  124. package/out/Default/gen/src/third_party/issue-descriptions/cspEvalViolation.md +9 -0
  125. package/out/Default/gen/src/third_party/issue-descriptions/cspInlineViolation.md +10 -0
  126. package/out/Default/gen/src/third_party/issue-descriptions/cspTrustedTypesPolicyViolation.md +5 -0
  127. package/out/Default/gen/src/third_party/issue-descriptions/cspTrustedTypesSinkViolation.md +8 -0
  128. package/out/Default/gen/src/third_party/issue-descriptions/cspURLViolation.md +10 -0
  129. package/out/Default/gen/src/third_party/issue-descriptions/deprecation.md +3 -0
  130. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestAccountsEmptyList.md +1 -0
  131. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestAccountsHttpNotFound.md +1 -0
  132. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestAccountsInvalidContentType.md +1 -0
  133. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestAccountsInvalidResponse.md +1 -0
  134. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestAccountsNoResponse.md +1 -0
  135. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestDnsFetchFailed.md +1 -0
  136. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestDnsInvalidRecord.md +1 -0
  137. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownHttpNotFound.md +1 -0
  138. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownInvalidContentType.md +1 -0
  139. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownInvalidResponse.md +1 -0
  140. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownNoResponse.md +1 -0
  141. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestInvalidEmail.md +1 -0
  142. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestJwksHttpNotFound.md +1 -0
  143. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestJwksInvalidResponse.md +1 -0
  144. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestKeyBindingSigningFailed.md +1 -0
  145. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestRpOriginIsOpaque.md +1 -0
  146. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenHttpNotFound.md +1 -0
  147. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenInvalidContentType.md +1 -0
  148. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenInvalidResponse.md +1 -0
  149. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenInvalidSdJwt.md +1 -0
  150. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenMalformedSdJwt.md +1 -0
  151. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenNoResponse.md +1 -0
  152. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidAudience.md +1 -0
  153. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidIssuedAt.md +1 -0
  154. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidNonce.md +1 -0
  155. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidSdHash.md +1 -0
  156. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidTyp.md +1 -0
  157. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingAud.md +1 -0
  158. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingCnf.md +1 -0
  159. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingIat.md +1 -0
  160. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingNonce.md +1 -0
  161. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingSdHash.md +1 -0
  162. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbSignatureFailed.md +1 -0
  163. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidEmail.md +1 -0
  164. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidEmailVerified.md +1 -0
  165. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidHolderKey.md +1 -0
  166. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidIssuedAt.md +1 -0
  167. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidIssuer.md +1 -0
  168. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtJwksMissingKeys.md +1 -0
  169. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingCnf.md +1 -0
  170. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingEmail.md +1 -0
  171. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingIat.md +1 -0
  172. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingIss.md +1 -0
  173. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtSignatureFailed.md +1 -0
  174. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtUnsupportedHeaderAlg.md +1 -0
  175. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestUserLoggedOut.md +1 -0
  176. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestWellKnownAccountsEndpointCrossOrigin.md +1 -0
  177. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestWellKnownHttpNotFound.md +1 -0
  178. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestWellKnownInvalidContentType.md +1 -0
  179. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestWellKnownInvalidResponse.md +1 -0
  180. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestWellKnownIssuanceEndpointCrossOrigin.md +1 -0
  181. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestWellKnownListEmpty.md +1 -0
  182. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestWellKnownMissingAccountsEndpoint.md +1 -0
  183. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestWellKnownMissingIssuanceEndpoint.md +1 -0
  184. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestWellKnownNoResponse.md +1 -0
  185. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestWellKnownUnsupportedSigningAlgorithm.md +1 -0
  186. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestAccountsBlockedByConnectionAllowlist.md +1 -0
  187. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestAccountsHttpNotFound.md +1 -0
  188. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestAccountsInvalidResponse.md +1 -0
  189. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestAccountsNoResponse.md +1 -0
  190. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestApprovalDeclined.md +1 -0
  191. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestCanceled.md +1 -0
  192. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestConfigBlockedByConnectionAllowlist.md +1 -0
  193. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestErrorFetchingSignin.md +1 -0
  194. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestErrorIdToken.md +1 -0
  195. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestIdTokenBlockedByConnectionAllowlist.md +1 -0
  196. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestIdTokenHttpNotFound.md +1 -0
  197. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidRequest.md +1 -0
  198. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidResponse.md +1 -0
  199. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestIdTokenNoResponse.md +1 -0
  200. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestInvalidSigninResponse.md +1 -0
  201. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestManifestHttpNotFound.md +1 -0
  202. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestManifestInvalidResponse.md +1 -0
  203. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestManifestNoResponse.md +1 -0
  204. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestTooManyRequests.md +1 -0
  205. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestWellKnownBlockedByConnectionAllowlist.md +1 -0
  206. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidAccountsResponse.md +1 -0
  207. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidConfigOrWellKnown.md +1 -0
  208. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoAccountSharingPermission.md +1 -0
  209. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoApiPermission.md +1 -0
  210. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoReturningUserFromFetchedAccounts.md +1 -0
  211. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotIframe.md +1 -0
  212. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotPotentiallyTrustworthy.md +1 -0
  213. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSameOrigin.md +1 -0
  214. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSignedInWithIdp.md +1 -0
  215. package/out/Default/gen/src/third_party/issue-descriptions/fetchingPartitionedBlobURL.md +7 -0
  216. package/out/Default/gen/src/third_party/issue-descriptions/genericBackUINavigationWouldSkipAd.md +4 -0
  217. package/out/Default/gen/src/third_party/issue-descriptions/genericFormAriaLabelledByToNonExistingIdError.md +8 -0
  218. package/out/Default/gen/src/third_party/issue-descriptions/genericFormAutocompleteAttributeEmptyError.md +5 -0
  219. package/out/Default/gen/src/third_party/issue-descriptions/genericFormDuplicateIdForInputError.md +5 -0
  220. package/out/Default/gen/src/third_party/issue-descriptions/genericFormEmptyIdAndNameAttributesForInputError.md +5 -0
  221. package/out/Default/gen/src/third_party/issue-descriptions/genericFormInputAssignedAutocompleteValueToIdOrNameAttributeError.md +5 -0
  222. package/out/Default/gen/src/third_party/issue-descriptions/genericFormInputHasWrongButWellIntendedAutocompleteValueError.md +5 -0
  223. package/out/Default/gen/src/third_party/issue-descriptions/genericFormInputWithNoLabelError.md +5 -0
  224. package/out/Default/gen/src/third_party/issue-descriptions/genericFormLabelForMatchesNonExistingIdError.md +5 -0
  225. package/out/Default/gen/src/third_party/issue-descriptions/genericFormLabelForNameError.md +5 -0
  226. package/out/Default/gen/src/third_party/issue-descriptions/genericFormLabelHasNeitherForNorNestedInputError.md +5 -0
  227. package/out/Default/gen/src/third_party/issue-descriptions/genericFormModelContextMissingToolDescription.md +5 -0
  228. package/out/Default/gen/src/third_party/issue-descriptions/genericFormModelContextMissingToolName.md +5 -0
  229. package/out/Default/gen/src/third_party/issue-descriptions/genericFormModelContextParameterMissingName.md +5 -0
  230. package/out/Default/gen/src/third_party/issue-descriptions/genericFormModelContextParameterMissingTitleAndDescription.md +5 -0
  231. package/out/Default/gen/src/third_party/issue-descriptions/genericFormModelContextRequiredParameterMissingName.md +5 -0
  232. package/out/Default/gen/src/third_party/issue-descriptions/genericGeolocationPromptWithoutUserGesture.md +5 -0
  233. package/out/Default/gen/src/third_party/issue-descriptions/genericNavigationEntryMarkedSkippable.md +7 -0
  234. package/out/Default/gen/src/third_party/issue-descriptions/genericResponseWasBlockedByORB.md +4 -0
  235. package/out/Default/gen/src/third_party/issue-descriptions/heavyAd.md +10 -0
  236. package/out/Default/gen/src/third_party/issue-descriptions/lazyLoadImageZeroSize.md +7 -0
  237. package/out/Default/gen/src/third_party/issue-descriptions/mixedContent.md +5 -0
  238. package/out/Default/gen/src/third_party/issue-descriptions/navigatingPartitionedBlobURL.md +5 -0
  239. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementActivationDisabled.md +7 -0
  240. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluder.md +9 -0
  241. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluderParent.md +9 -0
  242. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementCspFrameAncestorsMissing.md +5 -0
  243. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementFencedFrameDisallowed.md +5 -0
  244. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementFontSizeTooLarge.md +5 -0
  245. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementFontSizeTooSmall.md +5 -0
  246. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementGeolocationDeprecated.md +5 -0
  247. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementInsetBoxShadowUnsupported.md +5 -0
  248. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementInvalidDisplayStyle.md +5 -0
  249. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementInvalidSizeValue.md +5 -0
  250. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementInvalidType.md +5 -0
  251. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementInvalidTypeActivation.md +5 -0
  252. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementLowContrast.md +5 -0
  253. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementNonOpaqueColor.md +5 -0
  254. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementPaddingBottomUnsupported.md +6 -0
  255. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementPaddingRightUnsupported.md +6 -0
  256. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementPermissionsPolicyBlocked.md +5 -0
  257. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementRegistrationFailed.md +5 -0
  258. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementRequestInProgress.md +5 -0
  259. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementSecurityChecksFailed.md +5 -0
  260. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementTypeNotSupported.md +5 -0
  261. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementUntrustedEvent.md +7 -0
  262. package/out/Default/gen/src/third_party/issue-descriptions/placeholderDescriptionForInvisibleIssues.md +3 -0
  263. package/out/Default/gen/src/third_party/issue-descriptions/propertyRuleInvalidNameIssue.md +3 -0
  264. package/out/Default/gen/src/third_party/issue-descriptions/propertyRuleIssue.md +7 -0
  265. package/out/Default/gen/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedOptGroupChild.md +7 -0
  266. package/out/Default/gen/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedSelectChild.md +7 -0
  267. package/out/Default/gen/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentAttributesSelectDescendant.md +3 -0
  268. package/out/Default/gen/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentLegendChild.md +3 -0
  269. package/out/Default/gen/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentOptionChild.md +3 -0
  270. package/out/Default/gen/src/third_party/issue-descriptions/selectElementAccessibilityNonPhrasingContentOptionChild.md +3 -0
  271. package/out/Default/gen/src/third_party/issue-descriptions/selectivePermissionsIntervention.md +7 -0
  272. package/out/Default/gen/src/third_party/issue-descriptions/sharedArrayBuffer.md +7 -0
  273. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryUseErrorCrossOriginNoCorsRequest.md +1 -0
  274. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryUseErrorDictionaryLoadFailure.md +3 -0
  275. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryUseErrorMatchingDictionaryNotUsed.md +3 -0
  276. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryUseErrorUnexpectedContentDictionaryHeader.md +1 -0
  277. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorCossOriginNoCorsRequest.md +1 -0
  278. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorDisallowedBySettings.md +1 -0
  279. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorExpiredResponse.md +3 -0
  280. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorFeatureDisabled.md +3 -0
  281. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInsufficientResources.md +1 -0
  282. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidMatchField.md +1 -0
  283. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidStructuredHeader.md +1 -0
  284. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidTTLField.md +1 -0
  285. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNavigationRequest.md +3 -0
  286. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNoMatchField.md +1 -0
  287. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonIntegerTTLField.md +1 -0
  288. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonListMatchDestField.md +1 -0
  289. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonSecureContext.md +3 -0
  290. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringIdField.md +1 -0
  291. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringInMatchDestList.md +1 -0
  292. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringMatchField.md +1 -0
  293. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonTokenTypeField.md +1 -0
  294. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorRequestAborted.md +1 -0
  295. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorShuttingDown.md +1 -0
  296. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorTooLongIdField.md +3 -0
  297. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorUnsupportedType.md +3 -0
  298. package/out/Default/gen/src/third_party/issue-descriptions/sriInvalidSignatureHeader.md +14 -0
  299. package/out/Default/gen/src/third_party/issue-descriptions/sriInvalidSignatureInputHeader.md +15 -0
  300. package/out/Default/gen/src/third_party/issue-descriptions/sriMissingSignatureHeader.md +8 -0
  301. package/out/Default/gen/src/third_party/issue-descriptions/sriMissingSignatureInputHeader.md +7 -0
  302. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureHeaderValueIsIncorrectLength.md +11 -0
  303. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureHeaderValueIsNotByteSequence.md +14 -0
  304. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureHeaderValueIsParameterized.md +15 -0
  305. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentName.md +8 -0
  306. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentType.md +13 -0
  307. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidDerivedComponentParameter.md +4 -0
  308. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidHeaderComponentParameter.md +5 -0
  309. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidParameter.md +11 -0
  310. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureInputHeaderKeyIdLength.md +12 -0
  311. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingLabel.md +6 -0
  312. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingRequiredParameters.md +8 -0
  313. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureInputHeaderValueMissingComponents.md +11 -0
  314. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureInputHeaderValueNotInnerList.md +11 -0
  315. package/out/Default/gen/src/third_party/issue-descriptions/sriValidationFailedIntegrityMismatch.md +12 -0
  316. package/out/Default/gen/src/third_party/issue-descriptions/sriValidationFailedInvalidLength.md +5 -0
  317. package/out/Default/gen/src/third_party/issue-descriptions/sriValidationFailedSignatureExpired.md +6 -0
  318. package/out/Default/gen/src/third_party/issue-descriptions/sriValidationFailedSignatureMismatch.md +11 -0
  319. package/out/Default/gen/src/third_party/issue-descriptions/stylesheetLateImport.md +4 -0
  320. package/out/Default/gen/src/third_party/issue-descriptions/stylesheetRequestFailed.md +3 -0
  321. package/out/Default/gen/src/third_party/issue-descriptions/summaryElementAccessibilityInteractiveContentSummaryDescendant.md +3 -0
  322. package/out/Default/gen/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestLength.md +12 -0
  323. package/out/Default/gen/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestType.md +17 -0
  324. package/out/Default/gen/src/third_party/issue-descriptions/unencodedDigestMalformedDictionary.md +14 -0
  325. package/out/Default/gen/src/third_party/issue-descriptions/unencodedDigestUnknownAlgorithm.md +15 -0
  326. package/out/Default/gen/src/third_party/issue-descriptions/webInstallManifestMissingId.md +3 -0
  327. package/out/Default/gen/src/third_party/issue-descriptions/webInstallManifestMissingNameOrShortName.md +3 -0
  328. package/out/Default/gen/src/third_party/issue-descriptions/webInstallManifestParsingOrNetworkError.md +3 -0
  329. package/out/Default/gen/src/third_party/issue-descriptions/webInstallNoManifest.md +3 -0
  330. package/out/Default/gen/src/third_party/issue-descriptions/webInstallStartUrlInvalid.md +3 -0
  331. package/out/Default/gen/src/third_party/lighthouse-devtools-mcp-bundle.js +60395 -0
  332. package/out/Default/gen/src/tools/ToolDefinition.js +180 -0
  333. package/out/Default/gen/src/tools/categories.js +37 -0
  334. package/out/Default/gen/src/tools/comments.js +230 -0
  335. package/out/Default/gen/src/tools/console.js +122 -0
  336. package/out/Default/gen/src/tools/css.js +54 -0
  337. package/out/Default/gen/src/tools/emulation.js +98 -0
  338. package/out/Default/gen/src/tools/extensions.js +108 -0
  339. package/out/Default/gen/src/tools/input.js +658 -0
  340. package/out/Default/gen/src/tools/lighthouse.js +279 -0
  341. package/out/Default/gen/src/tools/logpoints.js +51 -0
  342. package/out/Default/gen/src/tools/memory.js +531 -0
  343. package/out/Default/gen/src/tools/network.js +325 -0
  344. package/out/Default/gen/src/tools/pages.js +420 -0
  345. package/out/Default/gen/src/tools/performance.js +258 -0
  346. package/out/Default/gen/src/tools/pwa.js +152 -0
  347. package/out/Default/gen/src/tools/screencast.js +160 -0
  348. package/out/Default/gen/src/tools/screenshot.js +315 -0
  349. package/out/Default/gen/src/tools/script.js +319 -0
  350. package/out/Default/gen/src/tools/slim/tools.js +110 -0
  351. package/out/Default/gen/src/tools/snapshot.js +88 -0
  352. package/out/Default/gen/src/tools/thirdPartyDeveloper.js +73 -0
  353. package/out/Default/gen/src/tools/toolNames.js +10 -0
  354. package/out/Default/gen/src/tools/tools.js +72 -0
  355. package/out/Default/gen/src/tools/webauthn.js +51 -0
  356. package/out/Default/gen/src/tools/webmcp.js +55 -0
  357. package/out/Default/gen/src/types.js +21 -0
  358. package/out/Default/gen/src/utils/TaskRunner.js +151 -0
  359. package/out/Default/gen/src/utils/WaitForHelper.js +343 -0
  360. package/out/Default/gen/src/utils/bytes.js +95 -0
  361. package/out/Default/gen/src/utils/check-for-updates.js +81 -0
  362. package/out/Default/gen/src/utils/disclaimers.js +27 -0
  363. package/out/Default/gen/src/utils/errorHandling.js +23 -0
  364. package/out/Default/gen/src/utils/files.js +81 -0
  365. package/out/Default/gen/src/utils/id.js +16 -0
  366. package/out/Default/gen/src/utils/keyboard.js +307 -0
  367. package/out/Default/gen/src/utils/logger.js +145 -0
  368. package/out/Default/gen/src/utils/logpoint.js +44 -0
  369. package/out/Default/gen/src/utils/network.js +81 -0
  370. package/out/Default/gen/src/utils/pagination.js +50 -0
  371. package/out/Default/gen/src/utils/polyfill.js +11 -0
  372. package/out/Default/gen/src/utils/raceWithSignal.js +26 -0
  373. package/out/Default/gen/src/utils/resourceType.js +27 -0
  374. package/out/Default/gen/src/utils/text.js +43 -0
  375. package/out/Default/gen/src/utils/timeout.js +14 -0
  376. package/out/Default/gen/src/utils/url.js +311 -0
  377. package/out/Default/gen/src/version.js +11 -0
  378. package/package.json +125 -4
  379. package/skills/a11y-debugging/SKILL.md +86 -0
  380. package/skills/a11y-debugging/references/a11y-snippets.md +92 -0
  381. package/skills/arc-compatibility/SKILL.md +174 -0
  382. package/skills/arc-compatibility/SOURCES.md +238 -0
  383. package/skills/arc-compatibility/references/compatibility.md +115 -0
  384. package/skills/arc-compatibility/references/output-contract.md +62 -0
  385. package/skills/arc-compatibility/references/workflows.md +108 -0
  386. package/skills/chrome-devtools/SKILL.md +80 -0
  387. package/skills/chrome-devtools-cli/SKILL.md +208 -0
  388. package/skills/chrome-devtools-cli/references/installation.md +24 -0
  389. package/skills/cookie-debugging/SKILL.md +152 -0
  390. package/skills/debug-optimize-lcp/SKILL.md +121 -0
  391. package/skills/debug-optimize-lcp/references/elements-and-size.md +27 -0
  392. package/skills/debug-optimize-lcp/references/lcp-breakdown.md +23 -0
  393. package/skills/debug-optimize-lcp/references/lcp-snippets.md +79 -0
  394. package/skills/debug-optimize-lcp/references/optimization-strategies.md +38 -0
  395. package/skills/inspect-in-devtools/SKILL.md +82 -0
  396. package/skills/memory-leak-debugging/SKILL.md +58 -0
  397. package/skills/memory-leak-debugging/references/common-leaks.md +33 -0
  398. package/skills/troubleshooting/SKILL.md +107 -0
@@ -0,0 +1,108 @@
1
+ # Example workflows
2
+
3
+ These are illustrative execution paths and expected reports, not records of
4
+ checks run during skill authoring. Substitute observed versions and evidence.
5
+
6
+ ## Happy path: reapply after an upstream update
7
+
8
+ **Request:** "Update the Arc adaptation to the latest upstream tools."
9
+
10
+ 1. Resolve upstream's requested branch/tag to an exact commit. Record the old
11
+ patched commit and client config for rollback; preserve unrelated work.
12
+ 2. Inspect current browser/config/page ownership. Reapply opt-in Arc
13
+ validation, native creation, integration, tests, and documentation. Retain
14
+ scoped package identity, fork publisher settings, and both binary names.
15
+ 3. Run repository sync if dependencies changed, then generation, formatting,
16
+ and the full tests. Keep generated changes in the adaptation.
17
+ 4. Run native smoke against the already enabled local Arc endpoint. Compare
18
+ native tab identities and URLs before/after. Exercise foreground and
19
+ background creation and cleanup only tabs created by the smoke.
20
+ 5. Verify the packed artifact when preparing a release. If publication is
21
+ authorized, select a new version, check npm identity/scope, and publish
22
+ manually from the verified checkout. Complete browser 2FA when requested;
23
+ do not require OIDC setup or enable automatic publishing. Wait for the exact
24
+ registry version, then install and verify it in a clean directory. Otherwise
25
+ use the newly built local entry. Restart the client's MCP server, inspect
26
+ advertised tools, and exercise native creation through that client.
27
+
28
+ **Expected handoff:** exact old/new revisions, scoped package/version, actual
29
+ local or installed executable path, publication status, observed check results,
30
+ tested Arc/Chromium versions, feature evidence table,
31
+ and the retained prior config/build. List advanced features not exercised as
32
+ unverified even if the basic smoke passed.
33
+
34
+ ## Published package setup
35
+
36
+ **Request:** "Use the published Arc fork instead of a local checkout."
37
+
38
+ 1. Check whether the exact `@chenpx976/chrome-devtools-mcp` version exists
39
+ publicly and is verified. If unavailable, retain the local config and
40
+ report the publication prerequisite. Do not fetch official npm as fallback.
41
+ 2. Install the exact scoped version into a clean directory; inspect package
42
+ name/version, integrity, both binaries, and `--arc` help. Configure `npx`
43
+ with that pinned scoped version or use the installed MCP entry directly.
44
+ 3. Pass `--arc` and a loopback endpoint. Preserve telemetry preferences and
45
+ ensure the endpoint and AppleScript control the same local Arc instance.
46
+ 4. Exercise the installed server through the real client. Record native new
47
+ tab identity, existing-tab preservation, and background selection before
48
+ switching permanently; retain the previous build/config for rollback.
49
+
50
+ **Expected handoff:** registry and installed-artifact evidence, pinned client
51
+ configuration, native observations, and precise unverified features. If the
52
+ registry package is absent, report setup blocked and the retained local build.
53
+
54
+ ## Guarded variant: Arc is running without remote debugging
55
+
56
+ **Request:** "Set up Arc MCP without disturbing my current tabs."
57
+
58
+ 1. Prepare and test the patched checkout without terminating Arc. Discover
59
+ the endpoint status read-only; a refused port is a setup finding.
60
+ 2. Prepare the concrete local client config and describe how the user can
61
+ save work, quit Arc manually, and relaunch with loopback remote debugging.
62
+ 3. If the user has not relaunched, report native smoke as blocked. Do not
63
+ substitute another browser, auto-quit Arc, or claim a native pass.
64
+ 4. Once the endpoint is available, run smoke and verify client routing. If
65
+ macOS requests Automation permission, let the user grant access to the
66
+ actual terminal/client host. Do not bypass permission controls.
67
+
68
+ **Expected handoff before relaunch:** implementation/check evidence available
69
+ so far, prepared local config, `native smoke: blocked — endpoint refused`,
70
+ the exact manual next action, and rollback config. Avoid asking permission
71
+ for routine code edits or checks already authorized by the request.
72
+
73
+ ## Failure recovery: native tab exists but no CDP target matches
74
+
75
+ **Observation:** AppleScript returned but the marker target wait timed out.
76
+
77
+ 1. Preserve the error and endpoint/browser versions. Do not retry creation or
78
+ navigate an existing tab. A newly created marker tab may remain.
79
+ 2. Check that native Arc and the configured endpoint are the same instance;
80
+ inspect target visibility and current adapter behavior read-only.
81
+ 3. Correct the proven mismatch or implementation cause. Identify any leftover
82
+ tab by its exact marker before cleanup; never close unrelated blank tabs.
83
+ 4. Rerun the failed native scenario after correction. Run affected automated
84
+ checks and the full suite if code changed. Report both failure and recovery.
85
+
86
+ **Expected handoff:** actual failure, cause if established (otherwise unknown),
87
+ owned artifacts left behind, repair, rerun evidence, and remaining gaps.
88
+
89
+ ## Anti-patterns and corrections
90
+
91
+ | Anti-pattern | Corrected behavior |
92
+ | ------------------------------------------------------------ | ------------------------------------------------------------------ |
93
+ | Copy the old fork's `McpContext.ts` over current upstream. | Port only the Arc branch into the current page lifecycle. |
94
+ | Return the last or blank existing page for `new_page`. | Create a new native tab and attach by unique marker. |
95
+ | Fall back to `browser.newPage()` after AppleScript fails. | Return the native failure without a second creation attempt. |
96
+ | Configure `npx chrome-devtools-mcp@latest --arc`. | Use the local build or a verified scoped package with `--arc`. |
97
+ | Restore upstream package names while merging new tools. | Preserve scoped package and fork publisher identities. |
98
+ | Claim npm release success from a local build smoke. | Inspect and exercise a clean installation of the scoped release. |
99
+ | Install the skill and keep the plugin's default Chrome args. | Add `--arc` and the explicit loopback endpoint to the fork server. |
100
+ | Kill Arc to activate remote debugging. | Let the user save work and quit/relaunch manually. |
101
+ | Declare all tools compatible after `list_pages` works. | Report only exercised features as verified. |
102
+
103
+ ## Iterative maintenance
104
+
105
+ When a real update reveals a new failure mode, add its anonymized trigger,
106
+ observed failure, correction, and acceptance check here. Update `SOURCES.md`
107
+ with the source revision/date and decision it changed. Keep synthetic examples
108
+ labeled; do not turn an illustrative transcript into claimed runtime evidence.
@@ -0,0 +1,80 @@
1
+ ---
2
+ name: chrome-devtools
3
+ description: Uses Chrome DevTools via MCP for efficient debugging, troubleshooting and browser automation. Use when debugging web pages, automating browser interactions, analyzing performance, or inspecting network requests. This skill does not apply to `--slim` mode (MCP configuration).
4
+ ---
5
+
6
+ ## Core Concepts
7
+
8
+ **Browser lifecycle**: Chrome starts automatically on the first tool call using a persistent profile. Configure the fork via `npx @chenpx976/chrome-devtools-mcp@latest --help` after publication is verified. Until then, use its local build; never substitute official npm for Arc.
9
+ Additional tooling can be enabled by providing the following flags:
10
+
11
+ - For extension tooling, use the `--categoryExtensions` flag.
12
+ - For memory tooling, use the `--memoryDebugging` flag.
13
+
14
+ **Page targeting**: Page-scoped tools require a `pageId` parameter to target a specific page. Use `list_pages` to see available pages and their IDs (e.g. `pageId: 1`), or use the ID returned when creating a page with `new_page`.
15
+ Note: For `evaluate_script`, `pageId` is required when targeting pages. However, when `--categoryExtensions` is enabled, `pageId` is optional so you can pass `serviceWorkerId` instead to evaluate inside an extension background service worker.
16
+ **Element interaction**: Use `take_snapshot` to get page structure with element `uid`s. Each element has a unique `uid` for interaction. If an element isn't found, take a fresh snapshot - the element may have been removed or the page changed.
17
+
18
+ ## Workflow Patterns
19
+
20
+ ### Before interacting with a page
21
+
22
+ 1. Navigate: `navigate_page` or `new_page`
23
+ 2. Wait: `wait_for` to ensure content is loaded if you know what you look for.
24
+ 3. Snapshot: `take_snapshot` with `pageId` to understand page structure
25
+ 4. Interact: Use element `uid`s from snapshot for `click`, `fill`, etc., passing the corresponding `pageId`.
26
+
27
+ ### Efficient data retrieval
28
+
29
+ - Use `filePath` parameter for large outputs (screenshots, snapshots, traces)
30
+ - Use pagination (`pageIdx`, `pageSize`) and filtering (`types`) to minimize data
31
+ - Set `includeSnapshot: false` on input actions unless you need updated page state
32
+
33
+ ### Tool selection
34
+
35
+ - **Network mocks**: `mock_network` and `remove_network_mock` require `--categoryNetworkMocks` at server startup.
36
+ - **Arc**: Use this fork's local build or verified `@chenpx976/chrome-devtools-mcp` release with `--arc` and a loopback endpoint; `new_page` creates a native tab, rejects `isolatedContext`, and supports background selection restoration. Verify CDP features against the installed Arc version.
37
+ - **Automation/interaction**: `take_snapshot` (text-based, faster, better for automation)
38
+ - **Visual inspection**: `take_screenshot` (when user needs to see visual state)
39
+ - **CSS & Styling inspection**: Use `get_css_styles` to inspect computed styles, matched rules, cascade, and CSS variables (pass `computedProperties` for unmatched defaults). Treat the output as authoritative.
40
+ - **Additional details**: Use `evaluate_script` for runtime DOM/JS data not available via `get_css_styles` or `take_snapshot`.
41
+ - **Runtime values**: Use `set_logpoints` to log expressions at script or source-file lines (source maps supported) instead of editing code; read the output with `list_console_messages`.
42
+
43
+ ### Parallel execution
44
+
45
+ You can send multiple tool calls in parallel, but maintain correct order: navigate → wait → snapshot → interact.
46
+
47
+ ### Testing an extension
48
+
49
+ > **Before proceeding**: Extension tools (`install_extension`, `list_extensions`, etc.) are only available when the MCP server is started with the `--categoryExtensions` flag. If these tools are not in your tool list, stop and ask the user to update their MCP server configuration:
50
+ >
51
+ > ```json
52
+ > {
53
+ > "mcpServers": {
54
+ > "chrome-devtools": {
55
+ > "command": "npx",
56
+ > "args": [
57
+ > "@chenpx976/chrome-devtools-mcp@latest",
58
+ > "--categoryExtensions"
59
+ > ]
60
+ > }
61
+ > }
62
+ > }
63
+ > ```
64
+ >
65
+ > After updating, the user must restart the MCP server (or their AI client) for the change to take effect.
66
+
67
+ 1. **Install**: Use `install_extension` with the path to the unpacked extension.
68
+ 2. **Identify**: Get the extension ID from the response or by calling `list_extensions`.
69
+ 3. **Trigger Action**: Use `trigger_extension_action` to open the popup or side panel if applicable.
70
+ 4. **Verify Service Worker**: Use `evaluate_script` with `serviceWorkerId` (omitting `pageId` and `args`) to check extension state or trigger background actions. When evaluating in a page, pass `pageId` (omitting `serviceWorkerId`).
71
+ 5. **Verify Page Behavior**: Navigate to a page where the extension operates and use `take_snapshot` to check if content scripts injected elements or modified the page correctly.
72
+
73
+ ## Troubleshooting
74
+
75
+ If `chrome-devtools-mcp` is insufficient, guide users to use Chrome DevTools UI:
76
+
77
+ - https://developer.chrome.com/docs/devtools
78
+ - https://developer.chrome.com/docs/devtools/ai-assistance
79
+
80
+ If there are errors launching `chrome-devtools-mcp` or Chrome, refer to https://github.com/chenpx976/chrome-devtools-mcp/blob/arc-support/docs/troubleshooting.md.
@@ -0,0 +1,208 @@
1
+ ---
2
+ name: chrome-devtools-cli
3
+ description: Use this skill to write shell scripts or run shell commands to automate tasks in the browser or otherwise use Chrome DevTools via CLI.
4
+ ---
5
+
6
+ The `@chenpx976/chrome-devtools-mcp` package provides the `chrome-devtools` CLI for interacting with the browser from your terminal.
7
+
8
+ ## Setup
9
+
10
+ _Note: If this is your very first time using the CLI, see [references/installation.md](references/installation.md) for setup. Installation is a one-time prerequisite and is **not** part of the regular AI workflow._
11
+
12
+ ## AI Workflow
13
+
14
+ 1. **Execute**: Run tools directly. If you don't know the target page's ID, run `chrome-devtools list_pages` to find it. The background server starts implicitly; **do not** run `start`/`status`/`stop` before each use.
15
+ 2. **Inspect**: Use `chrome-devtools take_snapshot <pageId>` to get an element `<uid>`.
16
+ 3. **Act**: Use `chrome-devtools click <pageId> <uid>`, `chrome-devtools fill <pageId> <uid> <value>`, etc. State persists across commands.
17
+
18
+ Snapshot example:
19
+
20
+ ```
21
+ uid=1_0 RootWebArea "Example Domain" url="https://example.com/"
22
+ uid=1_1 heading "Example Domain" level="1"
23
+ ```
24
+
25
+ ## Permissions & File Access
26
+
27
+ By default, the CLI has full filesystem access (`--allowUnrestrictedPaths=true`), allowing file-saving parameters (`--filePath`, `--outputDirPath`) and `upload_file` to access files anywhere on the system. Pass `--allowUnrestrictedPaths=false` if you want to restrict file access to the OS temp directory.
28
+
29
+ ## Command Usage
30
+
31
+ ```sh
32
+ chrome-devtools <tool> [arguments] [flags]
33
+ ```
34
+
35
+ - Required arguments are passed positionally; optional arguments use flags.
36
+ - Use `--help` on any command for usage details.
37
+ - Output defaults to plain Markdown-like text; pass `--output-format=json` for JSON.
38
+
39
+ ## Input Automation (<uid> from snapshot)
40
+
41
+ ```bash
42
+ chrome-devtools take_snapshot 1 # Take a text snapshot of the page to get UIDs for elements
43
+ chrome-devtools click 1 "id" # Clicks on the provided element
44
+ chrome-devtools click 1 "id" --dblClick true --includeSnapshot true # Double clicks and returns a snapshot
45
+ chrome-devtools drag 1 "src" "dst" # Drag an element onto another element
46
+ chrome-devtools drag 1 "src" "dst" --includeSnapshot true # Drag an element and return a snapshot
47
+ chrome-devtools fill 1 "id" "text" # Type text into an input, textarea, or select an option
48
+ chrome-devtools fill 1 "id" "text" --includeSnapshot true # Fill an element and return a snapshot
49
+ chrome-devtools handle_dialog 1 accept # Handle a browser dialog (accept/dismiss)
50
+ chrome-devtools handle_dialog 1 dismiss --promptText "hi" # Dismiss a dialog with prompt text
51
+ chrome-devtools hover 1 "id" # Hover over the provided element
52
+ chrome-devtools hover 1 "id" --includeSnapshot true # Hover over an element and return a snapshot
53
+ chrome-devtools press_key 1 "Enter" # Press a key or key combination ("Control+A", "Escape")
54
+ chrome-devtools press_key 1 "Control+A" --includeSnapshot true # Press a key and return a snapshot
55
+ chrome-devtools type_text 1 "hello" # Type text using keyboard into a focused input
56
+ chrome-devtools type_text 1 "hello" --submitKey "Enter" # Type text and press a submit key
57
+ chrome-devtools upload_file 1 "id" "file.txt" # Upload a file through a provided element
58
+ chrome-devtools upload_file 1 "id" "file.txt" --includeSnapshot true # Upload a file and return a snapshot
59
+ ```
60
+
61
+ ## Navigation
62
+
63
+ ```bash
64
+ chrome-devtools close_page 1 # Closes the page by its index
65
+ chrome-devtools list_pages # Get a list of pages open in the browser
66
+ chrome-devtools navigate_page 1 --url "https://example.com" # Navigates the currently selected page to a URL
67
+ chrome-devtools navigate_page 1 --type "reload" --ignoreCache true # Reload page ignoring cache
68
+ chrome-devtools navigate_page 1 --url "https://example.com" --timeout 5000 # Navigate with a timeout
69
+ chrome-devtools navigate_page 1 --type "reload" --handleBeforeUnload "accept" # Handle before unload dialog
70
+ chrome-devtools navigate_page 1 --type "back" --initScript "foo()" # Navigate back and run an init script
71
+ chrome-devtools new_page "https://example.com" # Creates a new page
72
+ chrome-devtools new_page "https://example.com" --background true --timeout 5000 # Create new page in background
73
+ chrome-devtools new_page "https://example.com" --isolatedContext "ctx" # Create new page with isolated context
74
+ chrome-devtools select_page 1 # Select a page as a context for future tool calls
75
+ chrome-devtools select_page 1 --bringToFront true # Select a page and bring it to front
76
+ ```
77
+
78
+ ## Emulation
79
+
80
+ Each `emulate` call replaces all previously configured emulation settings (except `--extraHttpHeaders`), so pass all desired settings in a single call.
81
+
82
+ ```bash
83
+ chrome-devtools emulate 1 --networkConditions "Offline" # Emulate network conditions (resets other settings)
84
+ chrome-devtools emulate 1 --cpuThrottlingRate 4 --geolocation "0,0" # Emulate CPU throttling and geolocation (resets other settings)
85
+ chrome-devtools emulate 1 --colorScheme "dark" --viewport "1920x1080" # Emulate color scheme and viewport (resets other settings)
86
+ chrome-devtools emulate 1 --userAgent "Mozilla/5.0..." # Emulate user agent (resets other settings)
87
+ chrome-devtools resize_page 1 1920 1080 # Resizes the selected page's window
88
+ ```
89
+
90
+ ## Performance
91
+
92
+ ```bash
93
+ chrome-devtools performance_analyze_insight 1 "NAVIGATION_0" "LCPBreakdown" # Get more details on a specific Performance Insight (pageId, insightSetId, insightName)
94
+ chrome-devtools performance_start_trace 1 --reload true --autoStop false # Starts a performance trace recording (reload, autoStop)
95
+ chrome-devtools performance_start_trace 1 --reload true --autoStop true --filePath "t.json.gz" # Start trace and save to a file
96
+ chrome-devtools performance_stop_trace 1 # Stops the active performance trace
97
+ chrome-devtools performance_stop_trace 1 --filePath "t.json.gz" # Stop trace and save to a file
98
+ ```
99
+
100
+ ## Memory
101
+
102
+ ```bash
103
+ chrome-devtools take_heapsnapshot 1 "./snap.heapsnapshot" # Capture a memory heap snapshot
104
+ ```
105
+
106
+ ### Memory Debugging (requires `--memoryDebugging=true`)
107
+
108
+ ```bash
109
+ chrome-devtools get_heapsnapshot_summary "./snap.heapsnapshot" # Get snapshot summary stats
110
+ chrome-devtools compare_heapsnapshots "./base.heapsnapshot" "./target.heapsnapshot" # Compare two snapshots
111
+ chrome-devtools get_heapsnapshot_details "./snap.heapsnapshot" # Snapshot statistics and per-class aggregates (with class IDs)
112
+ chrome-devtools get_heapsnapshot_class_nodes "./snap.heapsnapshot" 18 # Inspect instances of a class (class ID from get_heapsnapshot_details)
113
+ chrome-devtools get_heapsnapshot_dominators "./snap.heapsnapshot" 123 # Dominator tree for node
114
+ chrome-devtools get_heapsnapshot_duplicate_strings "./snap.heapsnapshot" # Find duplicated strings
115
+ chrome-devtools get_heapsnapshot_edges "./snap.heapsnapshot" 123 # Node edges/references
116
+ chrome-devtools get_heapsnapshot_object_details "./snap.heapsnapshot" 123 # Object details by node ID
117
+ chrome-devtools get_heapsnapshot_retainers "./snap.heapsnapshot" 123 # Retaining objects
118
+ chrome-devtools get_heapsnapshot_retaining_paths "./snap.heapsnapshot" 123 # Shortest retaining paths
119
+ chrome-devtools close_heapsnapshot "./snap.heapsnapshot" # Free memory from loaded snapshot
120
+ ```
121
+
122
+ ## Network
123
+
124
+ Network mocking commands require `--categoryNetworkMocks=true` at server startup.
125
+ Changing this flag requires a server restart.
126
+
127
+ ```bash
128
+ chrome-devtools get_network_request 1 # Get the currently selected network request for page 1
129
+ chrome-devtools get_network_request 1 --reqid 1 --requestFilePath "req.md" # Get request by id and save to file
130
+ chrome-devtools get_network_request 1 --reqid 1 --responseFilePath "res.md" # Save response body to file
131
+ chrome-devtools list_network_requests 1 # List all network requests for page 1
132
+ chrome-devtools list_network_requests 1 --pageSize 50 --pageIdx 0 # List network requests with pagination
133
+ chrome-devtools list_network_requests 1 --resourceTypes fetch # Filter requests by resource type
134
+ chrome-devtools list_network_requests 1 --includePreservedRequests true # Include preserved requests
135
+ chrome-devtools mock_network 1 --route 'https://example.com/app.js*' \
136
+ --body /tmp/app.js # Replace a response with a local file
137
+ chrome-devtools mock_network 1 --route 'https://example.com/app.js*' \
138
+ --upstream https://example.com/dev.js # Use an upstream URL instead
139
+ chrome-devtools mock_network 1 # Inspect all mocks
140
+ chrome-devtools mock_network 1 --resourceType script # Inspect script mocks
141
+ chrome-devtools remove_network_mock 1 --route 'https://example.com/app.js*'
142
+ chrome-devtools remove_network_mock 1 # Clear all mocks for page 1
143
+ ```
144
+
145
+ ## Debugging & Inspection
146
+
147
+ ```bash
148
+ chrome-devtools evaluate_script "() => document.title" --pageId 1 # Evaluate a JavaScript function on page 1
149
+ chrome-devtools evaluate_script "(a) => a.innerText" --pageId 1 --args 1_4 # Evaluate JS with UID arguments on page 1
150
+ chrome-devtools evaluate_script --pageId 1 --sourcePath /path/to/script.js --format script # Evaluate a local classic JavaScript file on page 1
151
+ chrome-devtools get_console_message 1 1 # Gets a console message by its ID
152
+ chrome-devtools get_css_styles 1 "1_4" # Get CSS styles with pagination on page 1 (default: 10 rules, pageIdx 0)
153
+ chrome-devtools get_css_styles 1 "1_4" --pageSize 20 --pageIdx 1 # Paginate CSS rules with custom page size and custom 0-based page index
154
+ chrome-devtools lighthouse_audit 1 --mode "navigation" # Run Lighthouse audit for navigation
155
+ chrome-devtools lighthouse_audit 1 --mode "snapshot" --device "mobile" # Run Lighthouse audit for a snapshot on mobile
156
+ chrome-devtools lighthouse_audit 1 --outputDirPath ./out # Run Lighthouse audit and save reports
157
+ chrome-devtools list_console_messages 1 # List all console messages
158
+ chrome-devtools list_console_messages 1 --pageSize 20 --pageIdx 1 # List console messages with pagination
159
+ chrome-devtools list_console_messages 1 --types error --types info # Filter console messages by type
160
+ chrome-devtools list_console_messages 1 --includePreservedMessages true # Include preserved messages
161
+ chrome-devtools take_screenshot 1 # Take a screenshot of the page viewport
162
+ chrome-devtools take_screenshot 1 --fullPage true --format "jpeg" --quality 80 # Take a full page screenshot as JPEG with quality
163
+ chrome-devtools take_screenshot 1 --uid "id" --filePath "s.png" # Take a screenshot of an element
164
+ chrome-devtools take_snapshot 1 # Take a text snapshot of the page from the a11y tree
165
+ chrome-devtools take_snapshot 1 --verbose true --filePath "s.txt" # Take a verbose snapshot and save to file
166
+ chrome-devtools screencast_start 1 --filePath "screen.mp4" # Starts an mp4 screencast recording on page 1
167
+ chrome-devtools screencast_stop 1 # Stops the active screencast on page 1
168
+ ```
169
+
170
+ ## Extensions
171
+
172
+ ```bash
173
+ chrome-devtools list_extensions # Lists the unpacked Chrome extensions loaded in the browser
174
+ chrome-devtools install_extension "/path/to/extension" # Installs a Chrome extension from the given path
175
+ chrome-devtools uninstall_extension "extension_id" # Uninstalls a Chrome extension by its ID
176
+ chrome-devtools reload_extension "extension_id" # Reloads an unpacked Chrome extension by its ID
177
+ chrome-devtools trigger_extension_action "extension_id" # Triggers the default action of an extension by its ID
178
+ ```
179
+
180
+ ## Progressive Web Apps (requires `--categoryPwa=true`)
181
+
182
+ ```bash
183
+ chrome-devtools install_pwa "https://example.com/" "https://example.com/" # Install PWA by manifest ID and install URL
184
+ chrome-devtools launch_pwa "https://example.com/" # Launch installed PWA
185
+ chrome-devtools get_os_app_state "https://example.com/" # Get OS app installation state
186
+ chrome-devtools uninstall_pwa "https://example.com/" # Uninstall PWA and close windows
187
+ ```
188
+
189
+ ## Experimental Features
190
+
191
+ Experimental tools are disabled by default. Enable them with the corresponding flag during `start`.
192
+
193
+ ```bash
194
+ chrome-devtools click_at 1 100 200 # Clicks at the provided coordinates on page 1 (requires --experimentalVision=true)
195
+ chrome-devtools list_webmcp_tools 1 # List all WebMCP tools on page 1 (requires --categoryExperimentalWebmcp=true)
196
+ chrome-devtools execute_webmcp_tool 1 "tool_name" --input '{"arg":"val"}' # Execute a WebMCP tool on page 1 (requires --categoryExperimentalWebmcp=true)
197
+ chrome-devtools list_3p_developer_tools 1 # List third-party developer tools on page 1 (requires --categoryExperimentalThirdParty=true)
198
+ chrome-devtools execute_3p_developer_tool 1 "tool_name" --params '{"arg":"val"}' # Execute third-party developer tool on page 1 (requires --categoryExperimentalThirdParty=true)
199
+ ```
200
+
201
+ ## Service Management
202
+
203
+ ```bash
204
+ chrome-devtools start # Start or restart chrome-devtools-mcp
205
+ chrome-devtools start --headless=false # Start with visible browser window
206
+ chrome-devtools status # Checks if chrome-devtools-mcp is running
207
+ chrome-devtools stop # Stop chrome-devtools-mcp if any
208
+ ```
@@ -0,0 +1,24 @@
1
+ # Installation
2
+
3
+ Install `@chenpx976/chrome-devtools-mcp` globally to make the `chrome-devtools`
4
+ command available. Both the MCP and CLI binaries ship in this package; do not
5
+ install the separate official `chrome-devtools` alias package.
6
+
7
+ The scoped package is not yet published or verified. Until its first release
8
+ is verified, build the fork locally using its `docs/arc.md` instructions.
9
+ Do not substitute official npm for an Arc connection.
10
+
11
+ ```sh
12
+ npm i @chenpx976/chrome-devtools-mcp@latest -g
13
+ chrome-devtools status # check if install worked.
14
+ ```
15
+
16
+ Verify the installed package name/version and that the executable on `PATH`
17
+ belongs to this scoped package. The `chrome-devtools` command name is unchanged,
18
+ so its presence alone does not distinguish this fork from an official install.
19
+
20
+ ## Troubleshooting
21
+
22
+ - **Command not found:** If `chrome-devtools` is not recognized, ensure your global npm `bin` directory is in your system's `PATH`. Restart your terminal or source your shell configuration file (e.g., `.bashrc`, `.zshrc`).
23
+ - **Permission errors:** If you encounter `EACCES` or permission errors during installation, avoid using `sudo`. Instead, use a node version manager like `nvm`, or configure npm to use a different global directory.
24
+ - **Old version running:** Stop the existing daemon with `chrome-devtools stop`, then update `@chenpx976/chrome-devtools-mcp`. Inspect the executable path and installed package version before restarting. If an official installation owns the same binary names, remove that conflicting installation before installing the scoped package.
@@ -0,0 +1,152 @@
1
+ ---
2
+ name: cookie-debugging
3
+ description: Uses Chrome DevTools MCP for inspecting, debugging, and testing cookies, session state, authentication issues, and cookie consent compliance. Use when diagnosing 401/403 errors, authentication redirects, session expiration, Cookie/Set-Cookie header issues, cookie banner consent conformance, or third-party cookie/SameSite/Partitioned cookie warnings.
4
+ ---
5
+
6
+ ## Core Concepts
7
+
8
+ **Page Targeting**: Page-scoped tools (`list_network_requests`, `get_network_request`, `list_console_messages`, `evaluate_script`, `navigate_page`, `take_snapshot`, `click`, `lighthouse_audit`, `close_page`, etc.) require a `pageId` parameter. Retrieve available page IDs using `list_pages` or from `new_page`.
9
+
10
+ ### HttpOnly vs Client-Side Storage
11
+
12
+ Cookies marked `HttpOnly` cannot be accessed or modified by client-side JavaScript (`cookieStore` or `document.cookie`). However, the browser **automatically attaches active HttpOnly cookies to outgoing HTTP request headers (`Cookie`)**.
13
+
14
+ - To inspect current `HttpOnly` values: Look at the `Cookie` request header of any outgoing HTTP request via `get_network_request`.
15
+ - To inspect how cookies were created or configured: Look at the `Set-Cookie` response header of login/auth responses.
16
+ - To inspect non-`HttpOnly` cookies: Use `evaluate_script` with the modern `cookieStore` API (`async () => await cookieStore.getAll()`).
17
+
18
+ ### Session Strategy: Live Tab vs Isolated Context
19
+
20
+ Choose the right session environment to avoid state contamination (e.g., residual analytics or auth tokens):
21
+
22
+ | Strategy | When to Use | Setup / Teardown |
23
+ | :---------------------------------- | :---------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------ |
24
+ | **Live Tab (Active Page)** | Diagnosing an active user session, live 401/403 error, or current state. | Operates on the user's existing page; get its `pageId` from `list_pages`. |
25
+ | **Clean-Slate (`isolatedContext`)** | Testing cookie consent banners, first-time visits, or zero-cookie guarantees. | Call `new_page` with a unique `isolatedContext` (e.g. `"consent-audit-1"`). When finished, call `close_page`. |
26
+
27
+ ### Client-Side Capabilities & Limitations
28
+
29
+ | Action | Client JavaScript (`cookieStore` / `document.cookie`) | DevTools Network & Context Tools |
30
+ | :--------------------------------------------------------------- | :---------------------------------------------------- | :------------------------------------------------------ |
31
+ | **Read Non-HttpOnly** | ✅ `async () => await cookieStore.getAll()` | ✅ `get_network_request` (Request `Cookie`) |
32
+ | **Read HttpOnly** | ❌ Blocked by browser security | ✅ `get_network_request` (Request `Cookie`) |
33
+ | **Inspect Attributes** (`Domain`, `Path`, `SameSite`, `Expires`) | ✅ `async () => await cookieStore.getAll()` | ✅ `get_network_request` (Response `Set-Cookie`) |
34
+ | **Modify / Delete Non-HttpOnly** | ✅ `async () => await cookieStore.set(...)` | N/A |
35
+ | **Modify / Delete HttpOnly** | ❌ **Silent failure** in JavaScript | ✅ Use `new_page(isolatedContext: ...)` for clean state |
36
+
37
+ > [!WARNING]
38
+ > Attempting to clear an `HttpOnly` cookie via JavaScript (`cookieStore.delete` or `document.cookie = "...; max-age=0"`) will silently fail. To test in an unauthenticated or fresh state, always spawn a new isolated context using `new_page` with `isolatedContext`.
39
+
40
+ ---
41
+
42
+ ## Workflow Patterns
43
+
44
+ ### 1. Diagnosing Authentication Failures & Redirects (401 / 403)
45
+
46
+ When an authenticated page request fails, returns 401/403, or redirects to login:
47
+
48
+ 1. **List Recent Requests**: Call `list_network_requests` with `includePreservedRequests: true`.
49
+ 2. **Find the Target Request**: Locate the failing request (401/403) or redirect (302/307).
50
+ 3. **Inspect Outgoing `Cookie` Header**: Call `get_network_request` with the `reqid`.
51
+ - Verify if the `Cookie` header was attached and whether required tokens (e.g. `SESSION_ID`, `auth_token`) were sent.
52
+ 4. **Trigger Active Inspection (If no recent request exists)**:
53
+ - If the cookie was set in a previous session and no network call is listed, trigger a request:
54
+ - Use `navigate_page` with `type: "reload"`, OR
55
+ - Call `evaluate_script` with `() => fetch(window.location.href)`
56
+ - Then call `get_network_request` on the new request to inspect the active `Cookie` header.
57
+ 5. **Trace the Setting Request**: If the cookie is missing or rejected:
58
+ - Check earlier login/handshake responses for `Set-Cookie` directives:
59
+ - **Path mismatch**: e.g., `Path=/api` when the request is to `/`.
60
+ - **Domain mismatch**: e.g., `Domain=api.example.com` preventing cookies on `sub.example.com`.
61
+ - **Secure flag on HTTP**: `Secure` cookies are never sent over unencrypted `http://`.
62
+ - **SameSite blocking**: `SameSite=Strict` cookies are omitted on cross-site navigations.
63
+ - **Expiration**: Check if `Expires` or `Max-Age` elapsed.
64
+
65
+ ### 2. Cookie Banner & Consent Conformance Testing
66
+
67
+ To verify that no non-essential or tracking cookies are set before consent or when declining:
68
+
69
+ 1. **Start Clean**: Open a fresh isolated context with a dedicated name:
70
+ ```json
71
+ {"url": "<PAGE_URL>", "isolatedContext": "consent-test-1"}
72
+ ```
73
+ 2. **Record Baseline Cookies**: Before interacting with the banner, run `evaluate_script` with `async () => await cookieStore.getAll()`.
74
+ 3. **Inspect Premature Network Requests & Issues**:
75
+ - Call `list_network_requests` to ensure no third-party tracking beacons fired before consent.
76
+ - Call `list_console_messages` with `types: ["issue"]` to check for tracking warnings.
77
+ 4. **Interact with Consent Banner**:
78
+ - Capture snapshot with `take_snapshot` to locate the "Decline" or "Reject All" button `uid`.
79
+ - Click the button with `click`.
80
+ 5. **Verify Cookie Difference**:
81
+ - Run `evaluate_script` with `async () => await cookieStore.getAll()` after clicking to assert that only strictly necessary or consent-state cookies exist.
82
+ 6. **Test Consent Revocation (Lifecycle Audit)**:
83
+ - When auditing consent withdrawal or preference changes:
84
+ - Locate and click the "Cookie Settings", "Manage Preferences", or footer privacy trigger (`take_snapshot` $\rightarrow$ `click`).
85
+ - Deselect non-essential categories or click "Revoke All" / "Save Preferences".
86
+ - Re-query `cookieStore.getAll()` to verify previously accepted non-essential cookies were cleared or expired.
87
+ - Call `list_network_requests` on subsequent actions to ensure tracking beacons are no longer fired.
88
+ 7. **Teardown Context**: Call `close_page` when the audit is complete to prevent leftover cookies from affecting subsequent tasks.
89
+
90
+ ### 3. Auditing Cookie Security, SameSite & CHIPS (Partitioned Cookies)
91
+
92
+ 1. **Fast-Track: Native DevTools Issues (Recommended)**:
93
+ - Call `list_console_messages` with:
94
+ ```json
95
+ {
96
+ "pageId": 1,
97
+ "types": ["issue"],
98
+ "includePreservedMessages": true
99
+ }
100
+ ```
101
+ - Check for `CookieIssue` entries, such as:
102
+ - `SameSiteNoneInsecure`: `SameSite=None` without `Secure`.
103
+ - `ThirdPartyCookiePhaseout`: Third-party cookie blocked or restricted.
104
+ - `SchemefulSameSite`: Cross-scheme cookie issues.
105
+ - `PartitionedCookies`: Invalid CHIPS partitioning attributes.
106
+ 2. **Deep Audit: Lighthouse Third-Party Cookies**:
107
+ - Run `lighthouse_audit` with `mode: "navigation"` (omit `outputDirPath` to use the default temporary files, or specify a directory within the workspace).
108
+ - **Extract the specific cookie audit** from the returned `report.json` path without loading the full report into context:
109
+ ```bash
110
+ node -e "const r=require('<path/to/report.json>'); const a=r.audits['third-party-cookies']; console.log(JSON.stringify({score: a?.score, displayValue: a?.displayValue, items: a?.details?.items}))"
111
+ ```
112
+
113
+ ### 4. Client-Side Cookie Inspection & Manipulation
114
+
115
+ For client-accessible, non-`HttpOnly` cookies (e.g., UI preferences, non-sensitive feature flags):
116
+
117
+ 1. **Read Cookies & Attributes**:
118
+ - Use the modern asynchronous Cookie Store API:
119
+ ```js
120
+ async () => await cookieStore.getAll();
121
+ ```
122
+ - _Fallback for insecure HTTP origins_: `() => document.cookie`.
123
+ 2. **Set / Modify Cookie**:
124
+ - Set client cookie via `cookieStore`:
125
+ ```js
126
+ async () =>
127
+ await cookieStore.set({
128
+ name: 'theme',
129
+ value: 'dark',
130
+ expires: Date.now() + 86400000,
131
+ sameSite: 'lax',
132
+ });
133
+ ```
134
+ 3. **Delete Cookie**:
135
+ - Clear client cookie:
136
+ ```js
137
+ async () => await cookieStore.delete('theme');
138
+ ```
139
+
140
+ ---
141
+
142
+ ## Troubleshooting
143
+
144
+ - **`cookieStore` is undefined**: `cookieStore` requires a Secure Context (`https://`, `localhost`, or `127.0.0.1`). On non-secure HTTP origins, use `() => document.cookie` or test over HTTPS.
145
+ - **`evaluate_script` returns empty / unresolved Promise**: `cookieStore` methods are asynchronous. Always wrap calls with `async () => await cookieStore.getAll()`.
146
+ - **Cookie not visible in JavaScript**: The cookie is marked `HttpOnly`. Trigger a network request and call `get_network_request` to view it in the `Cookie` request header.
147
+ - **JavaScript deletion did not remove cookie**: The cookie is `HttpOnly` or requires matching `Path` and `Domain` parameters. Use a fresh `isolatedContext` with `new_page` for a clean slate.
148
+ - **Cookie set in response but not sent in requests**:
149
+ - Verify if page is `http://` while cookie specifies `Secure`.
150
+ - Check if `Domain` restricts subdomains.
151
+ - Check `list_console_messages(types: ["issue"])` for browser rejection reasons.
152
+ - **Residual cookies contaminating audits**: Always use `new_page` with a unique `isolatedContext` when running compliance tests, and call `close_page` when done.