@stigmer/mcp-server 3.12.8 → 3.12.9
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stigmer/mcp-server",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.9",
|
|
4
4
|
"description": "Model Context Protocol server for the Stigmer platform — exposes Stigmer agents, skills, MCP servers, and workflows as MCP tools and resources",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"@connectrpc/connect": "^2.0.0",
|
|
36
36
|
"@connectrpc/connect-node": "^2.1.1",
|
|
37
37
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
38
|
-
"@stigmer/protos": "3.12.
|
|
39
|
-
"@stigmer/sdk": "3.12.
|
|
38
|
+
"@stigmer/protos": "3.12.9",
|
|
39
|
+
"@stigmer/sdk": "3.12.9",
|
|
40
40
|
"yaml": "^2.8.2",
|
|
41
41
|
"zod": "^3.25.0"
|
|
42
42
|
}
|
|
@@ -59,8 +59,13 @@ const openSessions = new Set<ServerHttp2Session>();
|
|
|
59
59
|
/** The next stubbed created record; tests set this. */
|
|
60
60
|
let createResponse: () => Memory;
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
// Requests the stub captured. An array, deliberately: resetting an optional
|
|
63
|
+
// property to undefined narrows its type to `undefined` for the rest of the
|
|
64
|
+
// flow (tsc does not un-narrow across the intervening callTool call), which
|
|
65
|
+
// makes every later `req?.x` a property access on `never` under
|
|
66
|
+
// `npm run typecheck` — the job that, unlike tsconfig.build.json, includes
|
|
67
|
+
// tests. Clearing and reading an array never narrows.
|
|
68
|
+
const capturedCreates: Memory[] = [];
|
|
64
69
|
|
|
65
70
|
interface ToolResult {
|
|
66
71
|
content: Array<{ type: string; text?: string }>;
|
|
@@ -91,7 +96,7 @@ beforeAll(async () => {
|
|
|
91
96
|
const routes = (router: ConnectRouter) => {
|
|
92
97
|
router.service(MemoryCommandController, {
|
|
93
98
|
create: (req) => {
|
|
94
|
-
|
|
99
|
+
capturedCreates.push(req);
|
|
95
100
|
return createResponse();
|
|
96
101
|
},
|
|
97
102
|
});
|
|
@@ -154,12 +159,12 @@ describe("memory roster (DD-005 D1)", () => {
|
|
|
154
159
|
describe("argument + capture context → request mapping (DD-005 D2)", () => {
|
|
155
160
|
it("maps the fact and the startup context; subject never travels", async () => {
|
|
156
161
|
createResponse = () => proposedRecord("Prefers concise answers.");
|
|
157
|
-
|
|
162
|
+
capturedCreates.length = 0;
|
|
158
163
|
|
|
159
164
|
const result = await remember({ fact: "Prefers concise answers." });
|
|
160
165
|
|
|
161
166
|
expect(result.isError).toBeFalsy();
|
|
162
|
-
const req =
|
|
167
|
+
const req = capturedCreates.at(-1);
|
|
163
168
|
expect(req?.metadata?.org).toBe("acme");
|
|
164
169
|
expect(req?.metadata?.name).toBe(""); // id-addressed; the server defaults the name
|
|
165
170
|
expect(req?.spec?.content).toBe("Prefers concise answers.");
|