@cyanheads/cern-inspire-mcp-server 0.1.1

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.
Files changed (90) hide show
  1. package/AGENTS.md +504 -0
  2. package/CLAUDE.md +504 -0
  3. package/Dockerfile +177 -0
  4. package/LICENSE +201 -0
  5. package/README.md +311 -0
  6. package/changelog/0.1.x/0.1.0.md +9 -0
  7. package/changelog/0.1.x/0.1.1.md +22 -0
  8. package/changelog/template.md +151 -0
  9. package/dist/index.d.ts +7 -0
  10. package/dist/index.d.ts.map +1 -0
  11. package/dist/index.js +23 -0
  12. package/dist/index.js.map +1 -0
  13. package/dist/mcp-server/resources/definitions/index.d.ts +106 -0
  14. package/dist/mcp-server/resources/definitions/index.d.ts.map +1 -0
  15. package/dist/mcp-server/resources/definitions/index.js +7 -0
  16. package/dist/mcp-server/resources/definitions/index.js.map +1 -0
  17. package/dist/mcp-server/resources/definitions/inspire-literature.resource.d.ts +110 -0
  18. package/dist/mcp-server/resources/definitions/inspire-literature.resource.d.ts.map +1 -0
  19. package/dist/mcp-server/resources/definitions/inspire-literature.resource.js +69 -0
  20. package/dist/mcp-server/resources/definitions/inspire-literature.resource.js.map +1 -0
  21. package/dist/mcp-server/tools/definitions/export-citations.tool.d.ts +65 -0
  22. package/dist/mcp-server/tools/definitions/export-citations.tool.d.ts.map +1 -0
  23. package/dist/mcp-server/tools/definitions/export-citations.tool.js +120 -0
  24. package/dist/mcp-server/tools/definitions/export-citations.tool.js.map +1 -0
  25. package/dist/mcp-server/tools/definitions/get-citation-summary.tool.d.ts +159 -0
  26. package/dist/mcp-server/tools/definitions/get-citation-summary.tool.d.ts.map +1 -0
  27. package/dist/mcp-server/tools/definitions/get-citation-summary.tool.js +262 -0
  28. package/dist/mcp-server/tools/definitions/get-citation-summary.tool.js.map +1 -0
  29. package/dist/mcp-server/tools/definitions/get-paper.tool.d.ts +195 -0
  30. package/dist/mcp-server/tools/definitions/get-paper.tool.d.ts.map +1 -0
  31. package/dist/mcp-server/tools/definitions/get-paper.tool.js +356 -0
  32. package/dist/mcp-server/tools/definitions/get-paper.tool.js.map +1 -0
  33. package/dist/mcp-server/tools/definitions/index.d.ts +675 -0
  34. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -0
  35. package/dist/mcp-server/tools/definitions/index.js +23 -0
  36. package/dist/mcp-server/tools/definitions/index.js.map +1 -0
  37. package/dist/mcp-server/tools/definitions/list-reference.tool.d.ts +33 -0
  38. package/dist/mcp-server/tools/definitions/list-reference.tool.d.ts.map +1 -0
  39. package/dist/mcp-server/tools/definitions/list-reference.tool.js +312 -0
  40. package/dist/mcp-server/tools/definitions/list-reference.tool.js.map +1 -0
  41. package/dist/mcp-server/tools/definitions/search-authors.tool.d.ts +92 -0
  42. package/dist/mcp-server/tools/definitions/search-authors.tool.d.ts.map +1 -0
  43. package/dist/mcp-server/tools/definitions/search-authors.tool.js +298 -0
  44. package/dist/mcp-server/tools/definitions/search-authors.tool.js.map +1 -0
  45. package/dist/mcp-server/tools/definitions/search-experiments.tool.d.ts +80 -0
  46. package/dist/mcp-server/tools/definitions/search-experiments.tool.d.ts.map +1 -0
  47. package/dist/mcp-server/tools/definitions/search-experiments.tool.js +223 -0
  48. package/dist/mcp-server/tools/definitions/search-experiments.tool.js.map +1 -0
  49. package/dist/mcp-server/tools/definitions/search-hepdata.tool.d.ts +81 -0
  50. package/dist/mcp-server/tools/definitions/search-hepdata.tool.d.ts.map +1 -0
  51. package/dist/mcp-server/tools/definitions/search-hepdata.tool.js +225 -0
  52. package/dist/mcp-server/tools/definitions/search-hepdata.tool.js.map +1 -0
  53. package/dist/mcp-server/tools/definitions/search-literature.tool.d.ts +127 -0
  54. package/dist/mcp-server/tools/definitions/search-literature.tool.d.ts.map +1 -0
  55. package/dist/mcp-server/tools/definitions/search-literature.tool.js +331 -0
  56. package/dist/mcp-server/tools/definitions/search-literature.tool.js.map +1 -0
  57. package/dist/mcp-server/tools/inputs.d.ts +80 -0
  58. package/dist/mcp-server/tools/inputs.d.ts.map +1 -0
  59. package/dist/mcp-server/tools/inputs.js +100 -0
  60. package/dist/mcp-server/tools/inputs.js.map +1 -0
  61. package/dist/services/http/fetch-bounded.d.ts +45 -0
  62. package/dist/services/http/fetch-bounded.d.ts.map +1 -0
  63. package/dist/services/http/fetch-bounded.js +79 -0
  64. package/dist/services/http/fetch-bounded.js.map +1 -0
  65. package/dist/services/inspire/identifiers.d.ts +55 -0
  66. package/dist/services/inspire/identifiers.d.ts.map +1 -0
  67. package/dist/services/inspire/identifiers.js +98 -0
  68. package/dist/services/inspire/identifiers.js.map +1 -0
  69. package/dist/services/inspire/inspire-service.d.ts +104 -0
  70. package/dist/services/inspire/inspire-service.d.ts.map +1 -0
  71. package/dist/services/inspire/inspire-service.js +525 -0
  72. package/dist/services/inspire/inspire-service.js.map +1 -0
  73. package/dist/services/inspire/normalize.d.ts +30 -0
  74. package/dist/services/inspire/normalize.d.ts.map +1 -0
  75. package/dist/services/inspire/normalize.js +438 -0
  76. package/dist/services/inspire/normalize.js.map +1 -0
  77. package/dist/services/inspire/types.d.ts +505 -0
  78. package/dist/services/inspire/types.d.ts.map +1 -0
  79. package/dist/services/inspire/types.js +8 -0
  80. package/dist/services/inspire/types.js.map +1 -0
  81. package/dist/services/inspire/vocabulary.d.ts +22 -0
  82. package/dist/services/inspire/vocabulary.d.ts.map +1 -0
  83. package/dist/services/inspire/vocabulary.js +68 -0
  84. package/dist/services/inspire/vocabulary.js.map +1 -0
  85. package/dist/utils/render.d.ts +40 -0
  86. package/dist/utils/render.d.ts.map +1 -0
  87. package/dist/utils/render.js +112 -0
  88. package/dist/utils/render.js.map +1 -0
  89. package/package.json +112 -0
  90. package/server.json +100 -0
