@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.
@@ -1,11 +1,11 @@
1
- import { F as ArsVantage, e as ArsEvidence, c as ArsRuleset } from '../robots-policy-DE8jix-e.cjs';
2
- export { i as AGENT_ACCEPT, j as ARS_ROBOTS_TOKEN, l as ASSET_ACCEPT, G as BROWSER_ACCEPT } from '../robots-policy-DE8jix-e.cjs';
1
+ import { F as ArsVantage, f as ArsEvidence, c as ArsRuleset } from '../robots-policy-C7cfPpu2.cjs';
2
+ export { l as AGENT_ACCEPT, m as ARS_ROBOTS_TOKEN, o as ASSET_ACCEPT, G as BROWSER_ACCEPT } from '../robots-policy-C7cfPpu2.cjs';
3
3
 
4
4
  /**
5
5
  * probe/ssrf.ts — the network-side host policy for `@rebilder/agent-readability`.
6
6
  *
7
- * WHAT CHANGED, AND WHY IT HAD TO. The ancestor of this file
8
- * (`apps/rebilder-web/lib/preview/ssrf.ts`) described itself as *"Pure parse +
7
+ * WHAT CHANGED, AND WHY IT HAD TO. The ancestor of this file (the Console
8
+ * preview's URL guard) described itself as *"Pure parse +
9
9
  * reject (no DNS resolution in v1)"*. That sentence is deliberately not repeated
10
10
  * here, because it is a description of a hole. A parse-only guard rejects IP
11
11
  * literals; it does not reject `https://attacker.example/` whose A record is
@@ -40,8 +40,8 @@ export { i as AGENT_ACCEPT, j as ARS_ROBOTS_TOKEN, l as ASSET_ACCEPT, G as BROWS
40
40
  *
41
41
  * NOT AN ENTRY POINT. `package.json#exports` publishes `.`, `./probe` and
42
42
  * `./probe/local` only, so `ALLOW_PRIVATE_HOSTS` below is unreachable from
43
- * outside the package at runtime, and `tooling/check-package-graph.ts` fails any
44
- * deep import that tries. That is what makes the symbol an unforgeable capability
43
+ * outside the package at runtime, and the package-graph check fails any deep
44
+ * import that tries. That is what makes the symbol an unforgeable capability
45
45
  * rather than a naming convention.
46
46
  */
47
47
  /**
@@ -102,8 +102,8 @@ interface UrlGuardPolicy {
102
102
  declare function guardUrl(input: string, policy: UrlGuardPolicy): UrlGuardResult;
103
103
  /**
104
104
  * The strict public policy, and the name the Console preview has always used.
105
- * Kept as a named export because `apps/rebilder-web/lib/preview/ssrf.ts` and its
106
- * shipped tests are written against it.
105
+ * Kept as a named export because the Console preview and its shipped tests are
106
+ * written against it.
107
107
  */
108
108
  declare function guardPreviewUrl(input: string): UrlGuardResult;
