@settlemint/sdk-mcp 2.4.0-pre8513221 → 2.4.0-pre98cfd17

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
@@ -59939,21 +59939,14 @@ class Protocol {
59939
59939
  }
59940
59940
  }
59941
59941
  async connect(transport) {
59942
- var _a, _b, _c;
59943
59942
  this._transport = transport;
59944
- const _onclose = (_a = this.transport) === null || _a === undefined ? undefined : _a.onclose;
59945
59943
  this._transport.onclose = () => {
59946
- _onclose === null || _onclose === undefined || _onclose();
59947
59944
  this._onclose();
59948
59945
  };
59949
- const _onerror = (_b = this.transport) === null || _b === undefined ? undefined : _b.onerror;
59950
59946
  this._transport.onerror = (error) => {
59951
- _onerror === null || _onerror === undefined || _onerror(error);
59952
59947
  this._onerror(error);
59953
59948
  };
59954
- const _onmessage = (_c = this._transport) === null || _c === undefined ? undefined : _c.onmessage;
59955
59949
  this._transport.onmessage = (message, extra) => {
59956
- _onmessage === null || _onmessage === undefined || _onmessage(message, extra);
59957
59950
  if (isJSONRPCResponse(message) || isJSONRPCError(message)) {
59958
59951
  this._onresponse(message);
59959
59952
  } else if (isJSONRPCRequest(message)) {
@@ -60013,8 +60006,7 @@ class Protocol {
60013
60006
  sendNotification: (notification) => this.notification(notification, { relatedRequestId: request.id }),
60014
60007
  sendRequest: (r, resultSchema, options) => this.request(r, resultSchema, { ...options, relatedRequestId: request.id }),
60015
60008
  authInfo: extra === null || extra === undefined ? undefined : extra.authInfo,
60016
- requestId: request.id,
60017
- requestInfo: extra === null || extra === undefined ? undefined : extra.requestInfo
60009
+ requestId: request.id
60018
60010
  };
60019
60011
  Promise.resolve().then(() => handler(request, fullExtra)).then((result) => {
60020
60012
  var _a2;
@@ -61729,7 +61721,7 @@ class McpServer {
61729
61721
  };
61730
61722
  }
61731
61723
  }
61732
- if (tool.outputSchema && !result.isError) {
61724
+ if (tool.outputSchema) {
61733
61725
  if (!result.structuredContent) {
61734
61726
  throw new McpError(ErrorCode.InvalidParams, `Tool ${request.params.name} has an output schema but no structured content was provided`);
61735
61727
  }
@@ -73562,9 +73554,9 @@ ${formattedErrors}`);
73562
73554
  throw error$37;
73563
73555
  }
73564
73556
  }
73565
- var ApplicationAccessTokenSchema = string$1().regex(/^sm_aat_.+$/);
73566
- var PersonalAccessTokenSchema = string$1().regex(/^sm_pat_.+$/);
73567
- var AccessTokenSchema = string$1().regex(/^(sm_pat_.+|sm_aat_.+)$/);
73557
+ var ApplicationAccessTokenSchema = string$1().regex(/^sm_aat_.*$/);
73558
+ var PersonalAccessTokenSchema = string$1().regex(/^sm_pat_.*$/);
73559
+ var AccessTokenSchema = string$1().regex(/^sm_pat_.*|sm_aat_.*$/);
73568
73560
  function tryParseJson(value, defaultValue = null) {
73569
73561
  try {
73570
73562
  const parsed = JSON.parse(value);
@@ -73572,7 +73564,7 @@ function tryParseJson(value, defaultValue = null) {
73572
73564
  return defaultValue;
73573
73565
  }
73574
73566
  return parsed;
73575
- } catch (_err) {
73567
+ } catch (err) {
73576
73568
  return defaultValue;
73577
73569
  }
73578
73570
  }
@@ -90303,9 +90295,9 @@ ${formattedErrors}`);
90303
90295
  throw error$372;
90304
90296
  }
90305
90297
  }
90306
- var ApplicationAccessTokenSchema2 = string$12().regex(/^sm_aat_.+$/);
90307
- var PersonalAccessTokenSchema2 = string$12().regex(/^sm_pat_.+$/);
90308
- var AccessTokenSchema2 = string$12().regex(/^(sm_pat_.+|sm_aat_.+)$/);
90298
+ var ApplicationAccessTokenSchema2 = string$12().regex(/^sm_aat_.*$/);
90299
+ var PersonalAccessTokenSchema2 = string$12().regex(/^sm_pat_.*$/);
90300
+ var AccessTokenSchema2 = string$12().regex(/^sm_pat_.*|sm_aat_.*$/);
90309
90301
  function tryParseJson2(value, defaultValue = null) {
90310
90302
  try {
90311
90303
  const parsed = JSON.parse(value);
@@ -90313,7 +90305,7 @@ function tryParseJson2(value, defaultValue = null) {
90313
90305
  return defaultValue;
90314
90306
  }
90315
90307
  return parsed;
90316
- } catch (_err) {
90308
+ } catch (err) {
90317
90309
  return defaultValue;
90318
90310
  }
90319
90311
  }
@@ -90397,7 +90389,7 @@ var {
90397
90389
  var package_default = {
90398
90390
  name: "@settlemint/sdk-mcp",
90399
90391
  description: "MCP interface for SettleMint SDK, providing development tools and project management capabilities",
90400
- version: "2.4.0-pre8513221",
90392
+ version: "2.4.0-pre98cfd17",
90401
90393
  type: "module",
90402
90394
  private: false,
90403
90395
  license: "FSL-1.1-MIT",
@@ -90416,9 +90408,7 @@ var package_default = {
90416
90408
  url: "https://github.com/settlemint/sdk/issues",
90417
90409
  email: "support@settlemint.com"
90418
90410
  },
90419
- files: [
90420
- "dist"
90421
- ],
90411
+ files: ["dist"],
90422
90412
  exports: {
90423
90413
  "./*": {
90424
90414
  types: "./dist/*.d.ts",
@@ -90440,9 +90430,9 @@ var package_default = {
90440
90430
  dependencies: {
90441
90431
  "@graphql-tools/load": "8.1.0",
90442
90432
  "@graphql-tools/url-loader": "8.0.31",
90443
- "@modelcontextprotocol/sdk": "1.13.2",
90444
- "@settlemint/sdk-js": "2.4.0-pre8513221",
90445
- "@settlemint/sdk-utils": "2.4.0-pre8513221",
90433
+ "@modelcontextprotocol/sdk": "1.13.0",
90434
+ "@settlemint/sdk-js": "2.4.0-pre98cfd17",
90435
+ "@settlemint/sdk-utils": "2.4.0-pre98cfd17",
90446
90436
  "@commander-js/extra-typings": "14.0.0",
90447
90437
  commander: "14.0.0",
90448
90438
  zod: "^3.25.0"
@@ -91273,7 +91263,7 @@ var processFieldTypes = (fields2, schema, collectedTypes) => {
91273
91263
  }
91274
91264
  };
91275
91265
  var collectCustomTypes = (type, schema, collectedTypes = new Set) => {
91276
- const typeName = type.toString().replace(/[[\]!]/g, "");
91266
+ const typeName = type.toString().replace(/[\[\]!]/g, "");
91277
91267
  if (collectedTypes.has(typeName) || ["String", "Int", "Float", "Boolean", "ID"].includes(typeName)) {
91278
91268
  return collectedTypes;
91279
91269
  }
@@ -106599,6 +106589,21 @@ var promptsGet = (server, _env) => {
106599
106589
  try {
106600
106590
  const promptsDir = path2.resolve(__dirname, "../../prompts");
106601
106591
  const promptPath = path2.join(promptsDir, category, `${name2}.ts`);
106592
+ try {
106593
+ await fs.access(promptPath);
106594
+ } catch (error41) {
106595
+ return {
106596
+ content: [
106597
+ {
106598
+ type: "text",
106599
+ name: "Prompt Not Found",
106600
+ description: `Prompt '${name2}' in category '${category}' not found`,
106601
+ mimeType: "text/plain",
106602
+ text: `Prompt '${name2}' in category '${category}' does not exist. Use the prompts-list tool to see available prompts.`
106603
+ }
106604
+ ]
106605
+ };
106606
+ }
106602
106607
  const fileContent = await fs.readFile(promptPath, "utf-8");
106603
106608
  return {
106604
106609
  content: [
@@ -106612,19 +106617,6 @@ var promptsGet = (server, _env) => {
106612
106617
  ]
106613
106618
  };
106614
106619
  } catch (error41) {
106615
- if (error41 instanceof Error && "code" in error41 && error41.code === "ENOENT") {
106616
- return {
106617
- content: [
106618
- {
106619
- type: "text",
106620
- name: "Prompt Not Found",
106621
- description: `Prompt '${name2}' in category '${category}' not found`,
106622
- mimeType: "text/plain",
106623
- text: `Prompt '${name2}' in category '${category}' does not exist. Use the prompts-list tool to see available prompts.`
106624
- }
106625
- ]
106626
- };
106627
- }
106628
106620
  return {
106629
106621
  content: [
106630
106622
  {
@@ -106715,6 +106707,21 @@ var resourcesGet = (server, _env) => {
106715
106707
  try {
106716
106708
  const resourcesDir = path4.resolve(__dirname, "../../resources");
106717
106709
  const resourcePath = path4.join(resourcesDir, `${name2}.ts`);
106710
+ try {
106711
+ await fs3.access(resourcePath);
106712
+ } catch (error41) {
106713
+ return {
106714
+ content: [
106715
+ {
106716
+ type: "text",
106717
+ name: "Resource Not Found",
106718
+ description: `Resource '${name2}' not found`,
106719
+ mimeType: "text/plain",
106720
+ text: `Resource '${name2}' does not exist. Use the resources-list tool to see available resources.`
106721
+ }
106722
+ ]
106723
+ };
106724
+ }
106718
106725
  const fileContent = await fs3.readFile(resourcePath, "utf-8");
106719
106726
  return {
106720
106727
  content: [
@@ -106728,19 +106735,6 @@ var resourcesGet = (server, _env) => {
106728
106735
  ]
106729
106736
  };
106730
106737
  } catch (error41) {
106731
- if (error41 instanceof Error && "code" in error41 && error41.code === "ENOENT") {
106732
- return {
106733
- content: [
106734
- {
106735
- type: "text",
106736
- name: "Resource Not Found",
106737
- description: `Resource '${name2}' not found`,
106738
- mimeType: "text/plain",
106739
- text: `Resource '${name2}' does not exist. Use the resources-list tool to see available resources.`
106740
- }
106741
- ]
106742
- };
106743
- }
106744
106738
  return {
106745
106739
  content: [
106746
106740
  {
@@ -106891,4 +106885,4 @@ await main().catch((error41) => {
106891
106885
  process.exit(1);
106892
106886
  });
106893
106887
 
106894
- //# debugId=9B24F03B6D3B33A564756E2164756E21
106888
+ //# debugId=235E951EF966F66F64756E2164756E21