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