@settlemint/sdk-mcp 2.2.2-prdc5c6b48 → 2.2.2-pred370357

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/dist/mcp.js CHANGED
@@ -14412,6 +14412,10 @@ var require_permessage_deflate = __commonJS((exports, module) => {
14412
14412
  }
14413
14413
  function inflateOnError(err) {
14414
14414
  this[kPerMessageDeflate]._inflate = null;
14415
+ if (this[kError]) {
14416
+ this[kCallback](this[kError]);
14417
+ return;
14418
+ }
14415
14419
  err[kStatusCode] = 1007;
14416
14420
  this[kCallback](err);
14417
14421
  }
@@ -16055,7 +16059,7 @@ var require_websocket = __commonJS((exports, module) => {
16055
16059
  const isIpcUrl = parsedUrl.protocol === "ws+unix:";
16056
16060
  let invalidUrlMessage;
16057
16061
  if (parsedUrl.protocol !== "ws:" && !isSecure && !isIpcUrl) {
16058
- invalidUrlMessage = `The URL's protocol must be one of "ws:", "wss:", ` + '"http:", "https", or "ws+unix:"';
16062
+ invalidUrlMessage = `The URL's protocol must be one of "ws:", "wss:", ` + '"http:", "https:", or "ws+unix:"';
16059
16063
  } else if (isIpcUrl && !parsedUrl.pathname) {
16060
16064
  invalidUrlMessage = "The URL's pathname is empty";
16061
16065
  } else if (parsedUrl.hash) {
@@ -52956,18 +52960,20 @@ var z = /* @__PURE__ */ Object.freeze({
52956
52960
  });
52957
52961
 
52958
52962
  // ../../node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
52959
- var LATEST_PROTOCOL_VERSION = "2024-11-05";
52963
+ var LATEST_PROTOCOL_VERSION = "2025-03-26";
52960
52964
  var SUPPORTED_PROTOCOL_VERSIONS = [
52961
52965
  LATEST_PROTOCOL_VERSION,
52966
+ "2024-11-05",
52962
52967
  "2024-10-07"
52963
52968
  ];
52964
52969
  var JSONRPC_VERSION = "2.0";
52965
52970
  var ProgressTokenSchema = z.union([z.string(), z.number().int()]);
52966
52971
  var CursorSchema = z.string();
52972
+ var RequestMetaSchema = z.object({
52973
+ progressToken: z.optional(ProgressTokenSchema)
52974
+ }).passthrough();
52967
52975
  var BaseRequestParamsSchema = z.object({
52968
- _meta: z.optional(z.object({
52969
- progressToken: z.optional(ProgressTokenSchema)
52970
- }).passthrough())
52976
+ _meta: z.optional(RequestMetaSchema)
52971
52977
  }).passthrough();
52972
52978
  var RequestSchema = z.object({
52973
52979
  method: z.string(),
@@ -53218,13 +53224,21 @@ var GetPromptResultSchema = ResultSchema.extend({
53218
53224
  var PromptListChangedNotificationSchema = NotificationSchema.extend({
53219
53225
  method: z.literal("notifications/prompts/list_changed")
53220
53226
  });
53227
+ var ToolAnnotationsSchema = z.object({
53228
+ title: z.optional(z.string()),
53229
+ readOnlyHint: z.optional(z.boolean()),
53230
+ destructiveHint: z.optional(z.boolean()),
53231
+ idempotentHint: z.optional(z.boolean()),
53232
+ openWorldHint: z.optional(z.boolean())
53233
+ }).passthrough();
53221
53234
  var ToolSchema = z.object({
53222
53235
  name: z.string(),
53223
53236
  description: z.optional(z.string()),
53224
53237
  inputSchema: z.object({
53225
53238
  type: z.literal("object"),
53226
53239
  properties: z.optional(z.object({}).passthrough())
53227
- }).passthrough()
53240
+ }).passthrough(),
53241
+ annotations: z.optional(ToolAnnotationsSchema)
53228
53242
  }).passthrough();
53229
53243
  var ListToolsRequestSchema = PaginatedRequestSchema.extend({
53230
53244
  method: z.literal("tools/list")
@@ -53507,7 +53521,7 @@ class Protocol {
53507
53521
  Promise.resolve().then(() => handler(notification)).catch((error) => this._onerror(new Error(`Uncaught error in notification handler: ${error}`)));
53508
53522
  }
53509
53523
  _onrequest(request, extra) {
53510
- var _a, _b, _c;
53524
+ var _a, _b, _c, _d;
53511
53525
  const handler = (_a = this._requestHandlers.get(request.method)) !== null && _a !== undefined ? _a : this.fallbackRequestHandler;
53512
53526
  if (handler === undefined) {
53513
53527
  (_b = this._transport) === null || _b === undefined || _b.send({
@@ -53525,9 +53539,11 @@ class Protocol {
53525
53539
  const fullExtra = {
53526
53540
  signal: abortController.signal,
53527
53541
  sessionId: (_c = this._transport) === null || _c === undefined ? undefined : _c.sessionId,
53542
+ _meta: (_d = request.params) === null || _d === undefined ? undefined : _d._meta,
53528
53543
  sendNotification: (notification) => this.notification(notification, { relatedRequestId: request.id }),
53529
53544
  sendRequest: (r, resultSchema, options) => this.request(r, resultSchema, { ...options, relatedRequestId: request.id }),
53530
- authInfo: extra === null || extra === undefined ? undefined : extra.authInfo
53545
+ authInfo: extra === null || extra === undefined ? undefined : extra.authInfo,
53546
+ requestId: request.id
53531
53547
  };
53532
53548
  Promise.resolve().then(() => handler(request, fullExtra)).then((result) => {
53533
53549
  var _a2;
@@ -55157,7 +55173,8 @@ class McpServer {
55157
55173
  description: tool.description,
55158
55174
  inputSchema: tool.inputSchema ? zodToJsonSchema(tool.inputSchema, {
55159
55175
  strictUnions: true
55160
- }) : EMPTY_OBJECT_JSON_SCHEMA
55176
+ }) : EMPTY_OBJECT_JSON_SCHEMA,
55177
+ annotations: tool.annotations
55161
55178
  };
55162
55179
  })
55163
55180
  }));
@@ -55442,18 +55459,33 @@ class McpServer {
55442
55459
  if (this._registeredTools[name]) {
55443
55460
  throw new Error(`Tool ${name} is already registered`);
55444
55461
  }
55462
+ const isZodRawShape = (obj) => {
55463
+ if (typeof obj !== "object" || obj === null)
55464
+ return false;
55465
+ return Object.values(obj).some((v) => v instanceof ZodType);
55466
+ };
55445
55467
  let description;
55446
55468
  if (typeof rest[0] === "string") {
55447
55469
  description = rest.shift();
55448
55470
  }
55449
55471
  let paramsSchema;
55472
+ let annotations;
55450
55473
  if (rest.length > 1) {
55451
- paramsSchema = rest.shift();
55474
+ const firstArg = rest[0];
55475
+ if (isZodRawShape(firstArg)) {
55476
+ paramsSchema = rest.shift();
55477
+ if (rest.length > 1 && typeof rest[0] === "object" && rest[0] !== null && !isZodRawShape(rest[0])) {
55478
+ annotations = rest.shift();
55479
+ }
55480
+ } else if (typeof firstArg === "object" && firstArg !== null) {
55481
+ annotations = rest.shift();
55482
+ }
55452
55483
  }
55453
55484
  const cb = rest[0];
55454
55485
  const registeredTool = {
55455
55486
  description,
55456
55487
  inputSchema: paramsSchema === undefined ? undefined : z.object(paramsSchema),
55488
+ annotations,
55457
55489
  callback: cb,
55458
55490
  enabled: true,
55459
55491
  disable: () => registeredTool.update({ enabled: false }),
@@ -55471,6 +55503,8 @@ class McpServer {
55471
55503
  registeredTool.inputSchema = z.object(updates.paramsSchema);
55472
55504
  if (typeof updates.callback !== "undefined")
55473
55505
  registeredTool.callback = updates.callback;
55506
+ if (typeof updates.annotations !== "undefined")
55507
+ registeredTool.annotations = updates.annotations;
55474
55508
  if (typeof updates.enabled !== "undefined")
55475
55509
  registeredTool.enabled = updates.enabled;
55476
55510
  this.sendToolListChanged();
@@ -61234,7 +61268,7 @@ var {
61234
61268
  var package_default = {
61235
61269
  name: "@settlemint/sdk-mcp",
61236
61270
  description: "MCP interface for SettleMint SDK, providing development tools and project management capabilities",
61237
- version: "2.2.2-prdc5c6b48",
61271
+ version: "2.2.2-pred370357",
61238
61272
  type: "module",
61239
61273
  private: false,
61240
61274
  license: "FSL-1.1-MIT",
@@ -61275,9 +61309,9 @@ var package_default = {
61275
61309
  dependencies: {
61276
61310
  "@graphql-tools/load": "8.1.0",
61277
61311
  "@graphql-tools/url-loader": "8.0.31",
61278
- "@modelcontextprotocol/sdk": "1.10.2",
61279
- "@settlemint/sdk-js": "2.2.2-prdc5c6b48",
61280
- "@settlemint/sdk-utils": "2.2.2-prdc5c6b48",
61312
+ "@modelcontextprotocol/sdk": "1.11.0",
61313
+ "@settlemint/sdk-js": "2.2.2-pred370357",
61314
+ "@settlemint/sdk-utils": "2.2.2-pred370357",
61281
61315
  "@commander-js/extra-typings": "11.1.0",
61282
61316
  commander: "11.1.0",
61283
61317
  zod: "3.24.3"
@@ -67025,4 +67059,4 @@ await main().catch((error2) => {
67025
67059
  process.exit(1);
67026
67060
  });
67027
67061
 
67028
- //# debugId=EE075A5B25FEA07964756E2164756E21
67062
+ //# debugId=016F1C595DECA78264756E2164756E21