@ansvar/romanian-law-mcp 1.0.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.
Files changed (140) hide show
  1. package/LICENSE +110 -0
  2. package/README.md +111 -0
  3. package/dist/__tests__/contract/golden.test.d.ts +2 -0
  4. package/dist/__tests__/contract/golden.test.d.ts.map +1 -0
  5. package/dist/__tests__/contract/golden.test.js +216 -0
  6. package/dist/__tests__/contract/golden.test.js.map +1 -0
  7. package/dist/__tests__/unit/tools-coverage.test.d.ts +2 -0
  8. package/dist/__tests__/unit/tools-coverage.test.d.ts.map +1 -0
  9. package/dist/__tests__/unit/tools-coverage.test.js +695 -0
  10. package/dist/__tests__/unit/tools-coverage.test.js.map +1 -0
  11. package/dist/api/health.d.ts +3 -0
  12. package/dist/api/health.d.ts.map +1 -0
  13. package/dist/api/health.js +101 -0
  14. package/dist/api/health.js.map +1 -0
  15. package/dist/api/mcp.d.ts +3 -0
  16. package/dist/api/mcp.d.ts.map +1 -0
  17. package/dist/api/mcp.js +119 -0
  18. package/dist/api/mcp.js.map +1 -0
  19. package/dist/scripts/audit-ingestion.d.ts +13 -0
  20. package/dist/scripts/audit-ingestion.d.ts.map +1 -0
  21. package/dist/scripts/audit-ingestion.js +192 -0
  22. package/dist/scripts/audit-ingestion.js.map +1 -0
  23. package/dist/scripts/build-db.d.ts +11 -0
  24. package/dist/scripts/build-db.d.ts.map +1 -0
  25. package/dist/scripts/build-db.js +386 -0
  26. package/dist/scripts/build-db.js.map +1 -0
  27. package/dist/scripts/drift-detect.d.ts +9 -0
  28. package/dist/scripts/drift-detect.d.ts.map +1 -0
  29. package/dist/scripts/drift-detect.js +62 -0
  30. package/dist/scripts/drift-detect.js.map +1 -0
  31. package/dist/scripts/ingest-full-laws.d.ts +14 -0
  32. package/dist/scripts/ingest-full-laws.d.ts.map +1 -0
  33. package/dist/scripts/ingest-full-laws.js +439 -0
  34. package/dist/scripts/ingest-full-laws.js.map +1 -0
  35. package/dist/scripts/ingest-indexed-laws.d.ts +10 -0
  36. package/dist/scripts/ingest-indexed-laws.d.ts.map +1 -0
  37. package/dist/scripts/ingest-indexed-laws.js +377 -0
  38. package/dist/scripts/ingest-indexed-laws.js.map +1 -0
  39. package/dist/scripts/ingest.d.ts +9 -0
  40. package/dist/scripts/ingest.d.ts.map +1 -0
  41. package/dist/scripts/ingest.js +151 -0
  42. package/dist/scripts/ingest.js.map +1 -0
  43. package/dist/scripts/lib/fetcher.d.ts +18 -0
  44. package/dist/scripts/lib/fetcher.d.ts.map +1 -0
  45. package/dist/scripts/lib/fetcher.js +53 -0
  46. package/dist/scripts/lib/fetcher.js.map +1 -0
  47. package/dist/scripts/lib/parser.d.ts +38 -0
  48. package/dist/scripts/lib/parser.d.ts.map +1 -0
  49. package/dist/scripts/lib/parser.js +470 -0
  50. package/dist/scripts/lib/parser.js.map +1 -0
  51. package/dist/scripts/verify-source-parity.d.ts +8 -0
  52. package/dist/scripts/verify-source-parity.d.ts.map +1 -0
  53. package/dist/scripts/verify-source-parity.js +84 -0
  54. package/dist/scripts/verify-source-parity.js.map +1 -0
  55. package/dist/src/capabilities.d.ts +16 -0
  56. package/dist/src/capabilities.d.ts.map +1 -0
  57. package/dist/src/capabilities.js +43 -0
  58. package/dist/src/capabilities.js.map +1 -0
  59. package/dist/src/constants.d.ts +7 -0
  60. package/dist/src/constants.d.ts.map +1 -0
  61. package/dist/src/constants.js +7 -0
  62. package/dist/src/constants.js.map +1 -0
  63. package/dist/src/index.d.ts +8 -0
  64. package/dist/src/index.d.ts.map +1 -0
  65. package/dist/src/index.js +80 -0
  66. package/dist/src/index.js.map +1 -0
  67. package/dist/src/tools/about.d.ts +45 -0
  68. package/dist/src/tools/about.d.ts.map +1 -0
  69. package/dist/src/tools/about.js +54 -0
  70. package/dist/src/tools/about.js.map +1 -0
  71. package/dist/src/tools/build-legal-stance.d.ts +21 -0
  72. package/dist/src/tools/build-legal-stance.d.ts.map +1 -0
  73. package/dist/src/tools/build-legal-stance.js +46 -0
  74. package/dist/src/tools/build-legal-stance.js.map +1 -0
  75. package/dist/src/tools/check-currency.d.ts +20 -0
  76. package/dist/src/tools/check-currency.d.ts.map +1 -0
  77. package/dist/src/tools/check-currency.js +41 -0
  78. package/dist/src/tools/check-currency.js.map +1 -0
  79. package/dist/src/tools/format-citation.d.ts +14 -0
  80. package/dist/src/tools/format-citation.d.ts.map +1 -0
  81. package/dist/src/tools/format-citation.js +28 -0
  82. package/dist/src/tools/format-citation.js.map +1 -0
  83. package/dist/src/tools/get-eu-basis.d.ts +21 -0
  84. package/dist/src/tools/get-eu-basis.d.ts.map +1 -0
  85. package/dist/src/tools/get-eu-basis.js +52 -0
  86. package/dist/src/tools/get-eu-basis.js.map +1 -0
  87. package/dist/src/tools/get-provision-eu-basis.d.ts +20 -0
  88. package/dist/src/tools/get-provision-eu-basis.d.ts.map +1 -0
  89. package/dist/src/tools/get-provision-eu-basis.js +45 -0
  90. package/dist/src/tools/get-provision-eu-basis.js.map +1 -0
  91. package/dist/src/tools/get-provision.d.ts +24 -0
  92. package/dist/src/tools/get-provision.d.ts.map +1 -0
  93. package/dist/src/tools/get-provision.js +80 -0
  94. package/dist/src/tools/get-provision.js.map +1 -0
  95. package/dist/src/tools/get-romanian-implementations.d.ts +21 -0
  96. package/dist/src/tools/get-romanian-implementations.d.ts.map +1 -0
  97. package/dist/src/tools/get-romanian-implementations.js +42 -0
  98. package/dist/src/tools/get-romanian-implementations.js.map +1 -0
  99. package/dist/src/tools/list-sources.d.ts +25 -0
  100. package/dist/src/tools/list-sources.d.ts.map +1 -0
  101. package/dist/src/tools/list-sources.js +42 -0
  102. package/dist/src/tools/list-sources.js.map +1 -0
  103. package/dist/src/tools/registry.d.ts +13 -0
  104. package/dist/src/tools/registry.d.ts.map +1 -0
  105. package/dist/src/tools/registry.js +365 -0
  106. package/dist/src/tools/registry.js.map +1 -0
  107. package/dist/src/tools/search-eu-implementations.d.ts +24 -0
  108. package/dist/src/tools/search-eu-implementations.d.ts.map +1 -0
  109. package/dist/src/tools/search-eu-implementations.js +58 -0
  110. package/dist/src/tools/search-eu-implementations.js.map +1 -0
  111. package/dist/src/tools/search-legislation.d.ts +24 -0
  112. package/dist/src/tools/search-legislation.d.ts.map +1 -0
  113. package/dist/src/tools/search-legislation.js +54 -0
  114. package/dist/src/tools/search-legislation.js.map +1 -0
  115. package/dist/src/tools/validate-citation.d.ts +20 -0
  116. package/dist/src/tools/validate-citation.d.ts.map +1 -0
  117. package/dist/src/tools/validate-citation.js +109 -0
  118. package/dist/src/tools/validate-citation.js.map +1 -0
  119. package/dist/src/tools/validate-eu-compliance.d.ts +20 -0
  120. package/dist/src/tools/validate-eu-compliance.d.ts.map +1 -0
  121. package/dist/src/tools/validate-eu-compliance.js +98 -0
  122. package/dist/src/tools/validate-eu-compliance.js.map +1 -0
  123. package/dist/src/utils/as-of-date.d.ts +9 -0
  124. package/dist/src/utils/as-of-date.d.ts.map +1 -0
  125. package/dist/src/utils/as-of-date.js +25 -0
  126. package/dist/src/utils/as-of-date.js.map +1 -0
  127. package/dist/src/utils/fts-query.d.ts +19 -0
  128. package/dist/src/utils/fts-query.d.ts.map +1 -0
  129. package/dist/src/utils/fts-query.js +45 -0
  130. package/dist/src/utils/fts-query.js.map +1 -0
  131. package/dist/src/utils/metadata.d.ts +16 -0
  132. package/dist/src/utils/metadata.d.ts.map +1 -0
  133. package/dist/src/utils/metadata.js +23 -0
  134. package/dist/src/utils/metadata.js.map +1 -0
  135. package/dist/src/utils/statute-id.d.ts +18 -0
  136. package/dist/src/utils/statute-id.d.ts.map +1 -0
  137. package/dist/src/utils/statute-id.js +34 -0
  138. package/dist/src/utils/statute-id.js.map +1 -0
  139. package/package.json +81 -0
  140. package/server.json +31 -0
