chrome-devtools-frontend 1.0.1636056 → 1.0.1640418

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 (171) hide show
  1. package/front_end/core/common/Color.ts +0 -4
  2. package/front_end/core/host/AidaClientTypes.ts +8 -6
  3. package/front_end/core/root/Runtime.ts +2 -2
  4. package/front_end/core/sdk/DOMStorageModel.ts +1 -1
  5. package/front_end/core/sdk/SourceMap.ts +8 -3
  6. package/front_end/core/sdk/TargetManager.ts +14 -1
  7. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +147 -0
  8. package/front_end/generated/ARIAProperties.js +17 -4
  9. package/front_end/generated/InspectorBackendCommands.ts +13 -7
  10. package/front_end/generated/SupportedCSSProperties.js +1 -0
  11. package/front_end/generated/protocol-mapping.d.ts +7 -0
  12. package/front_end/generated/protocol-proxy-api.d.ts +14 -0
  13. package/front_end/generated/protocol.ts +120 -2
  14. package/front_end/global_typings/global_defs.d.ts +13 -0
  15. package/front_end/models/ai_assistance/AiAgent2.ts +116 -0
  16. package/front_end/models/ai_assistance/AiConversation.ts +22 -36
  17. package/front_end/models/ai_assistance/AiHistoryStorage.ts +0 -1
  18. package/front_end/models/ai_assistance/AiOrigins.ts +46 -0
  19. package/front_end/models/ai_assistance/AiUtils.ts +9 -0
  20. package/front_end/models/ai_assistance/README.md +16 -0
  21. package/front_end/models/ai_assistance/StorageItem.ts +30 -26
  22. package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +12 -5
  23. package/front_end/models/ai_assistance/agents/AiAgent.ts +86 -32
  24. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +2 -2
  25. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +31 -10
  26. package/front_end/models/ai_assistance/agents/ConversationSummaryAgent.ts +1 -1
  27. package/front_end/models/ai_assistance/agents/FileAgent.ts +2 -2
  28. package/front_end/models/ai_assistance/agents/GreenDevAgent.ts +1 -3
  29. package/front_end/models/ai_assistance/agents/NetworkAgent.snapshot.txt +19 -0
  30. package/front_end/models/ai_assistance/agents/NetworkAgent.ts +9 -4
  31. package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +2 -2
  32. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +41 -12
  33. package/front_end/models/ai_assistance/agents/StorageAgent.ts +442 -122
  34. package/front_end/models/ai_assistance/agents/StylingAgent.ts +2 -2
  35. package/front_end/models/ai_assistance/ai_assistance.ts +4 -2
  36. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +2 -2
  37. package/front_end/models/ai_assistance/performance/AIContext.ts +7 -8
  38. package/front_end/models/ai_assistance/skills/README.md +40 -0
  39. package/front_end/models/ai_assistance/skills/Skill.ts +13 -0
  40. package/front_end/models/ai_assistance/skills/SkillRegistry.ts +10 -0
  41. package/front_end/models/ai_assistance/skills/styling.md +6 -0
  42. package/front_end/models/bindings/CompilerScriptMapping.ts +12 -4
  43. package/front_end/models/breakpoints/BreakpointManager.ts +54 -2
  44. package/front_end/models/greendev/Prototypes.ts +0 -7
  45. package/front_end/models/heap_snapshot/HeapSnapshotModel.ts +20 -0
  46. package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +5 -0
  47. package/front_end/models/issues_manager/EmailVerificationRequestIssue.ts +293 -0
  48. package/front_end/models/issues_manager/IssuesManager.ts +5 -0
  49. package/front_end/models/issues_manager/descriptions/emailVerificationRequestDnsFetchFailed.md +1 -0
  50. package/front_end/models/issues_manager/descriptions/emailVerificationRequestDnsInvalidRecord.md +1 -0
  51. package/front_end/models/issues_manager/descriptions/emailVerificationRequestInvalidEmail.md +1 -0
  52. package/front_end/models/issues_manager/descriptions/emailVerificationRequestKeyBindingSigningFailed.md +1 -0
  53. package/front_end/models/issues_manager/descriptions/emailVerificationRequestRpOriginIsOpaque.md +1 -0
  54. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenHttpNotFound.md +1 -0
  55. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenInvalidContentType.md +1 -0
  56. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenInvalidResponse.md +1 -0
  57. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenInvalidSdJwt.md +1 -0
  58. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenMalformedSdJwt.md +1 -0
  59. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenNoResponse.md +1 -0
  60. package/front_end/models/issues_manager/descriptions/emailVerificationRequestUserLoggedOut.md +1 -0
  61. package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownAccountsEndpointCrossOrigin.md +1 -0
  62. package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownHttpNotFound.md +1 -0
  63. package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownInvalidContentType.md +1 -0
  64. package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownInvalidResponse.md +1 -0
  65. package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownIssuanceEndpointCrossOrigin.md +1 -0
  66. package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownListEmpty.md +1 -0
  67. package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownMissingAccountsEndpoint.md +1 -0
  68. package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownMissingIssuanceEndpoint.md +1 -0
  69. package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownNoResponse.md +1 -0
  70. package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownUnsupportedSigningAlgorithm.md +1 -0
  71. package/front_end/models/issues_manager/issues_manager.ts +2 -0
  72. package/front_end/models/javascript_metadata/NativeFunctions.js +1748 -1739
  73. package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +1 -1
  74. package/front_end/models/stack_trace/DetailedErrorStackParser.ts +9 -1
  75. package/front_end/models/stack_trace/StackTraceImpl.ts +29 -9
  76. package/front_end/models/stack_trace/StackTraceModel.ts +23 -11
  77. package/front_end/models/stack_trace/Trie.ts +11 -1
  78. package/front_end/models/trace/extras/TraceTree.ts +20 -1
  79. package/front_end/models/trace/insights/Common.ts +9 -0
  80. package/front_end/models/trace/lantern/core/NetworkAnalyzer.ts +21 -25
  81. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +19 -75
  82. package/front_end/panels/ai_assistance/components/AccessibilityAgentMarkdownRenderer.ts +10 -3
  83. package/front_end/panels/ai_assistance/components/ChatMessage.ts +148 -2
  84. package/front_end/panels/ai_assistance/components/PerformanceAgentMarkdownRenderer.ts +2 -3
  85. package/front_end/panels/ai_assistance/components/chatMessage.css +27 -0
  86. package/front_end/panels/application/CookieItemsView.ts +24 -0
  87. package/front_end/panels/application/DOMStorageItemsView.ts +9 -4
  88. package/front_end/panels/application/preloading/components/PreloadingString.ts +6 -0
  89. package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +4 -4
  90. package/front_end/panels/console/ConsoleViewMessage.ts +13 -102
  91. package/front_end/panels/elements/StandaloneStylesContainer.ts +10 -0
  92. package/front_end/panels/elements/StylePropertiesSection.ts +6 -2
  93. package/front_end/panels/elements/StylePropertyTreeElement.ts +30 -1
  94. package/front_end/panels/elements/StylesContainer.ts +3 -0
  95. package/front_end/panels/elements/StylesSidebarPane.ts +54 -4
  96. package/front_end/panels/elements/elements-meta.ts +14 -0
  97. package/front_end/panels/layer_viewer/layerDetailsView.css +1 -1
  98. package/front_end/panels/lighthouse/LighthouseController.ts +1 -1
  99. package/front_end/panels/lighthouse/LighthouseProtocolService.ts +4 -4
  100. package/front_end/panels/network/NetworkDataGridNode.ts +14 -0
  101. package/front_end/panels/network/NetworkLogViewColumns.ts +2 -2
  102. package/front_end/panels/network/RequestHeadersView.ts +55 -19
  103. package/front_end/panels/network/networkTimingTable.css +2 -4
  104. package/front_end/panels/recorder/components/ReplaySection.ts +28 -16
  105. package/front_end/panels/recorder/converters/LighthouseConverter.snapshot.txt +47 -0
  106. package/front_end/panels/recorder/converters/PuppeteerConverter.snapshot.txt +49 -0
  107. package/front_end/panels/recorder/converters/PuppeteerReplayConverter.snapshot.txt +33 -0
  108. package/front_end/panels/settings/SettingsScreen.ts +1 -2
  109. package/front_end/panels/sources/BreakpointsView.ts +23 -42
  110. package/front_end/panels/sources/DebuggerPlugin.ts +12 -5
  111. package/front_end/panels/sources/ScopeChainSidebarPane.ts +169 -106
  112. package/front_end/panels/timeline/components/IgnoreListSetting.ts +1 -0
  113. package/front_end/third_party/chromium/README.chromium +1 -1
  114. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +2 -2
  115. package/front_end/third_party/marked/README.chromium +3 -6
  116. package/front_end/third_party/marked/package/README.md +5 -5
  117. package/front_end/third_party/marked/package/bin/main.js +27 -22
  118. package/front_end/third_party/marked/package/bin/marked.js +2 -1
  119. package/front_end/third_party/marked/package/lib/marked.esm.d.ts +346 -256
  120. package/front_end/third_party/marked/package/lib/marked.esm.js +67 -2698
  121. package/front_end/third_party/marked/package/lib/marked.esm.js.map +7 -1
  122. package/front_end/third_party/marked/package/lib/marked.umd.js +69 -2722
  123. package/front_end/third_party/marked/package/lib/marked.umd.js.map +7 -1
  124. package/front_end/third_party/marked/package/man/marked.1 +4 -2
  125. package/front_end/third_party/marked/package/man/marked.1.md +2 -1
  126. package/front_end/third_party/marked/package/package.json +49 -57
  127. package/front_end/third_party/puppeteer-replay/README.chromium +2 -2
  128. package/front_end/third_party/puppeteer-replay/package/lib/cli.js +84 -80
  129. package/front_end/third_party/puppeteer-replay/package/lib/cli.js.map +1 -1
  130. package/front_end/third_party/puppeteer-replay/package/lib/extension-test.js +79 -83
  131. package/front_end/third_party/puppeteer-replay/package/lib/extension-test.js.map +1 -1
  132. package/front_end/third_party/puppeteer-replay/package/lib/main.d.ts +43 -171
  133. package/front_end/third_party/puppeteer-replay/package/lib/main.js +51 -206
  134. package/front_end/third_party/puppeteer-replay/package/lib/main.js.map +1 -1
  135. package/front_end/third_party/puppeteer-replay/package/package.json +37 -67
  136. package/front_end/tsconfig.json +1 -1
  137. package/front_end/ui/components/markdown_view/CodeBlock.ts +17 -6
  138. package/front_end/ui/components/markdown_view/MarkdownView.ts +39 -3
  139. package/front_end/ui/components/markdown_view/codeBlock.css +11 -0
  140. package/front_end/ui/components/markdown_view/markdownView.css +17 -0
  141. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +0 -79
  142. package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +16 -4
  143. package/front_end/ui/visual_logging/KnownContextValues.ts +4 -0
  144. package/inspector_overlay/testing/InspectorOverlayHelpers.ts +2 -0
  145. package/mcp/mcp.ts +1 -6
  146. package/package.json +14 -16
  147. package/front_end/models/ai_assistance/agents/BreakpointDebuggerAgent.ts +0 -1015
  148. package/front_end/models/ai_assistance/agents/BreakpointDebuggerAgentOverlay.ts +0 -87
  149. package/front_end/third_party/marked/package/bin/marked +0 -215
  150. package/front_end/third_party/marked/package/lib/marked.cjs +0 -2726
  151. package/front_end/third_party/marked/package/lib/marked.cjs.map +0 -1
  152. package/front_end/third_party/marked/package/lib/marked.d.cts +0 -670
  153. package/front_end/third_party/marked/package/lib/marked.js +0 -2780
  154. package/front_end/third_party/marked/package/man/marked.1.txt +0 -86
  155. package/front_end/third_party/marked/package/marked.min.js +0 -6
  156. package/front_end/third_party/marked/package/src/Lexer.js +0 -492
  157. package/front_end/third_party/marked/package/src/Parser.js +0 -286
  158. package/front_end/third_party/marked/package/src/Renderer.js +0 -166
  159. package/front_end/third_party/marked/package/src/Slugger.js +0 -49
  160. package/front_end/third_party/marked/package/src/TextRenderer.js +0 -42
  161. package/front_end/third_party/marked/package/src/Tokenizer.js +0 -755
  162. package/front_end/third_party/marked/package/src/defaults.js +0 -29
  163. package/front_end/third_party/marked/package/src/helpers.js +0 -249
  164. package/front_end/third_party/marked/package/src/marked.js +0 -350
  165. package/front_end/third_party/marked/package/src/rules.js +0 -285
  166. package/front_end/third_party/puppeteer-replay/package/lib/cjs/main.cjs +0 -2099
  167. package/front_end/third_party/puppeteer-replay/package/lib/cjs/main.cjs.map +0 -1
  168. package/front_end/third_party/puppeteer-replay/package/lib/cjs/main.d.cts +0 -686
  169. package/front_end/third_party/puppeteer-replay/package/lib/cjs/main.d.ts +0 -35
  170. package/mcp/HostBindings.ts +0 -319
  171. /package/front_end/third_party/marked/package/{LICENSE.md → LICENSE} +0 -0
