@settlemint/sdk-mcp 2.4.0-main4e8760cf → 2.4.0-main64dae0d7
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 +303 -70
- package/dist/mcp.js.map +12 -12
- 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
|
}
|
|
@@ -62151,7 +62161,8 @@ class McpServer {
|
|
|
62151
62161
|
}
|
|
62152
62162
|
}
|
|
62153
62163
|
var EMPTY_OBJECT_JSON_SCHEMA = {
|
|
62154
|
-
type: "object"
|
|
62164
|
+
type: "object",
|
|
62165
|
+
properties: {}
|
|
62155
62166
|
};
|
|
62156
62167
|
function isZodRawShape(obj) {
|
|
62157
62168
|
if (typeof obj !== "object" || obj === null)
|
|
@@ -73554,9 +73565,9 @@ ${formattedErrors}`);
|
|
|
73554
73565
|
throw error$37;
|
|
73555
73566
|
}
|
|
73556
73567
|
}
|
|
73557
|
-
var ApplicationAccessTokenSchema = string$1().regex(/^sm_aat_
|
|
73558
|
-
var PersonalAccessTokenSchema = string$1().regex(/^sm_pat_
|
|
73559
|
-
var AccessTokenSchema = string$1().regex(/^sm_pat_
|
|
73568
|
+
var ApplicationAccessTokenSchema = string$1().regex(/^sm_aat_.+$/);
|
|
73569
|
+
var PersonalAccessTokenSchema = string$1().regex(/^sm_pat_.+$/);
|
|
73570
|
+
var AccessTokenSchema = string$1().regex(/^(sm_pat_.+|sm_aat_.+)$/);
|
|
73560
73571
|
function tryParseJson(value, defaultValue = null) {
|
|
73561
73572
|
try {
|
|
73562
73573
|
const parsed = JSON.parse(value);
|
|
@@ -73564,7 +73575,7 @@ function tryParseJson(value, defaultValue = null) {
|
|
|
73564
73575
|
return defaultValue;
|
|
73565
73576
|
}
|
|
73566
73577
|
return parsed;
|
|
73567
|
-
} catch (
|
|
73578
|
+
} catch (_err) {
|
|
73568
73579
|
return defaultValue;
|
|
73569
73580
|
}
|
|
73570
73581
|
}
|
|
@@ -90295,9 +90306,9 @@ ${formattedErrors}`);
|
|
|
90295
90306
|
throw error$372;
|
|
90296
90307
|
}
|
|
90297
90308
|
}
|
|
90298
|
-
var ApplicationAccessTokenSchema2 = string$12().regex(/^sm_aat_
|
|
90299
|
-
var PersonalAccessTokenSchema2 = string$12().regex(/^sm_pat_
|
|
90300
|
-
var AccessTokenSchema2 = string$12().regex(/^sm_pat_
|
|
90309
|
+
var ApplicationAccessTokenSchema2 = string$12().regex(/^sm_aat_.+$/);
|
|
90310
|
+
var PersonalAccessTokenSchema2 = string$12().regex(/^sm_pat_.+$/);
|
|
90311
|
+
var AccessTokenSchema2 = string$12().regex(/^(sm_pat_.+|sm_aat_.+)$/);
|
|
90301
90312
|
function tryParseJson2(value, defaultValue = null) {
|
|
90302
90313
|
try {
|
|
90303
90314
|
const parsed = JSON.parse(value);
|
|
@@ -90305,7 +90316,7 @@ function tryParseJson2(value, defaultValue = null) {
|
|
|
90305
90316
|
return defaultValue;
|
|
90306
90317
|
}
|
|
90307
90318
|
return parsed;
|
|
90308
|
-
} catch (
|
|
90319
|
+
} catch (_err) {
|
|
90309
90320
|
return defaultValue;
|
|
90310
90321
|
}
|
|
90311
90322
|
}
|
|
@@ -90389,7 +90400,7 @@ var {
|
|
|
90389
90400
|
var package_default = {
|
|
90390
90401
|
name: "@settlemint/sdk-mcp",
|
|
90391
90402
|
description: "MCP interface for SettleMint SDK, providing development tools and project management capabilities",
|
|
90392
|
-
version: "2.4.0-
|
|
90403
|
+
version: "2.4.0-main64dae0d7",
|
|
90393
90404
|
type: "module",
|
|
90394
90405
|
private: false,
|
|
90395
90406
|
license: "FSL-1.1-MIT",
|
|
@@ -90408,7 +90419,9 @@ var package_default = {
|
|
|
90408
90419
|
url: "https://github.com/settlemint/sdk/issues",
|
|
90409
90420
|
email: "support@settlemint.com"
|
|
90410
90421
|
},
|
|
90411
|
-
files: [
|
|
90422
|
+
files: [
|
|
90423
|
+
"dist"
|
|
90424
|
+
],
|
|
90412
90425
|
exports: {
|
|
90413
90426
|
"./*": {
|
|
90414
90427
|
types: "./dist/*.d.ts",
|
|
@@ -90430,9 +90443,9 @@ var package_default = {
|
|
|
90430
90443
|
dependencies: {
|
|
90431
90444
|
"@graphql-tools/load": "8.1.0",
|
|
90432
90445
|
"@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-
|
|
90446
|
+
"@modelcontextprotocol/sdk": "1.13.3",
|
|
90447
|
+
"@settlemint/sdk-js": "2.4.0-main64dae0d7",
|
|
90448
|
+
"@settlemint/sdk-utils": "2.4.0-main64dae0d7",
|
|
90436
90449
|
"@commander-js/extra-typings": "14.0.0",
|
|
90437
90450
|
commander: "14.0.0",
|
|
90438
90451
|
zod: "^3.25.0"
|
|
@@ -91263,7 +91276,7 @@ var processFieldTypes = (fields2, schema, collectedTypes) => {
|
|
|
91263
91276
|
}
|
|
91264
91277
|
};
|
|
91265
91278
|
var collectCustomTypes = (type, schema, collectedTypes = new Set) => {
|
|
91266
|
-
const typeName = type.toString().replace(/[
|
|
91279
|
+
const typeName = type.toString().replace(/[[\]!]/g, "");
|
|
91267
91280
|
if (collectedTypes.has(typeName) || ["String", "Int", "Float", "Boolean", "ID"].includes(typeName)) {
|
|
91268
91281
|
return collectedTypes;
|
|
91269
91282
|
}
|
|
@@ -103557,8 +103570,9 @@ var workspaceList = (gqlClient) => {
|
|
|
103557
103570
|
const { workspaces } = await gqlClient.request(getWorkspacesAndApplications);
|
|
103558
103571
|
const allWorkspaces = workspaces.reduce((acc, workspace) => {
|
|
103559
103572
|
acc.push(workspace);
|
|
103560
|
-
if (workspace.childWorkspaces)
|
|
103573
|
+
if (workspace.childWorkspaces) {
|
|
103561
103574
|
acc.push(...workspace.childWorkspaces);
|
|
103575
|
+
}
|
|
103562
103576
|
return acc;
|
|
103563
103577
|
}, []);
|
|
103564
103578
|
return allWorkspaces.sort((a3, b) => a3.name.localeCompare(b.name));
|
|
@@ -103585,8 +103599,9 @@ var workspaceDelete = (gqlClient) => {
|
|
|
103585
103599
|
var workspaceAddCredits = (gqlClient) => {
|
|
103586
103600
|
return async (workspaceId, amount) => {
|
|
103587
103601
|
const id = validate3(IdSchema2, workspaceId);
|
|
103588
|
-
if (amount <= 0)
|
|
103602
|
+
if (amount <= 0) {
|
|
103589
103603
|
throw new Error("Credit amount must be a positive number");
|
|
103604
|
+
}
|
|
103590
103605
|
const { addCredits: result } = await gqlClient.request(addCredits, {
|
|
103591
103606
|
workspaceId: id,
|
|
103592
103607
|
amount
|
|
@@ -103708,8 +103723,9 @@ var applicationAccessTokenCreate = (gqlClient) => {
|
|
|
103708
103723
|
...otherArgs,
|
|
103709
103724
|
applicationId: application.id
|
|
103710
103725
|
});
|
|
103711
|
-
if (!applicationAccessToken.token)
|
|
103726
|
+
if (!applicationAccessToken.token) {
|
|
103712
103727
|
throw new Error("Failed to create application access token");
|
|
103728
|
+
}
|
|
103713
103729
|
return applicationAccessToken.token;
|
|
103714
103730
|
};
|
|
103715
103731
|
};
|
|
@@ -103722,7 +103738,7 @@ function setClusterServiceDefaults(args) {
|
|
|
103722
103738
|
}
|
|
103723
103739
|
function setNetworkDefaults(args) {
|
|
103724
103740
|
const clusterServiceArgs = setClusterServiceDefaults(args);
|
|
103725
|
-
if (args.consensusAlgorithm === "BESU_QBFT")
|
|
103741
|
+
if (args.consensusAlgorithm === "BESU_QBFT") {
|
|
103726
103742
|
return {
|
|
103727
103743
|
...clusterServiceArgs,
|
|
103728
103744
|
chainId: args.chainId ?? 46040,
|
|
@@ -103732,6 +103748,7 @@ function setNetworkDefaults(args) {
|
|
|
103732
103748
|
gasPrice: args.gasPrice ?? 0,
|
|
103733
103749
|
secondsPerBlock: args.secondsPerBlock ?? 2
|
|
103734
103750
|
};
|
|
103751
|
+
}
|
|
103735
103752
|
return clusterServiceArgs;
|
|
103736
103753
|
}
|
|
103737
103754
|
var BlockchainNetworkFragment = graphql(`
|
|
@@ -103894,6 +103911,20 @@ var restartBlockchainNetwork = graphql(`
|
|
|
103894
103911
|
}
|
|
103895
103912
|
}
|
|
103896
103913
|
`, [BlockchainNetworkFragment]);
|
|
103914
|
+
var pauseBlockchainNetwork = graphql(`
|
|
103915
|
+
mutation PauseBlockchainNetwork($uniqueName: String!) {
|
|
103916
|
+
pauseBlockchainNetworkByUniqueName(uniqueName: $uniqueName) {
|
|
103917
|
+
...BlockchainNetwork
|
|
103918
|
+
}
|
|
103919
|
+
}
|
|
103920
|
+
`, [BlockchainNetworkFragment]);
|
|
103921
|
+
var resumeBlockchainNetwork = graphql(`
|
|
103922
|
+
mutation ResumeBlockchainNetwork($uniqueName: String!) {
|
|
103923
|
+
resumeBlockchainNetworkByUniqueName(uniqueName: $uniqueName) {
|
|
103924
|
+
...BlockchainNetwork
|
|
103925
|
+
}
|
|
103926
|
+
}
|
|
103927
|
+
`, [BlockchainNetworkFragment]);
|
|
103897
103928
|
var blockchainNetworkList = (gqlClient) => {
|
|
103898
103929
|
return async (applicationUniqueName) => {
|
|
103899
103930
|
const { blockchainNetworksByUniqueName: { items } } = await gqlClient.request(getBlockchainNetworks, { applicationUniqueName });
|
|
@@ -103928,6 +103959,14 @@ var blockchainNetworkRestart = (gqlClient) => async (blockchainNetworkUniqueName
|
|
|
103928
103959
|
const { restartBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(restartBlockchainNetwork, { uniqueName: blockchainNetworkUniqueName });
|
|
103929
103960
|
return blockchainNetwork;
|
|
103930
103961
|
};
|
|
103962
|
+
var blockchainNetworkPause = (gqlClient) => async (blockchainNetworkUniqueName) => {
|
|
103963
|
+
const { pauseBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(pauseBlockchainNetwork, { uniqueName: blockchainNetworkUniqueName });
|
|
103964
|
+
return blockchainNetwork;
|
|
103965
|
+
};
|
|
103966
|
+
var blockchainNetworkResume = (gqlClient) => async (blockchainNetworkUniqueName) => {
|
|
103967
|
+
const { resumeBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(resumeBlockchainNetwork, { uniqueName: blockchainNetworkUniqueName });
|
|
103968
|
+
return blockchainNetwork;
|
|
103969
|
+
};
|
|
103931
103970
|
var BlockchainNodeFragment = graphql(`
|
|
103932
103971
|
fragment BlockchainNode on BlockchainNode {
|
|
103933
103972
|
__typename
|
|
@@ -104061,6 +104100,20 @@ var restartBlockchainNode = graphql(`
|
|
|
104061
104100
|
}
|
|
104062
104101
|
}
|
|
104063
104102
|
`, [BlockchainNodeFragment]);
|
|
104103
|
+
var pauseBlockchainNode = graphql(`
|
|
104104
|
+
mutation PauseBlockchainNode($uniqueName: String!) {
|
|
104105
|
+
pauseBlockchainNodeByUniqueName(uniqueName: $uniqueName) {
|
|
104106
|
+
...BlockchainNode
|
|
104107
|
+
}
|
|
104108
|
+
}
|
|
104109
|
+
`, [BlockchainNodeFragment]);
|
|
104110
|
+
var resumeBlockchainNode = graphql(`
|
|
104111
|
+
mutation ResumeBlockchainNode($uniqueName: String!) {
|
|
104112
|
+
resumeBlockchainNodeByUniqueName(uniqueName: $uniqueName) {
|
|
104113
|
+
...BlockchainNode
|
|
104114
|
+
}
|
|
104115
|
+
}
|
|
104116
|
+
`, [BlockchainNodeFragment]);
|
|
104064
104117
|
var blockchainNodeList = (gqlClient) => {
|
|
104065
104118
|
return async (applicationUniqueName) => {
|
|
104066
104119
|
const { blockchainNodesByUniqueName: { items } } = await gqlClient.request(getBlockchainNodes, { applicationUniqueName });
|
|
@@ -104089,6 +104142,14 @@ var blockchainNodeRestart = (gqlClient) => async (blockchainNodeUniqueName) => {
|
|
|
104089
104142
|
const { restartBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(restartBlockchainNode, { uniqueName: blockchainNodeUniqueName });
|
|
104090
104143
|
return blockchainNode;
|
|
104091
104144
|
};
|
|
104145
|
+
var blockchainNodePause = (gqlClient) => async (blockchainNodeUniqueName) => {
|
|
104146
|
+
const { pauseBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(pauseBlockchainNode, { uniqueName: blockchainNodeUniqueName });
|
|
104147
|
+
return blockchainNode;
|
|
104148
|
+
};
|
|
104149
|
+
var blockchainNodeResume = (gqlClient) => async (blockchainNodeUniqueName) => {
|
|
104150
|
+
const { resumeBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(resumeBlockchainNode, { uniqueName: blockchainNodeUniqueName });
|
|
104151
|
+
return blockchainNode;
|
|
104152
|
+
};
|
|
104092
104153
|
var CustomDeploymentFragment = graphql(`
|
|
104093
104154
|
fragment CustomDeployment on CustomDeployment {
|
|
104094
104155
|
id
|
|
@@ -104171,6 +104232,20 @@ var restartCustomDeployment = graphql(`
|
|
|
104171
104232
|
}
|
|
104172
104233
|
}
|
|
104173
104234
|
`, [CustomDeploymentFragment]);
|
|
104235
|
+
var pauseCustomDeployment = graphql(`
|
|
104236
|
+
mutation PauseCustomDeployment($uniqueName: String!) {
|
|
104237
|
+
pauseCustomDeploymentByUniqueName(uniqueName: $uniqueName) {
|
|
104238
|
+
...CustomDeployment
|
|
104239
|
+
}
|
|
104240
|
+
}
|
|
104241
|
+
`, [CustomDeploymentFragment]);
|
|
104242
|
+
var resumeCustomDeployment = graphql(`
|
|
104243
|
+
mutation ResumeCustomDeployment($uniqueName: String!) {
|
|
104244
|
+
resumeCustomDeploymentByUniqueName(uniqueName: $uniqueName) {
|
|
104245
|
+
...CustomDeployment
|
|
104246
|
+
}
|
|
104247
|
+
}
|
|
104248
|
+
`, [CustomDeploymentFragment]);
|
|
104174
104249
|
var customdeploymentList = (gqlClient) => {
|
|
104175
104250
|
return async (applicationUniqueName) => {
|
|
104176
104251
|
const { customDeploymentsByUniqueName: { items } } = await gqlClient.request(getCustomDeployments, { applicationUniqueName });
|
|
@@ -104207,6 +104282,14 @@ var customDeploymentRestart = (gqlClient) => async (customDeploymentUniqueName)
|
|
|
104207
104282
|
const { restartCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(restartCustomDeployment, { uniqueName: customDeploymentUniqueName });
|
|
104208
104283
|
return customDeployment;
|
|
104209
104284
|
};
|
|
104285
|
+
var customDeploymentPause = (gqlClient) => async (customDeploymentUniqueName) => {
|
|
104286
|
+
const { pauseCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(pauseCustomDeployment, { uniqueName: customDeploymentUniqueName });
|
|
104287
|
+
return customDeployment;
|
|
104288
|
+
};
|
|
104289
|
+
var customDeploymentResume = (gqlClient) => async (customDeploymentUniqueName) => {
|
|
104290
|
+
const { resumeCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(resumeCustomDeployment, { uniqueName: customDeploymentUniqueName });
|
|
104291
|
+
return customDeployment;
|
|
104292
|
+
};
|
|
104210
104293
|
var getFoundryEnvConfig = graphql(`
|
|
104211
104294
|
query GetFoundryEnvConfig($blockchainNodeUniqueName: String!) {
|
|
104212
104295
|
foundryEnvConfigByUniqueName(blockchainNodeUniqueName: $blockchainNodeUniqueName)
|
|
@@ -104283,6 +104366,20 @@ var restartLoadBalancer = graphql(`
|
|
|
104283
104366
|
}
|
|
104284
104367
|
}
|
|
104285
104368
|
`, [LoadBalancerFragment]);
|
|
104369
|
+
var pauseLoadBalancer = graphql(`
|
|
104370
|
+
mutation PauseLoadBalancer($uniqueName: String!) {
|
|
104371
|
+
pauseLoadBalancerByUniqueName(uniqueName: $uniqueName) {
|
|
104372
|
+
...LoadBalancer
|
|
104373
|
+
}
|
|
104374
|
+
}
|
|
104375
|
+
`, [LoadBalancerFragment]);
|
|
104376
|
+
var resumeLoadBalancer = graphql(`
|
|
104377
|
+
mutation ResumeLoadBalancer($uniqueName: String!) {
|
|
104378
|
+
resumeLoadBalancerByUniqueName(uniqueName: $uniqueName) {
|
|
104379
|
+
...LoadBalancer
|
|
104380
|
+
}
|
|
104381
|
+
}
|
|
104382
|
+
`, [LoadBalancerFragment]);
|
|
104286
104383
|
var loadBalancerRead = (gqlClient) => {
|
|
104287
104384
|
return async (loadBalancerUniqueName) => {
|
|
104288
104385
|
const { loadBalancerByUniqueName: loadBalancer } = await gqlClient.request(getLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
|
@@ -104316,6 +104413,14 @@ var loadBalancerRestart = (gqlClient) => async (loadBalancerUniqueName) => {
|
|
|
104316
104413
|
const { restartLoadBalancerByUniqueName: loadBalancer } = await gqlClient.request(restartLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
|
104317
104414
|
return loadBalancer;
|
|
104318
104415
|
};
|
|
104416
|
+
var loadBalancerPause = (gqlClient) => async (loadBalancerUniqueName) => {
|
|
104417
|
+
const { pauseLoadBalancerByUniqueName: loadBalancer } = await gqlClient.request(pauseLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
|
104418
|
+
return loadBalancer;
|
|
104419
|
+
};
|
|
104420
|
+
var loadBalancerResume = (gqlClient) => async (loadBalancerUniqueName) => {
|
|
104421
|
+
const { resumeLoadBalancerByUniqueName: loadBalancer } = await gqlClient.request(resumeLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
|
104422
|
+
return loadBalancer;
|
|
104423
|
+
};
|
|
104319
104424
|
var InsightsFragment = graphql(`
|
|
104320
104425
|
fragment Insights on Insights {
|
|
104321
104426
|
__typename
|
|
@@ -104389,6 +104494,20 @@ var restartInsights = graphql(`
|
|
|
104389
104494
|
}
|
|
104390
104495
|
}
|
|
104391
104496
|
`, [InsightsFragment]);
|
|
104497
|
+
var pauseInsights = graphql(`
|
|
104498
|
+
mutation PauseInsights($uniqueName: String!) {
|
|
104499
|
+
pauseInsightsByUniqueName(uniqueName: $uniqueName) {
|
|
104500
|
+
...Insights
|
|
104501
|
+
}
|
|
104502
|
+
}
|
|
104503
|
+
`, [InsightsFragment]);
|
|
104504
|
+
var resumeInsights = graphql(`
|
|
104505
|
+
mutation ResumeInsights($uniqueName: String!) {
|
|
104506
|
+
resumeInsightsByUniqueName(uniqueName: $uniqueName) {
|
|
104507
|
+
...Insights
|
|
104508
|
+
}
|
|
104509
|
+
}
|
|
104510
|
+
`, [InsightsFragment]);
|
|
104392
104511
|
var insightsList = (gqlClient) => {
|
|
104393
104512
|
return async (applicationUniqueName) => {
|
|
104394
104513
|
const { insightsListByUniqueName: { items } } = await gqlClient.request(getInsights, { applicationUniqueName });
|
|
@@ -104422,6 +104541,14 @@ var insightsRestart = (gqlClient) => async (insightsUniqueName) => {
|
|
|
104422
104541
|
const { restartInsightsByUniqueName: insights } = await gqlClient.request(restartInsights, { uniqueName: insightsUniqueName });
|
|
104423
104542
|
return insights;
|
|
104424
104543
|
};
|
|
104544
|
+
var insightsPause = (gqlClient) => async (insightsUniqueName) => {
|
|
104545
|
+
const { pauseInsightsByUniqueName: insights } = await gqlClient.request(pauseInsights, { uniqueName: insightsUniqueName });
|
|
104546
|
+
return insights;
|
|
104547
|
+
};
|
|
104548
|
+
var insightsResume = (gqlClient) => async (insightsUniqueName) => {
|
|
104549
|
+
const { resumeInsightsByUniqueName: insights } = await gqlClient.request(resumeInsights, { uniqueName: insightsUniqueName });
|
|
104550
|
+
return insights;
|
|
104551
|
+
};
|
|
104425
104552
|
var IntegrationFragment = graphql(`
|
|
104426
104553
|
fragment Integration on Integration {
|
|
104427
104554
|
__typename
|
|
@@ -104491,6 +104618,20 @@ var restartIntegrationTool = graphql(`
|
|
|
104491
104618
|
}
|
|
104492
104619
|
}
|
|
104493
104620
|
`, [IntegrationFragment]);
|
|
104621
|
+
var pauseIntegrationTool = graphql(`
|
|
104622
|
+
mutation PauseIntegrationTool($uniqueName: String!) {
|
|
104623
|
+
pauseIntegrationByUniqueName(uniqueName: $uniqueName) {
|
|
104624
|
+
...Integration
|
|
104625
|
+
}
|
|
104626
|
+
}
|
|
104627
|
+
`, [IntegrationFragment]);
|
|
104628
|
+
var resumeIntegrationTool = graphql(`
|
|
104629
|
+
mutation ResumeIntegrationTool($uniqueName: String!) {
|
|
104630
|
+
resumeIntegrationByUniqueName(uniqueName: $uniqueName) {
|
|
104631
|
+
...Integration
|
|
104632
|
+
}
|
|
104633
|
+
}
|
|
104634
|
+
`, [IntegrationFragment]);
|
|
104494
104635
|
var integrationToolList = (gqlClient) => {
|
|
104495
104636
|
return async (applicationUniqueName) => {
|
|
104496
104637
|
const { integrationsByUniqueName: { items } } = await gqlClient.request(getIntegrations, { applicationUniqueName });
|
|
@@ -104518,6 +104659,14 @@ var integrationToolRestart = (gqlClient) => async (integrationUniqueName) => {
|
|
|
104518
104659
|
const { restartIntegrationByUniqueName: integration } = await gqlClient.request(restartIntegrationTool, { uniqueName: integrationUniqueName });
|
|
104519
104660
|
return integration;
|
|
104520
104661
|
};
|
|
104662
|
+
var integrationToolPause = (gqlClient) => async (integrationUniqueName) => {
|
|
104663
|
+
const { pauseIntegrationByUniqueName: integration } = await gqlClient.request(pauseIntegrationTool, { uniqueName: integrationUniqueName });
|
|
104664
|
+
return integration;
|
|
104665
|
+
};
|
|
104666
|
+
var integrationToolResume = (gqlClient) => async (integrationUniqueName) => {
|
|
104667
|
+
const { resumeIntegrationByUniqueName: integration } = await gqlClient.request(resumeIntegrationTool, { uniqueName: integrationUniqueName });
|
|
104668
|
+
return integration;
|
|
104669
|
+
};
|
|
104521
104670
|
var StorageFragment = graphql(`
|
|
104522
104671
|
fragment Storage on Storage {
|
|
104523
104672
|
__typename
|
|
@@ -104587,6 +104736,20 @@ var restartStorage = graphql(`
|
|
|
104587
104736
|
}
|
|
104588
104737
|
}
|
|
104589
104738
|
`, [StorageFragment]);
|
|
104739
|
+
var pauseStorage = graphql(`
|
|
104740
|
+
mutation PauseStorage($uniqueName: String!) {
|
|
104741
|
+
pauseStorageByUniqueName(uniqueName: $uniqueName) {
|
|
104742
|
+
...Storage
|
|
104743
|
+
}
|
|
104744
|
+
}
|
|
104745
|
+
`, [StorageFragment]);
|
|
104746
|
+
var resumeStorage = graphql(`
|
|
104747
|
+
mutation ResumeStorage($uniqueName: String!) {
|
|
104748
|
+
resumeStorageByUniqueName(uniqueName: $uniqueName) {
|
|
104749
|
+
...Storage
|
|
104750
|
+
}
|
|
104751
|
+
}
|
|
104752
|
+
`, [StorageFragment]);
|
|
104590
104753
|
var storageList = (gqlClient) => {
|
|
104591
104754
|
return async (applicationUniqueName) => {
|
|
104592
104755
|
const { storagesByUniqueName: { items } } = await gqlClient.request(getStorages, { applicationUniqueName });
|
|
@@ -104614,6 +104777,14 @@ var storageRestart = (gqlClient) => async (storageUniqueName) => {
|
|
|
104614
104777
|
const { restartStorageByUniqueName: storage } = await gqlClient.request(restartStorage, { uniqueName: storageUniqueName });
|
|
104615
104778
|
return storage;
|
|
104616
104779
|
};
|
|
104780
|
+
var storagePause = (gqlClient) => async (storageUniqueName) => {
|
|
104781
|
+
const { pauseStorageByUniqueName: storage } = await gqlClient.request(pauseStorage, { uniqueName: storageUniqueName });
|
|
104782
|
+
return storage;
|
|
104783
|
+
};
|
|
104784
|
+
var storageResume = (gqlClient) => async (storageUniqueName) => {
|
|
104785
|
+
const { resumeStorageByUniqueName: storage } = await gqlClient.request(resumeStorage, { uniqueName: storageUniqueName });
|
|
104786
|
+
return storage;
|
|
104787
|
+
};
|
|
104617
104788
|
var MiddlewareFragment = graphql(`
|
|
104618
104789
|
fragment Middleware on Middleware {
|
|
104619
104790
|
__typename
|
|
@@ -104714,6 +104885,20 @@ var restartMiddleware = graphql(`
|
|
|
104714
104885
|
}
|
|
104715
104886
|
}
|
|
104716
104887
|
`, [MiddlewareFragment]);
|
|
104888
|
+
var pauseMiddleware = graphql(`
|
|
104889
|
+
mutation PauseMiddleware($uniqueName: String!) {
|
|
104890
|
+
pauseMiddlewareByUniqueName(uniqueName: $uniqueName) {
|
|
104891
|
+
...Middleware
|
|
104892
|
+
}
|
|
104893
|
+
}
|
|
104894
|
+
`, [MiddlewareFragment]);
|
|
104895
|
+
var resumeMiddleware = graphql(`
|
|
104896
|
+
mutation ResumeMiddleware($uniqueName: String!) {
|
|
104897
|
+
resumeMiddlewareByUniqueName(uniqueName: $uniqueName) {
|
|
104898
|
+
...Middleware
|
|
104899
|
+
}
|
|
104900
|
+
}
|
|
104901
|
+
`, [MiddlewareFragment]);
|
|
104717
104902
|
var middlewareList = (gqlClient) => {
|
|
104718
104903
|
return async (applicationUniqueName) => {
|
|
104719
104904
|
const { middlewaresByUniqueName: { items } } = await gqlClient.request(getMiddlewares, { applicationUniqueName });
|
|
@@ -104758,6 +104943,14 @@ var middlewareRestart = (gqlClient) => async (middlewareUniqueName) => {
|
|
|
104758
104943
|
const { restartMiddlewareByUniqueName: middleware } = await gqlClient.request(restartMiddleware, { uniqueName: middlewareUniqueName });
|
|
104759
104944
|
return middleware;
|
|
104760
104945
|
};
|
|
104946
|
+
var middlewarePause = (gqlClient) => async (middlewareUniqueName) => {
|
|
104947
|
+
const { pauseMiddlewareByUniqueName: middleware } = await gqlClient.request(pauseMiddleware, { uniqueName: middlewareUniqueName });
|
|
104948
|
+
return middleware;
|
|
104949
|
+
};
|
|
104950
|
+
var middlewareResume = (gqlClient) => async (middlewareUniqueName) => {
|
|
104951
|
+
const { resumeMiddlewareByUniqueName: middleware } = await gqlClient.request(resumeMiddleware, { uniqueName: middlewareUniqueName });
|
|
104952
|
+
return middleware;
|
|
104953
|
+
};
|
|
104761
104954
|
var getPlatformConfigQuery = graphql(`
|
|
104762
104955
|
query platformConfig {
|
|
104763
104956
|
config {
|
|
@@ -104890,6 +105083,20 @@ var restartPrivateKey = graphql(`
|
|
|
104890
105083
|
}
|
|
104891
105084
|
}
|
|
104892
105085
|
`, [PrivateKeyFragment]);
|
|
105086
|
+
var pausePrivateKey = graphql(`
|
|
105087
|
+
mutation PausePrivateKey($uniqueName: String!) {
|
|
105088
|
+
pausePrivateKeyByUniqueName(uniqueName: $uniqueName) {
|
|
105089
|
+
...PrivateKey
|
|
105090
|
+
}
|
|
105091
|
+
}
|
|
105092
|
+
`, [PrivateKeyFragment]);
|
|
105093
|
+
var resumePrivateKey = graphql(`
|
|
105094
|
+
mutation ResumePrivateKey($uniqueName: String!) {
|
|
105095
|
+
resumePrivateKeyByUniqueName(uniqueName: $uniqueName) {
|
|
105096
|
+
...PrivateKey
|
|
105097
|
+
}
|
|
105098
|
+
}
|
|
105099
|
+
`, [PrivateKeyFragment]);
|
|
104893
105100
|
var privateKeyList = (gqlClient) => {
|
|
104894
105101
|
return async (applicationUniqueName) => {
|
|
104895
105102
|
const { privateKeysByUniqueName: { items } } = await gqlClient.request(getPrivateKeys, { applicationUniqueName });
|
|
@@ -104928,6 +105135,14 @@ var privateKeyRestart = (gqlClient) => async (privateKeyUniqueName) => {
|
|
|
104928
105135
|
const { restartPrivateKeyByUniqueName: privateKey } = await gqlClient.request(restartPrivateKey, { uniqueName: privateKeyUniqueName });
|
|
104929
105136
|
return privateKey;
|
|
104930
105137
|
};
|
|
105138
|
+
var privateKeyPause = (gqlClient) => async (privateKeyUniqueName) => {
|
|
105139
|
+
const { pausePrivateKeyByUniqueName: privateKey } = await gqlClient.request(pausePrivateKey, { uniqueName: privateKeyUniqueName });
|
|
105140
|
+
return privateKey;
|
|
105141
|
+
};
|
|
105142
|
+
var privateKeyResume = (gqlClient) => async (privateKeyUniqueName) => {
|
|
105143
|
+
const { resumePrivateKeyByUniqueName: privateKey } = await gqlClient.request(resumePrivateKey, { uniqueName: privateKeyUniqueName });
|
|
105144
|
+
return privateKey;
|
|
105145
|
+
};
|
|
104931
105146
|
var ClientOptionsSchema = exports_external2.object({
|
|
104932
105147
|
accessToken: AccessTokenSchema2,
|
|
104933
105148
|
instance: UrlSchema2
|
|
@@ -104948,26 +105163,30 @@ async function getPincodeVerificationChallenges({ userWalletAddress, accessToken
|
|
|
104948
105163
|
}
|
|
104949
105164
|
});
|
|
104950
105165
|
if (!response.ok) {
|
|
104951
|
-
if (response.status === 404)
|
|
105166
|
+
if (response.status === 404) {
|
|
104952
105167
|
throw new Error(`No user wallet found with address '${userWalletAddress}' for node '${nodeId}'`);
|
|
105168
|
+
}
|
|
104953
105169
|
throw new Error("Failed to get verification challenge");
|
|
104954
105170
|
}
|
|
104955
105171
|
const verificationChallenges = await response.json();
|
|
104956
105172
|
return verificationChallenges;
|
|
104957
105173
|
}
|
|
104958
105174
|
function getPincodeVerificationChallengeResponse({ verificationChallenge, pincode }) {
|
|
104959
|
-
if (!verificationChallenge?.challenge?.secret || !verificationChallenge?.challenge?.salt)
|
|
105175
|
+
if (!verificationChallenge?.challenge?.secret || !verificationChallenge?.challenge?.salt) {
|
|
104960
105176
|
throw new Error("Could not authenticate pin code, invalid challenge format");
|
|
105177
|
+
}
|
|
104961
105178
|
const { secret, salt } = verificationChallenge.challenge;
|
|
104962
105179
|
return generateResponse(pincode, salt, secret);
|
|
104963
105180
|
}
|
|
104964
105181
|
function createSettleMintClient(options) {
|
|
104965
105182
|
ensureServer();
|
|
104966
|
-
if (options.instance === STANDALONE_INSTANCE2 || options.instance === LOCAL_INSTANCE2)
|
|
104967
|
-
if (options.anonymous)
|
|
105183
|
+
if (options.instance === STANDALONE_INSTANCE2 || options.instance === LOCAL_INSTANCE2) {
|
|
105184
|
+
if (options.anonymous) {
|
|
104968
105185
|
options.instance = "https://console.settlemint.com";
|
|
104969
|
-
else
|
|
105186
|
+
} else {
|
|
104970
105187
|
throw new Error("Standalone and local instances cannot connect to the SettleMint platform");
|
|
105188
|
+
}
|
|
105189
|
+
}
|
|
104971
105190
|
const validatedOptions = options.anonymous ? validate3(exports_external2.object({
|
|
104972
105191
|
...ClientOptionsSchema.shape,
|
|
104973
105192
|
accessToken: exports_external2.literal("")
|
|
@@ -105007,57 +105226,75 @@ function createSettleMintClient(options) {
|
|
|
105007
105226
|
read: blockchainNetworkRead(gqlClient),
|
|
105008
105227
|
create: blockchainNetworkCreate(gqlClient),
|
|
105009
105228
|
delete: blockchainNetworkDelete(gqlClient),
|
|
105010
|
-
restart: blockchainNetworkRestart(gqlClient)
|
|
105229
|
+
restart: blockchainNetworkRestart(gqlClient),
|
|
105230
|
+
pause: blockchainNetworkPause(gqlClient),
|
|
105231
|
+
resume: blockchainNetworkResume(gqlClient)
|
|
105011
105232
|
},
|
|
105012
105233
|
blockchainNode: {
|
|
105013
105234
|
list: blockchainNodeList(gqlClient),
|
|
105014
105235
|
read: blockchainNodeRead(gqlClient),
|
|
105015
105236
|
create: blockchainNodeCreate(gqlClient),
|
|
105016
|
-
restart: blockchainNodeRestart(gqlClient)
|
|
105237
|
+
restart: blockchainNodeRestart(gqlClient),
|
|
105238
|
+
pause: blockchainNodePause(gqlClient),
|
|
105239
|
+
resume: blockchainNodeResume(gqlClient)
|
|
105017
105240
|
},
|
|
105018
105241
|
loadBalancer: {
|
|
105019
105242
|
list: loadBalancerList(gqlClient),
|
|
105020
105243
|
read: loadBalancerRead(gqlClient),
|
|
105021
105244
|
create: loadBalancerCreate(gqlClient),
|
|
105022
|
-
restart: loadBalancerRestart(gqlClient)
|
|
105245
|
+
restart: loadBalancerRestart(gqlClient),
|
|
105246
|
+
pause: loadBalancerPause(gqlClient),
|
|
105247
|
+
resume: loadBalancerResume(gqlClient)
|
|
105023
105248
|
},
|
|
105024
105249
|
middleware: {
|
|
105025
105250
|
list: middlewareList(gqlClient),
|
|
105026
105251
|
read: middlewareRead(gqlClient),
|
|
105027
105252
|
graphSubgraphs: graphMiddlewareSubgraphs(gqlClient),
|
|
105028
105253
|
create: middlewareCreate(gqlClient),
|
|
105029
|
-
restart: middlewareRestart(gqlClient)
|
|
105254
|
+
restart: middlewareRestart(gqlClient),
|
|
105255
|
+
pause: middlewarePause(gqlClient),
|
|
105256
|
+
resume: middlewareResume(gqlClient)
|
|
105030
105257
|
},
|
|
105031
105258
|
integrationTool: {
|
|
105032
105259
|
list: integrationToolList(gqlClient),
|
|
105033
105260
|
read: integrationToolRead(gqlClient),
|
|
105034
105261
|
create: integrationToolCreate(gqlClient),
|
|
105035
|
-
restart: integrationToolRestart(gqlClient)
|
|
105262
|
+
restart: integrationToolRestart(gqlClient),
|
|
105263
|
+
pause: integrationToolPause(gqlClient),
|
|
105264
|
+
resume: integrationToolResume(gqlClient)
|
|
105036
105265
|
},
|
|
105037
105266
|
storage: {
|
|
105038
105267
|
list: storageList(gqlClient),
|
|
105039
105268
|
read: storageRead(gqlClient),
|
|
105040
105269
|
create: storageCreate(gqlClient),
|
|
105041
|
-
restart: storageRestart(gqlClient)
|
|
105270
|
+
restart: storageRestart(gqlClient),
|
|
105271
|
+
pause: storagePause(gqlClient),
|
|
105272
|
+
resume: storageResume(gqlClient)
|
|
105042
105273
|
},
|
|
105043
105274
|
privateKey: {
|
|
105044
105275
|
list: privateKeyList(gqlClient),
|
|
105045
105276
|
read: privatekeyRead(gqlClient),
|
|
105046
105277
|
create: privateKeyCreate(gqlClient),
|
|
105047
|
-
restart: privateKeyRestart(gqlClient)
|
|
105278
|
+
restart: privateKeyRestart(gqlClient),
|
|
105279
|
+
pause: privateKeyPause(gqlClient),
|
|
105280
|
+
resume: privateKeyResume(gqlClient)
|
|
105048
105281
|
},
|
|
105049
105282
|
insights: {
|
|
105050
105283
|
list: insightsList(gqlClient),
|
|
105051
105284
|
read: insightsRead(gqlClient),
|
|
105052
105285
|
create: insightsCreate(gqlClient),
|
|
105053
|
-
restart: insightsRestart(gqlClient)
|
|
105286
|
+
restart: insightsRestart(gqlClient),
|
|
105287
|
+
pause: insightsPause(gqlClient),
|
|
105288
|
+
resume: insightsResume(gqlClient)
|
|
105054
105289
|
},
|
|
105055
105290
|
customDeployment: {
|
|
105056
105291
|
list: customdeploymentList(gqlClient),
|
|
105057
105292
|
read: customdeploymentRead(gqlClient),
|
|
105058
105293
|
create: customdeploymentCreate(gqlClient),
|
|
105059
105294
|
update: customdeploymentUpdate(gqlClient),
|
|
105060
|
-
restart: customDeploymentRestart(gqlClient)
|
|
105295
|
+
restart: customDeploymentRestart(gqlClient),
|
|
105296
|
+
pause: customDeploymentPause(gqlClient),
|
|
105297
|
+
resume: customDeploymentResume(gqlClient)
|
|
105061
105298
|
},
|
|
105062
105299
|
foundry: { env: getEnv(gqlClient) },
|
|
105063
105300
|
applicationAccessToken: { create: applicationAccessTokenCreate(gqlClient) },
|
|
@@ -106589,21 +106826,6 @@ var promptsGet = (server, _env) => {
|
|
|
106589
106826
|
try {
|
|
106590
106827
|
const promptsDir = path2.resolve(__dirname, "../../prompts");
|
|
106591
106828
|
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
106829
|
const fileContent = await fs.readFile(promptPath, "utf-8");
|
|
106608
106830
|
return {
|
|
106609
106831
|
content: [
|
|
@@ -106617,6 +106839,19 @@ var promptsGet = (server, _env) => {
|
|
|
106617
106839
|
]
|
|
106618
106840
|
};
|
|
106619
106841
|
} catch (error41) {
|
|
106842
|
+
if (error41 instanceof Error && "code" in error41 && error41.code === "ENOENT") {
|
|
106843
|
+
return {
|
|
106844
|
+
content: [
|
|
106845
|
+
{
|
|
106846
|
+
type: "text",
|
|
106847
|
+
name: "Prompt Not Found",
|
|
106848
|
+
description: `Prompt '${name2}' in category '${category}' not found`,
|
|
106849
|
+
mimeType: "text/plain",
|
|
106850
|
+
text: `Prompt '${name2}' in category '${category}' does not exist. Use the prompts-list tool to see available prompts.`
|
|
106851
|
+
}
|
|
106852
|
+
]
|
|
106853
|
+
};
|
|
106854
|
+
}
|
|
106620
106855
|
return {
|
|
106621
106856
|
content: [
|
|
106622
106857
|
{
|
|
@@ -106707,21 +106942,6 @@ var resourcesGet = (server, _env) => {
|
|
|
106707
106942
|
try {
|
|
106708
106943
|
const resourcesDir = path4.resolve(__dirname, "../../resources");
|
|
106709
106944
|
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
106945
|
const fileContent = await fs3.readFile(resourcePath, "utf-8");
|
|
106726
106946
|
return {
|
|
106727
106947
|
content: [
|
|
@@ -106735,6 +106955,19 @@ var resourcesGet = (server, _env) => {
|
|
|
106735
106955
|
]
|
|
106736
106956
|
};
|
|
106737
106957
|
} catch (error41) {
|
|
106958
|
+
if (error41 instanceof Error && "code" in error41 && error41.code === "ENOENT") {
|
|
106959
|
+
return {
|
|
106960
|
+
content: [
|
|
106961
|
+
{
|
|
106962
|
+
type: "text",
|
|
106963
|
+
name: "Resource Not Found",
|
|
106964
|
+
description: `Resource '${name2}' not found`,
|
|
106965
|
+
mimeType: "text/plain",
|
|
106966
|
+
text: `Resource '${name2}' does not exist. Use the resources-list tool to see available resources.`
|
|
106967
|
+
}
|
|
106968
|
+
]
|
|
106969
|
+
};
|
|
106970
|
+
}
|
|
106738
106971
|
return {
|
|
106739
106972
|
content: [
|
|
106740
106973
|
{
|
|
@@ -106885,4 +107118,4 @@ await main().catch((error41) => {
|
|
|
106885
107118
|
process.exit(1);
|
|
106886
107119
|
});
|
|
106887
107120
|
|
|
106888
|
-
//# debugId=
|
|
107121
|
+
//# debugId=BAD2EE4726E417A364756E2164756E21
|