@gala-chain/launchpad-mcp-server 1.23.0 → 1.23.1
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/DRY_REFACTORING_GUIDE.md +272 -0
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/prompts/analysis.d.ts.map +1 -1
- package/dist/prompts/analysis.js +14 -63
- package/dist/prompts/analysis.js.map +1 -1
- package/dist/prompts/balances.d.ts.map +1 -1
- package/dist/prompts/balances.js +46 -70
- package/dist/prompts/balances.js.map +1 -1
- package/dist/prompts/creation-utils.d.ts.map +1 -1
- package/dist/prompts/creation-utils.js +27 -50
- package/dist/prompts/creation-utils.js.map +1 -1
- package/dist/prompts/liquidity-positions.d.ts.map +1 -1
- package/dist/prompts/liquidity-positions.js +9 -44
- package/dist/prompts/liquidity-positions.js.map +1 -1
- package/dist/prompts/pools.d.ts.map +1 -1
- package/dist/prompts/pools.js +125 -228
- package/dist/prompts/pools.js.map +1 -1
- package/dist/prompts/portfolio.d.ts.map +1 -1
- package/dist/prompts/portfolio.js +13 -48
- package/dist/prompts/portfolio.js.map +1 -1
- package/dist/prompts/social.d.ts.map +1 -1
- package/dist/prompts/social.js +21 -31
- package/dist/prompts/social.js.map +1 -1
- package/dist/prompts/trading-calculations.d.ts.map +1 -1
- package/dist/prompts/trading-calculations.js +37 -126
- package/dist/prompts/trading-calculations.js.map +1 -1
- package/dist/prompts/trading.d.ts.map +1 -1
- package/dist/prompts/trading.js +23 -60
- package/dist/prompts/trading.js.map +1 -1
- package/dist/prompts/transfers.d.ts.map +1 -1
- package/dist/prompts/transfers.js +21 -31
- package/dist/prompts/transfers.js.map +1 -1
- package/dist/prompts/utility-tools.d.ts.map +1 -1
- package/dist/prompts/utility-tools.js +83 -202
- package/dist/prompts/utility-tools.js.map +1 -1
- package/dist/prompts/utility.d.ts.map +1 -1
- package/dist/prompts/utility.js +5 -20
- package/dist/prompts/utility.js.map +1 -1
- package/dist/prompts/utils/handlerHelpers.d.ts +35 -0
- package/dist/prompts/utils/handlerHelpers.d.ts.map +1 -0
- package/dist/prompts/utils/handlerHelpers.js +53 -0
- package/dist/prompts/utils/handlerHelpers.js.map +1 -0
- package/dist/prompts/utils/textTemplates.d.ts +42 -0
- package/dist/prompts/utils/textTemplates.d.ts.map +1 -0
- package/dist/prompts/utils/textTemplates.js +51 -0
- package/dist/prompts/utils/textTemplates.js.map +1 -0
- package/dist/utils/validation.d.ts +38 -0
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +52 -0
- package/dist/utils/validation.js.map +1 -1
- package/package.json +2 -2
- package/docs/AI-AGENT-PATTERNS.md +0 -555
- package/docs/CONSTRAINTS-REFERENCE.md +0 -454
- package/docs/PROMPT-TOOL-MAPPING.md +0 -352
- package/docs/examples/default-values-pattern.md +0 -240
- package/docs/examples/tool-factory-pattern.md +0 -217
- package/jest.config.js +0 -94
- package/src/__tests__/integration/fetchTokenDetails.integration.test.ts +0 -258
- package/src/__tests__/integration/poolTools.integration.test.ts +0 -185
- package/src/__tests__/server.test.ts +0 -256
- package/src/constants/mcpToolNames.ts +0 -181
- package/src/index.ts +0 -19
- package/src/prompts/__tests__/promptStructure.test.ts +0 -137
- package/src/prompts/__tests__/registry.test.ts +0 -359
- package/src/prompts/analysis.ts +0 -429
- package/src/prompts/balances.ts +0 -198
- package/src/prompts/create-token.ts +0 -123
- package/src/prompts/creation-utils.ts +0 -118
- package/src/prompts/dex-trading.ts +0 -86
- package/src/prompts/discover-tokens.ts +0 -86
- package/src/prompts/index.ts +0 -175
- package/src/prompts/liquidity-positions.ts +0 -270
- package/src/prompts/pools.ts +0 -571
- package/src/prompts/portfolio.ts +0 -242
- package/src/prompts/social.ts +0 -100
- package/src/prompts/trading-calculations.ts +0 -499
- package/src/prompts/trading.ts +0 -191
- package/src/prompts/transfers.ts +0 -103
- package/src/prompts/utility-tools.ts +0 -349
- package/src/prompts/utility.ts +0 -92
- package/src/prompts/utils/workflowTemplates.ts +0 -511
- package/src/schemas/common-schemas.ts +0 -393
- package/src/scripts/test-all-prompts.ts +0 -184
- package/src/server.ts +0 -367
- package/src/tools/__tests__/dex-tools.test.ts +0 -562
- package/src/tools/__tests__/liquidity-positions.test.ts +0 -673
- package/src/tools/balance/index.ts +0 -174
- package/src/tools/creation/index.ts +0 -182
- package/src/tools/dex/index.ts +0 -226
- package/src/tools/dex/liquidity-positions.ts +0 -547
- package/src/tools/index.ts +0 -94
- package/src/tools/pools/fetchAllPools.ts +0 -47
- package/src/tools/pools/fetchAllPriceHistory.ts +0 -119
- package/src/tools/pools/fetchPoolDetails.ts +0 -27
- package/src/tools/pools/fetchPoolDetailsForCalculation.ts +0 -22
- package/src/tools/pools/fetchPools.ts +0 -47
- package/src/tools/pools/fetchPriceHistory.ts +0 -124
- package/src/tools/pools/fetchTokenDetails.ts +0 -77
- package/src/tools/pools/index.ts +0 -284
- package/src/tools/social/index.ts +0 -64
- package/src/tools/trading/index.ts +0 -605
- package/src/tools/transfers/index.ts +0 -75
- package/src/tools/utils/clearCache.ts +0 -36
- package/src/tools/utils/createWallet.ts +0 -19
- package/src/tools/utils/explainSdkUsage.ts +0 -1446
- package/src/tools/utils/getAddress.ts +0 -12
- package/src/tools/utils/getCacheInfo.ts +0 -14
- package/src/tools/utils/getConfig.ts +0 -21
- package/src/tools/utils/getEnvironment.ts +0 -17
- package/src/tools/utils/getEthereumAddress.ts +0 -12
- package/src/tools/utils/getUrlByTokenName.ts +0 -12
- package/src/tools/utils/getVersion.ts +0 -25
- package/src/tools/utils/getWallet.ts +0 -25
- package/src/tools/utils/hasWallet.ts +0 -15
- package/src/tools/utils/index.ts +0 -37
- package/src/tools/utils/isTokenGraduated.ts +0 -16
- package/src/tools/utils/setWallet.ts +0 -41
- package/src/tools/utils/switchEnvironment.ts +0 -28
- package/src/types/mcp.ts +0 -72
- package/src/utils/__tests__/validation.test.ts +0 -147
- package/src/utils/constraints.ts +0 -155
- package/src/utils/default-values.ts +0 -208
- package/src/utils/error-handler.ts +0 -69
- package/src/utils/error-templates.ts +0 -273
- package/src/utils/response-formatter.ts +0 -51
- package/src/utils/tool-factory.ts +0 -303
- package/src/utils/tool-registry.ts +0 -296
- package/src/utils/validation.ts +0 -371
- package/tests/wallet-management-integration.test.ts +0 -284
- package/tsconfig.json +0 -23
|
@@ -8,6 +8,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
8
8
|
exports.transferPrompts = exports.transferTokenPrompt = exports.transferGalaPrompt = void 0;
|
|
9
9
|
const mcpToolNames_js_1 = require("../constants/mcpToolNames.js");
|
|
10
10
|
const validation_js_1 = require("../utils/validation.js");
|
|
11
|
+
const handlerHelpers_js_1 = require("./utils/handlerHelpers.js");
|
|
12
|
+
const textTemplates_js_1 = require("./utils/textTemplates.js");
|
|
11
13
|
/**
|
|
12
14
|
* Transfer GALA - GALA token transfer
|
|
13
15
|
*/
|
|
@@ -29,22 +31,16 @@ exports.transferGalaPrompt = {
|
|
|
29
31
|
handler: (args) => {
|
|
30
32
|
(0, validation_js_1.validateAddress)(args.recipientAddress, 'recipientAddress');
|
|
31
33
|
(0, validation_js_1.validateNumericAmount)(args.amount, 'amount');
|
|
32
|
-
return
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
text: `Transfer GALA tokens.
|
|
38
|
-
|
|
39
|
-
Recipient: ${args.recipientAddress}
|
|
40
|
-
Amount: ${args.amount} GALA
|
|
41
|
-
|
|
42
|
-
Use ${mcpToolNames_js_1.MCP_TOOLS.TRANSFER_GALA} to execute the transfer.
|
|
43
|
-
|
|
44
|
-
Display the transaction details and confirmation.`,
|
|
45
|
-
},
|
|
34
|
+
return (0, handlerHelpers_js_1.createPromptResponse)((0, textTemplates_js_1.createSimpleOperationText)({
|
|
35
|
+
operation: 'Transfer GALA tokens.',
|
|
36
|
+
parameters: {
|
|
37
|
+
recipient: `Recipient: ${args.recipientAddress}`,
|
|
38
|
+
amount: `Amount: ${args.amount} GALA`,
|
|
46
39
|
},
|
|
47
|
-
|
|
40
|
+
toolName: mcpToolNames_js_1.MCP_TOOLS.TRANSFER_GALA,
|
|
41
|
+
actionDescription: 'execute the transfer',
|
|
42
|
+
displayFormat: 'Display the transaction details and confirmation.',
|
|
43
|
+
}));
|
|
48
44
|
},
|
|
49
45
|
};
|
|
50
46
|
/**
|
|
@@ -74,23 +70,17 @@ exports.transferTokenPrompt = {
|
|
|
74
70
|
(0, validation_js_1.validateAddress)(args.to, 'to');
|
|
75
71
|
(0, validation_js_1.validateTokenName)(args.tokenName, 'tokenName');
|
|
76
72
|
(0, validation_js_1.validateNumericAmount)(args.amount, 'amount');
|
|
77
|
-
return
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
Recipient: ${args.to}
|
|
85
|
-
Token: ${args.tokenName}
|
|
86
|
-
Amount: ${args.amount}
|
|
87
|
-
|
|
88
|
-
Use ${mcpToolNames_js_1.MCP_TOOLS.TRANSFER_TOKEN} to execute the transfer.
|
|
89
|
-
|
|
90
|
-
Display the transaction details and confirmation.`,
|
|
91
|
-
},
|
|
73
|
+
return (0, handlerHelpers_js_1.createPromptResponse)((0, textTemplates_js_1.createSimpleOperationText)({
|
|
74
|
+
operation: 'Transfer launchpad tokens.',
|
|
75
|
+
parameters: {
|
|
76
|
+
recipient: `Recipient: ${args.to}`,
|
|
77
|
+
token: `Token: ${args.tokenName}`,
|
|
78
|
+
amount: `Amount: ${args.amount}`,
|
|
92
79
|
},
|
|
93
|
-
|
|
80
|
+
toolName: mcpToolNames_js_1.MCP_TOOLS.TRANSFER_TOKEN,
|
|
81
|
+
actionDescription: 'execute the transfer',
|
|
82
|
+
displayFormat: 'Display the transaction details and confirmation.',
|
|
83
|
+
}));
|
|
94
84
|
},
|
|
95
85
|
};
|
|
96
86
|
exports.transferPrompts = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transfers.js","sourceRoot":"","sources":["../../src/prompts/transfers.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAGH,kEAAyD;AACzD,0DAAmG;
|
|
1
|
+
{"version":3,"file":"transfers.js","sourceRoot":"","sources":["../../src/prompts/transfers.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAGH,kEAAyD;AACzD,0DAAmG;AACnG,iEAAiE;AACjE,+DAAqE;AAErE;;GAEG;AACU,QAAA,kBAAkB,GAAc;IAC3C,IAAI,EAAE,mCAAmC;IACzC,WAAW,EAAE,wCAAwC;IACrD,SAAS,EAAE;QACT;YACE,IAAI,EAAE,kBAAkB;YACxB,WAAW,EAAE,0BAA0B;YACvC,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,4BAA4B;YACzC,QAAQ,EAAE,IAAI;SACf;KACF;IACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;QAChB,IAAA,+BAAe,EAAC,IAAI,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;QAC3D,IAAA,qCAAqB,EAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAE7C,OAAO,IAAA,wCAAoB,EACzB,IAAA,4CAAyB,EAAC;YACxB,SAAS,EAAE,uBAAuB;YAClC,UAAU,EAAE;gBACV,SAAS,EAAE,cAAc,IAAI,CAAC,gBAAgB,EAAE;gBAChD,MAAM,EAAE,WAAW,IAAI,CAAC,MAAM,OAAO;aACtC;YACD,QAAQ,EAAE,2BAAS,CAAC,aAAa;YACjC,iBAAiB,EAAE,sBAAsB;YACzC,aAAa,EAAE,mDAAmD;SACnE,CAAC,CACH,CAAC;IACJ,CAAC;CACF,CAAC;AAEF;;GAEG;AACU,QAAA,mBAAmB,GAAc;IAC5C,IAAI,EAAE,oCAAoC;IAC1C,WAAW,EAAE,6CAA6C;IAC1D,SAAS,EAAE;QACT;YACE,IAAI,EAAE,IAAI;YACV,WAAW,EAAE,0BAA0B;YACvC,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,0BAA0B;YACvC,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,0BAA0B;YACvC,QAAQ,EAAE,IAAI;SACf;KACF;IACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;QAChB,IAAA,+BAAe,EAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;QAC/B,IAAA,iCAAiB,EAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;QAC/C,IAAA,qCAAqB,EAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAE7C,OAAO,IAAA,wCAAoB,EACzB,IAAA,4CAAyB,EAAC;YACxB,SAAS,EAAE,4BAA4B;YACvC,UAAU,EAAE;gBACV,SAAS,EAAE,cAAc,IAAI,CAAC,EAAE,EAAE;gBAClC,KAAK,EAAE,UAAU,IAAI,CAAC,SAAS,EAAE;gBACjC,MAAM,EAAE,WAAW,IAAI,CAAC,MAAM,EAAE;aACjC;YACD,QAAQ,EAAE,2BAAS,CAAC,cAAc;YAClC,iBAAiB,EAAE,sBAAsB;YACzC,aAAa,EAAE,mDAAmD;SACnE,CAAC,CACH,CAAC;IACJ,CAAC;CACF,CAAC;AAEW,QAAA,eAAe,GAAgB;IAC1C,0BAAkB;IAClB,2BAAmB;CACpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utility-tools.d.ts","sourceRoot":"","sources":["../../src/prompts/utility-tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"utility-tools.d.ts","sourceRoot":"","sources":["../../src/prompts/utility-tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAKjD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAYhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAY9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,SAYtC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,SAY7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,SAsBrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAmBnC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAYhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAsB9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,SAY7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,SAY7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,SAsB7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAYlC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,SAAS,EAazC,CAAC"}
|
|
@@ -7,30 +7,20 @@
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.utilityToolPrompts = exports.getEnvironmentPrompt = exports.setWalletPrompt = exports.getWalletPrompt = exports.hasWalletPrompt = exports.clearCachePrompt = exports.getCacheInfoPrompt = exports.explainSdkUsagePrompt = exports.getUrlByTokenNamePrompt = exports.getConfigPrompt = exports.getEthereumAddressPrompt = exports.getAddressPrompt = exports.createWalletPrompt = void 0;
|
|
9
9
|
const mcpToolNames_js_1 = require("../constants/mcpToolNames.js");
|
|
10
|
+
const handlerHelpers_js_1 = require("./utils/handlerHelpers.js");
|
|
11
|
+
const textTemplates_js_1 = require("./utils/textTemplates.js");
|
|
10
12
|
/**
|
|
11
13
|
* Create Wallet - Generate new wallet
|
|
12
14
|
*/
|
|
13
15
|
exports.createWalletPrompt = {
|
|
14
16
|
name: 'galachain-launchpad:create-wallet',
|
|
15
17
|
description: 'Generate a new wallet with random private key',
|
|
16
|
-
handler: () => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
text: `Create a new wallet with random private key.
|
|
23
|
-
|
|
24
|
-
Use ${mcpToolNames_js_1.MCP_TOOLS.CREATE_WALLET} to generate:
|
|
25
|
-
- New wallet address
|
|
26
|
-
- Random private key
|
|
27
|
-
- Wallet credentials for authentication
|
|
28
|
-
|
|
29
|
-
Display the wallet details with a security warning about private key storage.`,
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
];
|
|
33
|
-
},
|
|
18
|
+
handler: () => (0, handlerHelpers_js_1.createPromptResponse)((0, textTemplates_js_1.createSimpleOperationText)({
|
|
19
|
+
operation: 'Create a new wallet with random private key.',
|
|
20
|
+
toolName: mcpToolNames_js_1.MCP_TOOLS.CREATE_WALLET,
|
|
21
|
+
actionDescription: 'generate new wallet address, random private key, and wallet credentials for authentication',
|
|
22
|
+
displayFormat: 'Display the wallet details with a security warning about private key storage.',
|
|
23
|
+
})),
|
|
34
24
|
};
|
|
35
25
|
/**
|
|
36
26
|
* Get Address - Get GalaChain address
|
|
@@ -38,21 +28,12 @@ Display the wallet details with a security warning about private key storage.`,
|
|
|
38
28
|
exports.getAddressPrompt = {
|
|
39
29
|
name: 'galachain-launchpad:get-address',
|
|
40
30
|
description: 'Get the GalaChain address format of authenticated wallet',
|
|
41
|
-
handler: () => {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
text: `Get the GalaChain format address of the authenticated wallet.
|
|
48
|
-
|
|
49
|
-
Use ${mcpToolNames_js_1.MCP_TOOLS.GET_ADDRESS} to retrieve the address in GalaChain format (eth|0x...).
|
|
50
|
-
|
|
51
|
-
Display the wallet address.`,
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
];
|
|
55
|
-
},
|
|
31
|
+
handler: () => (0, handlerHelpers_js_1.createPromptResponse)((0, textTemplates_js_1.createSimpleOperationText)({
|
|
32
|
+
operation: 'Get the GalaChain format address of the authenticated wallet.',
|
|
33
|
+
toolName: mcpToolNames_js_1.MCP_TOOLS.GET_ADDRESS,
|
|
34
|
+
actionDescription: 'retrieve the address in GalaChain format (eth|0x...)',
|
|
35
|
+
displayFormat: 'Display the wallet address.',
|
|
36
|
+
})),
|
|
56
37
|
};
|
|
57
38
|
/**
|
|
58
39
|
* Get Ethereum Address - Get Ethereum address
|
|
@@ -60,21 +41,12 @@ Display the wallet address.`,
|
|
|
60
41
|
exports.getEthereumAddressPrompt = {
|
|
61
42
|
name: 'galachain-launchpad:get-ethereum-address',
|
|
62
43
|
description: 'Get the standard Ethereum address format of authenticated wallet',
|
|
63
|
-
handler: () => {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
text: `Get the standard Ethereum format address of the authenticated wallet.
|
|
70
|
-
|
|
71
|
-
Use ${mcpToolNames_js_1.MCP_TOOLS.GET_ETHEREUM_ADDRESS} to retrieve the address in Ethereum format (0x...).
|
|
72
|
-
|
|
73
|
-
Display the wallet address.`,
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
];
|
|
77
|
-
},
|
|
44
|
+
handler: () => (0, handlerHelpers_js_1.createPromptResponse)((0, textTemplates_js_1.createSimpleOperationText)({
|
|
45
|
+
operation: 'Get the standard Ethereum format address of the authenticated wallet.',
|
|
46
|
+
toolName: mcpToolNames_js_1.MCP_TOOLS.GET_ETHEREUM_ADDRESS,
|
|
47
|
+
actionDescription: 'retrieve the address in Ethereum format (0x...)',
|
|
48
|
+
displayFormat: 'Display the wallet address.',
|
|
49
|
+
})),
|
|
78
50
|
};
|
|
79
51
|
/**
|
|
80
52
|
* Get Config - View SDK configuration
|
|
@@ -82,27 +54,12 @@ Display the wallet address.`,
|
|
|
82
54
|
exports.getConfigPrompt = {
|
|
83
55
|
name: 'galachain-launchpad:get-config',
|
|
84
56
|
description: 'View current SDK and MCP server configuration',
|
|
85
|
-
handler: () => {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
text: `Get the current SDK and MCP server configuration.
|
|
92
|
-
|
|
93
|
-
Use ${mcpToolNames_js_1.MCP_TOOLS.GET_CONFIG} to retrieve:
|
|
94
|
-
- Environment (production, development, testing)
|
|
95
|
-
- Base URLs
|
|
96
|
-
- Timeout settings
|
|
97
|
-
- Feature flags
|
|
98
|
-
- Effective slippage tolerance factors
|
|
99
|
-
- Current MCP server environment state
|
|
100
|
-
|
|
101
|
-
Display the configuration in a readable format.`,
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
];
|
|
105
|
-
},
|
|
57
|
+
handler: () => (0, handlerHelpers_js_1.createPromptResponse)((0, textTemplates_js_1.createSimpleOperationText)({
|
|
58
|
+
operation: 'Get the current SDK and MCP server configuration.',
|
|
59
|
+
toolName: mcpToolNames_js_1.MCP_TOOLS.GET_CONFIG,
|
|
60
|
+
actionDescription: 'retrieve environment, base URLs, timeout settings, feature flags, effective slippage tolerance factors, and current MCP server state',
|
|
61
|
+
displayFormat: 'Display the configuration in a readable format.',
|
|
62
|
+
})),
|
|
106
63
|
};
|
|
107
64
|
/**
|
|
108
65
|
* Get URL by Token Name - Generate launchpad URL
|
|
@@ -117,23 +74,15 @@ exports.getUrlByTokenNamePrompt = {
|
|
|
117
74
|
required: true,
|
|
118
75
|
},
|
|
119
76
|
],
|
|
120
|
-
handler: (args) => {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
Use ${mcpToolNames_js_1.MCP_TOOLS.GET_URL_BY_TOKEN_NAME} to generate the URL.
|
|
131
|
-
|
|
132
|
-
Display the complete launchpad URL for viewing/trading the token.`,
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
];
|
|
136
|
-
},
|
|
77
|
+
handler: (args) => (0, handlerHelpers_js_1.createPromptResponse)((0, textTemplates_js_1.createSimpleOperationText)({
|
|
78
|
+
operation: 'Get the launchpad frontend URL for a token.',
|
|
79
|
+
parameters: {
|
|
80
|
+
token_name: `Token: ${args.tokenName}`,
|
|
81
|
+
},
|
|
82
|
+
toolName: mcpToolNames_js_1.MCP_TOOLS.GET_URL_BY_TOKEN_NAME,
|
|
83
|
+
actionDescription: 'generate the URL',
|
|
84
|
+
displayFormat: 'Display the complete launchpad URL for viewing/trading the token.',
|
|
85
|
+
})),
|
|
137
86
|
};
|
|
138
87
|
/**
|
|
139
88
|
* Explain SDK Usage - SDK documentation helper
|
|
@@ -148,21 +97,12 @@ exports.explainSdkUsagePrompt = {
|
|
|
148
97
|
required: true,
|
|
149
98
|
},
|
|
150
99
|
],
|
|
151
|
-
handler: (args) => {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
text: `Get detailed SDK usage examples for topic: ${args.topic}
|
|
158
|
-
|
|
159
|
-
Use ${mcpToolNames_js_1.MCP_TOOLS.EXPLAIN_SDK_USAGE} to retrieve complete runnable code examples.
|
|
160
|
-
|
|
161
|
-
Display the examples with explanations for integrating the SDK directly.`,
|
|
162
|
-
},
|
|
163
|
-
},
|
|
164
|
-
];
|
|
165
|
-
},
|
|
100
|
+
handler: (args) => (0, handlerHelpers_js_1.createPromptResponse)((0, textTemplates_js_1.createSimpleOperationText)({
|
|
101
|
+
operation: `Get detailed SDK usage examples for topic: ${args.topic}.`,
|
|
102
|
+
toolName: mcpToolNames_js_1.MCP_TOOLS.EXPLAIN_SDK_USAGE,
|
|
103
|
+
actionDescription: 'retrieve complete runnable code examples',
|
|
104
|
+
displayFormat: 'Display the examples with explanations for integrating the SDK directly.',
|
|
105
|
+
})),
|
|
166
106
|
};
|
|
167
107
|
/**
|
|
168
108
|
* Get Cache Info - Cache statistics
|
|
@@ -170,24 +110,12 @@ Display the examples with explanations for integrating the SDK directly.`,
|
|
|
170
110
|
exports.getCacheInfoPrompt = {
|
|
171
111
|
name: 'galachain-launchpad:get-cache-info',
|
|
172
112
|
description: 'Get token metadata cache statistics',
|
|
173
|
-
handler: () => {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
text: `Get token metadata cache statistics.
|
|
180
|
-
|
|
181
|
-
Use ${mcpToolNames_js_1.MCP_TOOLS.GET_CACHE_INFO} to retrieve:
|
|
182
|
-
- Total tokens cached
|
|
183
|
-
- Cache size in bytes
|
|
184
|
-
- Timestamp of oldest entry
|
|
185
|
-
|
|
186
|
-
Display the cache information.`,
|
|
187
|
-
},
|
|
188
|
-
},
|
|
189
|
-
];
|
|
190
|
-
},
|
|
113
|
+
handler: () => (0, handlerHelpers_js_1.createPromptResponse)((0, textTemplates_js_1.createSimpleOperationText)({
|
|
114
|
+
operation: 'Get token metadata cache statistics.',
|
|
115
|
+
toolName: mcpToolNames_js_1.MCP_TOOLS.GET_CACHE_INFO,
|
|
116
|
+
actionDescription: 'retrieve total tokens cached, cache size in bytes, and timestamp of oldest entry',
|
|
117
|
+
displayFormat: 'Display the cache information.',
|
|
118
|
+
})),
|
|
191
119
|
};
|
|
192
120
|
/**
|
|
193
121
|
* Clear Cache - Cache management
|
|
@@ -202,23 +130,15 @@ exports.clearCachePrompt = {
|
|
|
202
130
|
required: false,
|
|
203
131
|
},
|
|
204
132
|
],
|
|
205
|
-
handler: (args) => {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
Use ${mcpToolNames_js_1.MCP_TOOLS.CLEAR_CACHE} to clear the cache.
|
|
216
|
-
|
|
217
|
-
Display confirmation of cache clearing.`,
|
|
218
|
-
},
|
|
219
|
-
},
|
|
220
|
-
];
|
|
221
|
-
},
|
|
133
|
+
handler: (args) => (0, handlerHelpers_js_1.createPromptResponse)((0, textTemplates_js_1.createSimpleOperationText)({
|
|
134
|
+
operation: 'Clear token metadata cache.',
|
|
135
|
+
parameters: {
|
|
136
|
+
token_name: args.tokenName ? `Token: ${args.tokenName}` : 'Clearing entire cache',
|
|
137
|
+
},
|
|
138
|
+
toolName: mcpToolNames_js_1.MCP_TOOLS.CLEAR_CACHE,
|
|
139
|
+
actionDescription: 'clear the cache',
|
|
140
|
+
displayFormat: 'Display confirmation of cache clearing.',
|
|
141
|
+
})),
|
|
222
142
|
};
|
|
223
143
|
/**
|
|
224
144
|
* Has Wallet - Check wallet status
|
|
@@ -226,23 +146,12 @@ Display confirmation of cache clearing.`,
|
|
|
226
146
|
exports.hasWalletPrompt = {
|
|
227
147
|
name: 'galachain-launchpad:has-wallet',
|
|
228
148
|
description: 'Check if a wallet is configured in the MCP server',
|
|
229
|
-
handler: () => {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
text: `Check wallet configuration status.
|
|
236
|
-
|
|
237
|
-
Use ${mcpToolNames_js_1.MCP_TOOLS.HAS_WALLET} to determine:
|
|
238
|
-
- Whether a wallet is configured
|
|
239
|
-
- Whether MCP server is in full-access or read-only mode
|
|
240
|
-
|
|
241
|
-
Display the wallet status clearly.`,
|
|
242
|
-
},
|
|
243
|
-
},
|
|
244
|
-
];
|
|
245
|
-
},
|
|
149
|
+
handler: () => (0, handlerHelpers_js_1.createPromptResponse)((0, textTemplates_js_1.createSimpleOperationText)({
|
|
150
|
+
operation: 'Check wallet configuration status.',
|
|
151
|
+
toolName: mcpToolNames_js_1.MCP_TOOLS.HAS_WALLET,
|
|
152
|
+
actionDescription: 'determine whether a wallet is configured and whether MCP server is in full-access or read-only mode',
|
|
153
|
+
displayFormat: 'Display the wallet status clearly.',
|
|
154
|
+
})),
|
|
246
155
|
};
|
|
247
156
|
/**
|
|
248
157
|
* Get Wallet - Get wallet instance
|
|
@@ -250,23 +159,12 @@ Display the wallet status clearly.`,
|
|
|
250
159
|
exports.getWalletPrompt = {
|
|
251
160
|
name: 'galachain-launchpad:get-wallet',
|
|
252
161
|
description: 'Get the currently configured wallet instance',
|
|
253
|
-
handler: () => {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
text: `Get the currently configured wallet instance.
|
|
260
|
-
|
|
261
|
-
Use ${mcpToolNames_js_1.MCP_TOOLS.GET_WALLET} to retrieve:
|
|
262
|
-
- Wallet object if available
|
|
263
|
-
- Null if in read-only mode
|
|
264
|
-
|
|
265
|
-
Display the wallet information.`,
|
|
266
|
-
},
|
|
267
|
-
},
|
|
268
|
-
];
|
|
269
|
-
},
|
|
162
|
+
handler: () => (0, handlerHelpers_js_1.createPromptResponse)((0, textTemplates_js_1.createSimpleOperationText)({
|
|
163
|
+
operation: 'Get the currently configured wallet instance.',
|
|
164
|
+
toolName: mcpToolNames_js_1.MCP_TOOLS.GET_WALLET,
|
|
165
|
+
actionDescription: 'retrieve wallet object if available (null if in read-only mode)',
|
|
166
|
+
displayFormat: 'Display the wallet information.',
|
|
167
|
+
})),
|
|
270
168
|
};
|
|
271
169
|
/**
|
|
272
170
|
* Set Wallet - Configure wallet
|
|
@@ -281,23 +179,15 @@ exports.setWalletPrompt = {
|
|
|
281
179
|
required: true,
|
|
282
180
|
},
|
|
283
181
|
],
|
|
284
|
-
handler: (args) => {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
Use ${mcpToolNames_js_1.MCP_TOOLS.SET_WALLET} to configure the wallet.
|
|
295
|
-
|
|
296
|
-
Display confirmation that wallet is configured for full-access mode.`,
|
|
297
|
-
},
|
|
298
|
-
},
|
|
299
|
-
];
|
|
300
|
-
},
|
|
182
|
+
handler: (args) => (0, handlerHelpers_js_1.createPromptResponse)((0, textTemplates_js_1.createSimpleOperationText)({
|
|
183
|
+
operation: 'Configure wallet for signing operations.',
|
|
184
|
+
parameters: {
|
|
185
|
+
private_key: `Private Key: ${args.privateKey.substring(0, 10)}...${args.privateKey.substring(60)}`,
|
|
186
|
+
},
|
|
187
|
+
toolName: mcpToolNames_js_1.MCP_TOOLS.SET_WALLET,
|
|
188
|
+
actionDescription: 'configure the wallet',
|
|
189
|
+
displayFormat: 'Display confirmation that wallet is configured for full-access mode.',
|
|
190
|
+
})),
|
|
301
191
|
};
|
|
302
192
|
/**
|
|
303
193
|
* Get Environment - Current environment query
|
|
@@ -305,21 +195,12 @@ Display confirmation that wallet is configured for full-access mode.`,
|
|
|
305
195
|
exports.getEnvironmentPrompt = {
|
|
306
196
|
name: 'galachain-launchpad:get-environment',
|
|
307
197
|
description: 'Get the current MCP server environment',
|
|
308
|
-
handler: () => {
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
text: `Get the current MCP server environment.
|
|
315
|
-
|
|
316
|
-
Use ${mcpToolNames_js_1.MCP_TOOLS.GET_ENVIRONMENT} to retrieve the active environment.
|
|
317
|
-
|
|
318
|
-
Display the current environment (production, development, or testing).`,
|
|
319
|
-
},
|
|
320
|
-
},
|
|
321
|
-
];
|
|
322
|
-
},
|
|
198
|
+
handler: () => (0, handlerHelpers_js_1.createPromptResponse)((0, textTemplates_js_1.createSimpleOperationText)({
|
|
199
|
+
operation: 'Get the current MCP server environment.',
|
|
200
|
+
toolName: mcpToolNames_js_1.MCP_TOOLS.GET_ENVIRONMENT,
|
|
201
|
+
actionDescription: 'retrieve the active environment',
|
|
202
|
+
displayFormat: 'Display the current environment (production, development, or testing).',
|
|
203
|
+
})),
|
|
323
204
|
};
|
|
324
205
|
exports.utilityToolPrompts = [
|
|
325
206
|
exports.createWalletPrompt,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utility-tools.js","sourceRoot":"","sources":["../../src/prompts/utility-tools.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAGH,kEAAyD;
|
|
1
|
+
{"version":3,"file":"utility-tools.js","sourceRoot":"","sources":["../../src/prompts/utility-tools.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAGH,kEAAyD;AACzD,iEAAiE;AACjE,+DAAqE;AAErE;;GAEG;AACU,QAAA,kBAAkB,GAAc;IAC3C,IAAI,EAAE,mCAAmC;IACzC,WAAW,EAAE,+CAA+C;IAC5D,OAAO,EAAE,GAAG,EAAE,CACZ,IAAA,wCAAoB,EAClB,IAAA,4CAAyB,EAAC;QACxB,SAAS,EAAE,8CAA8C;QACzD,QAAQ,EAAE,2BAAS,CAAC,aAAa;QACjC,iBAAiB,EAAE,4FAA4F;QAC/G,aAAa,EAAE,+EAA+E;KAC/F,CAAC,CACH;CACJ,CAAC;AAEF;;GAEG;AACU,QAAA,gBAAgB,GAAc;IACzC,IAAI,EAAE,iCAAiC;IACvC,WAAW,EAAE,0DAA0D;IACvE,OAAO,EAAE,GAAG,EAAE,CACZ,IAAA,wCAAoB,EAClB,IAAA,4CAAyB,EAAC;QACxB,SAAS,EAAE,+DAA+D;QAC1E,QAAQ,EAAE,2BAAS,CAAC,WAAW;QAC/B,iBAAiB,EAAE,sDAAsD;QACzE,aAAa,EAAE,6BAA6B;KAC7C,CAAC,CACH;CACJ,CAAC;AAEF;;GAEG;AACU,QAAA,wBAAwB,GAAc;IACjD,IAAI,EAAE,0CAA0C;IAChD,WAAW,EAAE,kEAAkE;IAC/E,OAAO,EAAE,GAAG,EAAE,CACZ,IAAA,wCAAoB,EAClB,IAAA,4CAAyB,EAAC;QACxB,SAAS,EAAE,uEAAuE;QAClF,QAAQ,EAAE,2BAAS,CAAC,oBAAoB;QACxC,iBAAiB,EAAE,iDAA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EAAE,2BAAS,CAAC,eAAe;QACnC,iBAAiB,EAAE,iCAAiC;QACpD,aAAa,EAAE,wEAAwE;KACxF,CAAC,CACH;CACJ,CAAC;AAEW,QAAA,kBAAkB,GAAgB;IAC7C,0BAAkB;IAClB,wBAAgB;IAChB,gCAAwB;IACxB,uBAAe;IACf,+BAAuB;IACvB,6BAAqB;IACrB,0BAAkB;IAClB,wBAAgB;IAChB,uBAAe;IACf,uBAAe;IACf,uBAAe;IACf,4BAAoB;CACrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../src/prompts/utility.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../src/prompts/utility.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjD;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAe9B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,EAAE,SAgCrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,EAAgD,CAAC"}
|
package/dist/prompts/utility.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.utilityPrompts = exports.switchEnvironmentPrompt = exports.getVersionPrompt = void 0;
|
|
9
|
+
const handlerHelpers_js_1 = require("./utils/handlerHelpers.js");
|
|
9
10
|
/**
|
|
10
11
|
* Get Version - Display SDK and MCP server version information
|
|
11
12
|
*
|
|
@@ -16,12 +17,7 @@ exports.getVersionPrompt = {
|
|
|
16
17
|
name: 'galachain-launchpad:version',
|
|
17
18
|
description: 'Get SDK and MCP server version information',
|
|
18
19
|
handler: () => {
|
|
19
|
-
return
|
|
20
|
-
{
|
|
21
|
-
role: 'user',
|
|
22
|
-
content: {
|
|
23
|
-
type: 'text',
|
|
24
|
-
text: `Get version information for the Gala Launchpad SDK and MCP server.
|
|
20
|
+
return (0, handlerHelpers_js_1.createPromptResponse)(`Get version information for the Gala Launchpad SDK and MCP server.
|
|
25
21
|
|
|
26
22
|
Use the gala_launchpad_get_version tool to fetch the version details.
|
|
27
23
|
|
|
@@ -30,10 +26,7 @@ Display the results in a clear, formatted response showing:
|
|
|
30
26
|
2. MCP Server Version
|
|
31
27
|
3. Timestamp
|
|
32
28
|
|
|
33
|
-
This is helpful for debugging version compatibility issues or confirming installed versions
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
];
|
|
29
|
+
This is helpful for debugging version compatibility issues or confirming installed versions.`);
|
|
37
30
|
},
|
|
38
31
|
};
|
|
39
32
|
/**
|
|
@@ -57,12 +50,7 @@ exports.switchEnvironmentPrompt = {
|
|
|
57
50
|
const targetEnv = args.environment?.toLowerCase() || '';
|
|
58
51
|
const validEnvs = ['production', 'development', 'testing'];
|
|
59
52
|
const isValidEnv = validEnvs.includes(targetEnv);
|
|
60
|
-
return
|
|
61
|
-
{
|
|
62
|
-
role: 'user',
|
|
63
|
-
content: {
|
|
64
|
-
type: 'text',
|
|
65
|
-
text: `Switch the Gala Launchpad MCP server to a different environment.
|
|
53
|
+
return (0, handlerHelpers_js_1.createPromptResponse)(`Switch the Gala Launchpad MCP server to a different environment.
|
|
66
54
|
|
|
67
55
|
Current task: Switch to the ${isValidEnv ? targetEnv : 'specified'} environment
|
|
68
56
|
|
|
@@ -77,10 +65,7 @@ Available environments:
|
|
|
77
65
|
- development: Development environment for testing features
|
|
78
66
|
- testing: Testing environment for local/staging tests
|
|
79
67
|
|
|
80
|
-
Wallet Preservation: The wallet configuration will be preserved during the switch, maintaining your current signing capabilities if configured
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
];
|
|
68
|
+
Wallet Preservation: The wallet configuration will be preserved during the switch, maintaining your current signing capabilities if configured.`);
|
|
84
69
|
},
|
|
85
70
|
};
|
|
86
71
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utility.js","sourceRoot":"","sources":["../../src/prompts/utility.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;
|
|
1
|
+
{"version":3,"file":"utility.js","sourceRoot":"","sources":["../../src/prompts/utility.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAGH,iEAAiE;AAEjE;;;;;GAKG;AACU,QAAA,gBAAgB,GAAc;IACzC,IAAI,EAAE,6BAA6B;IACnC,WAAW,EAAE,4CAA4C;IACzD,OAAO,EAAE,GAAG,EAAE;QACZ,OAAO,IAAA,wCAAoB,EAAC;;;;;;;;;6FAS6D,CAAC,CAAC;IAC7F,CAAC;CACF,CAAC;AAEF;;;;;;GAMG;AACU,QAAA,uBAAuB,GAAc;IAChD,IAAI,EAAE,wCAAwC;IAC9C,WAAW,EAAE,wFAAwF;IACrG,SAAS,EAAE;QACT;YACE,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,yDAAyD;YACtE,QAAQ,EAAE,KAAK;SAChB;KACF;IACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;QAChB,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;QACxD,MAAM,SAAS,GAAG,CAAC,YAAY,EAAE,aAAa,EAAE,SAAS,CAAC,CAAC;QAC3D,MAAM,UAAU,GAAG,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAEjD,OAAO,IAAA,wCAAoB,EAAC;;8BAEF,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW;;;;8FAI4B,SAAS,IAAI,YAAY;;;;;;;;;gJASyB,CAAC,CAAC;IAChJ,CAAC;CACF,CAAC;AAEF;;GAEG;AACU,QAAA,cAAc,GAAgB,CAAC,wBAAgB,EAAE,+BAAuB,CAAC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handler Helper Utilities
|
|
3
|
+
*
|
|
4
|
+
* Provides reusable utilities for creating MCP prompt handlers with
|
|
5
|
+
* standardized response formatting and validation patterns.
|
|
6
|
+
*/
|
|
7
|
+
import type { PromptMessage } from '../../types/mcp.js';
|
|
8
|
+
/**
|
|
9
|
+
* Create a standard MCP prompt response with user role
|
|
10
|
+
*
|
|
11
|
+
* @param text - The prompt text to send to the user
|
|
12
|
+
* @returns Array containing formatted MCP message
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* handler: (args) => {
|
|
16
|
+
* validateTokenName(args.tokenName);
|
|
17
|
+
* return createPromptResponse(`Fetch token ${args.tokenName}...`);
|
|
18
|
+
* }
|
|
19
|
+
*/
|
|
20
|
+
export declare function createPromptResponse(text: string): PromptMessage[];
|
|
21
|
+
/**
|
|
22
|
+
* Create a handler function that validates arguments and returns a prompt response
|
|
23
|
+
*
|
|
24
|
+
* @param validator - Function to validate the arguments
|
|
25
|
+
* @param textGenerator - Function that generates the prompt text from arguments
|
|
26
|
+
* @returns A handler function ready to use in a prompt definition
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* handler: createValidatedHandler(
|
|
30
|
+
* (args) => validateTokenName(args.tokenName),
|
|
31
|
+
* (args) => `Fetch token ${args.tokenName}...`
|
|
32
|
+
* )
|
|
33
|
+
*/
|
|
34
|
+
export declare function createValidatedHandler<T>(validator: (args: T) => void, textGenerator: (args: T) => string): (args: T) => PromptMessage[];
|
|
35
|
+
//# sourceMappingURL=handlerHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handlerHelpers.d.ts","sourceRoot":"","sources":["../../../src/prompts/utils/handlerHelpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,EAAE,CAUlE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EACtC,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,EAC5B,aAAa,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GACjC,CAAC,IAAI,EAAE,CAAC,KAAK,aAAa,EAAE,CAK9B"}
|