@settlemint/sdk-mcp 2.3.2-pr6cb5dd2e → 2.3.2-pr708c218f
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 +18 -73
- package/dist/mcp.js.map +6 -6
- package/package.json +3 -3
package/dist/mcp.js
CHANGED
|
@@ -72278,8 +72278,9 @@ var UrlPathSchema = exports_external2.string().regex(/^\/(?:[a-zA-Z0-9-_]+(?:\/[
|
|
|
72278
72278
|
message: "Invalid URL path format. Must start with '/' and can contain letters, numbers, hyphens, and underscores."
|
|
72279
72279
|
});
|
|
72280
72280
|
var UrlOrPathSchema = exports_external2.union([UrlSchema, UrlPathSchema]);
|
|
72281
|
+
var STANDALONE_INSTANCE = "standalone";
|
|
72281
72282
|
var DotEnvSchema = exports_external2.object({
|
|
72282
|
-
SETTLEMINT_INSTANCE: UrlSchema.default("https://console.settlemint.com"),
|
|
72283
|
+
SETTLEMINT_INSTANCE: exports_external2.union([UrlSchema, exports_external2.literal(STANDALONE_INSTANCE)]).default("https://console.settlemint.com"),
|
|
72283
72284
|
SETTLEMINT_ACCESS_TOKEN: ApplicationAccessTokenSchema.optional(),
|
|
72284
72285
|
SETTLEMINT_PERSONAL_ACCESS_TOKEN: PersonalAccessTokenSchema.optional(),
|
|
72285
72286
|
SETTLEMINT_WORKSPACE: UniqueNameSchema.optional(),
|
|
@@ -72388,8 +72389,9 @@ var UrlPathSchema2 = exports_external2.string().regex(/^\/(?:[a-zA-Z0-9-_]+(?:\/
|
|
|
72388
72389
|
message: "Invalid URL path format. Must start with '/' and can contain letters, numbers, hyphens, and underscores."
|
|
72389
72390
|
});
|
|
72390
72391
|
var UrlOrPathSchema2 = exports_external2.union([UrlSchema2, UrlPathSchema2]);
|
|
72392
|
+
var STANDALONE_INSTANCE2 = "standalone";
|
|
72391
72393
|
var DotEnvSchema2 = exports_external2.object({
|
|
72392
|
-
SETTLEMINT_INSTANCE: UrlSchema2.default("https://console.settlemint.com"),
|
|
72394
|
+
SETTLEMINT_INSTANCE: exports_external2.union([UrlSchema2, exports_external2.literal(STANDALONE_INSTANCE2)]).default("https://console.settlemint.com"),
|
|
72393
72395
|
SETTLEMINT_ACCESS_TOKEN: ApplicationAccessTokenSchema2.optional(),
|
|
72394
72396
|
SETTLEMINT_PERSONAL_ACCESS_TOKEN: PersonalAccessTokenSchema2.optional(),
|
|
72395
72397
|
SETTLEMINT_WORKSPACE: UniqueNameSchema2.optional(),
|
|
@@ -72455,7 +72457,7 @@ var {
|
|
|
72455
72457
|
var package_default = {
|
|
72456
72458
|
name: "@settlemint/sdk-mcp",
|
|
72457
72459
|
description: "MCP interface for SettleMint SDK, providing development tools and project management capabilities",
|
|
72458
|
-
version: "2.3.2-
|
|
72460
|
+
version: "2.3.2-pr708c218f",
|
|
72459
72461
|
type: "module",
|
|
72460
72462
|
private: false,
|
|
72461
72463
|
license: "FSL-1.1-MIT",
|
|
@@ -72497,8 +72499,8 @@ var package_default = {
|
|
|
72497
72499
|
"@graphql-tools/load": "8.1.0",
|
|
72498
72500
|
"@graphql-tools/url-loader": "8.0.31",
|
|
72499
72501
|
"@modelcontextprotocol/sdk": "1.12.0",
|
|
72500
|
-
"@settlemint/sdk-js": "2.3.2-
|
|
72501
|
-
"@settlemint/sdk-utils": "2.3.2-
|
|
72502
|
+
"@settlemint/sdk-js": "2.3.2-pr708c218f",
|
|
72503
|
+
"@settlemint/sdk-utils": "2.3.2-pr708c218f",
|
|
72502
72504
|
"@commander-js/extra-typings": "14.0.0",
|
|
72503
72505
|
commander: "14.0.0",
|
|
72504
72506
|
zod: "^3.25.0"
|
|
@@ -73628,84 +73630,24 @@ ${Object.keys(rawSchemaInfo.queries).join(`
|
|
|
73628
73630
|
};
|
|
73629
73631
|
|
|
73630
73632
|
// ../utils/dist/http.mjs
|
|
73631
|
-
var maskTokens2 = (output) => {
|
|
73632
|
-
return output.replace(/sm_(pat|aat|sat)_[0-9a-zA-Z]+/g, "***");
|
|
73633
|
-
};
|
|
73634
|
-
function createLogger(options = {}) {
|
|
73635
|
-
const { level = "warn", prefix = "" } = options;
|
|
73636
|
-
const logLevels = {
|
|
73637
|
-
debug: 0,
|
|
73638
|
-
info: 1,
|
|
73639
|
-
warn: 2,
|
|
73640
|
-
error: 3,
|
|
73641
|
-
none: 4
|
|
73642
|
-
};
|
|
73643
|
-
const currentLevelValue = logLevels[level];
|
|
73644
|
-
const formatArgs = (args) => {
|
|
73645
|
-
if (args.length === 0 || args.every((arg) => arg === undefined || arg === null)) {
|
|
73646
|
-
return "";
|
|
73647
|
-
}
|
|
73648
|
-
const formatted = args.map((arg) => {
|
|
73649
|
-
if (arg instanceof Error) {
|
|
73650
|
-
return `
|
|
73651
|
-
${arg.stack || arg.message}`;
|
|
73652
|
-
}
|
|
73653
|
-
if (typeof arg === "object" && arg !== null) {
|
|
73654
|
-
return `
|
|
73655
|
-
${JSON.stringify(arg, null, 2)}`;
|
|
73656
|
-
}
|
|
73657
|
-
return ` ${String(arg)}`;
|
|
73658
|
-
}).join("");
|
|
73659
|
-
return `, args:${formatted}`;
|
|
73660
|
-
};
|
|
73661
|
-
const shouldLog = (level2) => {
|
|
73662
|
-
return logLevels[level2] >= currentLevelValue;
|
|
73663
|
-
};
|
|
73664
|
-
return {
|
|
73665
|
-
debug: (message, ...args) => {
|
|
73666
|
-
if (shouldLog("debug")) {
|
|
73667
|
-
console.debug(`\x1B[32m${prefix}[DEBUG] ${maskTokens2(message)}${maskTokens2(formatArgs(args))}\x1B[0m`);
|
|
73668
|
-
}
|
|
73669
|
-
},
|
|
73670
|
-
info: (message, ...args) => {
|
|
73671
|
-
if (shouldLog("info")) {
|
|
73672
|
-
console.info(`\x1B[34m${prefix}[INFO] ${maskTokens2(message)}${maskTokens2(formatArgs(args))}\x1B[0m`);
|
|
73673
|
-
}
|
|
73674
|
-
},
|
|
73675
|
-
warn: (message, ...args) => {
|
|
73676
|
-
if (shouldLog("warn")) {
|
|
73677
|
-
console.warn(`\x1B[33m${prefix}[WARN] ${maskTokens2(message)}${maskTokens2(formatArgs(args))}\x1B[0m`);
|
|
73678
|
-
}
|
|
73679
|
-
},
|
|
73680
|
-
error: (message, ...args) => {
|
|
73681
|
-
if (shouldLog("error")) {
|
|
73682
|
-
console.error(`\x1B[31m${prefix}[ERROR] ${maskTokens2(message)}${maskTokens2(formatArgs(args))}\x1B[0m`);
|
|
73683
|
-
}
|
|
73684
|
-
}
|
|
73685
|
-
};
|
|
73686
|
-
}
|
|
73687
|
-
var logger = createLogger();
|
|
73688
73633
|
async function retryWhenFailed(fn, maxRetries = 5, initialSleepTime = 1000, stopOnError) {
|
|
73689
|
-
let
|
|
73690
|
-
|
|
73691
|
-
while (retries < maxAttempts) {
|
|
73634
|
+
let attempt = 0;
|
|
73635
|
+
while (attempt < maxRetries) {
|
|
73692
73636
|
try {
|
|
73693
73637
|
return await fn();
|
|
73694
73638
|
} catch (e3) {
|
|
73695
|
-
const error35 = e3;
|
|
73696
73639
|
if (typeof stopOnError === "function") {
|
|
73640
|
+
const error35 = e3;
|
|
73697
73641
|
if (stopOnError(error35)) {
|
|
73698
73642
|
throw error35;
|
|
73699
73643
|
}
|
|
73700
73644
|
}
|
|
73701
|
-
|
|
73645
|
+
attempt += 1;
|
|
73646
|
+
if (attempt >= maxRetries) {
|
|
73702
73647
|
throw e3;
|
|
73703
73648
|
}
|
|
73704
|
-
const
|
|
73705
|
-
const
|
|
73706
|
-
const delay = baseDelay + jitterAmount;
|
|
73707
|
-
retries += 1;
|
|
73708
|
-
logger.warn(`An error occurred ${error35.message}, retrying in ${delay.toFixed(0)}ms (retry ${retries} of ${maxRetries})...`);
|
|
73649
|
+
const jitter = Math.random();
|
|
73650
|
+
const delay = 2 ** attempt * initialSleepTime * jitter;
|
|
73709
73651
|
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
73710
73652
|
}
|
|
73711
73653
|
}
|
|
@@ -76403,6 +76345,9 @@ function getPincodeVerificationChallengeResponse({
|
|
|
76403
76345
|
}
|
|
76404
76346
|
function createSettleMintClient(options) {
|
|
76405
76347
|
ensureServer();
|
|
76348
|
+
if (options.instance === STANDALONE_INSTANCE2) {
|
|
76349
|
+
throw new Error("Standalone instances cannot connect to the SettleMint platform");
|
|
76350
|
+
}
|
|
76406
76351
|
const validatedOptions = options.anonymous ? validate3(exports_external2.object({
|
|
76407
76352
|
...ClientOptionsSchema.shape,
|
|
76408
76353
|
accessToken: exports_external2.literal("")
|
|
@@ -78328,4 +78273,4 @@ await main().catch((error36) => {
|
|
|
78328
78273
|
process.exit(1);
|
|
78329
78274
|
});
|
|
78330
78275
|
|
|
78331
|
-
//# debugId=
|
|
78276
|
+
//# debugId=B222B4E692505AC964756E2164756E21
|