109
109
  interface PinnedAddress {
@@ -262,8 +262,12 @@ declare function createLimiter(options?: LimiterOptions): Limiter;
262
262
  * control** that differ in the `Accept` header AND IN NOTHING ELSE — same User
263
263
  * Agent, same everything. That is what makes the D2.4 parity check meaningful and
264
264
  * what stops a correctly installed gateway, which negotiates on `Accept` and not
265
- * on UA, from being scored as a cloaker. Per origin: `/robots.txt` (first),
266
- * `/llms.txt`, `/.well-known/ucp`. Nothing else. No guessing `/sitemap.xml`,
265
+ * on UA, from being scored as a cloaker. ARS 0.3 adds one conditional request:
266
+ * when the agent probe got HTML and the page declares a Markdown copy at another
267
+ * same-origin address, that one address is fetched with the agent's headers
268
+ * (`markdownAlternateTarget` in `../score` decides which, for the probe and the
269
+ * scorer alike). Per origin: `/robots.txt` (first), `/llms.txt`,
270
+ * `/.well-known/ucp`. Nothing else. No guessing `/sitemap.xml`,
267
271
  * `/mcp`, `/acp` — credit for an endpoint comes from *declaring* it, because an
268
272
  * endpoint an agent cannot find is an endpoint that does not exist. The three
269
273
  * probed paths are the disclosed exception: published conventions at published
@@ -308,7 +312,7 @@ interface ProbeIdentity {
308
312
  * below and that string never moves. Versioning the refusal token would let a
309
313
  * spec bump quietly re-open sites that already said no.
310
314
  */
311
- declare const ARS_USER_AGENT = "rebilder-ars/0.2 (+https://rebilder.com/bots)";
315
+ declare const ARS_USER_AGENT = "rebilder-ars/0.3 (+https://rebilder.com/bots)";
312
316
 
313
317
  declare const DEFAULT_IDENTITIES: readonly ProbeIdentity[];
314
318
  /**
@@ -1,11 +1,11 @@
1
- import { F as ArsVantage, e as ArsEvidence, c as ArsRuleset } from '../robots-policy-DE8jix-e.js';
2
- export { i as AGENT_ACCEPT, j as ARS_ROBOTS_TOKEN, l as ASSET_ACCEPT, G as BROWSER_ACCEPT } from '../robots-policy-DE8jix-e.js';
1
+ import { F as ArsVantage, f as ArsEvidence, c as ArsRuleset } from '../robots-policy-C7cfPpu2.js';
2
+ export { l as AGENT_ACCEPT, m as ARS_ROBOTS_TOKEN, o as ASSET_ACCEPT, G as BROWSER_ACCEPT } from '../robots-policy-C7cfPpu2.js';
3
3
 
4
4
  /**
5
5
  * probe/ssrf.ts — the network-side host policy for `@rebilder/agent-readability`.
6
6
  *
7
- * WHAT CHANGED, AND WHY IT HAD TO. The ancestor of this file
8
- * (`apps/rebilder-web/lib/preview/ssrf.ts`) described itself as *"Pure parse +
7
+ * WHAT CHANGED, AND WHY IT HAD TO. The ancestor of this file (the Console
8
+ * preview's URL guard) described itself as *"Pure parse +
9
9
  * reject (no DNS resolution in v1)"*. That sentence is deliberately not repeated
10
10
  * here, because it is a description of a hole. A parse-only guard rejects IP
11
11
  * literals; it does not reject `https://attacker.example/` whose A record is
@@ -40,8 +40,8 @@ export { i as AGENT_ACCEPT, j as ARS_ROBOTS_TOKEN, l as ASSET_ACCEPT, G as BROWS
40
40
  *
41
41
  * NOT AN ENTRY POINT. `package.json#exports` publishes `.`, `./probe` and
42
42
  * `./probe/local` only, so `ALLOW_PRIVATE_HOSTS` below is unreachable from
43
- * outside the package at runtime, and `tooling/check-package-graph.ts` fails any
44
- * deep import that tries. That is what makes the symbol an unforgeable capability
43
+ * outside the package at runtime, and the package-graph check fails any deep
44
+ * import that tries. That is what makes the symbol an unforgeable capability
45
45
  * rather than a naming convention.
46
46
  */
47
47
  /**
@@ -102,8 +102,8 @@ interface UrlGuardPolicy {
102
102
  declare function guardUrl(input: string, policy: UrlGuardPolicy): UrlGuardResult;
103
103
  /**
104
104
  * The strict public policy, and the name the Console preview has always used.
105
- * Kept as a named export because `apps/rebilder-web/lib/preview/ssrf.ts` and its
106
- * shipped tests are written against it.
105
+ * Kept as a named export because the Console preview and its shipped tests are
106
+ * written against it.
107
107
  */
108
108
  declare function guardPreviewUrl(input: string): UrlGuardResult;
109
109
  interface PinnedAddress {
@@ -262,8 +262,12 @@ declare function createLimiter(options?: LimiterOptions): Limiter;
262
262
  * control** that differ in the `Accept` header AND IN NOTHING ELSE — same User
263
263
  * Agent, same everything. That is what makes the D2.4 parity check meaningful and
264
264
  * what stops a correctly installed gateway, which negotiates on `Accept` and not
265
- * on UA, from being scored as a cloaker. Per origin: `/robots.txt` (first),
266
- * `/llms.txt`, `/.well-known/ucp`. Nothing else. No guessing `/sitemap.xml`,
265
+ * on UA, from being scored as a cloaker. ARS 0.3 adds one conditional request:
266
+ * when the agent probe got HTML and the page declares a Markdown copy at another
267
+ * same-origin address, that one address is fetched with the agent's headers
268
+ * (`markdownAlternateTarget` in `../score` decides which, for the probe and the
269
+ * scorer alike). Per origin: `/robots.txt` (first), `/llms.txt`,
270
+ * `/.well-known/ucp`. Nothing else. No guessing `/sitemap.xml`,
267
271
  * `/mcp`, `/acp` — credit for an endpoint comes from *declaring* it, because an
268
272
  * endpoint an agent cannot find is an endpoint that does not exist. The three
269
273
  * probed paths are the disclosed exception: published conventions at published
@@ -308,7 +312,7 @@ interface ProbeIdentity {
308
312
  * below and that string never moves. Versioning the refusal token would let a
309
313
  * spec bump quietly re-open sites that already said no.
310
314
  */
311
- declare const ARS_USER_AGENT = "rebilder-ars/0.2 (+https://rebilder.com/bots)";
315
+ declare const ARS_USER_AGENT = "rebilder-ars/0.3 (+https://rebilder.com/bots)";
312
316
 
313
317
  declare const DEFAULT_IDENTITIES: readonly ProbeIdentity[];
314
318
  /**