chrome-devtools-frontend 1.0.1650100 → 1.0.1650677

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 (290) hide show
  1. package/.agents/skills/version-control/SKILL.md +5 -1
  2. package/config/typescript/tsconfig.base.json +1 -0
  3. package/front_end/core/host/InspectorFrontendHostAPI.ts +0 -1
  4. package/front_end/core/host/UserMetrics.ts +0 -26
  5. package/front_end/core/sdk/CSSMetadata.ts +72 -0
  6. package/front_end/devtools_compatibility.js +1 -2
  7. package/front_end/foundation/Universe.ts +7 -0
  8. package/front_end/models/ai_assistance/AiAgent2.ts +11 -1
  9. package/front_end/models/ai_assistance/README.md +4 -0
  10. package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +2 -0
  11. package/front_end/models/ai_assistance/agents/AiAgent.ts +3 -0
  12. package/front_end/models/ai_assistance/agents/ExecuteJavascript.ts +13 -4
  13. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +3 -7
  14. package/front_end/models/ai_assistance/ai_assistance.ts +4 -0
  15. package/front_end/models/ai_assistance/skills/Skill.ts +1 -1
  16. package/front_end/models/ai_assistance/skills/SkillRegistry.ts +2 -0
  17. package/front_end/models/ai_assistance/skills/accessibility.md +13 -0
  18. package/front_end/models/ai_assistance/tools/GetLighthouseAudits.ts +54 -0
  19. package/front_end/models/ai_assistance/tools/ResolveLighthousePath.ts +124 -0
  20. package/front_end/models/ai_assistance/tools/Tool.ts +12 -2
  21. package/front_end/models/ai_assistance/tools/ToolRegistry.ts +4 -0
  22. package/front_end/models/persistence/NetworkPersistenceManager.ts +9 -1
  23. package/front_end/panels/ai_assistance/components/ChatMessage.ts +3 -11
  24. package/front_end/panels/common/ExtensionServer.ts +70 -50
  25. package/front_end/panels/elements/ElementsPanel.ts +1 -1
  26. package/front_end/panels/js_timeline/js_timeline-meta.ts +1 -2
  27. package/front_end/panels/network/RequestConditionsDrawer.ts +236 -198
  28. package/front_end/panels/network/RequestHeadersView.ts +2 -2
  29. package/front_end/panels/network/components/RequestHeadersView.css +1 -0
  30. package/front_end/panels/network/components/ResponseHeaderSection.css +5 -1
  31. package/front_end/panels/network/requestConditionsDrawer.css +3 -0
  32. package/front_end/panels/recorder/testing/RecorderHelpers.ts +2 -0
  33. package/front_end/panels/timeline/timeline-meta.ts +1 -1
  34. package/front_end/panels/whats_new/ReleaseNoteText.ts +12 -6
  35. package/front_end/panels/whats_new/resources/WNDT.md +8 -7
  36. package/front_end/third_party/chromium/README.chromium +1 -1
  37. package/front_end/third_party/puppeteer/README.chromium +2 -2
  38. package/front_end/third_party/puppeteer/package/README.md +14 -0
  39. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +60 -24
  40. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +271 -164
  41. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts +2 -6
  42. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts.map +1 -1
  43. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.js +2 -2
  44. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.js.map +1 -1
  45. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js +2 -2
  46. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js.map +1 -1
  47. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.js +11 -7
  48. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.js.map +1 -1
  49. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/JSHandle.d.ts.map +1 -1
  50. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/JSHandle.js +3 -10
  51. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/JSHandle.js.map +1 -1
  52. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts +9 -4
  53. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts.map +1 -1
  54. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js +4 -4
  55. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js.map +1 -1
  56. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/WebWorker.d.ts +13 -0
  57. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/WebWorker.d.ts.map +1 -1
  58. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/WebWorker.js +14 -0
  59. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/WebWorker.js.map +1 -1
  60. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.js +5 -5
  61. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.js.map +1 -1
  62. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BidiOverCdp.js +2 -2
  63. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BidiOverCdp.js.map +1 -1
  64. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.js +3 -3
  65. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.js.map +1 -1
  66. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserConnector.js +5 -3
  67. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserConnector.js.map +1 -1
  68. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserContext.js +6 -6
  69. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserContext.js.map +1 -1
  70. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.d.ts +1 -1
  71. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.d.ts.map +1 -1
  72. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js +3 -3
  73. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js.map +1 -1
  74. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Deserializer.js +2 -2
  75. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Deserializer.js.map +1 -1
  76. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ExposedFunction.js +6 -6
  77. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ExposedFunction.js.map +1 -1
  78. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Frame.js +1 -1
  79. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Frame.js.map +1 -1
  80. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts +1 -0
  81. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts.map +1 -1
  82. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js +3 -0
  83. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js.map +1 -1
  84. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Realm.js +1 -1
  85. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Realm.js.map +1 -1
  86. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.d.ts +1 -0
  87. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
  88. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.js +11 -0
  89. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
  90. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Accessibility.d.ts.map +1 -1
  91. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Accessibility.js +4 -4
  92. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Accessibility.js.map +1 -1
  93. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Binding.js +3 -3
  94. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Binding.js.map +1 -1
  95. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts.map +1 -1
  96. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js +13 -2
  97. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js.map +1 -1
  98. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/BrowserConnector.js +2 -2
  99. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/BrowserConnector.js.map +1 -1
  100. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Connection.js +2 -2
  101. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Connection.js.map +1 -1
  102. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Coverage.js +2 -2
  103. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Coverage.js.map +1 -1
  104. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ElementHandle.js +1 -1
  105. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ElementHandle.js.map +1 -1
  106. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/EmulationManager.d.ts +1 -0
  107. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/EmulationManager.d.ts.map +1 -1
  108. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/EmulationManager.js +25 -4
  109. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/EmulationManager.js.map +1 -1
  110. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ExecutionContext.js +3 -3
  111. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ExecutionContext.js.map +1 -1
  112. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Extension.d.ts.map +1 -1
  113. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Extension.js +9 -11
  114. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Extension.js.map +1 -1
  115. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.js +3 -3
  116. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.js.map +1 -1
  117. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.d.ts.map +1 -1
  118. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js +7 -7
  119. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js.map +1 -1
  120. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.js +1 -1
  121. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.js.map +1 -1
  122. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/JSHandle.js +1 -1
  123. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/JSHandle.js.map +1 -1
  124. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.d.ts +3 -1
  125. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
  126. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js +18 -10
  127. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js.map +1 -1
  128. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts +1 -0
  129. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts.map +1 -1
  130. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js +17 -11
  131. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js.map +1 -1
  132. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.js +3 -3
  133. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.js.map +1 -1
  134. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/TargetManager.d.ts.map +1 -1
  135. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/TargetManager.js +28 -10
  136. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/TargetManager.js.map +1 -1
  137. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.d.ts.map +1 -1
  138. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.js +10 -6
  139. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.js.map +1 -1
  140. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebWorker.d.ts +3 -0
  141. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebWorker.d.ts.map +1 -1
  142. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebWorker.js +20 -5
  143. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebWorker.js.map +1 -1
  144. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.d.ts.map +1 -1
  145. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js +11 -0
  146. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js.map +1 -1
  147. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.js +2 -2
  148. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.js.map +1 -1
  149. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/CallbackRegistry.js +2 -2
  150. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/CallbackRegistry.js.map +1 -1
  151. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Configuration.d.ts +4 -2
  152. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Configuration.d.ts.map +1 -1
  153. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts +26 -13
  154. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts.map +1 -1
  155. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.d.ts +1 -6
  156. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.d.ts.map +1 -1
  157. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.js +24 -33
  158. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.js.map +1 -1
  159. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.js +2 -2
  160. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.js.map +1 -1
  161. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.d.ts +8 -1
  162. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.d.ts.map +1 -1
  163. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js +8 -1
  164. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js.map +1 -1
  165. package/front_end/third_party/puppeteer/package/lib/puppeteer/environment.d.ts +2 -0
  166. package/front_end/third_party/puppeteer/package/lib/puppeteer/environment.d.ts.map +1 -1
  167. package/front_end/third_party/puppeteer/package/lib/puppeteer/environment.js +4 -2
  168. package/front_end/third_party/puppeteer/package/lib/puppeteer/environment.js.map +1 -1
  169. package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.d.ts +1 -1
  170. package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.d.ts.map +1 -1
  171. package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.js +1 -1
  172. package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.js.map +1 -1
  173. package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/TextContent.d.ts.map +1 -1
  174. package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/TextContent.js +15 -5
  175. package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/TextContent.js.map +1 -1
  176. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts +5 -1
  177. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  178. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js +17 -16
  179. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js.map +1 -1
  180. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
  181. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.js +14 -9
  182. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.js.map +1 -1
  183. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/FirefoxLauncher.js +2 -2
  184. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/FirefoxLauncher.js.map +1 -1
  185. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.js +2 -2
  186. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.js.map +1 -1
  187. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/PipeTransport.js +3 -3
  188. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/PipeTransport.js.map +1 -1
  189. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.d.ts +20 -0
  190. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.d.ts.map +1 -1
  191. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.js +38 -9
  192. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.js.map +1 -1
  193. package/front_end/third_party/puppeteer/package/lib/puppeteer/node-env-setup.d.ts +7 -0
  194. package/front_end/third_party/puppeteer/package/lib/puppeteer/node-env-setup.d.ts.map +1 -0
  195. package/front_end/third_party/puppeteer/package/lib/puppeteer/node-env-setup.js +16 -0
  196. package/front_end/third_party/puppeteer/package/lib/puppeteer/node-env-setup.js.map +1 -0
  197. package/front_end/third_party/puppeteer/package/lib/puppeteer/puppeteer-core.d.ts +1 -0
  198. package/front_end/third_party/puppeteer/package/lib/puppeteer/puppeteer-core.d.ts.map +1 -1
  199. package/front_end/third_party/puppeteer/package/lib/puppeteer/puppeteer-core.js +3 -8
  200. package/front_end/third_party/puppeteer/package/lib/puppeteer/puppeteer-core.js.map +1 -1
  201. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +3 -3
  202. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +3 -3
  203. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js.map +1 -1
  204. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
  205. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
  206. package/front_end/third_party/puppeteer/package/lib/types.d.ts +60 -24
  207. package/front_end/third_party/puppeteer/package/package.json +4 -4
  208. package/front_end/third_party/puppeteer/package/src/api/Browser.ts +4 -8
  209. package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +2 -2
  210. package/front_end/third_party/puppeteer/package/src/api/HTTPRequest.ts +10 -10
  211. package/front_end/third_party/puppeteer/package/src/api/JSHandle.ts +3 -10
  212. package/front_end/third_party/puppeteer/package/src/api/Page.ts +14 -8
  213. package/front_end/third_party/puppeteer/package/src/api/WebWorker.ts +30 -0
  214. package/front_end/third_party/puppeteer/package/src/api/locators/locators.ts +5 -5
  215. package/front_end/third_party/puppeteer/package/src/bidi/BidiOverCdp.ts +2 -2
  216. package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +3 -3
  217. package/front_end/third_party/puppeteer/package/src/bidi/BrowserConnector.ts +5 -3
  218. package/front_end/third_party/puppeteer/package/src/bidi/BrowserContext.ts +6 -6
  219. package/front_end/third_party/puppeteer/package/src/bidi/Connection.ts +4 -4
  220. package/front_end/third_party/puppeteer/package/src/bidi/Deserializer.ts +2 -2
  221. package/front_end/third_party/puppeteer/package/src/bidi/ExposedFunction.ts +6 -6
  222. package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +1 -1
  223. package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +4 -0
  224. package/front_end/third_party/puppeteer/package/src/bidi/Realm.ts +1 -1
  225. package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +11 -0
  226. package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +6 -4
  227. package/front_end/third_party/puppeteer/package/src/cdp/Binding.ts +3 -3
  228. package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +14 -2
  229. package/front_end/third_party/puppeteer/package/src/cdp/BrowserConnector.ts +2 -2
  230. package/front_end/third_party/puppeteer/package/src/cdp/Connection.ts +2 -2
  231. package/front_end/third_party/puppeteer/package/src/cdp/Coverage.ts +2 -2
  232. package/front_end/third_party/puppeteer/package/src/cdp/ElementHandle.ts +1 -1
  233. package/front_end/third_party/puppeteer/package/src/cdp/EmulationManager.ts +36 -4
  234. package/front_end/third_party/puppeteer/package/src/cdp/ExecutionContext.ts +3 -3
  235. package/front_end/third_party/puppeteer/package/src/cdp/Extension.ts +16 -17
  236. package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +3 -3
  237. package/front_end/third_party/puppeteer/package/src/cdp/FrameManager.ts +12 -7
  238. package/front_end/third_party/puppeteer/package/src/cdp/HTTPRequest.ts +1 -1
  239. package/front_end/third_party/puppeteer/package/src/cdp/JSHandle.ts +1 -1
  240. package/front_end/third_party/puppeteer/package/src/cdp/NetworkManager.ts +22 -11
  241. package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +18 -10
  242. package/front_end/third_party/puppeteer/package/src/cdp/Target.ts +3 -3
  243. package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +37 -12
  244. package/front_end/third_party/puppeteer/package/src/cdp/WebMCP.ts +11 -9
  245. package/front_end/third_party/puppeteer/package/src/cdp/WebWorker.ts +33 -5
  246. package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +11 -0
  247. package/front_end/third_party/puppeteer/package/src/common/BrowserWebSocketTransport.ts +2 -2
  248. package/front_end/third_party/puppeteer/package/src/common/CallbackRegistry.ts +2 -2
  249. package/front_end/third_party/puppeteer/package/src/common/Configuration.ts +4 -2
  250. package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +26 -13
  251. package/front_end/third_party/puppeteer/package/src/common/Debug.ts +30 -40
  252. package/front_end/third_party/puppeteer/package/src/common/EventEmitter.ts +2 -2
  253. package/front_end/third_party/puppeteer/package/src/common/util.ts +9 -1
  254. package/front_end/third_party/puppeteer/package/src/environment.ts +7 -3
  255. package/front_end/third_party/puppeteer/package/src/generated/injected.ts +1 -1
  256. package/front_end/third_party/puppeteer/package/src/injected/TextContent.ts +15 -5
  257. package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +23 -23
  258. package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +19 -13
  259. package/front_end/third_party/puppeteer/package/src/node/FirefoxLauncher.ts +2 -2
  260. package/front_end/third_party/puppeteer/package/src/node/NodeWebSocketTransport.ts +2 -2
  261. package/front_end/third_party/puppeteer/package/src/node/PipeTransport.ts +3 -3
  262. package/front_end/third_party/puppeteer/package/src/node/ScreenRecorder.ts +44 -9
  263. package/front_end/third_party/puppeteer/package/src/node-env-setup.ts +18 -0
  264. package/front_end/third_party/puppeteer/package/src/puppeteer-core.ts +5 -9
  265. package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
  266. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  267. package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +1 -0
  268. package/front_end/third_party/third-party-web/lib/nostats-subset.js +21 -15
  269. package/front_end/third_party/third-party-web/package/README.md +619 -582
  270. package/front_end/third_party/third-party-web/package/dist/entities-httparchive-nostats.json +1 -1
  271. package/front_end/third_party/third-party-web/package/dist/entities-httparchive.json +1 -1
  272. package/front_end/third_party/third-party-web/package/dist/entities-nostats.json +1 -1
  273. package/front_end/third_party/third-party-web/package/dist/entities.json +1 -1
  274. package/front_end/third_party/third-party-web/package/lib/create-entity-finder-api.js +27 -15
  275. package/front_end/third_party/third-party-web/package/lib/create-entity-finder-api.test.js +14 -0
  276. package/front_end/third_party/third-party-web/package/lib/entities.test.js +10 -0
  277. package/front_end/third_party/third-party-web/package/lib/index.test.js +6 -6
  278. package/front_end/third_party/third-party-web/package/lib/markdown/template.md +1 -3
  279. package/front_end/third_party/third-party-web/package/package.json +7 -3
  280. package/front_end/third_party/third-party-web/package.json +1 -1
  281. package/front_end/tsconfig.json +1 -2
  282. package/front_end/ui/components/buttons/floatingButton.css +3 -3
  283. package/front_end/ui/components/lists/list.css +2 -0
  284. package/front_end/ui/legacy/ListWidget.ts +8 -5
  285. package/front_end/ui/legacy/TextPrompt.ts +5 -2
  286. package/front_end/ui/legacy/textPrompt.css +1 -0
  287. package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
  288. package/inspector_overlay/tsconfig.json +3 -10
  289. package/mcp/tsconfig.json +1 -5
  290. package/package.json +1 -2
