flowmind 1.5.2 → 1.5.4

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.
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Aliyun RDS Direct Query Adapter
3
+ * Wraps the friday-rds-redis-query MCP server for SQL and Redis reads.
4
+ */
5
+
6
+ const DatabaseQueryAdapter = require('../../adapters/database-query-adapter');
7
+
8
+ class AliyunRdsQueryAdapter extends DatabaseQueryAdapter {
9
+ constructor(config = {}) {
10
+ super('aliyun-rds-query', config);
11
+
12
+ this.registerTool('fetchSources', 'mcpFetchSource');
13
+ this.registerTool('fetchDatabases', 'mcpFetchBase');
14
+ this.registerTool('fetchTables', 'mcpFetchTables');
15
+ this.registerTool('fetchFields', 'mcpFetchFields');
16
+ this.registerTool('queryExec', 'mcpQueryExec');
17
+ this.registerTool('redisSources', 'mcpRedisSource');
18
+ this.registerTool('redisKeys', 'mcpRedisKeys');
19
+ this.registerTool('redisKeyGet', 'mcpRedisKeyGet');
20
+ this.registerTool('redisScan', 'mcpRedisScan');
21
+ }
22
+
23
+ get mcpServer() {
24
+ return 'friday-rds-redis-query';
25
+ }
26
+
27
+ async fetchSources(params) {
28
+ return this.callMcpTool('fetchSources', params || {});
29
+ }
30
+
31
+ async fetchDatabases(sourceIdOrParams) {
32
+ const params = typeof sourceIdOrParams === 'object'
33
+ ? sourceIdOrParams
34
+ : { source_id: sourceIdOrParams };
35
+ return this.callMcpTool('fetchDatabases', params || {});
36
+ }
37
+
38
+ async fetchTables(sourceIdOrParams, schema) {
39
+ const params = typeof sourceIdOrParams === 'object'
40
+ ? sourceIdOrParams
41
+ : { source_id: sourceIdOrParams, schema };
42
+ return this.callMcpTool('fetchTables', params || {});
43
+ }
44
+
45
+ async fetchFields(params) {
46
+ return this.callMcpTool('fetchFields', params || {});
47
+ }
48
+
49
+ async queryExec(params) {
50
+ return this.callMcpTool('queryExec', params || {});
51
+ }
52
+
53
+ async redisSources(params) {
54
+ return this.callMcpTool('redisSources', params || {});
55
+ }
56
+
57
+ async redisKeys(params) {
58
+ return this.callMcpTool('redisKeys', params || {});
59
+ }
60
+
61
+ async redisKeyGet(params) {
62
+ return this.callMcpTool('redisKeyGet', params || {});
63
+ }
64
+
65
+ async redisScan(params) {
66
+ return this.callMcpTool('redisScan', params || {});
67
+ }
68
+ }
69
+
70
+ module.exports = AliyunRdsQueryAdapter;
@@ -34,11 +34,7 @@ class AliyunRedisAdapter extends McpAdapter {
34
34
  * @returns {Promise<object>}
35
35
  */
36
36
  async query(query, time) {
37
- return {
38
- mcpServer: this.mcpServer,
39
- tool: this.resolveTool('query'),
40
- params: { query, time }
41
- };
37
+ return this.callMcpTool('query', { query, time });
42
38
  }
43
39
 
44
40
  /**
@@ -50,11 +46,7 @@ class AliyunRedisAdapter extends McpAdapter {
50
46
  * @returns {Promise<object>}
51
47
  */
52
48
  async queryRange(query, start, end, step) {
53
- return {
54
- mcpServer: this.mcpServer,
55
- tool: this.resolveTool('queryRange'),
56
- params: { query, start, end, step }
57
- };
49
+ return this.callMcpTool('queryRange', { query, start, end, step });
58
50
  }
59
51
 
60
52
  /**
@@ -63,11 +55,7 @@ class AliyunRedisAdapter extends McpAdapter {
63
55
  * @returns {Promise<object>}
64
56
  */
65
57
  async getLabelNames(params) {
66
- return {
67
- mcpServer: this.mcpServer,
68
- tool: this.resolveTool('getLabelNames'),
69
- params: params || {}
70
- };
58
+ return this.callMcpTool('getLabelNames', params || {});
71
59
  }
72
60
 
73
61
  /**
@@ -77,11 +65,7 @@ class AliyunRedisAdapter extends McpAdapter {
77
65
  * @returns {Promise<object>}
78
66
  */
79
67
  async getLabelValues(name, params) {
80
- return {
81
- mcpServer: this.mcpServer,
82
- tool: this.resolveTool('getLabelValues'),
83
- params: { name, ...(params || {}) }
84
- };
68
+ return this.callMcpTool('getLabelValues', { name, ...(params || {}) });
85
69
  }
86
70
  }
87
71
 
@@ -11,6 +11,7 @@ class AliyunSlsAdapter extends LogServiceAdapter {
11
11
 
12
12
  // Register MCP tool mappings
13
13
  this.registerTool('queryLogs', 'queryLogs');
14
+ this.registerTool('listProjects', 'listProject');
14
15
  this.registerTool('listProject', 'listProject');
15
16
  }
