tmcp 1.13.0 → 1.14.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/package.json +1 -1
- package/src/index.js +5 -6
- package/src/types/index.d.ts.map +1 -1
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
McpError,
|
|
25
25
|
ReadResourceResultSchema,
|
|
26
26
|
ElicitResultSchema,
|
|
27
|
+
JSONRPCErrorSchema,
|
|
27
28
|
} from './validation/index.js';
|
|
28
29
|
import {
|
|
29
30
|
get_supported_versions,
|
|
@@ -229,11 +230,6 @@ export class McpServer {
|
|
|
229
230
|
}),
|
|
230
231
|
);
|
|
231
232
|
|
|
232
|
-
// Trigger initial roots request if client supports it
|
|
233
|
-
if (validated_initialize.capabilities?.roots) {
|
|
234
|
-
this.#refresh_roots();
|
|
235
|
-
}
|
|
236
|
-
|
|
237
233
|
// Return server response with negotiated version and capabilities
|
|
238
234
|
return {
|
|
239
235
|
protocolVersion: negotiated_version,
|
|
@@ -942,7 +938,10 @@ export class McpServer {
|
|
|
942
938
|
);
|
|
943
939
|
}
|
|
944
940
|
// It's a response - handle with client
|
|
945
|
-
const validated_response = v.parse(
|
|
941
|
+
const validated_response = v.parse(
|
|
942
|
+
v.union([JSONRPCResponseSchema, JSONRPCErrorSchema]),
|
|
943
|
+
message,
|
|
944
|
+
);
|
|
946
945
|
this.#lazyily_create_client();
|
|
947
946
|
return this.#ctx_storage.run(ctx ?? {}, async () =>
|
|
948
947
|
this.#client?.receive(validated_response),
|
package/src/types/index.d.ts.map
CHANGED
|
@@ -57,6 +57,6 @@
|
|
|
57
57
|
null,
|
|
58
58
|
null
|
|
59
59
|
],
|
|
60
|
-
"mappings": ";;;;;
|
|
60
|
+
"mappings": ";;;;;cAuGaA,SAASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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