@@ -1,10 +1,14 @@
1
1
  ---
2
2
  name: devtools-version-control
3
- description: Use when managing branches, creating and uploading CLs, or handling stacked changes in the DevTools Gerrit-based workflow.
3
+ description: Use when starting a new task, creating a branch, switching branches, managing branches, creating and uploading CLs, or handling stacked changes in the DevTools Gerrit-based workflow. ALWAYS use this instead of running standard git checkout/switch commands for branch creation.
4
4
  ---
5
5
 
6
6
  # DevTools Version Control
7
7
 
8
+ > [!IMPORTANT]
9
+ > **DO NOT use standard Git commands like `git checkout -b` or `git switch -c` to create branches.**
10
+ > In Chrome DevTools, you MUST always use `git new-branch <branch-name>` (or `git new-branch --upstream_current <branch-name>` for stacked CLs). Standard commands fail to configure the correct upstream tracking branch required by `depot_tools` and Gerrit.
11
+
8
12
  ## Overview
9
13
  Chrome DevTools uses Gerrit for code review. The standard workflow is **one branch per Change List (CL)** and **one commit per branch**. Instead of multiple commits, you amend your single commit locally.
10
14
 
@@ -18,6 +18,7 @@
18
18
  "noFallthroughCasesInSwitch": true,
