@gala-chain/launchpad-mcp-server 1.7.10 → 1.7.11

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.
Files changed (65) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/generated/version.d.ts +7 -0
  3. package/dist/generated/version.d.ts.map +1 -0
  4. package/dist/generated/version.js +10 -0
  5. package/dist/generated/version.js.map +1 -0
  6. package/dist/tools/utils/getVersion.d.ts +8 -0
  7. package/dist/tools/utils/getVersion.d.ts.map +1 -0
  8. package/dist/tools/utils/getVersion.js +26 -0
  9. package/dist/tools/utils/getVersion.js.map +1 -0
  10. package/dist/tools/utils/index.d.ts.map +1 -1
  11. package/dist/tools/utils/index.js +2 -0
  12. package/dist/tools/utils/index.js.map +1 -1
  13. package/package.json +4 -3
  14. package/scripts/inject-version.ts +31 -0
  15. package/docs/AI-AGENT-PATTERNS.md +0 -555
  16. package/docs/CONSTRAINTS-REFERENCE.md +0 -454
  17. package/docs/PROMPT-TOOL-MAPPING.md +0 -352
  18. package/docs/examples/default-values-pattern.md +0 -240
  19. package/docs/examples/tool-factory-pattern.md +0 -217
  20. package/jest.config.js +0 -94
  21. package/src/__tests__/integration/poolTools.integration.test.ts +0 -185
  22. package/src/constants/mcpToolNames.ts +0 -141
  23. package/src/index.ts +0 -19
  24. package/src/prompts/__tests__/promptStructure.test.ts +0 -114
  25. package/src/prompts/__tests__/registry.test.ts +0 -143
  26. package/src/prompts/analysis.ts +0 -429
  27. package/src/prompts/index.ts +0 -123
  28. package/src/prompts/portfolio.ts +0 -242
  29. package/src/prompts/trading.ts +0 -191
  30. package/src/prompts/utils/workflowTemplates.ts +0 -344
  31. package/src/schemas/common-schemas.ts +0 -392
  32. package/src/scripts/test-all-prompts.ts +0 -184
  33. package/src/server.ts +0 -241
  34. package/src/tools/balance/index.ts +0 -174
  35. package/src/tools/creation/index.ts +0 -182
  36. package/src/tools/index.ts +0 -80
  37. package/src/tools/pools/fetchAllPools.ts +0 -47
  38. package/src/tools/pools/fetchPoolDetails.ts +0 -27
  39. package/src/tools/pools/fetchPoolDetailsForCalculation.ts +0 -22
  40. package/src/tools/pools/fetchPools.ts +0 -47
  41. package/src/tools/pools/index.ts +0 -240
  42. package/src/tools/social/index.ts +0 -64
  43. package/src/tools/trading/index.ts +0 -605
  44. package/src/tools/transfers/index.ts +0 -75
  45. package/src/tools/utils/clearCache.ts +0 -36
  46. package/src/tools/utils/createWallet.ts +0 -19
  47. package/src/tools/utils/explainSdkUsage.ts +0 -853
  48. package/src/tools/utils/getAddress.ts +0 -12
  49. package/src/tools/utils/getCacheInfo.ts +0 -14
  50. package/src/tools/utils/getConfig.ts +0 -11
  51. package/src/tools/utils/getEthereumAddress.ts +0 -12
  52. package/src/tools/utils/getUrlByTokenName.ts +0 -12
  53. package/src/tools/utils/index.ts +0 -25
  54. package/src/tools/utils/isTokenGraduated.ts +0 -16
  55. package/src/types/mcp.ts +0 -72
  56. package/src/utils/__tests__/validation.test.ts +0 -147
  57. package/src/utils/constraints.ts +0 -146
  58. package/src/utils/default-values.ts +0 -208
  59. package/src/utils/error-handler.ts +0 -69
  60. package/src/utils/error-templates.ts +0 -273
  61. package/src/utils/response-formatter.ts +0 -51
  62. package/src/utils/tool-factory.ts +0 -257
  63. package/src/utils/tool-registry.ts +0 -296
  64. package/src/utils/validation.ts +0 -336
  65. package/tsconfig.json +0 -23
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.7.11
4
+
5
+ ### Patch Changes
6
+
7
+ - Add dynamic version tools and fix CommonJS uuid bundling conflict
8
+
9
+ **SDK Changes:**
10
+ - Added `getVersion()` method to LaunchpadSDK class that returns the SDK version dynamically read
11
+ from package.json
12
+ - Created `src/constants/version.ts` with SDK_VERSION constant that reads from package.json at
13
+ module load
14
+ - Version is read using require() with proper error handling for different environments
15
+ - **Fixed CommonJS build**: Updated `rollup.config.mjs` to bundle uuid only in CommonJS format
16
+ - Conditional externals: uuid excluded from CJS externals but included in ESM/UMD externals
17
+ - Resolves "ERR_REQUIRE_ESM" error when requiring uuid v13.0.0 (ESM-only package) in CommonJS
18
+ environments
19
+ - UMD/ESM bundles remain optimized with uuid external (~34KB)
20
+ - CJS bundle includes uuid (~44KB) for complete self-contained CommonJS compatibility
21
+
22
+ **MCP Server Changes:**
23
+ - Created version injection script (`scripts/inject-version.ts`) that runs as a prebuild step
24
+ - Added `build:version` npm script that injects MCP server version into `src/generated/version.ts`
25
+ - Updated `.gitignore` to exclude auto-generated version file
26
+ - Created `getVersionTool` MCP tool that returns both SDK and MCP server versions with timestamp
27
+
28
+ Both versions are now dynamically read from their respective package.json files, ensuring they
29
+ always stay in sync without manual version management in code. The CommonJS bundle now
30
+ self-contains uuid to resolve ESM-only module conflicts in Node.js require() scenarios.
31
+
32
+ - Updated dependencies
33
+ - @gala-chain/launchpad-sdk@3.12.2
34
+
3
35
  ## 1.7.10