package/LICENSE ADDED
@@ -0,0 +1,110 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work.
38
+
39
+ "Derivative Works" shall mean any work, whether in Source or Object
40
+ form, that is based on (or derived from) the Work and for which the
41
+ editorial revisions, annotations, elaborations, or other modifications
42
+ represent, as a whole, an original work of authorship.
43
+
44
+ "Contribution" shall mean any work of authorship, including
45
+ the original version of the Work and any modifications or additions
46
+ to that Work or Derivative Works thereof, that is intentionally
47
+ submitted to the Licensor for inclusion in the Work by the copyright owner
48
+ or by an individual or Legal Entity authorized to submit on behalf of
49
+ the copyright owner.
50
+
51
+ "Contributor" shall mean Licensor and any individual or Legal Entity
52
+ on behalf of whom a Contribution has been received by the Licensor and
53
+ subsequently incorporated within the Work.
54
+
55
+ 2. Grant of Copyright License. Subject to the terms and conditions of
56
+ this License, each Contributor hereby grants to You a perpetual,
57
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
58
+ copyright license to reproduce, prepare Derivative Works of,
59
+ publicly display, publicly perform, sublicense, and distribute the
60
+ Work and such Derivative Works in Source or Object form.
61
+
62
+ 3. Grant of Patent License. Subject to the terms and conditions of
63
+ this License, each Contributor hereby grants to You a perpetual,
64
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
65
+ (except as stated in this section) patent license to make, have made,
66
+ use, offer to sell, sell, import, and otherwise transfer the Work.
67
+
68
+ 4. Redistribution. You may reproduce and distribute copies of the
69
+ Work or Derivative Works thereof in any medium, with or without
70
+ modifications, and in Source or Object form, provided that You
71
+ meet the following conditions:
72
+
73
+ (a) You must give any other recipients of the Work or
74
+ Derivative Works a copy of this License; and
75
+
76
+ (b) You must cause any modified files to carry prominent notices
77
+ stating that You changed the files; and
78
+
79
+ (c) You must retain, in the Source form of any Derivative Works
80
+ that You distribute, all copyright, patent, trademark, and
81
+ attribution notices from the Source form of the Work; and
82
+
83
+ (d) If the Work includes a "NOTICE" text file, You must include
84
+ a readable copy of the attribution notices contained
85
+ within such NOTICE file.
86
+
87
+ 5. Submission of Contributions.
88
+
89
+ 6. Trademarks. This License does not grant permission to use the trade
90
+ names, trademarks, service marks, or product names of the Licensor.
91
+
92
+ 7. Disclaimer of Warranty.
93
+
94
+ 8. Limitation of Liability.
95
+
96
+ 9. Accepting Warranty or Additional Liability.
97
+
98
+ Copyright 2024 Ansvar Systems AB
99
+
100
+ Licensed under the Apache License, Version 2.0 (the "License");
101
+ you may not use this file except in compliance with the License.
102
+ You may obtain a copy of the License at
103
+
104
+ http://www.apache.org/licenses/LICENSE-2.0
105
+
106
+ Unless required by applicable law or agreed to in writing, software
107
+ distributed under the License is distributed on an "AS IS" BASIS,
108
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
109
+ See the License for the specific language governing permissions and
110
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,111 @@
1
+ # Romanian Law MCP
2
+
3
+ [![npm](https://img.shields.io/npm/v/@ansvar/romanian-law-mcp)](https://www.npmjs.com/package/@ansvar/romanian-law-mcp)
4
+ [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
5
+ [![CI](https://github.com/Ansvar-Systems/Romanian-law-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/Ansvar-Systems/Romanian-law-mcp/actions/workflows/ci.yml)
6
+
7
+ A Model Context Protocol (MCP) server providing access to Romanian legislation covering data protection, cybersecurity, e-commerce, and criminal law provisions.
8
+
9
+ **MCP Registry:** `eu.ansvar/romanian-law-mcp`
10
+ **npm:** `@ansvar/romanian-law-mcp`
11
+
12
+ ## Quick Start
13
+
14
+ ### Claude Desktop / Cursor (stdio)
15
+
16
+ ```json
17
+ {
18
+ "mcpServers": {
19
+ "romanian-law": {
20
+ "command": "npx",
21
+ "args": ["-y", "@ansvar/romanian-law-mcp"]
22
+ }
23
+ }
24
+ }
25
+ ```
26
+
27
+ ### Remote (Streamable HTTP)
28
+
29
+ ```
30
+ romanian-law-mcp.vercel.app/mcp
31
+ ```
32
+
33
+ ## Data Sources
34
+
35
+ | Source | Authority | License |
36
+ |--------|-----------|---------|
37
+ | [Legislatie.just.ro](https://legislatie.just.ro) | Ministerul Justiției (Ministry of Justice of Romania) | Romanian Government Open Data (public domain under Romanian Copyright Law Art. 9) |
38
+
39
+ > Full provenance: [`sources.yml`](./sources.yml)
40
+
41
+ ## Tools
42
+
43
+ | Tool | Description |
44
+ |------|-------------|
45
+ | `search_legislation` | Full-text search across provisions |
46
+ | `get_provision` | Retrieve specific article/section |
47
+ | `validate_citation` | Validate legal citation |
48
+ | `check_currency` | Check if statute is in force |
49
+ | `get_eu_basis` | EU legal basis cross-references |
50
+ | `get_romanian_implementations` | National EU implementations |
51
+ | `search_eu_implementations` | Search EU documents |
52
+ | `validate_eu_compliance` | EU compliance check |
53
+ | `build_legal_stance` | Comprehensive legal research |
54
+ | `format_citation` | Citation formatting |
55
+ | `list_sources` | Data provenance |
56
+ | `about` | Server metadata |
57
+
58
+ ## License
59
+
60
+ Apache-2.0
61
+
62
+
63
+ ---
64
+
65
+ ## Important Disclaimers
66
+
67
+ ### Not Legal Advice
68
+
69
+ > **THIS TOOL IS NOT LEGAL ADVICE**
70
+ >
71
+ > Statute text is sourced from official government publications. However:
72
+ > - This is a **research tool**, not a substitute for professional legal counsel
73
+ > - **Coverage may be incomplete** — verify critical provisions against primary sources
74
+ > - **Verify all citations** against the official legal portal before relying on them professionally
75
+ > - Laws change — check the `about` tool for database freshness date
76
+
77
+ ### Client Confidentiality
78
+
79
+ When using the remote endpoint, queries are processed by third-party infrastructure
80
+ (Vercel, Claude API). For privileged or confidential legal matters, use the local
81
+ npm package or on-premise deployment.
82
+
83
+ **Before using professionally, read:** [DISCLAIMER.md](DISCLAIMER.md) | [PRIVACY.md](PRIVACY.md)
84
+
85
+ ---
86
+
87
+ ## Open Law
88
+
89
+ This server is part of **Ansvar Open Law** — free, structured access to legislation
90
+ from 70+ jurisdictions worldwide via the Model Context Protocol.
91
+
92
+ **Browse all jurisdictions ->** [ansvar.eu/open-law](https://ansvar.eu/open-law)
93
+
94
+ ## Ansvar MCP Network
95
+
96
+ Ansvar Open Law is part of the broader **Ansvar MCP Network** — 80+ servers covering
97
+ global legislation, EU/US compliance frameworks, and cybersecurity standards.
98
+
99
+ | Category | Coverage |
100
+ |----------|----------|
101
+ | **Legislation** | 70+ jurisdictions worldwide |
102
+ | **EU Compliance** | 49 regulations, 2,693 articles |
103
+ | **US Compliance** | 15 federal & state regulations |
104
+ | **Security Frameworks** | 261 frameworks, 1,451 controls |
105
+ | **Cybersecurity** | 200K+ CVEs, STRIDE patterns, sanctions |
106
+
107
+ **Explore the full network ->** [ansvar.ai/mcp](https://ansvar.ai/mcp)
108
+
109
+ ---
110
+
111
+ Built by [Ansvar Systems](https://ansvar.eu) | [ansvar.eu/open-law](https://ansvar.eu/open-law)
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=golden.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"golden.test.d.ts","sourceRoot":"","sources":["../../../__tests__/contract/golden.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,216 @@
1
+ import { describe, it, expect, beforeAll, afterAll } from 'vitest';
2
+ import { createHash } from 'node:crypto';
3
+ import { existsSync, readFileSync, rmdirSync, rmSync } from 'node:fs';
4
+ import { fileURLToPath } from 'node:url';
5
+ import { dirname, join } from 'node:path';
6
+ import { Client } from '@modelcontextprotocol/sdk/client/index.js';
7
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
8
+ import { InMemoryTransport } from '@modelcontextprotocol/sdk/inMemory.js';
9
+ import Database from '@ansvar/mcp-sqlite';
10
+ import { registerTools } from '../../src/tools/registry.js';
11
+ const __dirname = dirname(fileURLToPath(import.meta.url));
12
+ function normalizeText(text) {
13
+ return text.replace(/\s+/g, ' ').replace(/[\r\n]+/g, ' ').trim().toLowerCase();
14
+ }
15
+ function sha256(text) {
16
+ return createHash('sha256').update(normalizeText(text)).digest('hex');
17
+ }
18
+ function extractCitationUrls(data) {
19
+ const urls = [];
20
+ const text = JSON.stringify(data);
21
+ const urlRegex = /https?:\/\/[^\s"'<>]+/g;
22
+ let match;
23
+ while ((match = urlRegex.exec(text)) !== null) {
24
+ urls.push(match[0]);
25
+ }
26
+ return urls;
27
+ }
28
+ async function fetchWithTimeout(url, timeoutMs = 10_000) {
29
+ const controller = new AbortController();
30
+ const timer = setTimeout(() => controller.abort(), timeoutMs);
31
+ try {
32
+ return await fetch(url, { signal: controller.signal });
33
+ }
34
+ finally {
35
+ clearTimeout(timer);
36
+ }
37
+ }
38
+ function stringifyData(data) {
39
+ if (typeof data === 'string')
40
+ return data;
41
+ return JSON.stringify(data, null, 0) ?? '';
42
+ }
43
+ async function callTool(mcpClient, name, args) {
44
+ try {
45
+ const result = await mcpClient.callTool({ name, arguments: args });
46
+ const content = result.content;
47
+ const text = content?.[0]?.text ?? '';
48
+ if (result.isError) {
49
+ return { tool: name, ok: false, error: { code: 'TOOL_ERROR', message: text } };
50
+ }
51
+ try {
52
+ const data = JSON.parse(text);
53
+ return { tool: name, ok: true, data };
54
+ }
55
+ catch {
56
+ return { tool: name, ok: true, data: text };
57
+ }
58
+ }
59
+ catch (err) {
60
+ return {
61
+ tool: name,
62
+ ok: false,
63
+ error: { code: 'CALL_ERROR', message: err.message },
64
+ };
65
+ }
66
+ }
67
+ // ---------------------------------------------------------------------------
68
+ // Load fixtures & set up MCP client/server
69
+ // ---------------------------------------------------------------------------
70
+ const fixturesPath = join(__dirname, '..', '..', 'fixtures', 'golden-tests.json');
71
+ const fixtureContent = readFileSync(fixturesPath, 'utf-8');
72
+ const fixture = JSON.parse(fixtureContent);
73
+ const isNightly = process.env['CONTRACT_MODE'] === 'nightly';
74
+ const dbPath = process.env['ROMANIAN_LAW_DB_PATH'] ?? join(__dirname, '..', '..', 'data', 'database.db');
75
+ const dbExists = existsSync(dbPath);
76
+ let mcpClient;
77
+ let db;
78
+ // ---------------------------------------------------------------------------
79
+ // Contract test runner
80
+ // ---------------------------------------------------------------------------
81
+ describe.skipIf(!dbExists)(`Contract tests: ${fixture.mcp_name}`, () => {
82
+ beforeAll(async () => {
83
+ // Clean up stale lock dir and WAL files (WASM SQLite can't handle WAL mode)
84
+ try {
85
+ rmdirSync(dbPath + '.lock');
86
+ }
87
+ catch { /* ignore */ }
88
+ try {
89
+ rmSync(dbPath + '-wal', { force: true });
90
+ }
91
+ catch { /* ignore */ }
92
+ try {
93
+ rmSync(dbPath + '-shm', { force: true });
94
+ }
95
+ catch { /* ignore */ }
96
+ db = new Database(dbPath, { readonly: true });
97
+ db.pragma('foreign_keys = ON');
98
+ const server = new Server({ name: 'romanian-law-test', version: '0.0.0' }, { capabilities: { tools: {} } });
99
+ registerTools(server, db);
100
+ mcpClient = new Client({ name: 'test-client', version: '0.0.0' }, { capabilities: {} });
101
+ const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
102
+ await server.connect(serverTransport);
103
+ await mcpClient.connect(clientTransport);
104
+ }, 30_000);
105
+ afterAll(() => {
106
+ db?.close();
107
+ });
108
+ for (const test of fixture.tests) {
109
+ describe(`[${test.id}] ${test.description}`, () => {
110
+ let result;
111
+ it('runs without throwing', async () => {
112
+ result = await callTool(mcpClient, test.tool, test.input);
113
+ expect(result).toBeDefined();
114
+ expect(result.tool).toBe(test.tool);
115
+ });
116
+ if (test.assertions.result_not_empty) {
117
+ it('result is not empty', async () => {
118
+ result ??= await callTool(mcpClient, test.tool, test.input);
119
+ if (result.ok) {
120
+ expect(result.data).toBeDefined();
121
+ }
122
+ else {
123
+ expect(result.error).toBeDefined();
124
+ }
125
+ });
126
+ }
127
+ if (test.assertions.text_contains) {
128
+ for (const needle of test.assertions.text_contains) {
129
+ it(`result contains text "${needle}"`, async () => {
130
+ result ??= await callTool(mcpClient, test.tool, test.input);
131
+ const haystack = stringifyData(result.data).toLowerCase();
132
+ expect(haystack).toContain(needle.toLowerCase());
133
+ });
134
+ }
135
+ }
136
+ if (test.assertions.any_result_contains) {
137
+ for (const needle of test.assertions.any_result_contains) {
138
+ it(`any result item contains "${needle}"`, async () => {
139
+ result ??= await callTool(mcpClient, test.tool, test.input);
140
+ const haystack = stringifyData(result.data).toLowerCase();
141
+ expect(haystack).toContain(needle.toLowerCase());
142
+ });
143
+ }
144
+ }
145
+ if (test.assertions.fields_present) {
146
+ it(`result has fields: ${test.assertions.fields_present.join(', ')}`, async () => {
147
+ result ??= await callTool(mcpClient, test.tool, test.input);
148
+ expect(result.ok).toBe(true);
149
+ const data = result.data;
150
+ expect(data).toBeDefined();
151
+ for (const field of test.assertions.fields_present) {
152
+ expect(data).toHaveProperty(field);
153
+ }
154
+ });
155
+ }
156
+ if (test.assertions.text_not_empty) {
157
+ it('result text is not empty', async () => {
158
+ result ??= await callTool(mcpClient, test.tool, test.input);
159
+ const text = stringifyData(result.data);
160
+ expect(text.trim().length).toBeGreaterThan(0);
161
+ });
162
+ }
163
+ if (test.assertions.min_results !== undefined) {
164
+ it(`returns at least ${test.assertions.min_results} results`, async () => {
165
+ result ??= await callTool(mcpClient, test.tool, test.input);
166
+ const data = result.data;
167
+ const items = Array.isArray(data)
168
+ ? data
169
+ : Array.isArray(data?.results)
170
+ ? data.results
171
+ : [];
172
+ expect(items.length).toBeGreaterThanOrEqual(test.assertions.min_results);
173
+ });
174
+ }
175
+ if (test.assertions.citation_url_pattern) {
176
+ it(`citation URLs match pattern: ${test.assertions.citation_url_pattern}`, async () => {
177
+ result ??= await callTool(mcpClient, test.tool, test.input);
178
+ const urls = extractCitationUrls(result.data);
179
+ const pattern = new RegExp(test.assertions.citation_url_pattern);
180
+ expect(urls.length).toBeGreaterThan(0);
181
+ for (const url of urls) {
182
+ expect(url).toMatch(pattern);
183
+ }
184
+ });
185
+ }
186
+ if (test.assertions.upstream_text_hash) {
187
+ const hashAssertion = test.assertions.upstream_text_hash;
188
+ it.skipIf(!isNightly)(`upstream text hash matches for ${hashAssertion.url}`, async () => {
189
+ const response = await fetchWithTimeout(hashAssertion.url);
190
+ expect(response.ok).toBe(true);
191
+ const body = await response.text();
192
+ const hash = sha256(body);
193
+ expect(hash).toBe(hashAssertion.expected_sha256);
194
+ }, 30_000);
195
+ }
196
+ if (test.assertions.citation_resolves) {
197
+ it.skipIf(!isNightly)('citation URLs resolve (HTTP 200)', async () => {
198
+ result ??= await callTool(mcpClient, test.tool, test.input);
199
+ const urls = extractCitationUrls(result.data);
200
+ expect(urls.length).toBeGreaterThan(0);
201
+ for (const url of urls) {
202
+ const response = await fetchWithTimeout(url);
203
+ expect(response.ok, `Expected HTTP 200 for ${url}, got ${response.status}`).toBe(true);
204
+ }
205
+ }, 60_000);
206
+ }
207
+ if (test.assertions.handles_gracefully) {
208
+ it('handles gracefully (no unhandled exception)', async () => {
209
+ result ??= await callTool(mcpClient, test.tool, test.input);
210
+ expect(result.tool).toBe(test.tool);
211
+ });
212
+ }
213
+ });
214
+ }
215
+ });
216
+ //# sourceMappingURL=golden.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"golden.test.js","sourceRoot":"","sources":["../../../__tests__/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AK,MAAM,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;oBAC5D,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACtC,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=tools-coverage.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools-coverage.test.d.ts","sourceRoot":"","sources":["../../../__tests__/unit/tools-coverage.test.ts"],"names":[],"mappings":""}