19
19
 
20
20
  "experimentalDecorators": true,
21
+ "allowSyntheticDefaultImports": true,
21
22
 
22
23
  "composite": true,
23
24
  "declaration": true,
@@ -556,6 +556,5 @@ export const enum EnumeratedHistogram {
556
556
  LighthouseCategoryUsed = 'DevTools.LighthouseCategoryUsed',
557
557
  SwatchActivated = 'DevTools.SwatchActivated',
558
558
  BuiltInAiAvailability = 'DevTools.BuiltInAiAvailability',
559
- ExtensionEvalTarget = 'DevTools.ExtensionEvalTarget',
560
559
  // LINT.ThenChange(/front_end/devtools_compatibility.js:EnumeratedHistogram)
561
560
  }
@@ -204,21 +204,6 @@ export class UserMetrics {
204
204
  InspectorFrontendHostInstance.recordCountHistogram('DevTools.Freestyler.EvalResponseSize', bytes, 0, 100_000, 100);
205
205
  }
206
206
 
207
- performanceAINetworkSummaryResponseSize(bytes: number): void {
208
- InspectorFrontendHostInstance.recordCountHistogram(
209
- 'DevTools.PerformanceAI.NetworkSummaryResponseSize', bytes, 0, 100_000, 100);
210
- }
211
-
212
- performanceAINetworkRequestDetailResponseSize(bytes: number): void {
213
- InspectorFrontendHostInstance.recordCountHistogram(
214
- 'DevTools.PerformanceAI.NetworkRequestDetailResponseSize', bytes, 0, 100_000, 100);
215
- }
216
-
217
- performanceAIMainThreadActivityResponseSize(bytes: number): void {
218
- InspectorFrontendHostInstance.recordCountHistogram(
219
- 'DevTools.PerformanceAI.MainThreadActivityResponseSize', bytes, 0, 100_000, 100);
220
- }
221
-
222
207
  builtInAiAvailability(availability: BuiltInAiAvailability): void {
223
208
  InspectorFrontendHostInstance.recordEnumeratedHistogram(
224
209
  EnumeratedHistogram.BuiltInAiAvailability, availability, BuiltInAiAvailability.MAX_VALUE);
@@ -269,10 +254,6 @@ export class UserMetrics {
269
254
  'DevTools.Insights.ShortTeaserGenerationTime', timeInMilliseconds);
270
255
  }
