@mneme-ai/mcp 3.107.0 → 3.108.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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_morph_schema.test.d.ts","sourceRoot":"","sources":["../../src/tools/_morph_schema.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v3.108 — MORPH ⇄ live-schema verification. The novel guarantee: a router that
|
|
3
|
+
* checks its OWN output against the destination tool's ACTUAL input schema. Every
|
|
4
|
+
* INTENT_ARG / REQUIRED_ARGS entry in core must be a real input of the mapped MCP
|
|
5
|
+
* tool — so MORPH never hands an agent an arg name the tool doesn't accept.
|
|
6
|
+
*/
|
|
7
|
+
import { describe, it, expect } from "vitest";
|
|
8
|
+
import { buildToolMap } from "./_registry.js";
|
|
9
|
+
import { morph } from "@mneme-ai/core";
|
|
10
|
+
describe("v3.108 · MORPH projected args match the LIVE MCP tool schemas", () => {
|
|
11
|
+
const tm = buildToolMap();
|
|
12
|
+
const schemaOf = (tool) => tm.get(tool)?.inputSchema;
|
|
13
|
+
it("every COMMAND_TO_MCP target is a real, registered tool", () => {
|
|
14
|
+
for (const tool of Object.values(morph.COMMAND_TO_MCP)) {
|
|
15
|
+
expect(tm.has(tool), tool).toBe(true);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
it("INTENT_ARG fills a REAL input property of the mapped tool", () => {
|
|
19
|
+
for (const [command, arg] of Object.entries(morph.INTENT_ARG)) {
|
|
20
|
+
const tool = morph.toMcpTool(command);
|
|
21
|
+
const props = schemaOf(tool)?.properties ?? {};
|
|
22
|
+
expect(Object.keys(props), `${command} → ${tool}.${arg}`).toContain(arg);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
it("REQUIRED_ARGS matches the tool's actual required list (no invented requirements)", () => {
|
|
26
|
+
for (const [command, reqs] of Object.entries(morph.REQUIRED_ARGS)) {
|
|
27
|
+
const tool = morph.toMcpTool(command);
|
|
28
|
+
const required = schemaOf(tool)?.required ?? [];
|
|
29
|
+
for (const r of reqs)
|
|
30
|
+
expect(required, `${command} → ${tool} requires ${r}`).toContain(r);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
it("a routed shape's args are all valid input keys of the target tool", () => {
|
|
34
|
+
for (const q of ["is this claim actually true", "what do we know about the auth module", "review the whole codebase"]) {
|
|
35
|
+
const m = morph.morph(q);
|
|
36
|
+
if (m.verdict !== "MORPHED" || !m.capability?.mcpTool)
|
|
37
|
+
continue;
|
|
38
|
+
const props = Object.keys(schemaOf(m.capability.mcpTool)?.properties ?? {});
|
|
39
|
+
for (const k of Object.keys(m.shape?.args ?? {})) {
|
|
40
|
+
if (k === "intent")
|
|
41
|
+
continue; // generic hint (tool has no free-text arg)
|
|
42
|
+
expect(props, `${m.capability.mcpTool} arg ${k}`).toContain(k);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=_morph_schema.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_morph_schema.test.js","sourceRoot":"","sources":["../../src/tools/_morph_schema.test.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,QAAQ,CAAC,+DAA+D,EAAE,GAAG,EAAE;IAC7E,MAAM,EAAE,GAAG,YAAY,EAAE,CAAC;IAC1B,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,WAAwF,CAAC;IAE1I,EAAE,CAAC,wDAAwD,EAA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IAEH,EAAE,CAAC,mEAAmE,EAAE,GAAG,EAAE;QAC3E,KAAK,MAAM,CAAC,IAAI,CAAC,6BAA6B,EAAE,uCAAuC,EAAE,2BAA2B,CAAC,EAAE,CAAC;YACtH,MAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACzB,IAAI,CAAC,CAAC,OAAO,KAAK,SAAS,IAAI,CAAC,CAAC,CAAC,UAAU,EAAE,OAAO;gBAAE,SAAS;YAChE,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,UAAU,IAAI,EAAE,CAAC,CAAC;YAC5E,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC;gBACjD,IAAI,CAAC,KAAK,QAAQ;oBAAE,SAAS,CAAC,2CAA2C;gBACzE,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,UAAU,CAAC,OAAO,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;YACjE,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/tools/_runtime.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare function passthroughHandler(cliCommand: string, argMap: (args: Re
|
|
|
19
19
|
wisdom: string;
|
|
20
20
|
followUp: string[];
|
|
21
21
|
confidence: {
|
|
22
|
-
level: "
|
|
22
|
+
level: "high" | "medium" | "low";
|
|
23
23
|
};
|
|
24
24
|
}>;
|
|
25
25
|
/** Spawn `mneme <command> [...args]` as a child process and parse its --json
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mneme-ai/mcp",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.108.0",
|
|
4
4
|
"description": "MCP server that exposes Mneme to Claude Code, Cursor, Continue, and other AI clients",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"node": ">=22.13.0 <25.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@mneme-ai/core": "3.
|
|
49
|
-
"@mneme-ai/embeddings": "3.
|
|
50
|
-
"@mneme-ai/xray": "3.
|
|
48
|
+
"@mneme-ai/core": "3.108.0",
|
|
49
|
+
"@mneme-ai/embeddings": "3.108.0",
|
|
50
|
+
"@mneme-ai/xray": "3.108.0",
|
|
51
51
|
"@modelcontextprotocol/sdk": "^1.0.4"
|
|
52
52
|
}
|
|
53
53
|
}
|