lighthouse 13.5.0-dev.20261008 → 13.5.0-dev.20261012
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.
- package/.agents/skills/update-ard-port/SKILL.md +170 -0
- package/cli/cli-flags.js +0 -1
- package/cli/sentry-prompt.js +3 -4
- package/cli/test/smokehouse/config/exclusions.js +1 -1
- package/core/audits/agentic/ard-schema.d.ts +13 -0
- package/core/audits/agentic/ard-schema.js +81 -33
- package/core/audits/agentic/llms-txt.js +5 -2
- package/core/audits/long-tasks.js +2 -1
- package/core/audits/screenshot-thumbnails.d.ts +0 -13
- package/core/audits/screenshot-thumbnails.js +0 -45
- package/core/audits/seo/robots-txt.js +3 -8
- package/core/audits/unsized-images.d.ts +0 -7
- package/core/audits/unsized-images.js +7 -26
- package/core/computed/page-dependency-graph.js +0 -4
- package/core/computed/speedline.js +20 -5
- package/core/gather/gatherers/agentic/ard.d.ts +59 -4
- package/core/gather/gatherers/agentic/ard.js +218 -56
- package/core/gather/gatherers/image-elements.d.ts +7 -0
- package/core/gather/gatherers/image-elements.js +75 -24
- package/dist/report/flow.js +13 -13
- package/package.json +5 -8
- package/shared/localization/locales/en-US.json +13 -4
- package/shared/localization/locales/en-XL.json +13 -4
- package/third-party/ard/README.md +18 -9
- package/third-party/ard/ard-test.js +183 -266
- package/third-party/ard/ard.d.ts +17 -1
- package/third-party/ard/ard.js +276 -45
- package/third-party/ard/schema-validator.d.ts +14 -5
- package/third-party/ard/schema-validator.js +921 -1177
- package/third-party/ard/spec/schemas/ard-entry.schema.json +176 -0
- package/types/artifacts.d.ts +35 -6
- package/build-tracker.config.js +0 -16
- package/third-party/ard/spec/schemas/ai-catalog.schema.json +0 -292
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lighthouse",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "13.5.0-dev.
|
|
4
|
+
"version": "13.5.0-dev.20261012",
|
|
5
5
|
"description": "Automated auditing, performance metrics, and best practices for the web.",
|
|
6
6
|
"main": "./core/index.js",
|
|
7
7
|
"bin": {
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"clean": "rm -r dist proto/scripts/*.json proto/scripts/*_pb2.* proto/scripts/*_pb.* proto/scripts/__pycache__ proto/scripts/*.pyc *.report.html *.report.dom.html *.report.json *.devtoolslog.json *.trace.json shared/localization/locales/*.ctc.json || true",
|
|
39
39
|
"clean-types": "git clean -xfq '*.d.ts' '*.d.cts' -e 'node_modules/' -e 'dist/' -e '.tmp/' -e '**/types/'",
|
|
40
40
|
"lint": "[ \"$CI\" = true ] && eslint --quiet -f codeframe . || eslint .",
|
|
41
|
+
"zizmor": "uvx zizmor@1.25.2 --gh-token=\"$(gh auth token)\" .github/workflows",
|
|
41
42
|
"smoke": "node -r source-map-support/register cli/test/smokehouse/frontends/smokehouse-bin.js",
|
|
42
43
|
"debug": "node --inspect-brk ./cli/index.js",
|
|
43
44
|
"start": "yarn build-report --standalone && node ./cli/index.js",
|
|
@@ -53,14 +54,13 @@
|
|
|
53
54
|
"test-proto": "yarn compile-proto && yarn build-proto-roundtrip",
|
|
54
55
|
"unit-core": "yarn mocha core",
|
|
55
56
|
"unit-cli": "yarn mocha --testMatch cli/**/*-test.js",
|
|
56
|
-
"unit-lantern-trace": "INTERNAL_LANTERN_USE_TRACE=1 yarn mocha core/test/computed/metrics core/test/audits",
|
|
57
|
+
"unit-lantern-trace": "INTERNAL_LANTERN_USE_TRACE=1 yarn mocha core/test/computed/metrics core/test/computed/page-dependency-graph-test.js core/test/computed/tbt-impact-tasks-test.js core/test/audits",
|
|
57
58
|
"unit-report": "yarn mocha --testMatch report/**/*-test.js",
|
|
58
59
|
"unit-treemap": "yarn mocha --testMatch treemap/**/*-test.js",
|
|
59
60
|
"unit-viewer": "yarn mocha --testMatch viewer/**/*-test.js",
|
|
60
61
|
"unit-flow": "bash flow-report/test/run-flow-report-tests.sh",
|
|
61
62
|
"unit": "yarn unit-flow && yarn mocha && yarn unit-lantern-trace",
|
|
62
63
|
"unit:ci": "NODE_OPTIONS=--max-old-space-size=8192 npm run unit",
|
|
63
|
-
"unit-lantern-trace:ci": "NODE_OPTIONS=--max-old-space-size=8192 npm run unit-lantern-trace",
|
|
64
64
|
"core-unit": "yarn unit-core",
|
|
65
65
|
"cli-unit": "yarn unit-cli",
|
|
66
66
|
"viewer-unit": "yarn unit-viewer",
|
|
@@ -71,7 +71,6 @@
|
|
|
71
71
|
"deploy-treemap": "yarn build-treemap --deploy",
|
|
72
72
|
"deploy-viewer": "yarn build-viewer --deploy",
|
|
73
73
|
"vercel-build": "yarn build-sample-reports && yarn build-viewer && yarn build-treemap",
|
|
74
|
-
"dogfood-lhci": "./core/scripts/dogfood-lhci.sh",
|
|
75
74
|
"timing-trace": "node core/scripts/generate-timing-trace.js",
|
|
76
75
|
"changelog": "conventional-changelog --config ./build/changelog-generator/index.cjs --infile changelog.md --same-file",
|
|
77
76
|
"type-check": "tsc --build ./tsconfig-all.json",
|
|
@@ -111,7 +110,7 @@
|
|
|
111
110
|
"@jest/fake-timers": "^29.7.0",
|
|
112
111
|
"@testing-library/preact": "^3.1.1",
|
|
113
112
|
"@testing-library/preact-hooks": "^1.1.0",
|
|
114
|
-
"@types/archiver": "^
|
|
113
|
+
"@types/archiver": "^8.0.0",
|
|
115
114
|
"@types/chrome": "^0.1.42",
|
|
116
115
|
"@types/configstore": "^6.0.2",
|
|
117
116
|
"@types/cpy": "^5.1.0",
|
|
@@ -121,7 +120,6 @@
|
|
|
121
120
|
"@types/gh-pages": "^2.0.0",
|
|
122
121
|
"@types/google.analytics": "0.0.39",
|
|
123
122
|
"@types/gtag.js": "0.0.20",
|
|
124
|
-
"@types/jpeg-js": "^0.3.7",
|
|
125
123
|
"@types/jsdom": "^16.2.13",
|
|
126
124
|
"@types/lodash-es": "^4.17.12",
|
|
127
125
|
"@types/mocha": "^9.0.0",
|
|
@@ -138,7 +136,7 @@
|
|
|
138
136
|
"@typescript-eslint/parser": "^8.60.1",
|
|
139
137
|
"acorn": "^8.5.0",
|
|
140
138
|
"angular": "^1.7.4",
|
|
141
|
-
"archiver": "^
|
|
139
|
+
"archiver": "^8.0.0",
|
|
142
140
|
"builtin-modules": "^3.3.0",
|
|
143
141
|
"chalk": "^2.4.1",
|
|
144
142
|
"chrome-devtools-frontend": "1.0.1705227",
|
|
@@ -195,7 +193,6 @@
|
|
|
195
193
|
"enquirer": "^2.3.6",
|
|
196
194
|
"http-link-header": "^1.1.1",
|
|
197
195
|
"intl-messageformat": "^10.5.3",
|
|
198
|
-
"jpeg-js": "^0.4.4",
|
|
199
196
|
"js-library-detector": "^6.7.0",
|
|
200
197
|
"lighthouse-logger": "^2.0.2",
|
|
201
198
|
"lighthouse-stack-packs": "1.12.3",
|
|
@@ -624,19 +624,28 @@
|
|
|
624
624
|
"message": "Severity"
|
|
625
625
|
},
|
|
626
626
|
"core/audits/agentic/ard-schema.js | description": {
|
|
627
|
-
"message": "
|
|
627
|
+
"message": "A valid Agentic Resource Discovery (ARD) manifest, served at `/.well-known/ard.json` or linked with `rel=\"ard\"`, lets AI agents and registries discover and verify your resources. [Learn more about the ARD specification](https://agenticresourcediscovery.org/spec/)."
|
|
628
628
|
},
|
|
629
629
|
"core/audits/agentic/ard-schema.js | explanation": {
|
|
630
|
-
"message": "
|
|
630
|
+
"message": "ARD manifest could not be loaded for schema validation."
|
|
631
631
|
},
|
|
632
632
|
"core/audits/agentic/ard-schema.js | failureTitle": {
|
|
633
|
-
"message": "
|
|
633
|
+
"message": "ARD manifest is invalid"
|
|
634
634
|
},
|
|
635
635
|
"core/audits/agentic/ard-schema.js | itemSeverityError": {
|
|
636
636
|
"message": "Error"
|
|
637
637
|
},
|
|
638
|
+
"core/audits/agentic/ard-schema.js | legacyDiscovery": {
|
|
639
|
+
"message": "Manifest was only found through a legacy location (`/.well-known/ai-catalog.json` or `rel=\"ai-catalog\"`). ARD consumers are not required to check these, so ARD consumers may not discover your resources. Serve the manifest at `/.well-known/ard.json` or link it with `rel=\"ard\"`."
|
|
640
|
+
},
|
|
641
|
+
"core/audits/agentic/ard-schema.js | sourceFetchFailed": {
|
|
642
|
+
"message": "Advertised ARD manifest location could not be loaded."
|
|
643
|
+
},
|
|
644
|
+
"core/audits/agentic/ard-schema.js | sourceUnavailable": {
|
|
645
|
+
"message": "Advertised ARD manifest location could not be loaded (HTTP status {statusCode})."
|
|
646
|
+
},
|
|
638
647
|
"core/audits/agentic/ard-schema.js | title": {
|
|
639
|
-
"message": "
|
|
648
|
+
"message": "ARD manifest is valid"
|
|
640
649
|
},
|
|
641
650
|
"core/audits/agentic/llms-txt.js | description": {
|
|
642
651
|
"message": "If your llms.txt file does not follow recommendations, large language models may not be able to understand how you want your website to be crawled or used for training. The [llms.txt](https://llmstxt.org/) file should be a Markdown file containing at least one H1 header. [Learn more about the llms.txt audit](https://developer.chrome.com/docs/lighthouse/agentic-browsing/llms-txt)."
|
|
@@ -624,19 +624,28 @@
|
|
|
624
624
|
"message": "Ŝév̂ér̂ít̂ý"
|
|
625
625
|
},
|
|
626
626
|
"core/audits/agentic/ard-schema.js | description": {
|
|
627
|
-
"message": "
|
|
627
|
+
"message": "Â v́âĺîd́ Âǵêńt̂íĉ Ŕêśôúr̂ćê D́îśĉóv̂ér̂ý (ÂŔD̂) ḿâńîf́êśt̂, śêŕv̂éd̂ át̂ `/.well-known/ard.json` ór̂ ĺîńk̂éd̂ ẃît́ĥ `rel=\"ard\"`, ĺêt́ŝ ÁÎ áĝén̂t́ŝ án̂d́ r̂éĝíŝt́r̂íêś d̂íŝćôv́êŕ âńd̂ v́êŕîf́ŷ ýôúr̂ ŕêśôúr̂ćêś. [L̂éâŕn̂ ḿôŕê áb̂óût́ t̂h́ê ÁR̂D́ ŝṕêćîf́îćât́îón̂](https://agenticresourcediscovery.org/spec/)."
|
|
628
628
|
},
|
|
629
629
|
"core/audits/agentic/ard-schema.js | explanation": {
|
|
630
|
-
"message": "
|
|
630
|
+
"message": "ÂŔD̂ ḿâńîf́êśt̂ ćôúl̂d́ n̂ót̂ b́ê ĺôád̂éd̂ f́ôŕ ŝćĥém̂á v̂ál̂íd̂át̂íôń."
|
|
631
631
|
},
|
|
632
632
|
"core/audits/agentic/ard-schema.js | failureTitle": {
|
|
633
|
-
"message": "
|
|
633
|
+
"message": "ÂŔD̂ ḿâńîf́êśt̂ íŝ ín̂v́âĺîd́"
|
|
634
634
|
},
|
|
635
635
|
"core/audits/agentic/ard-schema.js | itemSeverityError": {
|
|
636
636
|
"message": "Êŕr̂ór̂"
|
|
637
637
|
},
|
|
638
|
+
"core/audits/agentic/ard-schema.js | legacyDiscovery": {
|
|
639
|
+
"message": "M̂án̂íf̂éŝt́ ŵáŝ ón̂ĺŷ f́ôún̂d́ t̂h́r̂óûǵĥ á l̂éĝáĉý l̂óĉát̂íôń (`/.well-known/ai-catalog.json` ôŕ `rel=\"ai-catalog\"`). ÂŔD̂ ćôńŝúm̂ér̂ś âŕê ńôt́ r̂éq̂úîŕêd́ t̂ó ĉh́êćk̂ t́ĥéŝé, ŝó ÂŔD̂ ćôńŝúm̂ér̂ś m̂áŷ ńôt́ d̂íŝćôv́êŕ ŷóûŕ r̂éŝóûŕĉéŝ. Śêŕv̂é t̂h́ê ḿâńîf́êśt̂ át̂ `/.well-known/ard.json` ór̂ ĺîńk̂ ít̂ ẃît́ĥ `rel=\"ard\"`."
|
|
640
|
+
},
|
|
641
|
+
"core/audits/agentic/ard-schema.js | sourceFetchFailed": {
|
|
642
|
+
"message": "Âd́v̂ér̂t́îśêd́ ÂŔD̂ ḿâńîf́êśt̂ ĺôćât́îón̂ ćôúl̂d́ n̂ót̂ b́ê ĺôád̂éd̂."
|
|
643
|
+
},
|
|
644
|
+
"core/audits/agentic/ard-schema.js | sourceUnavailable": {
|
|
645
|
+
"message": "Âd́v̂ér̂t́îśêd́ ÂŔD̂ ḿâńîf́êśt̂ ĺôćât́îón̂ ćôúl̂d́ n̂ót̂ b́ê ĺôád̂éd̂ (H́T̂T́P̂ śt̂át̂úŝ {statusCode})."
|
|
646
|
+
},
|
|
638
647
|
"core/audits/agentic/ard-schema.js | title": {
|
|
639
|
-
"message": "
|
|
648
|
+
"message": "ÂŔD̂ ḿâńîf́êśt̂ íŝ v́âĺîd́"
|
|
640
649
|
},
|
|
641
650
|
"core/audits/agentic/llms-txt.js | description": {
|
|
642
651
|
"message": "Îf́ ŷóûŕ l̂ĺm̂ś.t̂x́t̂ f́îĺê d́ôéŝ ńôt́ f̂ól̂ĺôẃ r̂éĉóm̂ḿêńd̂át̂íôńŝ, ĺâŕĝé l̂án̂ǵûáĝé m̂ód̂él̂ś m̂áŷ ńôt́ b̂é âb́l̂é t̂ó ûńd̂ér̂śt̂án̂d́ ĥóŵ ýôú ŵán̂t́ ŷóûŕ ŵéb̂śît́ê t́ô b́ê ćr̂áŵĺêd́ ôŕ ûśêd́ f̂ór̂ t́r̂áîńîńĝ. T́ĥé [l̂ĺm̂ś.t̂x́t̂](https://llmstxt.org/) f́îĺê śĥóûĺd̂ b́ê á M̂ár̂ḱd̂óŵń f̂íl̂é ĉón̂t́âín̂ín̂ǵ ât́ l̂éâśt̂ ón̂é Ĥ1 h́êád̂ér̂. [Ĺêár̂ń m̂ór̂é âb́ôút̂ t́ĥé l̂ĺm̂ś.t̂x́t̂ áûd́ît́](https://developer.chrome.com/docs/lighthouse/agentic-browsing/llms-txt)."
|
|
@@ -5,23 +5,32 @@ This is a JavaScript port of the Agentic Resource Discovery (ARD) Conformance Te
|
|
|
5
5
|
The original Python script is located in the `ards-project/ard-spec` repository:
|
|
6
6
|
- **Upstream Repository**: https://github.com/ards-project/ard-spec
|
|
7
7
|
- **Source Script**: `conformance/bin/conformance-test`
|
|
8
|
-
- **Schema**: `spec/schemas/
|
|
8
|
+
- **Schema**: `spec/schemas/ard-entry.schema.json` (`$defs/ArdManifest` and `$defs/ArdEntry`)
|
|
9
9
|
- **Pinned Commit SHA**: `b76f235a8f461876ad4f1e77abd0eb0eb302b48d`
|
|
10
|
+
- **Reviewed Upstream Files** (SHA-256 of the upstream content the port was last verified against; maintained by `yarn update:ard-spec --ack-port`, do not edit by hand):
|
|
11
|
+
- `conformance/bin/conformance-test`: `ac2f3cae1c4ac75261fe45786a117aaad275322c92b74110529ad03a794275b4`
|
|
12
|
+
- `spec/ard.md`: `6deb2cc58216fb279569d8ff61bd4595ccdf6ceaeef6766a1a1c9f25b6b68a62`
|
|
10
13
|
|
|
11
14
|
## Modifications for Lighthouse:
|
|
12
15
|
While the validation rules and test suite maintain 1:1 parity with the reference suite, the following adaptations were made for Lighthouse integration:
|
|
13
|
-
- **Structured Error Return:** `ConformanceTester` stores structured objects (`{ element, message }`) in `errors` and `
|
|
14
|
-
- **Precompiled Standalone Validator (`schema-validator.js`):** Uses `build/build-ard-schema.js` (`yarn build-ard-schema`) to precompile `
|
|
16
|
+
- **Structured Error Return:** `ConformanceTester` stores structured objects (`{ element, message }`) in `errors`, `warnings` and `infos` instead of formatted ANSI CLI strings. The `[label]` prefix upstream puts on entry messages is reported as `element` instead.
|
|
17
|
+
- **Precompiled Standalone Validator (`schema-validator.js`):** Uses `build/build-ard-schema.js` (`yarn build-ard-schema`) to precompile the `ArdManifest` and `ArdEntry` definitions of `ard-entry.schema.json` into a pure, standalone JavaScript module (`schema-validator.js`) ahead of time using `Ajv2020` and `ajv/dist/standalone`. This eliminates runtime dynamic compilation (`new Function()` / `eval()`), preventing Content Security Policy (CSP) `unsafe-eval` violations when running inside Chrome DevTools frontend, avoiding runtime `fs.readFileSync` calls in browser/bundled contexts, and keeping `Ajv` out of the client bundle.
|
|
15
18
|
- **ESM Format Validation:** Imports `uri` and `date-time` format validators statically from `ajv-formats/dist/formats.js` rather than bundling the full `ajv-formats` dynamic plugin.
|
|
19
|
+
- **Schema Error Messages:** Ajv reports different messages than Python's `jsonschema`. The first error not nested inside a `oneOf`/`anyOf` branch is reported, with `'x' is a required property` phrasing kept for `required` errors.
|
|
20
|
+
- **Non-object Input:** Upstream assumes the manifest root and each entry are JSON objects. The port treats anything else as empty, so it reports errors instead of throwing.
|
|
16
21
|
- **Lighthouse Logger:** Replaced raw `console.log` with `lighthouse-logger`.
|
|
17
22
|
|
|
23
|
+
Publisher resolution (upstream's `resolve_publisher`, spec §5.1) is implemented by the gatherer in `core/gather/gatherers/agentic/ard.js`, and the resulting legacy-location warning by the `ard-schema` audit. `infos` are not surfaced in the audit.
|
|
24
|
+
|
|
18
25
|
## Updating Conformance Script
|
|
19
26
|
|
|
20
|
-
|
|
27
|
+
`yarn check:ard-spec` (`core/scripts/update-ard-spec.js --check`) compares upstream `main` against what Lighthouse has: the vendored schema must match byte-for-byte, and the hand-ported files must match the **Reviewed Upstream Files** hashes above. It runs weekly in CI (`.github/workflows/cron-weekly.yml`) and during dependency upgrades (`core/scripts/upgrade-deps.sh`). Neither of those can mark upstream changes as handled; only `--ack-port` does.
|
|
21
28
|
|
|
22
|
-
When
|
|
23
|
-
1. Run `yarn update:ard-spec
|
|
24
|
-
2.
|
|
25
|
-
3.
|
|
26
|
-
4.
|
|
29
|
+
When it reports changes (the `update-ard-port` agent skill walks through this in detail):
|
|
30
|
+
1. Run `yarn update:ard-spec`. This syncs `ard-entry.schema.json` verbatim and prints the upstream `conformance-test` diff. If a hand-ported file changed, it exits 1 **without** bumping the pinned SHA.
|
|
31
|
+
2. Port `conformance/bin/conformance-test` changes into `third-party/ard/ard.js` (keep rules, severities and message text 1:1; see modifications above) and update `third-party/ard/ard-test.js`.
|
|
32
|
+
3. If `spec/ard.md` changed, check §5.1 (Discovery Mechanisms) against `core/gather/gatherers/agentic/ard.js`.
|
|
33
|
+
4. If the schema changed, run `yarn build-ard-schema` to regenerate `schema-validator.js`.
|
|
34
|
+
5. Verify: `yarn mocha third-party/ard/ard-test.js core/test/gather/gatherers/agentic/ard-test.js core/test/audits/agentic/ard-schema-test.js` and `yarn smoke ard ardInvalid`.
|
|
35
|
+
6. Run `yarn update:ard-spec --ack-port` to record the reviewed hashes and bump the pinned SHA. `yarn check:ard-spec` should now pass.
|
|
27
36
|
|