@@ -435,6 +435,49 @@ export namespace Accessibility {
435
435
  }
436
436
  }
437
437
 
438
+ /**
439
+ * A domain for ad-related metrics and data.
440
+ */
441
+ export namespace Ads {
442
+
443
+ /**
444
+ * Ad metrics for a page.
445
+ */
446
+ export interface AdMetrics {
447
+ /**
448
+ * The viewport ad density by area, represented as a percentage (an integer
449
+ * between 0 and 100).
450
+ */
451
+ viewportAdDensityByArea: integer;
452
+ /**
453
+ * The time-weighted average of the viewport ad density by area, measured
454
+ * across the duration of the page.
455
+ */
456
+ averageViewportAdDensityByArea: number;
457
+ /**
458
+ * The number of ads currently visible within the viewport.
459
+ */
460
+ viewportAdCount: integer;
461
+ /**
462
+ * The time-weighted average of the viewport ad count, measured across the
463
+ * duration of the page.
464
+ */
465
+ averageViewportAdCount: number;
466
+ /**
467
+ * The total ad CPU usage, in milliseconds.
468
+ */
469
+ totalAdCpuTime: number;
470
+ /**
471
+ * The total ad network bytes.
472
+ */
473
+ totalAdNetworkBytes: number;
474
+ }
475
+
476
+ export interface GetAdMetricsResponse extends ProtocolResponseWithError {
477
+ metrics: AdMetrics;
478
+ }
479
+ }
480
+
438
481
  export namespace Animation {
439
482
 
440
483
  export const enum AnimationType {
@@ -1090,6 +1133,7 @@ export namespace Audits {
1090
1133
  WriteErrorNonSecureContext = 'WriteErrorNonSecureContext',
1091
1134
  WriteErrorNonStringIdField = 'WriteErrorNonStringIdField',
1092
1135
  WriteErrorNonStringInMatchDestList = 'WriteErrorNonStringInMatchDestList',
1136
+ WriteErrorInvalidMatchDestList = 'WriteErrorInvalidMatchDestList',
1093
1137
  WriteErrorNonStringMatchField = 'WriteErrorNonStringMatchField',
1094
1138
  WriteErrorNonTokenTypeField = 'WriteErrorNonTokenTypeField',
1095
1139
  WriteErrorRequestAborted = 'WriteErrorRequestAborted',
@@ -1356,6 +1400,74 @@ export namespace Audits {
1356
1400
  NoReturningUserFromFetchedAccounts = 'NoReturningUserFromFetchedAccounts',
1357
1401
  }
1358
1402
 
1403
+ export interface EmailVerificationRequestIssueDetails {
1404
+ emailVerificationRequestIssueReason: EmailVerificationRequestIssueReason;
1405
+ }
1406
+
1407
+ /**
1408
+ * Represents the failure reason when an email verification request fails.
1409
+ * Should be updated alongside EmailVerificationRequestResult in
1410
+ * third_party/blink/public/mojom/devtools/inspector_issue.mojom.
1411
+ */
1412
+ export const enum EmailVerificationRequestIssueReason {
1413
+ InvalidEmail = 'InvalidEmail',
1414
+ DnsFetchFailed = 'DnsFetchFailed',
1415
+ DnsInvalidRecord = 'DnsInvalidRecord',
1416
+ WellKnownHttpNotFound = 'WellKnownHttpNotFound',
1417
+ WellKnownNoResponse = 'WellKnownNoResponse',
1418
+ WellKnownInvalidResponse = 'WellKnownInvalidResponse',
1419
+ WellKnownListEmpty = 'WellKnownListEmpty',
1420
+ WellKnownInvalidContentType = 'WellKnownInvalidContentType',
1421
+ WellKnownMissingIssuanceEndpoint = 'WellKnownMissingIssuanceEndpoint',
1422
+ WellKnownIssuanceEndpointCrossOrigin = 'WellKnownIssuanceEndpointCrossOrigin',
1423
+ WellKnownUnsupportedSigningAlgorithm = 'WellKnownUnsupportedSigningAlgorithm',
1424
+ TokenHttpNotFound = 'TokenHttpNotFound',
1425
+ TokenNoResponse = 'TokenNoResponse',
1426
+ TokenInvalidResponse = 'TokenInvalidResponse',
1427
+ TokenInvalidContentType = 'TokenInvalidContentType',
1428
+ TokenMalformedSdJwt = 'TokenMalformedSdJwt',
1429
+ TokenInvalidSdJwt = 'TokenInvalidSdJwt',
1430
+ KeyBindingSigningFailed = 'KeyBindingSigningFailed',
1431
+ RpOriginIsOpaque = 'RpOriginIsOpaque',
1432
+ WellKnownMissingAccountsEndpoint = 'WellKnownMissingAccountsEndpoint',
1433
+ UserLoggedOut = 'UserLoggedOut',
1434
+ WellKnownAccountsEndpointCrossOrigin = 'WellKnownAccountsEndpointCrossOrigin',
1435
+ AccountsHttpNotFound = 'AccountsHttpNotFound',
1436
+ AccountsNoResponse = 'AccountsNoResponse',
1437
+ AccountsInvalidResponse = 'AccountsInvalidResponse',
1438
+ AccountsInvalidContentType = 'AccountsInvalidContentType',
1439
+ AccountsEmptyList = 'AccountsEmptyList',
1440
+ EmailVerificationWellKnownHttpNotFound = 'EmailVerificationWellKnownHttpNotFound',
1441
+ EmailVerificationWellKnownNoResponse = 'EmailVerificationWellKnownNoResponse',
1442
+ EmailVerificationWellKnownInvalidResponse = 'EmailVerificationWellKnownInvalidResponse',
1443
+ EmailVerificationWellKnownInvalidContentType = 'EmailVerificationWellKnownInvalidContentType',
1444
+ JwksHttpNotFound = 'JwksHttpNotFound',
1445
+ JwksInvalidResponse = 'JwksInvalidResponse',
1446
+ TokenVerificationSdJwtUnsupportedHeaderAlg = 'TokenVerificationSdJwtUnsupportedHeaderAlg',
1447
+ TokenVerificationSdJwtMissingIss = 'TokenVerificationSdJwtMissingIss',
1448
+ TokenVerificationSdJwtMissingIat = 'TokenVerificationSdJwtMissingIat',
1449
+ TokenVerificationSdJwtMissingCnf = 'TokenVerificationSdJwtMissingCnf',
1450
+ TokenVerificationSdJwtMissingEmail = 'TokenVerificationSdJwtMissingEmail',
1451
+ TokenVerificationSdJwtInvalidIssuedAt = 'TokenVerificationSdJwtInvalidIssuedAt',
1452
+ TokenVerificationSdJwtInvalidIssuer = 'TokenVerificationSdJwtInvalidIssuer',
1453
+ TokenVerificationSdJwtJwksMissingKeys = 'TokenVerificationSdJwtJwksMissingKeys',
1454
+ TokenVerificationSdJwtSignatureFailed = 'TokenVerificationSdJwtSignatureFailed',
1455
+ TokenVerificationSdJwtInvalidEmailVerified = 'TokenVerificationSdJwtInvalidEmailVerified',
1456
+ TokenVerificationSdJwtInvalidEmail = 'TokenVerificationSdJwtInvalidEmail',
1457
+ TokenVerificationSdJwtInvalidHolderKey = 'TokenVerificationSdJwtInvalidHolderKey',
1458
+ TokenVerificationKbInvalidTyp = 'TokenVerificationKbInvalidTyp',
1459
+ TokenVerificationKbMissingAud = 'TokenVerificationKbMissingAud',
1460
+ TokenVerificationKbMissingNonce = 'TokenVerificationKbMissingNonce',
1461
+ TokenVerificationKbMissingIat = 'TokenVerificationKbMissingIat',
1462
+ TokenVerificationKbMissingSdHash = 'TokenVerificationKbMissingSdHash',
1463
+ TokenVerificationKbInvalidIssuedAt = 'TokenVerificationKbInvalidIssuedAt',
1464
+ TokenVerificationKbInvalidAudience = 'TokenVerificationKbInvalidAudience',
1465
+ TokenVerificationKbInvalidNonce = 'TokenVerificationKbInvalidNonce',
1466
+ TokenVerificationKbInvalidSdHash = 'TokenVerificationKbInvalidSdHash',
1467
+ TokenVerificationKbMissingCnf = 'TokenVerificationKbMissingCnf',
1468
+ TokenVerificationKbSignatureFailed = 'TokenVerificationKbSignatureFailed',
1469
+ }
1470
+
1359
1471
  /**
1360
1472
  * This issue tracks client hints related issues. It's used to deprecate old
1361
1473
  * features, encourage the use of new ones, and provide general guidance.
@@ -1596,6 +1708,7 @@ export namespace Audits {
1596
1708
  PermissionElementIssue = 'PermissionElementIssue',
1597
1709
  PerformanceIssue = 'PerformanceIssue',
1598
1710
  SelectivePermissionsInterventionIssue = 'SelectivePermissionsInterventionIssue',
1711
+ EmailVerificationRequestIssue = 'EmailVerificationRequestIssue',
1599
1712
  }
1600
1713
 
1601
1714
  /**
@@ -1636,6 +1749,7 @@ export namespace Audits {
1636
1749
  permissionElementIssueDetails?: PermissionElementIssueDetails;
1637
1750
  performanceIssueDetails?: PerformanceIssueDetails;
1638
1751
  selectivePermissionsInterventionIssueDetails?: SelectivePermissionsInterventionIssueDetails;
1752
+ emailVerificationRequestIssueDetails?: EmailVerificationRequestIssueDetails;
1639
1753
  }
1640
1754
 
1641
1755
  /**
@@ -4665,6 +4779,7 @@ export namespace DOM {
4665
4779
  Picker = 'picker',
4666
4780
  PermissionIcon = 'permission-icon',
4667
4781
  OverscrollAreaParent = 'overscroll-area-parent',
4782
+ Skeleton = 'skeleton',
4668
4783
  }
4669
4784
 
4670
4785
  /**
@@ -11900,6 +12015,7 @@ export namespace Network {
11900
12015
  InvalidFederatedSessionProviderFailedToRestoreKey = 'InvalidFederatedSessionProviderFailedToRestoreKey',
11901
12016
  FailedToUnwrapKey = 'FailedToUnwrapKey',
11902
12017
  SessionDeletedDuringRefresh = 'SessionDeletedDuringRefresh',
12018
+ CrossOriginRegistrationSiteNotIncluded = 'CrossOriginRegistrationSiteNotIncluded',
11903
12019
  }
11904
12020
 
11905
12021
  /**
@@ -17109,6 +17225,7 @@ export namespace Preload {
17109
17225
  PrefetchIneligibleRetryAfter = 'PrefetchIneligibleRetryAfter',
17110
17226
  PrefetchIsPrivacyDecoy = 'PrefetchIsPrivacyDecoy',
17111
17227
  PrefetchIsStale = 'PrefetchIsStale',
17228
+ PrefetchNotEligibleBlockedByConnectionAllowlist = 'PrefetchNotEligibleBlockedByConnectionAllowlist',
17112
17229
  PrefetchNotEligibleBrowserContextOffTheRecord = 'PrefetchNotEligibleBrowserContextOffTheRecord',
17113
17230
  PrefetchNotEligibleDataSaverEnabled = 'PrefetchNotEligibleDataSaverEnabled',
17114
17231
  PrefetchNotEligibleExistingProxy = 'PrefetchNotEligibleExistingProxy',
@@ -17130,6 +17247,7 @@ export namespace Preload {
17130
17247
  PrefetchResponseUsed = 'PrefetchResponseUsed',
17131
17248
  PrefetchSuccessfulButNotUsed = 'PrefetchSuccessfulButNotUsed',
17132
17249
  PrefetchNotUsedProbeFailed = 'PrefetchNotUsedProbeFailed',
17250
+ PrefetchCancelledOnUserNavigation = 'PrefetchCancelledOnUserNavigation',
17133
17251
  }
17134
17252
 
17135
17253
  /**
@@ -19430,8 +19548,8 @@ export namespace Target {
19430
19548
  targetId: TargetID;
19431
19549
  /**
19432
19550
  * The id of the panel we want DevTools to open initially. Currently
19433
- * supported panels are elements, console, network, sources, resources
19434
- * and performance.
19551
+ * supported panels are elements, console, network, sources, resources,
19552
+ * timeline, chrome-recorder, heap-profiler, lighthouse, and security.
19435
19553
  */
19436
19554
  panelId?: string;
19437
19555
  }
@@ -12,6 +12,19 @@ declare module '*.css.js' {
12
12
  export default styles;
13
13
  }
14
14
 
15
+ declare module '*.skill.js' {
16
+ // Duplicated from front_end/models/ai_assistance/skills/Skill.ts
17
+ // to avoid importing from the source tree in a global declaration file,
18
+ // which was causing build artifacts to be generated in the source tree.
19
+ interface Skill {
20
+ name: 'styling';
21
+ description: string;
22
+ allowedTools: string[];
23
+ instructions: string;
24
+ }
25
+ export const skill: Skill;
26
+ }
27
+
15
28
  // TODO: remove once URLPattern types are available in TypeScript (see https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/1199).
16
29
  declare class URLPattern {
17
30
  constructor(input: string);
@@ -0,0 +1,116 @@
1
+ // Copyright 2026 The Chromium Authors
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ import * as Host from '../../core/host/host.js';
6
+
7
+ import {
8
+ type AgentOptions,
9
+ AiAgent,
10
+ type ContextResponse,
11
+ type ConversationContext,
12
+ type RequestOptions,
13
+ ResponseType
14
+ } from './agents/AiAgent.js';
15
+ import {debugLog} from './debug.js';
16
+ import type {Skill, SkillName} from './skills/Skill.js';
17
+ import {SKILLS} from './skills/SkillRegistry.js';
18
+
19
+ export class AiAgent2 extends AiAgent<unknown> {
20
+ // TODO: The static preamble is a placeholder and will eventually live server-side.
21
+ readonly preamble = 'You are a unified AI assistant in Chrome DevTools. You can learn skills to help the user.';
22
+ readonly clientFeature = Host.AidaClient.ClientFeature.CHROME_STYLING_AGENT; // Placeholder
23
+ readonly userTier = 'TESTERS';
24
+
25
+ #skillsInjected = false;
26
+
27
+ get options(): RequestOptions {
28
+ return {};
29
+ }
30
+
31
+ readonly #activeSkills = new Set<SkillName>();
32
+
33
+ constructor(opts: AgentOptions) {
34
+ super(opts);
35
+ const skillsList = Object.keys(SKILLS).join(', ');
36
+ this.declareFunction<{skills: SkillName[]}>('learnSkills', {
37
+ description: `Load skills to help with the task. Available skills: ${skillsList}.`,
38
+ parameters: {
39
+ type: Host.AidaClient.ParametersTypes.OBJECT,
40
+ description: 'Parameters for learning skills',
41
+ properties: {
42
+ skills: {
43
+ type: Host.AidaClient.ParametersTypes.ARRAY,
44
+ items: {
45
+ type: Host.AidaClient.ParametersTypes.STRING,
46
+ description: 'Skill name',
47
+ },
48
+ description: 'List of skill names to load',
49
+ },
50
+ },
51
+ required: ['skills'],
52
+ },
53
+ displayInfoFromArgs: args => {
54
+ return {
55
+ title: `Learning skills: ${args.skills.join(', ')}`,
56
+ };
57
+ },
58
+ handler: async args => {
59
+ const result = await this.learnSkill(args.skills);
60
+ return {result};
61
+ },
62
+ });
63
+ }
64
+
65
+ override async enhanceQuery(query: string): Promise<string> {
66
+ if (this.#skillsInjected) {
67
+ return query;
68
+ }
69
+ this.#skillsInjected = true;
70
+ const skillsManifest = Object.entries(SKILLS).map(([name, skill]) => `- ${name}: ${skill.description}`).join('\n');
71
+ return `Available skills:
72
+ ${skillsManifest}
73
+
74
+ You must call \`learnSkills\` to load a skill before you can use it.
75
+
76
+ User query: ${query}`;
77
+ }
78
+
79
+ async *
80
+ handleContextDetails(_select: ConversationContext<unknown>|null): AsyncGenerator<ContextResponse, void, void> {
81
+ yield {
82
+ type: ResponseType.CONTEXT,
83
+ details: [{
84
+ title: 'Status',
85
+ text: 'Minimal agent initialized.',
86
+ }],
87
+ };
88
+ }
89
+
90
+ async learnSkill(names: SkillName[]): Promise<string> {
91
+ let response = '';
92
+ for (const name of names) {
93
+ debugLog(`AiAgent2: Attempting to load skill ${name}`);
94
+ if (this.#activeSkills.has(name)) {
95
+ debugLog(`AiAgent2: Skill ${name} is already loaded`);
96
+ response += `Skill ${name} is already loaded.\n`;
97
+ continue;
98
+ }
99
+
100
+ const skillObj: Skill = SKILLS[name];
101
+ if (skillObj) {
102
+ this.#activeSkills.add(name);
103
+ debugLog(`AiAgent2: Skill ${name} loaded successfully`);
104
+ response += `Skill ${name} loaded. Instructions:\n${skillObj.instructions}\n`;
105
+ } else {
106
+ debugLog(`AiAgent2: Failed to load skill ${name}`);
107
+ response += `Failed to load skill ${name}. Valid skills are: ${Object.keys(SKILLS).join(', ')}.\n`;
108
+ }
109
+ }
110
+ return response.trim();
111
+ }
112
+
113
+ get activeSkills(): Set<SkillName> {
114
+ return this.#activeSkills;
115
+ }
116
+ }
@@ -13,6 +13,7 @@ import type * as NetworkTimeCalculator from '../network_time_calculator/network_
13
13
 
14
14
  import {AccessibilityAgent, AccessibilityContext} from './agents/AccessibilityAgent.js';
15
15
  import {
16
+ type AgentOptions,
16
17
  type AiAgent,
17
18
  type AllowedOriginResult,
18
19
  type ContextDetail,
@@ -23,13 +24,13 @@ import {
23
24
  ResponseType,
24
25
  type UserQuery
25
26
  } from './agents/AiAgent.js';
26
- import {BreakpointDebuggerAgent} from './agents/BreakpointDebuggerAgent.js';
27
27
  import {ContextSelectionAgent} from './agents/ContextSelectionAgent.js';
28
28
  import {FileAgent, FileContext} from './agents/FileAgent.js';
29
29
  import {NetworkAgent, RequestContext} from './agents/NetworkAgent.js';
30
30
  import {PerformanceAgent, PerformanceTraceContext} from './agents/PerformanceAgent.js';
31
31
  import {StorageAgent, StorageContext} from './agents/StorageAgent.js';
32
32
  import {NodeContext, StylingAgent} from './agents/StylingAgent.js';
33
+ import {AiAgent2} from './AiAgent2.js';
33
34
  import {AiHistoryStorage, ConversationType, type SerializedConversation} from './AiHistoryStorage.js';
34
35
  import type {ChangeManager} from './ChangeManager.js';
35
36
 
@@ -357,42 +358,27 @@ export class AiConversation {
357
358
  allowedOrigin: this.allowedOrigin,
358
359
  history,
359
360
  };
361
+
362
+ this.#agent = Root.Runtime.hostConfig.devToolsAiV2Architecture?.enabled ? new AiAgent2(options) :
363
+ this.#createV1Agent(type, options);
364
+ }
365
+
366
+ #createV1Agent(type: ConversationType, options: AgentOptions): AiAgent<unknown> {
360
367
  switch (type) {
361
- case ConversationType.STYLING: {
362
- this.#agent = new StylingAgent(options);
363
- break;
364
- }
365
- case ConversationType.NETWORK: {
366
- this.#agent = new NetworkAgent(options);
367
- break;
368
- }
369
- case ConversationType.FILE: {
370
- this.#agent = new FileAgent(options);
371
- break;
372
- }
373
- case ConversationType.PERFORMANCE: {
374
- this.#agent = new PerformanceAgent(options);
375
- break;
376
- }
377
- case ConversationType.BREAKPOINT: {
378
- const breakpointAgentEnabled = Greendev.Prototypes.instance().isEnabled('breakpointDebuggerAgent');
379
- if (breakpointAgentEnabled) {
380
- this.#agent = new BreakpointDebuggerAgent(options);
381
- }
382
- break;
383
- }
384
- case ConversationType.ACCESSIBILITY: {
385
- this.#agent = new AccessibilityAgent(options);
386
- break;
387
- }
388
- case ConversationType.STORAGE: {
389
- this.#agent = new StorageAgent(options);
390
- break;
391
- }
392
- case ConversationType.NONE: {
393
- this.#agent = new ContextSelectionAgent(options);
394
- break;
395
- }
368
+ case ConversationType.STYLING:
369
+ return new StylingAgent(options);
370
+ case ConversationType.NETWORK:
371
+ return new NetworkAgent(options);
372
+ case ConversationType.FILE:
373
+ return new FileAgent(options);
374
+ case ConversationType.PERFORMANCE:
375
+ return new PerformanceAgent(options);
376
+ case ConversationType.ACCESSIBILITY:
377
+ return new AccessibilityAgent(options);
378
+ case ConversationType.STORAGE:
379
+ return new StorageAgent(options);
380
+ case ConversationType.NONE:
381
+ return new ContextSelectionAgent(options);
396
382
  default:
397
383
  Platform.assertNever(type, 'Unknown conversation type');
398
384
  }
@@ -13,7 +13,6 @@ export const enum ConversationType {
13
13
  FILE = 'drjones-file',
14
14
  NETWORK = 'drjones-network-request',
15
15
  PERFORMANCE = 'drjones-performance-full',
16
- BREAKPOINT = 'breakpoint',
17
16
  ACCESSIBILITY = 'accessibility',
18
17
  STORAGE = 'storage',
19
18
  }
@@ -0,0 +1,46 @@
1
+ // Copyright 2026 The Chromium Authors
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ import * as Common from '../../core/common/common.js';
6
+ import type * as Platform from '../../core/platform/platform.js';
7
+
8
+ /**
9
+ * Returns true if the origin is considered opaque and should be blocked from
10
+ * AI assistance to prevent potential data leakage.
11
+ *
12
+ * @see https://crbug.com/513732588
13
+ */
14
+ export function isOpaqueOrigin(origin: string): boolean {
15
+ /**
16
+ * Origins starting with 'about' (like about:blank or about:srcdoc) are
17
+ * considered opaque. 'about://' is the sentinel used by DevTools
18
+ * ParsedURL.securityOrigin() for these.
19
+ */
20
+ return origin === 'null' || origin === 'data:' || origin.startsWith('about') || origin.startsWith('detached');
21
+ }
22
+
23
+ /**
24
+ * Extracts the origin from a context URL or identifier.
25
+ * Handles special cases like "detached" nodes and trace identifiers.
26
+ */
27
+ export function extractContextOrigin(contextURL: string): string {
28
+ if (isOpaqueOrigin(contextURL)) {
29
+ return contextURL;
30
+ }
31
+ if (contextURL.startsWith('trace-')) {
32
+ return contextURL;
33
+ }
34
+ return Common.ParsedURL.ParsedURL.extractOrigin(contextURL as Platform.DevToolsPath.UrlString);
35
+ }
36
+
37
+ /**
38
+ * Determines if two origins are equivalent and safe to be used together.
39
+ * Opaque origins are never equivalent to anything, not even themselves.
40
+ */
41
+ export function areOriginsEquivalent(origin1: string, origin2: string): boolean {
42
+ if (isOpaqueOrigin(origin1) || isOpaqueOrigin(origin2)) {
43
+ return false;
44
+ }
45
+ return origin1 === origin2;
46
+ }
@@ -62,3 +62,12 @@ export function isGeminiBranding(): boolean {
62
62
  export function getIconName(): string {
63
63
  return isGeminiBranding() ? 'spark' : 'smart-assistant';
64
64
  }
65
+
66
+ export function isSameOrigin(url1: Platform.DevToolsPath.UrlString, url2: Platform.DevToolsPath.UrlString): boolean {
67
+ if (url1.startsWith('data:') || url2.startsWith('data:')) {
68
+ return url1 === url2;
69
+ }
70
+ const origin1 = Common.ParsedURL.ParsedURL.extractOrigin(url1);
71
+ const origin2 = Common.ParsedURL.ParsedURL.extractOrigin(url2);
72
+ return origin1 !== '' && origin1 === origin2;
73
+ }
@@ -22,6 +22,22 @@ When the user begins a conversation with the AI, we want to include information
22
22
 
23
23
  To deal with the work to take an object that is the AI agent's context and turn it into a text representation that can be sent to the AI, we use _formatters_. These are typically classes with `static` methods that can take in objects and return their text representation that we want to pass to the AI.
24
24
 
25
+ ## Future Architecture (V2) - WIP
26
+
27
+ We are currently working on migrating the DevTools AI Assistance from a siloed multi-agent architecture to a unified, skill-based single-agent architecture (`AIAgent2`).
28
+
29
+ In this new architecture:
30
+ - A single agent (`AIAgent2`) handles multiple domains.
31
+ - Capabilities are defined as **Skills** in Markdown files.
32
+ - The agent can dynamically load skills as needed via a `learnSkill` tool.
33
+
34
+ This work is currently in progress and behind a feature flag.
35
+
36
+ ### Skills Build System
37
+
38
+ To support dynamic loading of skills, we generate JavaScript files from Markdown files containing skill definitions.
39
+ We use a nested `BUILD.gn` file in the `skills/` subdirectory specifically for this purpose. This ensures that GN's `target_gen_dir` points to `gen/front_end/models/ai_assistance/skills/`, placing the generated `.skill.js` files in the same relative structure as their source `.md` files. This allows TypeScript files in the `skills/` directory (like `map.ts`) to import the generated files using relative paths (e.g., `./styling.skill.js`) seamlessly.
40
+
25
41
  ## Performance specific documentation
26
42
 
27
43
  ### `TimelineUtils.AIContext.AgentFocus`
@@ -2,35 +2,39 @@
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
4
 
5
- interface StorageItemOriginOnly {
6
- origin: string;
7
- storageKey?: string;
8
- storageType?: never;
9
- key?: never;
5
+ export class StorageItem {
6
+ constructor(
7
+ /**
8
+ * The origin of the top-level primary page target being inspected.
9
+ * Used to restrict AI agent tools from accessing unauthorized pages.
10
+ */
11
+ readonly primaryTargetOrigin: string,
12
+ /**
13
+ * The origin of the selected storage or cookie item (if any).
14
+ * If no item is selected, this is the same as primaryTargetOrigin.
15
+ */
16
+ readonly origin: string,
17
+ ) {
18
+ }
10
19
  }
11
20
 
12
- interface StorageItemWithKey {
13
- origin: string;
14
- storageKey?: string;
15
- storageType: 'cookie'|'localStorage'|'sessionStorage';
16
- key: string;
21
+ export class DOMStorageItem extends StorageItem {
22
+ constructor(
23
+ primaryTargetOrigin: string,
24
+ origin: string,
25
+ /** The storage key partition identifier used by the browser storage engine. */
26
+ readonly storageKey: string,
27
+ /** The sub-category of DOM storage: 'localStorage' or 'sessionStorage'. */
28
+ readonly type: string,
29
+ /** The optional specific key of the selected item in this storage partition. */
30
+ readonly key?: string,
31
+ ) {
32
+ super(primaryTargetOrigin, origin);
33
+ }
17
34
  }
18
35
 
19
- export type StorageItemData = StorageItemOriginOnly|StorageItemWithKey;
20
-
21
- // The StorageItem is used as context for the Ai Assistance.
22
- // If the user selects a row in e.g. the cookies table, the storageType and key
23
- // will be populated.
24
- export class StorageItem {
25
- readonly origin: string;
26
- readonly storageKey?: string;
27
- readonly storageType?: 'cookie'|'localStorage'|'sessionStorage';
28
- readonly key?: string;
29
-
30
- constructor(data: StorageItemData) {
31
- this.origin = data.origin;
32
- this.storageKey = data.storageKey;
33
- this.storageType = data.storageType;
34
- this.key = data.key;
36
+ export class CookieItem extends StorageItem {
37
+ constructor(primaryTargetOrigin: string, origin: string, readonly name?: string) {
38
+ super(primaryTargetOrigin, origin);
35
39
  }
36
40
  }
@@ -4,9 +4,11 @@
4
4
 
5
5
  import * as Host from '../../../core/host/host.js';
6
6
  import * as i18n from '../../../core/i18n/i18n.js';
7
+ import type * as Platform from '../../../core/platform/platform.js';
7
8
  import * as Root from '../../../core/root/root.js';
8
9
  import * as SDK from '../../../core/sdk/sdk.js';
9
10
  import type * as LHModel from '../../lighthouse/lighthouse.js';
11
+ import {isSameOrigin} from '../AiUtils.js';
10
12
  import {ChangeManager} from '../ChangeManager.js';
11
13
  import {LighthouseFormatter} from '../data_formatters/LighthouseFormatter.js';
12
14
  import {debugLog} from '../debug.js';
@@ -91,8 +93,8 @@ export class AccessibilityContext extends ConversationContext<LHModel.ReporterTy
91
93
  return this.#lh.finalUrl ?? this.#lh.finalDisplayedUrl;
92
94
  }
93
95
 
94
- override getOrigin(): string {
95
- return new URL(this.#url()).origin;
96
+ override getURL(): string {
97
+ return this.#url();
96
98
  }
97
99
 
98
100
  override getItem(): LHModel.ReporterTypes.ReportJSON {
@@ -222,9 +224,14 @@ export class AccessibilityAgent extends AiAgent<LHModel.ReporterTypes.ReportJSON
222
224
  return null;
223
225
  }
224
226
 
225
- const resourceTreeModel = target.model(SDK.ResourceTreeModel.ResourceTreeModel);
226
- const mainFrameId = resourceTreeModel?.mainFrame?.id;
227
- if (node.frameId() !== mainFrameId) {
227
+ const mainDocument = domModel.existingDocument();
228
+ if (!mainDocument) {
229
+ return null;
230
+ }
231
+ const mainDocumentURL = mainDocument.documentURL;
232
+ const nodeDocumentURL = node.ownerDocument?.documentURL ?? '' as Platform.DevToolsPath.UrlString;
233
+
234
+ if (!isSameOrigin(mainDocumentURL, nodeDocumentURL)) {
228
235
  return null;
229
236
  }
230
237