@@ -0,0 +1,79 @@
1
+ /**
2
+ * @fileoverview The single HTTP boundary every upstream service sits on: one
3
+ * request under a per-attempt timeout and the caller's signal, a body read as a
4
+ * stream under a byte ceiling, an accept-list of statuses returned to the caller,
5
+ * and transport failures classified so the retry layer can tell transient from
6
+ * final. Kept apart from any one service so each upstream reuses it.
7
+ * @module services/http/fetch-bounded
8
+ */
9
+ import { serviceUnavailable, timeout } from '@cyanheads/mcp-ts-core/errors';
10
+ import { httpErrorFromResponse } from '@cyanheads/mcp-ts-core/utils';
11
+ /**
12
+ * Fetches `url` once and reads the body under `maxBytes`.
13
+ *
14
+ * - Status on `accept` → `{ status, headers, text }`.
15
+ * - Any other status → the `McpError` `httpErrorFromResponse` classifies (body captured, URL omitted).
16
+ * - Body over `maxBytes` (Content-Length checked first) → `ServiceUnavailable`, `reason: 'upstream_unreadable'`.
17
+ * - Caller signal fired → its reason, rethrown unchanged (never retried).
18
+ * - Per-attempt timeout fired → `Timeout` (retried by the caller's retry layer).
19
+ * - Network failure (`TypeError`, reset, DNS) → `ServiceUnavailable` (retried).
20
+ */
21
+ export async function fetchBounded(url, options) {
22
+ const { service, signal, timeoutMs } = options;
23
+ const clock = new AbortController();
24
+ const timer = setTimeout(() => clock.abort(), timeoutMs);
25
+ const requestSignal = signal ? AbortSignal.any([clock.signal, signal]) : clock.signal;
26
+ /** Classifies a transport-level throw from `fetch` or the body stream. */
27
+ const transportFailure = (err) => {
28
+ if (signal?.aborted)
29
+ throw signal.reason;
30
+ if (clock.signal.aborted) {
31
+ throw timeout(`${service} did not respond within ${timeoutMs} ms.`, { timeoutMs }, { cause: err });
32
+ }
33
+ const detail = err instanceof Error ? err.message : String(err);
34
+ throw serviceUnavailable(`${service} could not be reached: ${detail}`, {}, { cause: err });
35
+ };
36
+ try {
37
+ const response = await (options.fetch ?? fetch)(url, {
38
+ ...(options.headers && { headers: options.headers }),
39
+ redirect: options.redirect ?? 'follow',
40
+ signal: requestSignal,
41
+ }).catch(transportFailure);
42
+ if (!options.accept.includes(response.status)) {
43
+ throw await httpErrorFromResponse(response, { service });
44
+ }
45
+ const text = await readBounded(response, options.maxBytes, service, transportFailure);
46
+ return { status: response.status, headers: response.headers, text };
47
+ }
48
+ finally {
49
+ clearTimeout(timer);
50
+ }
51
+ }
52
+ /** Reads a response body as UTF-8 text, abandoning it once it passes `maxBytes`. */
53
+ async function readBounded(response, maxBytes, service, transportFailure) {
54
+ const tooLarge = () => serviceUnavailable(`${service} returned a response larger than ${maxBytes} bytes; it was abandoned unread.`, { reason: 'upstream_unreadable', maxBytes });
55
+ if (Number(response.headers.get('content-length')) > maxBytes) {
56
+ void response.body?.cancel().catch(() => undefined);
57
+ throw tooLarge();
58
+ }
59
+ if (!response.body)
60
+ return '';
61
+ const reader = response.body.getReader();
62
+ const decoder = new TextDecoder();
63
+ const parts = [];
64
+ let received = 0;
65
+ for (;;) {
66
+ const chunk = await reader.read().catch(transportFailure);
67
+ if (chunk.done)
68
+ break;
69
+ received += chunk.value.byteLength;
70
+ if (received > maxBytes) {
71
+ void reader.cancel().catch(() => undefined);
72
+ throw tooLarge();
73
+ }
74
+ parts.push(decoder.decode(chunk.value, { stream: true }));
75
+ }
76
+ parts.push(decoder.decode());
77
+ return parts.join('');
78
+ }
79
+ //# sourceMappingURL=fetch-bounded.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-bounded.js","sourceRoot":"","sources":["../../../src/services/http/fetch-bounded.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AA6BrE;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,GAAW,EACX,OAA4B;IAE5B,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IAC/C,MAAM,KAAK,GAAG,IAAI,eAAe,EAAE,CAAC;IACpC,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,CAAC,CAAC;IACzD,MAAM,aAAa,GAAG,MAAM,CAAC,C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AAC,KAAK,CAAC,UAAU,CAAC;QACnC,IAAI,QAAQ,GAAG,QAAQ,EAAE,CAAC;YACxB,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;YAC5C,MAAM,QAAQ,EAAE,CAAC;QACnB,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC5D,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC7B,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxB,CAAC"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * @fileoverview Paper and author identifier handling for INSPIRE: the one-to-one
3
+ * normalizations the tool schemas run in their preprocess, the patterns they
4
+ * validate against, and the classification that routes an identifier to the
5
+ * INSPIRE query form that matches it.
6
+ * @module services/inspire/identifiers
7
+ */
8
+ /** How a paper identifier was resolved to an INSPIRE recid. */
9
+ export type PaperIdKind = 'recid' | 'arxiv' | 'doi';
10
+ /** A normalized paper identifier: recid, new or old arXiv ID, or DOI without `*` or `?`. */
11
+ export declare const PAPER_ID_PATTERN: RegExp;
12
+ /**
13
+ * Reduces the accepted spellings of a paper identifier to its bare form: trims,
14
+ * maps arxiv.org, doi.org, inspirehep.net literature, and hepdata.net record URLs
15
+ * to the identifier they carry, strips `arXiv:` / `doi:` prefixes (and any space after them) and HEPData's
16
+ * `ins` prefix, lower-cases an old-style arXiv archive (`HEP-TH/9711200` →
17
+ * `hep-th/9711200`, the subject class of `math.AG/0601001` kept as written), and
18
+ * drops an arXiv version suffix (INSPIRE matches `1207.7214`, not `1207.7214v2`).
19
+ * Every mapping is one-to-one; anything else passes through for the pattern
20
+ * check to reject.
21
+ */
22
+ export declare function normalizePaperId(raw: string): string;
23
+ /** Classifies a normalized paper identifier; `undefined` when it matches no form. */
24
+ export declare function classifyPaperId(id: string): PaperIdKind | undefined;
25
+ /**
26
+ * The form an arXiv ID or DOI is compared in when checking that a record carries
27
+ * the identifier asked for: lower-cased; an old-style arXiv subject class dropped
28
+ * (`math.AG/0601001` is `math/0601001`, the class is not part of the ID); and a
29
+ * DOI's trailing prose punctuation dropped (`.`, `,`, `;`, `:`, `)`, `]`), which
30
+ * INSPIRE's `doi:` match also passes over.
31
+ */
32
+ export declare function paperIdKey(kind: Exclude<PaperIdKind, 'recid'>, id: string): string;
33
+ /** How an author query was routed: one of the identifier forms, or a free-text name. */
34
+ export type AuthorMatch = 'orcid' | 'inspire_id' | 'bai' | 'recid' | 'name';
35
+ /**
36
+ * Normalizes an author identifier: trims, reduces an orcid.org URL to the bare iD,
37
+ * upper-cases an ORCID checksum `x`, and upper-cases an `inspire-` prefix. BAIs
38
+ * are left as written — their case is part of the identifier.
39
+ */
40
+ export declare function normalizeAuthorId(raw: string): string;
41
+ /** An author query routed to the INSPIRE `/authors` query string that matches it. */
42
+ export interface AuthorRoute {
43
+ matchedAs: AuthorMatch;
44
+ /** The `q` value sent to `/api/authors`. */
45
+ q: string;
46
+ }
47
+ /**
48
+ * Routes a normalized author query, first match wins: ORCID, INSPIRE ID, and BAI
49
+ * → `ids.value:<id>` (exact, case-sensitive); a recid → `control_number:<n>`;
50
+ * anything else is a free-text name sent as written.
51
+ */
52
+ export declare function routeAuthorQuery(query: string): AuthorRoute;
53
+ /** True when the text carries an ORCID-shaped token (literature queries never match one). */
54
+ export declare function containsOrcid(text: string): boolean;
55
+ //# sourceMappingURL=identifiers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identifiers.d.ts","sourceRoot":"","sources":["../../../src/services/inspire/identifiers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,+DAA+D;AAC/D,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,CAAC;AAQpD,4FAA4F;AAC5F,eAAO,MAAM,gBAAgB,QACuD,CAAC;AAErF;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAqBpD;AAED,qFAAqF;AACrF,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAKnE;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAKlF;AAED,wFAAwF;AACxF,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,YAAY,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,CAAC;AAM5E;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAKrD;AAED,qFAAqF;AACrF,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,WAAW,CAAC;IACvB,4CAA4C;IAC5C,CAAC,EAAE,MAAM,CAAC;CACX;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CAM3D;AAED,6FAA6F;AAC7F,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnD"}
@@ -0,0 +1,98 @@
1
+ /**
2
+ * @fileoverview Paper and author identifier handling for INSPIRE: the one-to-one
3
+ * normalizations the tool schemas run in their preprocess, the patterns they
4
+ * validate against, and the classification that routes an identifier to the
5
+ * INSPIRE query form that matches it.
6
+ * @module services/inspire/identifiers
7
+ */
8
+ const RECID = /^\d{1,9}$/;
9
+ const NEW_ARXIV = /^\d{4}\.\d{4,5}$/;
10
+ const OLD_ARXIV = /^[a-z-]+(?:\.[A-Z]{2})?\/\d{7}$/;
11
+ /** A DOI; `*` and `?` are refused, since INSPIRE reads them in a `doi:` clause as wildcards. */
12
+ const DOI = /^10\.\d{4,9}\/[^\s*?]+$/;
13
+ /** A normalized paper identifier: recid, new or old arXiv ID, or DOI without `*` or `?`. */
14
+ export const PAPER_ID_PATTERN = /^(?:\d{1,9}|\d{4}\.\d{4,5}|[a-z-]+(?:\.[A-Z]{2})?\/\d{7}|10\.\d{4,9}\/[^\s*?]+)$/;
15
+ /**
16
+ * Reduces the accepted spellings of a paper identifier to its bare form: trims,
17
+ * maps arxiv.org, doi.org, inspirehep.net literature, and hepdata.net record URLs
18
+ * to the identifier they carry, strips `arXiv:` / `doi:` prefixes (and any space after them) and HEPData's
19
+ * `ins` prefix, lower-cases an old-style arXiv archive (`HEP-TH/9711200` →
20
+ * `hep-th/9711200`, the subject class of `math.AG/0601001` kept as written), and
21
+ * drops an arXiv version suffix (INSPIRE matches `1207.7214`, not `1207.7214v2`).
22
+ * Every mapping is one-to-one; anything else passes through for the pattern
23
+ * check to reject.
24
+ */
25
+ export function normalizePaperId(raw) {
26
+ let id = raw.trim();
27
+ id = id.replace(/^https?:\/\/(?:www\.|export\.)?arxiv\.org\/(?:abs|pdf)\/(.+?)(?:\.pdf)?\/?$/i, '$1');
28
+ id = id.replace(/^arxiv:\s*/i, '');
29
+ id = id.replace(/^doi:\s*/i, '');
30
+ id = id.replace(/^https?:\/\/(?:dx\.)?doi\.org\//i, '');
31
+ id = id.replace(/^https?:\/\/(?:www\.)?inspirehep\.net\/(?:api\/)?literature\/(\d+)\/?(?:[?#].*)?$/i, '$1');
32
+ id = id.replace(/^https?:\/\/(?:www\.)?hepdata\.net\/record\/ins(\d+)\/?(?:[?#].*)?$/i, '$1');
33
+ id = id.replace(/^ins(\d+)$/i, '$1');
34
+ id = id.replace(/^[A-Za-z-]+(?=(?:\.[A-Za-z]{2})?\/\d{7}(?:v\d+)?$)/, (archive) => archive.toLowerCase());
35
+ id = id.replace(/^(\d{4}\.\d{4,5})v\d+$/, '$1');
36
+ id = id.replace(/^([a-z-]+(?:\.[A-Z]{2})?\/\d{7})v\d+$/, '$1');
37
+ return id;
38
+ }
39
+ /** Classifies a normalized paper identifier; `undefined` when it matches no form. */
40
+ export function classifyPaperId(id) {
41
+ if (RECID.test(id))
42
+ return 'recid';
43
+ if (NEW_ARXIV.test(id) || OLD_ARXIV.test(id))
44
+ return 'arxiv';
45
+ if (DOI.test(id))
46
+ return 'doi';
47
+ return;
48
+ }
49
+ /**
50
+ * The form an arXiv ID or DOI is compared in when checking that a record carries
51
+ * the identifier asked for: lower-cased; an old-style arXiv subject class dropped
52
+ * (`math.AG/0601001` is `math/0601001`, the class is not part of the ID); and a
53
+ * DOI's trailing prose punctuation dropped (`.`, `,`, `;`, `:`, `)`, `]`), which
54
+ * INSPIRE's `doi:` match also passes over.
55
+ */
56
+ export function paperIdKey(kind, id) {
57
+ const lower = id.toLowerCase();
58
+ return kind === 'arxiv'
59
+ ? lower.replace(/^([a-z-]+)\.[a-z]{2}(?=\/)/, '$1')
60
+ : lower.replace(/[.,;:)\]]+$/, '');
61
+ }
62
+ const ORCID = /^\d{4}-\d{4}-\d{4}-\d{3}[\dX]$/;
63
+ const INSPIRE_ID = /^INSPIRE-\d{8}$/;
64
+ const BAI = /^[A-Za-z][A-Za-z'-]*(?:\.[A-Za-z'-]+)*\.\d+$/;
65
+ /**
66
+ * Normalizes an author identifier: trims, reduces an orcid.org URL to the bare iD,
67
+ * upper-cases an ORCID checksum `x`, and upper-cases an `inspire-` prefix. BAIs
68
+ * are left as written — their case is part of the identifier.
69
+ */
70
+ export function normalizeAuthorId(raw) {
71
+ let id = raw.trim().replace(/^https?:\/\/(?:www\.)?orcid\.org\/(\S+?)\/?$/i, '$1');
72
+ if (/^\d{4}-\d{4}-\d{4}-\d{3}x$/.test(id))
73
+ id = `${id.slice(0, -1)}X`;
74
+ if (/^inspire-\d{8}$/i.test(id))
75
+ id = `INSPIRE-${id.slice(8)}`;
76
+ return id;
77
+ }
78
+ /**
79
+ * Routes a normalized author query, first match wins: ORCID, INSPIRE ID, and BAI
80
+ * → `ids.value:<id>` (exact, case-sensitive); a recid → `control_number:<n>`;
81
+ * anything else is a free-text name sent as written.
82
+ */
83
+ export function routeAuthorQuery(query) {
84
+ if (ORCID.test(query))
85
+ return { matchedAs: 'orcid', q: `ids.value:${query}` };
86
+ if (INSPIRE_ID.test(query))
87
+ return { matchedAs: 'inspire_id', q: `ids.value:${query}` };
88
+ if (BAI.test(query))
89
+ return { matchedAs: 'bai', q: `ids.value:${query}` };
90
+ if (RECID.test(query))
91
+ return { matchedAs: 'recid', q: `control_number:${query}` };
92
+ return { matchedAs: 'name', q: query };
93
+ }
94
+ /** True when the text carries an ORCID-shaped token (literature queries never match one). */
95
+ export function containsOrcid(text) {
96
+ return /(?:^|[^\d])\d{4}-\d{4}-\d{4}-\d{3}[\dXx](?![\d])/.test(text);
97
+ }
98
+ //# sourceMappingURL=identifiers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identifiers.js","sourceRoot":"","sources":["../../../src/services/inspire/identifiers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,MAAM,KAAK,GAAG,WAAW,CAAC;AAC1B,MAAM,SAAS,GAAG,kBAAkB,CAAC;AACrC,MAAM,SAAS,GAAG,iCAAiC,CAAC;AACpD,gGAAgG;AAChG,MAAM,GAAG,GAAG,yBAAyB,CAAC;AAEtC,4FAA4F;AAC5F,MAAM,CAAC,MAAM,gBAAgB,GAC3B,kFAAkF,CAAC;AAErF;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAW;IAC1C,IAAI,EAAE,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IACpB,EAAE,GAAG,EAAE,CAAC,OAAO,CACb,8EAA8E,EAC9E,IAAI,CACL,CAAC;IACF,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;IACnC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IACjC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,kCAAkC,EAAE,EAAE,CAAC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IACxC,OAAO,kDAAkD,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACvE,CAAC"}
@@ -0,0 +1,104 @@
1
+ /**
2
+ * @fileoverview InspireService — every INSPIRE-HEP read the tools and the
3
+ * literature resource make. One outbound pacer (INSPIRE allows 15 requests per
4
+ * 5 s per IP), a retry boundary around fetch + parse, one 55 s budget per tool
5
+ * call threaded through every request in that call, an 8 MiB byte ceiling, and a
6
+ * strict query-parameter allowlist (INSPIRE silently ignores unknown parameters).
7
+ * @module services/inspire/inspire-service
8
+ */
9
+ import type { Context } from '@cyanheads/mcp-ts-core';
10
+ import type { AppConfig } from '@cyanheads/mcp-ts-core/config';
11
+ import { type Pacer } from '@cyanheads/mcp-ts-core/utils';
12
+ import { type AuthorRoute } from './identifiers.js';
13
+ import type { AuthorSearchPage, CitationExport, CitationExportParams, CitationSummary, CitationSummaryParams, ExperimentSearchPage, HepdataAvailability, HepdataSearchPage, HepdataSearchParams, LiteratureSearchPage, LiteratureSearchParams, PaperLookup, ResolvedAuthor, ResolvedPaper } from './types.js';
14
+ /** One budget per tool call, inside a 60 s client timeout. */
15
+ export declare const CALL_BUDGET_MS = 55000;
16
+ /** One tool call's view of INSPIRE: its context and the deadline every request in it shares. */
17
+ export interface InspireCall {
18
+ readonly ctx: Context;
19
+ /** Epoch ms after which no request in this call may run. */
20
+ readonly deadline: number;
21
+ }
22
+ /** Constructor options; `fetch` and `pacer` are the test seams. */
23
+ export interface InspireServiceOptions {
24
+ fetch?: typeof fetch;
25
+ pacer?: Pacer;
26
+ /** The server version, carried in the User-Agent. */
27
+ version: string;
28
+ }
29
+ /** HTTP client for INSPIRE-HEP's search endpoints. */
30
+ export declare class InspireService {
31
+ private readonly fetchImpl;
32
+ private readonly pacer;
33
+ private readonly userAgent;
34
+ constructor(options: InspireServiceOptions);
35
+ /** Opens one tool call's budget; pass the result to every method the call makes. */
36
+ beginCall(ctx: Context, budgetMs?: number): InspireCall;
37
+ /** Releases the pacer's timer and rejects queued waiters. */
38
+ dispose(): void;
39
+ /** One page of literature search results. */
40
+ searchLiterature(params: LiteratureSearchParams, call: InspireCall): Promise<LiteratureSearchPage>;
41
+ /**
42
+ * Resolves a paper identifier (any form the `paper` input accepts) to a recid.
43
+ * A recid is returned as-is without a request; an arXiv ID or DOI is looked up,
44
+ * and only a hit that carries that identifier itself (with a readable recid)
45
+ * counts, never whatever INSPIRE ranked first. `undefined` when no hit does.
46
+ */
47
+ resolvePaper(paper: string, call: InspireCall): Promise<ResolvedPaper | undefined>;
48
+ /**
49
+ * The `get_paper` dossier: resolves the identifier, then reads the record and
50
+ * its HEPData availability in parallel. `undefined` when the identifier matches
51
+ * no record. A failed availability lookup degrades to `hepdata.status:
52
+ * 'lookup_failed'` — except a cancelled call or an input-class rejection, which
53
+ * rethrow — unless `requireHepdata` is set, when it throws its own error once the
54
+ * record is known to exist. Any failure of the resolve or the record read throws.
55
+ */
56
+ getPaper(paper: string, maxAuthors: number, call: InspireCall, options?: {
57
+ requireHepdata?: boolean;
58
+ }): Promise<PaperLookup | undefined>;
59
+ /** HEPData availability for one paper recid, from INSPIRE's `data` collection. */
60
+ getHepdataAvailability(recid: string, call: InspireCall): Promise<HepdataAvailability>;
61
+ private degradeAvailability;
62
+ /**
63
+ * INSPIRE's citation entries for a literature query. Requests `size + 1`
64
+ * entries; `truncated` is true when the extra one came back. Zero matches is an
65
+ * empty body and an empty `entries`.
66
+ */
67
+ exportCitations(params: CitationExportParams, call: InspireCall): Promise<CitationExport>;
68
+ /**
69
+ * Author profiles for a name or identifier (normalize it with
70
+ * `normalizeAuthorId` first). Identifiers route to exact `ids.value:` /
71
+ * `control_number:` queries, anything else to free text. Profiles marked
72
+ * deleted are dropped and counted in `deletedDropped`.
73
+ */
74
+ searchAuthors(query: string, limit: number, call: InspireCall): Promise<AuthorSearchPage>;
75
+ /**
76
+ * Resolves a routed author identifier (`routeAuthorQuery`, never a `name`
77
+ * route) to the profile's recid and name. `undefined` when no profile matches.
78
+ */
79
+ resolveAuthor(route: AuthorRoute, call: InspireCall): Promise<ResolvedAuthor | undefined>;
80
+ /** INSPIRE's citation summary for a literature query under the given facet filters. */
81
+ getCitationSummary(params: CitationSummaryParams, call: InspireCall): Promise<CitationSummary>;
82
+ /**
83
+ * Experiments, collaborations, and facilities by free text; a query of digits
84
+ * only is a recid (`control_number:<n>` — digits as free text match nothing).
85
+ */
86
+ searchExperiments(query: string, limit: number, call: InspireCall): Promise<ExperimentSearchPage>;
87
+ /** One page of HEPData records from INSPIRE's `data` collection. */
88
+ searchHepdata(params: HepdataSearchParams, call: InspireCall): Promise<HepdataSearchPage>;
89
+ /**
90
+ * One INSPIRE request inside the call's budget: retry (outside) around the
91
+ * pacer (inside) around fetch + status mapping, with `parse` inside the retry
92
+ * so an unreadable body is retried like a failed fetch.
93
+ */
94
+ private send;
95
+ /** One HTTP exchange; maps INSPIRE's 400 and 429 onto the shared contract reasons. */
96
+ private exchange;
97
+ }
98
+ /** Constructs the service; called from `createApp`'s `setup()`. */
99
+ export declare function initInspireService(config: AppConfig): void;
100
+ /** The initialized service. Throws when `initInspireService()` has not run. */
101
+ export declare function getInspireService(): InspireService;
102
+ /** Disposes the service's pacer; called from `createApp`'s `teardown()`. */
103
+ export declare function disposeInspireService(): void;
104
+ //# sourceMappingURL=inspire-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspire-service.d.ts","sourceRoot":"","sources":["../../../src/services/inspire/inspire-service.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAU/D,OAAO,EAAe,KAAK,KAAK,EAAa,MAAM,8BAA8B,CAAC;AAGlF,OAAO,EACL,KAAK,WAAW,EAKjB,MAAM,kBAAkB,CAAC;AAY1B,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,eAAe,EAC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