chrome-devtools-mcp 0.23.0 → 0.24.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 (77) hide show
  1. package/build/src/DevToolsConnectionAdapter.js +1 -0
  2. package/build/src/DevtoolsUtils.js +1 -0
  3. package/build/src/HeapSnapshotManager.js +16 -0
  4. package/build/src/McpContext.js +57 -4
  5. package/build/src/McpPage.js +6 -0
  6. package/build/src/McpResponse.js +38 -4
  7. package/build/src/Mutex.js +1 -0
  8. package/build/src/PageCollector.js +1 -0
  9. package/build/src/SlimMcpResponse.js +1 -0
  10. package/build/src/TextSnapshot.js +11 -5
  11. package/build/src/WaitForHelper.js +6 -0
  12. package/build/src/bin/check-latest-version.js +1 -0
  13. package/build/src/bin/chrome-devtools-cli-options.js +206 -46
  14. package/build/src/bin/chrome-devtools-mcp-cli-options.js +3 -1
  15. package/build/src/bin/chrome-devtools-mcp-main.js +1 -0
  16. package/build/src/bin/chrome-devtools-mcp.js +1 -0
  17. package/build/src/bin/chrome-devtools.js +5 -13
  18. package/build/src/browser.js +1 -0
  19. package/build/src/daemon/client.js +4 -2
  20. package/build/src/daemon/daemon.js +1 -0
  21. package/build/src/daemon/types.js +1 -0
  22. package/build/src/daemon/utils.js +1 -0
  23. package/build/src/formatters/ConsoleFormatter.js +48 -1
  24. package/build/src/formatters/HeapSnapshotFormatter.js +18 -2
  25. package/build/src/formatters/IssueFormatter.js +1 -0
  26. package/build/src/formatters/NetworkFormatter.js +1 -0
  27. package/build/src/formatters/SnapshotFormatter.js +2 -1
  28. package/build/src/index.js +114 -51
  29. package/build/src/issue-descriptions.js +1 -0
  30. package/build/src/logger.js +1 -0
  31. package/build/src/polyfill.js +1 -0
  32. package/build/src/telemetry/ClearcutLogger.js +13 -1
  33. package/build/src/telemetry/WatchdogClient.js +1 -0
  34. package/build/src/telemetry/flagUtils.js +1 -0
  35. package/build/src/telemetry/metricUtils.js +1 -0
  36. package/build/src/telemetry/persistence.js +1 -0
  37. package/build/src/telemetry/toolMetricsUtils.js +2 -1
  38. package/build/src/telemetry/types.js +1 -0
  39. package/build/src/telemetry/watchdog/ClearcutSender.js +1 -0
  40. package/build/src/telemetry/watchdog/main.js +1 -0
  41. package/build/src/third_party/THIRD_PARTY_NOTICES +5 -5
  42. package/build/src/third_party/bundled-packages.json +2 -2
  43. package/build/src/third_party/devtools-formatter-worker.js +2451 -2933
  44. package/build/src/third_party/devtools-heap-snapshot-worker.js +32 -26
  45. package/build/src/third_party/index.js +535 -135
  46. package/build/src/third_party/lighthouse-devtools-mcp-bundle.js +21717 -20261
  47. package/build/src/tools/ToolDefinition.js +1 -0
  48. package/build/src/tools/categories.js +6 -2
  49. package/build/src/tools/console.js +3 -0
  50. package/build/src/tools/emulation.js +2 -0
  51. package/build/src/tools/extensions.js +6 -0
  52. package/build/src/tools/inPage.js +3 -2
  53. package/build/src/tools/input.js +13 -2
  54. package/build/src/tools/lighthouse.js +17 -9
  55. package/build/src/tools/memory.js +34 -1
  56. package/build/src/tools/network.js +5 -0
  57. package/build/src/tools/pages.js +9 -0
  58. package/build/src/tools/performance.js +6 -0
  59. package/build/src/tools/screencast.js +6 -2
  60. package/build/src/tools/screenshot.js +3 -0
  61. package/build/src/tools/script.js +2 -0
  62. package/build/src/tools/slim/tools.js +4 -0
  63. package/build/src/tools/snapshot.js +5 -1
  64. package/build/src/tools/tools.js +1 -0
  65. package/build/src/tools/webmcp.js +3 -0
  66. package/build/src/trace-processing/parse.js +1 -0
  67. package/build/src/types.js +1 -0
  68. package/build/src/utils/check-for-updates.js +1 -0
  69. package/build/src/utils/files.js +5 -10
  70. package/build/src/utils/id.js +1 -0
  71. package/build/src/utils/keyboard.js +1 -0
  72. package/build/src/utils/pagination.js +1 -0
  73. package/build/src/utils/string.js +1 -0
  74. package/build/src/utils/types.js +1 -0
  75. package/build/src/version.js +2 -1
  76. package/package.json +9 -9
  77. package/build/src/bin/cliDefinitions.js +0 -621
@@ -31,7 +31,7 @@ import require$$3$3 from 'dns';
31
31
  import require$$2$1 from 'crypto';
32
32
  import 'node:assert';
33
33
  import require$$0$a from 'zlib';
34
- import { generateReport as generateReport$1, navigation as navigation$1, snapshot as snapshot$1 } from './lighthouse-devtools-mcp-bundle.js';
34
+ import { agenticBrowsingConfig as agenticBrowsingConfig$1, generateReport as generateReport$1, navigation as navigation$1, snapshot as snapshot$1 } from './lighthouse-devtools-mcp-bundle.js';
35
35
 
