File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -9,11 +9,12 @@ import WebSocket from "ws";
9
9
import express from "express" ;
10
10
import { Client } from "./client/index.js" ;
11
11
import { SSEClientTransport } from "./client/sse.js" ;
12
+ import { StdioClientTransport } from "./client/stdio.js" ;
13
+ import { WebSocketClientTransport } from "./client/websocket.js" ;
12
14
import { Server } from "./server/index.js" ;
13
15
import { SSEServerTransport } from "./server/sse.js" ;
14
- import { WebSocketClientTransport } from "./client/websocket.js" ;
15
- import { StdioClientTransport } from "./client/stdio.js" ;
16
16
import { StdioServerTransport } from "./server/stdio.js" ;
17
+ import { ListResourcesResultSchema } from "./types.js" ;
17
18
18
19
async function runClient ( url_or_command : string , args : string [ ] ) {
19
20
const client = new Client ( {
@@ -46,6 +47,8 @@ async function runClient(url_or_command: string, args: string[]) {
46
47
await client . connect ( clientTransport ) ;
47
48
console . log ( "Initialized." ) ;
48
49
50
+ await client . request ( { method : "resources/list" } , ListResourcesResultSchema ) ;
51
+
49
52
await client . close ( ) ;
50
53
console . log ( "Closed." ) ;
51
54
}
Original file line number Diff line number Diff line change @@ -338,7 +338,7 @@ export const ProgressNotificationSchema = NotificationSchema.extend({
338
338
/**
339
339
* The progress token which was given in the initial request, used to associate this notification with the request that is proceeding.
340
340
*/
341
- progressToken : z . optional ( ProgressTokenSchema ) ,
341
+ progressToken : ProgressTokenSchema ,
342
342
} ) ,
343
343
} ) ;
344
344
@@ -350,7 +350,7 @@ export const PaginatedRequestSchema = RequestSchema.extend({
350
350
* If provided, the server should return results starting after this cursor.
351
351
*/
352
352
cursor : z . optional ( CursorSchema ) ,
353
- } ) ,
353
+ } ) . optional ( ) ,
354
354
} ) ;
355
355
356
356
export const PaginatedResultSchema = ResultSchema . extend ( {
You can’t perform that action at this time.
0 commit comments