@settlemint/sdk-mcp 2.0.0 → 2.1.0

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
@@ -54582,6 +54582,7 @@ var InitializeRequestSchema = RequestSchema.extend({
54582
54582
  var ServerCapabilitiesSchema = z.object({
54583
54583
  experimental: z.optional(z.object({}).passthrough()),
54584
54584
  logging: z.optional(z.object({}).passthrough()),
54585
+ completions: z.optional(z.object({}).passthrough()),
54585
54586
  prompts: z.optional(z.object({
54586
54587
  listChanged: z.optional(z.boolean())
54587
54588
  }).passthrough()),
@@ -54719,6 +54720,11 @@ var ImageContentSchema = z.object({
54719
54720
  data: z.string().base64(),
54720
54721
  mimeType: z.string()
54721
54722
  }).passthrough();
54723
+ var AudioContentSchema = z.object({
54724
+ type: z.literal("audio"),
54725
+ data: z.string().base64(),
54726
+ mimeType: z.string()
54727
+ }).passthrough();
54722
54728
  var EmbeddedResourceSchema = z.object({
54723
54729
  type: z.literal("resource"),
54724
54730
  resource: z.union([TextResourceContentsSchema, BlobResourceContentsSchema])
@@ -54728,6 +54734,7 @@ var PromptMessageSchema = z.object({
54728
54734
  content: z.union([
54729
54735
  TextContentSchema,
54730
54736
  ImageContentSchema,
54737
+ AudioContentSchema,
54731
54738
  EmbeddedResourceSchema
54732
54739
  ])
54733
54740
  }).passthrough();
@@ -54753,7 +54760,7 @@ var ListToolsResultSchema = PaginatedResultSchema.extend({
54753
54760
  tools: z.array(ToolSchema)
54754
54761
  });
54755
54762
  var CallToolResultSchema = ResultSchema.extend({
54756
- content: z.array(z.union([TextContentSchema, ImageContentSchema, EmbeddedResourceSchema])),
54763
+ content: z.array(z.union([TextContentSchema, ImageContentSchema, AudioContentSchema, EmbeddedResourceSchema])),
54757
54764
  isError: z.boolean().default(false).optional()
54758
54765
  });
54759
54766
  var CompatibilityCallToolResultSchema = CallToolResultSchema.or(ResultSchema.extend({
@@ -54804,7 +54811,7 @@ var ModelPreferencesSchema = z.object({
54804
54811
  }).passthrough();
54805
54812
  var SamplingMessageSchema = z.object({
54806
54813
  role: z.enum(["user", "assistant"]),
54807
- content: z.union([TextContentSchema, ImageContentSchema])
54814
+ content: z.union([TextContentSchema, ImageContentSchema, AudioContentSchema])
54808
54815
  }).passthrough();
54809
54816
  var CreateMessageRequestSchema = RequestSchema.extend({
54810
54817
  method: z.literal("sampling/createMessage"),
@@ -54825,7 +54832,8 @@ var CreateMessageResultSchema = ResultSchema.extend({
54825
54832
  role: z.enum(["user", "assistant"]),
54826
54833
  content: z.discriminatedUnion("type", [
54827
54834
  TextContentSchema,
54828
- ImageContentSchema
54835
+ ImageContentSchema,
54836
+ AudioContentSchema
54829
54837
  ])
54830
54838
  });
54831
54839
  var ResourceReferenceSchema = z.object({
@@ -54950,12 +54958,13 @@ class Protocol {
54950
54958
  });
54951
54959
  this.setRequestHandler(PingRequestSchema, (_request) => ({}));
54952
54960
  }
54953
- _setupTimeout(messageId, timeout, maxTotalTimeout, onTimeout) {
54961
+ _setupTimeout(messageId, timeout, maxTotalTimeout, onTimeout, resetTimeoutOnProgress = false) {
54954
54962
  this._timeoutInfo.set(messageId, {
54955
54963
  timeoutId: setTimeout(onTimeout, timeout),
54956
54964
  startTime: Date.now(),
54957
54965
  timeout,
54958
54966
  maxTotalTimeout,
54967
+ resetTimeoutOnProgress,
54959
54968
  onTimeout
54960
54969
  });
54961
54970
  }
@@ -55078,7 +55087,8 @@ class Protocol {
55078
55087
  return;
55079
55088
  }
55080
55089
  const responseHandler = this._responseHandlers.get(messageId);
55081
- if (this._timeoutInfo.has(messageId) && responseHandler) {
55090
+ const timeoutInfo = this._timeoutInfo.get(messageId);
55091
+ if (timeoutInfo && responseHandler && timeoutInfo.resetTimeoutOnProgress) {
55082
55092
  try {
55083
55093
  this._resetTimeout(messageId);
55084
55094
  } catch (error) {
@@ -55114,7 +55124,7 @@ class Protocol {
55114
55124
  }
55115
55125
  request(request, resultSchema, options) {
55116
55126
  return new Promise((resolve, reject2) => {
55117
- var _a, _b, _c, _d;
55127
+ var _a, _b, _c, _d, _e;
55118
55128
  if (!this._transport) {
55119
55129
  reject2(new Error("Not connected"));
55120
55130
  return;
@@ -55172,7 +55182,7 @@ class Protocol {
55172
55182
  });
55173
55183
  const timeout = (_d = options === null || options === undefined ? undefined : options.timeout) !== null && _d !== undefined ? _d : DEFAULT_REQUEST_TIMEOUT_MSEC;
55174
55184
  const timeoutHandler = () => cancel(new McpError(ErrorCode.RequestTimeout, "Request timed out", { timeout }));
55175
- this._setupTimeout(messageId, timeout, options === null || options === undefined ? undefined : options.maxTotalTimeout, timeoutHandler);
55185
+ this._setupTimeout(messageId, timeout, options === null || options === undefined ? undefined : options.maxTotalTimeout, timeoutHandler, (_e = options === null || options === undefined ? undefined : options.resetTimeoutOnProgress) !== null && _e !== undefined ? _e : false);
55176
55186
  this._transport.send(jsonrpcRequest).catch((error) => {
55177
55187
  this._cleanupTimeout(messageId);
55178
55188
  reject2(error);
@@ -56966,7 +56976,7 @@ class ReadBuffer {
56966
56976
  if (index === -1) {
56967
56977
  return null;
56968
56978
  }
56969
- const line = this._buffer.toString("utf8", 0, index);
56979
+ const line = this._buffer.toString("utf8", 0, index).replace(/\r$/, "");
56970
56980
  this._buffer = this._buffer.subarray(index + 1);
56971
56981
  return deserializeMessage(line);
56972
56982
  }
@@ -62606,7 +62616,7 @@ var {
62606
62616
  var package_default = {
62607
62617
  name: "@settlemint/sdk-mcp",
62608
62618
  description: "MCP interface for SettleMint SDK, providing development tools and project management capabilities",
62609
- version: "2.0.0",
62619
+ version: "2.1.0",
62610
62620
  type: "module",
62611
62621
  private: false,
62612
62622
  license: "FSL-1.1-MIT",
@@ -62647,9 +62657,9 @@ var package_default = {
62647
62657
  dependencies: {
62648
62658
  "@graphql-tools/load": "8.0.19",
62649
62659
  "@graphql-tools/url-loader": "8.0.31",
62650
- "@modelcontextprotocol/sdk": "1.8.0",
62651
- "@settlemint/sdk-js": "2.0.0",
62652
- "@settlemint/sdk-utils": "2.0.0",
62660
+ "@modelcontextprotocol/sdk": "1.9.0",
62661
+ "@settlemint/sdk-js": "2.1.0",
62662
+ "@settlemint/sdk-utils": "2.1.0",
62653
62663
  "@commander-js/extra-typings": "11.1.0",
62654
62664
  commander: "11.1.0",
62655
62665
  zod: "3.24.2"
@@ -68071,4 +68081,4 @@ await main().catch((error2) => {
68071
68081
  process.exit(1);
68072
68082
  });
68073
68083
 
68074
- //# debugId=3017600E9B7C035B64756E2164756E21
68084
+ //# debugId=EA9A2F090074BC0D64756E2164756E21