@modelcontextprotocol/sdk 1.0.4 → 1.1.1

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 CHANGED
@@ -24,6 +24,10 @@ npm install @modelcontextprotocol/sdk
24
24
  ```typescript
25
25
  import { Client } from "@modelcontextprotocol/sdk/client/index.js";
26
26
  import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
27
+ import {
28
+ ListResourcesRequestSchema,
29
+ ReadResourceRequestSchema,
30
+ } from "@modelcontextprotocol/sdk/types.js";
27
31
 
28
32
  const transport = new StdioClientTransport({
29
33
  command: "path/to/server",
@@ -61,6 +65,10 @@ const resourceContent = await client.request(
61
65
  ```typescript
62
66
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
63
67
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
68
+ import {
69
+ ListResourcesRequestSchema,
70
+ ReadResourceRequestSchema,
71
+ } from "@modelcontextprotocol/sdk/types.js";
64
72
 
65
73
  const server = new Server({
66
74
  name: "example-server",
@@ -11,10 +11,15 @@ export declare class SSEClientTransport implements Transport {
11
11
  private _endpoint?;
12
12
  private _abortController?;
13
13
  private _url;
14
+ private _eventSourceInit?;
15
+ private _requestInit?;
14
16
  onclose?: () => void;
15
17
  onerror?: (error: Error) => void;
16
18
  onmessage?: (message: JSONRPCMessage) => void;
17
- constructor(url: URL);
19
+ constructor(url: URL, opts?: {
20
+ eventSourceInit?: EventSourceInit;
21
+ requestInit?: RequestInit;
22
+ });
18
23
  start(): Promise<void>;
19
24
  close(): Promise<void>;
20
25
  send(message: JSONRPCMessage): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"sse.d.ts","sourceRoot":"","sources":["../../src/client/sse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAwB,MAAM,aAAa,CAAC;AAEnE;;;;;GA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AE,eAAe,CAAC;QAAC,WAAW,CAAC,EAAE,WAAW,CAAA;KAAE;IAM7F,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAyDhB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAMtB,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CA6BnD"}
@@ -6,15 +6,17 @@ import { JSONRPCMessageSchema } from "../types.js";
6
6
  * This uses the EventSource API in browsers. You can install the `eventsource` package for Node.js.
7
7
  */
8
8
  export class SSEClientTransport {
9
- constructor(url) {
9
+ constructor(url, opts) {
10
10
  this._url = url;
11
+ this._eventSourceInit = opts === null || opts === void 0 ? void 0 : opts.eventSourceInit;
12
+ this._requestInit = opts === null || opts === void 0 ? void 0 : opts.requestInit;
11
13
  }
12
14
  start() {
13
15
  if (this._eventSource) {
14
16
  throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");
15
17
  }
16
18
  return new Promise((resolve, reject) => {
17
- this._eventSource = new EventSource(this._url.href);
19
+ this._eventSource = new EventSource(this._url.href, this._eventSourceInit);
18
20
  this._abortController = new AbortController();
19
21
  this._eventSource.onerror = (event) => {
20
22
  var _a;
@@ -64,26 +66,28 @@ export class SSEClientTransport {
64
66
  (_c = this.onclose) === null || _c === void 0 ? void 0 : _c.call(this);
65
67
  }
66
68
  async send(message) {
67
- var _a, _b;
69
+ var _a, _b, _c;
68
70
  if (!this._endpoint) {
69
71
  throw new Error("Not connected");
70
72
  }
71
73
  try {
72
- const response = await fetch(this._endpoint, {
74
+ const headers = new Headers((_a = this._requestInit) === null || _a === void 0 ? void 0 : _a.headers);
75
+ headers.set("content-type", "application/json");
76
+ const init = {
77
+ ...this._requestInit,
73
78
  method: "POST",
74
- headers: {
75
- "Content-Type": "application/json",
76
- },
79
+ headers,
77
80
  body: JSON.stringify(message),
78
- signal: (_a = this._abortController) === null || _a === void 0 ? void 0 : _a.signal,
79
- });
81
+ signal: (_b = this._abortController) === null || _b === void 0 ? void 0 : _b.signal
82
+ };
83
+ const response = await fetch(this._endpoint, init);
80
84
  if (!response.ok) {
81
85
  const text = await response.text().catch(() => null);
82
86
  throw new Error(`Error POSTing to endpoint (HTTP ${response.status}): ${text}`);
83
87
  }
84
88
  }
85
89
  catch (error) {
86
- (_b = this.onerror) === null || _b === void 0 ? void 0 : _b.call(this, error);
90
+ (_c = this.onerror) === null || _c === void 0 ? void 0 : _c.call(this, error);
87
91
  throw error;
88
92
  }
89
93
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sse.js","sourceRoot":"","sources":["../../src/client/sse.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnE;;;;;GAKG;AACH,MAAM,OAAO,kBAAkB;IAU7B,YAAY,GAAQ;QAClB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IAClB,CAAC;IAED,KAAK;QACH,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CACb,6GAA6G,CAC9G,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,IAAI,CAAC,YAAY,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACpD,IAAI,CAAC,gBAAgB,GAAG,IAAI,eAAe,EAAE,CAAC;YAE9C,IAAI,CAAC,YAAY,CAAC,OAAO,GAAG,CAAC,KAAK,EAAE,EAAE;;gBACpC,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,cAAc,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBAC/D,MAAM,CAAC,KAAK,CAAC,CAAC;gBACd,MAAA,IAAI,CAAC,OAAO,qDAAG,KAAK,CAAC,CAAC;YACxB,CAAC,CAAC;YAEF,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,GAAG,EAAE;gBAC9B,+EA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B;IAEF;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAY5B,OAAO,CAAC,iBAAiB;IAenB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAkB5B,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAU7C"}
@@ -49,8 +49,17 @@ export class StdioServerTransport {
49
49
  }
50
50
  async close() {
51
51
  var _a;
52
+ // Remove our event listeners first
52
53
  this._stdin.off("data", this._ondata);
53
54
  this._stdin.off("error", this._onerror);
55
+ // Check if we were the only data listener
56
+ const remainingDataListeners = this._stdin.listenerCount('data');
57
+ if (remainingDataListeners === 0) {
58
+ // Only pause stdin if we were the only listener
59
+ // This prevents interfering with other parts of the application that might be using stdin
60
+ this._stdin.pause();
61
+ }
62
+ // Clear the buffer and notify closure
54
63
  this._readBuffer.clear();
55
64
  (_a = this.onclose) === null || _a === void 0 ? void 0 : _a.call(this);
56
65
  }
@@ -1 +1 @@
1
- {"version":3,"file":"stdio.js","sourceRoot":"","sources":["../../src/server/stdio.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAIlE;;;;GAIG;AACH,MAAM,OAAO,oBAAoB;IAI/B,YACU,SAAmB,OAAO,CAAC,KAAK,EAChC,UAAoB,OAAO,CAAC,MAAM;QADlC,WAAM,GAAN,MAAM,CAA0B;QAChC,YAAO,GAAP,OAAO,CAA2B;QALpC,gBAAW,GAAe,IAAI,UAAU,EAAE,CAAC;QAC3C,aAAQ,GAAG,KAAK,CAAC;QAWzB,gFAAgF;QAChF,YAAO,GAAG,CAAC,KAAa,EAAE,EAAE;YAC1B,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAC/B,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAC3B,CAAC,CAAC;QACF,aAAQ,GAAG,CA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C,OAAO,CAAC,CAAC;YACvC,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC7B,OAAO,EAAE,CAAC;YACZ,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACtC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import { z, ZodTypeAny } from "zod";
2
2
  export declare const LATEST_PROTOCOL_VERSION = "2024-11-05";
3
3
  export declare const SUPPORTED_PROTOCOL_VERSIONS: string[];
4
4
  export declare const JSONRPC_VERSION = "2.0";
@@ -347,11 +347,11 @@ export declare const JSONRPCResponseSchema: z.ZodObject<{
347
347
  };
348
348
  }>;
349
349
  /**
350
- * An incomplete set of error codes that may appear in JSON-RPC responses.
350
+ * Error codes defined by the JSON-RPC specification.
351
351
  */
352
352
  export declare enum ErrorCode {
353
- ConnectionClosed = -1,
354
- RequestTimeout = -2,
353
+ ConnectionClosed = -32000,
354
+ RequestTimeout = -32001,
355
355
  ParseError = -32700,
356
356
  InvalidRequest = -32600,
357
357
  MethodNotFound = -32601,
@@ -26345,81 +26345,87 @@ export declare class McpError extends Error {
26345
26345
  readonly data?: unknown;
26346
26346
  constructor(code: number, message: string, data?: unknown);
26347
26347
  }
26348
- export type ProgressToken = z.infer<typeof ProgressTokenSchema>;
26349
- export type Cursor = z.infer<typeof CursorSchema>;
26350
- export type Request = z.infer<typeof RequestSchema>;
26351
- export type Notification = z.infer<typeof NotificationSchema>;
26352
- export type Result = z.infer<typeof ResultSchema>;
26353
- export type RequestId = z.infer<typeof RequestIdSchema>;
26354
- export type JSONRPCRequest = z.infer<typeof JSONRPCRequestSchema>;
26355
- export type JSONRPCNotification = z.infer<typeof JSONRPCNotificationSchema>;
26356
- export type JSONRPCResponse = z.infer<typeof JSONRPCResponseSchema>;
26357
- export type JSONRPCError = z.infer<typeof JSONRPCErrorSchema>;
26358
- export type JSONRPCMessage = z.infer<typeof JSONRPCMessageSchema>;
26359
- export type EmptyResult = z.infer<typeof EmptyResultSchema>;
26360
- export type CancelledNotification = z.infer<typeof CancelledNotificationSchema>;
26361
- export type Implementation = z.infer<typeof ImplementationSchema>;
26362
- export type ClientCapabilities = z.infer<typeof ClientCapabilitiesSchema>;
26363
- export type InitializeRequest = z.infer<typeof InitializeRequestSchema>;
26364
- export type ServerCapabilities = z.infer<typeof ServerCapabilitiesSchema>;
26365
- export type InitializeResult = z.infer<typeof InitializeResultSchema>;
26366
- export type InitializedNotification = z.infer<typeof InitializedNotificationSchema>;
26367
- export type PingRequest = z.infer<typeof PingRequestSchema>;
26368
- export type Progress = z.infer<typeof ProgressSchema>;
26369
- export type ProgressNotification = z.infer<typeof ProgressNotificationSchema>;
26370
- export type PaginatedRequest = z.infer<typeof PaginatedRequestSchema>;
26371
- export type PaginatedResult = z.infer<typeof PaginatedResultSchema>;
26372
- export type ResourceContents = z.infer<typeof ResourceContentsSchema>;
26373
- export type TextResourceContents = z.infer<typeof TextResourceContentsSchema>;
26374
- export type BlobResourceContents = z.infer<typeof BlobResourceContentsSchema>;
26375
- export type Resource = z.infer<typeof ResourceSchema>;
26376
- export type ResourceTemplate = z.infer<typeof ResourceTemplateSchema>;
26377
- export type ListResourcesRequest = z.infer<typeof ListResourcesRequestSchema>;
26378
- export type ListResourcesResult = z.infer<typeof ListResourcesResultSchema>;
26379
- export type ListResourceTemplatesRequest = z.infer<typeof ListResourceTemplatesRequestSchema>;
26380
- export type ListResourceTemplatesResult = z.infer<typeof ListResourceTemplatesResultSchema>;
26381
- export type ReadResourceRequest = z.infer<typeof ReadResourceRequestSchema>;
26382
- export type ReadResourceResult = z.infer<typeof ReadResourceResultSchema>;
26383
- export type ResourceListChangedNotification = z.infer<typeof ResourceListChangedNotificationSchema>;
26384
- export type SubscribeRequest = z.infer<typeof SubscribeRequestSchema>;
26385
- export type UnsubscribeRequest = z.infer<typeof UnsubscribeRequestSchema>;
26386
- export type ResourceUpdatedNotification = z.infer<typeof ResourceUpdatedNotificationSchema>;
26387
- export type PromptArgument = z.infer<typeof PromptArgumentSchema>;
26388
- export type Prompt = z.infer<typeof PromptSchema>;
26389
- export type ListPromptsRequest = z.infer<typeof ListPromptsRequestSchema>;
26390
- export type ListPromptsResult = z.infer<typeof ListPromptsResultSchema>;
26391
- export type GetPromptRequest = z.infer<typeof GetPromptRequestSchema>;
26392
- export type TextContent = z.infer<typeof TextContentSchema>;
26393
- export type ImageContent = z.infer<typeof ImageContentSchema>;
26394
- export type EmbeddedResource = z.infer<typeof EmbeddedResourceSchema>;
26395
- export type PromptMessage = z.infer<typeof PromptMessageSchema>;
26396
- export type GetPromptResult = z.infer<typeof GetPromptResultSchema>;
26397
- export type PromptListChangedNotification = z.infer<typeof PromptListChangedNotificationSchema>;
26398
- export type Tool = z.infer<typeof ToolSchema>;
26399
- export type ListToolsRequest = z.infer<typeof ListToolsRequestSchema>;
26400
- export type ListToolsResult = z.infer<typeof ListToolsResultSchema>;
26401
- export type CallToolResult = z.infer<typeof CallToolResultSchema>;
26402
- export type CompatibilityCallToolResult = z.infer<typeof CompatibilityCallToolResultSchema>;
26403
- export type CallToolRequest = z.infer<typeof CallToolRequestSchema>;
26404
- export type ToolListChangedNotification = z.infer<typeof ToolListChangedNotificationSchema>;
26405
- export type LoggingLevel = z.infer<typeof LoggingLevelSchema>;
26406
- export type SetLevelRequest = z.infer<typeof SetLevelRequestSchema>;
26407
- export type LoggingMessageNotification = z.infer<typeof LoggingMessageNotificationSchema>;
26408
- export type SamplingMessage = z.infer<typeof SamplingMessageSchema>;
26409
- export type CreateMessageRequest = z.infer<typeof CreateMessageRequestSchema>;
26410
- export type CreateMessageResult = z.infer<typeof CreateMessageResultSchema>;
26411
- export type ResourceReference = z.infer<typeof ResourceReferenceSchema>;
26412
- export type PromptReference = z.infer<typeof PromptReferenceSchema>;
26413
- export type CompleteRequest = z.infer<typeof CompleteRequestSchema>;
26414
- export type CompleteResult = z.infer<typeof CompleteResultSchema>;
26415
- export type Root = z.infer<typeof RootSchema>;
26416
- export type ListRootsRequest = z.infer<typeof ListRootsRequestSchema>;
26417
- export type ListRootsResult = z.infer<typeof ListRootsResultSchema>;
26418
- export type RootsListChangedNotification = z.infer<typeof RootsListChangedNotificationSchema>;
26419
- export type ClientRequest = z.infer<typeof ClientRequestSchema>;
26420
- export type ClientNotification = z.infer<typeof ClientNotificationSchema>;
26421
- export type ClientResult = z.infer<typeof ClientResultSchema>;
26422
- export type ServerRequest = z.infer<typeof ServerRequestSchema>;
26423
- export type ServerNotification = z.infer<typeof ServerNotificationSchema>;
26424
- export type ServerResult = z.infer<typeof ServerResultSchema>;
26348
+ type Primitive = string | number | boolean | bigint | null | undefined;
26349
+ type Flatten<T> = T extends Primitive ? T : T extends Array<infer U> ? Array<Flatten<U>> : T extends Set<infer U> ? Set<Flatten<U>> : T extends Map<infer K, infer V> ? Map<Flatten<K>, Flatten<V>> : T extends object ? {
26350
+ [K in keyof T]: Flatten<T[K]>;
26351
+ } : T;
26352
+ type Infer<Schema extends ZodTypeAny> = Flatten<z.infer<Schema>>;
26353
+ export type ProgressToken = Infer<typeof ProgressTokenSchema>;
26354
+ export type Cursor = Infer<typeof CursorSchema>;
26355
+ export type Request = Infer<typeof RequestSchema>;
26356
+ export type Notification = Infer<typeof NotificationSchema>;
26357
+ export type Result = Infer<typeof ResultSchema>;
26358
+ export type RequestId = Infer<typeof RequestIdSchema>;
26359
+ export type JSONRPCRequest = Infer<typeof JSONRPCRequestSchema>;
26360
+ export type JSONRPCNotification = Infer<typeof JSONRPCNotificationSchema>;
26361
+ export type JSONRPCResponse = Infer<typeof JSONRPCResponseSchema>;
26362
+ export type JSONRPCError = Infer<typeof JSONRPCErrorSchema>;
26363
+ export type JSONRPCMessage = Infer<typeof JSONRPCMessageSchema>;
26364
+ export type EmptyResult = Infer<typeof EmptyResultSchema>;
26365
+ export type CancelledNotification = Infer<typeof CancelledNotificationSchema>;
26366
+ export type Implementation = Infer<typeof ImplementationSchema>;
26367
+ export type ClientCapabilities = Infer<typeof ClientCapabilitiesSchema>;
26368
+ export type InitializeRequest = Infer<typeof InitializeRequestSchema>;
26369
+ export type ServerCapabilities = Infer<typeof ServerCapabilitiesSchema>;
26370
+ export type InitializeResult = Infer<typeof InitializeResultSchema>;
26371
+ export type InitializedNotification = Infer<typeof InitializedNotificationSchema>;
26372
+ export type PingRequest = Infer<typeof PingRequestSchema>;
26373
+ export type Progress = Infer<typeof ProgressSchema>;
26374
+ export type ProgressNotification = Infer<typeof ProgressNotificationSchema>;
26375
+ export type PaginatedRequest = Infer<typeof PaginatedRequestSchema>;
26376
+ export type PaginatedResult = Infer<typeof PaginatedResultSchema>;
26377
+ export type ResourceContents = Infer<typeof ResourceContentsSchema>;
26378
+ export type TextResourceContents = Infer<typeof TextResourceContentsSchema>;
26379
+ export type BlobResourceContents = Infer<typeof BlobResourceContentsSchema>;
26380
+ export type Resource = Infer<typeof ResourceSchema>;
26381
+ export type ResourceTemplate = Infer<typeof ResourceTemplateSchema>;
26382
+ export type ListResourcesRequest = Infer<typeof ListResourcesRequestSchema>;
26383
+ export type ListResourcesResult = Infer<typeof ListResourcesResultSchema>;
26384
+ export type ListResourceTemplatesRequest = Infer<typeof ListResourceTemplatesRequestSchema>;
26385
+ export type ListResourceTemplatesResult = Infer<typeof ListResourceTemplatesResultSchema>;
26386
+ export type ReadResourceRequest = Infer<typeof ReadResourceRequestSchema>;
26387
+ export type ReadResourceResult = Infer<typeof ReadResourceResultSchema>;
26388
+ export type ResourceListChangedNotification = Infer<typeof ResourceListChangedNotificationSchema>;
26389
+ export type SubscribeRequest = Infer<typeof SubscribeRequestSchema>;
26390
+ export type UnsubscribeRequest = Infer<typeof UnsubscribeRequestSchema>;
26391
+ export type ResourceUpdatedNotification = Infer<typeof ResourceUpdatedNotificationSchema>;
26392
+ export type PromptArgument = Infer<typeof PromptArgumentSchema>;
26393
+ export type Prompt = Infer<typeof PromptSchema>;
26394
+ export type ListPromptsRequest = Infer<typeof ListPromptsRequestSchema>;
26395
+ export type ListPromptsResult = Infer<typeof ListPromptsResultSchema>;
26396
+ export type GetPromptRequest = Infer<typeof GetPromptRequestSchema>;
26397
+ export type TextContent = Infer<typeof TextContentSchema>;
26398
+ export type ImageContent = Infer<typeof ImageContentSchema>;
26399
+ export type EmbeddedResource = Infer<typeof EmbeddedResourceSchema>;
26400
+ export type PromptMessage = Infer<typeof PromptMessageSchema>;
26401
+ export type GetPromptResult = Infer<typeof GetPromptResultSchema>;
26402
+ export type PromptListChangedNotification = Infer<typeof PromptListChangedNotificationSchema>;
26403
+ export type Tool = Infer<typeof ToolSchema>;
26404
+ export type ListToolsRequest = Infer<typeof ListToolsRequestSchema>;
26405
+ export type ListToolsResult = Infer<typeof ListToolsResultSchema>;
26406
+ export type CallToolResult = Infer<typeof CallToolResultSchema>;
26407
+ export type CompatibilityCallToolResult = Infer<typeof CompatibilityCallToolResultSchema>;
26408
+ export type CallToolRequest = Infer<typeof CallToolRequestSchema>;
26409
+ export type ToolListChangedNotification = Infer<typeof ToolListChangedNotificationSchema>;
26410
+ export type LoggingLevel = Infer<typeof LoggingLevelSchema>;
26411
+ export type SetLevelRequest = Infer<typeof SetLevelRequestSchema>;
26412
+ export type LoggingMessageNotification = Infer<typeof LoggingMessageNotificationSchema>;
26413
+ export type SamplingMessage = Infer<typeof SamplingMessageSchema>;
26414
+ export type CreateMessageRequest = Infer<typeof CreateMessageRequestSchema>;
26415
+ export type CreateMessageResult = Infer<typeof CreateMessageResultSchema>;
26416
+ export type ResourceReference = Infer<typeof ResourceReferenceSchema>;
26417
+ export type PromptReference = Infer<typeof PromptReferenceSchema>;
26418
+ export type CompleteRequest = Infer<typeof CompleteRequestSchema>;
26419
+ export type CompleteResult = Infer<typeof CompleteResultSchema>;
26420
+ export type Root = Infer<typeof RootSchema>;
26421
+ export type ListRootsRequest = Infer<typeof ListRootsRequestSchema>;
26422
+ export type ListRootsResult = Infer<typeof ListRootsResultSchema>;
26423
+ export type RootsListChangedNotification = Infer<typeof RootsListChangedNotificationSchema>;
26424
+ export type ClientRequest = Infer<typeof ClientRequestSchema>;
26425
+ export type ClientNotification = Infer<typeof ClientNotificationSchema>;
26426
+ export type ClientResult = Infer<typeof ClientResultSchema>;
26427
+ export type ServerRequest = Infer<typeof ServerRequestSchema>;
26428
+ export type ServerNotification = Infer<typeof ServerNotificationSchema>;
26429
+ export type ServerResult = Infer<typeof ServerResultSchema>;
26430
+ export {};
26425
26431
  //# sourceMappingURL=types.d.ts.map