@cyanheads/biorxiv-mcp-server 0.4.0 → 0.4.2
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/AGENTS.md +12 -8
- package/CLAUDE.md +12 -8
- package/Dockerfile +3 -3
- package/README.md +31 -30
- package/changelog/0.4.x/0.4.1.md +27 -0
- package/changelog/0.4.x/0.4.2.md +34 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.d.ts +8 -6
- package/dist/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.js +94 -28
- package/dist/mcp-server/tools/definitions/biorxiv-get-fulltext.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.d.ts +24 -9
- package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.js +137 -52
- package/dist/mcp-server/tools/definitions/biorxiv-get-preprint.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.d.ts +22 -9
- package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.js +78 -33
- package/dist/mcp-server/tools/definitions/biorxiv-get-published-version.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-list-published-versions.tool.d.ts +25 -5
- package/dist/mcp-server/tools/definitions/biorxiv-list-published-versions.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-list-published-versions.tool.js +130 -22
- package/dist/mcp-server/tools/definitions/biorxiv-list-published-versions.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.d.ts +5 -2
- package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.js +51 -34
- package/dist/mcp-server/tools/definitions/biorxiv-list-recent.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.d.ts +24 -7
- package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.js +78 -38
- package/dist/mcp-server/tools/definitions/biorxiv-search-preprints.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/index.d.ts +47 -19
- package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
- package/dist/services/biorxiv/biorxiv-service.d.ts +51 -31
- package/dist/services/biorxiv/biorxiv-service.d.ts.map +1 -1
- package/dist/services/biorxiv/biorxiv-service.js +132 -74
- package/dist/services/biorxiv/biorxiv-service.js.map +1 -1
- package/dist/services/biorxiv/types.d.ts +33 -6
- package/dist/services/biorxiv/types.d.ts.map +1 -1
- package/dist/services/biorxiv-fulltext/biorxiv-fulltext-service.d.ts +9 -6
- package/dist/services/biorxiv-fulltext/biorxiv-fulltext-service.d.ts.map +1 -1
- package/dist/services/biorxiv-fulltext/biorxiv-fulltext-service.js +178 -23
- package/dist/services/biorxiv-fulltext/biorxiv-fulltext-service.js.map +1 -1
- package/dist/services/europe-pmc/europe-pmc-service.d.ts +26 -6
- package/dist/services/europe-pmc/europe-pmc-service.d.ts.map +1 -1
- package/dist/services/europe-pmc/europe-pmc-service.js +124 -32
- package/dist/services/europe-pmc/europe-pmc-service.js.map +1 -1
- package/dist/services/shared.d.ts +105 -5
- package/dist/services/shared.d.ts.map +1 -1
- package/dist/services/shared.js +191 -9
- package/dist/services/shared.js.map +1 -1
- package/dist/services/upstream-text-tables.d.ts +11 -1
- package/dist/services/upstream-text-tables.d.ts.map +1 -1
- package/dist/services/upstream-text-tables.js +42 -1
- package/dist/services/upstream-text-tables.js.map +1 -1
- package/package.json +6 -6
- package/server.json +3 -3
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
* HTML page from the bioRxiv/medRxiv website (`www.{server}.org/content/{doi}v{N}.full`)
|
|
4
4
|
* and extracts readable Markdown via the framework HTML extractor. The page is
|
|
5
5
|
* reshaped first (`prepareArticlePage`) so the extractor keeps inline citation
|
|
6
|
-
* labels and reference text,
|
|
7
|
-
*
|
|
6
|
+
* labels and reference text, renders each figure and reference number once, sets
|
|
7
|
+
* each display formula in a block of its own, and the tables the page carries no
|
|
8
|
+
* cells for are returned by name with the URL that serves them.
|
|
8
9
|
*
|
|
9
10
|
* This is a DISTINCT fetch path from BiorxivApiService: it EXPECTS an HTML
|
|
10
11
|
* document (the rendered article page), so it never routes through the JSON
|
|
@@ -14,7 +15,7 @@
|
|
|
14
15
|
* the extractor.
|
|
15
16
|
*
|
|
16
17
|
* Extracted articles are cached in `ctx.state` under
|
|
17
|
-
* `fulltext/
|
|
18
|
+
* `fulltext/v4/{server}/{doi}/{version}` for {@link FULLTEXT_CACHE_TTL_SECONDS}
|
|
18
19
|
* seconds, so paging a long article with offset/limit costs one origin fetch and
|
|
19
20
|
* one extraction instead of one per chunk. `ctx.state` is tenant-scoped, which is
|
|
20
21
|
* the intended blast radius — no cross-tenant or process-wide sharing. Only
|
|
@@ -25,10 +26,10 @@
|
|
|
25
26
|
* @module services/biorxiv-fulltext/biorxiv-fulltext-service
|
|
26
27
|
*/
|
|
27
28
|
import { McpError } from '@cyanheads/mcp-ts-core/errors';
|
|
28
|
-
import { fetchWithTimeout, htmlExtractor
|
|
29
|
+
import { fetchWithTimeout, htmlExtractor } from '@cyanheads/mcp-ts-core/utils';
|
|
29
30
|
import { parseHTML } from 'linkedom';
|
|
30
31
|
import { getServerConfig } from '../../config/server-config.js';
|
|
31
|
-
import { parseRetryAfterSeconds, SERVER_VERSION } from '../shared.js';
|
|
32
|
+
import { parseRetryAfterSeconds, retryWithinBudget, SERVER_VERSION, } from '../shared.js';
|
|
32
33
|
/**
|
|
33
34
|
* bioRxiv/medRxiv render their article pages on the Highwire platform, whose
|
|
34
35
|
* main full-text container is `<div class="article fulltext-view">`. Defuddle's
|
|
@@ -61,15 +62,48 @@ const EXPECTED_STATUSES = [...DETERMINISTIC_UNAVAILABLE_STATUSES, 429];
|
|
|
61
62
|
*/
|
|
62
63
|
const FULLTEXT_CACHE_TTL_SECONDS = 3_600;
|
|
63
64
|
/**
|
|
64
|
-
* Cache key: `fulltext/
|
|
65
|
+
* Cache key: `fulltext/v4/{server}/{doi}/{version}`. Slash-delimited because the
|
|
65
66
|
* storage layer validates keys against `[a-zA-Z0-9_.\-/]` — a colon separator is
|
|
66
67
|
* rejected outright, and a DOI's own `/` and `.` are already inside the allowed
|
|
67
|
-
* set. The `
|
|
68
|
-
* {@link CachedArticle}
|
|
69
|
-
*
|
|
70
|
-
* added `omittedTables` and keeps citation labels and
|
|
68
|
+
* set. The `v4` segment is the cached-value generation — bump it when
|
|
69
|
+
* {@link CachedArticle} or the Markdown it holds changes shape, so entries
|
|
70
|
+
* written by an older build are never read back. (`v2` dropped the extractor's
|
|
71
|
+
* `wordCount`; `v3` added `omittedTables` and keeps citation labels and
|
|
72
|
+
* reference text; `v4` renders each figure once, numbers each reference once,
|
|
73
|
+
* and sets each display formula in a block of its own.)
|
|
71
74
|
*/
|
|
72
|
-
const cacheKeyFor = (server, doi, version) => `fulltext/
|
|
75
|
+
const cacheKeyFor = (server, doi, version) => `fulltext/v4/${server}/${doi}/${version}`;
|
|
76
|
+
/**
|
|
77
|
+
* A reference label that is one integer: `12.`, `(12).`, or `[12].`. Anchored at
|
|
78
|
+
* both ends, so a label carrying anything else (`12a.`, `1–2.`) is not a number.
|
|
79
|
+
*/
|
|
80
|
+
const NUMERIC_REF_LABEL = /^[([]?(\d+)[)\]]?\.?$/;
|
|
81
|
+
/**
|
|
82
|
+
* The elements under `root` matching `selector` that no other match contains.
|
|
83
|
+
* Every pass of {@link prepareArticlePage} that queries a match's own subtree
|
|
84
|
+
* runs over these: a match nested inside another is reached through that one's
|
|
85
|
+
* subtree and handled as part of it. Outermost matches have disjoint subtrees,
|
|
86
|
+
* so each pass stays linear in the page's size.
|
|
87
|
+
*/
|
|
88
|
+
function outermost(root, selector) {
|
|
89
|
+
const nested = new Set();
|
|
90
|
+
return [...root.querySelectorAll(selector)].filter((el) => {
|
|
91
|
+
if (nested.has(el))
|
|
92
|
+
return false;
|
|
93
|
+
for (const inner of el.querySelectorAll(selector))
|
|
94
|
+
nested.add(inner);
|
|
95
|
+
return true;
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* The URL an image shows. The page lazy-loads: `src` holds a `data:`
|
|
100
|
+
* placeholder and `data-src` the image, so `data-src` wins, and a `src` that is
|
|
101
|
+
* a `data:` URL counts as no source.
|
|
102
|
+
*/
|
|
103
|
+
function imageSource(image) {
|
|
104
|
+
const src = image?.getAttribute('data-src') ?? image?.getAttribute('src');
|
|
105
|
+
return src && !src.startsWith('data:') ? src : undefined;
|
|
106
|
+
}
|
|
73
107
|
/**
|
|
74
108
|
* Rewrites the article container so the extractor keeps what its cleanup rules
|
|
75
109
|
* strip from Highwire pages, and lists the tables the page carries no cells for.
|
|
@@ -82,6 +116,41 @@ const cacheKeyFor = (server, doi, version) => `fulltext/v3/${server}/${doi}/${ve
|
|
|
82
116
|
* reshaped here instead:
|
|
83
117
|
*
|
|
84
118
|
* - each cross-reference anchor becomes its own label text;
|
|
119
|
+
* - each inline formula (`span.inline-formula`) becomes a bare `<img>` with an
|
|
120
|
+
* empty alt where the span stood, inside its sentence (the image source is
|
|
121
|
+
* read as for figures, and a formula with none is left as the page has it).
|
|
122
|
+
* The page gives the formula image the alt `Embedded Image`, which Defuddle
|
|
123
|
+
* reads as a caption: it lifts the image out of the sentence into a captioned
|
|
124
|
+
* figure, so the alt becomes a paragraph of its own and the sentence's tail
|
|
125
|
+
* starts a new one;
|
|
126
|
+
* - each display formula (`span.disp-formula`) becomes a bare `<img>` with an
|
|
127
|
+
* empty alt in a paragraph of its own, and a paragraph that held formulas is
|
|
128
|
+
* split around them, dropping the runs that hold only whitespace (the image
|
|
129
|
+
* source is read as for figures, and a formula with none is left as the page
|
|
130
|
+
* has it). The page sets the formula image inside the paragraph with the alt
|
|
131
|
+
* `Embedded Image`, which Defuddle reads as a caption: it makes the image a
|
|
132
|
+
* captioned figure, whose start tag closes the open paragraph, so the text
|
|
133
|
+
* after the formula loses its block and the next formula in the paragraph is
|
|
134
|
+
* glued onto it. The page prints no formula label for an alt, and Defuddle
|
|
135
|
+
* collapses adjacent images that share a non-empty alt, so consecutive
|
|
136
|
+
* equations keep an empty one;
|
|
137
|
+
* - each figure (`div.fig`) loses its "Download figure" / "Open in new tab"
|
|
138
|
+
* links, and each of its images becomes a bare `<img>` in its own paragraph,
|
|
139
|
+
* alt-texted with the figure's printed label (`Figure 2`, `Fig. S16 (1 of 2)`
|
|
140
|
+
* when the figure holds several). The source is the lazy-loaded `data-src`, or
|
|
141
|
+
* a `src` that is not a `data:` placeholder; an image with neither is left to
|
|
142
|
+
* the extractor as the page has it. The page's image link carries the caption
|
|
143
|
+
* in its `title`, and the image the caption again in its `alt`: Defuddle
|
|
144
|
+
* emits the alt as the image text, then again as a paragraph, and its
|
|
145
|
+
* empty-link cleanup leaves the title's text after its first `)` spliced onto
|
|
146
|
+
* the preceding block, or glues the image onto that block when the title has
|
|
147
|
+
* none. The `div.fig-caption` below stays the figure's one caption. Distinct
|
|
148
|
+
* alts keep Defuddle from collapsing a figure's images into one, and the
|
|
149
|
+
* paragraph keeps the image off the `Figure N.` line;
|
|
150
|
+
* - in a reference list (`ol.cit-list`) whose printed labels are consecutive
|
|
151
|
+
* integers, the labels give way to the list's own numbering, starting at the
|
|
152
|
+
* first label (a Methods list can start at 53); any other list keeps its
|
|
153
|
+
* labels and is rendered unordered, so no entry carries two numbers;
|
|
85
154
|
* - in the reference list, the `↵` backlinks go, every `.cit-extra` link-out but
|
|
86
155
|
* the DOI one goes (the OpenURL ones are an unexpanded `{openurl}` template,
|
|
87
156
|
* the PubMed ones often a truncated `access_num`), the DOI one becomes a
|
|
@@ -94,6 +163,8 @@ const cacheKeyFor = (server, doi, version) => `fulltext/v3/${server}/${doi}/${ve
|
|
|
94
163
|
* its `id` when it prints none. The cells are never fetched: each would cost
|
|
95
164
|
* a request to an origin that rate-limits after a handful.
|
|
96
165
|
*
|
|
166
|
+
* Each pass that queries a match's subtree runs over the outermost matches only
|
|
167
|
+
* ({@link outermost}), so the reshaping runs in linear time.
|
|
97
168
|
* A page without the container is returned unchanged. An `href` that does not
|
|
98
169
|
* parse as a URL counts as no link: the page is upstream markup, and one bad
|
|
99
170
|
* link must not cost the caller the whole article.
|
|
@@ -103,13 +174,94 @@ function prepareArticlePage(html, sourceUrl) {
|
|
|
103
174
|
const view = document.querySelector(FULLTEXT_CONTENT_SELECTOR);
|
|
104
175
|
if (!view)
|
|
105
176
|
return { html, omittedTables: [] };
|
|
106
|
-
for (const anchor of view
|
|
177
|
+
for (const anchor of outermost(view, 'a[class^="xref-"]')) {
|
|
107
178
|
anchor.replaceWith(document.createTextNode(anchor.textContent ?? ''));
|
|
108
179
|
}
|
|
109
|
-
for (const
|
|
180
|
+
for (const formula of outermost(view, 'span.inline-formula')) {
|
|
181
|
+
const src = imageSource(formula.querySelector('img'));
|
|
182
|
+
if (!src)
|
|
183
|
+
continue;
|
|
184
|
+
const image = document.createElement('img');
|
|
185
|
+
image.setAttribute('src', src);
|
|
186
|
+
image.setAttribute('alt', '');
|
|
187
|
+
formula.replaceWith(image);
|
|
188
|
+
}
|
|
189
|
+
const formulaBlocks = new Set();
|
|
190
|
+
const heldFormulas = new Set();
|
|
191
|
+
for (const formula of outermost(view, 'span.disp-formula')) {
|
|
192
|
+
const src = imageSource(formula.querySelector('img'));
|
|
193
|
+
if (!src)
|
|
194
|
+
continue;
|
|
195
|
+
const image = document.createElement('img');
|
|
196
|
+
image.setAttribute('src', src);
|
|
197
|
+
image.setAttribute('alt', '');
|
|
198
|
+
const block = document.createElement('p');
|
|
199
|
+
block.append(image);
|
|
200
|
+
formulaBlocks.add(block);
|
|
201
|
+
const parent = formula.parentElement;
|
|
202
|
+
if (parent?.localName === 'p')
|
|
203
|
+
heldFormulas.add(parent);
|
|
204
|
+
formula.replaceWith(block);
|
|
205
|
+
}
|
|
206
|
+
// One pass over each paragraph's children, so a paragraph of many formulas
|
|
207
|
+
// is split in time linear in its length.
|
|
208
|
+
for (const paragraph of heldFormulas) {
|
|
209
|
+
const parts = [];
|
|
210
|
+
let run = document.createElement('p');
|
|
211
|
+
// A run holding only the whitespace around a formula is dropped, not left an empty paragraph.
|
|
212
|
+
const endRun = () => {
|
|
213
|
+
if (run.children.length > 0 || run.textContent?.trim())
|
|
214
|
+
parts.push(run);
|
|
215
|
+
run = document.createElement('p');
|
|
216
|
+
};
|
|
217
|
+
for (const node of [...paragraph.childNodes]) {
|
|
218
|
+
if (formulaBlocks.has(node)) {
|
|
219
|
+
endRun();
|
|
220
|
+
parts.push(node);
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
run.append(node);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
endRun();
|
|
227
|
+
paragraph.replaceWith(...parts);
|
|
228
|
+
}
|
|
229
|
+
for (const figure of outermost(view, 'div.fig')) {
|
|
230
|
+
for (const links of figure.querySelectorAll('ul.highwire-figure-links'))
|
|
231
|
+
links.remove();
|
|
232
|
+
const label = figure.querySelector('.fig-label')?.textContent?.trim().replace(/[.:]$/, '') ?? '';
|
|
233
|
+
const holders = outermost(figure, '.fig-inline-img');
|
|
234
|
+
for (const [index, holder] of holders.entries()) {
|
|
235
|
+
const src = imageSource(holder.querySelector('img'));
|
|
236
|
+
if (!src)
|
|
237
|
+
continue;
|
|
238
|
+
const image = document.createElement('img');
|
|
239
|
+
image.setAttribute('src', src);
|
|
240
|
+
image.setAttribute('alt', holders.length > 1 ? `${label} (${index + 1} of ${holders.length})`.trim() : label);
|
|
241
|
+
const block = document.createElement('p');
|
|
242
|
+
block.append(image);
|
|
243
|
+
holder.replaceChildren(block);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
for (const refList of outermost(view, 'div.ref-list')) {
|
|
247
|
+
for (const list of refList.querySelectorAll('ol.cit-list')) {
|
|
248
|
+
const labels = [...list.children].map((item) => [...item.children].find((child) => child.matches('span.ref-label')));
|
|
249
|
+
const numbers = labels.map((label) => Number(NUMERIC_REF_LABEL.exec(label?.textContent?.trim() ?? '')?.[1] ?? Number.NaN));
|
|
250
|
+
const first = numbers[0];
|
|
251
|
+
if (first !== undefined && numbers.every((n, i) => n === first + i)) {
|
|
252
|
+
list.setAttribute('start', String(first));
|
|
253
|
+
for (const label of labels)
|
|
254
|
+
label?.remove();
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
const unordered = document.createElement('ul');
|
|
258
|
+
unordered.append(...list.childNodes);
|
|
259
|
+
list.replaceWith(unordered);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
110
262
|
for (const backlink of refList.querySelectorAll('a.rev-xref-ref'))
|
|
111
263
|
backlink.remove();
|
|
112
|
-
for (const extra of refList
|
|
264
|
+
for (const extra of outermost(refList, '.cit-extra')) {
|
|
113
265
|
for (const link of extra.querySelectorAll('a')) {
|
|
114
266
|
const doi = link.classList.contains('cit-ref-sprinkles-doi')
|
|
115
267
|
? URL.parse(link.getAttribute('href') ?? '', sourceUrl)?.searchParams.get('access_num')
|
|
@@ -128,7 +280,7 @@ function prepareArticlePage(html, sourceUrl) {
|
|
|
128
280
|
}
|
|
129
281
|
}
|
|
130
282
|
const omittedTables = [];
|
|
131
|
-
for (const table of view
|
|
283
|
+
for (const table of outermost(view, 'div.table')) {
|
|
132
284
|
const href = table.querySelector('a.table-expand-popup')?.getAttribute('href');
|
|
133
285
|
for (const callout of table.querySelectorAll('.table-callout-links'))
|
|
134
286
|
callout.remove();
|
|
@@ -208,14 +360,15 @@ export class BiorxivFullTextService {
|
|
|
208
360
|
* Resolves to `{ kind: 'article', markdown, ... }` on success, or
|
|
209
361
|
* `{ kind: 'unavailable', reason }` when the page is blocked (Cloudflare 403 /
|
|
210
362
|
* challenge), rate-limited (429), missing, or yields no extractable text
|
|
211
|
-
* (PDF-only preprints). Transient failures (5xx, timeout, network) bubble
|
|
212
|
-
*
|
|
363
|
+
* (PDF-only preprints). Transient failures (5xx, timeout, network) bubble
|
|
364
|
+
* unchanged after retry — `ServiceUnavailable`, or a `Timeout` once `deadline`
|
|
365
|
+
* runs out — for the caller to classify.
|
|
213
366
|
*
|
|
214
367
|
* A successful extraction is served from the tenant-scoped `ctx.state` cache on
|
|
215
368
|
* subsequent calls for the same server/DOI/version, so offset paging does not
|
|
216
369
|
* refetch the origin per chunk.
|
|
217
370
|
*/
|
|
218
|
-
async fetchFullText(server, doi, version, ctx) {
|
|
371
|
+
async fetchFullText(server, doi, version, deadline, ctx) {
|
|
219
372
|
const encodedDoi = doi.split('/').map(encodeURIComponent).join('/');
|
|
220
373
|
const sourceUrl = `${this.webBaseUrls[server]}/content/${encodedDoi}v${version}.full`;
|
|
221
374
|
// ctx.state is tenant-scoped and throws without a tenant (HTTP + JWT whose
|
|
@@ -231,9 +384,9 @@ export class BiorxivFullTextService {
|
|
|
231
384
|
}
|
|
232
385
|
let html;
|
|
233
386
|
try {
|
|
234
|
-
html = await
|
|
235
|
-
const response = await fetchWithTimeout(sourceUrl, 30_000, ctx, {
|
|
236
|
-
signal
|
|
387
|
+
html = await retryWithinBudget(async ({ signal, remainingMs }) => {
|
|
388
|
+
const response = await fetchWithTimeout(sourceUrl, Math.min(30_000, remainingMs), ctx, {
|
|
389
|
+
signal,
|
|
237
390
|
headers: { 'User-Agent': this.userAgent, Accept: 'text/html' },
|
|
238
391
|
expectedStatuses: EXPECTED_STATUSES,
|
|
239
392
|
});
|
|
@@ -243,13 +396,15 @@ export class BiorxivFullTextService {
|
|
|
243
396
|
context: ctx,
|
|
244
397
|
baseDelayMs: 500,
|
|
245
398
|
signal: ctx.signal,
|
|
399
|
+
deadline,
|
|
246
400
|
});
|
|
247
401
|
}
|
|
248
402
|
catch (err) {
|
|
249
403
|
// fetchWithTimeout throws on non-2xx with data.status set. Deterministic
|
|
250
404
|
// access failures (403 block, 404 missing) and origin rate limiting (429)
|
|
251
|
-
// become an `unavailable` result; transient
|
|
252
|
-
// bubble unchanged
|
|
405
|
+
// become an `unavailable` result; transient failures (5xx / timeout /
|
|
406
|
+
// network / deadline expiry) bubble unchanged. A 429 the budget ran out
|
|
407
|
+
// after arrives in place of the expiry, and is still the origin's answer.
|
|
253
408
|
const errData = err instanceof McpError
|
|
254
409
|
? err.data
|
|
255
410
|
: undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"biorxiv-fulltext-service.js","sourceRoot":"","sources":["../../../src/services/biorxiv-fulltext/biorxiv-fulltext-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC1F,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE9E;;;;;;;GAOG;AACH,MAAM,yBAAyB,GAAG,gBAAgB,CAAC;AAEnD;;;;;;GAMG;AACH,MAAM,kCAAkC,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AAE9E;;;;;GAKG;AACH,MAAM,iBAAiB,GAAG,CAAC,GAAG,kCAAkC,EAAE,GAAG,CAAC,CAAC;AAEvE;;;;;GAKG;AACH,MAAM,0BAA0B,GAAG,KAAK,CAAC;AAEzC;;;;;;;;GAQG;AACH,M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ite` result type, which never carries `abstractText`, so abstracts
|
|
7
7
|
* come from one DOI-keyed `core` query instead. All requests
|
|
8
|
-
* include a polite User-Agent and are retried with exponential backoff
|
|
8
|
+
* include a polite User-Agent and are retried with exponential backoff inside
|
|
9
|
+
* the calling tool's deadline, which bounds every attempt and backoff.
|
|
9
10
|
* Detects HTML error pages, retries an HTTP 200 body that carries no result
|
|
10
11
|
* list, and classifies an origin rate limit (HTTP 429) as its own retryable
|
|
11
12
|
* `rate_limited` condition carrying the parsed `Retry-After` wait — never the
|
|
12
|
-
* upstream response body.
|
|
13
|
+
* upstream response body. A cursor page that fails every attempt the way a
|
|
14
|
+
* malformed `cursorMark` does is told apart from an outage by one request for
|
|
15
|
+
* the same query's first page.
|
|
13
16
|
* @module services/europe-pmc/europe-pmc-service
|
|
14
17
|
*/
|
|
15
18
|
import type { Context } from '@cyanheads/mcp-ts-core';
|
|
16
19
|
import type { AppConfig } from '@cyanheads/mcp-ts-core/config';
|
|
17
20
|
import type { StorageService } from '@cyanheads/mcp-ts-core/storage';
|
|
21
|
+
import { type CallDeadline } from '../shared.js';
|
|
18
22
|
import type { EuropePmcSearchResult } from './types.js';
|
|
19
23
|
export interface SearchOptions {
|
|
20
24
|
/** Optional author filter — ANDed into the query as an `AUTH:"…"` clause. */
|
|
@@ -43,10 +47,26 @@ export declare class EuropePmcService {
|
|
|
43
47
|
* firstPublicationDate), which carries no abstract — see `getAbstracts`.
|
|
44
48
|
* Throws a retryable `rate_limited` error when the origin returns HTTP 429.
|
|
45
49
|
* A body with no result list is retried; if every attempt returns one, throws
|
|
46
|
-
* `
|
|
47
|
-
*
|
|
50
|
+
* `ServiceUnavailable` (`empty_response_body`).
|
|
51
|
+
*
|
|
52
|
+
* On a cursor page other than `*`, a ladder that every attempt failed with
|
|
53
|
+
* HTTP 503 or the empty body sends one more request, unretried: the same
|
|
54
|
+
* query's first page. When that answers, throws `ValidationError`
|
|
55
|
+
* (`invalid_cursor_mark`) — four requests plus one; otherwise the ladder's
|
|
56
|
+
* own failure. A deadline that runs out first is a `Timeout` expiry either
|
|
57
|
+
* way: fewer attempts than the full ladder do not establish that the cursor
|
|
58
|
+
* is at fault.
|
|
48
59
|
*/
|
|
49
|
-
search(options: SearchOptions, ctx: Context): Promise<EuropePmcSearchResult>;
|
|
60
|
+
search(options: SearchOptions, deadline: CallDeadline, ctx: Context): Promise<EuropePmcSearchResult>;
|
|
61
|
+
/**
|
|
62
|
+
* Whether EuropePMC answers a first-page search right now: one request, never
|
|
63
|
+
* retried, timed out at 20 s or what is left of the call's budget, and not
|
|
64
|
+
* sent at all once that budget is spent. A miss of any kind — a status, the
|
|
65
|
+
* empty body, a page that is not JSON, a network error, the timeout — is
|
|
66
|
+
* `false`; retrying would only add requests against an origin that may be in
|
|
67
|
+
* outage. A caller cancellation is re-thrown, never read as a miss.
|
|
68
|
+
*/
|
|
69
|
+
private firstPageAnswers;
|
|
50
70
|
/**
|
|
51
71
|
* Fetch the abstracts of preprints by DOI in one `resultType=core` query — the
|
|
52
72
|
* only EuropePMC result type that carries `abstractText`. The query is keyed
|
|
@@ -56,7 +76,7 @@ export declare class EuropePmcService {
|
|
|
56
76
|
* absent from the map. Throws on failure — classified like `search`, with an
|
|
57
77
|
* HTTP 429 as a retryable `rate_limited` error carrying `Retry-After`.
|
|
58
78
|
*/
|
|
59
|
-
getAbstracts(dois: readonly string[], ctx: Context): Promise<Map<string, string>>;
|
|
79
|
+
getAbstracts(dois: readonly string[], deadline: CallDeadline, ctx: Context): Promise<Map<string, string>>;
|
|
60
80
|
}
|
|
61
81
|
export declare function initEuropePmcService(config: AppConfig, storage: StorageService): void;
|
|
62
82
|
export declare function getEuropePmcService(): EuropePmcService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"europe-pmc-service.d.ts","sourceRoot":"","sources":["../../../src/services/europe-pmc/europe-pmc-service.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"europe-pmc-service.d.ts","sourceRoot":"","sources":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