@rebilder/agent-readability 0.3.0 → 0.4.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.
@@ -1,15 +1,15 @@
1
1
  /**
2
- * types.ts — the public contract of the Agent Readability Score, ARS 0.2.
2
+ * types.ts — the public contract of the Agent Readability Score, ARS 0.3.
3
3
  *
4
- * Transcribed from `docs/design/universal-gateway-and-public-surfaces.md` §3.9,
5
- * which is the decided contract. Where §3.9 abbreviates (it writes `id: string`
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
- * (`docs/spec/ars-0.2.md`, rendered at `/spec/ars`), and its determinism
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.2.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 ArsEvidence as e, type ArsResult as f, type ArsRecommendation as g, type ArsPageKind as h, AGENT_ACCEPT as i, ARS_ROBOTS_TOKEN as j, ARS_SPEC_VERSION as k, ASSET_ACCEPT as l, type ArsAudience as m, type ArsAudienceDecision as n, type ArsCheck as o, type ArsCheckEvidence as p, type ArsCheckId as q, type ArsCostReport as r, type ArsDimension as s, type ArsFactKind as t, type ArsFactObservation as u, type ArsFlag as v, type ArsFlagId as w, type ArsGrade as x, type ArsHttpCapture as y, type ArsOutcome as z };
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 ArsPageKind as i, AGENT_ACCEPT as j, ARS_ROBOTS_TOKEN as k, ARS_SPEC_VERSION as l, ASSET_ACCEPT as m, type ArsAudience as n, type ArsAudienceDecision as o, type ArsCheck as p, type ArsCheckEvidence as q, type ArsCheckId as r, type ArsCostReport as s, type ArsDimension as t, type ArsFactKind as u, type ArsFactObservation 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.
2
+ * types.ts — the public contract of the Agent Readability Score, ARS 0.3.
3
3
  *
4
- * Transcribed from `docs/design/universal-gateway-and-public-surfaces.md` §3.9,
5
- * which is the decided contract. Where §3.9 abbreviates (it writes `id: string`
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
- * (`docs/spec/ars-0.2.md`, rendered at `/spec/ars`), and its determinism
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.2.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 ArsEvidence as e, type ArsResult as f, type ArsRecommendation as g, type ArsPageKind as h, AGENT_ACCEPT as i, ARS_ROBOTS_TOKEN as j, ARS_SPEC_VERSION as k, ASSET_ACCEPT as l, type ArsAudience as m, type ArsAudienceDecision as n, type ArsCheck as o, type ArsCheckEvidence as p, type ArsCheckId as q, type ArsCostReport as r, type ArsDimension as s, type ArsFactKind as t, type ArsFactObservation as u, type ArsFlag as v, type ArsFlagId as w, type ArsGrade as x, type ArsHttpCapture as y, type ArsOutcome as z };
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 ArsPageKind as i, AGENT_ACCEPT as j, ARS_ROBOTS_TOKEN as k, ARS_SPEC_VERSION as l, ASSET_ACCEPT as m, type ArsAudience as n, type ArsAudienceDecision as o, type ArsCheck as p, type ArsCheckEvidence as q, type ArsCheckId as r, type ArsCostReport as s, type ArsDimension as t, type ArsFactKind as u, type ArsFactObservation 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.0",
3
+ "version": "0.4.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://rebilder.com/help",
14
+ "url": "https://github.com/rebilder/rebilder/issues",
10
15
  "email": "support@rebilder.com"
11
16
  },
12
17
  "keywords": [