lighthouse 13.0.3 → 13.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/CONTRIBUTING.md +1 -1
  2. package/cli/bin.js +5 -0
  3. package/cli/test/smokehouse/__snapshots__/report-assert-test.js.snap +10 -10
  4. package/cli/test/smokehouse/config/exclusions.js +44 -0
  5. package/cli/test/smokehouse/frontends/smokehouse-bin.js +5 -4
  6. package/cli/test/smokehouse/lighthouse-runners/devtools-mcp.d.ts +14 -0
  7. package/cli/test/smokehouse/lighthouse-runners/devtools-mcp.js +141 -0
  8. package/core/audits/accessibility/autocomplete-valid.d.ts +10 -0
  9. package/core/audits/accessibility/autocomplete-valid.js +44 -0
  10. package/core/audits/accessibility/presentation-role-conflict.d.ts +10 -0
  11. package/core/audits/accessibility/presentation-role-conflict.js +46 -0
  12. package/core/audits/accessibility/svg-img-alt.d.ts +10 -0
  13. package/core/audits/accessibility/svg-img-alt.js +44 -0
  14. package/core/audits/agentic/agent-accessibility-tree.d.ts +19 -0
  15. package/core/audits/agentic/agent-accessibility-tree.js +115 -0
  16. package/core/audits/agentic/llms-txt.d.ts +20 -0
  17. package/core/audits/agentic/llms-txt.js +111 -0
  18. package/core/audits/baseline.d.ts +25 -0
  19. package/core/audits/baseline.js +190 -0
  20. package/core/audits/insights/insight-audit.d.ts +2 -2
  21. package/core/audits/insights/insight-audit.js +16 -6
  22. package/core/audits/layout-shifts.js +1 -1
  23. package/core/audits/server-response-time.js +3 -3
  24. package/core/audits/webmcp-form-coverage.d.ts +16 -0
  25. package/core/audits/webmcp-form-coverage.js +90 -0
  26. package/core/audits/webmcp-registered-tools.d.ts +21 -0
  27. package/core/audits/webmcp-registered-tools.js +149 -0
  28. package/core/audits/webmcp-schema-validity.d.ts +22 -0
  29. package/core/audits/webmcp-schema-validity.js +141 -0
  30. package/core/computed/document-urls.js +4 -2
  31. package/core/computed/main-resource.js +5 -3
  32. package/core/computed/metrics/lantern-metric.js +4 -4
  33. package/core/computed/metrics/lcp-breakdown.js +1 -1
  34. package/core/computed/metrics/time-to-first-byte.js +1 -1
  35. package/core/computed/navigation-insights.js +2 -1
  36. package/core/computed/network-analysis.js +3 -1
  37. package/core/config/agentic-browsing-config.d.ts +12 -0
  38. package/core/config/agentic-browsing-config.js +73 -0
  39. package/core/config/default-config.js +8 -0
  40. package/core/gather/driver/wait-for-condition.js +11 -1
  41. package/core/gather/gatherers/accessibility.js +5 -1
  42. package/core/gather/gatherers/agentic/llms-txt.d.ts +10 -0
  43. package/core/gather/gatherers/agentic/llms-txt.js +28 -0
  44. package/core/gather/gatherers/inputs.js +2 -0
  45. package/core/gather/gatherers/meta-elements.js +1 -1
  46. package/core/gather/gatherers/trace-elements.js +1 -1
  47. package/core/gather/gatherers/trace.js +3 -0
  48. package/core/gather/gatherers/webmcp-schema.d.ts +25 -0
  49. package/core/gather/gatherers/webmcp-schema.js +105 -0
  50. package/core/gather/gatherers/webmcp.d.ts +58 -0
  51. package/core/gather/gatherers/webmcp.js +159 -0
  52. package/core/index.d.ts +1 -0
  53. package/core/index.js +1 -0
  54. package/core/lib/baseline/web-features-metadata.json +3 -0
  55. package/core/lib/cdt/generated/SourceMap.js +2 -2
  56. package/core/lib/deprecations-strings.d.ts +169 -89
  57. package/core/lib/deprecations-strings.js +119 -24
  58. package/core/lib/navigation-error.js +5 -2
  59. package/core/lib/network-recorder.js +2 -1
  60. package/core/lib/page-functions.d.ts +3 -3
  61. package/core/lib/page-functions.js +11 -4
  62. package/core/lib/tracehouse/trace-processor.d.ts +5 -4
  63. package/core/lib/tracehouse/trace-processor.js +85 -19
  64. package/core/runner.js +3 -0
  65. package/core/scoring.d.ts +25 -0
  66. package/dist/report/bundle.esm.js +31 -3
  67. package/dist/report/flow.js +32 -4
  68. package/dist/report/standalone.js +32 -4
  69. package/flow-report/src/summary/category.tsx +1 -1
  70. package/package.json +12 -11
  71. package/report/assets/styles.css +28 -0
  72. package/report/renderer/category-renderer.js +1 -1
  73. package/report/renderer/components.js +1 -1
  74. package/report/renderer/details-renderer.d.ts +5 -0
  75. package/report/renderer/details-renderer.js +16 -0
  76. package/report/renderer/report-utils.d.ts +2 -1
  77. package/report/renderer/report-utils.js +7 -2
  78. package/report/types/report-renderer.d.ts +1 -1
  79. package/report/types/report-result.d.ts +1 -1
  80. package/shared/localization/locales/ar-XB.json +72 -36
  81. package/shared/localization/locales/ar.json +72 -36
  82. package/shared/localization/locales/bg.json +72 -36
  83. package/shared/localization/locales/ca.json +72 -36
  84. package/shared/localization/locales/cs.json +72 -36
  85. package/shared/localization/locales/da.json +74 -38
  86. package/shared/localization/locales/de.json +72 -36
  87. package/shared/localization/locales/el.json +73 -37
  88. package/shared/localization/locales/en-GB.json +74 -38
  89. package/shared/localization/locales/en-US.json +257 -17
  90. package/shared/localization/locales/en-XL.json +257 -17
  91. package/shared/localization/locales/es-419.json +72 -36
  92. package/shared/localization/locales/es.json +73 -37
  93. package/shared/localization/locales/fi.json +72 -36
  94. package/shared/localization/locales/fil.json +74 -38
  95. package/shared/localization/locales/fr.json +162 -126
  96. package/shared/localization/locales/he.json +74 -38
  97. package/shared/localization/locales/hi.json +73 -37
  98. package/shared/localization/locales/hr.json +72 -36
  99. package/shared/localization/locales/hu.json +73 -37
  100. package/shared/localization/locales/id.json +74 -38
  101. package/shared/localization/locales/it.json +72 -36
  102. package/shared/localization/locales/ja.json +72 -36
  103. package/shared/localization/locales/ko.json +72 -36
  104. package/shared/localization/locales/lt.json +72 -36
  105. package/shared/localization/locales/lv.json +72 -36
  106. package/shared/localization/locales/nl.json +73 -37
  107. package/shared/localization/locales/no.json +72 -36
  108. package/shared/localization/locales/pl.json +72 -36
  109. package/shared/localization/locales/pt-PT.json +72 -36
  110. package/shared/localization/locales/pt.json +74 -38
  111. package/shared/localization/locales/ro.json +72 -36
  112. package/shared/localization/locales/ru.json +72 -36
  113. package/shared/localization/locales/sk.json +72 -36
  114. package/shared/localization/locales/sl.json +72 -36
  115. package/shared/localization/locales/sr-Latn.json +73 -37
  116. package/shared/localization/locales/sr.json +73 -37
  117. package/shared/localization/locales/sv.json +75 -39
  118. package/shared/localization/locales/ta.json +73 -37
  119. package/shared/localization/locales/te.json +72 -36
  120. package/shared/localization/locales/th.json +73 -37
  121. package/shared/localization/locales/tr.json +72 -36
  122. package/shared/localization/locales/uk.json +72 -36
  123. package/shared/localization/locales/vi.json +74 -38
  124. package/shared/localization/locales/zh-HK.json +72 -36
  125. package/shared/localization/locales/zh-TW.json +74 -38
  126. package/shared/localization/locales/zh.json +75 -39
  127. package/tsconfig.json +2 -0
  128. package/types/artifacts.d.ts +66 -30
  129. package/types/audit.d.ts +1 -1
  130. package/types/config.d.ts +2 -1
  131. package/types/gatherer.d.ts +1 -1
  132. package/types/lhr/audit-details.d.ts +10 -4
  133. package/types/lhr/flow-result.d.ts +1 -1
  134. package/types/lhr/lhr.d.ts +12 -1
  135. package/types/lhr/treemap.d.ts +1 -1
  136. package/types/protocol.d.ts +1 -1
  137. package/types/puppeteer.d.ts +1 -1
  138. package/types/user-flow.d.ts +1 -1
  139. package/types/utility-types.d.ts +1 -1