4
36
 
5
37
  ### Patch Changes
@@ -0,0 +1,7 @@
1
+ /**
2
+ * AUTO-GENERATED VERSION FILE
3
+ * This file is generated by scripts/inject-version.ts during build
4
+ * DO NOT EDIT MANUALLY
5
+ */
6
+ export declare const MCP_SERVER_VERSION = "1.7.11";
7
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/generated/version.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,kBAAkB,WAAW,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * AUTO-GENERATED VERSION FILE
4
+ * This file is generated by scripts/inject-version.ts during build
5
+ * DO NOT EDIT MANUALLY
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.MCP_SERVER_VERSION = void 0;
9
+ exports.MCP_SERVER_VERSION = '1.7.11';
10
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/generated/version.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEU,QAAA,kBAAkB,GAAG,QAAQ,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Get Version Tool
3
+ *
4
+ * Returns version information for both the SDK and MCP server.
5
+ * Both versions are dynamically read from their respective package.json files.
6
+ */
7
+ export declare const getVersionTool: import("../../types/mcp.js").MCPTool;
8
+ //# sourceMappingURL=getVersion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getVersion.d.ts","sourceRoot":"","sources":["../../../src/tools/utils/getVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,eAAO,MAAM,cAAc,sCAczB,CAAC"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ /**
3
+ * Get Version Tool
4
+ *
5
+ * Returns version information for both the SDK and MCP server.
6
+ * Both versions are dynamically read from their respective package.json files.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.getVersionTool = void 0;
10
+ const tool_factory_js_1 = require("../../utils/tool-factory.js");
11
+ const version_js_1 = require("../../generated/version.js");
12
+ exports.getVersionTool = (0, tool_factory_js_1.createNoParamTool)({
13
+ name: 'gala_launchpad_get_version',
14
+ description: 'Get SDK and MCP server version information. Returns both versions which are dynamically read from package.json files.',
15
+ handler: async (sdk) => {
16
+ const sdkVersion = sdk.getVersion();
17
+ const mcpVersion = version_js_1.MCP_SERVER_VERSION;
18
+ const timestamp = new Date().toISOString();
19
+ return {
20
+ sdk: sdkVersion,
21
+ mcpServer: mcpVersion,
22
+ timestamp,
23
+ };
24
+ },
25
+ });
26
+ //# sourceMappingURL=getVersion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getVersion.js","sourceRoot":"","sources":["../../../src/tools/utils/getVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,iEAAgE;AAChE,2DAAgE;AAEnD,QAAA,cAAc,GAAG,IAAA,mCAAiB,EAAC;IAC9C,IAAI,EAAE,4BAA4B;IAClC,WAAW,EAAE,uHAAuH;IACpI,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;QACrB,MAAM,UAAU,GAAG,GAAG,CAAC,UAAU,EAAE,CAAC;QACpC,MAAM,UAAU,GAAG,+BAAkB,CAAC;QACtC,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAE3C,OAAO;YACL,GAAG,EAAE,UAAU;YACf,SAAS,EAAE,UAAU;YACrB,SAAS;SACV,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAYH,eAAO,MAAM,YAAY,wCAUxB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAaH,eAAO,MAAM,YAAY,wCAWxB,CAAC"}
@@ -13,6 +13,7 @@ const explainSdkUsage_js_1 = require("./explainSdkUsage.js");
13
13
  const isTokenGraduated_js_1 = require("./isTokenGraduated.js");
