@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.
- package/CHANGELOG.md +11 -0
- package/README.md +5 -4
- package/dist/index.cjs +415 -191
- package/dist/index.d.cts +44 -14
- package/dist/index.d.ts +44 -14
- package/dist/index.js +413 -192
- package/dist/index.js.map +1 -1
- package/dist/probe/index.cjs +743 -7
- package/dist/probe/index.d.cts +15 -11
- package/dist/probe/index.d.ts +15 -11
- package/dist/probe/index.js +743 -7
- package/dist/probe/index.js.map +1 -1
- package/dist/probe/local.cjs +743 -7
- package/dist/probe/local.d.cts +2 -2
- package/dist/probe/local.d.ts +2 -2
- package/dist/probe/local.js +743 -7
- package/dist/probe/local.js.map +1 -1
- package/dist/{robots-policy-DE8jix-e.d.cts → robots-policy-BeffrTf0.d.cts} +15 -6
- package/dist/{robots-policy-DE8jix-e.d.ts → robots-policy-BeffrTf0.d.ts} +15 -6
- package/package.json +7 -2
package/dist/probe/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { F as ArsVantage,
|
|
2
|
-
export {
|
|
1
|
+
import { F as ArsVantage, f as ArsEvidence, c as ArsRuleset } from '../robots-policy-BeffrTf0.cjs';
|
|
2
|
+
export { j as AGENT_ACCEPT, k as ARS_ROBOTS_TOKEN, m as ASSET_ACCEPT, G as BROWSER_ACCEPT } from '../robots-policy-BeffrTf0.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
|
-
*
|
|
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
|
|
44
|
-
*
|
|
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
|
|
106
|
-
*
|
|
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.
|
|
266
|
-
*
|
|
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.
|
|
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
|
/**
|
package/dist/probe/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { F as ArsVantage,
|
|
2
|
-
export {
|
|
1
|
+
import { F as ArsVantage, f as ArsEvidence, c as ArsRuleset } from '../robots-policy-BeffrTf0.js';
|
|
2
|
+
export { j as AGENT_ACCEPT, k as ARS_ROBOTS_TOKEN, m as ASSET_ACCEPT, G as BROWSER_ACCEPT } from '../robots-policy-BeffrTf0.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
|
-
*
|
|
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
|
|
44
|
-
*
|
|
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
|
|
106
|
-
*
|
|
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.
|
|
266
|
-
*
|
|
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.
|
|
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
|
/**
|