@@ -1835,6 +1835,9 @@
1835
1835
  "flow-report/src/i18n/ui-strings.js | title": {
1836
1836
  "message": "Lighthouse 用户流报告"
1837
1837
  },
1838
+ "node_modules/@paulirish/trace_engine/generated/Deprecation.js | AttributionReporting": {
1839
+ "message": "Attribution Reporting 已弃用并将移除。如需了解详情,请访问 https://goo.gle/ps-status。"
1840
+ },
1838
1841
  "node_modules/@paulirish/trace_engine/generated/Deprecation.js | AuthorizationCoveredByWildcard": {
1839
1842
  "message": "处理 CORS Access-Control-Allow-Headers 时,授权将不在通配符 (*) 的涵盖范围内。"
1840
1843
  },
@@ -1856,9 +1859,6 @@
1856
1859
  "node_modules/@paulirish/trace_engine/generated/Deprecation.js | ChromeLoadTimesWasAlternateProtocolAvailable": {
1857
1860
  "message": "chrome.loadTimes() 已被弃用,请改用标准化 API:Navigation Timing 2 中的 nextHopProtocol。"
1858
1861
  },
1859
- "node_modules/@paulirish/trace_engine/generated/Deprecation.js | CookieWithTruncatingChar": {
1860
- "message": "包含 \\(0|r|n) 字符的 Cookie 将被拒,而不是被截断。"
1861
- },
1862
1862
  "node_modules/@paulirish/trace_engine/generated/Deprecation.js | CrossOriginAccessBasedOnDocumentDomain": {
1863
1863
  "message": "通过设置 document.domain 放宽同源政策的功能已被弃用,并将默认处于停用状态。此弃用警告针对的是通过设置 document.domain 启用的跨源访问。"
1864
1864
  },
@@ -1871,14 +1871,20 @@
1871
1871
  "node_modules/@paulirish/trace_engine/generated/Deprecation.js | DataUrlInSvgUse": {
1872
1872
  "message": "对 SVGUseElement 中 data: URL 的支持已被弃用,日后将被移除。"
1873
1873
  },
1874
+ "node_modules/@paulirish/trace_engine/generated/Deprecation.js | ExampleBrowserProcessDeprecation": {
1875
+ "message": "This is an example for showing the code required for a browser process reported deprecation."
1876
+ },
1877
+ "node_modules/@paulirish/trace_engine/generated/Deprecation.js | Fledge": {
1878
+ "message": "Protected Audience API 已弃用,将在未来版本中移除。"
1879
+ },
1874
1880
  "node_modules/@paulirish/trace_engine/generated/Deprecation.js | GeolocationInsecureOrigin": {
1875
- "message": "getCurrentPosition() 和 watchPosition() 不再适用于不安全的源。若要使用此功能,您应考虑将您的应用转移到安全的源,例如 HTTPS。如需了解详情,请访问 https://goo.gle/chrome-insecure-origins"
1881
+ "message": "getCurrentPosition() 和 watchPosition() 不再适用于不安全的源。若要使用此功能,您应考虑将应用转移到安全的源,例如 HTTPS。如需了解详情,请访问 https://www.chromium.org/Home/chromium-security/deprecating-powerful-features-on-insecure-origins/。"
1876
1882
  },
1877
1883
  "node_modules/@paulirish/trace_engine/generated/Deprecation.js | GeolocationInsecureOriginDeprecatedNotRemoved": {
1878
- "message": "getCurrentPosition() 和 watchPosition() 不再适用于不安全的源。若要使用此功能,您应考虑将您的应用转移到安全的源,例如 HTTPS。如需了解详情,请访问 https://goo.gle/chrome-insecure-origins"
1884
+ "message": "getCurrentPosition() 和 watchPosition() 不再适用于不安全的源。若要使用此功能,您应考虑将应用转移到安全的源,例如 HTTPS。如需了解详情,请访问 https://www.chromium.org/Home/chromium-security/deprecating-powerful-features-on-insecure-origins/。"
1879
1885
  },
1880
1886
  "node_modules/@paulirish/trace_engine/generated/Deprecation.js | GetUserMediaInsecureOrigin": {
1881
- "message": "getUserMedia() 不再适用于不安全的源。若要使用此功能,您应考虑将您的应用转移到安全的源,例如 HTTPS。如需了解详情,请访问 https://goo.gle/chrome-insecure-origins"
1887
+ "message": "getUserMedia() 不再适用于不安全的源。若要使用此功能,您应考虑将应用转移到安全的源,例如 HTTPS。如需了解详情,请访问 https://www.chromium.org/Home/chromium-security/deprecating-powerful-features-on-insecure-origins/。"
1882
1888
  },