16
17
 
@@ -46,19 +47,11 @@ class AliyunSlsAdapter extends LogServiceAdapter {
46
47
  }
47
48
 
48
49
  async queryLogs(params) {
49
- return {
50
- mcpServer: this.mcpServer,
51
- tool: this.resolveTool('queryLogs'),
52
- params
53
- };
50
+ return this.callMcpTool('queryLogs', params || {});
54
51
  }
55
52
 
56
53
  async listProjects() {
57
- return {
58
- mcpServer: this.mcpServer,
59
- tool: this.resolveTool('listProject'),
60
- params: {}
61
- };
54
+ return this.callMcpTool('listProjects', {});
62
55
  }
63
56
 
64
57
  /**
@@ -26,6 +26,7 @@ class FridayFlowAdapter extends WorkflowAdapter {
26
26
  this.registerTool('logPipelineJobRun', 'flowLogPipelineJobRun');
27
27
  this.registerTool('passPipelineValidate', 'flowPassPipelineValidate');
28
28
  this.registerTool('refusePipelineValidate', 'flowRefusePipelineValidate');
29
+ this.registerTool('listDeployChecklists', 'listDeployChecklists');
29
30
 
30
31
  // Order/task tools
31
32
  this.registerTool('orderList', 'orderList');
@@ -42,51 +43,39 @@ class FridayFlowAdapter extends WorkflowAdapter {
42
43
  }
43
44
 
44
45
  async listPipelineGroups(params) {
45
- return {
46
- mcpServer: this.mcpServer,
47
- tool: this.resolveTool('listPipelineGroups'),
48
- params: params || { perPage: '20', page: '1' }
49
- };
46
+ return this.callMcpTool('listPipelineGroups', params || { perPage: '20', page: '1' });
50
47
  }
51
48
 
52
49
  async listPipelines(params) {
53
- return {
54
- mcpServer: this.mcpServer,
55
- tool: this.resolveTool('listPipelines'),
56
- params: params || {}
57
- };
50
+ return this.callMcpTool('listPipelines', params || {});
51
+ }
52
+
53
+ async getCurrentIterate() {
54
+ return this.callMcpTool('getCurrentIterate', {});
55
+ }
56
+
57
+ async listDeployChecklists(params) {
58
+ return this.callMcpTool('listDeployChecklists', params || {});
59
+ }
60
+
61
+ async orderList(params) {
62
+ return this.callMcpTool('orderList', params || {});
58
63
  }
59
64
 
60
65
  async startPipelineRun(pipelineId) {
61
- return {
62
- mcpServer: this.mcpServer,
63
- tool: this.resolveTool('startPipelineRun'),
64
- params: { pipelineId }
65
- };
66
+ return this.callMcpTool('startPipelineRun', { pipelineId });
66
67
  }
67
68
 
68
69
  async startBatchPipelineRun(params) {
69
- return {
70
- mcpServer: this.mcpServer,
71
- tool: this.resolveTool('startBatchPipelineRun'),
72
- params: params || {}
73
- };
70
+ return this.callMcpTool('startBatchPipelineRun', params || {});
74
71
  }
75
72
 
76
73
  async getPipelineRun(pipelineId, runId) {
77
- return {
78
- mcpServer: this.mcpServer,
79
- tool: this.resolveTool('getPipelineRun'),
80
- params: { pipelineId, pipelineRunId: runId }
81
- };
74
+ return this.callMcpTool('getPipelineRun', { pipelineId, pipelineRunId: runId });
82
75
  }
83
76
 
84
77
  async listPipelineRuns(pipelineId, params) {
85
- return {
86
- mcpServer: this.mcpServer,
87
- tool: this.resolveTool('listPipelineRuns'),
88
- params: { pipelineId, ...(params || {}) }
89
- };
78
+ return this.callMcpTool('listPipelineRuns', { pipelineId, ...(params || {}) });
90
79
  }
91
80
  }
92
81
 
@@ -40,43 +40,23 @@ class FridayReportAdapter extends ReportAdapter {
40
40
  }
41
41
 
42
42
  async listBuilds(params) {
43
- return {
44
- mcpServer: this.mcpServer,
45
- tool: this.resolveTool('listBuilds'),
46
- params: params || {}
47
- };
43
+ return this.callMcpTool('listBuilds', params || {});
48
44
  }
49
45
 
50
46
  async getBuildInfo(buildId) {
51
- return {
52
- mcpServer: this.mcpServer,
53
- tool: this.resolveTool('getBuildInfo'),
54
- params: { id: buildId }
55
- };
47
+ return this.callMcpTool('getBuildInfo', { id: buildId });
56
48
  }
57
49
 
58
50
  async listJacocoReports(params) {
59
- return {
60
- mcpServer: this.mcpServer,
61
- tool: this.resolveTool('listJacoco'),
62
- params: params || {}
63
- };
51
+ return this.callMcpTool('listJacoco', params || {});
64
52
  }
65
53
 
66
54
  async listUnitReports(params) {
67
- return {
68
- mcpServer: this.mcpServer,
69
- tool: this.resolveTool('listJacocoUnit'),
70
- params: params || {}
71
- };
55
+ return this.callMcpTool('listJacocoUnit', params || {});
72
56
  }
73
57
 
74
58
  async getJobDetails(jobName) {
75
- return {
76
- mcpServer: this.mcpServer,
77
- tool: this.resolveTool('getJobDetails'),
78
- params: { jobName }
79
- };
59
+ return this.callMcpTool('getJobDetails', { jobName });
80
60
  }
81
61
  }
82
62
 
@@ -28,51 +28,27 @@ class YapiAdapter extends ApiDocAdapter {
28
28
  }
29
29
 
30
30
  async searchApis(params) {
31
- return {
32
- mcpServer: this.mcpServer,
33
- tool: this.resolveTool('searchApis'),
34
- params
35
- };
31
+ return this.callMcpTool('searchApis', params);
36
32
  }
37
33
 
38
34
  async getCategories(projectId) {
39
- return {
40
- mcpServer: this.mcpServer,
41
- tool: this.resolveTool('getCategories'),
42
- params: { projectId }
43
- };
35
+ return this.callMcpTool('getCategories', { projectId });
44
36
  }
45
37
 
46
38
  async saveApi(apiData) {
47
- return {
48
- mcpServer: this.mcpServer,
49
- tool: this.resolveTool('saveApi'),
50
- params: apiData
51
- };
39
+ return this.callMcpTool('saveApi', apiData);
52
40
  }
53
41
 
54
42
  async importSwagger(projectId, catId, swaggerData) {
55
- return {
56
- mcpServer: this.mcpServer,
57
- tool: this.resolveTool('importSwagger'),
58
- params: { projectId, catId, swaggerData }
59
- };
43
+ return this.callMcpTool('importSwagger', { projectId, catId, swaggerData });
60
44
  }
61
45
 
62
46
  async exportProject(projectId, type = 'swagger') {
63
- return {
64
- mcpServer: this.mcpServer,
65
- tool: this.resolveTool('exportProject'),
66
- params: { projectId, type }
67
- };
47
+ return this.callMcpTool('exportProject', { projectId, type });
68
48
  }
69
49
 
70
50
  async listProjects() {
71
- return {
72
- mcpServer: this.mcpServer,
73
- tool: this.resolveTool('listProjects'),
74
- params: {}
75
- };
51
+ return this.callMcpTool('listProjects', {});
76
52
  }
77
53
  }
78
54
 
@@ -27,51 +27,27 @@ class YuqueAdapter extends KnowledgeBaseAdapter {
27
27
  }
28
28
 
29
29
  async getRepos(params) {
30
- return {
31
- mcpServer: this.mcpServer,
32
- tool: this.resolveTool('getRepos'),
33
- params
34
- };
30
+ return this.callMcpTool('getRepos', params);
35
31
  }
36
32
 
37
33
  async getDocs(namespace, params = {}) {
38
- return {
39
- mcpServer: this.mcpServer,
40
- tool: this.resolveTool('getDocs'),
41
- params: { namespace, ...params }
42
- };
34
+ return this.callMcpTool('getDocs', { namespace, ...params });
43
35
  }
44
36
 
45
37
  async getDoc(namespace, slug) {
46
- return {
47
- mcpServer: this.mcpServer,
48
- tool: this.resolveTool('getDoc'),
49
- params: { namespace, slug }
50
- };
38
+ return this.callMcpTool('getDoc', { namespace, slug });
51
39
  }
52
40
 
53
41
  async createDoc(namespace, docData) {
54
- return {
55
- mcpServer: this.mcpServer,
56
- tool: this.resolveTool('createDoc'),
57
- params: { namespace, ...docData }
58
- };
42
+ return this.callMcpTool('createDoc', { namespace, ...docData });
59
43
  }
60
44
 
61
45
  async updateDoc(namespace, slug, docData) {
62
- return {
63
- mcpServer: this.mcpServer,
64
- tool: this.resolveTool('updateDoc'),
65
- params: { namespace, slug, ...docData }
66
- };
46
+ return this.callMcpTool('updateDoc', { namespace, slug, ...docData });
67
47
  }
68
48
 
69
49
  async search(query, type = 'doc') {
70
- return {
71
- mcpServer: this.mcpServer,
72
- tool: this.resolveTool('search'),
73
- params: { q: query, type }
74
- };
50
+ return this.callMcpTool('search', { q: query, type });
75
51
  }
76
52
 
77
53
  /**
@@ -79,11 +55,7 @@ class YuqueAdapter extends KnowledgeBaseAdapter {
79
55
  * @returns {Promise<object>}
80
56
  */
81
57
  async getCurrentUser() {
82
- return {
83
- mcpServer: this.mcpServer,
84
- tool: this.resolveTool('getCurrentUser'),
85
- params: {}
86
- };
58
+ return this.callMcpTool('getCurrentUser', {});
87
59
  }
88
60
  }
89
61