14
14
  const getCacheInfo_js_1 = require("./getCacheInfo.js");
15
15
  const clearCache_js_1 = require("./clearCache.js");
16
+ const getVersion_js_1 = require("./getVersion.js");
16
17
  exports.utilityTools = [
17
18
  createWallet_js_1.createWalletTool,
18
19
  getAddress_js_1.getAddressTool,
@@ -23,5 +24,6 @@ exports.utilityTools = [
23
24
  isTokenGraduated_js_1.isTokenGraduatedTool,
24
25
  getCacheInfo_js_1.getCacheInfoTool,
25
26
  clearCache_js_1.clearCacheTool,
27
+ getVersion_js_1.getVersionTool,
26
28
  ];
27
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/utils/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,uDAAqD;AACrD,mDAAiD;AACjD,mEAAiE;AACjE,iDAA+C;AAC/C,iEAA+D;AAC/D,6DAA2D;AAC3D,+DAA6D;AAC7D,uDAAqD;AACrD,mDAAiD;AAEpC,QAAA,YAAY,GAAG;IAC1B,kCAAgB;IAChB,8BAAc;IACd,8CAAsB;IACtB,4BAAa;IACb,4CAAqB;IACrB,wCAAmB;IACnB,0CAAoB;IACpB,kCAAgB;IAChB,8BAAc;CACf,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/utils/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,uDAAqD;AACrD,mDAAiD;AACjD,mEAAiE;AACjE,iDAA+C;AAC/C,iEAA+D;AAC/D,6DAA2D;AAC3D,+DAA6D;AAC7D,uDAAqD;AACrD,mDAAiD;AACjD,mDAAiD;AAEpC,QAAA,YAAY,GAAG;IAC1B,kCAAgB;IAChB,8BAAc;IACd,8CAAsB;IACtB,4BAAa;IACb,4CAAqB;IACrB,wCAAmB;IACnB,0CAAoB;IACpB,kCAAgB;IAChB,8BAAc;IACd,8BAAc;CACf,CAAC"}
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@gala-chain/launchpad-mcp-server",
3
- "version": "1.7.10",
3
+ "version": "1.7.11",
4
4
  "description": "MCP server for Gala Launchpad SDK with 50 tools + 14 slash commands - Production-grade AI agent integration with comprehensive validation, optimized performance, and 80%+ test coverage",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
7
7
  "gala-launchpad-mcp": "./dist/index.js"
8
8
  },
9
9
  "scripts": {
10
- "build": "tsc && chmod +x dist/index.js",
10
+ "build": "npm run build:version && tsc && chmod +x dist/index.js",
11
+ "build:version": "tsx scripts/inject-version.ts",
11
12
  "dev": "tsx src/index.ts",
12
13
  "watch": "tsc --watch",
13
14
  "test": "jest --passWithNoTests",
@@ -62,7 +63,7 @@
62
63
  "dependencies": {
63
64
  "@gala-chain/api": "^2.4.3",
64
65
  "@gala-chain/connect": "^2.4.3",
65
- "@gala-chain/launchpad-sdk": "^3.12.1",
66
+ "@gala-chain/launchpad-sdk": "^3.12.2",
66
67
  "@modelcontextprotocol/sdk": "^0.5.0",
67
68
  "axios": "^1.12.2",
68
69
  "bignumber.js": "^9.1.2",
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Version Injection Script
3
+ *
4
+ * Reads the MCP server version from package.json and generates a version constant file.
5
+ * This runs as a prebuild step to ensure version is always in sync.
6
+ */
7
+
8
+ import { readFileSync, writeFileSync, mkdirSync } from 'fs';
9
+ import { dirname, join } from 'path';
10
+
11
+ // Get package version from package.json
12
+ const packageJsonPath = join(dirname(__filename), '../package.json');
13
+ const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
14
+ const mcpVersion = packageJson.version;
15
+
16
+ // Create the generated constants file
17
+ const generatedDir = join(dirname(__filename), '../src/generated');
18
+ mkdirSync(generatedDir, { recursive: true });
19
+
20
+ const versionFile = join(generatedDir, 'version.ts');
21
+ const versionContent = `/**
22
+ * AUTO-GENERATED VERSION FILE
23
+ * This file is generated by scripts/inject-version.ts during build
24
+ * DO NOT EDIT MANUALLY
25
+ */
26
+
27
+ export const MCP_SERVER_VERSION = '${mcpVersion}';
28
+ `;
29
+
30
+ writeFileSync(versionFile, versionContent, 'utf-8');
31
+ console.log(`✓ Injected MCP version ${mcpVersion} to ${versionFile}`);