1883
1889
  "node_modules/@paulirish/trace_engine/generated/Deprecation.js | HostCandidateAttributeGetter": {
1884
1890
  "message": "RTCPeerConnectionIceErrorEvent.hostCandidate 已被弃用。请改用 RTCPeerConnectionIceErrorEvent.address 或 RTCPeerConnectionIceErrorEvent.port。"
@@ -1895,20 +1901,35 @@
1895
1901
  "node_modules/@paulirish/trace_engine/generated/Deprecation.js | IntlV8BreakIterator": {
1896
1902
  "message": "Intl.v8BreakIterator 已被弃用。请改用 Intl.Segmenter。"
1897
1903
  },
1898
- "node_modules/@paulirish/trace_engine/generated/Deprecation.js | LocalCSSFileExtensionRejected": {
1899
- "message": "无法从 file: 网址加载 CSS,除非它们以 .css 文件扩展名结尾。"
1904
+ "node_modules/@paulirish/trace_engine/generated/Deprecation.js | LanguageModelParams": {
1905
+ "message": "LanguageModel.params() 已弃用,现在仅在扩展程序上下文中可用。其结果中的“topK”和“temperature”相关字段也已弃用。"
1906
+ },
1907
+ "node_modules/@paulirish/trace_engine/generated/Deprecation.js | LanguageModelTemperature": {
1908
+ "message": "LanguageModel 的“temperature”参数/属性已弃用。目前该参数/属性仅在扩展程序中有效,未来可能会移除。"
1909
+ },
1910
+ "node_modules/@paulirish/trace_engine/generated/Deprecation.js | LanguageModelTopK": {
1911
+ "message": "LanguageModel 的“topK”参数/属性已弃用。目前该参数/属性仅在扩展程序中有效,未来可能会移除。"
1912
+ },
1913
+ "node_modules/@paulirish/trace_engine/generated/Deprecation.js | LanguageModel_InputQuota": {
1914
+ "message": "LanguageModel.inputQuota 已弃用。请改用 LanguageModel.contextWindow。此别名仅在扩展程序中可用。"
1915
+ },
1916
+ "node_modules/@paulirish/trace_engine/generated/Deprecation.js | LanguageModel_InputUsage": {
1917
+ "message": "LanguageModel.inputUsage 已弃用。请改用 LanguageModel.contextUsage。此别名仅在扩展程序中可用。"
1900
1918
  },
1901
- "node_modules/@paulirish/trace_engine/generated/Deprecation.js | MediaSourceAbortRemove": {
1902
- "message": "由于规范变更,使用 SourceBuffer.abort() 中止 remove() 的异步范围移除的功能已被弃用。日后我们会移除相应支持。您应改为监听 updateend 事件。abort() 只应用于中止异步媒体附加或重置解析状态。"
1919
+ "node_modules/@paulirish/trace_engine/generated/Deprecation.js | LanguageModel_MeasureInputUsage": {
1920
+ "message": "LanguageModel.measureInputUsage() 已弃用。请改用 LanguageModel.measureContextUsage()。此别名仅在扩展程序中可用。"
1903
1921
  },
1904
- "node_modules/@paulirish/trace_engine/generated/Deprecation.js | MediaSourceDurationTruncatingBuffered": {
1905
- "message": "由于规范变更,我们不再支持将 MediaSource.duration 设为低于任何缓冲编码帧的最高呈现时间戳。日后我们将不再支持隐式移除被截断的缓冲媒体。您应改为对 newDuration < oldDuration 的所有 sourceBuffers 执行显式 remove(newDuration, oldDuration)。"
1922
+ "node_modules/@paulirish/trace_engine/generated/Deprecation.js | LanguageModel_OnQuotaOverflow": {
1923
+ "message": "LanguageModel.onquotaoverflow 已弃用。请改用 LanguageModel.oncontextoverflow。LanguageModel.onquotaoverflow 别名仅在扩展程序中可用。"
1924
+ },
1925
+ "node_modules/@paulirish/trace_engine/generated/Deprecation.js | LocalCSSFileExtensionRejected": {
1926
+ "message": "无法从 file: 网址加载 CSS,除非它们以 .css 文件扩展名结尾。"
1906
1927
  },
1907
1928
  "node_modules/@paulirish/trace_engine/generated/Deprecation.js | NoSysexWebMIDIWithoutPermission": {
1908
1929
  "message": "即使 MIDIOptions 中未指定 sysex,Web MIDI 也会请求获得使用许可。"
1909
1930
  },
1910
1931
  "node_modules/@paulirish/trace_engine/generated/Deprecation.js | NotificationInsecureOrigin": {
1911
- "message": "无法再从不安全的源使用 Notification API。您应考虑将您的应用转移到安全的源,例如 HTTPS。如需了解详情,请访问 https://goo.gle/chrome-insecure-origins"
1932
+ "message": "无法再从不安全的源使用 Notification API。您应考虑将应用转移到安全的源,例如 HTTPS。如需了解详情,请访问 https://www.chromium.org/Home/chromium-security/deprecating-powerful-features-on-insecure-origins/。"
1912
1933
  },
1913
1934
  "node_modules/@paulirish/trace_engine/generated/Deprecation.js | NotificationPermissionRequestedIframe": {
1914
1935
  "message": "无法再从跨源 iframe 中请求 Notification API 权限。您应考虑改为从顶级框架中请求权限,或者打开一个新窗口。"
@@ -1961,9 +1982,6 @@
1961
1982
  "node_modules/@paulirish/trace_engine/generated/Deprecation.js | PrefixedVideoSupportsFullscreen": {
1962
1983
  "message": "HTMLVideoElement.webkitSupportsFullscreen 已被弃用。请改用 Document.fullscreenEnabled。"
1963
1984
  },
1964
- "node_modules/@paulirish/trace_engine/generated/Deprecation.js | PrivacySandboxExtensionsAPI": {
1965
- "message": "我们即将弃用 API chrome.privacy.websites.privacySandboxEnabled,但为了保持向后兼容性,该 API 可持续使用到 M113 版。届时,请改用 chrome.privacy.websites.topicsEnabled、chrome.privacy.websites.fledgeEnabled 和 chrome.privacy.websites.adMeasurementEnabled。请参阅 https://developer.chrome.com/docs/extensions/reference/privacy/#property-websites-privacySandboxEnabled。"
1966
- },
1967
1985
  "node_modules/@paulirish/trace_engine/generated/Deprecation.js | RTCConstraintEnableDtlsSrtpFalse": {
1968
1986
  "message": "约束条件 DtlsSrtpKeyAgreement 已被移除。您已为此约束条件指定 false 值,系统会将这种情况解读为尝试使用已被移除的 SDES key negotiation 方法。此功能已被移除;请改用支持 DTLS key negotiation的服务。"
1969
1987
  },
@@ -1976,8 +1994,11 @@
1976
1994
  "node_modules/@paulirish/trace_engine/generated/Deprecation.js | RangeExpand": {
1977
1995
  "message": "Range.expand() 已被弃用。请改用 Selection.modify()。"
1978
1996
  },
1997
+ "node_modules/@paulirish/trace_engine/generated/Deprecation.js | RelatedWebsiteSets": {
1998
+ "message": "Related Website Sets 已被弃用,并将被移除。如需了解详情,请访问 https://privacysandbox.com/news/update-on-plans-for-privacy-sandbox-technologies/。"
1999
+ },
1979
2000
  "node_modules/@paulirish/trace_engine/generated/Deprecation.js | RequestedSubresourceWithEmbeddedCredentials": {
1980
- "message": "如果对应的网址包含嵌入式凭据(例如 https://user:pass@host/),子资源请求会被屏蔽。"
2001
+ "message": "如果对应的网址包含嵌入式凭证(例如 https://user:pass@host/),子资源请求会被屏蔽。"
1981
2002
  },
1982
2003
  "node_modules/@paulirish/trace_engine/generated/Deprecation.js | RtcpMuxPolicyNegotiate": {
1983
2004
  "message": "rtcpMuxPolicy 选项已被弃用,并将被移除。"
@@ -1985,26 +2006,41 @@
1985
2006
  "node_modules/@paulirish/trace_engine/generated/Deprecation.js | SharedArrayBufferConstructedWithoutIsolation": {
1986
2007
  "message": "SharedArrayBuffer 将要求进行跨域隔离。如需了解详情,请访问 https://developer.chrome.com/blog/enabling-shared-array-buffer/。"
1987
2008
  },
2009
+ "node_modules/@paulirish/trace_engine/generated/Deprecation.js | SharedStorage": {
2010
+ "message": "Shared Storage API 已弃用,将在未来版本中移除。"
2011
+ },
2012
+ "node_modules/@paulirish/trace_engine/generated/Deprecation.js | StorageAccessAPI_requestStorageAccessFor_Method": {
2013
+ "message": "document.requestStorageAccessFor 已被弃用,并将被移除。如需了解详情,请访问 https://privacysandbox.com/news/update-on-plans-for-privacy-sandbox-technologies/。"
2014
+ },
1988
2015
  "node_modules/@paulirish/trace_engine/generated/Deprecation.js | TextToSpeech_DisallowedByAutoplay": {
1989
2016
  "message": "无需用户激活的 speechSynthesis.speak() 已被弃用,并将被移除。"
1990
2017
  },
2018
+ "node_modules/@paulirish/trace_engine/generated/Deprecation.js | Topics": {
2019
+ "message": "Topics API 已弃用,将在未来版本中移除。"
2020
+ },
1991
2021
  "node_modules/@paulirish/trace_engine/generated/Deprecation.js | UnloadHandler": {
1992
2022
  "message": "卸载事件监听器已被弃用,并且将被移除。"
1993
2023
  },
1994
2024
  "node_modules/@paulirish/trace_engine/generated/Deprecation.js | V8SharedArrayBufferConstructedInExtensionWithoutIsolation": {
1995
2025
  "message": "扩展程序应选择启用跨域隔离,以便继续使用 SharedArrayBuffer。请参阅 https://developer.chrome.com/docs/extensions/mv3/cross-origin-isolation/。"
1996
2026
  },
2027
+ "node_modules/@paulirish/trace_engine/generated/Deprecation.js | WebBluetoothRemoteCharacteristicWriteValue": {
2028
+ "message": "BluetoothRemoteGATTCharacteristic.writeValue() 已被弃用。请改为使用 writeValueWithResponse() 或 writeValueWithoutResponse()。"
2029
+ },
1997
2030
  "node_modules/@paulirish/trace_engine/generated/Deprecation.js | XHRJSONEncodingDetection": {
1998
2031
  "message": "XMLHttpRequest 中的响应 JSON 不再支持 UTF-16"
1999
2032
  },
2000
2033
  "node_modules/@paulirish/trace_engine/generated/Deprecation.js | XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload": {
2001
2034
  "message": "主线程上的同步 XMLHttpRequest 已被弃用,因为它会对最终用户的体验产生不利影响。如需更多帮助,请访问 https://xhr.spec.whatwg.org/。"
2002
2035
  },
2036
+ "node_modules/@paulirish/trace_engine/generated/Deprecation.js | XSLT": {
2037
+ "message": "XSLTProcessor 和 XSLT 处理指令已被所有浏览器弃用。这些功能很快就会从此浏览器中移除。"
2038
+ },
2003
2039
  "node_modules/@paulirish/trace_engine/models/trace/insights/CLSCulprits.js | animation": {
2004
2040
  "message": "动画"
2005
2041
  },
2006
2042
  "node_modules/@paulirish/trace_engine/models/trace/insights/CLSCulprits.js | description": {
2007
- "message": "当元素在没有任何用户互动的情况下移动时,就会发生布局偏移。[调查布局偏移的原因](https://web.dev/articles/optimize-cls),例如在网页加载时添加、移除元素或元素字体发生了变化。"
2043
+ "message": "当元素在没有任何用户互动的情况下移动时,就会发生布局偏移。[调查布局偏移的原因](https://developer.chrome.com/docs/performance/insights/cls-culprit),例如在网页加载时添加、移除元素或元素字体发生了变化。"
2008
2044
  },
2009
2045
  "node_modules/@paulirish/trace_engine/models/trace/insights/CLSCulprits.js | injectedIframe": {
2010
2046
  "message": "注入的 iframe"
@@ -2040,7 +2076,7 @@
2040
2076
  "message": "缓存 TTL"
2041
2077
  },
2042
2078
  "node_modules/@paulirish/trace_engine/models/trace/insights/Cache.js | description": {
2043
- "message": "延长缓存生命周期可加快重访您网页的速度。[了解详情](https://web.dev/uses-long-cache-ttl/)。"
2079
+ "message": "延长缓存生命周期可加快网页重访速度。[详细了解缓存](https://developer.chrome.com/docs/performance/insights/cache)。"
2044
2080
  },
2045
2081
  "node_modules/@paulirish/trace_engine/models/trace/insights/Cache.js | noRequestsToCache": {
2046
2082
  "message": "没有任何请求使用效率低下的缓存政策"
@@ -2055,7 +2091,7 @@
2055
2091
  "message": "使用高效的缓存生命周期"
2056
2092
  },
2057
2093
  "node_modules/@paulirish/trace_engine/models/trace/insights/DOMSize.js | description": {
2058
- "message": "大型 DOM 可能会增加样式计算和布局自动重排的用时,从而影响网页响应速度。大型 DOM 也会增加内存用量。[了解如何避免 DOM 规模过大](https://developer.chrome.com/docs/lighthouse/performance/dom-size/)。"
2094
+ "message": "大型 DOM 可能会增加样式计算和布局自动重排的用时,从而影响网页响应速度。大型 DOM 也会增加内存用量。[了解如何避免 DOM 规模过大](https://developer.chrome.com/docs/performance/insights/dom-size)。"
2059
2095
  },
2060
2096
  "node_modules/@paulirish/trace_engine/models/trace/insights/DOMSize.js | duration": {
2061
2097
  "message": "时长"
@@ -2091,7 +2127,7 @@
2091
2127
  "message": "值"
2092
2128
  },
2093
2129
  "node_modules/@paulirish/trace_engine/models/trace/insights/DocumentLatency.js | description": {
2094
- "message": "您的第一个网络请求最为重要。您可通过避免重定向、确保服务器快速响应以及启用文本压缩,缩短其延迟时间。"
2130
+ "message": "您的第一个网络请求最为重要。您可通过避免重定向、确保服务器快速响应以及启用文本压缩来[缩短其延迟时间](https://developer.chrome.com/docs/performance/insights/document-latency)。"
2095
2131
  },
2096
2132
  "node_modules/@paulirish/trace_engine/models/trace/insights/DocumentLatency.js | failedRedirects": {
2097
2133
  "message": "有重定向 ({PH1} 次重定向,+{PH2})"
@@ -2130,13 +2166,13 @@
2130
2166
  "message": "来源"
2131
2167
  },
2132
2168
  "node_modules/@paulirish/trace_engine/models/trace/insights/DuplicatedJavaScript.js | description": {
2133
- "message": "从软件包中移除重复的大型 JavaScript 模块,即可避免网络活动带来不必要的字节消耗。"
2169
+ "message": "从软件包中移除[重复的大型 JavaScript 模块](https://developer.chrome.com/docs/performance/insights/duplicated-javascript),即可避免网络活动带来不必要的字节消耗。"
2134
2170
  },
2135
2171
  "node_modules/@paulirish/trace_engine/models/trace/insights/DuplicatedJavaScript.js | title": {
2136
2172
  "message": "重复的 JavaScript"
2137
2173
  },
2138
2174
  "node_modules/@paulirish/trace_engine/models/trace/insights/FontDisplay.js | description": {
2139
- "message": "建议您将 [font-display](https://developer.chrome.com/blog/font-display) 设为 swap 或 optional,确保文本始终可见。通过[替换字体指标](https://developer.chrome.com/blog/font-fallbacks)可进一步优化 swap,缓解布局偏移。"
2175
+ "message": "建议您将 [font-display](https://developer.chrome.com/docs/performance/insights/font-display) 设为 swap 或 optional,确保文本始终可见。通过[替换字体指标](https://developer.chrome.com/blog/font-fallbacks)可进一步优化 swap,缓解布局偏移。"
2140
2176
  },
2141
2177
  "node_modules/@paulirish/trace_engine/models/trace/insights/FontDisplay.js | fontColumn": {
2142
2178
  "message": "字体"
@@ -2151,10 +2187,10 @@
2151
2187
  "message": "(匿名)"
2152
2188
  },
2153
2189
  "node_modules/@paulirish/trace_engine/models/trace/insights/ForcedReflow.js | description": {
2154
- "message": "当 DOM 状态发生更改导致样式失效后,如果 JavaScript 查询几何属性(例如 offsetWidth),会引发强制自动重排。这可能会导致效果不佳。详细了解[强制自动重排](https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing#avoid-forced-synchronous-layouts)及可能的缓解措施。"
2190
+ "message": "当 DOM 状态发生更改导致样式失效后,如果 JavaScript 查询几何属性(例如 offsetWidth),会引发强制自动重排。这可能会导致效果不佳。详细了解[强制自动重排](https://developer.chrome.com/docs/performance/insights/forced-reflow)及可能的缓解措施。"
2155
2191
  },
2156
- "node_modules/@paulirish/trace_engine/models/trace/insights/ForcedReflow.js | relatedStackTrace": {
2157
- "message": "堆栈轨迹"
2192
+ "node_modules/@paulirish/trace_engine/models/trace/insights/ForcedReflow.js | reflowCallFrames": {
2193
+ "message": "触发自动重排的调用帧"
2158
2194
  },
2159
2195
  "node_modules/@paulirish/trace_engine/models/trace/insights/ForcedReflow.js | title": {
2160
2196
  "message": "强制自动重排"
@@ -2169,7 +2205,7 @@
2169
2205
  "message": "[未归因]"
2170
2206
  },
2171
2207
  "node_modules/@paulirish/trace_engine/models/trace/insights/INPBreakdown.js | description": {
2172
- "message": "请从持续时间最长的子部分开始检查。[几处延迟可降到最低](https://web.dev/articles/optimize-inp#optimize_interactions)。如需缩短处理时长,请[优化主线程(通常是 JS)成本](https://web.dev/articles/optimize-long-tasks)。"
2208
+ "message": "请从持续时间最长的子部分开始检查,了解[如何改进 INP](https://developer.chrome.com/docs/performance/insights/inp-breakdown)。"
2173
2209
  },
2174
2210
  "node_modules/@paulirish/trace_engine/models/trace/insights/INPBreakdown.js | duration": {
2175
2211
  "message": "时长"
@@ -2193,7 +2229,7 @@
2193
2229
  "message": "INP 细分"
2194
2230
  },
2195
2231
  "node_modules/@paulirish/trace_engine/models/trace/insights/ImageDelivery.js | description": {
2196
- "message": "缩短图片下载时间可优化网页的感知加载时间和 LCP。[详细了解图片大小优化](https://developer.chrome.com/docs/lighthouse/performance/uses-optimized-images/)"
2232
+ "message": "缩短图片下载时间可优化网页的感知加载时间和 LCP。[详细了解图片大小优化](https://developer.chrome.com/docs/performance/insights/image-delivery)"
2197
2233
  },
2198
2234
  "node_modules/@paulirish/trace_engine/models/trace/insights/ImageDelivery.js | estimatedSavings": {
2199
2235
  "message": "{PH1}(预计 {PH2})"
@@ -2223,7 +2259,7 @@
2223
2259
  "message": "使用视频格式而非 GIF 格式可以优化动画内容的下载大小。"
2224
2260
  },
2225
2261
  "node_modules/@paulirish/trace_engine/models/trace/insights/LCPBreakdown.js | description": {
2226
- "message": "每个[子部分都有特定的改进策略](https://web.dev/articles/optimize-lcp#lcp-breakdown)。理想情况下,LCP 的大部分时间应该用于加载资源,而不是消耗在延迟上。"
2262
+ "message": "每个[子部分都有特定的改进策略](https://developer.chrome.com/docs/performance/insights/lcp-breakdown)。理想情况下,LCP 的大部分时间应该用于加载资源,而不是消耗在延迟上。"
2227
2263
  },
2228
2264
  "node_modules/@paulirish/trace_engine/models/trace/insights/LCPBreakdown.js | duration": {
2229
2265
  "message": "时长"
@@ -2253,7 +2289,7 @@
2253
2289
  "message": "LCP 细分"
2254
2290
  },
2255
2291
  "node_modules/@paulirish/trace_engine/models/trace/insights/LCPDiscovery.js | description": {
2256
- "message": "使 LCP 图像能够立即从 HTML [被发现](https://web.dev/articles/optimize-lcp#1_eliminate_resource_load_delay),并[避免延迟加载](https://web.dev/articles/lcp-lazy-loading),以此优化 LCP"
2292
+ "message": "使 LCP 图像能够立即从 HTML 中被发现,并避免延迟加载,以此[优化 LCP](https://developer.chrome.com/docs/performance/insights/lcp-discovery)"
2257
2293
  },
2258
2294
  "node_modules/@paulirish/trace_engine/models/trace/insights/LCPDiscovery.js | fetchPriorityApplied": {
2259
2295
  "message": "已应用 fetchpriority 的 high 属性值"
@@ -2286,13 +2322,13 @@
2286
2322
  "message": "浪费的字节数"
2287
2323
  },
2288
2324
  "node_modules/@paulirish/trace_engine/models/trace/insights/LegacyJavaScript.js | description": {
2289
- "message": "Polyfill 和 transform 让旧版浏览器能够使用新的 JavaScript 功能。不过,其中的很多函数对现代浏览器而言并不是必需的。请考虑修改 JavaScript 构建流程,以便不转译 [Baseline](https://web.dev/articles/baseline-and-polyfills) 功能,除非您知道必须支持旧版浏览器。[了解为什么大多数网站可以部署 ES6+ 代码而无需转译](https://philipwalton.com/articles/the-state-of-es5-on-the-web/)"
2325
+ "message": "Polyfill 和 transform 让旧版浏览器能够使用新的 JavaScript 功能。不过,其中的很多函数对现代浏览器而言并不是必需的。请考虑修改 JavaScript 构建流程,以便不转译 [Baseline](https://web.dev/articles/baseline-and-polyfills) 功能,除非您知道必须支持旧版浏览器。[了解为什么大多数网站可以部署 ES6+ 代码而无需转译](https://developer.chrome.com/docs/performance/insights/legacy-javascript)"
2290
2326
  },
2291
2327
  "node_modules/@paulirish/trace_engine/models/trace/insights/LegacyJavaScript.js | title": {
2292
2328
  "message": "旧版 JavaScript"
2293
2329
  },
2294
2330
  "node_modules/@paulirish/trace_engine/models/trace/insights/ModernHTTP.js | description": {
2295
- "message": "HTTP/2 和 HTTP/3 拥有许多 HTTP/1.1 没有的优势,例如多路复用。[详细了解如何使用现代 HTTP](https://developer.chrome.com/docs/lighthouse/best-practices/uses-http2/)。"
2331
+ "message": "HTTP/2 和 HTTP/3 拥有许多 HTTP/1.1 没有的优势,例如多路复用。[详细了解如何使用现代 HTTP](https://developer.chrome.com/docs/performance/insights/modern-http)。"
2296
2332
  },
2297
2333
  "node_modules/@paulirish/trace_engine/models/trace/insights/ModernHTTP.js | noOldProtocolRequests": {
2298
2334
  "message": "没有请求使用 HTTP/1.1,或者请求当前对 HTTP/1.1 的使用不存在显著的优化空间。只有当同一来源的静态资源达到六个或更多,且这些资源并非来自本地开发环境或第三方来源时,HTTP/1.1 请求才会被标记。"
@@ -2325,7 +2361,7 @@
2325
2361
  "message": "未使用的 preconnect。请检查并确保正确使用了 crossorigin 属性。"
2326
2362
  },
2327
2363
  "node_modules/@paulirish/trace_engine/models/trace/insights/NetworkDependencyTree.js | description": {
2328
- "message": "[避免链接关键请求](https://developer.chrome.com/docs/lighthouse/performance/critical-request-chains),方法是缩短链长、缩减资源的下载文件大小,或者推迟下载不必要的资源,从而提高网页加载速度。"
2364
+ "message": "[避免链接关键请求](https://developer.chrome.com/docs/performance/insights/network-dependency-tree),方法是缩短链长、缩减资源的下载文件大小,或者推迟下载不必要的资源,从而提高网页加载速度。"
2329
2365
  },
2330
2366
  "node_modules/@paulirish/trace_engine/models/trace/insights/NetworkDependencyTree.js | estSavingTableDescription": {
2331
2367
  "message": "为最重要的源添加 [preconnect](https://developer.chrome.com/docs/lighthouse/performance/uses-rel-preconnect/) 提示,但请尽量不要超过 4 个。"
@@ -2364,22 +2400,22 @@
2364
2400
  "message": "避免链接关键请求,方法是缩短链长、缩减资源的下载文件大小,或者推迟下载不必要的资源,从而提高网页加载速度。"
2365
2401
  },
2366
2402
  "node_modules/@paulirish/trace_engine/models/trace/insights/RenderBlocking.js | description": {
2367
- "message": "请求正在屏蔽网页的初始渲染,这可能会延迟 LCP。[延迟或内嵌](https://web.dev/learn/performance/understanding-the-critical-path#render-blocking_resources)可以将这些网络请求移出关键路径。"
2403
+ "message": "请求正在屏蔽网页的初始渲染,这可能会延迟 LCP。[延迟或内嵌](https://developer.chrome.com/docs/performance/insights/render-blocking)可以将这些网络请求移出关键路径。"
2368
2404
  },
2369
2405
  "node_modules/@paulirish/trace_engine/models/trace/insights/RenderBlocking.js | duration": {
2370
2406
  "message": "时长"
2371
2407
  },
2372
2408
  "node_modules/@paulirish/trace_engine/models/trace/insights/RenderBlocking.js | noRenderBlocking": {
2373
- "message": "此导航没有渲染阻塞请求"
2409
+ "message": "本次导航没有阻塞渲染的请求"
2374
2410
  },
2375
2411
  "node_modules/@paulirish/trace_engine/models/trace/insights/RenderBlocking.js | renderBlockingRequest": {
2376
2412
  "message": "请求"
2377
2413
  },
2378
2414
  "node_modules/@paulirish/trace_engine/models/trace/insights/RenderBlocking.js | title": {
2379
- "message": "渲染屏蔽请求"
2415
+ "message": "渲染阻塞请求"
2380
2416
  },
2381
2417
  "node_modules/@paulirish/trace_engine/models/trace/insights/SlowCSSSelector.js | description": {
2382
- "message": "如果“重新计算样式”的成本仍然很高,优化选择器可以降低此成本。请对用时较长及慢路径所占百分比较高的[选择器进行优化](https://developer.chrome.com/docs/devtools/performance/selector-stats)。选择器越简单、数量越少,DOM 的规模越小、结构越简单,越能降低匹配成本。"
2418
+ "message": "如果“重新计算样式”的成本仍然很高,优化选择器可以降低此成本。请对用时较长及慢路径所占百分比较高的[选择器进行优化](https://developer.chrome.com/docs/performance/insights/slow-css-selector)。选择器越简单、数量越少,DOM 的规模越小、结构越简单,越能降低匹配成本。"
2383
2419
  },
2384
2420
  "node_modules/@paulirish/trace_engine/models/trace/insights/SlowCSSSelector.js | elapsed": {
2385
2421
  "message": "用时"
@@ -2418,7 +2454,7 @@
2418
2454
  "message": "传输大小"
2419
2455
  },
2420
2456
  "node_modules/@paulirish/trace_engine/models/trace/insights/ThirdParties.js | description": {
2421
- "message": "第三方代码可能会显著影响加载性能。[请减少并推迟加载第三方代码](https://web.dev/articles/optimizing-content-efficiency-loading-third-party-javascript/),以优先渲染您的网页内容。"
2457
+ "message": "第三方代码可能会显著影响加载性能。[请减少并推迟加载第三方代码](https://developer.chrome.com/docs/performance/insights/third-parties),以优先渲染您的网页内容。"
2422
2458
  },
2423
2459
  "node_modules/@paulirish/trace_engine/models/trace/insights/ThirdParties.js | noThirdParties": {
2424
2460
  "message": "未找到第三方内容"
@@ -2427,7 +2463,7 @@
2427
2463
  "message": "第三方"
2428
2464
  },
2429
2465
  "node_modules/@paulirish/trace_engine/models/trace/insights/Viewport.js | description": {
2430
- "message": "如果视口未针对移动设备进行优化,点按互动可能会[延迟最多 300 毫秒](https://developer.chrome.com/blog/300ms-tap-delay-gone-away/)。"
2466
+ "message": "如果视口未针对移动设备进行优化,点按互动可能会[延迟最多 300 毫秒](https://developer.chrome.com/docs/performance/insights/viewport)。"
2431
2467
  },
2432
2468
  "node_modules/@paulirish/trace_engine/models/trace/insights/Viewport.js | mobileTapDelayLabel": {
2433
2469
  "message": "移动设备点按延迟"
package/tsconfig.json CHANGED
@@ -24,8 +24,10 @@
24
24
  "core/test/results/sample_v2.json",
25
25
  "core/test/fixtures/unresolved-perflog.json",
26
26
  "core/test/fixtures/traces/lcp-m78.devtools.log.json",
27
+ "core/lib/baseline/web-features-metadata.json",
27
28
  "core/lib/legacy-javascript/polyfill-graph-data.json",
28
29
  "core/lib/legacy-javascript/polyfill-module-data.json",
30
+ "core/lib/baseline/baseline-features.json",
29
31
  "shared/localization/locales/en-US.json",
30
32
  ],
31
33
  "exclude": [
@@ -4,22 +4,22 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
- import {Protocol as Crdp} from 'devtools-protocol/types/protocol.js';
7
+ import { Protocol as Crdp } from 'devtools-protocol/types/protocol.js';
8
8
  import * as TraceEngine from '@paulirish/trace_engine';
9
9
  import * as Lantern from '../core/lib/lantern/lantern.js';
10
10
 
11
- import {parseManifest} from '../core/lib/manifest-parser.js';
12
- import {LighthouseError} from '../core/lib/lh-error.js';
13
- import {NetworkRequest as _NetworkRequest} from '../core/lib/network-request.js';
11
+ import { parseManifest } from '../core/lib/manifest-parser.js';
12
+ import { LighthouseError } from '../core/lib/lh-error.js';
13
+ import { NetworkRequest as _NetworkRequest } from '../core/lib/network-request.js';
14
14
  import speedline from 'speedline-core';
15
15
  import * as CDTSourceMap from '../core/lib/cdt/generated/SourceMap.js';
16
- import {ArbitraryEqualityMap} from '../core/lib/arbitrary-equality-map.js';
16
+ import { ArbitraryEqualityMap } from '../core/lib/arbitrary-equality-map.js';
17
17
  import type { TaskNode as _TaskNode } from '../core/lib/tracehouse/main-thread-tasks.js';
18
18
  import AuditDetails from './lhr/audit-details.js'
19
19
  import Config from './config.js';
20
20
  import Gatherer from './gatherer.js';
21
- import {IEntity} from 'third-party-web';
22
- import {IcuMessage} from './lhr/i18n.js';
21
+ import { IEntity } from 'third-party-web';
22
+ import { IcuMessage } from './lhr/i18n.js';
23
23
  import LHResult from './lhr/lhr.js'
24
24
  import Protocol from './protocol.js';
25
25
  import Util from './utility-types.js';
@@ -51,13 +51,13 @@ interface UniversalBaseArtifacts {
51
51
  /** The host's device pixel ratio. */
52
52
  HostDPR: number;
53
53
  /** Device which Chrome is running on. */
54
- HostFormFactor: 'desktop'|'mobile';
54
+ HostFormFactor: 'desktop' | 'mobile';
55
55
  /** The user agent string of the version of Chrome used. */
56
56
  HostUserAgent: string;
57
57
  /** The product string of the version of Chrome used. Example: HeadlessChrome/123.2.2.0 would be from old headless. */
58
58
  HostProduct: string;
59
59
  /** Information about how Lighthouse artifacts were gathered. */
60
- GatherContext: {gatherMode: Gatherer.GatherMode};
60
+ GatherContext: { gatherMode: Gatherer.GatherMode };
61
61
  }
62
62
 
63
63
  /**
@@ -87,7 +87,7 @@ interface PublicGathererArtifacts {
87
87
  /** The contents of the main HTML document network resource. */
88
88
  MainDocumentContent: string;
89
89
  /** The values of the <meta> elements in the head. */
90
- MetaElements: Array<{name?: string, content?: string, property?: string, httpEquiv?: string, charset?: string, node: Artifacts.NodeDetails}>;
90
+ MetaElements: Array<{ name?: string, content?: string, property?: string, httpEquiv?: string, charset?: string, node: Artifacts.NodeDetails }>;
91
91
  /** Information on all scripts in the page. */
92
92
  Scripts: Artifacts.Script[];
93
93
  /** The primary trace taken over the entire run. */
@@ -117,18 +117,27 @@ export interface GathererArtifacts extends PublicGathererArtifacts {
117
117
  /** All the iframe elements in the page. */
118
118
  IFrameElements: Artifacts.IFrameElement[];
119
119
  /** All the input elements, including associated form and label elements. */
120
- Inputs: {inputs: Artifacts.InputElement[]; forms: Artifacts.FormElement[]; labels: Artifacts.LabelElement[]};
120
+ Inputs: { inputs: Artifacts.InputElement[]; forms: Artifacts.FormElement[]; labels: Artifacts.LabelElement[] };
121
121
  /** Screenshot of the entire page (rather than just the above the fold content). */
122
122
  FullPageScreenshot: LHResult.FullPageScreenshot | null;
123
123
  /** The issues surfaced in the devtools Issues panel */
124
124
  InspectorIssues: Artifacts.InspectorIssues;
125
+ /** The status and tools registered via WebMCP. */
126
+ WebMCP: {isSupported: boolean, tools: Artifacts.WebMCPTool[]};
127
+ /**
128
+ * The WebMCP schema validation issues.
129
+ * TODO: fold this into the WebMCP artifact.
130
+ */
131
+ WebMcpSchemaIssues: Artifacts.WebMcpSchemaIssue[];
125
132
  /** JS coverage information for code used during audit. Keyed by script id. */
126
133
  // 'url' is excluded because it can be overridden by a magic sourceURL= comment, which makes keeping it a dangerous footgun!
127
134
  JsUsage: Record<string, Omit<Crdp.Profiler.ScriptCoverage, 'url'>>;
128
135
  /** The user agent string that Lighthouse used to load the page. Set to the empty string if unknown. */
129
136
  NetworkUserAgent: string;
130
137
  /** Information on fetching and the content of the /robots.txt file. */
131
- RobotsTxt: {status: number|null, content: string|null, errorMessage?: string};
138
+ RobotsTxt: { status: number | null, content: string | null, errorMessage?: string };
139
+ /** Information on fetching and the content of the /llm.txt file. */
140
+ LlmsTxt: { status: number | null, content: string | null, errorMessage?: string };
132
141
  /** Source maps of scripts executed in the page. */
133
142
  SourceMaps: Array<Artifacts.SourceMap>;
134
143
  /** Information on detected tech stacks (e.g. JS libraries) used by the page. */
@@ -142,13 +151,23 @@ export interface GathererArtifacts extends PublicGathererArtifacts {
142
151
  }
143
152
 
144
153
  declare module Artifacts {
154
+ interface WebMcpSchemaIssue {
155
+ errorType: string;
156
+ violatingNodeId?: number;
157
+ nodeDetails?: NodeDetails;
158
+ formToolName?: string | null;
159
+ formToolDescription?: string | null;
160
+ paramName?: string | null;
161
+ paramDescription?: string | null;
162
+ }
163
+
145
164
  type ComputedContext = Util.Immutable<{
146
165
  computedCache: Map<string, ArbitraryEqualityMap>;
147
166
  }>;
148
167
 
149
168
  type NetworkRequest = _NetworkRequest;
150
169
  type TaskNode = _TaskNode;
151
- type TBTImpactTask = TaskNode & {tbtImpact: number, selfTbtImpact: number, selfBlockingTime: number};
170
+ type TBTImpactTask = TaskNode & { tbtImpact: number, selfTbtImpact: number, selfBlockingTime: number };
152
171
  type MetaElement = Artifacts['MetaElements'][0];
153
172
 
154
173
  interface URL {
@@ -188,12 +207,14 @@ declare module Artifacts {
188
207
  impact?: string;
189
208
  tags: Array<string>;
190
209
  nodes: Array<{
191
- target: Array<string|string[]>;
210
+ target: Array<string | string[]>;
192
211
  failureSummary?: string;
193
212
  node: NodeDetails;
194
213
  relatedNodes: NodeDetails[];
195
214
  }>;
196
215
  error?: RuleExecutionError;
216
+ help?: string;
217
+ description?: string;
197
218
  }
198
219
 
199
220
  interface Accessibility {
@@ -239,7 +260,7 @@ declare module Artifacts {
239
260
  /** @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#Attributes */
240
261
  interface LinkElement {
241
262
  /** The `rel` attribute of the link, normalized to lower case. @see https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types */
242
- rel: 'alternate'|'canonical'|'dns-prefetch'|'preconnect'|'preload'|'stylesheet'|string;
263
+ rel: 'alternate' | 'canonical' | 'dns-prefetch' | 'preconnect' | 'preload' | 'stylesheet' | string;
243
264
  /** The `href` attribute of the link or `null` if it was invalid in the header. */
244
265
  href: string | null
245
266
  /** The raw value of the `href` attribute. Only different from `href` when source is 'headers' */
@@ -251,13 +272,13 @@ declare module Artifacts {
251
272
  /** The `crossOrigin` attribute of the link */
252
273
  crossOrigin: string | null
253
274
  /** Where the link was found, either in the DOM or in the headers of the main document */
254
- source: 'head'|'body'|'headers'
275
+ source: 'head' | 'body' | 'headers'
255
276
  node: NodeDetails | null
256
277
  /** The fetch priority hint for preload links. */
257
278
  fetchPriority?: string;
258
279
  }
259
280
 
260
- interface Script extends Omit<Crdp.Debugger.ScriptParsedEvent, 'url'|'embedderName'> {
281
+ interface Script extends Omit<Crdp.Debugger.ScriptParsedEvent, 'url' | 'embedderName'> {
261
282
  /**
262
283
  * Set by a sourceURL= magic comment if present, otherwise this is the same as the URL.
263
284
  * Use this field for presentational purposes only.
@@ -288,7 +309,7 @@ declare module Artifacts {
288
309
  * `map` is optional because the spec defines that either `url` or `map` must be defined.
289
310
  * We explicitly only support `map` here.
290
311
  */
291
- sections?: Array<{offset: {line: number, column: number}, map?: RawSourceMap}>
312
+ sections?: Array<{ offset: { line: number, column: number }, map?: RawSourceMap }>
292
313
  }
293
314
 
294
315
  /**
@@ -326,7 +347,7 @@ declare module Artifacts {
326
347
  files: Record<string, number>;
327
348
  unmappedBytes: number;
328
349
  totalBytes: number;
329
- } | {errorMessage: string};
350
+ } | { errorMessage: string };
330
351
  }
331
352
 
332
353
  /** @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#Attributes */
@@ -429,10 +450,10 @@ declare module Artifacts {
429
450
  }
430
451
 
431
452
  interface TraceElement {
432
- traceEventType: 'trace-engine'|'layout-shift'|'animation';
453
+ traceEventType: 'trace-engine' | 'layout-shift' | 'animation';
433
454
  node: NodeDetails;
434
455
  nodeId: number;
435
- animations?: {name?: string, failureReasonsMask?: number, unsupportedProperties?: string[]}[];
456
+ animations?: { name?: string, failureReasonsMask?: number, unsupportedProperties?: string[] }[];
436
457
  type?: string;
437
458
  }
438
459
 
@@ -541,9 +562,9 @@ declare module Artifacts {
541
562
  /** The subset of trace events from the main frame and any child frames, sorted by timestamp. */
542
563
  frameTreeEvents: Array<TraceEvent>;
543
564
  /** IDs for the trace's main frame, and process. The startingPid is the initial process id, however cross-origin navigations may incur changes to the pid while the frame ID remains identical. */
544
- mainFrameInfo: {startingPid: number, frameId: string};
565
+ mainFrameInfo: { startingPid: number, frameId: string };
545
566
  /** The list of frames committed in the trace. */
546
- frames: Array<{id: string, url: string}>;
567
+ frames: Array<{ id: string, url: string }>;
547
568
  /** The trace event marking the time at which the run should consider to have begun. Typically the same as the navigationStart but might differ due to SPA navigations, client-side redirects, etc. In the timespan case, this event is injected by Lighthouse itself. */
548
569
  timeOriginEvt: TraceEvent;
549
570
  /** All received trace events subsetted to important categories. */
@@ -641,11 +662,23 @@ declare module Artifacts {
641
662
  observedSpeedIndexTs: number;
642
663
  }
643
664
 
665
+ interface WebMCPTool {
666
+ name: string;
667
+ description: string;
668
+ inputSchema: Record<string, any>;
669
+ frameId: string;
670
+ backendNodeId?: number;
671
+ stackTrace?: any;
672
+ nodeDetails?: NodeDetails;
673
+ }
674
+
644
675
  interface FormElement {
645
676
  id: string;
646
677
  name: string;
647
678
  autocomplete: string;
648
679
  node: NodeDetails;
680
+ webMcpToolname?: string | null;
681
+ webMcpTooldescription?: string | null;
649
682
  }
650
683
 
651
684
  /** Attributes collected for every input element in the inputs array from the forms interface. */
@@ -761,7 +794,7 @@ export interface Trace {
761
794
 
762
795
  /** The type of the Profile & ProfileChunk event in Chromium traces. Note that this is subtly different from Crdp.Profiler.Profile. */
763
796
  export interface TraceCpuProfile {
764
- nodes?: Array<{id: number, callFrame: {functionName: string, url?: string}, parent?: number}>
797
+ nodes?: Array<{ id: number, callFrame: { functionName: string, url?: string }, parent?: number }>
765
798
  samples?: Array<number>
766
799
  timeDeltas?: Array<number>
767
800
  }
@@ -831,7 +864,7 @@ export interface TraceEvent {
831
864
  unsupportedProperties?: string[];
832
865
  size?: number;
833
866
  /** Responsiveness data. */
834
- interactionType?: 'drag'|'keyboard'|'tapOrClick';
867
+ interactionType?: 'drag' | 'keyboard' | 'tapOrClick';
835
868
  maxDuration?: number;
836
869
  type?: string;
837
870
  functionName?: string;
@@ -851,21 +884,24 @@ export interface TraceEvent {
851
884
  connectionReused?: boolean;
852
885
  encodedDataLength?: number;
853
886
  decodedBodyLength?: number;
854
- initiator?: {type: string, url?: string, stack?: any};
887
+ initiator?: { type: string, url?: string, stack?: any };
855
888
  protocol?: string;
856
889
  finishTime?: number;
857
- headers?: Array<{name: string, value: string}>;
890
+ headers?: Array<{ name: string, value: string }>;
858
891
  };
859
892
  frame?: string;
860
893
  name?: string;
861
894
  labels?: string;
895
+ feature?: string;
896
+ lineNumber?: number;
897
+ columnNumber?: number;
862
898
  };
863
899
  pid: number;
864
900
  tid: number;
865
901
  /** Timestamp of the event in microseconds. */
866
902
  ts: number;
867
903
  dur: number;
868
- ph: 'B'|'b'|'D'|'E'|'e'|'F'|'I'|'M'|'N'|'n'|'O'|'R'|'S'|'T'|'X';
904
+ ph: 'B' | 'b' | 'D' | 'E' | 'e' | 'F' | 'I' | 'M' | 'N' | 'n' | 'O' | 'R' | 'S' | 'T' | 'X';
869
905
  s?: 't';
870
906
  id?: string;
871
907
  id2?: {
@@ -873,7 +909,7 @@ export interface TraceEvent {
873
909
  };
874
910
  }
875
911
 
876
- declare module Trace {
912
+ declare namespace Trace {
877
913
  /**
878
914
  * Base event of a `ph: 'X'` 'complete' event. Extend with `name` and `args` as
879
915
  * needed.
@@ -894,7 +930,7 @@ declare module Trace {
894
930
  * more specific `ph` (if needed).
895
931
  */
896
932
  interface AsyncEvent {
897
- ph: 'b'|'e'|'n';
933
+ ph: 'b' | 'e' | 'n';
898
934
  cat: string;
899
935
  pid: number;
900
936
  tid: number;
package/types/audit.d.ts CHANGED
@@ -13,7 +13,7 @@ import {IcuMessage} from './lhr/i18n.js';
13
13
  import * as AuditResult from './lhr/audit-result.js';
14
14
  import Util from './utility-types.js';
15
15
 
16
- declare module Audit {
16
+ declare namespace Audit {
17
17
  export import Details = AuditDetails;
18
18
  export type Result = AuditResult.Result;
19
19
  export type ScoreDisplayMode = AuditResult.ScoreDisplayMode;