@settlemint/sdk-mcp 2.1.0 → 2.1.1-main25da2665

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.
Files changed (3) hide show
  1. package/dist/mcp.js +139 -61
  2. package/dist/mcp.js.map +14 -13
  3. package/package.json +4 -4
package/dist/mcp.js CHANGED
@@ -22251,6 +22251,9 @@ var require_utils2 = __commonJS((exports) => {
22251
22251
  exports.isNodeReadable = isNodeReadable;
22252
22252
  exports.isIterable = isIterable;
22253
22253
  exports.shouldRedirect = shouldRedirect;
22254
+ exports.wrapIncomingMessageWithPassthrough = wrapIncomingMessageWithPassthrough;
22255
+ var node_stream_1 = __require("node:stream");
22256
+ var promises_1 = __require("node:stream/promises");
22254
22257
  function isHeadersInstance(obj) {
22255
22258
  return obj?.forEach != null;
22256
22259
  }
@@ -22286,6 +22289,19 @@ var require_utils2 = __commonJS((exports) => {
22286
22289
  function shouldRedirect(status) {
22287
22290
  return status === 301 || status === 302 || status === 303 || status === 307 || status === 308;
22288
22291
  }
22292
+ function wrapIncomingMessageWithPassthrough({ incomingMessage, signal, passThrough = new node_stream_1.PassThrough, onError = (e) => {
22293
+ passThrough.destroy(e);
22294
+ } }) {
22295
+ (0, promises_1.pipeline)(incomingMessage, passThrough, {
22296
+ signal,
22297
+ end: true
22298
+ }).then(() => {
22299
+ if (!incomingMessage.destroyed) {
22300
+ incomingMessage.resume();
22301
+ }
22302
+ }).catch(onError);
22303
+ return passThrough;
22304
+ }
22289
22305
  });
22290
22306
 
22291
22307
  // ../../node_modules/@whatwg-node/node-fetch/cjs/ReadableStream.js
@@ -23324,7 +23340,6 @@ var require_Body = __commonJS((exports) => {
23324
23340
  var node_buffer_1 = __require("node:buffer");
23325
23341
  var node_http_1 = __require("node:http");
23326
23342
  var node_stream_1 = __require("node:stream");
23327
- var promises_1 = __require("node:stream/promises");
23328
23343
  var busboy_1 = tslib_1.__importDefault(require_lib());
23329
23344
  var promise_helpers_1 = require_cjs();
23330
23345
  var Blob_js_1 = require_Blob();
@@ -23716,17 +23731,10 @@ var require_Body = __commonJS((exports) => {
23716
23731
  };
23717
23732
  }
23718
23733
  if (bodyInit instanceof node_http_1.IncomingMessage) {
23719
- const passThrough = new node_stream_1.PassThrough({
23734
+ const passThrough = (0, utils_js_1.wrapIncomingMessageWithPassthrough)({
23735
+ incomingMessage: bodyInit,
23720
23736
  signal
23721
23737
  });
23722
- if (signal) {
23723
- (0, promises_1.pipeline)(bodyInit, passThrough, {
23724
- signal,
23725
- end: true
23726
- }).catch((e) => {
23727
- passThrough.destroy(e);
23728
- });
23729
- }
23730
23738
  return {
23731
23739
  bodyType: BodyInitType.Readable,
23732
23740
  contentType: null,
@@ -24141,7 +24149,6 @@ var require_fetchCurl = __commonJS((exports) => {
24141
24149
  Object.defineProperty(exports, "__esModule", { value: true });
24142
24150
  exports.fetchCurl = fetchCurl;
24143
24151
  var node_stream_1 = __require("node:stream");
24144
- var promises_1 = __require("node:stream/promises");
24145
24152
  var node_tls_1 = __require("node:tls");
24146
24153
  var promise_helpers_1 = require_cjs();
24147
24154
  var Response_js_1 = require_Response();
@@ -24232,15 +24239,11 @@ var require_fetchCurl = __commonJS((exports) => {
24232
24239
  }
24233
24240
  });
24234
24241
  curlHandle.once("stream", function streamListener(stream, status, headersBuf) {
24235
- const outputStream = new node_stream_1.PassThrough;
24236
- (0, promises_1.pipeline)(stream, outputStream, {
24237
- end: true,
24238
- signal: fetchRequest.signal
24239
- }).then(() => {
24240
- if (!stream.destroyed) {
24241
- stream.resume();
24242
- }
24243
- }).catch(deferredPromise.reject);
24242
+ const outputStream = (0, utils_js_1.wrapIncomingMessageWithPassthrough)({
24243
+ incomingMessage: stream,
24244
+ signal: fetchRequest.signal,
24245
+ onError: deferredPromise.reject
24246
+ });
24244
24247
  const headersFlat = headersBuf.toString("utf8").split(/\r?\n|\r/g).filter((headerFilter) => {
24245
24248
  if (headerFilter && !headerFilter.startsWith("HTTP/")) {
24246
24249
  if (fetchRequest.redirect === "error" && headerFilter.toLowerCase().includes("location") && (0, utils_js_1.shouldRedirect)(status)) {
@@ -24427,7 +24430,6 @@ var require_fetchNodeHttp = __commonJS((exports) => {
24427
24430
  var node_http_1 = __require("node:http");
24428
24431
  var node_https_1 = __require("node:https");
24429
24432
  var node_stream_1 = __require("node:stream");
24430
- var promises_1 = __require("node:stream/promises");
24431
24433
  var node_zlib_1 = __require("node:zlib");
24432
24434
  var Request_js_1 = require_Request();
24433
24435
  var Response_js_1 = require_Response();
@@ -24505,14 +24507,12 @@ var require_fetchNodeHttp = __commonJS((exports) => {
24505
24507
  }
24506
24508
  }
24507
24509
  if (outputStream != null) {
24508
- (0, promises_1.pipeline)(nodeResponse, outputStream, {
24510
+ outputStream = (0, utils_js_1.wrapIncomingMessageWithPassthrough)({
24511
+ incomingMessage: nodeResponse,
24512
+ passThrough: outputStream,
24509
24513
  signal: fetchRequest.signal,
24510
- end: true
24511
- }).then(() => {
24512
- if (!nodeResponse.destroyed) {
24513
- nodeResponse.resume();
24514
- }
24515
- }).catch(reject);
24514
+ onError: reject
24515
+ });
24516
24516
  }
24517
24517
  const statusCode = nodeResponse.statusCode || 200;
24518
24518
  let statusText = nodeResponse.statusMessage || node_http_1.STATUS_CODES[statusCode];
@@ -27223,7 +27223,7 @@ var require_dist2 = __commonJS((exports) => {
27223
27223
  // ../../node_modules/@dotenvx/dotenvx/package.json
27224
27224
  var require_package = __commonJS((exports, module) => {
27225
27225
  module.exports = {
27226
- version: "1.39.0",
27226
+ version: "1.39.1",
27227
27227
  name: "@dotenvx/dotenvx",
27228
27228
  description: "a better dotenv–from the creator of `dotenv`",
27229
27229
  author: "@motdotla",
@@ -29715,7 +29715,7 @@ var require_fsx = __commonJS((exports, module) => {
29715
29715
  var require_package2 = __commonJS((exports, module) => {
29716
29716
  module.exports = {
29717
29717
  name: "dotenv",
29718
- version: "16.4.7",
29718
+ version: "16.5.0",
29719
29719
  description: "Loads environment variables from .env file",
29720
29720
  main: "lib/main.js",
29721
29721
  types: "lib/main.d.ts",
@@ -29746,6 +29746,7 @@ var require_package2 = __commonJS((exports, module) => {
29746
29746
  type: "git",
29747
29747
  url: "git://github.com/motdotla/dotenv.git"
29748
29748
  },
29749
+ homepage: "https://github.com/motdotla/dotenv#readme",
29749
29750
  funding: "https://dotenvx.com",
29750
29751
  keywords: [
29751
29752
  "dotenv",
@@ -29831,9 +29832,6 @@ var require_main = __commonJS((exports, module) => {
29831
29832
  }
29832
29833
  return DotenvModule.parse(decrypted);
29833
29834
  }
29834
- function _log(message) {
29835
- console.log(`[dotenv@${version}][INFO] ${message}`);
29836
- }
29837
29835
  function _warn(message) {
29838
29836
  console.log(`[dotenv@${version}][WARN] ${message}`);
29839
29837
  }
@@ -29906,7 +29904,10 @@ var require_main = __commonJS((exports, module) => {
29906
29904
  return envPath[0] === "~" ? path.join(os.homedir(), envPath.slice(1)) : envPath;
29907
29905
  }
29908
29906
  function _configVault(options) {
29909
- _log("Loading env from encrypted .env.vault");
29907
+ const debug = Boolean(options && options.debug);
29908
+ if (debug) {
29909
+ _debug("Loading env from encrypted .env.vault");
29910
+ }
29910
29911
  const parsed = DotenvModule._parseVault(options);
29911
29912
  let processEnv = process.env;
29912
29913
  if (options && options.processEnv != null) {
@@ -42648,17 +42649,24 @@ function prepareResult({ options, pointerOptionMap, validSources }) {
42648
42649
  debugTimerStart("@graphql-tools/load: prepareResult");
42649
42650
  const pointerList = Object.keys(pointerOptionMap);
42650
42651
  if (pointerList.length > 0 && validSources.length === 0) {
42651
- throw new Error(`
42652
- Unable to find any GraphQL type definitions for the following pointers:
42653
- ${pointerList.map((p) => `
42654
- - ${p}
42655
- `)}`);
42652
+ throw new NoTypeDefinitionsFound(pointerList);
42656
42653
  }
42657
42654
  const sortedResult = options.sort ? validSources.sort((left, right) => compareStrings(left.location, right.location)) : validSources;
42658
42655
  debugTimerEnd("@graphql-tools/load: prepareResult");
42659
42656
  return sortedResult;
42660
42657
  }
42661
42658
 
42659
+ class NoTypeDefinitionsFound extends Error {
42660
+ constructor(pointerList) {
42661
+ super(`
42662
+ Unable to find any GraphQL type definitions for the following pointers:
42663
+ ${pointerList.map((p) => `
42664
+ - ${p}
42665
+ `)}`);
42666
+ this.name = "NoTypeDefinitionsFound";
42667
+ }
42668
+ }
42669
+
42662
42670
  // ../../node_modules/@graphql-tools/load/esm/schema.js
42663
42671
  var import_graphql42 = __toESM(require_graphql2(), 1);
42664
42672
 
@@ -44523,6 +44531,58 @@ function buildGraphQLWSExecutor(clientOptionsOrClient) {
44523
44531
  return executor2;
44524
44532
  }
44525
44533
 
44534
+ // ../../node_modules/@graphql-hive/signal/dist/index.js
44535
+ var isNode = !globalThis.Bun && globalThis.process?.release?.name === "node";
44536
+ var anySignalRegistry = isNode ? new FinalizationRegistry((cb) => cb()) : null;
44537
+ var controllerInSignalSy = Symbol("CONTROLLER_IN_SIGNAL");
44538
+ function abortSignalAny(signals) {
44539
+ if (signals.length === 0) {
44540
+ return;
44541
+ }
44542
+ if (signals.length === 1) {
44543
+ return signals[0];
44544
+ }
44545
+ if (!isNode) {
44546
+ return AbortSignal.any(signals);
44547
+ }
44548
+ for (const signal of signals) {
44549
+ if (signal.aborted) {
44550
+ return signal;
44551
+ }
44552
+ }
44553
+ const ctrl = new AbortController;
44554
+ const ctrlRef = new WeakRef(ctrl);
44555
+ const eventListenerPairs = [];
44556
+ let retainedSignalsCount = signals.length;
44557
+ for (const signal of signals) {
44558
+ let abort2 = function() {
44559
+ ctrlRef.deref()?.abort(signalRef.deref()?.reason);
44560
+ };
44561
+ const signalRef = new WeakRef(signal);
44562
+ signal.addEventListener("abort", abort2);
44563
+ eventListenerPairs.push([signalRef, abort2]);
44564
+ anySignalRegistry.register(signal, () => !--retainedSignalsCount && dispose(), signal);
44565
+ }
44566
+ function dispose() {
44567
+ for (const [signalRef, abort2] of eventListenerPairs) {
44568
+ const signal = signalRef.deref();
44569
+ if (signal) {
44570
+ signal.removeEventListener("abort", abort2);
44571
+ anySignalRegistry.unregister(signal);
44572
+ }
44573
+ const ctrl2 = ctrlRef.deref();
44574
+ if (ctrl2) {
44575
+ anySignalRegistry.unregister(ctrl2.signal);
44576
+ delete ctrl2.signal[controllerInSignalSy];
44577
+ }
44578
+ }
44579
+ }
44580
+ ctrl.signal.addEventListener("abort", dispose);
44581
+ anySignalRegistry.register(ctrl.signal, dispose, ctrl.signal);
44582
+ ctrl.signal[controllerInSignalSy] = ctrl;
44583
+ return ctrl.signal;
44584
+ }
44585
+
44526
44586
  // ../../node_modules/@whatwg-node/fetch/dist/node-ponyfill.js
44527
44587
  var createNodePonyfill = require_create_node_ponyfill();
44528
44588
  var shouldSkipPonyfill = require_shouldSkipPonyfill();
@@ -46013,9 +46073,10 @@ function prepareGETUrl({
46013
46073
  }
46014
46074
  function buildHTTPExecutor(options) {
46015
46075
  const printFn = options?.print ?? defaultPrintFn;
46016
- const disposeCtrl = new AbortController;
46076
+ let disposeCtrl;
46017
46077
  const serviceName = options?.serviceName;
46018
46078
  const baseExecutor = (request, excludeQuery) => {
46079
+ disposeCtrl ||= new AbortController;
46019
46080
  if (disposeCtrl.signal.aborted) {
46020
46081
  return createResultForAbort(disposeCtrl.signal.reason);
46021
46082
  }
@@ -46059,8 +46120,9 @@ function buildHTTPExecutor(options) {
46059
46120
  if (subscriptionCtrl) {
46060
46121
  signals.push(subscriptionCtrl.signal);
46061
46122
  }
46062
- const signal = AbortSignal.any(signals);
46123
+ const signal = abortSignalAny(signals);
46063
46124
  const upstreamErrorExtensions = {
46125
+ code: "DOWNSTREAM_SERVICE_ERROR",
46064
46126
  serviceName,
46065
46127
  request: {
46066
46128
  method
@@ -46217,6 +46279,14 @@ function buildHTTPExecutor(options) {
46217
46279
  ]
46218
46280
  };
46219
46281
  }
46282
+ } else {
46283
+ return {
46284
+ errors: [
46285
+ createGraphQLError("No response returned", {
46286
+ extensions: upstreamErrorExtensions
46287
+ })
46288
+ ]
46289
+ };
46220
46290
  }
46221
46291
  } else {
46222
46292
  return result;
@@ -46240,7 +46310,7 @@ function buildHTTPExecutor(options) {
46240
46310
  let result;
46241
46311
  let attempt = 0;
46242
46312
  function retryAttempt() {
46243
- if (disposeCtrl.signal.aborted) {
46313
+ if (disposeCtrl?.signal.aborted) {
46244
46314
  return createResultForAbort(disposeCtrl.signal.reason);
46245
46315
  }
46246
46316
  attempt++;
@@ -46267,14 +46337,16 @@ function buildHTTPExecutor(options) {
46267
46337
  [DisposableSymbols.dispose]: {
46268
46338
  get() {
46269
46339
  return function dispose() {
46270
- return disposeCtrl.abort(options?.getDisposeReason?.());
46340
+ disposeCtrl?.abort(options?.getDisposeReason?.());
46341
+ disposeCtrl = undefined;
46271
46342
  };
46272
46343
  }
46273
46344
  },
46274
46345
  [DisposableSymbols.asyncDispose]: {
46275
46346
  get() {
46276
46347
  return function asyncDispose() {
46277
- return disposeCtrl.abort(options?.getDisposeReason?.());
46348
+ disposeCtrl?.abort(options?.getDisposeReason?.());
46349
+ disposeCtrl = undefined;
46278
46350
  };
46279
46351
  }
46280
46352
  }
@@ -46894,13 +46966,14 @@ function executeField(exeContext, parentType, source, fieldNodes, path, asyncPay
46894
46966
  if (isPromise(completed)) {
46895
46967
  return completed.then(undefined, (rawError) => {
46896
46968
  if (rawError instanceof AggregateError) {
46897
- return new AggregateError(rawError.errors.map((rawErrorItem) => {
46969
+ let result2;
46970
+ for (let rawErrorItem of rawError.errors) {
46898
46971
  rawErrorItem = coerceError(rawErrorItem);
46899
46972
  const error2 = import_graphql47.locatedError(rawErrorItem, fieldNodes, pathToArray(path));
46900
- const handledError2 = handleFieldError(error2, returnType, errors2);
46973
+ result2 = handleFieldError(error2, returnType, errors2);
46901
46974
  filterSubsequentPayloads(exeContext, path, asyncPayloadRecord);
46902
- return handledError2;
46903
- }));
46975
+ }
46976
+ return result2;
46904
46977
  }
46905
46978
  rawError = coerceError(rawError);
46906
46979
  const error = import_graphql47.locatedError(rawError, fieldNodes, pathToArray(path));
@@ -46912,11 +46985,14 @@ function executeField(exeContext, parentType, source, fieldNodes, path, asyncPay
46912
46985
  return completed;
46913
46986
  } catch (rawError) {
46914
46987
  if (rawError instanceof AggregateError) {
46915
- return new AggregateError(rawError.errors.map((rawErrorItem) => {
46916
- const coercedError2 = coerceError(rawErrorItem);
46917
- const error2 = import_graphql47.locatedError(coercedError2, fieldNodes, pathToArray(path));
46918
- return handleFieldError(error2, returnType, errors2);
46919
- }));
46988
+ let result;
46989
+ for (let rawErrorItem of rawError.errors) {
46990
+ rawErrorItem = coerceError(rawErrorItem);
46991
+ const error2 = import_graphql47.locatedError(rawErrorItem, fieldNodes, pathToArray(path));
46992
+ result = handleFieldError(error2, returnType, errors2);
46993
+ filterSubsequentPayloads(exeContext, path, asyncPayloadRecord);
46994
+ }
46995
+ return result;
46920
46996
  }
46921
46997
  const coercedError = coerceError(rawError);
46922
46998
  const error = import_graphql47.locatedError(coercedError, fieldNodes, pathToArray(path));
@@ -62485,7 +62561,8 @@ var DotEnvSchema = z.object({
62485
62561
  SETTLEMINT_BLOCKSCOUT: UniqueNameSchema.optional(),
62486
62562
  SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: UrlSchema.optional(),
62487
62563
  SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: UrlSchema.optional(),
62488
- SETTLEMINT_NEW_PROJECT_NAME: z.string().optional()
62564
+ SETTLEMINT_NEW_PROJECT_NAME: z.string().optional(),
62565
+ SETTLEMINT_LOG_LEVEL: z.enum(["debug", "info", "warn", "error", "none"]).default("warn")
62489
62566
  });
62490
62567
  var DotEnvSchemaPartial = DotEnvSchema.partial();
62491
62568
  var IdSchema = z.union([
@@ -62589,7 +62666,8 @@ var DotEnvSchema2 = z.object({
62589
62666
  SETTLEMINT_BLOCKSCOUT: UniqueNameSchema2.optional(),
62590
62667
  SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: UrlSchema2.optional(),
62591
62668
  SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: UrlSchema2.optional(),
62592
- SETTLEMINT_NEW_PROJECT_NAME: z.string().optional()
62669
+ SETTLEMINT_NEW_PROJECT_NAME: z.string().optional(),
62670
+ SETTLEMINT_LOG_LEVEL: z.enum(["debug", "info", "warn", "error", "none"]).default("warn")
62593
62671
  });
62594
62672
  var DotEnvSchemaPartial2 = DotEnvSchema2.partial();
62595
62673
  var IdSchema2 = z.union([
@@ -62616,7 +62694,7 @@ var {
62616
62694
  var package_default = {
62617
62695
  name: "@settlemint/sdk-mcp",
62618
62696
  description: "MCP interface for SettleMint SDK, providing development tools and project management capabilities",
62619
- version: "2.1.0",
62697
+ version: "2.1.1-main25da2665",
62620
62698
  type: "module",
62621
62699
  private: false,
62622
62700
  license: "FSL-1.1-MIT",
@@ -62655,11 +62733,11 @@ var package_default = {
62655
62733
  prepack: "cp ../../LICENSE ."
62656
62734
  },
62657
62735
  dependencies: {
62658
- "@graphql-tools/load": "8.0.19",
62736
+ "@graphql-tools/load": "8.1.0",
62659
62737
  "@graphql-tools/url-loader": "8.0.31",
62660
62738
  "@modelcontextprotocol/sdk": "1.9.0",
62661
- "@settlemint/sdk-js": "2.1.0",
62662
- "@settlemint/sdk-utils": "2.1.0",
62739
+ "@settlemint/sdk-js": "2.1.1-main25da2665",
62740
+ "@settlemint/sdk-utils": "2.1.1-main25da2665",
62663
62741
  "@commander-js/extra-typings": "11.1.0",
62664
62742
  commander: "11.1.0",
62665
62743
  zod: "3.24.2"
@@ -63826,7 +63904,7 @@ async function fetchWithRetry(input, init, maxRetries = 5, initialSleepTime = 30
63826
63904
 
63827
63905
  // ../../node_modules/environment/index.js
63828
63906
  var isBrowser = globalThis.window?.document !== undefined;
63829
- var isNode = globalThis.process?.versions?.node !== undefined;
63907
+ var isNode2 = globalThis.process?.versions?.node !== undefined;
63830
63908
  var isBun = globalThis.process?.versions?.bun !== undefined;
63831
63909
  var isDeno = globalThis.Deno?.version?.deno !== undefined;
63832
63910
  var isElectron = globalThis.process?.versions?.electron !== undefined;
@@ -68081,4 +68159,4 @@ await main().catch((error2) => {
68081
68159
  process.exit(1);
68082
68160
  });
68083
68161
 
68084
- //# debugId=EA9A2F090074BC0D64756E2164756E21
68162
+ //# debugId=EBE19BD13C3ED8B864756E2164756E21