tmcp 1.15.1 → 1.15.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tmcp",
3
- "version": "1.15.1",
3
+ "version": "1.15.2",
4
4
  "description": "The main tmcp library",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * @import SqidsType from "sqids";
5
5
  * @import { JSONRPCRequest, JSONRPCParams } from "json-rpc-2.0";
6
6
  * @import { ExtractURITemplateVariables } from "./internal/uri-template.js";
7
- * @import { CallToolResult, ReadResourceResult, GetPromptResult, ServerInfo, ClientCapabilities as ClientCapabilitiesType, JSONRPCRequest as JSONRPCRequestType, JSONRPCResponse, CreateMessageRequestParams, CreateMessageResult, Resource, LoggingLevel, ToolAnnotations, ClientInfo, ElicitResult, Icons as IconsType } from "./validation/index.js";
7
+ * @import { CallToolResult as CallToolResultType, ReadResourceResult as ReadResourceResultType, GetPromptResult as GetPromptResultType, ServerInfo as ServerInfoType, ClientCapabilities as ClientCapabilitiesType, JSONRPCRequest as JSONRPCRequestType, JSONRPCResponse, CreateMessageRequestParams as CreateMessageRequestParamsType, CreateMessageResult as CreateMessageResultType, Resource as ResourceType, LoggingLevel as LoggingLevelType, ToolAnnotations, ClientInfo as ClientInfoType, ElicitResult as ElicitResultType, Icons as IconsType } from "./validation/index.js";
8
8
  * @import { Tool, Completion, Prompt, StoredResource, ServerOptions, SubscriptionsKeys, ChangedArgs, McpEvents } from "./internal/internal.js";
9
9
  */
10
10
  import { JSONRPCClient, JSONRPCServer } from 'json-rpc-2.0';
@@ -57,6 +57,51 @@ import { should_version_negotiation_fail } from './validation/version.js';
57
57
  * @typedef {IconsType} Icons
58
58
  */
59
59
 
60
+ /**
61
+ * @template {Record<string, unknown> | undefined} TStructuredContent
62
+ * @typedef {CallToolResultType<TStructuredContent>} CallToolResult
63
+ */
64
+
65
+ /**
66
+ * @typedef {ReadResourceResultType} ReadResourceResult
67
+ */
68
+
69
+ /**
70
+ * @typedef {GetPromptResultType} GetPromptResult
71
+ */
72
+
73
+ /**
74
+ * @typedef {ClientCapabilitiesType} ClientCapabilities
75
+ */
76
+
77
+ /**
78
+ * @typedef {ServerInfoType} ServerInfo
79
+ */
80
+
81
+ /**
82
+ * @typedef {CreateMessageRequestParamsType} CreateMessageRequestParams
83
+ */
84
+
85
+ /**
86
+ * @typedef {CreateMessageResultType} CreateMessageResult
87
+ */
88
+
89
+ /**
90
+ * @typedef {ResourceType} Resource
91
+ */
92
+
93
+ /**
94
+ * @typedef {LoggingLevelType} LoggingLevel
95
+ */
96
+
97
+ /**
98
+ * @typedef {ClientInfoType} ClientInfo
99
+ */
100
+
101
+ /**
102
+ * @typedef {ElicitResultType} ElicitResult
103
+ */
104
+
60
105
  /**
61
106
  * @type {SqidsType | undefined}
62
107
  */
@@ -97,10 +142,6 @@ async function safe_enabled(enabled) {
97
142
  }
98
143
  }
99
144
 
