wiki-formant 0.10.0 → 0.12.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/README.md +61 -5
- package/bin/check-classes.mjs +119 -0
- package/dist/conformance.d.ts +57 -2
- package/dist/conformance.d.ts.map +1 -1
- package/dist/conformance.js +183 -9
- package/dist/conformance.js.map +1 -1
- package/dist/crawlers.d.ts.map +1 -1
- package/dist/crawlers.js +9 -2
- package/dist/crawlers.js.map +1 -1
- package/dist/http.d.ts +41 -2
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +67 -4
- package/dist/http.js.map +1 -1
- package/dist/mcp.d.ts +77 -5
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +111 -18
- package/dist/mcp.js.map +1 -1
- package/dist/pagination.d.ts +20 -0
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +16 -0
- package/dist/pagination.js.map +1 -1
- package/dist/rate-limit.d.ts +11 -0
- package/dist/rate-limit.d.ts.map +1 -1
- package/dist/rate-limit.js +16 -0
- package/dist/rate-limit.js.map +1 -1
- package/dist/react-server.d.ts +78 -0
- package/dist/react-server.d.ts.map +1 -0
- package/dist/react-server.js +62 -0
- package/dist/react-server.js.map +1 -0
- package/dist/react.d.ts +57 -0
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +27 -0
- package/dist/react.js.map +1 -1
- package/dist/well-known.d.ts +9 -1
- package/dist/well-known.d.ts.map +1 -1
- package/dist/well-known.js +21 -4
- package/dist/well-known.js.map +1 -1
- package/dist/x402.d.ts +104 -0
- package/dist/x402.d.ts.map +1 -0
- package/dist/x402.js +224 -0
- package/dist/x402.js.map +1 -0
- package/package.json +39 -5
package/README.md
CHANGED
|
@@ -120,10 +120,29 @@ What it gets right:
|
|
|
120
120
|
- **Malformed JSON is `-32700` with a `400`**, never a 500.
|
|
121
121
|
- **`GET` is an explicit 405 with CORS headers.** A framework's automatic 405 carries none, so a browser client cannot even read the refusal.
|
|
122
122
|
- **The preflight allow-list includes `Accept` and `Mcp-Protocol-Version`.** One missing entry fails the preflight rather than the POST, which presents as "the server is down".
|
|
123
|
-
- **Batches are capped** (default 20) with a teaching error, because the rate limiter charges one token per HTTP request before the body is parsed.
|
|
123
|
+
- **Batches are capped** (default 20) with a teaching error, because the rate limiter charges one token per HTTP request before the body is parsed. Under 2025-06-18 they are refused outright, because the revision removed them.
|
|
124
|
+
- **The protocol version is negotiated, not asserted.** `initialize` echoes what the client asked for when it is one of `2025-06-18`, `2025-03-26` or `2024-11-05`, and offers the newest otherwise; every response carries the negotiated version back in `MCP-Protocol-Version`. Answering a constant is legal and still costs the caller structured output, tool titles and `_meta` without ever saying so.
|
|
125
|
+
- **`Access-Control-Expose-Headers` is set.** Allow-Headers governs what a browser may send, Expose-Headers what it may read — without the second a browser client cannot see `Retry-After` on a 429, and a rate limit presents as a hang.
|
|
126
|
+
- **`mcpRateLimited(retryAfterSec)` is a JSON-RPC envelope.** A 429 whose body is `{"error": "..."}` is a string where the client's parser expects `{code, message}`, on the one response an agent meets exactly when it is working hard.
|
|
127
|
+
|
|
128
|
+
### Structured output, `_meta`, and the envelope gate
|
|
129
|
+
|
|
130
|
+
Declare an `outputSchema` and the result carries `structuredContent` beside the text block, so a client reads the answer rather than scraping prose for it. A handler's second argument is its context:
|
|
131
|
+
|
|
132
|
+
```ts
|
|
133
|
+
handler: async (args, ctx) => {
|
|
134
|
+
ctx.meta; // params._meta, as it arrived
|
|
135
|
+
ctx.setMeta('x402/payment-response', receipt); // rides back on result._meta
|
|
136
|
+
return { hits: 2 };
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
`config.gate` is envelope-level middleware: it may withhold entries before dispatch and merge its own responses back afterwards. A payment gate has to sit there rather than in a handler, because the demand *replaces* the call and the receipt rides on the envelope.
|
|
124
141
|
|
|
125
142
|
## Markdown twins
|
|
126
143
|
|
|
144
|
+
Pass an `etag` and answer `notModified` before rendering: a twin is the single most recrawled URL a page has, so a twin with no validator is a full render on every pass, forever — the same arithmetic that justifies the corpus ETag, applied per page.
|
|
145
|
+
|
|
127
146
|
`htmlToMarkdown` preserves the structure an agent cites by — headings, lists, tables, code, emphasis — rather than flattening to prose. Tables convert first so the generic rules cannot eat their markup, ordered lists number per list, pipes inside cells are escaped, and a headerless table gets a synthesised header because GFM has no other form.
|
|
128
147
|
|
|
129
148
|
```ts
|
|
@@ -135,7 +154,7 @@ return new Response(
|
|
|
135
154
|
license: { spdx: 'CC-BY-4.0', url: 'https://creativecommons.org/licenses/by/4.0/' } },
|
|
136
155
|
blocksToMarkdown(page.content), // your block types, your function
|
|
137
156
|
),
|
|
138
|
-
{ headers: markdownHeaders(lastModified) },
|
|
157
|
+
{ headers: markdownHeaders(lastModified, { etag }) },
|
|
139
158
|
);
|
|
140
159
|
```
|
|
141
160
|
|
|
@@ -220,6 +239,31 @@ const { inputProps, listProps, optionProps } = combobox();
|
|
|
220
239
|
The arithmetic is `wiki-formant/combobox`, which imports nothing, so the rules
|
|
221
240
|
are unit-tested without a DOM.
|
|
222
241
|
|
|
242
|
+
## Server components
|
|
243
|
+
|
|
244
|
+
`wiki-formant/react` carries `'use client'`, and that is a module-level boundary: anything exported from it hydrates in the consumer's tree whether or not it uses a hook. `wiki-formant/react-server` is the same React, without the directive — for the parts of a wiki that are pure functions of their props and should ship no JavaScript at all.
|
|
245
|
+
|
|
246
|
+
`FacetBar` renders the rows `createTaxonomy` already produces. This is why the taxonomy exports a rows model rather than markup: the rows could always cross the boundary and, until this subpath existed, the markup could not, so all three wikis hand-rendered it and two put `aria-pressed` on an `<a>`. `Breadcrumbs` renders the trail and its `BreadcrumbList` JSON-LD together, because a trail whose structured data is written somewhere else is a trail that will one day disagree with its own markup — which is the case Google penalises. It takes a `base` origin: structured-data URLs must be absolute and a package cannot know the site.
|
|
247
|
+
|
|
248
|
+
`WikiRail` stays in `wiki-formant/react`, because it calls `useSidebar` and genuinely is a client component. It renders the whole `wiki-rail__*` tree — scroll wrapper, both labelled `<nav>`s, the table of contents between them — where three wikis had drifted on which of those they had.
|
|
249
|
+
|
|
250
|
+
All three take the router's link component as a prop:
|
|
251
|
+
|
|
252
|
+
```tsx
|
|
253
|
+
import Link from 'next/link';
|
|
254
|
+
<FacetBar link={Link} facets={facets} letters={letters} />
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
There is no `next` peer dependency here and there is not going to be one, but a rail that falls back to a bare `<a>` turns every press into a full page load — which is the whole reason a wiki has a persistent rail. So the router arrives through the door.
|
|
258
|
+
|
|
259
|
+
## Payment gating
|
|
260
|
+
|
|
261
|
+
`wiki-formant/x402` gates an MCP envelope on payment, for a wiki that charges for a bulk export over HTTP and would otherwise hand the same bytes over free through the equivalent MCP tool. Payment travels in-band — `params._meta["x402/payment"]` in, `result._meta["x402/payment-response"]` out — because one HTTP 402 cannot answer a batch of twenty in which one call is priced and nineteen are not.
|
|
262
|
+
|
|
263
|
+
`gatePaidCalls` returns what `handleMcp` should dispatch and a `finish` that puts the answer back together. The ordering is the part worth owning once: verify before dispatch, settle only after a non-error answer, splice the challenges back into the caller's original order. A tool that raises cancels rather than settles — the caller pays for an answer, not an attempt.
|
|
264
|
+
|
|
265
|
+
It imports nothing. `@x402/core`, `@x402/evm`, `@x402/extensions`, `@x402/next` and `viem` are optional peers, and the resource server arrives as a structural port instead of an import, so a wiki that never imports this subpath never resolves any of them. Which surfaces cost what, the prices and the terms text stay with the caller: those are policy, and this is the envelope surgery.
|
|
266
|
+
|
|
223
267
|
## AI crawlers
|
|
224
268
|
|
|
225
269
|
Every wiki kept this roster twice — once in the proxy, keyed by user-agent, to
|
|
@@ -362,7 +406,7 @@ they name a gap in the corpus in the reader's own words.
|
|
|
362
406
|
| `injectHeadingIds`, `headingsFrom`, `slugifyHeading` | `wiki-formant/headings` |
|
|
363
407
|
| `mcpResponse`, `mcpGet`, `mcpOptions`, `handleMcp`, `withMcpCors`, `McpToolError`, `MCP_CORS`, `MCP_PROTOCOL_VERSION` | `wiki-formant/mcp` |
|
|
364
408
|
| `htmlToMarkdown`, `inlineToMarkdown`, `tableToMarkdown`, `frontmatter`, `markdownDocument`, `decodeEntities` | `wiki-formant/markdown` |
|
|
365
|
-
| `corpusEtag`, `notModified`, `textHeaders`, `markdownHeaders`, `cleanSnippet`, `pageLine` | `wiki-formant/http` |
|
|
409
|
+
| `corpusEtag`, `notModified`, `textHeaders`, `markdownHeaders`, `descriptorHeaders`, `descriptorResponse`, `cleanSnippet`, `pageLine` | `wiki-formant/http` |
|
|
366
410
|
| `parsePagination`, `paginatedResponse`, `toOffset` | `wiki-formant/pagination` |
|
|
367
411
|
| `mapBlockTree`, `mapBlockTreeAsync`, `someBlock`, `renderBlockTree` | `wiki-formant/blocks` |
|
|
368
412
|
| `parseVersion`, `formatVersion`, `incrementVersion`, `bump`, `compareVersions` | `wiki-formant/versioning` |
|
|
@@ -372,12 +416,24 @@ they name a gap in the corpus in the reader's own words.
|
|
|
372
416
|
| `renderFeed`, `renderItem`, `escXml`, `cdata`, `clampWords`, `absolutise`, `FEED_HEADERS` | `wiki-formant/feed` |
|
|
373
417
|
| `ccBy40`, `licenseBlock`, `licenseLines`, `licenseNote` | `wiki-formant/license` |
|
|
374
418
|
| `AI_CRAWLERS`, `detectAiBot`, `aiCrawlerTokens`, `aiCrawlerRules` | `wiki-formant/crawlers` |
|
|
375
|
-
| `useCollapsibleSidebar`, `SidebarProvider`, `useSidebar`, `TableOfContents`, `useTypeahead`, `useLinkPreview`, `useClickOutside`, `useTableSort`, `useCopy`, `ErrorBoundary` | `wiki-formant/react` |
|
|
419
|
+
| `useCollapsibleSidebar`, `SidebarProvider`, `useSidebar`, `TableOfContents`, `useTypeahead`, `useLinkPreview`, `useClickOutside`, `useTableSort`, `useCopy`, `ErrorBoundary`, `WikiRail` | `wiki-formant/react` |
|
|
420
|
+
| `FacetBar`, `Breadcrumbs` | `wiki-formant/react-server` |
|
|
421
|
+
| `gatePaidCalls` | `wiki-formant/x402` |
|
|
376
422
|
| `resolveSidebarOpen`, `sidebarBootScript`, `SIDEBAR_ATTRIBUTE` | `wiki-formant/sidebar` |
|
|
377
423
|
| `addCopyButtons`, `activateTabGroups`, `tweetEmbedSrc`, `onTweetResize`, `hydrateTweetEmbeds`, `sizeTweetEmbeds`, `TWITTER_ORIGIN` | `wiki-formant/dom` |
|
|
378
424
|
| `Iframe`, `YouTube`, `TwitterEmbed`, `createMapEmbed`, `createCodeBlock`, `createTabs` | `wiki-formant/tiptap` |
|
|
379
425
|
|
|
380
|
-
Everything above `wiki-formant/react` is also re-exported from the package root. The React, sidebar, DOM and
|
|
426
|
+
Everything above `wiki-formant/react` is also re-exported from the package root. The React, sidebar, DOM, tiptap, react-server and x402 subpaths are not: they carry `'use client'`, reach for a browser global, or need a peer the root must not assume, and the root has to stay importable from a route handler.
|
|
427
|
+
|
|
428
|
+
## A bin
|
|
429
|
+
|
|
430
|
+
`check-classes` fails a build on a `className` token that resolves to nothing, and counts the inverse fault — 3+ Tailwind utilities inline, which is a component class that was never named. Both sets are derived from the emitted stylesheets rather than listed, so nothing has to be maintained per project. Run it from a repo root after a build:
|
|
431
|
+
|
|
432
|
+
```sh
|
|
433
|
+
npx check-classes # exit 1 on any dead token
|
|
434
|
+
npx check-classes --warn # report and exit 0
|
|
435
|
+
npx check-classes --compositions # also fail on the inline compositions
|
|
436
|
+
```
|
|
381
437
|
|
|
382
438
|
## Licence
|
|
383
439
|
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// bin/check-classes.mjs — fail on a className token that styles nothing.
|
|
3
|
+
//
|
|
4
|
+
// The design-system overhaul in c9ede60 deleted `.wrap`, `.link` and friends from
|
|
5
|
+
// globals.css and left their call sites behind. A class that resolves to nothing
|
|
6
|
+
// is silent: React renders it, the browser ignores it, and the page is subtly
|
|
7
|
+
// wrong (a twelve-card pageList laid out `nowrap` and scrolled the whole document
|
|
8
|
+
// sideways; `.hidden-mobile` never hid a column on a phone). Seven such tokens
|
|
9
|
+
// were live across 28 sites before anyone counted them, so this counts them.
|
|
10
|
+
//
|
|
11
|
+
// Method: every class selector the build emits — Tailwind's utilities and
|
|
12
|
+
// globals.css's components alike — is the ground truth. Any bare token written in
|
|
13
|
+
// a className string literal and absent from that set is dead.
|
|
14
|
+
//
|
|
15
|
+
// It also counts the inverse fault. CLAUDE.md allows one-off modifiers inline but
|
|
16
|
+
// bans compositions: 3+ utilities in one className is a component class that was
|
|
17
|
+
// never named, and the same cluster then drifts between its copies. Which tokens
|
|
18
|
+
// are utilities is derived, not listed — anything the build emits that globals.css
|
|
19
|
+
// does not define is Tailwind's.
|
|
20
|
+
//
|
|
21
|
+
// npx check-classes # exit 1 on any dead token
|
|
22
|
+
// npx check-classes --warn # report and exit 0
|
|
23
|
+
// npx check-classes --compositions # also fail on 3+ inline utilities
|
|
24
|
+
//
|
|
25
|
+
// Run it from the repo root: `.next/static` and `src` are resolved against cwd.
|
|
26
|
+
//
|
|
27
|
+
// Needs a build first (npm run build): without one there is nothing to check
|
|
28
|
+
// against, and the script says so and exits 0 rather than failing blind.
|
|
29
|
+
import fs from 'node:fs';
|
|
30
|
+
import path from 'node:path';
|
|
31
|
+
|
|
32
|
+
const WARN_ONLY = process.argv.includes('--warn');
|
|
33
|
+
const CSS_DIR = '.next/static';
|
|
34
|
+
const SRC_DIR = 'src';
|
|
35
|
+
|
|
36
|
+
const walk = (dir, ext, out = []) => {
|
|
37
|
+
if (!fs.existsSync(dir)) return out;
|
|
38
|
+
for (const e of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
39
|
+
const p = path.join(dir, e.name);
|
|
40
|
+
if (e.isDirectory()) walk(p, ext, out);
|
|
41
|
+
else if (e.name.endsWith(ext)) out.push(p);
|
|
42
|
+
}
|
|
43
|
+
return out;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const cssFiles = walk(CSS_DIR, '.css');
|
|
47
|
+
if (!cssFiles.length) {
|
|
48
|
+
console.log('check-classes: no built CSS under .next/static — run `npm run build` first. Skipping.');
|
|
49
|
+
process.exit(0);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Every class selector present in the emitted stylesheets, unescaped.
|
|
53
|
+
const emitted = new Set();
|
|
54
|
+
for (const f of cssFiles) {
|
|
55
|
+
for (const m of fs.readFileSync(f, 'utf8').matchAll(/\.((?:\\.|[-\w])+)/g)) {
|
|
56
|
+
emitted.add(m[1].replace(/\\/g, ''));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Classes this project defines itself. Everything else the build emitted is a
|
|
61
|
+
// Tailwind utility, which is what makes the composition count derivable rather
|
|
62
|
+
// than a maintained prefix list.
|
|
63
|
+
const globalsFile = walk(SRC_DIR, '.css').find(f => f.endsWith('globals.css'));
|
|
64
|
+
const named = new Set();
|
|
65
|
+
if (globalsFile) {
|
|
66
|
+
for (const m of fs.readFileSync(globalsFile, 'utf8').matchAll(/\.((?:\\.|[-\w])+)/g)) {
|
|
67
|
+
named.add(m[1].replace(/\\/g, ''));
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Only bare literals: anything interpolated is beyond a static check.
|
|
72
|
+
const dead = new Map();
|
|
73
|
+
const compositions = [];
|
|
74
|
+
for (const f of walk(SRC_DIR, '.tsx')) {
|
|
75
|
+
fs.readFileSync(f, 'utf8').split('\n').forEach((line, i) => {
|
|
76
|
+
for (const m of line.matchAll(/className=(?:"([^"]*)"|\{'([^']*)')/g)) {
|
|
77
|
+
const raw = (m[1] ?? m[2] ?? '').split(/\s+/);
|
|
78
|
+
let utilities = 0;
|
|
79
|
+
for (const tok of raw) {
|
|
80
|
+
if (!tok || tok.includes('$') || tok.includes('{')) continue;
|
|
81
|
+
const base = tok.replace(/^[a-z-]+:/, '').replace(/^!/, ''); // strip variant, important
|
|
82
|
+
if (emitted.has(tok) || emitted.has(base)) {
|
|
83
|
+
if (!named.has(base)) utilities++;
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
if (!dead.has(tok)) dead.set(tok, []);
|
|
87
|
+
dead.get(tok).push(`${f}:${i + 1}`);
|
|
88
|
+
}
|
|
89
|
+
if (utilities >= 3) compositions.push({ at: `${f}:${i + 1}`, n: utilities, s: (m[1] ?? m[2]) });
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const CHECK_COMPOSITIONS = process.argv.includes('--compositions');
|
|
95
|
+
|
|
96
|
+
if (compositions.length) {
|
|
97
|
+
const verb = CHECK_COMPOSITIONS ? 'must be named' : 'should be named (advisory)';
|
|
98
|
+
console.error(`check-classes: ${compositions.length} inline composition(s) of 3+ utilities ${verb}:\n`);
|
|
99
|
+
for (const c of compositions.sort((a, b) => b.n - a.n).slice(0, 20)) {
|
|
100
|
+
console.error(` ${String(c.n).padStart(2)} utils ${c.at} ${c.s.slice(0, 72)}`);
|
|
101
|
+
}
|
|
102
|
+
if (compositions.length > 20) console.error(` … and ${compositions.length - 20} more`);
|
|
103
|
+
console.error('');
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (!dead.size) {
|
|
107
|
+
console.log(`check-classes: clean — every className token resolves against ${emitted.size} emitted selectors.`);
|
|
108
|
+
process.exit(CHECK_COMPOSITIONS && compositions.length && !WARN_ONLY ? 1 : 0);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
console.error(`check-classes: ${dead.size} className token(s) style nothing:\n`);
|
|
112
|
+
for (const [tok, at] of [...dead].sort((a, b) => b[1].length - a[1].length)) {
|
|
113
|
+
console.error(` ${tok.padEnd(24)} ${String(at.length).padStart(3)}x ${at.slice(0, 4).join(', ')}${at.length > 4 ? ', …' : ''}`);
|
|
114
|
+
}
|
|
115
|
+
// Derived, not hardcoded: this runs in every sibling project and their
|
|
116
|
+
// globals.css does not sit at the same path.
|
|
117
|
+
const globals = walk(SRC_DIR, '.css').find(f => f.endsWith('globals.css')) ?? 'your globals.css';
|
|
118
|
+
console.error(`\nEither define it in ${globals} or delete the usage.`);
|
|
119
|
+
process.exit(WARN_ONLY ? 0 : 1);
|
package/dist/conformance.d.ts
CHANGED
|
@@ -3,19 +3,26 @@ export interface Rpc {
|
|
|
3
3
|
content?: Array<{
|
|
4
4
|
text?: string;
|
|
5
5
|
}>;
|
|
6
|
+
structuredContent?: unknown;
|
|
6
7
|
isError?: boolean;
|
|
7
8
|
tools?: Array<{
|
|
8
9
|
name: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
annotations?: Record<string, unknown>;
|
|
9
12
|
}>;
|
|
10
13
|
resources?: Array<{
|
|
11
14
|
uri: string;
|
|
12
15
|
}>;
|
|
16
|
+
resourceTemplates?: Array<{
|
|
17
|
+
uriTemplate?: string;
|
|
18
|
+
}>;
|
|
13
19
|
contents?: Array<{
|
|
14
20
|
text?: string;
|
|
15
21
|
}>;
|
|
16
22
|
serverInfo?: {
|
|
17
23
|
version?: string;
|
|
18
24
|
};
|
|
25
|
+
protocolVersion?: string;
|
|
19
26
|
capabilities?: Record<string, unknown>;
|
|
20
27
|
instructions?: string;
|
|
21
28
|
};
|
|
@@ -75,6 +82,8 @@ export declare function transportChecks(t: Tester, clientName: string,
|
|
|
75
82
|
* business, so it is a parameter rather than one surface's set hardcoded here.
|
|
76
83
|
*/
|
|
77
84
|
expectedCapabilities?: readonly string[]): Promise<Rpc>;
|
|
85
|
+
/** The newest protocol revision `wiki-formant/mcp` speaks. */
|
|
86
|
+
export declare const CURRENT_PROTOCOL = "2025-06-18";
|
|
78
87
|
/**
|
|
79
88
|
* One service, many descriptors — server.json, the two agent-card paths, the
|
|
80
89
|
* OpenAPI document, the MCP server card, and `initialize` — should never
|
|
@@ -92,8 +101,54 @@ export declare function versionCoherence(t: Tester, expected: string, sources: R
|
|
|
92
101
|
*/
|
|
93
102
|
export declare function agentCardParity(t: Tester): Promise<void>;
|
|
94
103
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
104
|
+
* Any surface an agent recrawls should answer a conditional GET with a 304.
|
|
105
|
+
*
|
|
106
|
+
* Point this at every such surface, not only the corpus exports. Aimed solely
|
|
107
|
+
* at the `llms.*` family — the paths that already had validators — it reported
|
|
108
|
+
* green across three origins whose markdown twins, agent cards and OpenAPI
|
|
109
|
+
* documents carried no ETag at all. A check that only looks where it knows it
|
|
110
|
+
* will pass is a check that measures nothing.
|
|
97
111
|
*/
|
|
98
112
|
export declare function conditionalGetChecks(t: Tester, paths: readonly string[]): Promise<void>;
|
|
113
|
+
/**
|
|
114
|
+
* A JSON descriptor is revalidatable — an agent card, an OpenAPI document, a
|
|
115
|
+
* registry manifest, a server card.
|
|
116
|
+
*
|
|
117
|
+
* Separate from `conditionalGetChecks` because the contract genuinely differs:
|
|
118
|
+
* a descriptor is built from code, not from rows, so it has no honest
|
|
119
|
+
* `Last-Modified` to offer. A stamp taken at cold start would move without the
|
|
120
|
+
* document moving, which is worse than none. The body-derived ETag is the whole
|
|
121
|
+
* validator, and it is enough.
|
|
122
|
+
*/
|
|
123
|
+
export declare function descriptorChecks(t: Tester, paths: readonly string[]): Promise<void>;
|
|
124
|
+
/**
|
|
125
|
+
* Every tool carries behavioural hints, and the ones that write say so.
|
|
126
|
+
*
|
|
127
|
+
* Without them a client that auto-approves read-only calls has no way to tell a
|
|
128
|
+
* lookup from one that signs a transaction — and two of the three servers here
|
|
129
|
+
* shipped write tools with no annotations at all.
|
|
130
|
+
*/
|
|
131
|
+
export declare function annotationChecks(t: Tester, opts?: {
|
|
132
|
+
writes?: readonly string[];
|
|
133
|
+
}): Promise<void>;
|
|
134
|
+
/**
|
|
135
|
+
* The orientation calls stay inside a context window.
|
|
136
|
+
*
|
|
137
|
+
* A tool that passes a metadata column straight through is one stored blob away
|
|
138
|
+
* from returning 350 KB — around 90k tokens — from the first call an agent
|
|
139
|
+
* makes. Nothing in a pass/fail table notices that unless something weighs the
|
|
140
|
+
* answer, so this weighs it.
|
|
141
|
+
*/
|
|
142
|
+
export declare function payloadBudget(t: Tester, calls: ReadonlyArray<{
|
|
143
|
+
name: string;
|
|
144
|
+
args?: Record<string, unknown>;
|
|
145
|
+
}>, maxBytes?: number): Promise<void>;
|
|
146
|
+
/**
|
|
147
|
+
* The default `User-agent: *` group may reach everything the descriptors
|
|
148
|
+
* advertise.
|
|
149
|
+
*
|
|
150
|
+
* An origin whose card names an MCP endpoint its own robots.txt disallows to
|
|
151
|
+
* every unnamed crawler is telling two different stories to the same caller.
|
|
152
|
+
*/
|
|
153
|
+
export declare function robotsChecks(t: Tester, paths: readonly string[]): Promise<void>;
|
|
99
154
|
//# sourceMappingURL=conformance.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conformance.d.ts","sourceRoot":"","sources":["../src/conformance.ts"],"names":[],"mappings":"AAcA,MAAM,WAAW,GAAG;IAClB,MAAM,CAAC,EAAE;QACP,OAAO,CAAC,EAAE,KAAK,CAAC;YAAE,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QACnC,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,KAAK,CAAC,EAAE,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"conformance.d.ts","sourceRoot":"","sources":["../src/conformance.ts"],"names":[],"mappings":"AAcA,MAAM,WAAW,GAAG;IAClB,MAAM,CAAC,EAAE;QACP,OAAO,CAAC,EAAE,KAAK,CAAC;YAAE,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QACnC,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,KAAK,CAAC,EAAE,KAAK,CAAC;YACZ,IAAI,EAAE,MAAM,CAAC;YACb,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;SACvC,CAAC,CAAC;QACH,SAAS,CAAC,EAAE,KAAK,CAAC;YAAE,GAAG,EAAE,MAAM,CAAA;SAAE,CAAC,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,wBAAsB,gBAAgB,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBzF;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CACpC,CAAC,EAAE,MAAM,EACT,IAAI,GAAE;IAAE,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAO,GACxC,OAAO,CAAC,IAAI,CAAC,CAqBf;AAED;;;;;;;GAOG;AACH,wBAAsB,aAAa,CACjC,CAAC,EAAE,MAAM,EACT,KAAK,EAAE,aAAa,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAAC,EACtE,QAAQ,SAAU,GACjB,OAAO,CAAC,IAAI,CAAC,CAkBf;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuBrF"}
|
package/dist/conformance.js
CHANGED
|
@@ -82,11 +82,26 @@ expectedCapabilities = ['tools']) {
|
|
|
82
82
|
clientInfo: { name: clientName, version: '1' },
|
|
83
83
|
});
|
|
84
84
|
t.check('initialize', !!init.result?.serverInfo && !!init.result?.instructions, JSON.stringify(init.result?.serverInfo ?? init.error));
|
|
85
|
+
// The version a server answers is the version its clients get. Asking for one
|
|
86
|
+
// and never looking at the reply is how three servers sat pinned to
|
|
87
|
+
// 2025-03-26 — forfeiting structured output, tool titles and `_meta` — while
|
|
88
|
+
// every suite reported green.
|
|
89
|
+
const echoed = await t.rpc('initialize', {
|
|
90
|
+
protocolVersion: CURRENT_PROTOCOL,
|
|
91
|
+
capabilities: {},
|
|
92
|
+
clientInfo: { name: clientName, version: '1' },
|
|
93
|
+
});
|
|
94
|
+
t.check('protocol negotiated', echoed.result?.protocolVersion === CURRENT_PROTOCOL, `asked ${CURRENT_PROTOCOL}, got ${echoed.result?.protocolVersion}`);
|
|
95
|
+
t.check('downgrades gracefully', (init.result?.protocolVersion ?? '').length > 0, `asked 2024-11-05, got ${init.result?.protocolVersion}`);
|
|
85
96
|
console.log(`\n=== transport ===`);
|
|
86
97
|
const opt = await fetch(t.endpoint, { method: 'OPTIONS' });
|
|
87
98
|
t.check('OPTIONS preflight', opt.status === 204 &&
|
|
88
99
|
opt.headers.get('access-control-allow-origin') === '*' &&
|
|
89
100
|
(opt.headers.get('access-control-allow-headers') ?? '').includes('Mcp-Protocol-Version'), `${opt.status} ACAO=${opt.headers.get('access-control-allow-origin')}`);
|
|
101
|
+
// Allow-Headers governs what a browser may send; Expose-Headers what it may
|
|
102
|
+
// read. Without the second, a browser client cannot see `Retry-After` on a
|
|
103
|
+
// 429 and a rate limit reads to it as a hang.
|
|
104
|
+
t.check('CORS exposes response headers', ['Mcp-Protocol-Version', 'Retry-After'].every(h => (opt.headers.get('access-control-expose-headers') ?? '').includes(h)), `expose=${opt.headers.get('access-control-expose-headers')}`);
|
|
90
105
|
const get = await fetch(t.endpoint);
|
|
91
106
|
t.check('GET→405', get.status === 405 && get.headers.get('access-control-allow-origin') === '*', `${get.status} Allow=${get.headers.get('allow')} ACAO=${get.headers.get('access-control-allow-origin')}`);
|
|
92
107
|
// A notification has no id, so it must be acknowledged with no body at all —
|
|
@@ -110,8 +125,32 @@ expectedCapabilities = ['tools']) {
|
|
|
110
125
|
t.check('batch cap (21)', overJson.error?.code === -32600, `code=${overJson.error?.code}: ${(overJson.error?.message ?? '').slice(0, 80)}`);
|
|
111
126
|
const caps = init.result?.capabilities ?? {};
|
|
112
127
|
t.check('capabilities honest', expectedCapabilities.every(k => k in caps), `${JSON.stringify(caps)} expected=[${expectedCapabilities.join(', ')}]`);
|
|
128
|
+
// Declaring `resources` makes a client ask for templates. -32601 to a method
|
|
129
|
+
// the capability implies reads as a broken server, not as "none registered".
|
|
130
|
+
if ('resources' in caps) {
|
|
131
|
+
const templates = await t.rpc('resources/templates/list');
|
|
132
|
+
t.check('resources/templates/list', Array.isArray(templates.result?.resourceTemplates), templates.error ? `-${templates.error.code}` : `${templates.result?.resourceTemplates?.length} templates`);
|
|
133
|
+
}
|
|
134
|
+
const versioned = await fetch(t.endpoint, {
|
|
135
|
+
method: 'POST',
|
|
136
|
+
headers: { 'Content-Type': 'application/json', 'MCP-Protocol-Version': CURRENT_PROTOCOL },
|
|
137
|
+
body: JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'ping' }),
|
|
138
|
+
});
|
|
139
|
+
t.recordCall();
|
|
140
|
+
t.check('MCP-Protocol-Version echoed', versioned.headers.get('mcp-protocol-version') === CURRENT_PROTOCOL, `sent ${CURRENT_PROTOCOL}, got ${versioned.headers.get('mcp-protocol-version')}`);
|
|
141
|
+
// Batching was removed in 2025-06-18. A server that keeps honouring it under
|
|
142
|
+
// a version that forbids it is telling the client something untrue.
|
|
143
|
+
const batched = await fetch(t.endpoint, {
|
|
144
|
+
method: 'POST',
|
|
145
|
+
headers: { 'Content-Type': 'application/json', 'MCP-Protocol-Version': CURRENT_PROTOCOL },
|
|
146
|
+
body: JSON.stringify([{ jsonrpc: '2.0', id: 1, method: 'ping' }]),
|
|
147
|
+
});
|
|
148
|
+
t.recordCall();
|
|
149
|
+
t.check('batch refused at 2025-06-18', batched.status === 400, `${batched.status}`);
|
|
113
150
|
return init;
|
|
114
151
|
}
|
|
152
|
+
/** The newest protocol revision `wiki-formant/mcp` speaks. */
|
|
153
|
+
export const CURRENT_PROTOCOL = '2025-06-18';
|
|
115
154
|
/**
|
|
116
155
|
* One service, many descriptors — server.json, the two agent-card paths, the
|
|
117
156
|
* OpenAPI document, the MCP server card, and `initialize` — should never
|
|
@@ -142,25 +181,160 @@ export async function agentCardParity(t) {
|
|
|
142
181
|
fetch(`${t.base}/.well-known/agent.json`).then(r => r.json()),
|
|
143
182
|
]);
|
|
144
183
|
t.check('agent card parity', JSON.stringify(a) === JSON.stringify(b), 'agent.json === agent-card.json');
|
|
184
|
+
// A card missing a required field is a card a spec-current client rejects, and
|
|
185
|
+
// parity alone happily reports two identical unusable ones.
|
|
186
|
+
const required = [
|
|
187
|
+
'protocolVersion',
|
|
188
|
+
'name',
|
|
189
|
+
'description',
|
|
190
|
+
'url',
|
|
191
|
+
'preferredTransport',
|
|
192
|
+
'version',
|
|
193
|
+
'capabilities',
|
|
194
|
+
'skills',
|
|
195
|
+
'defaultInputModes',
|
|
196
|
+
'defaultOutputModes',
|
|
197
|
+
];
|
|
198
|
+
const missing = required.filter(k => a[k] === undefined);
|
|
199
|
+
t.check('agent card complete', missing.length === 0, missing.length ? `missing: ${missing.join(', ')}` : `A2A ${a.protocolVersion}`);
|
|
200
|
+
// `url` is where a client sends its first call. Pointed at the homepage it
|
|
201
|
+
// gets HTML back, which is the failure that looks like a broken agent.
|
|
202
|
+
const endpoint = String(a.url ?? '');
|
|
203
|
+
const probe = await fetch(endpoint, {
|
|
204
|
+
method: 'POST',
|
|
205
|
+
headers: { 'Content-Type': 'application/json' },
|
|
206
|
+
body: JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'ping' }),
|
|
207
|
+
});
|
|
208
|
+
t.recordCall();
|
|
209
|
+
t.check('agent card url is callable', (probe.headers.get('content-type') ?? '').includes('json'), `POST ${endpoint} -> ${probe.status} ${probe.headers.get('content-type')}`);
|
|
145
210
|
}
|
|
146
211
|
/**
|
|
147
|
-
*
|
|
148
|
-
*
|
|
212
|
+
* Any surface an agent recrawls should answer a conditional GET with a 304.
|
|
213
|
+
*
|
|
214
|
+
* Point this at every such surface, not only the corpus exports. Aimed solely
|
|
215
|
+
* at the `llms.*` family — the paths that already had validators — it reported
|
|
216
|
+
* green across three origins whose markdown twins, agent cards and OpenAPI
|
|
217
|
+
* documents carried no ETag at all. A check that only looks where it knows it
|
|
218
|
+
* will pass is a check that measures nothing.
|
|
149
219
|
*/
|
|
150
220
|
export async function conditionalGetChecks(t, paths) {
|
|
151
221
|
for (const path of paths) {
|
|
152
|
-
const
|
|
222
|
+
const url = path.startsWith('http') ? path : `${t.base}/${path.replace(/^\//, '')}`;
|
|
223
|
+
const label = path.replace(t.base, '');
|
|
224
|
+
const fresh = await fetch(url);
|
|
153
225
|
const etag = fresh.headers.get('etag');
|
|
154
226
|
// Both validators, not just the one the 304 is driven by. A crawler that
|
|
155
227
|
// sends If-Modified-Since rather than If-None-Match — and several do — gets
|
|
156
228
|
// a full render on every pass from a response that carries no Last-Modified,
|
|
157
|
-
// and the ETag check alone would call that surface conformant.
|
|
158
|
-
// suite asserted this locally; adopting the shared check should not have
|
|
159
|
-
// been a trade.
|
|
229
|
+
// and the ETag check alone would call that surface conformant.
|
|
160
230
|
const lastModified = fresh.headers.get('last-modified');
|
|
161
|
-
const revalidated = etag ? await fetch(
|
|
162
|
-
t.check(`${
|
|
163
|
-
t.check(`${
|
|
231
|
+
const revalidated = etag ? await fetch(url, { headers: { 'If-None-Match': etag } }) : null;
|
|
232
|
+
t.check(`${label} 304`, !!etag && revalidated?.status === 304, `etag=${etag} revalidate=${revalidated?.status}`);
|
|
233
|
+
t.check(`${label} last-modified`, !!lastModified, `${fresh.status} ${lastModified}`);
|
|
234
|
+
// A list is what a client that holds two revisions actually sends, and the
|
|
235
|
+
// weak prefix is what a proxy adds in transit. Exact string equality passes
|
|
236
|
+
// the check above and fails both of these.
|
|
237
|
+
if (etag) {
|
|
238
|
+
const listed = await fetch(url, { headers: { 'If-None-Match': `W/"stale-x", ${etag}` } });
|
|
239
|
+
t.check(`${label} 304 (etag list)`, listed.status === 304, `${listed.status}`);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* A JSON descriptor is revalidatable — an agent card, an OpenAPI document, a
|
|
245
|
+
* registry manifest, a server card.
|
|
246
|
+
*
|
|
247
|
+
* Separate from `conditionalGetChecks` because the contract genuinely differs:
|
|
248
|
+
* a descriptor is built from code, not from rows, so it has no honest
|
|
249
|
+
* `Last-Modified` to offer. A stamp taken at cold start would move without the
|
|
250
|
+
* document moving, which is worse than none. The body-derived ETag is the whole
|
|
251
|
+
* validator, and it is enough.
|
|
252
|
+
*/
|
|
253
|
+
export async function descriptorChecks(t, paths) {
|
|
254
|
+
for (const path of paths) {
|
|
255
|
+
const url = path.startsWith('http') ? path : `${t.base}/${path.replace(/^\//, '')}`;
|
|
256
|
+
const label = path.replace(t.base, '');
|
|
257
|
+
const fresh = await fetch(url);
|
|
258
|
+
const etag = fresh.headers.get('etag');
|
|
259
|
+
const json = (fresh.headers.get('content-type') ?? '').includes('json');
|
|
260
|
+
const revalidated = etag ? await fetch(url, { headers: { 'If-None-Match': etag } }) : null;
|
|
261
|
+
t.check(`${label} revalidates`, !!etag && json && revalidated?.status === 304, `${fresh.status} ${fresh.headers.get('content-type')} etag=${etag} revalidate=${revalidated?.status}`);
|
|
262
|
+
// No max-age at all leaves a caller on heuristic freshness, which for a
|
|
263
|
+
// document with no Last-Modified means it may never refetch at all.
|
|
264
|
+
t.check(`${label} states a freshness`, /max-age=\d+/.test(fresh.headers.get('cache-control') ?? ''), `cache-control: ${fresh.headers.get('cache-control')}`);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Every tool carries behavioural hints, and the ones that write say so.
|
|
269
|
+
*
|
|
270
|
+
* Without them a client that auto-approves read-only calls has no way to tell a
|
|
271
|
+
* lookup from one that signs a transaction — and two of the three servers here
|
|
272
|
+
* shipped write tools with no annotations at all.
|
|
273
|
+
*/
|
|
274
|
+
export async function annotationChecks(t, opts = {}) {
|
|
275
|
+
const tools = (await t.rpc('tools/list')).result?.tools ?? [];
|
|
276
|
+
const writes = new Set(opts.writes ?? []);
|
|
277
|
+
const unannotated = tools.filter(x => x.annotations?.readOnlyHint === undefined);
|
|
278
|
+
t.check('tools annotated', unannotated.length === 0, unannotated.length ? `missing readOnlyHint: ${unannotated.map(x => x.name).join(', ')}` : `${tools.length} tools`);
|
|
279
|
+
const mislabelled = tools.filter(x => writes.has(x.name) && x.annotations?.readOnlyHint !== false);
|
|
280
|
+
t.check('writes not marked read-only', mislabelled.length === 0, mislabelled.length ? mislabelled.map(x => x.name).join(', ') : `${writes.size} write tools`);
|
|
281
|
+
const thin = tools.filter(x => (x.description ?? '').length < 120);
|
|
282
|
+
t.check('descriptions carry a usage note', thin.length === 0, thin.length ? thin.map(x => `${x.name}:${(x.description ?? '').length}ch`).join(' ') : `min ${Math.min(...tools.map(x => (x.description ?? '').length))}ch`);
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* The orientation calls stay inside a context window.
|
|
286
|
+
*
|
|
287
|
+
* A tool that passes a metadata column straight through is one stored blob away
|
|
288
|
+
* from returning 350 KB — around 90k tokens — from the first call an agent
|
|
289
|
+
* makes. Nothing in a pass/fail table notices that unless something weighs the
|
|
290
|
+
* answer, so this weighs it.
|
|
291
|
+
*/
|
|
292
|
+
export async function payloadBudget(t, calls, maxBytes = 120_000) {
|
|
293
|
+
for (const { name, args } of calls) {
|
|
294
|
+
const answer = await t.call(name, args ?? {});
|
|
295
|
+
const text = answer.result?.content?.[0]?.text ?? '';
|
|
296
|
+
// An empty answer is not a small one. The first draft compared only the
|
|
297
|
+
// length, so a call that failed outright — a cold connection pool timing
|
|
298
|
+
// out, in the run that caught this — reported `PASS 0 chars` and the check
|
|
299
|
+
// measured nothing. A budget that green-lights a call that never returned
|
|
300
|
+
// is the exact failure it exists to catch.
|
|
301
|
+
const answered = text.length > 0 && !answer.error && !answer.result?.isError;
|
|
302
|
+
t.check(`${name} within budget`, answered && text.length <= maxBytes, answered
|
|
303
|
+
? `${text.length.toLocaleString()} chars (max ${maxBytes.toLocaleString()})`
|
|
304
|
+
: `no answer to weigh: ${answer.error ? `-${answer.error.code} ${answer.error.message}` : answer.result?.isError ? `isError: ${text.slice(0, 80)}` : 'empty result'}`);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* The default `User-agent: *` group may reach everything the descriptors
|
|
309
|
+
* advertise.
|
|
310
|
+
*
|
|
311
|
+
* An origin whose card names an MCP endpoint its own robots.txt disallows to
|
|
312
|
+
* every unnamed crawler is telling two different stories to the same caller.
|
|
313
|
+
*/
|
|
314
|
+
export async function robotsChecks(t, paths) {
|
|
315
|
+
const body = await (await fetch(`${t.base}/robots.txt`)).text();
|
|
316
|
+
const rules = [];
|
|
317
|
+
let inStar = false;
|
|
318
|
+
for (const raw of body.split('\n')) {
|
|
319
|
+
const line = raw.replace(/#.*$/, '').trim();
|
|
320
|
+
const [field, ...rest] = line.split(':');
|
|
321
|
+
if (!field || !rest.length)
|
|
322
|
+
continue;
|
|
323
|
+
const key = field.trim().toLowerCase();
|
|
324
|
+
const value = rest.join(':').trim();
|
|
325
|
+
if (key === 'user-agent')
|
|
326
|
+
inStar = value === '*';
|
|
327
|
+
else if (inStar && (key === 'allow' || key === 'disallow') && value) {
|
|
328
|
+
rules.push({ allow: key === 'allow', path: value });
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
for (const path of paths) {
|
|
332
|
+
// Longest match wins, Allow breaking a tie — the rule every major crawler
|
|
333
|
+
// implements.
|
|
334
|
+
const match = rules
|
|
335
|
+
.filter(r => path.startsWith(r.path.replace(/\*$/, '')))
|
|
336
|
+
.sort((a, b) => b.path.length - a.path.length || Number(b.allow) - Number(a.allow))[0];
|
|
337
|
+
t.check(`robots allows ${path}`, !match || match.allow, match ? `${match.allow ? 'Allow' : 'Disallow'}: ${match.path}` : 'no matching rule');
|
|
164
338
|
}
|
|
165
339
|
}
|
|
166
340
|
//# sourceMappingURL=conformance.js.map
|
package/dist/conformance.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conformance.js","sourceRoot":"","sources":["../src/conformance.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,kBAAkB;AAClB,EAAE;AACF,iFAAiF;AACjF,mFAAmF;AACnF,gFAAgF;AAChF,+EAA+E;AAC/E,6DAA6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I,EAAE,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC;IAC/I,CAAC;AACH,CAAC"}
|
package/dist/crawlers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crawlers.d.ts","sourceRoot":"","sources":["../src/crawlers.ts"],"names":[],"mappings":"AAoBA,MAAM,WAAW,SAAS;IACxB,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,SAAS,SAAS,EAuB3C,CAAC;AAEF,gFAAgF;AAChF,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAM/E;AAED,8EAA8E;AAC9E,wBAAgB,eAAe,IAAI,MAAM,EAAE,CAE1C;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC9B;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE;IACnC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC5B,GAAG,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"crawlers.d.ts","sourceRoot":"","sources":["../src/crawlers.ts"],"names":[],"mappings":"AAoBA,MAAM,WAAW,SAAS;IACxB,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAI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