@modelcontextprotocol/sdk 0.4.0 → 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/README.md +1 -1
- package/dist/cli.js +13 -0
- package/dist/cli.js.map +1 -1
- package/dist/client/index.d.ts +27 -16
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +141 -45
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.test.js +337 -3
- package/dist/client/index.test.js.map +1 -1
- package/dist/client/stdio.d.ts +7 -0
- package/dist/client/stdio.d.ts.map +1 -1
- package/dist/client/stdio.js +6 -5
- package/dist/client/stdio.js.map +1 -1
- package/dist/inMemory.d.ts +20 -0
- package/dist/inMemory.d.ts.map +1 -0
- package/dist/inMemory.js +47 -0
- package/dist/inMemory.js.map +1 -0
- package/dist/inMemory.test.d.ts +2 -0
- package/dist/inMemory.test.d.ts.map +1 -0
- package/dist/inMemory.test.js +74 -0
- package/dist/inMemory.test.js.map +1 -0
- package/dist/server/index.d.ts +15 -5
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +99 -23
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.test.js +358 -3
- package/dist/server/index.test.js.map +1 -1
- package/dist/shared/protocol.d.ts +72 -7
- package/dist/shared/protocol.d.ts.map +1 -1
- package/dist/shared/protocol.js +84 -12
- package/dist/shared/protocol.js.map +1 -1
- package/dist/types.d.ts +754 -362
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +56 -26
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/server/index.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ClientCapabilities, CreateMessageRequest, Implementation, ListRootsRequest, LoggingMessageNotification, Notification, Request, ResourceUpdatedNotification, Result, ServerNotification, ServerRequest, ServerResult } from "../types.js";
|
|
1
|
+
import { Protocol, ProtocolOptions, RequestOptions } from "../shared/protocol.js";
|
|
2
|
+
import { ClientCapabilities, CreateMessageRequest, Implementation, ListRootsRequest, LoggingMessageNotification, Notification, Request, ResourceUpdatedNotification, Result, ServerCapabilities, ServerNotification, ServerRequest, ServerResult } from "../types.js";
|
|
3
|
+
export type ServerOptions = ProtocolOptions & {
|
|
4
|
+
/**
|
|
5
|
+
* Capabilities to advertise as being supported by this server.
|
|
6
|
+
*/
|
|
7
|
+
capabilities: ServerCapabilities;
|
|
8
|
+
};
|
|
3
9
|
/**
|
|
4
10
|
* An MCP server on top of a pluggable transport.
|
|
5
11
|
*
|
|
@@ -29,6 +35,7 @@ export declare class Server<RequestT extends Request = Request, NotificationT ex
|
|
|
29
35
|
private _serverInfo;
|
|
30
36
|
private _clientCapabilities?;
|
|
31
37
|
private _clientVersion?;
|
|
38
|
+
private _capabilities;
|
|
32
39
|
/**
|
|
33
40
|
* Callback for when initialization has fully completed (i.e., the client has sent an `initialized` notification).
|
|
34
41
|
*/
|
|
@@ -36,7 +43,10 @@ export declare class Server<RequestT extends Request = Request, NotificationT ex
|
|
|
36
43
|
/**
|
|
37
44
|
* Initializes this server with the given name and version information.
|
|
38
45
|
*/
|
|
39
|
-
constructor(_serverInfo: Implementation);
|
|
46
|
+
constructor(_serverInfo: Implementation, options: ServerOptions);
|
|
47
|
+
protected assertCapabilityForMethod(method: RequestT["method"]): void;
|
|
48
|
+
protected assertNotificationCapability(method: (ServerNotification | NotificationT)["method"]): void;
|
|
49
|
+
protected assertRequestHandlerCapability(method: string): void;
|
|
40
50
|
private _oninitialize;
|
|
41
51
|
/**
|
|
42
52
|
* After initialization has completed, this will be populated with the client's reported capabilities.
|
|
@@ -50,7 +60,7 @@ export declare class Server<RequestT extends Request = Request, NotificationT ex
|
|
|
50
60
|
ping(): Promise<{
|
|
51
61
|
_meta?: import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough"> | undefined;
|
|
52
62
|
}>;
|
|
53
|
-
createMessage(params: CreateMessageRequest["params"],
|
|
63
|
+
createMessage(params: CreateMessageRequest["params"], options?: RequestOptions): Promise<import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
54
64
|
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
55
65
|
}, {
|
|
56
66
|
model: import("zod").ZodString;
|
|
@@ -79,7 +89,7 @@ export declare class Server<RequestT extends Request = Request, NotificationT ex
|
|
|
79
89
|
mimeType: import("zod").ZodString;
|
|
80
90
|
}, import("zod").ZodTypeAny, "passthrough">>]>;
|
|
81
91
|
}>, import("zod").ZodTypeAny, "passthrough">>;
|
|
82
|
-
listRoots(params?: ListRootsRequest["params"],
|
|
92
|
+
listRoots(params?: ListRootsRequest["params"], options?: RequestOptions): Promise<import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
83
93
|
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
84
94
|
}, {
|
|
85
95
|
roots: import("zod").ZodArray<import("zod").ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,cAAc,EACf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EAGpB,cAAc,EAMd,gBAAgB,EAEhB,0BAA0B,EAC1B,YAAY,EACZ,OAAO,EACP,2BAA2B,EAC3B,MAAM,EACN,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,Y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gBAAgB,CAAC,QAAQ,CAAC,EACnC,OAAO,CAAC,EAAE,cAAc;;;;;;;;;;;;;;IASpB,kBAAkB,CAAC,MAAM,EAAE,0BAA0B,CAAC,QAAQ,CAAC;IAI/D,mBAAmB,CAAC,MAAM,EAAE,2BAA2B,CAAC,QAAQ,CAAC;IAOjE,uBAAuB;IAMvB,mBAAmB;IAInB,qBAAqB;CAG5B"}
|
package/dist/server/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Protocol } from "../shared/protocol.js";
|
|
2
|
-
import { CreateMessageResultSchema, EmptyResultSchema, InitializedNotificationSchema, InitializeRequestSchema, LATEST_PROTOCOL_VERSION,
|
|
1
|
+
import { Protocol, } from "../shared/protocol.js";
|
|
2
|
+
import { CreateMessageResultSchema, EmptyResultSchema, InitializedNotificationSchema, InitializeRequestSchema, LATEST_PROTOCOL_VERSION, ListRootsResultSchema, SUPPORTED_PROTOCOL_VERSIONS, } from "../types.js";
|
|
3
3
|
/**
|
|
4
4
|
* An MCP server on top of a pluggable transport.
|
|
5
5
|
*
|
|
@@ -29,18 +29,107 @@ export class Server extends Protocol {
|
|
|
29
29
|
/**
|
|
30
30
|
* Initializes this server with the given name and version information.
|
|
31
31
|
*/
|
|
32
|
-
constructor(_serverInfo) {
|
|
33
|
-
super();
|
|
32
|
+
constructor(_serverInfo, options) {
|
|
33
|
+
super(options);
|
|
34
34
|
this._serverInfo = _serverInfo;
|
|
35
|
+
this._capabilities = options.capabilities;
|
|
35
36
|
this.setRequestHandler(InitializeRequestSchema, (request) => this._oninitialize(request));
|
|
36
37
|
this.setNotificationHandler(InitializedNotificationSchema, () => { var _a; return (_a = this.oninitialized) === null || _a === void 0 ? void 0 : _a.call(this); });
|
|
37
38
|
}
|
|
39
|
+
assertCapabilityForMethod(method) {
|
|
40
|
+
var _a, _b;
|
|
41
|
+
switch (method) {
|
|
42
|
+
case "sampling/createMessage":
|
|
43
|
+
if (!((_a = this._clientCapabilities) === null || _a === void 0 ? void 0 : _a.sampling)) {
|
|
44
|
+
throw new Error(`Client does not support sampling (required for ${method})`);
|
|
45
|
+
}
|
|
46
|
+
break;
|
|
47
|
+
case "roots/list":
|
|
48
|
+
if (!((_b = this._clientCapabilities) === null || _b === void 0 ? void 0 : _b.roots)) {
|
|
49
|
+
throw new Error(`Client does not support listing roots (required for ${method})`);
|
|
50
|
+
}
|
|
51
|
+
break;
|
|
52
|
+
case "ping":
|
|
53
|
+
// No specific capability required for ping
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
assertNotificationCapability(method) {
|
|
58
|
+
switch (method) {
|
|
59
|
+
case "notifications/message":
|
|
60
|
+
if (!this._capabilities.logging) {
|
|
61
|
+
throw new Error(`Server does not support logging (required for ${method})`);
|
|
62
|
+
}
|
|
63
|
+
break;
|
|
64
|
+
case "notifications/resources/updated":
|
|
65
|
+
case "notifications/resources/list_changed":
|
|
66
|
+
if (!this._capabilities.resources) {
|
|
67
|
+
throw new Error(`Server does not support notifying about resources (required for ${method})`);
|
|
68
|
+
}
|
|
69
|
+
break;
|
|
70
|
+
case "notifications/tools/list_changed":
|
|
71
|
+
if (!this._capabilities.tools) {
|
|
72
|
+
throw new Error(`Server does not support notifying of tool list changes (required for ${method})`);
|
|
73
|
+
}
|
|
74
|
+
break;
|
|
75
|
+
case "notifications/prompts/list_changed":
|
|
76
|
+
if (!this._capabilities.prompts) {
|
|
77
|
+
throw new Error(`Server does not support notifying of prompt list changes (required for ${method})`);
|
|
78
|
+
}
|
|
79
|
+
break;
|
|
80
|
+
case "notifications/cancelled":
|
|
81
|
+
// Cancellation notifications are always allowed
|
|
82
|
+
break;
|
|
83
|
+
case "notifications/progress":
|
|
84
|
+
// Progress notifications are always allowed
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
assertRequestHandlerCapability(method) {
|
|
89
|
+
switch (method) {
|
|
90
|
+
case "sampling/createMessage":
|
|
91
|
+
if (!this._capabilities.sampling) {
|
|
92
|
+
throw new Error(`Server does not support sampling (required for ${method})`);
|
|
93
|
+
}
|
|
94
|
+
break;
|
|
95
|
+
case "logging/setLevel":
|
|
96
|
+
if (!this._capabilities.logging) {
|
|
97
|
+
throw new Error(`Server does not support logging (required for ${method})`);
|
|
98
|
+
}
|
|
99
|
+
break;
|
|
100
|
+
case "prompts/get":
|
|
101
|
+
case "prompts/list":
|
|
102
|
+
if (!this._capabilities.prompts) {
|
|
103
|
+
throw new Error(`Server does not support prompts (required for ${method})`);
|
|
104
|
+
}
|
|
105
|
+
break;
|
|
106
|
+
case "resources/list":
|
|
107
|
+
case "resources/templates/list":
|
|
108
|
+
case "resources/read":
|
|
109
|
+
if (!this._capabilities.resources) {
|
|
110
|
+
throw new Error(`Server does not support resources (required for ${method})`);
|
|
111
|
+
}
|
|
112
|
+
break;
|
|
113
|
+
case "tools/call":
|
|
114
|
+
case "tools/list":
|
|
115
|
+
if (!this._capabilities.tools) {
|
|
116
|
+
throw new Error(`Server does not support tools (required for ${method})`);
|
|
117
|
+
}
|
|
118
|
+
break;
|
|
119
|
+
case "ping":
|
|
120
|
+
case "initialize":
|
|
121
|
+
// No specific capability required for these methods
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
38
125
|
async _oninitialize(request) {
|
|
39
126
|
const requestedVersion = request.params.protocolVersion;
|
|
40
127
|
this._clientCapabilities = request.params.capabilities;
|
|
41
128
|
this._clientVersion = request.params.clientInfo;
|
|
42
129
|
return {
|
|
43
|
-
protocolVersion: SUPPORTED_PROTOCOL_VERSIONS.includes(requestedVersion)
|
|
130
|
+
protocolVersion: SUPPORTED_PROTOCOL_VERSIONS.includes(requestedVersion)
|
|
131
|
+
? requestedVersion
|
|
132
|
+
: LATEST_PROTOCOL_VERSION,
|
|
44
133
|
capabilities: this.getCapabilities(),
|
|
45
134
|
serverInfo: this._serverInfo,
|
|
46
135
|
};
|
|
@@ -58,29 +147,16 @@ export class Server extends Protocol {
|
|
|
58
147
|
return this._clientVersion;
|
|
59
148
|
}
|
|
60
149
|
getCapabilities() {
|
|
61
|
-
return
|
|
62
|
-
prompts: this._requestHandlers.has(ListPromptsRequestSchema.shape.method.value)
|
|
63
|
-
? {}
|
|
64
|
-
: undefined,
|
|
65
|
-
resources: this._requestHandlers.has(ListResourcesRequestSchema.shape.method.value)
|
|
66
|
-
? {}
|
|
67
|
-
: undefined,
|
|
68
|
-
tools: this._requestHandlers.has(ListToolsRequestSchema.shape.method.value)
|
|
69
|
-
? {}
|
|
70
|
-
: undefined,
|
|
71
|
-
logging: this._requestHandlers.has(SetLevelRequestSchema.shape.method.value)
|
|
72
|
-
? {}
|
|
73
|
-
: undefined,
|
|
74
|
-
};
|
|
150
|
+
return this._capabilities;
|
|
75
151
|
}
|
|
76
152
|
async ping() {
|
|
77
153
|
return this.request({ method: "ping" }, EmptyResultSchema);
|
|
78
154
|
}
|
|
79
|
-
async createMessage(params,
|
|
80
|
-
return this.request({ method: "sampling/createMessage", params }, CreateMessageResultSchema,
|
|
155
|
+
async createMessage(params, options) {
|
|
156
|
+
return this.request({ method: "sampling/createMessage", params }, CreateMessageResultSchema, options);
|
|
81
157
|
}
|
|
82
|
-
async listRoots(params,
|
|
83
|
-
return this.request({ method: "roots/list", params }, ListRootsResultSchema,
|
|
158
|
+
async listRoots(params, options) {
|
|
159
|
+
return this.request({ method: "roots/list", params }, ListRootsResultSchema, options);
|
|
84
160
|
}
|
|
85
161
|
async sendLoggingMessage(params) {
|
|
86
162
|
return this.notification({ method: "notifications/message", params });
|
package/dist/server/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,GAGT,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAGL,yBAA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;CACF"}
|
|
@@ -3,10 +3,263 @@
|
|
|
3
3
|
/* eslint-disable @typescript-eslint/no-unused-expressions */
|
|
4
4
|
import { Server } from "./index.js";
|
|
5
5
|
import { z } from "zod";
|
|
6
|
-
import { RequestSchema, NotificationSchema, ResultSchema } from "../types.js";
|
|
6
|
+
import { RequestSchema, NotificationSchema, ResultSchema, LATEST_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, CreateMessageRequestSchema, ListPromptsRequestSchema, ListResourcesRequestSchema, ListToolsRequestSchema, SetLevelRequestSchema, ErrorCode, } from "../types.js";
|
|
7
|
+
import { InMemoryTransport } from "../inMemory.js";
|
|
8
|
+
import { Client } from "../client/index.js";
|
|
9
|
+
test("should accept latest protocol version", async () => {
|
|
10
|
+
var _a;
|
|
11
|
+
let sendPromiseResolve;
|
|
12
|
+
const sendPromise = new Promise((resolve) => {
|
|
13
|
+
sendPromiseResolve = resolve;
|
|
14
|
+
});
|
|
15
|
+
const serverTransport = {
|
|
16
|
+
start: jest.fn().mockResolvedValue(undefined),
|
|
17
|
+
close: jest.fn().mockResolvedValue(undefined),
|
|
18
|
+
send: jest.fn().mockImplementation((message) => {
|
|
19
|
+
if (message.id === 1 && message.result) {
|
|
20
|
+
expect(message.result).toEqual({
|
|
21
|
+
protocolVersion: LATEST_PROTOCOL_VERSION,
|
|
22
|
+
capabilities: expect.any(Object),
|
|
23
|
+
serverInfo: {
|
|
24
|
+
name: "test server",
|
|
25
|
+
version: "1.0",
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
sendPromiseResolve(undefined);
|
|
29
|
+
}
|
|
30
|
+
return Promise.resolve();
|
|
31
|
+
}),
|
|
32
|
+
};
|
|
33
|
+
const server = new Server({
|
|
34
|
+
name: "test server",
|
|
35
|
+
version: "1.0",
|
|
36
|
+
}, {
|
|
37
|
+
capabilities: {
|
|
38
|
+
prompts: {},
|
|
39
|
+
resources: {},
|
|
40
|
+
tools: {},
|
|
41
|
+
logging: {},
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
await server.connect(serverTransport);
|
|
45
|
+
// Simulate initialize request with latest version
|
|
46
|
+
(_a = serverTransport.onmessage) === null || _a === void 0 ? void 0 : _a.call(serverTransport, {
|
|
47
|
+
jsonrpc: "2.0",
|
|
48
|
+
id: 1,
|
|
49
|
+
method: "initialize",
|
|
50
|
+
params: {
|
|
51
|
+
protocolVersion: LATEST_PROTOCOL_VERSION,
|
|
52
|
+
capabilities: {},
|
|
53
|
+
clientInfo: {
|
|
54
|
+
name: "test client",
|
|
55
|
+
version: "1.0",
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
await expect(sendPromise).resolves.toBeUndefined();
|
|
60
|
+
});
|
|
61
|
+
test("should accept supported older protocol version", async () => {
|
|
62
|
+
var _a;
|
|
63
|
+
const OLD_VERSION = SUPPORTED_PROTOCOL_VERSIONS[1];
|
|
64
|
+
let sendPromiseResolve;
|
|
65
|
+
const sendPromise = new Promise((resolve) => {
|
|
66
|
+
sendPromiseResolve = resolve;
|
|
67
|
+
});
|
|
68
|
+
const serverTransport = {
|
|
69
|
+
start: jest.fn().mockResolvedValue(undefined),
|
|
70
|
+
close: jest.fn().mockResolvedValue(undefined),
|
|
71
|
+
send: jest.fn().mockImplementation((message) => {
|
|
72
|
+
if (message.id === 1 && message.result) {
|
|
73
|
+
expect(message.result).toEqual({
|
|
74
|
+
protocolVersion: OLD_VERSION,
|
|
75
|
+
capabilities: expect.any(Object),
|
|
76
|
+
serverInfo: {
|
|
77
|
+
name: "test server",
|
|
78
|
+
version: "1.0",
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
sendPromiseResolve(undefined);
|
|
82
|
+
}
|
|
83
|
+
return Promise.resolve();
|
|
84
|
+
}),
|
|
85
|
+
};
|
|
86
|
+
const server = new Server({
|
|
87
|
+
name: "test server",
|
|
88
|
+
version: "1.0",
|
|
89
|
+
}, {
|
|
90
|
+
capabilities: {
|
|
91
|
+
prompts: {},
|
|
92
|
+
resources: {},
|
|
93
|
+
tools: {},
|
|
94
|
+
logging: {},
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
await server.connect(serverTransport);
|
|
98
|
+
// Simulate initialize request with older version
|
|
99
|
+
(_a = serverTransport.onmessage) === null || _a === void 0 ? void 0 : _a.call(serverTransport, {
|
|
100
|
+
jsonrpc: "2.0",
|
|
101
|
+
id: 1,
|
|
102
|
+
method: "initialize",
|
|
103
|
+
params: {
|
|
104
|
+
protocolVersion: OLD_VERSION,
|
|
105
|
+
capabilities: {},
|
|
106
|
+
clientInfo: {
|
|
107
|
+
name: "test client",
|
|
108
|
+
version: "1.0",
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
});
|
|
112
|
+
await expect(sendPromise).resolves.toBeUndefined();
|
|
113
|
+
});
|
|
114
|
+
test("should handle unsupported protocol version", async () => {
|
|
115
|
+
var _a;
|
|
116
|
+
let sendPromiseResolve;
|
|
117
|
+
const sendPromise = new Promise((resolve) => {
|
|
118
|
+
sendPromiseResolve = resolve;
|
|
119
|
+
});
|
|
120
|
+
const serverTransport = {
|
|
121
|
+
start: jest.fn().mockResolvedValue(undefined),
|
|
122
|
+
close: jest.fn().mockResolvedValue(undefined),
|
|
123
|
+
send: jest.fn().mockImplementation((message) => {
|
|
124
|
+
if (message.id === 1 && message.result) {
|
|
125
|
+
expect(message.result).toEqual({
|
|
126
|
+
protocolVersion: LATEST_PROTOCOL_VERSION,
|
|
127
|
+
capabilities: expect.any(Object),
|
|
128
|
+
serverInfo: {
|
|
129
|
+
name: "test server",
|
|
130
|
+
version: "1.0",
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
sendPromiseResolve(undefined);
|
|
134
|
+
}
|
|
135
|
+
return Promise.resolve();
|
|
136
|
+
}),
|
|
137
|
+
};
|
|
138
|
+
const server = new Server({
|
|
139
|
+
name: "test server",
|
|
140
|
+
version: "1.0",
|
|
141
|
+
}, {
|
|
142
|
+
capabilities: {
|
|
143
|
+
prompts: {},
|
|
144
|
+
resources: {},
|
|
145
|
+
tools: {},
|
|
146
|
+
logging: {},
|
|
147
|
+
},
|
|
148
|
+
});
|
|
149
|
+
await server.connect(serverTransport);
|
|
150
|
+
// Simulate initialize request with unsupported version
|
|
151
|
+
(_a = serverTransport.onmessage) === null || _a === void 0 ? void 0 : _a.call(serverTransport, {
|
|
152
|
+
jsonrpc: "2.0",
|
|
153
|
+
id: 1,
|
|
154
|
+
method: "initialize",
|
|
155
|
+
params: {
|
|
156
|
+
protocolVersion: "invalid-version",
|
|
157
|
+
capabilities: {},
|
|
158
|
+
clientInfo: {
|
|
159
|
+
name: "test client",
|
|
160
|
+
version: "1.0",
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
await expect(sendPromise).resolves.toBeUndefined();
|
|
165
|
+
});
|
|
166
|
+
test("should respect client capabilities", async () => {
|
|
167
|
+
const server = new Server({
|
|
168
|
+
name: "test server",
|
|
169
|
+
version: "1.0",
|
|
170
|
+
}, {
|
|
171
|
+
capabilities: {
|
|
172
|
+
prompts: {},
|
|
173
|
+
resources: {},
|
|
174
|
+
tools: {},
|
|
175
|
+
logging: {},
|
|
176
|
+
},
|
|
177
|
+
enforceStrictCapabilities: true,
|
|
178
|
+
});
|
|
179
|
+
const client = new Client({
|
|
180
|
+
name: "test client",
|
|
181
|
+
version: "1.0",
|
|
182
|
+
}, {
|
|
183
|
+
capabilities: {
|
|
184
|
+
sampling: {},
|
|
185
|
+
},
|
|
186
|
+
});
|
|
187
|
+
// Implement request handler for sampling/createMessage
|
|
188
|
+
client.setRequestHandler(CreateMessageRequestSchema, async (request) => {
|
|
189
|
+
// Mock implementation of createMessage
|
|
190
|
+
return {
|
|
191
|
+
model: "test-model",
|
|
192
|
+
role: "assistant",
|
|
193
|
+
content: {
|
|
194
|
+
type: "text",
|
|
195
|
+
text: "This is a test response",
|
|
196
|
+
},
|
|
197
|
+
};
|
|
198
|
+
});
|
|
199
|
+
const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
|
|
200
|
+
await Promise.all([
|
|
201
|
+
client.connect(clientTransport),
|
|
202
|
+
server.connect(serverTransport),
|
|
203
|
+
]);
|
|
204
|
+
expect(server.getClientCapabilities()).toEqual({ sampling: {} });
|
|
205
|
+
// This should work because sampling is supported by the client
|
|
206
|
+
await expect(server.createMessage({
|
|
207
|
+
messages: [],
|
|
208
|
+
maxTokens: 10,
|
|
209
|
+
})).resolves.not.toThrow();
|
|
210
|
+
// This should still throw because roots are not supported by the client
|
|
211
|
+
await expect(server.listRoots()).rejects.toThrow(/^Client does not support/);
|
|
212
|
+
});
|
|
213
|
+
test("should respect server notification capabilities", async () => {
|
|
214
|
+
const server = new Server({
|
|
215
|
+
name: "test server",
|
|
216
|
+
version: "1.0",
|
|
217
|
+
}, {
|
|
218
|
+
capabilities: {
|
|
219
|
+
logging: {},
|
|
220
|
+
},
|
|
221
|
+
enforceStrictCapabilities: true,
|
|
222
|
+
});
|
|
223
|
+
const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
|
|
224
|
+
await server.connect(serverTransport);
|
|
225
|
+
// This should work because logging is supported by the server
|
|
226
|
+
await expect(server.sendLoggingMessage({
|
|
227
|
+
level: "info",
|
|
228
|
+
data: "Test log message",
|
|
229
|
+
})).resolves.not.toThrow();
|
|
230
|
+
// This should throw because resource notificaitons are not supported by the server
|
|
231
|
+
await expect(server.sendResourceUpdated({ uri: "test://resource" })).rejects.toThrow(/^Server does not support/);
|
|
232
|
+
});
|
|
233
|
+
test("should only allow setRequestHandler for declared capabilities", () => {
|
|
234
|
+
const server = new Server({
|
|
235
|
+
name: "test server",
|
|
236
|
+
version: "1.0",
|
|
237
|
+
}, {
|
|
238
|
+
capabilities: {
|
|
239
|
+
prompts: {},
|
|
240
|
+
resources: {},
|
|
241
|
+
},
|
|
242
|
+
});
|
|
243
|
+
// These should work because the capabilities are declared
|
|
244
|
+
expect(() => {
|
|
245
|
+
server.setRequestHandler(ListPromptsRequestSchema, () => ({ prompts: [] }));
|
|
246
|
+
}).not.toThrow();
|
|
247
|
+
expect(() => {
|
|
248
|
+
server.setRequestHandler(ListResourcesRequestSchema, () => ({
|
|
249
|
+
resources: [],
|
|
250
|
+
}));
|
|
251
|
+
}).not.toThrow();
|
|
252
|
+
// These should throw because the capabilities are not declared
|
|
253
|
+
expect(() => {
|
|
254
|
+
server.setRequestHandler(ListToolsRequestSchema, () => ({ tools: [] }));
|
|
255
|
+
}).toThrow(/^Server does not support tools/);
|
|
256
|
+
expect(() => {
|
|
257
|
+
server.setRequestHandler(SetLevelRequestSchema, () => ({}));
|
|
258
|
+
}).toThrow(/^Server does not support logging/);
|
|
259
|
+
});
|
|
7
260
|
/*
|
|
8
|
-
Test that custom request/notification/result schemas can be used with the Server class.
|
|
9
|
-
*/
|
|
261
|
+
Test that custom request/notification/result schemas can be used with the Server class.
|
|
262
|
+
*/
|
|
10
263
|
test("should typecheck", () => {
|
|
11
264
|
const GetWeatherRequestSchema = RequestSchema.extend({
|
|
12
265
|
method: z.literal("weather/get"),
|
|
@@ -38,6 +291,13 @@ test("should typecheck", () => {
|
|
|
38
291
|
const weatherServer = new Server({
|
|
39
292
|
name: "WeatherServer",
|
|
40
293
|
version: "1.0.0",
|
|
294
|
+
}, {
|
|
295
|
+
capabilities: {
|
|
296
|
+
prompts: {},
|
|
297
|
+
resources: {},
|
|
298
|
+
tools: {},
|
|
299
|
+
logging: {},
|
|
300
|
+
},
|
|
41
301
|
});
|
|
42
302
|
// Typecheck that only valid weather requests/notifications/results are allowed
|
|
43
303
|
weatherServer.setRequestHandler(GetWeatherRequestSchema, (request) => {
|
|
@@ -50,4 +310,99 @@ test("should typecheck", () => {
|
|
|
50
310
|
console.log(`Weather alert: ${notification.params.message}`);
|
|
51
311
|
});
|
|
52
312
|
});
|
|
313
|
+
test("should handle server cancelling a request", async () => {
|
|
314
|
+
const server = new Server({
|
|
315
|
+
name: "test server",
|
|
316
|
+
version: "1.0",
|
|
317
|
+
}, {
|
|
318
|
+
capabilities: {
|
|
319
|
+
sampling: {},
|
|
320
|
+
},
|
|
321
|
+
});
|
|
322
|
+
const client = new Client({
|
|
323
|
+
name: "test client",
|
|
324
|
+
version: "1.0",
|
|
325
|
+
}, {
|
|
326
|
+
capabilities: {
|
|
327
|
+
sampling: {},
|
|
328
|
+
},
|
|
329
|
+
});
|
|
330
|
+
// Set up client to delay responding to createMessage
|
|
331
|
+
client.setRequestHandler(CreateMessageRequestSchema, async (_request, extra) => {
|
|
332
|
+
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
333
|
+
return {
|
|
334
|
+
model: "test",
|
|
335
|
+
role: "assistant",
|
|
336
|
+
content: {
|
|
337
|
+
type: "text",
|
|
338
|
+
text: "Test response",
|
|
339
|
+
},
|
|
340
|
+
};
|
|
341
|
+
});
|
|
342
|
+
const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
|
|
343
|
+
await Promise.all([
|
|
344
|
+
client.connect(clientTransport),
|
|
345
|
+
server.connect(serverTransport),
|
|
346
|
+
]);
|
|
347
|
+
// Set up abort controller
|
|
348
|
+
const controller = new AbortController();
|
|
349
|
+
// Issue request but cancel it immediately
|
|
350
|
+
const createMessagePromise = server.createMessage({
|
|
351
|
+
messages: [],
|
|
352
|
+
maxTokens: 10,
|
|
353
|
+
}, {
|
|
354
|
+
signal: controller.signal,
|
|
355
|
+
});
|
|
356
|
+
controller.abort("Cancelled by test");
|
|
357
|
+
// Request should be rejected
|
|
358
|
+
await expect(createMessagePromise).rejects.toBe("Cancelled by test");
|
|
359
|
+
});
|
|
360
|
+
test("should handle request timeout", async () => {
|
|
361
|
+
const server = new Server({
|
|
362
|
+
name: "test server",
|
|
363
|
+
version: "1.0",
|
|
364
|
+
}, {
|
|
365
|
+
capabilities: {
|
|
366
|
+
sampling: {},
|
|
367
|
+
},
|
|
368
|
+
});
|
|
369
|
+
// Set up client that delays responses
|
|
370
|
+
const client = new Client({
|
|
371
|
+
name: "test client",
|
|
372
|
+
version: "1.0",
|
|
373
|
+
}, {
|
|
374
|
+
capabilities: {
|
|
375
|
+
sampling: {},
|
|
376
|
+
},
|
|
377
|
+
});
|
|
378
|
+
client.setRequestHandler(CreateMessageRequestSchema, async (_request, extra) => {
|
|
379
|
+
await new Promise((resolve, reject) => {
|
|
380
|
+
const timeout = setTimeout(resolve, 100);
|
|
381
|
+
extra.signal.addEventListener("abort", () => {
|
|
382
|
+
clearTimeout(timeout);
|
|
383
|
+
reject(extra.signal.reason);
|
|
384
|
+
});
|
|
385
|
+
});
|
|
386
|
+
return {
|
|
387
|
+
model: "test",
|
|
388
|
+
role: "assistant",
|
|
389
|
+
content: {
|
|
390
|
+
type: "text",
|
|
391
|
+
text: "Test response",
|
|
392
|
+
},
|
|
393
|
+
};
|
|
394
|
+
});
|
|
395
|
+
const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
|
|
396
|
+
await Promise.all([
|
|
397
|
+
client.connect(clientTransport),
|
|
398
|
+
server.connect(serverTransport),
|
|
399
|
+
]);
|
|
400
|
+
// Request with 0 msec timeout should fail immediately
|
|
401
|
+
await expect(server.createMessage({
|
|
402
|
+
messages: [],
|
|
403
|
+
maxTokens: 10,
|
|
404
|
+
}, { timeout: 0 })).rejects.toMatchObject({
|
|
405
|
+
code: ErrorCode.RequestTimeout,
|
|
406
|
+
});
|
|
407
|
+
});
|
|
53
408
|
//# sourceMappingURL=index.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../src/server/index.test.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,kDAAkD;AAClD,6DAA6D;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE9E;;EAEE;AACF,IAAI,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