100
- /**
101
- * @typedef {ClientCapabilitiesType} ClientCapabilities
102
- */
103
-
104
145
  /**
105
146
  * @template {StandardSchemaV1 | undefined} [StandardSchema=undefined]
106
147
  * @template {Record<string, unknown> | undefined} [CustomContext=undefined]
@@ -186,7 +186,17 @@ declare module 'tmcp' {
186
186
  custom?: TCustom | undefined;
187
187
  };
188
188
  export type Icons = Icons_1;
189
+ export type CallToolResult<TStructuredContent extends Record<string, unknown> | undefined> = CallToolResult_1<TStructuredContent>;
190
+ export type ReadResourceResult = ReadResourceResult_1;
191
+ export type GetPromptResult = GetPromptResult_1;
189
192
  export type ClientCapabilities = ClientCapabilities_1;
193
+ export type ServerInfo = ServerInfo_1;
194
+ export type CreateMessageRequestParams = CreateMessageRequestParams_1;
195
+ export type CreateMessageResult = CreateMessageResult_1;
196
+ export type Resource = Resource_1;
197
+ export type LoggingLevel = LoggingLevel_1;
198
+ export type ClientInfo = ClientInfo_1;
199
+ export type ElicitResult = ElicitResult_1;
190
200
  type Completion = (
191
201
  query: string,
192
202
  context: { arguments: Record<string, string> },
@@ -201,7 +211,7 @@ declare module 'tmcp' {
201
211
  prompts?: { size?: number };
202
212
  };
203
213
  logging?: {
204
- default: LoggingLevel;
214
+ default: LoggingLevel_1;
205
215
  }
206
216
  };
207
217
 
@@ -1175,11 +1185,12 @@ declare module 'tmcp' {
1175
1185
  type Icons_1 = v.InferInput<typeof IconsSchema>;
1176
1186
  type ClientCapabilities_1 = v.InferInput<typeof ClientCapabilitiesSchema>;
1177
1187
  type ServerCapabilities = v.InferInput<typeof ServerCapabilitiesSchema>;
1178
- type ServerInfo = v.InferInput<typeof ImplementationSchema> & {
1188
+ type ClientInfo_1 = v.InferInput<typeof ImplementationSchema>;
1189
+ type ServerInfo_1 = v.InferInput<typeof ImplementationSchema> & {
1179
1190
  description?: string;
1180
1191
  };
1181
1192
  type InitializeRequestParams = v.InferInput<typeof InitializeRequestParamsSchema>;
1182
- type CallToolResult<TStructuredContent extends Record<string, unknown> | undefined> = Omit<v.InferInput<typeof CallToolResultSchema>, "structuredContent" | "isError"> & (undefined extends TStructuredContent ? {
1193
+ type CallToolResult_1<TStructuredContent extends Record<string, unknown> | undefined> = Omit<v.InferInput<typeof CallToolResultSchema>, "structuredContent" | "isError"> & (undefined extends TStructuredContent ? {
1183
1194
  structuredContent?: undefined;
1184
1195
  isError?: boolean;
1185
1196
  } : ({
@@ -1189,16 +1200,16 @@ declare module 'tmcp' {
1189
1200
  isError: true;
1190
1201
  structuredContent?: TStructuredContent;
1191
1202
  }));
1192
- type ReadResourceResult = v.InferInput<typeof ReadResourceResultSchema>;
1193
- type GetPromptResult = v.InferInput<typeof GetPromptResultSchema>;
1203
+ type ReadResourceResult_1 = v.InferInput<typeof ReadResourceResultSchema>;
1204
+ type GetPromptResult_1 = v.InferInput<typeof GetPromptResultSchema>;
1194
1205
  type CompleteResult = v.InferInput<typeof CompleteResultSchema>;
1195
- type CreateMessageRequestParams = v.InferInput<typeof CreateMessageRequestParamsSchema>;
1196
- type CreateMessageResult = v.InferInput<typeof CreateMessageResultSchema>;
1197
- type Resource = v.InferInput<typeof ResourceSchema>;
1206
+ type CreateMessageRequestParams_1 = v.InferInput<typeof CreateMessageRequestParamsSchema>;
1207
+ type CreateMessageResult_1 = v.InferInput<typeof CreateMessageResultSchema>;
1208
+ type Resource_1 = v.InferInput<typeof ResourceSchema>;
1198
1209
  type JSONRPCResponse = v.InferInput<typeof JSONRPCResponseSchema>;
1199
- type LoggingLevel = v.InferInput<typeof LoggingLevelSchema>;
1210
+ type LoggingLevel_1 = v.InferInput<typeof LoggingLevelSchema>;
1200
1211
  type ToolAnnotations = v.InferInput<typeof ToolAnnotationsSchema>;
1201
- type ElicitResult = v.InferInput<typeof ElicitResultSchema>;
1212
+ type ElicitResult_1 = v.InferInput<typeof ElicitResultSchema>;
1202
1213
  // Helper type to remove whitespace
1203
1214
  type Trim<S extends string> = S extends ` ${infer R}`
1204
1215
  ? Trim<R>
@@ -4,7 +4,16 @@
4
4
  "names": [
5
5
  "McpServer",
6
6
  "Icons",
7
+ "ReadResourceResult",
8
+ "GetPromptResult",
7
9
  "ClientCapabilities",
10
+ "ServerInfo",
11
+ "CreateMessageRequestParams",
12
+ "CreateMessageResult",
13
+ "Resource",
14
+ "LoggingLevel",
15
+ "ClientInfo",
16
+ "ElicitResult",
8
17
  "Completion",
9
18
  "ServerOptions",
10
19
  "ChangedArgs",
@@ -26,18 +35,10 @@
26
35
  "ElicitResultSchema",
27
36
  "CompleteResultSchema",
28
37
  "ServerCapabilities",
29
- "ServerInfo",
30
38
  "InitializeRequestParams",
31
- "ReadResourceResult",
32
- "GetPromptResult",
33
39
  "CompleteResult",
34
- "CreateMessageRequestParams",
35
- "CreateMessageResult",
36
- "Resource",
37
40
  "JSONRPCResponse",
38
- "LoggingLevel",
39
41
  "ToolAnnotations",
40
- "ElicitResult",
41
42
  "Trim",
42
43
  "ExtractVarName",
43
44
  "SplitVariables",
@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