@yawlabs/mcp-compliance 0.12.0 → 0.12.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/dist/{chunk-M67VVIRO.js → chunk-G5K7CRWU.js} +10 -1
- package/dist/index.js +10 -1
- package/dist/mcp/server.js +1 -1
- package/dist/runner.d.ts +11 -0
- package/dist/runner.js +1 -1
- package/package.json +3 -2
|
@@ -15,7 +15,11 @@ function generateBadge(url) {
|
|
|
15
15
|
imageUrl,
|
|
16
16
|
reportUrl,
|
|
17
17
|
markdown: `[](${reportUrl})`,
|
|
18
|
-
|
|
18
|
+
// loading="lazy" so READMEs that embed many badges don't block first
|
|
19
|
+
// paint on this image. Markdown renderers (GitHub, npmjs.com) emit
|
|
20
|
+
// their own <img> from the markdown form so the attribute only
|
|
21
|
+
// matters for the HTML form people paste into custom pages.
|
|
22
|
+
html: `<a href="${reportUrl}"><img src="${imageUrl}" alt="MCP Compliant" loading="lazy"></a>`
|
|
19
23
|
};
|
|
20
24
|
}
|
|
21
25
|
|
|
@@ -1476,6 +1480,11 @@ async function runComplianceSuite(target, options = {}) {
|
|
|
1476
1480
|
options.onTestComplete?.(result);
|
|
1477
1481
|
}
|
|
1478
1482
|
async function test(id, name, category, required, specRef, fn) {
|
|
1483
|
+
if (options.signal?.aborted) {
|
|
1484
|
+
if (inFlight.size > 0) await drainPool().catch(() => {
|
|
1485
|
+
});
|
|
1486
|
+
throw options.signal.reason ?? new Error("Aborted");
|
|
1487
|
+
}
|
|
1479
1488
|
if (!shouldRun2(id, category)) return;
|
|
1480
1489
|
const def = TEST_DEFINITIONS_MAP.get(id);
|
|
1481
1490
|
const eligible = concurrency > 1 && def?.parallelSafe === true;
|
package/dist/index.js
CHANGED
|
@@ -702,7 +702,11 @@ function generateBadge(url) {
|
|
|
702
702
|
imageUrl,
|
|
703
703
|
reportUrl,
|
|
704
704
|
markdown: `[](${reportUrl})`,
|
|
705
|
-
|
|
705
|
+
// loading="lazy" so READMEs that embed many badges don't block first
|
|
706
|
+
// paint on this image. Markdown renderers (GitHub, npmjs.com) emit
|
|
707
|
+
// their own <img> from the markdown form so the attribute only
|
|
708
|
+
// matters for the HTML form people paste into custom pages.
|
|
709
|
+
html: `<a href="${reportUrl}"><img src="${imageUrl}" alt="MCP Compliant" loading="lazy"></a>`
|
|
706
710
|
};
|
|
707
711
|
}
|
|
708
712
|
|
|
@@ -1822,6 +1826,11 @@ async function runComplianceSuite(target, options = {}) {
|
|
|
1822
1826
|
options.onTestComplete?.(result);
|
|
1823
1827
|
}
|
|
1824
1828
|
async function test(id, name, category, required, specRef, fn) {
|
|
1829
|
+
if (options.signal?.aborted) {
|
|
1830
|
+
if (inFlight.size > 0) await drainPool().catch(() => {
|
|
1831
|
+
});
|
|
1832
|
+
throw options.signal.reason ?? new Error("Aborted");
|
|
1833
|
+
}
|
|
1825
1834
|
if (!shouldRun2(id, category)) return;
|
|
1826
1835
|
const def = TEST_DEFINITIONS_MAP.get(id);
|
|
1827
1836
|
const eligible = concurrency > 1 && def?.parallelSafe === true;
|
package/dist/mcp/server.js
CHANGED
package/dist/runner.d.ts
CHANGED
|
@@ -188,6 +188,17 @@ interface RunOptions {
|
|
|
188
188
|
* docs/PERFORMANCE.md for the design.
|
|
189
189
|
*/
|
|
190
190
|
concurrency?: number;
|
|
191
|
+
/**
|
|
192
|
+
* AbortSignal that cancels the suite mid-flight. When the signal fires,
|
|
193
|
+
* no further tests start; the in-flight test is cancelled if its
|
|
194
|
+
* underlying request supports the signal. The promise rejects with the
|
|
195
|
+
* signal's reason (an `AbortError` by default).
|
|
196
|
+
*
|
|
197
|
+
* Useful for live UIs (SSE, WebSocket) where the client may disconnect
|
|
198
|
+
* before the suite finishes — wiring the disconnect to abort here
|
|
199
|
+
* stops the server from burning compute on a dropped client.
|
|
200
|
+
*/
|
|
201
|
+
signal?: AbortSignal;
|
|
191
202
|
}
|
|
192
203
|
/**
|
|
193
204
|
* Run the full MCP compliance test suite. Accepts either a URL string
|
package/dist/runner.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yawlabs/mcp-compliance",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"description": "CLI tool and MCP server that tests MCP servers for spec compliance",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Yaw Labs <contact@yaw.sh> (https://yaw.sh)",
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"./mcp/server": {
|
|
14
14
|
"import": "./dist/mcp/server.js",
|
|
15
15
|
"types": "./dist/mcp/server.d.ts"
|
|
16
|
-
}
|
|
16
|
+
},
|
|
17
|
+
"./schemas/*.json": "./schemas/*.json"
|
|
17
18
|
},
|
|
18
19
|
"main": "./dist/runner.js",
|
|
19
20
|
"types": "./dist/runner.d.ts",
|