271
256
 
272
- extensionEvalTarget(target: ExtensionEvalTarget): void {
273
- InspectorFrontendHostInstance.recordEnumeratedHistogram(
274
- EnumeratedHistogram.ExtensionEvalTarget, target, ExtensionEvalTarget.MAX_VALUE);
275
- }
276
257
  }
277
258
 
278
259
  /**
@@ -1212,10 +1193,3 @@ export const enum BuiltInAiAvailability {
1212
1193
  DISABLED_NO_GPU = 9,
1213
1194
  MAX_VALUE = 10,
1214
1195
  }
1215
-
1216
- export const enum ExtensionEvalTarget {
1217
- WEB_PAGE = 0,
1218
- SAME_EXTENSION = 1,
1219
- OTHER_EXTENSION = 2,
1220
- MAX_VALUE = 3,
1221
- }
@@ -138,6 +138,9 @@ export class CSSMetadata {
138
138
  if (preset && preset !== value) {
139
139
  return false;
140
140
  }
141
+ if (partialValueKeywordsNoPresets.get(name)?.has(value)) {
142
+ return false;
143
+ }
141
144
  return CSS.supports(name, value);
142
145
  })
143
146
  .sort(CSSMetadata.sortPrefixesAndCSSWideKeywordsToEnd);
@@ -517,9 +520,78 @@ const valuePresets = new Map([
517
520
  ['ornaments', 'ornaments(||)'],
518
521
  ['annotation', 'annotation(||)'],
519
522
  ]),
523
+ ],
524
+ [
525
+ 'clip-path', new Map([
526
+ ['inset', 'inset(|10px|)'],
527
+ ['circle', 'circle(|100px|)'],
528
+ ['ellipse', 'ellipse(|100px 100px|)'],
529
+ ['polygon', 'polygon(|50px 0px, 100px 100px, 0px 100px|)'],
530
+ ['url', 'url(||)'],
531
+ ])
532
+ ],
533
+ [
534
+ 'transition-timing-function', new Map([
535
+ ['steps', 'steps(|5, end|)'],
536
+ ['cubic-bezier', 'cubic-bezier(|0.25, 0.1, 0.25, 1|)'],
537
+ ])
538
+ ],
539
+ [
540
+ 'animation-timing-function', new Map([
541
+ ['steps', 'steps(|5, end|)'],
542
+ ['cubic-bezier', 'cubic-bezier(|0.25, 0.1, 0.25, 1|)'],
543
+ ])
544
+ ],
545
+ [
546
+ 'box-shadow',
547
+ new Map([
548
+ ['inset', 'inset |0 0 10px black|'],
549
+ ]),
550
+ ],
551
+ [
552
+ 'font-size-adjust',
553
+ new Map([
554
+ ['ex-height', 'ex-height |0.5|'],
555
+ ['cap-height', 'cap-height |0.5|'],
556
+ ['ch-width', 'ch-width |0.5|'],
557
+ ['ic-width', 'ic-width |0.5|'],
558
+ ['ic-height', 'ic-height |0.5|'],
559
+ ]),
560
+ ],
561
+ [
562
+ 'initial-letter',
563
+ new Map([
564
+ ['drop', 'drop |2|'],
565
+ ['raise', 'raise |2|'],
566
+ ]),
567
+ ],
568
+ [
569
+ 'text-box-edge', new Map([
570
+ ['cap', 'cap alphabetic'],
571
+ ['ex', 'ex alphabetic'],
572
+ ])
520
573
  ]
521
574
  ]);
522
575
 
576
+ const partialValueKeywordsNoPresets = new Map<string, Set<string>>([
577
+ ['scroll-snap-type', new Set(['mandatory', 'proximity'])],
578
+ ['scrollbar-gutter', new Set(['both-edges'])],
579
+ ['animation-timing-function', new Set(['jump-both', 'jump-end', 'jump-none', 'jump-start'])],
580
+ ['transition-timing-function', new Set(['jump-both', 'jump-end', 'jump-none', 'jump-start'])],
581
+ [
582
+ 'animation-trigger', new Set([
583
+ 'play',
584
+ 'pause',
585
+ 'play-once',
586
+ 'play-alternate',
587
+ 'play-forwards',
588
+ 'play-backwards',
589
+ 'play-pause',
590
+ 'replay',
591
+ ])
592
+ ],
593
+ ]);
594
+
523
595
  const distanceProperties = new Set<string>([
524
596
  'background-position',
525
597
  'border-spacing',
@@ -444,8 +444,7 @@
444
444
  TimelineNavigationSettingState: 'DevTools.TimelineNavigationSettingState',
445
445
  SyncSetting: 'DevTools.SyncSetting',
446
446
  SwatchActivated: 'DevTools.SwatchActivated',
447
- BuiltInAiAvailability: 'DevTools.BuiltInAiAvailability',
448
- ExtensionEvalTarget: 'DevTools.ExtensionEvalTarget'
447
+ BuiltInAiAvailability: 'DevTools.BuiltInAiAvailability'
449
448
  // LINT.ThenChange(/front_end/core/host/InspectorFrontendHostAPI.ts:EnumeratedHistogram)
450
449
  };
451
450
 
@@ -14,6 +14,9 @@ export interface CreationOptions {
14
14
  }
15
15
 
16
16
  export class Universe {
17
+ // TODO(crbug.com/493763857): Once a singleton is no longer a singleton (i.e. it has no 'instance')
18
+ // static method, we can move it out of the `DevToolsContext` and store it
19
+ // directly on the `Universe`.
17
20
  readonly context: Root.DevToolsContext.DevToolsContext;
18
21
 
19
22
  constructor(options: CreationOptions) {
@@ -59,4 +62,8 @@ export class Universe {
59
62
  resourceMapping, targetManager, ignoreListManager, workspace);
60
63
  context.set(Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding, debuggerWorkspaceBinding);
61
64
  }
65
+
66
+ get pageResourceLoader(): SDK.PageResourceLoader.PageResourceLoader {
67
+ return this.context.get(SDK.PageResourceLoader.PageResourceLoader);
68
+ }
62
69
  }
@@ -4,6 +4,7 @@
4
4
 
5
5
  import * as Host from '../../core/host/host.js';
6
6
  import * as SDK from '../../core/sdk/sdk.js';
7
+ import type * as LHModel from '../lighthouse/lighthouse.js';
7
8
 
8
9
  import {
9
10
  AiAgent,
@@ -27,6 +28,7 @@ import {ToolRegistry} from './tools/ToolRegistry.js';
27
28
  const SKILL_DISPLAY_NAMES: Record<SkillName, string> = {
28
29
  styling: 'CSS and styling',
29
30
  network: 'Network requests',
31
+ accessibility: 'Accessibility',
30
32
  };
31
33
 
32
34
  const preamble = `You are the most advanced unified AI assistant integrated into Chrome DevTools.
@@ -56,6 +58,10 @@ If the user asks a question that requires an investigation or debugging, use thi
56
58
  * **CRITICAL**: Do not write full Python programs or other scripts to interact with the environment. Only invoke the allowed tools.
57
59
  * **CRITICAL**: Do not expose raw, internal system identifiers (such as database IDs, internal node paths, or event keys) directly to the user. Use descriptive names instead.`;
58
60
 
61
+ export interface AiAgent2Options extends ExecuteJsAgentOptions {
62
+ lighthouseRecording?: (overrides?: LHModel.RunTypes.RunOverrides) => Promise<LHModel.ReporterTypes.ReportJSON|null>;
63
+ }
64
+
59
65
  export class AiAgent2 extends AiAgent<unknown> {
60
66
  // TODO: The static preamble is a placeholder and will eventually live server-side.
61
67
  readonly preamble = preamble;
@@ -65,6 +71,8 @@ export class AiAgent2 extends AiAgent<unknown> {
65
71
  #changes = new ChangeManager();
66
72
  #execJs: typeof executeJsCode;
67
73
  readonly #allowedOrigin?: () => AllowedOriginResult;
74
+ readonly #lighthouseRecording?:
75
+ (overrides?: LHModel.RunTypes.RunOverrides) => Promise<LHModel.ReporterTypes.ReportJSON|null>;
68
76
 
69
77
  get options(): RequestOptions {
70
78
  return {};
@@ -73,8 +81,9 @@ export class AiAgent2 extends AiAgent<unknown> {
73
81
  readonly #activeSkills = new Set<SkillName>();
74
82
  readonly #declaredTools = new Set<string>();
75
83
 
76
- constructor(opts: ExecuteJsAgentOptions) {
84
+ constructor(opts: AiAgent2Options) {
77
85
  super(opts);
86
+ this.#lighthouseRecording = opts.lighthouseRecording;
78
87
  this.#execJs = opts.execJs ?? executeJsCode;
79
88
  this.#allowedOrigin = opts.allowedOrigin;
80
89
  this.#declaredTools.add('learnSkills');
@@ -224,6 +233,7 @@ User query: ${enhancedQuery}`;
224
233
  getExecutionContextNode: () => this.context instanceof DOMNodeContext ? this.context.getItem() : null,
225
234
  getTarget: () => SDK.TargetManager.TargetManager.instance().primaryPageTarget(),
226
235
  getEstablishedOrigin: () => this.#getConversationOrigin(),
236
+ lighthouseRecording: this.#lighthouseRecording,
227
237
  };
228
238
  return tool.handler(args, context, options);
229
239
  },
@@ -105,6 +105,10 @@ To aid debugging, you can enable the AI Assistance logging. This setting is stor
105
105
 
106
106
  Now, when interacting with the AI and sending requests, you will see output logged to the console. You can use the `debugLog` helper to add your own logging as you are building out your feature.
107
107
 
108
+ ### Testing the Accessibility Skill
109
+
110
+ The accessibility skill (`accessibility.md`) relies on an active Lighthouse report. Before interacting with the agent using this skill, ensure you have run a Lighthouse audit on the page you are inspecting so that the `getLighthouseAudits` tool can retrieve the report data.
111
+
108
112
  ## Security & Origin Isolation
109
113
 
110
114
  To prevent prompt injection attacks and cross-origin data leaks, the AI Assistance panel enforces strict origin-lock boundaries:
@@ -483,6 +483,8 @@ export class AccessibilityAgent extends AiAgent<LHModel.ReporterTypes.ReportJSON
483
483
  name: 'DOM_TREE',
484
484
  data: {
485
485
  root: snapshot,
486
+ title: i18n.i18n.lockedString('Element details'),
487
+ accessibleRevealLabel: i18n.i18n.lockedString('Reveal element'),
486
488
  },
487
489
  });
488
490
 
@@ -4,6 +4,7 @@
4
4
 
5
5
  import * as Host from '../../../core/host/host.js';
6
6
  import type {UrlString} from '../../../core/platform/DevToolsPath.js';
7
+ import type * as Platform from '../../../core/platform/platform.js';
7
8
  import * as Root from '../../../core/root/root.js';
8
9
  import type * as SDK from '../../../core/sdk/sdk.js';
9
10
  import type * as Protocol from '../../../generated/protocol.js';
@@ -274,6 +275,8 @@ export interface DomTreeAiWidget {
274
275
  name: 'DOM_TREE';
275
276
  data: {
276
277
  root: SDK.DOMModel.DOMNodeSnapshot,
278
+ title: Platform.UIString.LocalizedString,
279
+ accessibleRevealLabel: Platform.UIString.LocalizedString,
277
280
  networkRequest?: {
278
281
  url: string,
279
282
  size: number,
@@ -179,7 +179,11 @@ export class JavascriptExecutor {
179
179
  return error;
180
180
  }
181
181
  }`;
182
+ const timeoutSentinel = Symbol('timeout');
183
+ const {promise: timeoutPromise, resolve: resolveTimeout} = Promise.withResolvers<typeof timeoutSentinel>();
184
+ let timeoutId: ReturnType<typeof setTimeout>|undefined;
182
185
  try {
186
+ timeoutId = setTimeout(() => resolveTimeout(timeoutSentinel), OBSERVATION_TIMEOUT);
183
187
  const result = await Promise.race([
184
188
  this.#execJs(
185
189
  functionDeclaration,
@@ -188,11 +192,11 @@ export class JavascriptExecutor {
188
192
  contextNode: this.#options.getContextNode(),
189
193
  },
190
194
  ),
191
- new Promise<never>((_, reject) => {
192
- setTimeout(
193
- () => reject(new Error('Script execution exceeded the maximum allowed time.')), OBSERVATION_TIMEOUT);
194
- }),
195
+ timeoutPromise,
195
196
  ]);
197
+ if (result === timeoutSentinel) {
198
+ throw new Error('Script execution exceeded the maximum allowed time.');
199
+ }
196
200
  const byteCount = Platform.StringUtilities.countWtf8Bytes(result);
197
201
  Host.userMetrics.freestylerEvalResponseSize(byteCount);
198
202
  if (byteCount > MAX_OBSERVATION_BYTE_LENGTH) {
@@ -217,6 +221,11 @@ export class JavascriptExecutor {
217
221
  sideEffect: false,
218
222
  canceled: false,
219
223
  };
224
+ } finally {
225
+ if (timeoutId !== undefined) {
226
+ clearTimeout(timeoutId);
227
+ }
228
+ resolveTimeout(timeoutSentinel);
220
229
  }
221
230
  }
222
231
  }
@@ -6,7 +6,7 @@ import * as Common from '../../../core/common/common.js';
6
6
  import * as Host from '../../../core/host/host.js';
7
7
  import * as i18n from '../../../core/i18n/i18n.js';
8
8
  import type {UrlString} from '../../../core/platform/DevToolsPath.js';
9
- import * as Platform from '../../../core/platform/platform.js';
9
+ import type * as Platform from '../../../core/platform/platform.js';
10
10
  import * as Root from '../../../core/root/root.js';
11
11
  import * as SDK from '../../../core/sdk/sdk.js';
12
12
  import * as Tracing from '../../../services/tracing/tracing.js';
@@ -936,9 +936,6 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
936
936
  };
937
937
  }
938
938
 
939
- const byteCount = Platform.StringUtilities.countWtf8Bytes(summary);
940
- Host.userMetrics.performanceAIMainThreadActivityResponseSize(byteCount);
941
-
942
939
  this.#cacheFunctionResult(focus, cacheKey, summary);
943
940
  const widgets: AiWidget[] = [];
944
941
  widgets.push({
@@ -1054,6 +1051,8 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
1054
1051
  data: {
1055
1052
  root: snapshot,
1056
1053
  networkRequest,
1054
+ title: lockedString('LCP element'),
1055
+ accessibleRevealLabel: lockedString('Reveal LCP element'),
1057
1056
  },
1058
1057
  });
1059
1058
  }
@@ -1225,9 +1224,6 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
1225
1224
  };
1226
1225
  }
1227
1226
 
1228
- const byteCount = Platform.StringUtilities.countWtf8Bytes(summary);
1229
- Host.userMetrics.performanceAINetworkSummaryResponseSize(byteCount);
1230
-
1231
1227
  const key = `getNetworkTrackSummary({min: ${bounds.min}, max: ${bounds.max}})`;
1232
1228
  this.#cacheFunctionResult(focus, key, summary);
1233
1229
  return {
@@ -43,9 +43,11 @@ import * as AIQueries from './performance/AIQueries.js';
43
43
  import * as PerformanceAnnotations from './PerformanceAnnotations.js';
44
44
  import * as StorageItem from './StorageItem.js';
45
45
  import * as ExecuteJavaScript from './tools/ExecuteJavaScript.js';
46
+ import * as GetLighthouseAudits from './tools/GetLighthouseAudits.js';
46
47
  import * as GetNetworkRequestDetails from './tools/GetNetworkRequestDetails.js';
47
48
  import * as GetStyles from './tools/GetStyles.js';
48
49
  import * as ListNetworkRequests from './tools/ListNetworkRequests.js';
50
+ import * as ResolveLighthousePath from './tools/ResolveLighthousePath.js';
49
51
  import * as Tool from './tools/Tool.js';
50
52
  import * as ToolRegistry from './tools/ToolRegistry.js';
51
53
 
@@ -74,6 +76,7 @@ export {
74
76
  FileAgent,
75
77
  FileContext,
76
78
  FileFormatter,
79
+ GetLighthouseAudits,
77
80
  GetNetworkRequestDetails,
78
81
  GetStyles,
79
82
  GreenDevAgent,
@@ -90,6 +93,7 @@ export {
90
93
  PerformanceInsightFormatter,
91
94
  PerformanceTraceFormatter,
92
95
  RequestContext,
96
+ ResolveLighthousePath,
93
97
  StorageAgent,
94
98
  StorageItem,
95
99
  StylingAgent,
@@ -3,7 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  // This will become a union type as we add more skills (e.g. 'styling' | 'network').
6
- export type SkillName = 'styling'|'network';
6
+ export type SkillName = 'styling'|'network'|'accessibility';
7
7
 
8
8
  export interface Skill {
9
9
  name: SkillName;
@@ -2,6 +2,7 @@
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
+ import {skill as accessibilitySkill} from './accessibility.skill.js';
5
6
  import {skill as networkSkill} from './network.skill.js';
6
7
  import type {Skill, SkillName} from './Skill.js';
7
8
  import {skill as stylingSkill} from './styling.skill.js';
@@ -9,4 +10,5 @@ import {skill as stylingSkill} from './styling.skill.js';
9
10
  export const SKILLS: Record<SkillName, Skill> = {
10
11
  styling: stylingSkill,
11
12
  network: networkSkill,
13
+ accessibility: accessibilitySkill,
12
14
  };
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: accessibility
3
+ description: Accessibility audits and report querying.
4
+ allowed-tools:
5
+ - getLighthouseAudits
6
+ - resolveLighthousePath
7
+ - getStyles
8
+ ---
9
+ You are an expert accessibility debugging assistant.
10
+ Use getLighthouseAudits to query details from the active report.
11
+
12
+ * ALWAYS use resolveLighthousePath to resolve failing element paths to backend node IDs.
13
+ * Once resolved, use getStyles on the backend node ID to inspect layout and styling properties.
@@ -0,0 +1,54 @@
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
+ import type * as LHModel from '../../lighthouse/lighthouse.js';
7
+ import type {FunctionCallHandlerResult} from '../agents/AiAgent.js';
8
+ import {AccessibilityContext} from '../contexts/AccessibilityContext.js';
9
+ import {LighthouseFormatter} from '../data_formatters/LighthouseFormatter.js';
10
+
11
+ import {type BaseToolCapability, type Tool, type ToolArgs, ToolName} from './Tool.js';
12
+
13
+ export interface GetLighthouseAuditsArgs extends ToolArgs {
14
+ categoryId: LHModel.RunTypes.CategoryId;
15
+ }
16
+
17
+ export class GetLighthouseAuditsTool implements Tool<GetLighthouseAuditsArgs, {audits: string}, BaseToolCapability> {
18
+ readonly name = ToolName.GET_LIGHTHOUSE_AUDITS;
19
+ readonly description = 'Returns the audits for a specific Lighthouse category.';
20
+
21
+ readonly parameters: Host.AidaClient.FunctionObjectParam<keyof GetLighthouseAuditsArgs> = {
22
+ type: Host.AidaClient.ParametersTypes.OBJECT,
23
+ description: 'Arguments for retrieving Lighthouse category audits.',
24
+ nullable: false,
25
+ properties: {
26
+ categoryId: {
27
+ type: Host.AidaClient.ParametersTypes.STRING,
28
+ description: 'The category of audits to retrieve. E.g. "accessibility".',
29
+ nullable: false,
30
+ },
31
+ },
32
+ required: ['categoryId'],
33
+ };
34
+
35
+ displayInfoFromArgs(params: GetLighthouseAuditsArgs): {title: string, action: string} {
36
+ return {
37
+ title: `Getting Lighthouse audits for ${params.categoryId}`,
38
+ action: `getLighthouseAudits('${params.categoryId}')`,
39
+ };
40
+ }
41
+
42
+ async handler(params: GetLighthouseAuditsArgs,
43
+ context: BaseToolCapability): Promise<FunctionCallHandlerResult<{audits: string}>> {
44
+ if (!(context.conversationContext instanceof AccessibilityContext)) {
45
+ return {error: 'Error: Active context is not a Lighthouse report.'};
46
+ }
47
+ const report = context.conversationContext.getItem();
48
+ const audits = new LighthouseFormatter().audits(report, params.categoryId);
49
+ return {
50
+ result: {audits},
51
+ widgets: [{name: 'LIGHTHOUSE_REPORT', data: {report}}],
52
+ };
53
+ }
54
+ }
@@ -0,0 +1,124 @@
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
+ import * as SDK from '../../../core/sdk/sdk.js';
7
+ import type {FunctionCallHandlerResult} from '../agents/AiAgent.js';
8
+ import {DOMNodeContext} from '../contexts/DOMNodeContext.js';
9
+
10
+ import {
11
+ type BaseToolCapability,
12
+ type OriginLockCapability,
13
+ type TargetCapability,
14
+ type Tool,
15
+ type ToolArgs,
16
+ ToolName,
17
+ } from './Tool.js';
18
+
19
+ /**
20
+ * Arguments for resolving a Lighthouse path to a backend node ID.
21
+ */
22
+ export interface ResolveLighthousePathArgs extends ToolArgs {
23
+ /**
24
+ * A Lighthouse-style element path.
25
+ * This is typically a comma-separated list of child indices and tag names
26
+ * representing the path from the root to the target element (e.g., "1,HTML,1,BODY").
27
+ */
28
+ path: string;
29
+ explanation: string;
30
+ }
31
+
32
+ /**
33
+ * A tool that resolves a Lighthouse-style element path to a backend node ID.
34
+ *
35
+ * This is used by the AI assistant to identify specific DOM nodes referred to in
36
+ * Lighthouse reports. It ensures the resolved node belongs to the locked origin.
37
+ */
38
+ export class ResolveLighthousePathTool implements
39
+ Tool<ResolveLighthousePathArgs, {backendNodeId: number}, BaseToolCapability&TargetCapability&OriginLockCapability> {
40
+ readonly name = ToolName.RESOLVE_LIGHTHOUSE_PATH;
41
+ readonly description = 'Resolves a Lighthouse path to a backend node ID.';
42
+
43
+ readonly parameters: Host.AidaClient.FunctionObjectParam<keyof ResolveLighthousePathArgs> = {
44
+ type: Host.AidaClient.ParametersTypes.OBJECT,
45
+ description: 'Arguments for resolving a Lighthouse path to a backend node ID.',
46
+ nullable: false,
47
+ properties: {
48
+ explanation: {
49
+ type: Host.AidaClient.ParametersTypes.STRING,
50
+ description: 'Reason for requesting this resolution.',
51
+ nullable: false,
52
+ },
53
+ path: {
54
+ type: Host.AidaClient.ParametersTypes.STRING,
55
+ description: 'Lighthouse path string.',
56
+ nullable: false,
57
+ },
58
+ },
59
+ required: ['explanation', 'path'],
60
+ };
61
+
62
+ displayInfoFromArgs(params: ResolveLighthousePathArgs): {
63
+ title: string,
64
+ thought: string,
65
+ action: string,
66
+ } {
67
+ return {
68
+ title: 'Resolving element path',
69
+ thought: params.explanation,
70
+ action: `resolveLighthousePath('${params.path}')`,
71
+ };
72
+ }
73
+
74
+ /**
75
+ * Handles the resolution request.
76
+ *
77
+ * It retrieves the node path using the target's DOMModel and verifies
78
+ * that the node's origin matches the established origin lock to prevent
79
+ * access to nodes from other origins.
80
+ */
81
+ async handler(
82
+ params: ResolveLighthousePathArgs,
83
+ context: BaseToolCapability&TargetCapability&OriginLockCapability,
84
+ ): Promise<FunctionCallHandlerResult<{backendNodeId: number}>> {
85
+ const establishedOrigin = context.getEstablishedOrigin();
86
+ if (!establishedOrigin) {
87
+ return {error: 'Error: Origin lock is not established.'};
88
+ }
89
+
90
+ const target = context.getTarget();
91
+ const domModel = target?.model(SDK.DOMModel.DOMModel);
92
+ if (!domModel) {
93
+ return {error: 'Error: Inspected target not found.'};
94
+ }
95
+
96
+ let nodeId;
97
+ try {
98
+ // Resolves the Lighthouse path (a representation of the path to a node)
99
+ // and ensures the node is loaded into the frontend DOM model, returning its ID.
100
+ nodeId = await domModel.pushNodeByPathToFrontend(params.path);
101
+ } catch {
102
+ return {error: 'Error: Could not find node by path.'};
103
+ }
104
+ if (!nodeId) {
105
+ return {error: 'Error: Could not find node by path.'};
106
+ }
107
+
108
+ const node = domModel.nodeForId(nodeId);
109
+ if (!node) {
110
+ return {error: 'Error: Could not retrieve resolved node.'};
111
+ }
112
+
113
+ const nodeContext = new DOMNodeContext(node);
114
+ // Security check: Ensure the resolved node belongs to the same origin
115
+ // that this AI assistance session is locked to, preventing cross-origin access.
116
+ if (!nodeContext.isOriginAllowed(establishedOrigin)) {
117
+ return {error: 'Error: Node does not belong to the locked origin.'};
118
+ }
119
+
120
+ return {
121
+ result: {backendNodeId: node.backendNodeId()},
122
+ };
123
+ }
124
+ }
@@ -4,6 +4,7 @@
4
4
 
