@settlemint/sdk-mcp 2.5.1-pr680a1b0f → 2.5.1-pr6bae2b5f

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
@@ -67253,6 +67253,7 @@ class Protocol {
67253
67253
  this._responseHandlers = new Map;
67254
67254
  this._progressHandlers = new Map;
67255
67255
  this._timeoutInfo = new Map;
67256
+ this._pendingDebouncedNotifications = new Set;
67256
67257
  this.setNotificationHandler(CancelledNotificationSchema, (notification) => {
67257
67258
  const controller = this._requestHandlerAbortControllers.get(notification.params.requestId);
67258
67259
  controller === null || controller === undefined || controller.abort(notification.params.reason);
@@ -67325,6 +67326,7 @@ class Protocol {
67325
67326
  const responseHandlers = this._responseHandlers;
67326
67327
  this._responseHandlers = new Map;
67327
67328
  this._progressHandlers.clear();
67329
+ this._pendingDebouncedNotifications.clear();
67328
67330
  this._transport = undefined;
67329
67331
  (_a = this.onclose) === null || _a === undefined || _a.call(this);
67330
67332
  const error = new McpError(ErrorCode.ConnectionClosed, "Connection closed");
@@ -67513,10 +67515,32 @@ class Protocol {
67513
67515
  });
67514
67516
  }
67515
67517
  async notification(notification, options) {
67518
+ var _a, _b;
67516
67519
  if (!this._transport) {
67517
67520
  throw new Error("Not connected");
67518
67521
  }
67519
67522
  this.assertNotificationCapability(notification.method);
67523
+ const debouncedMethods = (_b = (_a = this._options) === null || _a === undefined ? undefined : _a.debouncedNotificationMethods) !== null && _b !== undefined ? _b : [];
67524
+ const canDebounce = debouncedMethods.includes(notification.method) && !notification.params && !(options === null || options === undefined ? undefined : options.relatedRequestId);
67525
+ if (canDebounce) {
67526
+ if (this._pendingDebouncedNotifications.has(notification.method)) {
67527
+ return;
67528
+ }
67529
+ this._pendingDebouncedNotifications.add(notification.method);
67530
+ Promise.resolve().then(() => {
67531
+ var _a2;
67532
+ this._pendingDebouncedNotifications.delete(notification.method);
67533
+ if (!this._transport) {
67534
+ return;
67535
+ }
67536
+ const jsonrpcNotification2 = {
67537
+ ...notification,
67538
+ jsonrpc: "2.0"
67539
+ };
67540
+ (_a2 = this._transport) === null || _a2 === undefined || _a2.send(jsonrpcNotification2, options).catch((error) => this._onerror(error));
67541
+ });
67542
+ return;
67543
+ }
67520
67544
  const jsonrpcNotification = {
67521
67545
  ...notification,
67522
67546
  jsonrpc: "2.0"
@@ -97752,7 +97776,7 @@ var {
97752
97776
  var package_default = {
97753
97777
  name: "@settlemint/sdk-mcp",
97754
97778
  description: "MCP interface for SettleMint SDK, providing development tools and project management capabilities",
97755
- version: "2.5.1-pr680a1b0f",
97779
+ version: "2.5.1-pr6bae2b5f",
97756
97780
  type: "module",
97757
97781
  private: false,
97758
97782
  license: "FSL-1.1-MIT",
@@ -97793,9 +97817,9 @@ var package_default = {
97793
97817
  dependencies: {
97794
97818
  "@graphql-tools/load": "8.1.1",
97795
97819
  "@graphql-tools/url-loader": "8.0.32",
97796
- "@modelcontextprotocol/sdk": "1.15.1",
97797
- "@settlemint/sdk-js": "2.5.1-pr680a1b0f",
97798
- "@settlemint/sdk-utils": "2.5.1-pr680a1b0f",
97820
+ "@modelcontextprotocol/sdk": "1.16.0",
97821
+ "@settlemint/sdk-js": "2.5.1-pr6bae2b5f",
97822
+ "@settlemint/sdk-utils": "2.5.1-pr6bae2b5f",
97799
97823
  "@commander-js/extra-typings": "14.0.0",
97800
97824
  commander: "14.0.0",
97801
97825
  zod: "^3.25.0"
@@ -114468,4 +114492,4 @@ await main().catch((error41) => {
114468
114492
  process.exit(1);
114469
114493
  });
114470
114494
 
114471
- //# debugId=9CE545C3E21EB84964756E2164756E21
114495
+ //# debugId=EF78129AC1DEA2CC64756E2164756E21