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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +168 -0
  382. package/skills/arc-compatibility/SOURCES.md +216 -0
  383. package/skills/arc-compatibility/references/compatibility.md +113 -0
  384. package/skills/arc-compatibility/references/output-contract.md +62 -0
  385. package/skills/arc-compatibility/references/workflows.md +105 -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,82 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import fs from 'node:fs/promises';
7
+ import os from 'node:os';
8
+ import path from 'node:path';
9
+ import process from 'node:process';
10
+ import { logger } from '../utils/logger.js';
11
+ import { ClearcutLogger } from './ClearcutLogger.js';
12
+ import { ErrorCode } from './errors.js';
13
+ function isValidTime(time) {
14
+ if (time === undefined) {
15
+ return true;
16
+ }
17
+ if (typeof time !== 'string' || time === '') {
18
+ return false;
19
+ }
20
+ return !Number.isNaN(new Date(time).getTime());
21
+ }
22
+ function isContextValid(state) {
23
+ return isValidTime(state.lastActive) && isValidTime(state.lastToolCall);
24
+ }
25
+ const STATE_FILE_NAME = 'telemetry_state.json';
26
+ function getDataFolder() {
27
+ const homedir = os.homedir();
28
+ const { env } = process;
29
+ const name = 'chrome-devtools-mcp';
30
+ if (process.platform === 'darwin') {
31
+ return path.join(homedir, 'Library', 'Application Support', name);
32
+ }
33
+ if (process.platform === 'win32') {
34
+ const localAppData = env.LOCALAPPDATA || path.join(homedir, 'AppData', 'Local');
35
+ return path.join(localAppData, name, 'Data');
36
+ }
37
+ return path.join(env.XDG_DATA_HOME || path.join(homedir, '.local', 'share'), name);
38
+ }
39
+ export class FilePersistence {
40
+ #dataFolder;
41
+ constructor(dataFolderOverride) {
42
+ this.#dataFolder = dataFolderOverride ?? getDataFolder();
43
+ }
44
+ async loadState() {
45
+ const filePath = path.join(this.#dataFolder, STATE_FILE_NAME);
46
+ try {
47
+ await fs.access(filePath);
48
+ }
49
+ catch {
50
+ // File doesn't exist. Not an error because new users do not have the state file.
51
+ return {};
52
+ }
53
+ let state;
54
+ try {
55
+ const content = await fs.readFile(filePath, 'utf-8');
56
+ state = JSON.parse(content);
57
+ }
58
+ catch (error) {
59
+ logger?.(`Failed to read telemetry state from ${filePath}:`, error);
60
+ void ClearcutLogger.get()?.logServerError({
61
+ errorCode: ErrorCode.ERROR_CODE_PERSISTENCE_FILE_READ_FAILED,
62
+ });
63
+ return {};
64
+ }
65
+ return isContextValid(state) ? state : {};
66
+ }
67
+ async saveState(state) {
68
+ const filePath = path.join(this.#dataFolder, STATE_FILE_NAME);
69
+ try {
70
+ await fs.mkdir(this.#dataFolder, { recursive: true });
71
+ await fs.writeFile(filePath, JSON.stringify(state, null, 2), 'utf-8');
72
+ }
73
+ catch (error) {
74
+ // Ignore errors during state saving to avoid crashing the server
75
+ logger?.(`Failed to save telemetry state to ${filePath}:`, error);
76
+ void ClearcutLogger.get()?.logServerError({
77
+ errorCode: ErrorCode.ERROR_CODE_PERSISTENCE_FILE_SAVE_FAILED,
78
+ });
79
+ }
80
+ }
81
+ }
82
+ //# sourceMappingURL=persistence.js.map
@@ -0,0 +1,229 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { isLocalhost } from '../utils/url.js';
7
+ const LATENCY_BUCKETS = [50, 100, 250, 500, 1000, 2500, 5000, 10000];
8
+ export function bucketizeLatency(latencyMs) {
9
+ for (const bucket of LATENCY_BUCKETS) {
10
+ if (latencyMs <= bucket) {
11
+ return bucket;
12
+ }
13
+ }
14
+ return LATENCY_BUCKETS[LATENCY_BUCKETS.length - 1];
15
+ }
16
+ export const MAX_ACTIVE_DAYS = 31;
17
+ export function bucketizeDaysSince(days) {
18
+ return Math.min(days, MAX_ACTIVE_DAYS);
19
+ }
20
+ export const REDACTED_CLIENT_NAME = '<redacted>';
21
+ const VALID_CLIENT_NAME_REGEX = /^[a-zA-Z0-9_-]+$/;
22
+ const MAX_CLIENT_NAME_LENGTH = 32;
23
+ export function sanitizeClientName(clientName) {
24
+ if (clientName.length > 0 &&
25
+ clientName.length < MAX_CLIENT_NAME_LENGTH &&
26
+ VALID_CLIENT_NAME_REGEX.test(clientName)) {
27
+ return clientName;
28
+ }
29
+ return REDACTED_CLIENT_NAME;
30
+ }
31
+ export const PARAM_BLOCKLIST = new Set(['uid', 'reqid', 'msgid']);
32
+ const SUPPORTED_ZOD_TYPES = [
33
+ 'ZodString',
34
+ 'ZodNumber',
35
+ 'ZodBoolean',
36
+ 'ZodArray',
37
+ 'ZodEnum',
38
+ ];
39
+ function isObjectWithDef(val) {
40
+ return typeof val === 'object' && val !== null && '_def' in val;
41
+ }
42
+ function isZodType(type) {
43
+ return SUPPORTED_ZOD_TYPES.includes(type);
44
+ }
45
+ export function getZodType(zodType) {
46
+ if (!isObjectWithDef(zodType)) {
47
+ throw new Error('Invalid zod schema');
48
+ }
49
+ const def = zodType._def;
50
+ let typeName = def.typeName;
51
+ if (!typeName && def.type) {
52
+ typeName = 'Zod' + def.type.charAt(0).toUpperCase() + def.type.slice(1);
53
+ }
54
+ if (typeName === 'ZodOptional' ||
55
+ typeName === 'ZodDefault' ||
56
+ typeName === 'ZodNullable') {
57
+ return getZodType(def.innerType);
58
+ }
59
+ if (typeName === 'ZodEffects') {
60
+ return getZodType(def.schema);
61
+ }
62
+ if (typeName === 'ZodPipeline' || typeName === 'ZodPipe') {
63
+ return getZodType(isObjectWithDef(def.in) &&
64
+ (def.in._def.type === 'transform' ||
65
+ def.in._def.typeName === 'ZodTransform')
66
+ ? def.out
67
+ : def.in);
68
+ }
69
+ if (typeName && isZodType(typeName)) {
70
+ return typeName;
71
+ }
72
+ throw new Error(`Unsupported zod type for tool parameter: ${typeName}`);
73
+ }
74
+ /**
75
+ * Resolves the values of an enum parameter, unwrapping any optional/default/
76
+ * nullable/effects wrappers (in any order), mirroring {@link getZodType}.
77
+ */
78
+ export function getEnumValues(zodType) {
79
+ if (!isObjectWithDef(zodType)) {
80
+ throw new Error('Invalid zod schema');
81
+ }
82
+ const def = zodType._def;
83
+ let typeName = def.typeName;
84
+ if (!typeName && def.type) {
85
+ typeName = 'Zod' + def.type.charAt(0).toUpperCase() + def.type.slice(1);
86
+ }
87
+ if (typeName === 'ZodOptional' ||
88
+ typeName === 'ZodDefault' ||
89
+ typeName === 'ZodNullable') {
90
+ return getEnumValues(def.innerType);
91
+ }
92
+ if (typeName === 'ZodEffects') {
93
+ return getEnumValues(def.schema);
94
+ }
95
+ if (typeName === 'ZodPipeline' || typeName === 'ZodPipe') {
96
+ return getEnumValues(isObjectWithDef(def.in) &&
97
+ (def.in._def.type === 'transform' ||
98
+ def.in._def.typeName === 'ZodTransform')
99
+ ? def.out
100
+ : def.in);
101
+ }
102
+ if (typeName === 'ZodEnum') {
103
+ if (def.values) {
104
+ return def.values;
105
+ }
106
+ if (def.entries) {
107
+ return Object.values(def.entries);
108
+ }
109
+ }
110
+ throw new Error(`Cannot resolve enum values for zod type: ${typeName}`);
111
+ }
112
+ export function stripUnderscoreBeforeNumber(name) {
113
+ return name.replace(/_([0-9])/g, '$1');
114
+ }
115
+ export function transformArgName(zodType, name) {
116
+ const snakeCaseName = name.replace(/[A-Z]/g, letter => `_${letter.toLowerCase()}`);
117
+ let transformed;
118
+ if (zodType === 'ZodString') {
119
+ transformed = `${snakeCaseName}_length`;
120
+ }
121
+ else if (zodType === 'ZodArray') {
122
+ transformed = `${snakeCaseName}_count`;
123
+ }
124
+ else {
125
+ transformed = snakeCaseName;
126
+ }
127
+ return stripUnderscoreBeforeNumber(transformed);
128
+ }
129
+ export function transformArgType(zodType) {
130
+ if (zodType === 'ZodString' || zodType === 'ZodArray') {
131
+ return 'number';
132
+ }
133
+ switch (zodType) {
134
+ case 'ZodNumber':
135
+ return 'number';
136
+ case 'ZodBoolean':
137
+ return 'boolean';
138
+ case 'ZodEnum':
139
+ return 'enum';
140
+ default:
141
+ throw new Error(`Unsupported zod type for tool parameter: ${zodType}`);
142
+ }
143
+ }
144
+ const BUCKETS = [
145
+ 0, 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000,
146
+ ];
147
+ function bucketize(value) {
148
+ for (const bucket of BUCKETS) {
149
+ if (bucket >= value) {
150
+ return bucket;
151
+ }
152
+ }
153
+ return BUCKETS[BUCKETS.length - 1];
154
+ }
155
+ function transformValue(zodType, value) {
156
+ if (zodType === 'ZodString') {
157
+ return bucketize(value.length);
158
+ }
159
+ if (zodType === 'ZodArray') {
160
+ return value.length;
161
+ }
162
+ return value;
163
+ }
164
+ function hasEquivalentType(zodType, value) {
165
+ if (zodType === 'ZodString') {
166
+ return typeof value === 'string';
167
+ }
168
+ if (zodType === 'ZodArray') {
169
+ return Array.isArray(value);
170
+ }
171
+ if (zodType === 'ZodNumber') {
172
+ return typeof value === 'number';
173
+ }
174
+ if (zodType === 'ZodBoolean') {
175
+ return typeof value === 'boolean';
176
+ }
177
+ if (zodType === 'ZodEnum') {
178
+ return (typeof value === 'string' ||
179
+ typeof value === 'number' ||
180
+ typeof value === 'boolean');
181
+ }
182
+ return false;
183
+ }
184
+ export function sanitizeParams(params, schema) {
185
+ const transformed = {};
186
+ for (const [name, value] of Object.entries(params)) {
187
+ if (value === undefined || PARAM_BLOCKLIST.has(name)) {
188
+ continue;
189
+ }
190
+ const zodType = getZodType(schema[name]);
191
+ if (!hasEquivalentType(zodType, value)) {
192
+ throw new Error(`parameter ${name} has type ${zodType} but value ${value} is not of equivalent type`);
193
+ }
194
+ const transformedName = transformArgName(zodType, name);
195
+ const transformedValue = transformValue(zodType, value);
196
+ transformed[transformedName] = transformedValue;
197
+ }
198
+ return transformed;
199
+ }
200
+ function transformDevToolsData(devToolsData) {
201
+ const logged = {};
202
+ if (devToolsData.cdpBackendNodeId !== undefined) {
203
+ logged.is_dom_element_selected = true;
204
+ }
205
+ if (devToolsData.cdpRequestId !== undefined) {
206
+ logged.is_network_request_selected = true;
207
+ }
208
+ return logged;
209
+ }
210
+ export function buildContext(devToolsData, pageUrl) {
211
+ let context;
212
+ if (devToolsData === undefined) {
213
+ context = { is_devtools_open: false };
214
+ }
215
+ else {
216
+ context = {
217
+ is_devtools_open: Object.keys(devToolsData).length > 0,
218
+ };
219
+ const loggedDevtoolsData = transformDevToolsData(devToolsData);
220
+ if (Object.keys(loggedDevtoolsData).length > 0) {
221
+ context.devtools_data = loggedDevtoolsData;
222
+ }
223
+ }
224
+ if (pageUrl !== undefined) {
225
+ context.is_localhost = isLocalhost(pageUrl);
226
+ }
227
+ return context;
228
+ }
229
+ //# sourceMappingURL=transformation.js.map
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ // Enums
7
+ export var OsType;
8
+ (function (OsType) {
9
+ OsType[OsType["OS_TYPE_UNSPECIFIED"] = 0] = "OS_TYPE_UNSPECIFIED";
10
+ OsType[OsType["OS_TYPE_WINDOWS"] = 1] = "OS_TYPE_WINDOWS";
11
+ OsType[OsType["OS_TYPE_MACOS"] = 2] = "OS_TYPE_MACOS";
12
+ OsType[OsType["OS_TYPE_LINUX"] = 3] = "OS_TYPE_LINUX";
13
+ })(OsType || (OsType = {}));
14
+ export var McpClient;
15
+ (function (McpClient) {
16
+ McpClient[McpClient["MCP_CLIENT_UNSPECIFIED"] = 0] = "MCP_CLIENT_UNSPECIFIED";
17
+ McpClient[McpClient["MCP_CLIENT_CLAUDE_CODE"] = 1] = "MCP_CLIENT_CLAUDE_CODE";
18
+ McpClient[McpClient["MCP_CLIENT_GEMINI_CLI"] = 2] = "MCP_CLIENT_GEMINI_CLI";
19
+ McpClient[McpClient["MCP_CLIENT_DT_MCP_CLI"] = 4] = "MCP_CLIENT_DT_MCP_CLI";
20
+ McpClient[McpClient["MCP_CLIENT_OPENCLAW"] = 5] = "MCP_CLIENT_OPENCLAW";
21
+ McpClient[McpClient["MCP_CLIENT_CODEX"] = 6] = "MCP_CLIENT_CODEX";
22
+ McpClient[McpClient["MCP_CLIENT_ANTIGRAVITY"] = 7] = "MCP_CLIENT_ANTIGRAVITY";
23
+ McpClient[McpClient["MCP_CLIENT_GROK"] = 8] = "MCP_CLIENT_GROK";
24
+ McpClient[McpClient["MCP_CLIENT_OPENCODE"] = 9] = "MCP_CLIENT_OPENCODE";
25
+ McpClient[McpClient["MCP_CLIENT_CLAUDE_DESKTOP"] = 10] = "MCP_CLIENT_CLAUDE_DESKTOP";
26
+ McpClient[McpClient["MCP_CLIENT_GITHUB_COPILOT"] = 11] = "MCP_CLIENT_GITHUB_COPILOT";
27
+ McpClient[McpClient["MCP_CLIENT_HERMES"] = 12] = "MCP_CLIENT_HERMES";
28
+ McpClient[McpClient["MCP_CLIENT_OTHER"] = 3] = "MCP_CLIENT_OTHER";
29
+ })(McpClient || (McpClient = {}));
30
+ // IPC types for messages between the main process and the
31
+ // telemetry watchdog process.
32
+ export var WatchdogMessageType;
33
+ (function (WatchdogMessageType) {
34
+ WatchdogMessageType["LOG_EVENT"] = "log-event";
35
+ })(WatchdogMessageType || (WatchdogMessageType = {}));
36
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,213 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import crypto from 'node:crypto';
7
+ import { logger } from '../../utils/logger.js';
8
+ const MAX_BUFFER_SIZE = 1000;
9
+ export const DEFAULT_CLEARCUT_ENDPOINT = 'https://play.googleapis.com/log?format=json_proto';
10
+ const DEFAULT_FLUSH_INTERVAL_MS = 15 * 60 * 1000;
11
+ const LOG_SOURCE = 2839;
12
+ const CLIENT_TYPE = 47;
13
+ const MIN_RATE_LIMIT_WAIT_MS = 30_000;
14
+ const REQUEST_TIMEOUT_MS = 30_000;
15
+ const SHUTDOWN_TIMEOUT_MS = 5_000;
16
+ const SESSION_ROTATION_INTERVAL_MS = 24 * 60 * 60 * 1000;
17
+ /**
18
+ * Sends events to Clearcut in one request and never rejects.
19
+ */
20
+ export async function sendToClearcut(events, options) {
21
+ logger?.(`Sending ${events.length} event(s) to Clearcut`);
22
+ const requestBody = {
23
+ log_source: LOG_SOURCE,
24
+ request_time_ms: Date.now().toString(),
25
+ client_info: {
26
+ client_type: CLIENT_TYPE,
27
+ },
28
+ log_event: events.map(({ event, timestamp }) => ({
29
+ event_time_ms: timestamp.toString(),
30
+ source_extension_json: JSON.stringify(event),
31
+ })),
32
+ };
33
+ const controller = new AbortController();
34
+ const timeoutId = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS);
35
+ try {
36
+ const response = await fetch(options.clearcutEndpoint, {
37
+ method: 'POST',
38
+ headers: {
39
+ 'Content-Type': 'application/json',
40
+ // Used in E2E tests to confirm that the watchdog process is killed
41
+ ...(options.includePidHeader
42
+ ? { 'X-Watchdog-Pid': process.pid.toString() }
43
+ : {}),
44
+ },
45
+ body: JSON.stringify(requestBody),
46
+ signal: controller.signal,
47
+ });
48
+ clearTimeout(timeoutId);
49
+ if (response.ok) {
50
+ const data = await response.json();
51
+ return {
52
+ success: true,
53
+ nextRequestWaitMs: data.next_request_wait_millis,
54
+ };
55
+ }
56
+ const status = response.status;
57
+ if (status >= 500 || status === 429) {
58
+ return { success: false };
59
+ }
60
+ logger?.('Telemetry permanent error:', status);
61
+ return { success: false, isPermanentError: true };
62
+ }
63
+ catch {
64
+ clearTimeout(timeoutId);
65
+ return { success: false };
66
+ }
67
+ }
68
+ export class ClearcutSender {
69
+ #appVersion;
70
+ #osType;
71
+ #clearcutEndpoint;
72
+ #flushIntervalMs;
73
+ #includePidHeader;
74
+ #sessionId;
75
+ #sessionCreated;
76
+ #buffer = [];
77
+ #flushTimer = null;
78
+ #isFlushing = false;
79
+ #timerStarted = false;
80
+ constructor(config) {
81
+ this.#appVersion = config.appVersion;
82
+ this.#osType = config.osType;
83
+ this.#clearcutEndpoint = config.clearcutEndpoint;
84
+ this.#flushIntervalMs =
85
+ config.forceFlushIntervalMs ?? DEFAULT_FLUSH_INTERVAL_MS;
86
+ this.#includePidHeader = config.includePidHeader ?? false;
87
+ this.#sessionId = config.sessionId;
88
+ this.#sessionCreated = Date.now();
89
+ }
90
+ enqueueEvent(event) {
91
+ if (Date.now() - this.#sessionCreated > SESSION_ROTATION_INTERVAL_MS) {
92
+ this.#sessionId = crypto.randomUUID();
93
+ this.#sessionCreated = Date.now();
94
+ }
95
+ const eventToSend = {
96
+ ...event,
97
+ session_id: this.#sessionId,
98
+ app_version: this.#appVersion,
99
+ os_type: this.#osType,
100
+ };
101
+ logger?.('Enqueing telemetry event', JSON.stringify(eventToSend, null, 2));
102
+ this.#addToBuffer(eventToSend);
103
+ if (!this.#timerStarted) {
104
+ this.#timerStarted = true;
105
+ this.#scheduleFlush(this.#flushIntervalMs);
106
+ }
107
+ }
108
+ async sendShutdownEvent() {
109
+ if (this.#flushTimer) {
110
+ clearTimeout(this.#flushTimer);
111
+ this.#flushTimer = null;
112
+ }
113
+ const shutdownEvent = {
114
+ server_shutdown: {},
115
+ };
116
+ this.enqueueEvent(shutdownEvent);
117
+ try {
118
+ await Promise.race([
119
+ this.#finalFlush(),
120
+ new Promise(resolve => setTimeout(resolve, SHUTDOWN_TIMEOUT_MS)),
121
+ ]);
122
+ logger?.('Final flush completed');
123
+ }
124
+ catch (error) {
125
+ logger?.('Final flush failed:', error);
126
+ }
127
+ }
128
+ async #flush() {
129
+ if (this.#isFlushing) {
130
+ return;
131
+ }
132
+ if (this.#buffer.length === 0) {
133
+ this.#scheduleFlush(this.#flushIntervalMs);
134
+ return;
135
+ }
136
+ this.#isFlushing = true;
137
+ let nextDelayMs = this.#flushIntervalMs;
138
+ // Optimistically remove events from buffer before sending.
139
+ // This prevents race conditions where a simultaneous #finalFlush would include these same events.
140
+ const eventsToSend = [...this.#buffer];
141
+ this.#buffer = [];
142
+ try {
143
+ const result = await this.#sendBatch(eventsToSend);
144
+ if (result.success) {
145
+ if (result.nextRequestWaitMs !== undefined) {
146
+ nextDelayMs = Math.max(result.nextRequestWaitMs, MIN_RATE_LIMIT_WAIT_MS);
147
+ }
148
+ }
149
+ else if (result.isPermanentError) {
150
+ logger?.('Permanent error, dropped batch of', eventsToSend.length, 'events');
151
+ }
152
+ else {
153
+ // Transient error: Requeue events at the front of the buffer
154
+ // to maintain order and retry them later.
155
+ this.#buffer = [...eventsToSend, ...this.#buffer];
156
+ }
157
+ }
158
+ catch (error) {
159
+ // Safety catch for unexpected errors, requeue events
160
+ this.#buffer = [...eventsToSend, ...this.#buffer];
161
+ logger?.('Flush failed unexpectedly:', error);
162
+ }
163
+ finally {
164
+ this.#isFlushing = false;
165
+ this.#scheduleFlush(nextDelayMs);
166
+ }
167
+ }
168
+ #addToBuffer(event) {
169
+ if (this.#buffer.length >= MAX_BUFFER_SIZE) {
170
+ this.#buffer.shift();
171
+ logger?.('Telemetry buffer overflow: dropped oldest event');
172
+ }
173
+ this.#buffer.push({
174
+ event,
175
+ timestamp: Date.now(),
176
+ });
177
+ }
178
+ #scheduleFlush(delayMs) {
179
+ logger?.(`Scheduling flush in ${delayMs}`);
180
+ if (this.#flushTimer) {
181
+ clearTimeout(this.#flushTimer);
182
+ }
183
+ this.#flushTimer = setTimeout(() => {
184
+ this.#flush().catch(err => {
185
+ logger?.('Flush error:', err);
186
+ });
187
+ }, delayMs);
188
+ }
189
+ #sendBatch(events) {
190
+ return sendToClearcut(events, {
191
+ clearcutEndpoint: this.#clearcutEndpoint,
192
+ includePidHeader: this.#includePidHeader,
193
+ });
194
+ }
195
+ async #finalFlush() {
196
+ if (this.#buffer.length === 0) {
197
+ return;
198
+ }
199
+ const eventsToSend = [...this.#buffer];
200
+ await this.#sendBatch(eventsToSend);
201
+ }
202
+ stopForTesting() {
203
+ if (this.#flushTimer) {
204
+ clearTimeout(this.#flushTimer);
205
+ this.#flushTimer = null;
206
+ }
207
+ this.#timerStarted = false;
208
+ }
209
+ get bufferSizeForTesting() {
210
+ return this.#buffer.length;
211
+ }
212
+ }
213
+ //# sourceMappingURL=ClearcutSender.js.map
@@ -0,0 +1,142 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import process from 'node:process';
7
+ import readline from 'node:readline';
8
+ import { parseArgs } from 'node:util';
9
+ import { logger, flushLogs, saveLogsToFile } from '../../utils/logger.js';
10
+ import { WatchdogMessageType } from '../types.js';
11
+ import { ClearcutSender } from './ClearcutSender.js';
12
+ function parseWatchdogArgs() {
13
+ const { values } = parseArgs({
14
+ options: {
15
+ 'parent-pid': { type: 'string' },
16
+ 'app-version': { type: 'string' },
17
+ 'os-type': { type: 'string' },
18
+ 'session-id': { type: 'string' },
19
+ 'log-file': { type: 'string' },
20
+ 'clearcut-endpoint': { type: 'string' },
21
+ 'clearcut-force-flush-interval-ms': { type: 'string' },
22
+ 'clearcut-include-pid-header': { type: 'boolean' },
23
+ },
24
+ strict: true,
25
+ });
26
+ // Verify required arguments
27
+ const parentPid = parseInt(values['parent-pid'] ?? '', 10);
28
+ const appVersion = values['app-version'];
29
+ const osType = parseInt(values['os-type'] ?? '', 10);
30
+ const sessionId = values['session-id'];
31
+ const clearcutEndpoint = values['clearcut-endpoint'];
32
+ if (isNaN(parentPid) ||
33
+ !appVersion ||
34
+ isNaN(osType) ||
35
+ !sessionId ||
36
+ !clearcutEndpoint) {
37
+ console.error('Invalid arguments provided for watchdog process: ', JSON.stringify({
38
+ parentPid,
39
+ appVersion,
40
+ osType,
41
+ sessionId,
42
+ hasClearcutEndpoint: Boolean(clearcutEndpoint),
43
+ }));
44
+ process.exit(1);
45
+ }
46
+ // Parse Optional Arguments
47
+ const logFile = values['log-file'];
48
+ const clearcutIncludePidHeader = values['clearcut-include-pid-header'];
49
+ let clearcutForceFlushIntervalMs;
50
+ if (values['clearcut-force-flush-interval-ms']) {
51
+ const parsed = parseInt(values['clearcut-force-flush-interval-ms'], 10);
52
+ if (!isNaN(parsed)) {
53
+ clearcutForceFlushIntervalMs = parsed;
54
+ }
55
+ }
56
+ return {
57
+ parentPid,
58
+ appVersion,
59
+ osType,
60
+ sessionId,
61
+ clearcutEndpoint,
62
+ logFile,
63
+ clearcutForceFlushIntervalMs,
64
+ clearcutIncludePidHeader,
65
+ };
66
+ }
67
+ function main() {
68
+ const { parentPid, appVersion, osType, sessionId, clearcutEndpoint, logFile, clearcutForceFlushIntervalMs, clearcutIncludePidHeader, } = parseWatchdogArgs();
69
+ let logStream;
70
+ if (logFile) {
71
+ logStream = saveLogsToFile(logFile);
72
+ }
73
+ const exit = (code) => {
74
+ if (!logStream) {
75
+ process.exit(code);
76
+ }
77
+ void flushLogs(logStream).finally(() => {
78
+ process.exit(code);
79
+ });
80
+ };
81
+ logger?.('Watchdog started', JSON.stringify({
82
+ pid: process.pid,
83
+ parentPid,
84
+ version: appVersion,
85
+ osType,
86
+ }, null, 2));
87
+ const sender = new ClearcutSender({
88
+ appVersion,
89
+ osType,
90
+ sessionId,
91
+ clearcutEndpoint,
92
+ forceFlushIntervalMs: clearcutForceFlushIntervalMs,
93
+ includePidHeader: clearcutIncludePidHeader,
94
+ });
95
+ let isShuttingDown = false;
96
+ function onParentDeath(reason) {
97
+ if (isShuttingDown) {
98
+ return;
99
+ }
100
+ isShuttingDown = true;
101
+ logger?.(`Parent death detected (${reason}). Sending shutdown event...`);
102
+ sender
103
+ .sendShutdownEvent()
104
+ .then(() => {
105
+ logger?.('Shutdown event sent. Exiting.');
106
+ exit(0);
107
+ })
108
+ .catch(err => {
109
+ logger?.('Failed to send shutdown event', err);
110
+ exit(1);
111
+ });
112
+ }
113
+ process.stdin.on('end', () => onParentDeath('stdin end'));
114
+ process.stdin.on('close', () => onParentDeath('stdin close'));
115
+ process.on('disconnect', () => onParentDeath('ipc disconnect'));
116
+ const rl = readline.createInterface({
117
+ input: process.stdin,
118
+ terminal: false,
119
+ });
120
+ rl.on('line', line => {
121
+ try {
122
+ if (!line.trim()) {
123
+ return;
124
+ }
125
+ const msg = JSON.parse(line);
126
+ if (msg.type === WatchdogMessageType.LOG_EVENT && msg.payload) {
127
+ sender.enqueueEvent(msg.payload);
128
+ }
129
+ }
130
+ catch (err) {
131
+ logger?.('Failed to parse IPC message', err);
132
+ }
133
+ });
134
+ }
135
+ try {
136
+ main();
137
+ }
138
+ catch (err) {
139
+ console.error('Watchdog fatal error:', err);
140
+ process.exit(1);
141
+ }
142
+ //# sourceMappingURL=main.js.map