@codelitdev/platform-conformance 0.4.2 → 0.6.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/dist/run.js +9 -1
- package/package.json +3 -3
package/dist/run.js
CHANGED
|
@@ -4,6 +4,12 @@ function errorCode(body) {
|
|
|
4
4
|
return undefined;
|
|
5
5
|
if ("code" in body && typeof body.code === "string")
|
|
6
6
|
return body.code;
|
|
7
|
+
// MCP tool failures are tool results flagged `isError`, not JSON-RPC errors.
|
|
8
|
+
if ("result" in body && body.result && typeof body.result === "object") {
|
|
9
|
+
const result = body.result;
|
|
10
|
+
const code = result.isError ? result.structuredContent?.code : undefined;
|
|
11
|
+
return typeof code === "string" ? code : undefined;
|
|
12
|
+
}
|
|
7
13
|
if ("error" in body &&
|
|
8
14
|
body.error &&
|
|
9
15
|
typeof body.error === "object" &&
|
|
@@ -171,7 +177,9 @@ export async function runPlatformConformance(adapter, capabilities = {}) {
|
|
|
171
177
|
args: {},
|
|
172
178
|
});
|
|
173
179
|
const mcpBody = mcpList.body;
|
|
174
|
-
if (mcpList.status !== 200 ||
|
|
180
|
+
if (mcpList.status !== 200 ||
|
|
181
|
+
mcpBody.result?.isError ||
|
|
182
|
+
!Array.isArray(mcpBody.result?.structuredContent?.items)) {
|
|
175
183
|
fail("mcp", "notes.list MCP call failed");
|
|
176
184
|
}
|
|
177
185
|
const cookieMcp = await adapter.mcp({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codelitdev/platform-conformance",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Shared HTTP conformance suites for CodeLit Platform products",
|
|
5
5
|
"author": "CodeLit",
|
|
6
6
|
"type": "module",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"tag": "latest"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@codelitdev/platform": ">=0.
|
|
40
|
+
"@codelitdev/platform": ">=0.6.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@codelitdev/platform": "0.
|
|
43
|
+
"@codelitdev/platform": "0.6.0",
|
|
44
44
|
"@types/bun": "^1.4.1",
|
|
45
45
|
"@types/node": "^22.14.1",
|
|
46
46
|
"typescript": "^5.9.3"
|