@stigmer/mcp-server 3.12.8 → 3.13.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/domains/client.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export declare function resolveToken(extra: RequestAuth | undefined, fallback: s
|
|
|
37
37
|
* caller dialing stigmer-server directly: the cloud Java server accepts only
|
|
38
38
|
* `application/grpc` (it answers gRPC-web with HTTP 415 `Content-Type ... is
|
|
39
39
|
* not supported`, which the tool layer would relay to the model as an opaque
|
|
40
|
-
* "Content-Type error"), and the OSS
|
|
40
|
+
* "Content-Type error"), and the OSS server serves native gRPC on the same
|
|
41
41
|
* listener. This matches the runner's own backend client — the other
|
|
42
42
|
* in-cluster Node caller — which likewise uses native gRPC over HTTP/2.
|
|
43
43
|
*/
|
package/domains/client.js
CHANGED
|
@@ -37,7 +37,7 @@ export function resolveToken(extra, fallback) {
|
|
|
37
37
|
* caller dialing stigmer-server directly: the cloud Java server accepts only
|
|
38
38
|
* `application/grpc` (it answers gRPC-web with HTTP 415 `Content-Type ... is
|
|
39
39
|
* not supported`, which the tool layer would relay to the model as an opaque
|
|
40
|
-
* "Content-Type error"), and the OSS
|
|
40
|
+
* "Content-Type error"), and the OSS server serves native gRPC on the same
|
|
41
41
|
* listener. This matches the runner's own backend client — the other
|
|
42
42
|
* in-cluster Node caller — which likewise uses native gRPC over HTTP/2.
|
|
43
43
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stigmer/mcp-server",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.13.0",
|
|
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.
|
|
39
|
-
"@stigmer/sdk": "3.
|
|
38
|
+
"@stigmer/protos": "3.13.0",
|
|
39
|
+
"@stigmer/sdk": "3.13.0",
|
|
40
40
|
"yaml": "^2.8.2",
|
|
41
41
|
"zod": "^3.25.0"
|
|
42
42
|
}
|
package/src/domains/client.ts
CHANGED
|
@@ -58,7 +58,7 @@ export function resolveToken(extra: RequestAuth | undefined, fallback: string):
|
|
|
58
58
|
* caller dialing stigmer-server directly: the cloud Java server accepts only
|
|
59
59
|
* `application/grpc` (it answers gRPC-web with HTTP 415 `Content-Type ... is
|
|
60
60
|
* not supported`, which the tool layer would relay to the model as an opaque
|
|
61
|
-
* "Content-Type error"), and the OSS
|
|
61
|
+
* "Content-Type error"), and the OSS server serves native gRPC on the same
|
|
62
62
|
* listener. This matches the runner's own backend client — the other
|
|
63
63
|
* in-cluster Node caller — which likewise uses native gRPC over HTTP/2.
|
|
64
64
|
*/
|
|
@@ -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.");
|