36
36
  function _mergeNamespaces(n, m) {
37
37
  m.forEach(function (e) {
@@ -99567,9 +99567,7 @@ var ExperimentName;
99567
99567
  ExperimentName["CAPTURE_NODE_CREATION_STACKS"] = "capture-node-creation-stacks";
99568
99568
  ExperimentName["LIVE_HEAP_PROFILE"] = "live-heap-profile";
99569
99569
  ExperimentName["PROTOCOL_MONITOR"] = "protocol-monitor";
99570
- ExperimentName["SAMPLING_HEAP_PROFILER_TIMELINE"] = "sampling-heap-profiler-timeline";
99571
99570
  ExperimentName["TIMELINE_INVALIDATION_TRACKING"] = "timeline-invalidation-tracking";
99572
- ExperimentName["APCA"] = "apca";
99573
99571
  ExperimentName["FONT_EDITOR"] = "font-editor";
99574
99572
  ExperimentName["INSTRUMENTATION_BREAKPOINTS"] = "instrumentation-breakpoints";
99575
99573
  ExperimentName["USE_SOURCE_MAP_SCOPES"] = "use-source-map-scopes";
@@ -99818,8 +99816,8 @@ const EmptyUrlString = '';
99818
99816
 
99819
99817
  // Copyright 2025 The Chromium Authors
99820
99818
  class WebWorkerScope {
99821
- postMessage(message) {
99822
- self.postMessage(message);
99819
+ postMessage(message, transfer) {
99820
+ self.postMessage(message, transfer);
99823
99821
  }
99824
99822
  set onmessage(listener) {
99825
99823
  self.addEventListener('message', listener);
@@ -99892,8 +99890,8 @@ var browser = /*#__PURE__*/Object.freeze({
99892
99890
 
99893
99891
  // Copyright 2025 The Chromium Authors
99894
99892
  class NodeWorkerScope {
99895
- postMessage(message) {
99896
- WorkerThreads.parentPort?.postMessage(message);
99893
+ postMessage(message, transfer) {
99894
+ WorkerThreads.parentPort?.postMessage(message, transfer);
99897
99895
  }
99898
99896
  set onmessage(listener) {
99899
99897
  WorkerThreads.parentPort?.addEventListener('message', msg => {
@@ -102941,6 +102939,9 @@ function eventMixin(base) {
102941
102939
  }
102942
102940
  dispatchEventToListeners(eventType, ...eventData) {
102943
102941
  this.__events.dispatchEventToListeners(eventType, ...eventData);
102942
+ if (typeof this.dispatchDOMEvent === 'function') {
102943
+ this.dispatchDOMEvent(new CustomEvent(eventType, { detail: eventData[0] }));
102944
+ }
102944
102945
  }
102945
102946
  };
102946
102947
  }
@@ -104955,12 +104956,11 @@ function getAllSupportedDevToolsLocales() {
104955
104956
  return [...i18nInstance.supportedLocales];
104956
104957
  }
104957
104958
  function getLocaleFetchUrl(locale, location) {
104958
- undefined(location);
104959
104959
  const path = LOCAL_FETCH_PATTERN.replace('@LOCALE@', locale);
104960
104960
  return new URL(path, import.meta.url).toString();
104961
104961
  }
104962
104962
  async function fetchAndRegisterLocaleData(locale, location = self.location.toString()) {
104963
- const localeDataTextPromise = fetch(getLocaleFetchUrl(locale, location)).then(result => result.json());
104963
+ const localeDataTextPromise = fetch(getLocaleFetchUrl(locale)).then(result => result.json());
104964
104964
  const timeoutPromise = new Promise((_, reject) => window.setTimeout(() => reject(new Error('timed out fetching locale')), 5000));
104965
104965
  const localeData = await Promise.race([timeoutPromise, localeDataTextPromise]);
104966
104966
  i18nInstance.registerLocaleData(locale, localeData);
@@ -106837,7 +106837,7 @@ class VersionController {
106837
106837
  static GLOBAL_VERSION_SETTING_NAME = 'inspectorVersion';
106838
106838
  static SYNCED_VERSION_SETTING_NAME = 'syncedInspectorVersion';
106839
106839
  static LOCAL_VERSION_SETTING_NAME = 'localInspectorVersion';
106840
- static CURRENT_VERSION = 43;
106840
+ static CURRENT_VERSION = 44;
106841
106841
  #settings;
106842
106842
  #globalVersionSetting;
106843
106843
  #syncedVersionSetting;
@@ -107452,6 +107452,20 @@ class VersionController {
107452
107452
  }
107453
107453
  }
107454
107454
  }
107455
+ updateVersionFrom43To44() {
107456
+ const apcaExperimentEnabled = experiments.getValueFromStorage('apca');
107457
+ if (apcaExperimentEnabled !== undefined) {
107458
+ if (this.#settings.syncedStorage.has('apca')) {
107459
+ return;
107460
+ }
107461
+ try {
107462
+ const apcaSetting = this.#settings.moduleSetting('apca');
107463
+ apcaSetting.set(apcaExperimentEnabled);
107464
+ }
107465
+ catch {
107466
+ }
107467
+ }
107468
+ }
107455
107469
  migrateSettingsFromLocalStorage() {
107456
107470
  const localSettings = new Set([
107457
107471
  'advancedSearchConfig',
@@ -108590,6 +108604,7 @@ const UIStrings$19 = {
108590
108604
  enableCssSourceMaps: 'Enable CSS source maps',
108591
108605
  disableCssSourceMaps: 'Disable CSS source maps',
108592
108606
  logXmlhttprequests: 'Log XMLHttpRequests',
108607
+ apca: 'Advanced Perceptual Contrast Algorithm (APCA) replacing previous contrast ratio and AA/AAA guidelines',
108593
108608
  };
108594
108609
  const str_$18 = registerUIStrings('core/sdk/sdk-meta.ts', UIStrings$19);
108595
108610
  const i18nLazyString$f = getLazilyComputedLocalizedString.bind(undefined, str_$18);
@@ -108699,6 +108714,14 @@ registerSettingExtension({
108699
108714
  ],
108700
108715
  defaultValue: false,
108701
108716
  });
108717
+ registerSettingExtension({
108718
+ category: "ELEMENTS" ,
108719
+ storageType: "Synced" ,
108720
+ title: i18nLazyString$f(UIStrings$19.apca),
108721
+ settingName: 'apca',
108722
+ settingType: "boolean" ,
108723
+ defaultValue: false,
108724
+ });
108702
108725
  registerSettingExtension({
108703
108726
  category: "GRID" ,
108704
108727
  storageType: "Synced" ,
@@ -110385,7 +110408,7 @@ function registerCommands(inspectorBackend) {
110385
110408
  inspectorBackend.registerEnum("Audits.SRIMessageSignatureError", { MissingSignatureHeader: "MissingSignatureHeader", MissingSignatureInputHeader: "MissingSignatureInputHeader", InvalidSignatureHeader: "InvalidSignatureHeader", InvalidSignatureInputHeader: "InvalidSignatureInputHeader", SignatureHeaderValueIsNotByteSequence: "SignatureHeaderValueIsNotByteSequence", SignatureHeaderValueIsParameterized: "SignatureHeaderValueIsParameterized", SignatureHeaderValueIsIncorrectLength: "SignatureHeaderValueIsIncorrectLength", SignatureInputHeaderMissingLabel: "SignatureInputHeaderMissingLabel", SignatureInputHeaderValueNotInnerList: "SignatureInputHeaderValueNotInnerList", SignatureInputHeaderValueMissingComponents: "SignatureInputHeaderValueMissingComponents", SignatureInputHeaderInvalidComponentType: "SignatureInputHeaderInvalidComponentType", SignatureInputHeaderInvalidComponentName: "SignatureInputHeaderInvalidComponentName", SignatureInputHeaderInvalidHeaderComponentParameter: "SignatureInputHeaderInvalidHeaderComponentParameter", SignatureInputHeaderInvalidDerivedComponentParameter: "SignatureInputHeaderInvalidDerivedComponentParameter", SignatureInputHeaderKeyIdLength: "SignatureInputHeaderKeyIdLength", SignatureInputHeaderInvalidParameter: "SignatureInputHeaderInvalidParameter", SignatureInputHeaderMissingRequiredParameters: "SignatureInputHeaderMissingRequiredParameters", ValidationFailedSignatureExpired: "ValidationFailedSignatureExpired", ValidationFailedInvalidLength: "ValidationFailedInvalidLength", ValidationFailedSignatureMismatch: "ValidationFailedSignatureMismatch", ValidationFailedIntegrityMismatch: "ValidationFailedIntegrityMismatch" });
110386
110409
  inspectorBackend.registerEnum("Audits.UnencodedDigestError", { MalformedDictionary: "MalformedDictionary", UnknownAlgorithm: "UnknownAlgorithm", IncorrectDigestType: "IncorrectDigestType", IncorrectDigestLength: "IncorrectDigestLength" });
110387
110410
  inspectorBackend.registerEnum("Audits.ConnectionAllowlistError", { InvalidHeader: "InvalidHeader", MoreThanOneList: "MoreThanOneList", ItemNotInnerList: "ItemNotInnerList", InvalidAllowlistItemType: "InvalidAllowlistItemType", ReportingEndpointNotToken: "ReportingEndpointNotToken", InvalidUrlPattern: "InvalidUrlPattern" });
110388
- inspectorBackend.registerEnum("Audits.GenericIssueErrorType", { FormLabelForNameError: "FormLabelForNameError", FormDuplicateIdForInputError: "FormDuplicateIdForInputError", FormInputWithNoLabelError: "FormInputWithNoLabelError", FormAutocompleteAttributeEmptyError: "FormAutocompleteAttributeEmptyError", FormEmptyIdAndNameAttributesForInputError: "FormEmptyIdAndNameAttributesForInputError", FormAriaLabelledByToNonExistingIdError: "FormAriaLabelledByToNonExistingIdError", FormInputAssignedAutocompleteValueToIdOrNameAttributeError: "FormInputAssignedAutocompleteValueToIdOrNameAttributeError", FormLabelHasNeitherForNorNestedInputError: "FormLabelHasNeitherForNorNestedInputError", FormLabelForMatchesNonExistingIdError: "FormLabelForMatchesNonExistingIdError", FormInputHasWrongButWellIntendedAutocompleteValueError: "FormInputHasWrongButWellIntendedAutocompleteValueError", ResponseWasBlockedByORB: "ResponseWasBlockedByORB", NavigationEntryMarkedSkippable: "NavigationEntryMarkedSkippable", AutofillAndManualTextPolicyControlledFeaturesInfo: "AutofillAndManualTextPolicyControlledFeaturesInfo", AutofillPolicyControlledFeatureInfo: "AutofillPolicyControlledFeatureInfo", ManualTextPolicyControlledFeatureInfo: "ManualTextPolicyControlledFeatureInfo", FormModelContextParameterMissingTitleAndDescription: "FormModelContextParameterMissingTitleAndDescription" });
110411
+ inspectorBackend.registerEnum("Audits.GenericIssueErrorType", { FormLabelForNameError: "FormLabelForNameError", FormDuplicateIdForInputError: "FormDuplicateIdForInputError", FormInputWithNoLabelError: "FormInputWithNoLabelError", FormAutocompleteAttributeEmptyError: "FormAutocompleteAttributeEmptyError", FormEmptyIdAndNameAttributesForInputError: "FormEmptyIdAndNameAttributesForInputError", FormAriaLabelledByToNonExistingIdError: "FormAriaLabelledByToNonExistingIdError", FormInputAssignedAutocompleteValueToIdOrNameAttributeError: "FormInputAssignedAutocompleteValueToIdOrNameAttributeError", FormLabelHasNeitherForNorNestedInputError: "FormLabelHasNeitherForNorNestedInputError", FormLabelForMatchesNonExistingIdError: "FormLabelForMatchesNonExistingIdError", FormInputHasWrongButWellIntendedAutocompleteValueError: "FormInputHasWrongButWellIntendedAutocompleteValueError", ResponseWasBlockedByORB: "ResponseWasBlockedByORB", NavigationEntryMarkedSkippable: "NavigationEntryMarkedSkippable", AutofillAndManualTextPolicyControlledFeaturesInfo: "AutofillAndManualTextPolicyControlledFeaturesInfo", AutofillPolicyControlledFeatureInfo: "AutofillPolicyControlledFeatureInfo", ManualTextPolicyControlledFeatureInfo: "ManualTextPolicyControlledFeatureInfo", FormModelContextParameterMissingTitleAndDescription: "FormModelContextParameterMissingTitleAndDescription", FormModelContextMissingToolName: "FormModelContextMissingToolName", FormModelContextMissingToolDescription: "FormModelContextMissingToolDescription", FormModelContextRequiredParameterMissingName: "FormModelContextRequiredParameterMissingName", FormModelContextParameterMissingName: "FormModelContextParameterMissingName" });
110389
110412
  inspectorBackend.registerEnum("Audits.ClientHintIssueReason", { MetaTagAllowListInvalidOrigin: "MetaTagAllowListInvalidOrigin", MetaTagModifiedHTML: "MetaTagModifiedHTML" });
110390
110413
  inspectorBackend.registerEnum("Audits.FederatedAuthRequestIssueReason", { ShouldEmbargo: "ShouldEmbargo", TooManyRequests: "TooManyRequests", WellKnownHttpNotFound: "WellKnownHttpNotFound", WellKnownNoResponse: "WellKnownNoResponse", WellKnownInvalidResponse: "WellKnownInvalidResponse", WellKnownListEmpty: "WellKnownListEmpty", WellKnownInvalidContentType: "WellKnownInvalidContentType", ConfigNotInWellKnown: "ConfigNotInWellKnown", WellKnownTooBig: "WellKnownTooBig", ConfigHttpNotFound: "ConfigHttpNotFound", ConfigNoResponse: "ConfigNoResponse", ConfigInvalidResponse: "ConfigInvalidResponse", ConfigInvalidContentType: "ConfigInvalidContentType", IdpNotPotentiallyTrustworthy: "IdpNotPotentiallyTrustworthy", DisabledInSettings: "DisabledInSettings", DisabledInFlags: "DisabledInFlags", ErrorFetchingSignin: "ErrorFetchingSignin", InvalidSigninResponse: "InvalidSigninResponse", AccountsHttpNotFound: "AccountsHttpNotFound", AccountsNoResponse: "AccountsNoResponse", AccountsInvalidResponse: "AccountsInvalidResponse", AccountsListEmpty: "AccountsListEmpty", AccountsInvalidContentType: "AccountsInvalidContentType", IdTokenHttpNotFound: "IdTokenHttpNotFound", IdTokenNoResponse: "IdTokenNoResponse", IdTokenInvalidResponse: "IdTokenInvalidResponse", IdTokenIdpErrorResponse: "IdTokenIdpErrorResponse", IdTokenCrossSiteIdpErrorResponse: "IdTokenCrossSiteIdpErrorResponse", IdTokenInvalidRequest: "IdTokenInvalidRequest", IdTokenInvalidContentType: "IdTokenInvalidContentType", ErrorIdToken: "ErrorIdToken", Canceled: "Canceled", RpPageNotVisible: "RpPageNotVisible", SilentMediationFailure: "SilentMediationFailure", NotSignedInWithIdp: "NotSignedInWithIdp", MissingTransientUserActivation: "MissingTransientUserActivation", ReplacedByActiveMode: "ReplacedByActiveMode", RelyingPartyOriginIsOpaque: "RelyingPartyOriginIsOpaque", TypeNotMatching: "TypeNotMatching", UiDismissedNoEmbargo: "UiDismissedNoEmbargo", CorsError: "CorsError", SuppressedBySegmentationPlatform: "SuppressedBySegmentationPlatform" });
110391
110414
  inspectorBackend.registerEnum("Audits.FederatedAuthUserInfoRequestIssueReason", { NotSameOrigin: "NotSameOrigin", NotIframe: "NotIframe", NotPotentiallyTrustworthy: "NotPotentiallyTrustworthy", NoAPIPermission: "NoApiPermission", NotSignedInWithIdp: "NotSignedInWithIdp", NoAccountSharingPermission: "NoAccountSharingPermission", InvalidConfigOrWellKnown: "InvalidConfigOrWellKnown", InvalidAccountsResponse: "InvalidAccountsResponse", NoReturningUserFromFetchedAccounts: "NoReturningUserFromFetchedAccounts" });
@@ -111050,8 +111073,8 @@ function registerCommands(inspectorBackend) {
111050
111073
  inspectorBackend.registerEnum("Network.DeviceBoundSessionWithUsageUsage", { NotInScope: "NotInScope", InScopeRefreshNotYetNeeded: "InScopeRefreshNotYetNeeded", InScopeRefreshNotAllowed: "InScopeRefreshNotAllowed", ProactiveRefreshNotPossible: "ProactiveRefreshNotPossible", ProactiveRefreshAttempted: "ProactiveRefreshAttempted", Deferred: "Deferred" });
111051
111074
  inspectorBackend.registerEnum("Network.DeviceBoundSessionUrlRuleRuleType", { Exclude: "Exclude", Include: "Include" });
111052
111075
  inspectorBackend.registerEnum("Network.DeviceBoundSessionFetchResult", { Success: "Success", KeyError: "KeyError", SigningError: "SigningError", ServerRequestedTermination: "ServerRequestedTermination", InvalidSessionId: "InvalidSessionId", InvalidChallenge: "InvalidChallenge", TooManyChallenges: "TooManyChallenges", InvalidFetcherUrl: "InvalidFetcherUrl", InvalidRefreshUrl: "InvalidRefreshUrl", TransientHttpError: "TransientHttpError", ScopeOriginSameSiteMismatch: "ScopeOriginSameSiteMismatch", RefreshUrlSameSiteMismatch: "RefreshUrlSameSiteMismatch", MismatchedSessionId: "MismatchedSessionId", MissingScope: "MissingScope", NoCredentials: "NoCredentials", SubdomainRegistrationWellKnownUnavailable: "SubdomainRegistrationWellKnownUnavailable", SubdomainRegistrationUnauthorized: "SubdomainRegistrationUnauthorized", SubdomainRegistrationWellKnownMalformed: "SubdomainRegistrationWellKnownMalformed", SessionProviderWellKnownUnavailable: "SessionProviderWellKnownUnavailable", RelyingPartyWellKnownUnavailable: "RelyingPartyWellKnownUnavailable", FederatedKeyThumbprintMismatch: "FederatedKeyThumbprintMismatch", InvalidFederatedSessionUrl: "InvalidFederatedSessionUrl", InvalidFederatedKey: "InvalidFederatedKey", TooManyRelyingOriginLabels: "TooManyRelyingOriginLabels", BoundCookieSetForbidden: "BoundCookieSetForbidden", NetError: "NetError", ProxyError: "ProxyError", EmptySessionConfig: "EmptySessionConfig", InvalidCredentialsConfig: "InvalidCredentialsConfig", InvalidCredentialsType: "InvalidCredentialsType", InvalidCredentialsEmptyName: "InvalidCredentialsEmptyName", InvalidCredentialsCookie: "InvalidCredentialsCookie", PersistentHttpError: "PersistentHttpError", RegistrationAttemptedChallenge: "RegistrationAttemptedChallenge", InvalidScopeOrigin: "InvalidScopeOrigin", ScopeOriginContainsPath: "ScopeOriginContainsPath", RefreshInitiatorNotString: "RefreshInitiatorNotString", RefreshInitiatorInvalidHostPattern: "RefreshInitiatorInvalidHostPattern", InvalidScopeSpecification: "InvalidScopeSpecification", MissingScopeSpecificationType: "MissingScopeSpecificationType", EmptyScopeSpecificationDomain: "EmptyScopeSpecificationDomain", EmptyScopeSpecificationPath: "EmptyScopeSpecificationPath", InvalidScopeSpecificationType: "InvalidScopeSpecificationType", InvalidScopeIncludeSite: "InvalidScopeIncludeSite", MissingScopeIncludeSite: "MissingScopeIncludeSite", FederatedNotAuthorizedByProvider: "FederatedNotAuthorizedByProvider", FederatedNotAuthorizedByRelyingParty: "FederatedNotAuthorizedByRelyingParty", SessionProviderWellKnownMalformed: "SessionProviderWellKnownMalformed", SessionProviderWellKnownHasProviderOrigin: "SessionProviderWellKnownHasProviderOrigin", RelyingPartyWellKnownMalformed: "RelyingPartyWellKnownMalformed", RelyingPartyWellKnownHasRelyingOrigins: "RelyingPartyWellKnownHasRelyingOrigins", InvalidFederatedSessionProviderSessionMissing: "InvalidFederatedSessionProviderSessionMissing", InvalidFederatedSessionWrongProviderOrigin: "InvalidFederatedSessionWrongProviderOrigin", InvalidCredentialsCookieCreationTime: "InvalidCredentialsCookieCreationTime", InvalidCredentialsCookieName: "InvalidCredentialsCookieName", InvalidCredentialsCookieParsing: "InvalidCredentialsCookieParsing", InvalidCredentialsCookieUnpermittedAttribute: "InvalidCredentialsCookieUnpermittedAttribute", InvalidCredentialsCookieInvalidDomain: "InvalidCredentialsCookieInvalidDomain", InvalidCredentialsCookiePrefix: "InvalidCredentialsCookiePrefix", InvalidScopeRulePath: "InvalidScopeRulePath", InvalidScopeRuleHostPattern: "InvalidScopeRuleHostPattern", ScopeRuleOriginScopedHostPatternMismatch: "ScopeRuleOriginScopedHostPatternMismatch", ScopeRuleSiteScopedHostPatternMismatch: "ScopeRuleSiteScopedHostPatternMismatch", SigningQuotaExceeded: "SigningQuotaExceeded", InvalidConfigJson: "InvalidConfigJson", InvalidFederatedSessionProviderFailedToRestoreKey: "InvalidFederatedSessionProviderFailedToRestoreKey", FailedToUnwrapKey: "FailedToUnwrapKey", SessionDeletedDuringRefresh: "SessionDeletedDuringRefresh" });
111053
- inspectorBackend.registerEnum("Network.RefreshEventDetailsRefreshResult", { Refreshed: "Refreshed", InitializedService: "InitializedService", Unreachable: "Unreachable", ServerError: "ServerError", RefreshQuotaExceeded: "RefreshQuotaExceeded", FatalError: "FatalError", SigningQuotaExceeded: "SigningQuotaExceeded" });
111054
- inspectorBackend.registerEnum("Network.TerminationEventDetailsDeletionReason", { Expired: "Expired", FailedToRestoreKey: "FailedToRestoreKey", FailedToUnwrapKey: "FailedToUnwrapKey", StoragePartitionCleared: "StoragePartitionCleared", ClearBrowsingData: "ClearBrowsingData", ServerRequested: "ServerRequested", InvalidSessionParams: "InvalidSessionParams", RefreshFatalError: "RefreshFatalError" });
111076
+ inspectorBackend.registerEnum("Network.RefreshEventDetailsRefreshResult", { Refreshed: "Refreshed", RefreshedAsWaiter: "RefreshedAsWaiter", InitializedService: "InitializedService", Unreachable: "Unreachable", ServerError: "ServerError", RefreshQuotaExceeded: "RefreshQuotaExceeded", FatalError: "FatalError", SigningQuotaExceeded: "SigningQuotaExceeded" });
111077
+ inspectorBackend.registerEnum("Network.TerminationEventDetailsDeletionReason", { Expired: "Expired", FailedToRestoreKey: "FailedToRestoreKey", FailedToUnwrapKey: "FailedToUnwrapKey", StoragePartitionCleared: "StoragePartitionCleared", ClearBrowsingData: "ClearBrowsingData", ServerRequested: "ServerRequested", InvalidSessionParams: "InvalidSessionParams", RefreshFatalError: "RefreshFatalError", DevTools: "DevTools" });
111055
111078
  inspectorBackend.registerEnum("Network.ChallengeEventDetailsChallengeResult", { Success: "Success", NoSessionId: "NoSessionId", NoSessionMatch: "NoSessionMatch", CantSetBoundCookie: "CantSetBoundCookie" });
111056
111079
  inspectorBackend.registerEvent("Network.dataReceived", ["requestId", "timestamp", "dataLength", "encodedDataLength", "data"]);
111057
111080
  inspectorBackend.registerEvent("Network.eventSourceMessageReceived", ["requestId", "timestamp", "eventName", "eventId", "data"]);
@@ -111135,6 +111158,7 @@ function registerCommands(inspectorBackend) {
111135
111158
  inspectorBackend.registerCommand("Network.getSecurityIsolationStatus", [{ "name": "frameId", "type": "string", "optional": true, "description": "If no frameId is provided, the status of the target is provided.", "typeRef": "Page.FrameId" }], ["status"], "Returns information about the COEP/COOP isolation status.");
111136
111159
  inspectorBackend.registerCommand("Network.enableReportingApi", [{ "name": "enable", "type": "boolean", "optional": false, "description": "Whether to enable or disable events for the Reporting API", "typeRef": null }], [], "Enables tracking for the Reporting API, events generated by the Reporting API will now be delivered to the client. Enabling triggers 'reportingApiReportAdded' for all existing reports.");
111137
111160
  inspectorBackend.registerCommand("Network.enableDeviceBoundSessions", [{ "name": "enable", "type": "boolean", "optional": false, "description": "Whether to enable or disable events.", "typeRef": null }], [], "Sets up tracking device bound sessions and fetching of initial set of sessions.");
111161
+ inspectorBackend.registerCommand("Network.deleteDeviceBoundSession", [{ "name": "key", "type": "object", "optional": false, "description": "", "typeRef": "Network.DeviceBoundSessionKey" }], [], "Deletes a device bound session.");
111138
111162
  inspectorBackend.registerCommand("Network.fetchSchemefulSite", [{ "name": "origin", "type": "string", "optional": false, "description": "The URL origin.", "typeRef": null }], ["schemefulSite"], "Fetches the schemeful site for a specific origin.");
111139
111163
  inspectorBackend.registerCommand("Network.loadNetworkResource", [{ "name": "frameId", "type": "string", "optional": true, "description": "Frame id to get the resource for. Mandatory for frame targets, and should be omitted for worker targets.", "typeRef": "Page.FrameId" }, { "name": "url", "type": "string", "optional": false, "description": "URL of the resource to get content for.", "typeRef": null }, { "name": "options", "type": "object", "optional": false, "description": "Options for the request.", "typeRef": "Network.LoadNetworkResourceOptions" }], ["resource"], "Fetches the resource and returns the content.");
111140
111164
  inspectorBackend.registerCommand("Network.setCookieControls", [{ "name": "enableThirdPartyCookieRestriction", "type": "boolean", "optional": false, "description": "Whether 3pc restriction is enabled.", "typeRef": null }], [], "Sets Controls for third-party cookie access Page reload is required before the new cookie behavior will be observed");
@@ -111626,7 +111650,7 @@ function registerCommands(inspectorBackend) {
111626
111650
  inspectorBackend.registerCommand("Target.setRemoteLocations", [{ "name": "locations", "type": "array", "optional": false, "description": "List of remote locations.", "typeRef": "Target.RemoteLocation" }], [], "Enables target discovery for the specified locations, when `setDiscoverTargets` was set to `true`.");
111627
111651
  inspectorBackend.registerCommand("Target.getDevToolsTarget", [{ "name": "targetId", "type": "string", "optional": false, "description": "Page or tab target ID.", "typeRef": "Target.TargetID" }], ["targetId"], "Gets the targetId of the DevTools page target opened for the given target (if any).");
111628
111652
  inspectorBackend.registerCommand("Target.openDevTools", [{ "name": "targetId", "type": "string", "optional": false, "description": "This can be the page or tab target ID.", "typeRef": "Target.TargetID" }, { "name": "panelId", "type": "string", "optional": true, "description": "The id of the panel we want DevTools to open initially. Currently supported panels are elements, console, network, sources, resources and performance.", "typeRef": null }], ["targetId"], "Opens a DevTools window for the target.");
111629
- inspectorBackend.registerType("Target.TargetInfo", [{ "name": "targetId", "type": "string", "optional": false, "description": "", "typeRef": "Target.TargetID" }, { "name": "type", "type": "string", "optional": false, "description": "List of types: https://source.chromium.org/chromium/chromium/src/+/main:content/browser/devtools/devtools_agent_host_impl.cc?ss=chromium&q=f:devtools%20-f:out%20%22::kTypeTab%5B%5D%22", "typeRef": null }, { "name": "title", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "url", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "attached", "type": "boolean", "optional": false, "description": "Whether the target has an attached client.", "typeRef": null }, { "name": "openerId", "type": "string", "optional": true, "description": "Opener target Id", "typeRef": "Target.TargetID" }, { "name": "canAccessOpener", "type": "boolean", "optional": false, "description": "Whether the target has access to the originating window.", "typeRef": null }, { "name": "openerFrameId", "type": "string", "optional": true, "description": "Frame id of originating window (is only set if target has an opener).", "typeRef": "Page.FrameId" }, { "name": "parentFrameId", "type": "string", "optional": true, "description": "Id of the parent frame, only present for the \\\"iframe\\\" targets.", "typeRef": "Page.FrameId" }, { "name": "browserContextId", "type": "string", "optional": true, "description": "", "typeRef": "Browser.BrowserContextID" }, { "name": "subtype", "type": "string", "optional": true, "description": "Provides additional details for specific target types. For example, for the type of \\\"page\\\", this may be set to \\\"prerender\\\".", "typeRef": null }]);
111653
+ inspectorBackend.registerType("Target.TargetInfo", [{ "name": "targetId", "type": "string", "optional": false, "description": "", "typeRef": "Target.TargetID" }, { "name": "type", "type": "string", "optional": false, "description": "List of types: https://source.chromium.org/chromium/chromium/src/+/main:content/browser/devtools/devtools_agent_host_impl.cc?ss=chromium&q=f:devtools%20-f:out%20%22::kTypeTab%5B%5D%22", "typeRef": null }, { "name": "title", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "url", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "attached", "type": "boolean", "optional": false, "description": "Whether the target has an attached client.", "typeRef": null }, { "name": "parentId", "type": "string", "optional": true, "description": "Id of the parent target, if any. For example, \\\"iframe\\\" target may have a \\\"page\\\" parent.", "typeRef": "Target.TargetID" }, { "name": "openerId", "type": "string", "optional": true, "description": "Opener target Id", "typeRef": "Target.TargetID" }, { "name": "canAccessOpener", "type": "boolean", "optional": false, "description": "Whether the target has access to the originating window.", "typeRef": null }, { "name": "openerFrameId", "type": "string", "optional": true, "description": "Frame id of originating window (is only set if target has an opener).", "typeRef": "Page.FrameId" }, { "name": "parentFrameId", "type": "string", "optional": true, "description": "Id of the parent frame, present for \\\"iframe\\\" and \\\"worker\\\" targets. For nested workers, this is the \\\"ancestor\\\" frame that created the first worker in the nested chain.", "typeRef": "Page.FrameId" }, { "name": "browserContextId", "type": "string", "optional": true, "description": "", "typeRef": "Browser.BrowserContextID" }, { "name": "subtype", "type": "string", "optional": true, "description": "Provides additional details for specific target types. For example, for the type of \\\"page\\\", this may be set to \\\"prerender\\\".", "typeRef": null }]);
111630
111654
  inspectorBackend.registerType("Target.FilterEntry", [{ "name": "exclude", "type": "boolean", "optional": true, "description": "If set, causes exclusion of matching targets from the list.", "typeRef": null }, { "name": "type", "type": "string", "optional": true, "description": "If not present, matches any type.", "typeRef": null }]);
111631
111655
  inspectorBackend.registerType("Target.TargetFilter", [{ "name": "TargetFilter", "type": "array", "optional": false, "description": "The entries in TargetFilter are matched sequentially against targets and the first entry that matches determines if the target is included or not, depending on the value of `exclude` field in the entry. If filter is not specified, the one assumed is [{type: \\\"browser\\\", exclude: true}, {type: \\\"tab\\\", exclude: true}, {}] (i.e. include everything but `browser` and `tab`).", "typeRef": "Target.FilterEntry" }]);
111632
111656
  inspectorBackend.registerType("Target.RemoteLocation", [{ "name": "host", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "port", "type": "number", "optional": false, "description": "", "typeRef": null }]);
@@ -111697,15 +111721,18 @@ function registerCommands(inspectorBackend) {
111697
111721
  inspectorBackend.registerCommand("WebAuthn.setCredentialProperties", [{ "name": "authenticatorId", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorId" }, { "name": "credentialId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "backupEligibility", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "backupState", "type": "boolean", "optional": true, "description": "", "typeRef": null }], [], "Allows setting credential properties. https://w3c.github.io/webauthn/#sctn-automation-set-credential-properties");
111698
111722
  inspectorBackend.registerType("WebAuthn.VirtualAuthenticatorOptions", [{ "name": "protocol", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorProtocol" }, { "name": "ctap2Version", "type": "string", "optional": true, "description": "Defaults to ctap2_0. Ignored if |protocol| == u2f.", "typeRef": "WebAuthn.Ctap2Version" }, { "name": "transport", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorTransport" }, { "name": "hasResidentKey", "type": "boolean", "optional": true, "description": "Defaults to false.", "typeRef": null }, { "name": "hasUserVerification", "type": "boolean", "optional": true, "description": "Defaults to false.", "typeRef": null }, { "name": "hasLargeBlob", "type": "boolean", "optional": true, "description": "If set to true, the authenticator will support the largeBlob extension. https://w3c.github.io/webauthn#largeBlob Defaults to false.", "typeRef": null }, { "name": "hasCredBlob", "type": "boolean", "optional": true, "description": "If set to true, the authenticator will support the credBlob extension. https://fidoalliance.org/specs/fido-v2.1-rd-20201208/fido-client-to-authenticator-protocol-v2.1-rd-20201208.html#sctn-credBlob-extension Defaults to false.", "typeRef": null }, { "name": "hasMinPinLength", "type": "boolean", "optional": true, "description": "If set to true, the authenticator will support the minPinLength extension. https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html#sctn-minpinlength-extension Defaults to false.", "typeRef": null }, { "name": "hasPrf", "type": "boolean", "optional": true, "description": "If set to true, the authenticator will support the prf extension. https://w3c.github.io/webauthn/#prf-extension Defaults to false.", "typeRef": null }, { "name": "hasHmacSecret", "type": "boolean", "optional": true, "description": "If set to true, the authenticator will support the hmac-secret extension. https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html#sctn-hmac-secret-extension Defaults to false.", "typeRef": null }, { "name": "hasHmacSecretMc", "type": "boolean", "optional": true, "description": "If set to true, the authenticator will support the hmac-secret-mc extension. https://fidoalliance.org/specs/fido-v2.2-rd-20241003/fido-client-to-authenticator-protocol-v2.2-rd-20241003.html#sctn-hmac-secret-make-cred-extension Defaults to false.", "typeRef": null }, { "name": "automaticPresenceSimulation", "type": "boolean", "optional": true, "description": "If set to true, tests of user presence will succeed immediately. Otherwise, they will not be resolved. Defaults to true.", "typeRef": null }, { "name": "isUserVerified", "type": "boolean", "optional": true, "description": "Sets whether User Verification succeeds or fails for an authenticator. Defaults to false.", "typeRef": null }, { "name": "defaultBackupEligibility", "type": "boolean", "optional": true, "description": "Credentials created by this authenticator will have the backup eligibility (BE) flag set to this value. Defaults to false. https://w3c.github.io/webauthn/#sctn-credential-backup", "typeRef": null }, { "name": "defaultBackupState", "type": "boolean", "optional": true, "description": "Credentials created by this authenticator will have the backup state (BS) flag set to this value. Defaults to false. https://w3c.github.io/webauthn/#sctn-credential-backup", "typeRef": null }]);
111699
111723
  inspectorBackend.registerType("WebAuthn.Credential", [{ "name": "credentialId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "isResidentCredential", "type": "boolean", "optional": false, "description": "", "typeRef": null }, { "name": "rpId", "type": "string", "optional": true, "description": "Relying Party ID the credential is scoped to. Must be set when adding a credential.", "typeRef": null }, { "name": "privateKey", "type": "string", "optional": false, "description": "The ECDSA P-256 private key in PKCS#8 format.", "typeRef": null }, { "name": "userHandle", "type": "string", "optional": true, "description": "An opaque byte sequence with a maximum size of 64 bytes mapping the credential to a specific user.", "typeRef": null }, { "name": "signCount", "type": "number", "optional": false, "description": "Signature counter. This is incremented by one for each successful assertion. See https://w3c.github.io/webauthn/#signature-counter", "typeRef": null }, { "name": "largeBlob", "type": "string", "optional": true, "description": "The large blob associated with the credential. See https://w3c.github.io/webauthn/#sctn-large-blob-extension", "typeRef": null }, { "name": "backupEligibility", "type": "boolean", "optional": true, "description": "Assertions returned by this credential will have the backup eligibility (BE) flag set to this value. Defaults to the authenticator's defaultBackupEligibility value.", "typeRef": null }, { "name": "backupState", "type": "boolean", "optional": true, "description": "Assertions returned by this credential will have the backup state (BS) flag set to this value. Defaults to the authenticator's defaultBackupState value.", "typeRef": null }, { "name": "userName", "type": "string", "optional": true, "description": "The credential's user.name property. Equivalent to empty if not set. https://w3c.github.io/webauthn/#dom-publickeycredentialentity-name", "typeRef": null }, { "name": "userDisplayName", "type": "string", "optional": true, "description": "The credential's user.displayName property. Equivalent to empty if not set. https://w3c.github.io/webauthn/#dom-publickeycredentialuserentity-displayname", "typeRef": null }]);
111700
- inspectorBackend.registerEnum("WebMCP.InvocationStatus", { Success: "Success", Canceled: "Canceled", Error: "Error" });
111724
+ inspectorBackend.registerEnum("WebMCP.InvocationStatus", { Completed: "Completed", Canceled: "Canceled", Error: "Error" });
111701
111725
  inspectorBackend.registerEvent("WebMCP.toolsAdded", ["tools"]);
111702
111726
  inspectorBackend.registerEvent("WebMCP.toolsRemoved", ["tools"]);
111703
111727
  inspectorBackend.registerEvent("WebMCP.toolInvoked", ["toolName", "frameId", "invocationId", "input"]);
111704
111728
  inspectorBackend.registerEvent("WebMCP.toolResponded", ["invocationId", "status", "output", "errorText", "exception"]);
111705
111729
  inspectorBackend.registerCommand("WebMCP.enable", [], [], "Enables the WebMCP domain, allowing events to be sent. Enabling the domain will trigger a toolsAdded event for all currently registered tools.");
111706
111730
  inspectorBackend.registerCommand("WebMCP.disable", [], [], "Disables the WebMCP domain.");
111731
+ inspectorBackend.registerCommand("WebMCP.invokeTool", [{ "name": "frameId", "type": "string", "optional": false, "description": "Frame in which to invoke the tool.", "typeRef": "Page.FrameId" }, { "name": "toolName", "type": "string", "optional": false, "description": "Name of the tool to invoke.", "typeRef": null }, { "name": "input", "type": "object", "optional": false, "description": "Input parameters for the tool, matching the tool's inputSchema.", "typeRef": null }], ["invocationId"], "Invokes a registered tool.");
111732
+ inspectorBackend.registerCommand("WebMCP.cancelInvocation", [{ "name": "invocationId", "type": "string", "optional": false, "description": "Invocation identifier to cancel.", "typeRef": null }], [], "Cancels a pending tool invocation.");
111707
111733
  inspectorBackend.registerType("WebMCP.Annotation", [{ "name": "readOnly", "type": "boolean", "optional": true, "description": "A hint indicating that the tool does not modify any state.", "typeRef": null }, { "name": "autosubmit", "type": "boolean", "optional": true, "description": "If the declarative tool was declared with the autosubmit attribute.", "typeRef": null }]);
111708
111734
  inspectorBackend.registerType("WebMCP.Tool", [{ "name": "name", "type": "string", "optional": false, "description": "Tool name.", "typeRef": null }, { "name": "description", "type": "string", "optional": false, "description": "Tool description.", "typeRef": null }, { "name": "inputSchema", "type": "object", "optional": true, "description": "Schema for the tool's input parameters.", "typeRef": null }, { "name": "annotations", "type": "object", "optional": true, "description": "Optional annotations for the tool.", "typeRef": "WebMCP.Annotation" }, { "name": "frameId", "type": "string", "optional": false, "description": "Frame identifier associated with the tool registration.", "typeRef": "Page.FrameId" }, { "name": "backendNodeId", "type": "number", "optional": true, "description": "Optional node ID for declarative tools.", "typeRef": "DOM.BackendNodeId" }, { "name": "stackTrace", "type": "object", "optional": true, "description": "The stack trace at the time of the registration.", "typeRef": "Runtime.StackTrace" }]);
111735
+ inspectorBackend.registerType("WebMCP.RemovedTool", [{ "name": "name", "type": "string", "optional": false, "description": "Tool name.", "typeRef": null }, { "name": "frameId", "type": "string", "optional": false, "description": "Frame identifier associated with the tool registration.", "typeRef": "Page.FrameId" }]);
111709
111736
  inspectorBackend.registerEnum("Debugger.ScopeType", { Global: "global", Local: "local", With: "with", Closure: "closure", Catch: "catch", Block: "block", Script: "script", Eval: "eval", Module: "module", WasmExpressionStack: "wasm-expression-stack" });
111710
111737
  inspectorBackend.registerEnum("Debugger.BreakLocationType", { DebuggerStatement: "debuggerStatement", Call: "call", Return: "return" });
111711
111738
  inspectorBackend.registerEnum("Debugger.ScriptLanguage", { JavaScript: "JavaScript", WebAssembly: "WebAssembly" });
@@ -113248,14 +113275,57 @@ class RemoteFunction {
113248
113275
  return functionDetails;
113249
113276
  }
113250
113277
  }
113278
+ class RemoteError {
113279
+ #object;
113280
+ #exceptionDetails;
113281
+ #cause;
113282
+ constructor(object) {
113283
+ this.#object = object;
113284
+ }
113285
+ static objectAsError(object) {
113286
+ if (object.subtype !== 'error') {
113287
+ throw new Error(`Object of type ${object.subtype} is not an error`);
113288
+ }
113289
+ return new RemoteError(object);
113290
+ }
113291
+ get errorStack() {
113292
+ return this.#object.description ?? '';
113293
+ }
113294
+ exceptionDetails() {
113295
+ if (!this.#exceptionDetails) {
113296
+ this.#exceptionDetails = this.#lookupExceptionDetails();
113297
+ }
113298
+ return this.#exceptionDetails;
113299
+ }
113300
+ #lookupExceptionDetails() {
113301
+ if (this.#object.objectId) {
113302
+ return this.#object.runtimeModel().getExceptionDetails(this.#object.objectId);
113303
+ }
113304
+ return Promise.resolve(undefined);
113305
+ }
113306
+ cause() {
113307
+ if (!this.#cause) {
113308
+ this.#cause = this.#lookupCause();
113309
+ }
113310
+ return this.#cause;
113311
+ }
113312
+ async #lookupCause() {
113313
+ const allProperties = await this.#object.getAllProperties(false , false );
113314
+ const cause = allProperties.properties?.find(prop => prop.name === 'cause');
113315
+ return cause?.value;
113316
+ }
113317
+ }
113251
113318
  const descriptionLengthParenRegex = /\(([0-9]+)\)/;
113252
113319
  const descriptionLengthSquareRegex = /\[([0-9]+)\]/;
113253
113320
 
113321
+ const cssStreamParser = () => Promise.resolve({ startState: () => ({}) });
113322
+ class StringStream { constructor() {} }
113323
+
113254
113324
  // Copyright 2022 The Chromium Authors
113255
113325
  function createCssTokenizer() {
113256
113326
  async function tokenize(line, callback) {
113257
- const streamParser = await undefined();
113258
- const stream = new undefined(line, 4, 2);
113327
+ const streamParser = await cssStreamParser();
113328
+ const stream = new StringStream(line, 4, 2);
113259
113329
  const state = streamParser.startState(2);
113260
113330
  let lastPos = stream.pos;
113261
113331
  while (!stream.eol()) {
@@ -113601,12 +113671,17 @@ class Text {
113601
113671
  }
113602
113672
 
113603
113673
  // Copyright 2023 The Chromium Authors
113674
+ const objectUrlRegistry = new FinalizationRegistry(url => {
113675
+ URL.revokeObjectURL(url);
113676
+ });
113677
+ const MAX_BLOB_SIZE_BYTES = 10 * 1024 * 1024;
113604
113678
  class ContentData {
113605
113679
  mimeType;
113606
113680
  charset;
113607
113681
  #contentAsBase64;
113608
113682
  #contentAsText;
113609
113683
  #contentAsTextObj;
113684
+ #imagePreviewUrl;
113610
113685
  constructor(data, isBase64, mimeType, charset) {
113611
113686
  this.charset = charset || 'utf-8';
113612
113687
  if (isBase64) {
@@ -113633,12 +113708,7 @@ class ContentData {
113633
113708
  if (!this.isTextContent) {
113634
113709
  throw new Error('Cannot interpret binary data as text');
113635
113710
  }
113636
- const binaryString = window.atob(this.#contentAsBase64);
113637
- const len = binaryString.length;
113638
- const bytes = new Uint8Array(len);
113639
- for (let i = 0; i < len; i++) {
113640
- bytes[i] = binaryString.charCodeAt(i);
113641
- }
113711
+ const bytes = decode$1(this.#contentAsBase64);
113642
113712
  this.#contentAsText = new TextDecoder(this.charset).decode(bytes);
113643
113713
  return this.#contentAsText;
113644
113714
  }
@@ -113679,6 +113749,37 @@ class ContentData {
113679
113749
  }
113680
113750
  return contentAsDataURL(this.text, this.mimeType ?? '', false, 'utf-8');
113681
113751
  }
113752
+ asBlob() {
113753
+ if (this.#contentAsBase64 !== undefined) {
113754
+ if (this.#contentAsBase64.length * 0.75 > MAX_BLOB_SIZE_BYTES) {
113755
+ return null;
113756
+ }
113757
+ const bytes = decode$1(this.#contentAsBase64);
113758
+ return new Blob([bytes], { type: this.mimeType });
113759
+ }
113760
+ const text = this.#contentAsText ?? '';
113761
+ if (text.length > MAX_BLOB_SIZE_BYTES) {
113762
+ return null;
113763
+ }
113764
+ return new Blob([text], { type: this.mimeType });
113765
+ }
113766
+ asImagePreviewUrl() {
113767
+ if (this.#imagePreviewUrl) {
113768
+ return this.#imagePreviewUrl;
113769
+ }
113770
+ const url = this.asDataUrl();
113771
+ if (url !== null) {
113772
+ this.#imagePreviewUrl = url;
113773
+ return this.#imagePreviewUrl;
113774
+ }
113775
+ const blob = this.asBlob();
113776
+ if (blob === null) {
113777
+ return null;
113778
+ }
113779
+ this.#imagePreviewUrl = URL.createObjectURL(blob);
113780
+ objectUrlRegistry.register(this, this.#imagePreviewUrl);
113781
+ return this.#imagePreviewUrl;
113782
+ }
113682
113783
  asDeferedContent() {
113683
113784
  if (this.isTextContent) {
113684
113785
  return { content: this.text, isEncoded: false };
@@ -114859,9 +114960,7 @@ var DevtoolsExperiments;
114859
114960
  DevtoolsExperiments[DevtoolsExperiments["capture-node-creation-stacks"] = 1] = "capture-node-creation-stacks";
114860
114961
  DevtoolsExperiments[DevtoolsExperiments["live-heap-profile"] = 11] = "live-heap-profile";
114861
114962
  DevtoolsExperiments[DevtoolsExperiments["protocol-monitor"] = 13] = "protocol-monitor";
114862
- DevtoolsExperiments[DevtoolsExperiments["sampling-heap-profiler-timeline"] = 17] = "sampling-heap-profiler-timeline";
114863
114963
  DevtoolsExperiments[DevtoolsExperiments["timeline-invalidation-tracking"] = 26] = "timeline-invalidation-tracking";
114864
- DevtoolsExperiments[DevtoolsExperiments["apca"] = 39] = "apca";
114865
114964
  DevtoolsExperiments[DevtoolsExperiments["font-editor"] = 41] = "font-editor";
114866
114965
  DevtoolsExperiments[DevtoolsExperiments["instrumentation-breakpoints"] = 61] = "instrumentation-breakpoints";
114867
114966
  DevtoolsExperiments[DevtoolsExperiments["use-source-map-scopes"] = 76] = "use-source-map-scopes";
@@ -115600,6 +115699,7 @@ const generatedProperties = [
115600
115699
  "flex-basis",
115601
115700
  "flex-direction",
115602
115701
  "flex-grow",
115702
+ "flex-line-count",
115603
115703
  "flex-shrink",
115604
115704
  "flex-wrap",
115605
115705
  "float",
@@ -115861,6 +115961,7 @@ const generatedProperties = [
115861
115961
  "text-decoration-color",
115862
115962
  "text-decoration-line",
115863
115963
  "text-decoration-skip-ink",
115964
+ "text-decoration-skip-spaces",
115864
115965
  "text-decoration-style",
115865
115966
  "text-decoration-thickness",
115866
115967
  "text-emphasis-color",
@@ -117438,6 +117539,9 @@ const generatedProperties = [
117438
117539
  {
117439
117540
  "name": "flex-grow"
117440
117541
  },
117542
+ {
117543
+ "name": "flex-line-count"
117544
+ },
117441
117545
  {
117442
117546
  "name": "flex-shrink"
117443
117547
  },
@@ -119655,6 +119759,16 @@ const generatedProperties = [
119655
119759
  ],
119656
119760
  "name": "text-decoration-skip-ink"
119657
119761
  },
119762
+ {
119763
+ "inherited": true,
119764
+ "keywords": [
119765
+ "none",
119766
+ "start",
119767
+ "end",
119768
+ "all"
119769
+ ],
119770
+ "name": "text-decoration-skip-spaces"
119771
+ },
119658
119772
  {
119659
119773
  "keywords": [
119660
119774
  "solid",
@@ -122263,6 +122377,14 @@ const generatedPropertyValues = {
122263
122377
  "all"
122264
122378
  ]
122265
122379
  },
122380
+ "text-decoration-skip-spaces": {
122381
+ "values": [
122382
+ "none",
122383
+ "start",
122384
+ "end",
122385
+ "all"
122386
+ ]
122387
+ },
122266
122388
  "text-decoration-style": {
122267
122389
  "values": [
122268
122390
  "solid",
@@ -125218,8 +125340,8 @@ class LinkableNameMatcher extends matcherBase(LinkableNameMatch) {
125218
125340
  if (!currentDeclarationNodes) {
125219
125341
  return null;
125220
125342
  }
125221
- const computedText = matching.getComputedTextRange(currentDeclarationNodes[0], node);
125222
- const tokenized = tokenizeDeclaration('--p', computedText);
125343
+ matching.getComputedTextRange(currentDeclarationNodes[0], node);
125344
+ const tokenized = tokenizeDeclaration();
125223
125345
  if (!tokenized) {
125224
125346
  return null;
125225
125347
  }
@@ -125785,41 +125907,6 @@ class EnvFunctionMatcher extends matcherBase(EnvFunctionMatch) {
125785
125907
  function stripComments(value) {
125786
125908
  return value.replaceAll(/(\/\*(?:.|\s)*?\*\/)/g, '');
125787
125909
  }
125788
- function nodeText(node, text) {
125789
- return nodeTextRange(node, node, text);
125790
- }
125791
- function nodeTextRange(from, to, text) {
125792
- return text.substring(from.from, to.to);
125793
- }
125794
- class SyntaxTree {
125795
- propertyValue;
125796
- rule;
125797
- tree;
125798
- trailingNodes;
125799
- propertyName;
125800
- constructor(propertyValue, rule, tree, propertyName, trailingNodes = []) {
125801
- this.propertyName = propertyName;
125802
- this.propertyValue = propertyValue;
125803
- this.rule = rule;
125804
- this.tree = tree;
125805
- this.trailingNodes = trailingNodes;
125806
- }
125807
- text(node) {
125808
- if (node === null) {
125809
- return '';
125810
- }
125811
- return nodeText(node ?? this.tree, this.rule);
125812
- }
125813
- textRange(from, to) {
125814
- if (!from || !to) {
125815
- return '';
125816
- }
125817
- return nodeTextRange(from, to, this.rule);
125818
- }
125819
- subtree(node) {
125820
- return new SyntaxTree(this.propertyValue, this.rule, node);
125821
- }
125822
- }
125823
125910
  class TreeWalker {
125824
125911
  ast;
125825
125912
  constructor(ast) {
@@ -126100,7 +126187,7 @@ class ComputedText {
126100
126187
  #countTopLevelValuesInStringPiece(piece) {
126101
126188
  let count = this.#topLevelValueCounts.get(piece);
126102
126189
  if (count === undefined) {
126103
- count = ASTUtils.siblings(ASTUtils.declValue(tokenizeDeclaration('--p', piece)?.tree ?? null)).length;
126190
+ count = ASTUtils.siblings(ASTUtils.declValue(tokenizeDeclaration()?.tree ?? null)).length;
126104
126191
  this.#topLevelValueCounts.set(piece, count);
126105
126192
  }
126106
126193
  return count;
@@ -126190,53 +126277,22 @@ var ASTUtils;
126190
126277
  }
126191
126278
  ASTUtils.equals = equals;
126192
126279
  })(ASTUtils || (ASTUtils = {}));
126193
- function declaration(rule) {
126194
- const cssParser = undefined.cssLanguage.parser;
126195
- return cssParser.parse(rule).topNode.getChild('RuleSet')?.getChild('Block')?.getChild('Declaration') ?? null;
126196
- }
126197
126280
  function tokenizeDeclaration(propertyName, propertyValue) {
126198
- const name = tokenizePropertyName(propertyName);
126281
+ const name = tokenizePropertyName();
126199
126282
  if (!name) {
126200
126283
  return null;
126201
126284
  }
126202
- const rule = `*{${name}: ${propertyValue};}`;
126203
- const decl = declaration(rule);
126204
- if (!decl || decl.type.isError) {
126205
- return null;
126206
- }
126207
- const childNodes = ASTUtils.children(decl);
126208
- if (childNodes.length < 2) {
126209
- return null;
126210
- }
126211
- const [varName, colon, tree] = childNodes;
126212
- if (!varName || varName.type.isError || !colon || colon.type.isError || tree?.type.isError) {
126213
- return null;
126214
- }
126215
- const trailingNodes = ASTUtils.siblings(decl).slice(1);
126216
- const [semicolon, brace] = trailingNodes.splice(trailingNodes.length - 2, 2);
126217
- if (semicolon?.name !== ';' && brace?.name !== '}') {
126218
- return null;
126219
- }
126220
- const ast = new SyntaxTree(propertyValue, rule, decl, name, trailingNodes);
126221
- if (ast.text(varName) !== name || colon.name !== ':') {
126285
+ {
126222
126286
  return null;
126223
126287
  }
126224
- return ast;
126225
126288
  }
126226
126289
  function tokenizePropertyName(name) {
126227
- const rule = `*{${name}: inherit;}`;
126228
- const decl = declaration(rule);
126229
- if (!decl || decl.type.isError) {
126230
- return null;
126231
- }
126232
- const propertyName = decl.getChild('PropertyName') ?? decl.getChild('VariableName');
126233
- if (!propertyName) {
126290
+ {
126234
126291
  return null;
126235
126292
  }
126236
- return nodeText(propertyName, rule);
126237
126293
  }
126238
126294
  function matchDeclaration(name, value, matchers) {
126239
- const ast = tokenizeDeclaration(name, value);
126295
+ const ast = tokenizeDeclaration();
126240
126296
  const matchedResult = ast && BottomUpTreeMatching.walk(ast, matchers);
126241
126297
  ast?.trailingNodes.forEach(n => matchedResult?.matchText(n));
126242
126298
  return matchedResult;
@@ -128587,7 +128643,7 @@ class DOMInheritanceCascade {
128587
128643
  if (rawValue === null) {
128588
128644
  return null;
128589
128645
  }
128590
- const ast = tokenizeDeclaration('--property', rawValue);
128646
+ const ast = tokenizeDeclaration();
128591
128647
  if (!ast) {
128592
128648
  return null;
128593
128649
  }
@@ -131211,16 +131267,8 @@ class NetworkRequest extends ObjectWrapper {
131211
131267
  if (ContentData.isError(contentData)) {
131212
131268
  return;
131213
131269
  }
131214
- let imageSrc = contentData.asDataUrl();
131215
- if (imageSrc === null && !this.#failed) {
131216
- const cacheControl = this.responseHeaderValue('cache-control') || '';
131217
- if (!cacheControl.includes('no-cache')) {
131218
- imageSrc = this.#url;
131219
- }
131220
- }
131221
- if (imageSrc !== null) {
131222
- image.src = imageSrc;
131223
- }
131270
+ const imageSrc = contentData.asImagePreviewUrl();
131271
+ image.src = imageSrc ?? '';
131224
131272
  }
131225
131273
  initiator() {
131226
131274
  return this.#initiator || null;
@@ -132191,6 +132239,9 @@ class NetworkManager extends SDKModel {
132191
132239
  async enableDeviceBoundSessions(enable = true) {
132192
132240
  return await this.#networkAgent.invoke_enableDeviceBoundSessions({ enable });
132193
132241
  }
132242
+ async deleteDeviceBoundSession(key) {
132243
+ return await this.#networkAgent.invoke_deleteDeviceBoundSession({ key });
132244
+ }
132194
132245
  async loadNetworkResource(frameId, url, options) {
132195
132246
  const result = await this.#networkAgent.invoke_loadNetworkResource({ frameId: frameId ?? undefined, url, options });
132196
132247
  if (result.getError()) {
@@ -138205,8 +138256,7 @@ class OverlayModel extends SDKModel {
138205
138256
  gridHighlightConfig: {},
138206
138257
  flexContainerHighlightConfig: {},
138207
138258
  flexItemHighlightConfig: {},
138208
- contrastAlgorithm: experiments.isEnabled(ExperimentName.APCA) ?
138209
- "apca" :
138259
+ contrastAlgorithm: settings.moduleSetting('apca').get() ? "apca" :
138210
138260
  "aa" ,
138211
138261
  };
138212
138262
  if (mode === 'all' || mode === 'content') {
@@ -141212,7 +141262,8 @@ class Resource {
141212
141262
  if (ContentData.isError(contentData)) {
141213
141263
  return;
141214
141264
  }
141215
- image.src = contentData.asDataUrl() ?? this.#url;
141265
+ const imageSrc = contentData.asImagePreviewUrl();
141266
+ image.src = imageSrc ?? '';
141216
141267
  }
141217
141268
  async innerRequestContent() {
141218
141269
  if (this.request) {
@@ -148149,6 +148200,163 @@ class WebAuthnDispatcher {
148149
148200
  }
148150
148201
  SDKModel.register(WebAuthnModel, { capabilities: 65536 , autostart: false });
148151
148202
 
148203
+ // Copyright 2026 The Chromium Authors
148204
+ const CALL_FRAME_REGEX = /^\s*at\s+/;
148205
+ function parseRawFramesFromErrorStack(stack) {
148206
+ const lines = stack.split('\n');
148207
+ const firstAtLineIndex = findFramesStartLine(lines);
148208
+ const rawFrames = [];
148209
+ if (firstAtLineIndex === -1) {
148210
+ return rawFrames;
148211
+ }
148212
+ for (let i = firstAtLineIndex; i < lines.length; ++i) {
148213
+ const line = lines[i];
148214
+ const match = CALL_FRAME_REGEX.exec(line);
148215
+ if (!match) {
148216
+ if (line.trim() === '') {
148217
+ continue;
148218
+ }
148219
+ return null;
148220
+ }
148221
+ let lineContent = line.substring(match[0].length);
148222
+ let isAsync = false;
148223
+ if (lineContent.startsWith('async ')) {
148224
+ isAsync = true;
148225
+ lineContent = lineContent.substring(6);
148226
+ }
148227
+ let isConstructor = false;
148228
+ if (lineContent.startsWith('new ')) {
148229
+ isConstructor = true;
148230
+ lineContent = lineContent.substring(4);
148231
+ }
148232
+ let functionName = '';
148233
+ let url = '';
148234
+ let lineNumber = -1;
148235
+ let columnNumber = -1;
148236
+ let typeName;
148237
+ let methodName;
148238
+ let isEval = false;
148239
+ let isWasm = false;
148240
+ let wasmModuleName;
148241
+ let wasmFunctionIndex;
148242
+ let promiseIndex;
148243
+ let evalOrigin;
148244
+ const openParenIndex = lineContent.indexOf(' (');
148245
+ if (lineContent.endsWith(')') && openParenIndex !== -1) {
148246
+ functionName = lineContent.substring(0, openParenIndex).trim();
148247
+ let location = lineContent.substring(openParenIndex + 2, lineContent.length - 1);
148248
+ if (location.startsWith('eval at ')) {
148249
+ isEval = true;
148250
+ const commaIndex = location.lastIndexOf(', ');
148251
+ let evalOriginStr = location;
148252
+ if (commaIndex !== -1) {
148253
+ evalOriginStr = location.substring(0, commaIndex);
148254
+ location = location.substring(commaIndex + 2);
148255
+ }
148256
+ else {
148257
+ location = '';
148258
+ }
148259
+ if (evalOriginStr.startsWith('eval at ')) {
148260
+ evalOriginStr = evalOriginStr.substring(8);
148261
+ }
148262
+ const innerOpenParen = evalOriginStr.indexOf(' (');
148263
+ let evalFunctionName = evalOriginStr;
148264
+ let evalLocation = '';
148265
+ if (innerOpenParen !== -1) {
148266
+ evalFunctionName = evalOriginStr.substring(0, innerOpenParen).trim();
148267
+ evalLocation = evalOriginStr.substring(innerOpenParen + 2, evalOriginStr.length - 1);
148268
+ evalOrigin = parseRawFramesFromErrorStack(` at ${evalFunctionName} (${evalLocation})`)?.[0];
148269
+ }
148270
+ else {
148271
+ evalOrigin = parseRawFramesFromErrorStack(` at ${evalFunctionName}`)?.[0];
148272
+ }
148273
+ }
148274
+ if (location.startsWith('index ')) {
148275
+ promiseIndex = parseInt(location.substring(6), 10);
148276
+ url = '';
148277
+ }
148278
+ else if (location === '<anonymous>' || location === 'native') {
148279
+ url = '';
148280
+ }
148281
+ else if (location.includes(':wasm-function[')) {
148282
+ isWasm = true;
148283
+ const wasmMatch = /^(.*):wasm-function\[(\d+)\]:(0x[0-9a-fA-F]+)$/.exec(location);
148284
+ if (wasmMatch) {
148285
+ url = wasmMatch[1];
148286
+ wasmFunctionIndex = parseInt(wasmMatch[2], 10);
148287
+ columnNumber = parseInt(wasmMatch[3], 16);
148288
+ }
148289
+ }
148290
+ else {
148291
+ const splitResult = ParsedURL.splitLineAndColumn(location);
148292
+ url = splitResult.url;
148293
+ lineNumber = splitResult.lineNumber ?? -1;
148294
+ columnNumber = splitResult.columnNumber ?? -1;
148295
+ }
148296
+ }
148297
+ else {
148298
+ const splitResult = ParsedURL.splitLineAndColumn(lineContent);
148299
+ url = splitResult.url;
148300
+ lineNumber = splitResult.lineNumber ?? -1;
148301
+ columnNumber = splitResult.columnNumber ?? -1;
148302
+ }
148303
+ if (functionName) {
148304
+ const aliasMatch = /(.*)\s+\[as\s+(.*)\]/.exec(functionName);
148305
+ if (aliasMatch) {
148306
+ methodName = aliasMatch[2];
148307
+ functionName = aliasMatch[1];
148308
+ }
148309
+ const dotIndex = functionName.indexOf('.');
148310
+ if (dotIndex !== -1) {
148311
+ typeName = functionName.substring(0, dotIndex);
148312
+ methodName = methodName ?? functionName.substring(dotIndex + 1);
148313
+ }
148314
+ if (isWasm && typeName) {
148315
+ wasmModuleName = typeName;
148316
+ }
148317
+ }
148318
+ rawFrames.push({
148319
+ url: url,
148320
+ functionName,
148321
+ lineNumber,
148322
+ columnNumber,
148323
+ parsedFrameInfo: {
148324
+ isAsync,
148325
+ isConstructor,
148326
+ isEval,
148327
+ evalOrigin,
148328
+ isWasm,
148329
+ wasmModuleName,
148330
+ wasmFunctionIndex,
148331
+ typeName,
148332
+ methodName,
148333
+ promiseIndex,
148334
+ },
148335
+ });
148336
+ }
148337
+ return rawFrames;
148338
+ }
148339
+ function findFramesStartLine(lines) {
148340
+ return lines.findIndex(line => CALL_FRAME_REGEX.test(line));
148341
+ }
148342
+ function parseMessage(stack) {
148343
+ const lines = stack.split('\n');
148344
+ const firstAtLineIndex = findFramesStartLine(lines);
148345
+ if (firstAtLineIndex !== -1) {
148346
+ return lines.slice(0, firstAtLineIndex).join('\n');
148347
+ }
148348
+ return stack;
148349
+ }
148350
+ function augmentRawFramesWithScriptIds(rawFrames, protocolStackTrace) {
148351
+ for (const rawFrame of rawFrames) {
148352
+ const protocolFrame = protocolStackTrace.callFrames.find(frame => rawFrame.url === frame.url && rawFrame.lineNumber === frame.lineNumber &&
148353
+ rawFrame.columnNumber === frame.columnNumber);
148354
+ if (protocolFrame) {
148355
+ rawFrame.scriptId = protocolFrame.scriptId;
148356
+ }
148357
+ }
148358
+ }
148359
+
148152
148360
  // Copyright 2025 The Chromium Authors
148153
148361
  class StackTraceImpl extends ObjectWrapper {
148154
148362
  syncFragment;
@@ -148157,7 +148365,9 @@ class StackTraceImpl extends ObjectWrapper {
148157
148365
  super();
148158
148366
  this.syncFragment = syncFragment;
148159
148367
  this.asyncFragments = asyncFragments;
148160
- const fragment = syncFragment instanceof DebuggableFragmentImpl ? syncFragment.fragment : syncFragment;
148368
+ const fragment = (syncFragment instanceof DebuggableFragmentImpl || syncFragment instanceof ParsedErrorStackFragmentImpl) ?
148369
+ syncFragment.fragment :
148370
+ syncFragment;
148161
148371
  fragment.stackTraces.add(this);
148162
148372
  this.asyncFragments.forEach(asyncFragment => asyncFragment.fragment.stackTraces.add(this));
148163
148373
  }
@@ -148215,6 +148425,88 @@ class FrameImpl {
148215
148425
  this.rawName = rawName;
148216
148426
  }
148217
148427
  }
148428
+ class ParsedErrorStackFragmentImpl {
148429
+ fragment;
148430
+ constructor(fragment) {
148431
+ this.fragment = fragment;
148432
+ }
148433
+ get frames() {
148434
+ if (!this.fragment.node) {
148435
+ return [];
148436
+ }
148437
+ const frames = [];
148438
+ for (const node of this.fragment.node.getCallStack()) {
148439
+ for (const frame of node.frames) {
148440
+ frames.push(new ParsedErrorStackFrameImpl(frame, node.parsedFrameInfo, node.evalOriginFrames));
148441
+ }
148442
+ }
148443
+ return frames;
148444
+ }
148445
+ }
148446
+ class ParsedErrorStackFrameImpl {
148447
+ #frame;
148448
+ #parsedFrameInfo;
148449
+ #evalOriginFrames;
148450
+ constructor(frame, parsedFrameInfo, evalOriginFrames) {
148451
+ this.#frame = frame;
148452
+ this.#parsedFrameInfo = parsedFrameInfo;
148453
+ this.#evalOriginFrames = evalOriginFrames;
148454
+ }
148455
+ get url() {
148456
+ return this.#frame.url;
148457
+ }
148458
+ get uiSourceCode() {
148459
+ return this.#frame.uiSourceCode;
148460
+ }
148461
+ get name() {
148462
+ return this.#frame.name;
148463
+ }
148464
+ get line() {
148465
+ return this.#frame.line;
148466
+ }
148467
+ get column() {
148468
+ return this.#frame.column;
148469
+ }
148470
+ get missingDebugInfo() {
148471
+ return this.#frame.missingDebugInfo;
148472
+ }
148473
+ get rawName() {
148474
+ return this.#frame.rawName;
148475
+ }
148476
+ get isAsync() {
148477
+ return this.#parsedFrameInfo?.isAsync;
148478
+ }
148479
+ get isConstructor() {
148480
+ return this.#parsedFrameInfo?.isConstructor;
148481
+ }
148482
+ get isEval() {
148483
+ return this.#parsedFrameInfo?.isEval;
148484
+ }
148485
+ get evalOrigin() {
148486
+ if (!this.#evalOriginFrames || this.#evalOriginFrames.length === 0) {
148487
+ return undefined;
148488
+ }
148489
+ return new ParsedErrorStackFrameImpl(this.#evalOriginFrames[0], this.#parsedFrameInfo?.evalOrigin?.parsedFrameInfo);
148490
+ }
148491
+ get isWasm() {
148492
+ return this.#parsedFrameInfo?.isWasm;
148493
+ }
148494
+ get wasmModuleName() {
148495
+ return this.#parsedFrameInfo?.wasmModuleName;
148496
+ }
148497
+ get wasmFunctionIndex() {
148498
+ return this.#parsedFrameInfo?.wasmFunctionIndex;
148499
+ }
148500
+ get typeName() {
148501
+ return this.#parsedFrameInfo?.typeName;
148502
+ }
148503
+ get methodName() {
148504
+ return this.#parsedFrameInfo?.methodName;
148505
+ }
148506
+ get promiseIndex() {
148507
+ return this.#parsedFrameInfo?.promiseIndex;
148508
+ }
148509
+ }
148218
148510
  class DebuggableFragmentImpl {
148219
148511
  fragment;
148220
148512
  callFrames;
@@ -148426,9 +148718,12 @@ class FrameNode {
148426
148718
  rawFrame;
148427
148719
  frames = [];
148428
148720
  fragment;
148721
+ parsedFrameInfo;
148722
+ evalOriginFrames;
148429
148723
  constructor(rawFrame, parent) {
148430
148724
  this.rawFrame = rawFrame;
148431
148725
  this.parent = parent;
148726
+ this.parsedFrameInfo = rawFrame.parsedFrameInfo;
148432
148727
  }
148433
148728
  *getCallStack() {
148434
148729
  for (let node = this; node.parent; node = node.parent) {
@@ -148458,6 +148753,9 @@ class Trie {
148458
148753
  }
148459
148754
  const compareResult = compareRawFrames(child.rawFrame, rawFrame);
148460
148755
  if (compareResult === 0) {
148756
+ if (rawFrame.parsedFrameInfo && !child.parsedFrameInfo) {
148757
+ child.parsedFrameInfo = rawFrame.parsedFrameInfo;
148758
+ }
148461
148759
  return child;
148462
148760
  }
148463
148761
  if (compareResult > 0) {
@@ -148523,6 +148821,21 @@ class StackTraceModel extends SDKModel {
148523
148821
  ]);
148524
148822
  return new StackTraceImpl(syncFragment, asyncFragments);
148525
148823
  }
148824
+ async createFromErrorStackLikeString(stack, rawFramesToUIFrames, exceptionDetails) {
148825
+ const rawFrames = parseRawFramesFromErrorStack(stack);
148826
+ if (!rawFrames) {
148827
+ return null;
148828
+ }
148829
+ if (exceptionDetails?.stackTrace) {
148830
+ augmentRawFramesWithScriptIds(rawFrames, exceptionDetails.stackTrace);
148831
+ }
148832
+ const [syncFragment, asyncFragments] = await Promise.all([
148833
+ this.#createFragment(rawFrames, rawFramesToUIFrames),
148834
+ exceptionDetails?.stackTrace ? this.#createAsyncFragments(exceptionDetails.stackTrace, rawFramesToUIFrames) :
148835
+ Promise.resolve([]),
148836
+ ]);
148837
+ return new StackTraceImpl(new ParsedErrorStackFragmentImpl(syncFragment), asyncFragments);
148838
+ }
148526
148839
  async createFromDebuggerPaused(pausedDetails, rawFramesToUIFrames) {
148527
148840
  const [syncFragment, asyncFragments] = await Promise.all([
148528
148841
  this.#createDebuggableFragment(pausedDetails, rawFramesToUIFrames),
@@ -148601,9 +148914,21 @@ class StackTraceModel extends SDKModel {
148601
148914
  const rawFrames = fragment.node.getCallStack().map(node => node.rawFrame).toArray();
148602
148915
  const uiFrames = await rawFramesToUIFrames(rawFrames, this.target());
148603
148916
  console.assert(rawFrames.length === uiFrames.length, 'Broken rawFramesToUIFrames implementation');
148917
+ const evalOriginPromises = [];
148918
+ for (const node of fragment.node.getCallStack()) {
148919
+ if (node.parsedFrameInfo?.evalOrigin) {
148920
+ evalOriginPromises.push(rawFramesToUIFrames([node.parsedFrameInfo.evalOrigin], this.target()));
148921
+ }
148922
+ }
148923
+ const evalUiFrames = await Promise.all(evalOriginPromises);
148604
148924
  let i = 0;
148925
+ let evalI = 0;
148605
148926
  for (const node of fragment.node.getCallStack()) {
148606
148927
  node.frames = uiFrames[i++].map(frame => new FrameImpl(frame.url, frame.uiSourceCode, frame.name, frame.line, frame.column, frame.missingDebugInfo, node.rawFrame.functionName));
148928
+ if (node.parsedFrameInfo?.evalOrigin) {
148929
+ const evalOriginRawFrame = node.parsedFrameInfo.evalOrigin;
148930
+ node.evalOriginFrames = evalUiFrames[evalI++][0].map(frame => new FrameImpl(frame.url, frame.uiSourceCode, frame.name, frame.line, frame.column, frame.missingDebugInfo, evalOriginRawFrame.functionName));
148931
+ }
148607
148932
  }
148608
148933
  }
148609
148934
  #affectedFragments(script) {
@@ -149017,8 +149342,8 @@ class UISourceCode extends ObjectWrapper {
149017
149342
  editDisabled() {
149018
149343
  return this.#disableEdit;
149019
149344
  }
149020
- isIgnoreListed() {
149021
- return IgnoreListManager.instance().isUserOrSourceMapIgnoreListedUISourceCode(this);
149345
+ isIgnoreListed(ignoreListManager = IgnoreListManager.instance()) {
149346
+ return ignoreListManager.isUserOrSourceMapIgnoreListedUISourceCode(this);
149022
149347
  }
149023
149348
  }
149024
149349
  var Events$2;
@@ -149094,8 +149419,8 @@ class UILocation {
149094
149419
  }
149095
149420
  return this.columnNumber - other.columnNumber;
149096
149421
  }
149097
- isIgnoreListed() {
149098
- return this.uiSourceCode.isIgnoreListed();
149422
+ isIgnoreListed(ignoreListManager = IgnoreListManager.instance()) {
149423
+ return this.uiSourceCode.isIgnoreListed(ignoreListManager);
149099
149424
  }
149100
149425
  }
149101
149426
  class UIFunctionBounds {
@@ -152518,6 +152843,29 @@ class ResourceScriptFile extends ObjectWrapper {
152518
152843
  }
152519
152844
  }
152520
152845
 
152846
+ // Copyright 2026 The Chromium Authors
152847
+ class SymbolizedError extends ObjectWrapper {
152848
+ message;
152849
+ stackTrace;
152850
+ cause;
152851
+ constructor(message, stackTrace, cause) {
152852
+ super();
152853
+ this.message = message;
152854
+ this.stackTrace = stackTrace;
152855
+ this.cause = cause;
152856
+ this.stackTrace.addEventListener("UPDATED" , this.#fireUpdated, this);
152857
+ this.cause?.addEventListener("UPDATED" , this.#fireUpdated, this);
152858
+ }
152859
+ dispose() {
152860
+ this.stackTrace.removeEventListener("UPDATED" , this.#fireUpdated, this);
152861
+ this.cause?.removeEventListener("UPDATED" , this.#fireUpdated, this);
152862
+ this.cause?.dispose();
152863
+ }
152864
+ #fireUpdated() {
152865
+ this.dispatchEventToListeners("UPDATED" );
152866
+ }
152867
+ }
152868
+
152521
152869
  // Copyright 2014 The Chromium Authors
152522
152870
  class DebuggerWorkspaceBinding {
152523
152871
  resourceMapping;
@@ -152649,6 +152997,42 @@ class DebuggerWorkspaceBinding {
152649
152997
  this.recordLiveLocationChange(stackTracePromise);
152650
152998
  return await stackTracePromise;
152651
152999
  }
153000
+ async createStackTraceFromErrorStackLikeString(target, stack, exceptionDetails) {
153001
+ const model = target.model(StackTraceModel);
153002
+ const stackTracePromise = model.createFromErrorStackLikeString(stack, this.#translateRawFrames.bind(this), exceptionDetails);
153003
+ this.recordLiveLocationChange(stackTracePromise);
153004
+ return await stackTracePromise;
153005
+ }
153006
+ async createSymbolizedError(remoteObject, exceptionDetails) {
153007
+ let errorStack = '';
153008
+ let causeRemoteObject;
153009
+ let fetchedExceptionDetails = exceptionDetails;
153010
+ if (remoteObject.subtype === 'error') {
153011
+ const remoteError = RemoteError.objectAsError(remoteObject);
153012
+ errorStack = remoteError.errorStack;
153013
+ const [details, causeRemote] = await Promise.all([
153014
+ exceptionDetails ? Promise.resolve(exceptionDetails) : remoteError.exceptionDetails(),
153015
+ remoteError.cause(),
153016
+ ]);
153017
+ fetchedExceptionDetails = details;
153018
+ causeRemoteObject = causeRemote;
153019
+ }
153020
+ else if (remoteObject.type === 'string') {
153021
+ errorStack = remoteObject.description || '';
153022
+ }
153023
+ else {
153024
+ return null;
153025
+ }
153026
+ const [stackTrace, cause] = await Promise.all([
153027
+ this.createStackTraceFromErrorStackLikeString(remoteObject.runtimeModel().target(), errorStack, fetchedExceptionDetails),
153028
+ causeRemoteObject ? this.createSymbolizedError(causeRemoteObject) : Promise.resolve(null),
153029
+ ]);
153030
+ if (!stackTrace) {
153031
+ return null;
153032
+ }
153033
+ const message = parseMessage(errorStack);
153034
+ return new SymbolizedError(message, stackTrace, cause);
153035
+ }
152652
153036
  async createLiveLocation(rawLocation, updateDelegate, locationPool) {
152653
153037
  const modelData = this.#debuggerModelToData.get(rawLocation.debuggerModel);
152654
153038
  if (!modelData) {
@@ -172601,7 +172985,7 @@ var Show;
172601
172985
  },
172602
172986
  'capabilities': ['touch', 'mobile'],
172603
172987
  'user-agent': 'Mozilla/5.0 (Linux; Android 13; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36',
172604
- 'user-agent-metadata': { 'platform': 'Android', 'platformVersion': '13', 'architecture': '', 'model': 'Pixel 5', 'mobile': true },
172988
+ 'user-agent-metadata': { 'platform': 'Android', 'platformVersion': '13', 'architecture': '', 'model': 'Pixel 7', 'mobile': true },
172605
172989
  'type': 'phone',
172606
172990
  },
172607
172991
  {
@@ -174130,7 +174514,7 @@ class DeviceModeModel extends ObjectWrapper {
174130
174514
  this.#appliedUserAgentType = this.#uaSetting.get();
174131
174515
  this.applyDeviceMetrics(new Size(screenWidth, screenHeight), new Insets(0, 0, 0, 0), new Insets(0, 0, 0, 0), this.#scaleSetting.get(), this.#deviceScaleFactorSetting.get() || defaultDeviceScaleFactor, mobile, screenHeight >= screenWidth ? "portraitPrimary" :
174132
174516
  "landscapePrimary" , resetPageScaleFactor);
174133
- this.applyUserAgent(mobile ? defaultMobileUserAgent : '', mobile ? defaultMobileUserAgentMetadata : null);
174517
+ this.applyUserAgent(mobile ? DeviceModeModel.defaultMobileUserAgent() : '', mobile ? DeviceModeModel.defaultMobileUserAgentMetadata() : null);
174134
174518
  this.applyTouch(this.#uaSetting.get() === "Desktop (touch)" || this.#uaSetting.get() === "Mobile" , this.#uaSetting.get() === "Mobile" );
174135
174519
  }
174136
174520
  if (overlayModel) {
@@ -174325,6 +174709,28 @@ class DeviceModeModel extends ObjectWrapper {
174325
174709
  maskLength: (this.#mode.orientation === VerticalSpanned) ? hinge.width : hinge.height,
174326
174710
  };
174327
174711
  }
174712
+ static getDynamicMobileUA() {
174713
+ const now = new Date();
174714
+ const year = now.getFullYear();
174715
+ const isLateInYear = now.getMonth() >= 9;
174716
+ const androidVersion = isLateInYear ? (year - 2010) : (year - 2011);
174717
+ const pixelModel = isLateInYear ? (year - 2016) : (year - 2017);
174718
+ const ua = `Mozilla/5.0 (Linux; Android ${androidVersion}; Pixel ${pixelModel}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36`;
174719
+ const metadata = {
174720
+ platform: 'Android',
174721
+ platformVersion: androidVersion.toString(),
174722
+ architecture: '',
174723
+ model: `Pixel ${pixelModel}`,
174724
+ mobile: true,
174725
+ };
174726
+ return { userAgent: ua, metadata };
174727
+ }
174728
+ static defaultMobileUserAgent() {
174729
+ return MultitargetNetworkManager.patchUserAgentWithChromeVersion(DeviceModeModel.getDynamicMobileUA().userAgent);
174730
+ }
174731
+ static defaultMobileUserAgentMetadata() {
174732
+ return DeviceModeModel.getDynamicMobileUA().metadata;
174733
+ }
174328
174734
  }
174329
174735
  class Insets {
174330
174736
  left;
@@ -174377,15 +174783,6 @@ const MinDeviceSize = 50;
174377
174783
  const MaxDeviceSize = 9999;
174378
174784
  const MinDeviceScaleFactor = 0;
174379
174785
  const MaxDeviceScaleFactor = 10;
174380
- const mobileUserAgent = 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36';
174381
- const defaultMobileUserAgent = MultitargetNetworkManager.patchUserAgentWithChromeVersion(mobileUserAgent);
174382
- const defaultMobileUserAgentMetadata = {
174383
- platform: 'Android',
174384
- platformVersion: '6.0',
174385
- architecture: '',
174386
- model: 'Nexus 5',
174387
- mobile: true,
174388
- };
174389
174786
  const defaultMobileScaleFactor = 2;
174390
174787
 
174391
174788
  // Copyright 2024 The Chromium Authors
@@ -183772,12 +184169,11 @@ class IssuesManager extends ObjectWrapper {
183772
184169
  #updateIssueHiddenStatus(issue, values) {
183773
184170
  const code = issue.code();
183774
184171
  if (values?.[code]) {
183775
- if (values[code] === "Hidden" ) {
183776
- issue.setHidden(true);
183777
- return;
184172
+ const isHidden = values[code] === "Hidden" ;
184173
+ if (issue.isHidden() !== isHidden) {
184174
+ issue.setHidden(isHidden);
184175
+ this.dispatchEventToListeners("IssueHiddenStatusUpdated" , { issue });
183778
184176
  }
183779
- issue.setHidden(false);
183780
- return;
183781
184177
  }
183782
184178
  }
183783
184179
  #updateFilteredIssues() {
@@ -183806,7 +184202,10 @@ class IssuesManager extends ObjectWrapper {
183806
184202
  }
183807
184203
  unhideAllIssues() {
183808
184204
  for (const issue of this.#allIssues.values()) {
183809
- issue.setHidden(false);
184205
+ if (issue.isHidden()) {
184206
+ issue.setHidden(false);
184207
+ this.dispatchEventToListeners("IssueHiddenStatusUpdated" , { issue });
184208
+ }
183810
184209
  }
183811
184210
  this.hideIssueSetting?.set(defaultHideIssueByCodeSetting());
183812
184211
  }
@@ -183860,8 +184259,9 @@ var mcp = /*#__PURE__*/Object.freeze({
183860
184259
  * Copyright 2025 Google LLC
183861
184260
  * SPDX-License-Identifier: Apache-2.0
183862
184261
  */
184262
+ const agenticBrowsingConfig = agenticBrowsingConfig$1;
183863
184263
  const snapshot = snapshot$1;
183864
184264
  const navigation = navigation$1;
183865
184265
  const generateReport = generateReport$1;
183866
184266
 
183867
- export { Browser as BrowserEnum, CDPSessionEvent, Client$1 as Client, mcp as DevTools, KnownDevices, Locator, McpServer, PipeTransport, PredefinedNetworkConditions, SetLevelRequestSchema, StdioClientTransport, StdioServerTransport, ajv, debug$2 as debug, detectBrowserPlatform, generateReport, hideBin, navigation, puppeteer, resolveDefaultUserDataDir, semver, snapshot, Yargs as yargs, z$1 as zod };
184267
+ export { Browser as BrowserEnum, CDPSessionEvent, Client$1 as Client, mcp as DevTools, KnownDevices, ListRootsRequestSchema, ListRootsResultSchema, Locator, McpServer, PipeTransport, PredefinedNetworkConditions, RootsListChangedNotificationSchema, SetLevelRequestSchema, StdioClientTransport, StdioServerTransport, agenticBrowsingConfig, ajv, debug$2 as debug, detectBrowserPlatform, generateReport, hideBin, navigation, puppeteer, resolveDefaultUserDataDir, semver, snapshot, Yargs as yargs, z$1 as zod };