@rebilder/agent-readability 0.3.0 → 0.5.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.
- package/CHANGELOG.md +17 -0
- package/README.md +5 -4
- package/dist/index.cjs +1275 -196
- package/dist/index.d.cts +317 -14
- package/dist/index.d.ts +317 -14
- package/dist/index.js +1259 -197
- package/dist/index.js.map +1 -1
- package/dist/probe/index.cjs +850 -12
- package/dist/probe/index.d.cts +15 -11
- package/dist/probe/index.d.ts +15 -11
- package/dist/probe/index.js +850 -12
- package/dist/probe/index.js.map +1 -1
- package/dist/probe/local.cjs +850 -12
- package/dist/probe/local.d.cts +2 -2
- package/dist/probe/local.d.ts +2 -2
- package/dist/probe/local.js +850 -12
- package/dist/probe/local.js.map +1 -1
- package/dist/{robots-policy-DE8jix-e.d.cts → robots-policy-C7cfPpu2.d.cts} +15 -6
- package/dist/{robots-policy-DE8jix-e.d.ts → robots-policy-C7cfPpu2.d.ts} +15 -6
- package/package.json +9 -4
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* types.ts — the public contract of the Agent Readability Score, ARS 0.
|
|
2
|
+
* types.ts — the public contract of the Agent Readability Score, ARS 0.3.
|
|
3
3
|
*
|
|
4
|
-
* Transcribed from
|
|
5
|
-
*
|
|
4
|
+
* Transcribed from the ARS design document's §3.9, which is the decided
|
|
5
|
+
* contract. Where §3.9 abbreviates (it writes `id: string`
|
|
6
6
|
* for a check id whose format it then demonstrates), this file fills the gap
|
|
7
7
|
* consistently with the §3.4 dimension table and the §3.6 scoring tables. Two
|
|
8
8
|
* deliberate narrowings and one addition are marked NARROWED / ADDED below;
|
|
9
9
|
* nothing else departs from the design.
|
|
10
10
|
*
|
|
11
11
|
* WHY THE TYPES MATTER MORE THAN USUAL HERE. ARS is published as a standard
|
|
12
|
-
* (
|
|
12
|
+
* (https://rebilder.com/spec/ars), and its determinism
|
|
13
13
|
* guarantee is stated as: *for a given `evidenceHash`, `rulesetHash` and
|
|
14
14
|
* `corpusHash`, `score()` returns a byte-identical `ArsResult` in any conformant
|
|
15
15
|
* implementation, in any language.* A second implementation in Go or Python
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
* It cannot simply be re-exported from the ruleset: `types.ts` is the bottom of
|
|
37
37
|
* the import graph and `ruleset.ts` imports from it.
|
|
38
38
|
*/
|
|
39
|
-
declare const ARS_SPEC_VERSION: "0.
|
|
39
|
+
declare const ARS_SPEC_VERSION: "0.3.0";
|
|
40
40
|
/**
|
|
41
41
|
* Where the scan was taken from.
|
|
42
42
|
* - `public` — an anonymous third-party scan. The only vantage that is robots-gated.
|
|
@@ -140,6 +140,15 @@ interface ArsEvidence {
|
|
|
140
140
|
browser: ArsProbeRecord;
|
|
141
141
|
/** Third probe, ≥30s later, taken only when divergence was detected (§3.8). */
|
|
142
142
|
parityConfirm: ArsProbeRecord | null;
|
|
143
|
+
/**
|
|
144
|
+
* ADDED in ARS 0.3. The Markdown copy the page declares as an alternate
|
|
145
|
+
* (`Link: …; rel="alternate"; type="text/markdown"` or the `<link>` form),
|
|
146
|
+
* fetched with the agent's headers. Taken only when the agent probe did not
|
|
147
|
+
* already receive a machine copy and the declared URL is a different,
|
|
148
|
+
* same-origin address. Optional, so a 0.2 bundle stays valid and hashes as
|
|
149
|
+
* it did; absent or null means "not taken", never "failed".
|
|
150
|
+
*/
|
|
151
|
+
markdownAlternate?: ArsProbeRecord | null;
|
|
143
152
|
robotsTxt: ArsProbeRecord | null;
|
|
144
153
|
llmsTxt: ArsProbeRecord | null;
|
|
145
154
|
wellKnownUcp: ArsProbeRecord | null;
|
|
@@ -395,4 +404,4 @@ declare const ARS_ROBOTS_TOKEN = "rebilder-ars";
|
|
|
395
404
|
*/
|
|
396
405
|
declare function robotsDisallowsScanner(robotsBody: string, path: string): string | null;
|
|
397
406
|
|
|
398
|
-
export { type ArsDimensionId as A, type ArsPolicyReport as B, type ArsProbeError as C, type ArsProbeRecord as D, type ArsUnscoredReason as E, type ArsVantage as F, BROWSER_ACCEPT as G, robotsDisallowsScanner as H, type ArsBasis as a, type ArsFactProfile as b, type ArsRuleset as c, type ArsBand as d, type
|
|
407
|
+
export { type ArsDimensionId as A, type ArsPolicyReport as B, type ArsProbeError as C, type ArsProbeRecord as D, type ArsUnscoredReason as E, type ArsVantage as F, BROWSER_ACCEPT as G, robotsDisallowsScanner as H, type ArsBasis as a, type ArsFactProfile as b, type ArsRuleset as c, type ArsBand as d, type ArsHttpCapture as e, type ArsEvidence as f, type ArsResult as g, type ArsRecommendation as h, type ArsFactObservation as i, type ArsAudienceDecision as j, type ArsPageKind as k, AGENT_ACCEPT as l, ARS_ROBOTS_TOKEN as m, ARS_SPEC_VERSION as n, ASSET_ACCEPT as o, type ArsAudience as p, type ArsCheck as q, type ArsCheckEvidence as r, type ArsCheckId as s, type ArsCostReport as t, type ArsDimension as u, type ArsFactKind as v, type ArsFlag as w, type ArsFlagId as x, type ArsGrade as y, type ArsOutcome as z };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* types.ts — the public contract of the Agent Readability Score, ARS 0.
|
|
2
|
+
* types.ts — the public contract of the Agent Readability Score, ARS 0.3.
|
|
3
3
|
*
|
|
4
|
-
* Transcribed from
|
|
5
|
-
*
|
|
4
|
+
* Transcribed from the ARS design document's §3.9, which is the decided
|
|
5
|
+
* contract. Where §3.9 abbreviates (it writes `id: string`
|
|
6
6
|
* for a check id whose format it then demonstrates), this file fills the gap
|
|
7
7
|
* consistently with the §3.4 dimension table and the §3.6 scoring tables. Two
|
|
8
8
|
* deliberate narrowings and one addition are marked NARROWED / ADDED below;
|
|
9
9
|
* nothing else departs from the design.
|
|
10
10
|
*
|
|
11
11
|
* WHY THE TYPES MATTER MORE THAN USUAL HERE. ARS is published as a standard
|
|
12
|
-
* (
|
|
12
|
+
* (https://rebilder.com/spec/ars), and its determinism
|
|
13
13
|
* guarantee is stated as: *for a given `evidenceHash`, `rulesetHash` and
|
|
14
14
|
* `corpusHash`, `score()` returns a byte-identical `ArsResult` in any conformant
|
|
15
15
|
* implementation, in any language.* A second implementation in Go or Python
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
* It cannot simply be re-exported from the ruleset: `types.ts` is the bottom of
|
|
37
37
|
* the import graph and `ruleset.ts` imports from it.
|
|
38
38
|
*/
|
|
39
|
-
declare const ARS_SPEC_VERSION: "0.
|
|
39
|
+
declare const ARS_SPEC_VERSION: "0.3.0";
|
|
40
40
|
/**
|
|
41
41
|
* Where the scan was taken from.
|
|
42
42
|
* - `public` — an anonymous third-party scan. The only vantage that is robots-gated.
|
|
@@ -140,6 +140,15 @@ interface ArsEvidence {
|
|
|
140
140
|
browser: ArsProbeRecord;
|
|
141
141
|
/** Third probe, ≥30s later, taken only when divergence was detected (§3.8). */
|
|
142
142
|
parityConfirm: ArsProbeRecord | null;
|
|
143
|
+
/**
|
|
144
|
+
* ADDED in ARS 0.3. The Markdown copy the page declares as an alternate
|
|
145
|
+
* (`Link: …; rel="alternate"; type="text/markdown"` or the `<link>` form),
|
|
146
|
+
* fetched with the agent's headers. Taken only when the agent probe did not
|
|
147
|
+
* already receive a machine copy and the declared URL is a different,
|
|
148
|
+
* same-origin address. Optional, so a 0.2 bundle stays valid and hashes as
|
|
149
|
+
* it did; absent or null means "not taken", never "failed".
|
|
150
|
+
*/
|
|
151
|
+
markdownAlternate?: ArsProbeRecord | null;
|
|
143
152
|
robotsTxt: ArsProbeRecord | null;
|
|
144
153
|
llmsTxt: ArsProbeRecord | null;
|
|
145
154
|
wellKnownUcp: ArsProbeRecord | null;
|
|
@@ -395,4 +404,4 @@ declare const ARS_ROBOTS_TOKEN = "rebilder-ars";
|
|
|
395
404
|
*/
|
|
396
405
|
declare function robotsDisallowsScanner(robotsBody: string, path: string): string | null;
|
|
397
406
|
|
|
398
|
-
export { type ArsDimensionId as A, type ArsPolicyReport as B, type ArsProbeError as C, type ArsProbeRecord as D, type ArsUnscoredReason as E, type ArsVantage as F, BROWSER_ACCEPT as G, robotsDisallowsScanner as H, type ArsBasis as a, type ArsFactProfile as b, type ArsRuleset as c, type ArsBand as d, type
|
|
407
|
+
export { type ArsDimensionId as A, type ArsPolicyReport as B, type ArsProbeError as C, type ArsProbeRecord as D, type ArsUnscoredReason as E, type ArsVantage as F, BROWSER_ACCEPT as G, robotsDisallowsScanner as H, type ArsBasis as a, type ArsFactProfile as b, type ArsRuleset as c, type ArsBand as d, type ArsHttpCapture as e, type ArsEvidence as f, type ArsResult as g, type ArsRecommendation as h, type ArsFactObservation as i, type ArsAudienceDecision as j, type ArsPageKind as k, AGENT_ACCEPT as l, ARS_ROBOTS_TOKEN as m, ARS_SPEC_VERSION as n, ASSET_ACCEPT as o, type ArsAudience as p, type ArsCheck as q, type ArsCheckEvidence as r, type ArsCheckId as s, type ArsCostReport as t, type ArsDimension as u, type ArsFactKind as v, type ArsFlag as w, type ArsFlagId as x, type ArsGrade as y, type ArsOutcome as z };
|
package/package.json
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rebilder/agent-readability",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Score how well AI agents can read a web page. The reference implementation of the Rebilder Agent Readability Spec (ARS): deterministic, no dependencies, with a safe fetcher for live pages.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/rebilder/rebilder.git",
|
|
10
|
+
"directory": "packages/agent-readability"
|
|
11
|
+
},
|
|
7
12
|
"homepage": "https://rebilder.com/spec/ars",
|
|
8
13
|
"bugs": {
|
|
9
|
-
"url": "https://
|
|
14
|
+
"url": "https://github.com/rebilder/rebilder/issues",
|
|
10
15
|
"email": "support@rebilder.com"
|
|
11
16
|
},
|
|
12
17
|
"keywords": [
|
|
@@ -86,8 +91,8 @@
|
|
|
86
91
|
"eslint-plugin-security": "^4.0.0",
|
|
87
92
|
"tsup": "^8.5.0",
|
|
88
93
|
"typescript": "^5.6.0",
|
|
89
|
-
"typescript-eslint": "^8.
|
|
90
|
-
"vitest": "^
|
|
94
|
+
"typescript-eslint": "^8.71.0",
|
|
95
|
+
"vitest": "^4.1.12"
|
|
91
96
|
},
|
|
92
97
|
"scripts": {
|
|
93
98
|
"build": "tsup",
|