@settlemint/sdk-mcp 2.4.0-pr5aee34bd → 2.4.0-pr5e8a9bee
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 +59 -51
- package/dist/mcp.js.map +11 -11
- package/package.json +7 -5
package/dist/mcp.js
CHANGED
|
@@ -16722,9 +16722,11 @@ var require_websocket_server = __commonJS((exports, module) => {
|
|
|
16722
16722
|
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
|
|
16723
16723
|
return;
|
|
16724
16724
|
}
|
|
16725
|
-
if (version !==
|
|
16725
|
+
if (version !== 13 && version !== 8) {
|
|
16726
16726
|
const message = "Missing or invalid Sec-WebSocket-Version header";
|
|
16727
|
-
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message
|
|
16727
|
+
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message, {
|
|
16728
|
+
"Sec-WebSocket-Version": "13, 8"
|
|
16729
|
+
});
|
|
16728
16730
|
return;
|
|
16729
16731
|
}
|
|
16730
16732
|
if (!this.shouldHandle(req)) {
|
|
@@ -16863,13 +16865,13 @@ var require_websocket_server = __commonJS((exports, module) => {
|
|
|
16863
16865
|
\r
|
|
16864
16866
|
` + message);
|
|
16865
16867
|
}
|
|
16866
|
-
function abortHandshakeOrEmitwsClientError(server, req, socket, code, message) {
|
|
16868
|
+
function abortHandshakeOrEmitwsClientError(server, req, socket, code, message, headers) {
|
|
16867
16869
|
if (server.listenerCount("wsClientError")) {
|
|
16868
16870
|
const err = new Error(message);
|
|
16869
16871
|
Error.captureStackTrace(err, abortHandshakeOrEmitwsClientError);
|
|
16870
16872
|
server.emit("wsClientError", err, socket, req);
|
|
16871
16873
|
} else {
|
|
16872
|
-
abortHandshake(socket, code, message);
|
|
16874
|
+
abortHandshake(socket, code, message, headers);
|
|
16873
16875
|
}
|
|
16874
16876
|
}
|
|
16875
16877
|
});
|
|
@@ -59939,14 +59941,21 @@ class Protocol {
|
|
|
59939
59941
|
}
|
|
59940
59942
|
}
|
|
59941
59943
|
async connect(transport) {
|
|
59944
|
+
var _a, _b, _c;
|
|
59942
59945
|
this._transport = transport;
|
|
59946
|
+
const _onclose = (_a = this.transport) === null || _a === undefined ? undefined : _a.onclose;
|
|
59943
59947
|
this._transport.onclose = () => {
|
|
59948
|
+
_onclose === null || _onclose === undefined || _onclose();
|
|
59944
59949
|
this._onclose();
|
|
59945
59950
|
};
|
|
59951
|
+
const _onerror = (_b = this.transport) === null || _b === undefined ? undefined : _b.onerror;
|
|
59946
59952
|
this._transport.onerror = (error) => {
|
|
59953
|
+
_onerror === null || _onerror === undefined || _onerror(error);
|
|
59947
59954
|
this._onerror(error);
|
|
59948
59955
|
};
|
|
59956
|
+
const _onmessage = (_c = this._transport) === null || _c === undefined ? undefined : _c.onmessage;
|
|
59949
59957
|
this._transport.onmessage = (message, extra) => {
|
|
59958
|
+
_onmessage === null || _onmessage === undefined || _onmessage(message, extra);
|
|
59950
59959
|
if (isJSONRPCResponse(message) || isJSONRPCError(message)) {
|
|
59951
59960
|
this._onresponse(message);
|
|
59952
59961
|
} else if (isJSONRPCRequest(message)) {
|
|
@@ -60006,7 +60015,8 @@ class Protocol {
|
|
|
60006
60015
|
sendNotification: (notification) => this.notification(notification, { relatedRequestId: request.id }),
|
|
60007
60016
|
sendRequest: (r, resultSchema, options) => this.request(r, resultSchema, { ...options, relatedRequestId: request.id }),
|
|
60008
60017
|
authInfo: extra === null || extra === undefined ? undefined : extra.authInfo,
|
|
60009
|
-
requestId: request.id
|
|
60018
|
+
requestId: request.id,
|
|
60019
|
+
requestInfo: extra === null || extra === undefined ? undefined : extra.requestInfo
|
|
60010
60020
|
};
|
|
60011
60021
|
Promise.resolve().then(() => handler(request, fullExtra)).then((result) => {
|
|
60012
60022
|
var _a2;
|
|
@@ -61721,7 +61731,7 @@ class McpServer {
|
|
|
61721
61731
|
};
|
|
61722
61732
|
}
|
|
61723
61733
|
}
|
|
61724
|
-
if (tool.outputSchema) {
|
|
61734
|
+
if (tool.outputSchema && !result.isError) {
|
|
61725
61735
|
if (!result.structuredContent) {
|
|
61726
61736
|
throw new McpError(ErrorCode.InvalidParams, `Tool ${request.params.name} has an output schema but no structured content was provided`);
|
|
61727
61737
|
}
|
|
@@ -73554,9 +73564,9 @@ ${formattedErrors}`);
|
|
|
73554
73564
|
throw error$37;
|
|
73555
73565
|
}
|
|
73556
73566
|
}
|
|
73557
|
-
var ApplicationAccessTokenSchema = string$1().regex(/^sm_aat_
|
|
73558
|
-
var PersonalAccessTokenSchema = string$1().regex(/^sm_pat_
|
|
73559
|
-
var AccessTokenSchema = string$1().regex(/^sm_pat_
|
|
73567
|
+
var ApplicationAccessTokenSchema = string$1().regex(/^sm_aat_.+$/);
|
|
73568
|
+
var PersonalAccessTokenSchema = string$1().regex(/^sm_pat_.+$/);
|
|
73569
|
+
var AccessTokenSchema = string$1().regex(/^(sm_pat_.+|sm_aat_.+)$/);
|
|
73560
73570
|
function tryParseJson(value, defaultValue = null) {
|
|
73561
73571
|
try {
|
|
73562
73572
|
const parsed = JSON.parse(value);
|
|
@@ -73564,7 +73574,7 @@ function tryParseJson(value, defaultValue = null) {
|
|
|
73564
73574
|
return defaultValue;
|
|
73565
73575
|
}
|
|
73566
73576
|
return parsed;
|
|
73567
|
-
} catch (
|
|
73577
|
+
} catch (_err) {
|
|
73568
73578
|
return defaultValue;
|
|
73569
73579
|
}
|
|
73570
73580
|
}
|
|
@@ -90295,9 +90305,9 @@ ${formattedErrors}`);
|
|
|
90295
90305
|
throw error$372;
|
|
90296
90306
|
}
|
|
90297
90307
|
}
|
|
90298
|
-
var ApplicationAccessTokenSchema2 = string$12().regex(/^sm_aat_
|
|
90299
|
-
var PersonalAccessTokenSchema2 = string$12().regex(/^sm_pat_
|
|
90300
|
-
var AccessTokenSchema2 = string$12().regex(/^sm_pat_
|
|
90308
|
+
var ApplicationAccessTokenSchema2 = string$12().regex(/^sm_aat_.+$/);
|
|
90309
|
+
var PersonalAccessTokenSchema2 = string$12().regex(/^sm_pat_.+$/);
|
|
90310
|
+
var AccessTokenSchema2 = string$12().regex(/^(sm_pat_.+|sm_aat_.+)$/);
|
|
90301
90311
|
function tryParseJson2(value, defaultValue = null) {
|
|
90302
90312
|
try {
|
|
90303
90313
|
const parsed = JSON.parse(value);
|
|
@@ -90305,7 +90315,7 @@ function tryParseJson2(value, defaultValue = null) {
|
|
|
90305
90315
|
return defaultValue;
|
|
90306
90316
|
}
|
|
90307
90317
|
return parsed;
|
|
90308
|
-
} catch (
|
|
90318
|
+
} catch (_err) {
|
|
90309
90319
|
return defaultValue;
|
|
90310
90320
|
}
|
|
90311
90321
|
}
|
|
@@ -90389,7 +90399,7 @@ var {
|
|
|
90389
90399
|
var package_default = {
|
|
90390
90400
|
name: "@settlemint/sdk-mcp",
|
|
90391
90401
|
description: "MCP interface for SettleMint SDK, providing development tools and project management capabilities",
|
|
90392
|
-
version: "2.4.0-
|
|
90402
|
+
version: "2.4.0-pr5e8a9bee",
|
|
90393
90403
|
type: "module",
|
|
90394
90404
|
private: false,
|
|
90395
90405
|
license: "FSL-1.1-MIT",
|
|
@@ -90408,7 +90418,9 @@ var package_default = {
|
|
|
90408
90418
|
url: "https://github.com/settlemint/sdk/issues",
|
|
90409
90419
|
email: "support@settlemint.com"
|
|
90410
90420
|
},
|
|
90411
|
-
files: [
|
|
90421
|
+
files: [
|
|
90422
|
+
"dist"
|
|
90423
|
+
],
|
|
90412
90424
|
exports: {
|
|
90413
90425
|
"./*": {
|
|
90414
90426
|
types: "./dist/*.d.ts",
|
|
@@ -90430,9 +90442,9 @@ var package_default = {
|
|
|
90430
90442
|
dependencies: {
|
|
90431
90443
|
"@graphql-tools/load": "8.1.0",
|
|
90432
90444
|
"@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-
|
|
90445
|
+
"@modelcontextprotocol/sdk": "1.13.2",
|
|
90446
|
+
"@settlemint/sdk-js": "2.4.0-pr5e8a9bee",
|
|
90447
|
+
"@settlemint/sdk-utils": "2.4.0-pr5e8a9bee",
|
|
90436
90448
|
"@commander-js/extra-typings": "14.0.0",
|
|
90437
90449
|
commander: "14.0.0",
|
|
90438
90450
|
zod: "^3.25.0"
|
|
@@ -91263,7 +91275,7 @@ var processFieldTypes = (fields2, schema, collectedTypes) => {
|
|
|
91263
91275
|
}
|
|
91264
91276
|
};
|
|
91265
91277
|
var collectCustomTypes = (type, schema, collectedTypes = new Set) => {
|
|
91266
|
-
const typeName = type.toString().replace(/[
|
|
91278
|
+
const typeName = type.toString().replace(/[[\]!]/g, "");
|
|
91267
91279
|
if (collectedTypes.has(typeName) || ["String", "Int", "Float", "Boolean", "ID"].includes(typeName)) {
|
|
91268
91280
|
return collectedTypes;
|
|
91269
91281
|
}
|
|
@@ -106589,21 +106601,6 @@ var promptsGet = (server, _env) => {
|
|
|
106589
106601
|
try {
|
|
106590
106602
|
const promptsDir = path2.resolve(__dirname, "../../prompts");
|
|
106591
106603
|
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
106604
|
const fileContent = await fs.readFile(promptPath, "utf-8");
|
|
106608
106605
|
return {
|
|
106609
106606
|
content: [
|
|
@@ -106617,6 +106614,19 @@ var promptsGet = (server, _env) => {
|
|
|
106617
106614
|
]
|
|
106618
106615
|
};
|
|
106619
106616
|
} catch (error41) {
|
|
106617
|
+
if (error41 instanceof Error && "code" in error41 && error41.code === "ENOENT") {
|
|
106618
|
+
return {
|
|
106619
|
+
content: [
|
|
106620
|
+
{
|
|
106621
|
+
type: "text",
|
|
106622
|
+
name: "Prompt Not Found",
|
|
106623
|
+
description: `Prompt '${name2}' in category '${category}' not found`,
|
|
106624
|
+
mimeType: "text/plain",
|
|
106625
|
+
text: `Prompt '${name2}' in category '${category}' does not exist. Use the prompts-list tool to see available prompts.`
|
|
106626
|
+
}
|
|
106627
|
+
]
|
|
106628
|
+
};
|
|
106629
|
+
}
|
|
106620
106630
|
return {
|
|
106621
106631
|
content: [
|
|
106622
106632
|
{
|
|
@@ -106707,21 +106717,6 @@ var resourcesGet = (server, _env) => {
|
|
|
106707
106717
|
try {
|
|
106708
106718
|
const resourcesDir = path4.resolve(__dirname, "../../resources");
|
|
106709
106719
|
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
106720
|
const fileContent = await fs3.readFile(resourcePath, "utf-8");
|
|
106726
106721
|
return {
|
|
106727
106722
|
content: [
|
|
@@ -106735,6 +106730,19 @@ var resourcesGet = (server, _env) => {
|
|
|
106735
106730
|
]
|
|
106736
106731
|
};
|
|
106737
106732
|
} catch (error41) {
|
|
106733
|
+
if (error41 instanceof Error && "code" in error41 && error41.code === "ENOENT") {
|
|
106734
|
+
return {
|
|
106735
|
+
content: [
|
|
106736
|
+
{
|
|
106737
|
+
type: "text",
|
|
106738
|
+
name: "Resource Not Found",
|
|
106739
|
+
description: `Resource '${name2}' not found`,
|
|
106740
|
+
mimeType: "text/plain",
|
|
106741
|
+
text: `Resource '${name2}' does not exist. Use the resources-list tool to see available resources.`
|
|
106742
|
+
}
|
|
106743
|
+
]
|
|
106744
|
+
};
|
|
106745
|
+
}
|
|
106738
106746
|
return {
|
|
106739
106747
|
content: [
|
|
106740
106748
|
{
|
|
@@ -106885,4 +106893,4 @@ await main().catch((error41) => {
|
|
|
106885
106893
|
process.exit(1);
|
|
106886
106894
|
});
|
|
106887
106895
|
|
|
106888
|
-
//# debugId=
|
|
106896
|
+
//# debugId=02C8F0B8D16CD9FA64756E2164756E21
|