5
5
  import type * as Host from '../../../core/host/host.js';
6
6
  import type * as SDK from '../../../core/sdk/sdk.js';
7
+ import type * as LHModel from '../../lighthouse/lighthouse.js';
7
8
  import type {ConversationContext, FunctionCallHandlerResult, FunctionHandlerOptions} from '../agents/AiAgent.js';
8
9
  import type {executeJsCode} from '../agents/ExecuteJavascript.js';
9
10
  import type {ChangeManager} from '../ChangeManager.js';
@@ -72,12 +73,19 @@ export interface OriginLockCapability {
72
73
  getEstablishedOrigin(): string|undefined;
73
74
  }
74
75
 
76
+ /**
77
+ * Capability for tools that need to run or query Lighthouse audits.
78
+ */
79
+ export interface LighthouseCapability {
80
+ lighthouseRecording?: (overrides?: LHModel.RunTypes.RunOverrides) => Promise<LHModel.ReporterTypes.ReportJSON|null>;
81
+ }
82
+
75
83
  /**
76
84
  * Unified context interface providing all capabilities available in the project.
77
85
  * Used by the agent to pass a complete context to any tool type-safely.
78
86
  */
79
- export type AllToolsContext =
80
- BaseToolCapability&PageExecutionCapability&StyleMutationCapability&TargetCapability&OriginLockCapability;
87
+ export type AllToolsContext = BaseToolCapability&PageExecutionCapability&StyleMutationCapability&TargetCapability&
88
+ OriginLockCapability&LighthouseCapability;
81
89
 
82
90
  /**
83
91
  * Base argument type for AI Tools.
@@ -89,6 +97,8 @@ export const enum ToolName {
89
97
  GET_STYLES = 'getStyles',
90
98
  LIST_NETWORK_REQUESTS = 'listNetworkRequests',
91
99
  GET_NETWORK_REQUEST_DETAILS = 'getNetworkRequestDetails',
100
+ GET_LIGHTHOUSE_AUDITS = 'getLighthouseAudits',
101
+ RESOLVE_LIGHTHOUSE_PATH = 'resolveLighthousePath',
92
102
  }
93
103
 
94
104
  /**