@cerema/cadriciel-mcp 0.1.0
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/Dockerfile +26 -0
- package/README.md +98 -0
- package/dist/client.d.ts +31 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +77 -0
- package/dist/client.js.map +1 -0
- package/dist/http-server.d.ts +13 -0
- package/dist/http-server.d.ts.map +1 -0
- package/dist/http-server.js +184 -0
- package/dist/http-server.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +64 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/database.d.ts +70 -0
- package/dist/tools/database.d.ts.map +1 -0
- package/dist/tools/database.js +77 -0
- package/dist/tools/database.js.map +1 -0
- package/dist/tools/deploy.d.ts +73 -0
- package/dist/tools/deploy.d.ts.map +1 -0
- package/dist/tools/deploy.js +103 -0
- package/dist/tools/deploy.js.map +1 -0
- package/dist/tools/handlers.d.ts +13 -0
- package/dist/tools/handlers.d.ts.map +1 -0
- package/dist/tools/handlers.js +225 -0
- package/dist/tools/handlers.js.map +1 -0
- package/dist/tools/index.d.ts +11 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +298 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/projects.d.ts +45 -0
- package/dist/tools/projects.d.ts.map +1 -0
- package/dist/tools/projects.js +71 -0
- package/dist/tools/projects.js.map +1 -0
- package/dist/tools/workflows.d.ts +66 -0
- package/dist/tools/workflows.d.ts.map +1 -0
- package/dist/tools/workflows.js +90 -0
- package/dist/tools/workflows.js.map +1 -0
- package/k8s/deployment.yaml +48 -0
- package/k8s/ingress.yaml +27 -0
- package/k8s/kustomization.yaml +14 -0
- package/k8s/service.yaml +15 -0
- package/package.json +36 -0
- package/src/client.ts +97 -0
- package/src/http-server.ts +213 -0
- package/src/index.ts +75 -0
- package/src/tools/database.ts +105 -0
- package/src/tools/deploy.ts +127 -0
- package/src/tools/handlers.ts +241 -0
- package/src/tools/index.ts +275 -0
- package/src/tools/projects.ts +89 -0
- package/src/tools/workflows.ts +117 -0
- package/tsconfig.json +19 -0
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Tool Registry
|
|
4
|
+
*
|
|
5
|
+
* Registers all available MCP tools with their schemas and handlers.
|
|
6
|
+
*/
|
|
7
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
+
if (k2 === undefined) k2 = k;
|
|
9
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
+
}
|
|
13
|
+
Object.defineProperty(o, k2, desc);
|
|
14
|
+
}) : (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
o[k2] = m[k];
|
|
17
|
+
}));
|
|
18
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
19
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
20
|
+
}) : function(o, v) {
|
|
21
|
+
o["default"] = v;
|
|
22
|
+
});
|
|
23
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
24
|
+
var ownKeys = function(o) {
|
|
25
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
26
|
+
var ar = [];
|
|
27
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
28
|
+
return ar;
|
|
29
|
+
};
|
|
30
|
+
return ownKeys(o);
|
|
31
|
+
};
|
|
32
|
+
return function (mod) {
|
|
33
|
+
if (mod && mod.__esModule) return mod;
|
|
34
|
+
var result = {};
|
|
35
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
36
|
+
__setModuleDefault(result, mod);
|
|
37
|
+
return result;
|
|
38
|
+
};
|
|
39
|
+
})();
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.registerTools = registerTools;
|
|
42
|
+
const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
|
|
43
|
+
const projects = __importStar(require("./projects"));
|
|
44
|
+
/**
|
|
45
|
+
* Tool definitions for MCP
|
|
46
|
+
*/
|
|
47
|
+
const TOOLS = [
|
|
48
|
+
// ============================================================
|
|
49
|
+
// IMPLEMENTED
|
|
50
|
+
// ============================================================
|
|
51
|
+
{
|
|
52
|
+
name: 'list_projects',
|
|
53
|
+
description: 'List all Cadriciel projects accessible by the authenticated user',
|
|
54
|
+
inputSchema: {
|
|
55
|
+
type: 'object',
|
|
56
|
+
properties: {},
|
|
57
|
+
required: [],
|
|
58
|
+
},
|
|
59
|
+
handler: projects.listProjects,
|
|
60
|
+
},
|
|
61
|
+
// ============================================================
|
|
62
|
+
// TODO: Implement handlers for these tools
|
|
63
|
+
// ============================================================
|
|
64
|
+
{
|
|
65
|
+
name: 'get_project',
|
|
66
|
+
description: 'Get detailed information about a specific project',
|
|
67
|
+
inputSchema: {
|
|
68
|
+
type: 'object',
|
|
69
|
+
properties: {
|
|
70
|
+
projectId: {
|
|
71
|
+
type: 'number',
|
|
72
|
+
description: 'The project ID',
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
required: ['projectId'],
|
|
76
|
+
},
|
|
77
|
+
handler: async (args) => {
|
|
78
|
+
// TODO: Implement
|
|
79
|
+
throw new Error('Not implemented yet - see tools/projects.ts');
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'list_workflows',
|
|
84
|
+
description: 'List all workflows in a workspace',
|
|
85
|
+
inputSchema: {
|
|
86
|
+
type: 'object',
|
|
87
|
+
properties: {
|
|
88
|
+
workspaceId: {
|
|
89
|
+
type: 'number',
|
|
90
|
+
description: 'The workspace/project ID',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
required: ['workspaceId'],
|
|
94
|
+
},
|
|
95
|
+
handler: async (args) => {
|
|
96
|
+
// TODO: Implement
|
|
97
|
+
throw new Error('Not implemented yet - see tools/workflows.ts');
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: 'execute_workflow',
|
|
102
|
+
description: 'Execute a workflow with optional input parameters',
|
|
103
|
+
inputSchema: {
|
|
104
|
+
type: 'object',
|
|
105
|
+
properties: {
|
|
106
|
+
workspaceId: {
|
|
107
|
+
type: 'number',
|
|
108
|
+
description: 'The workspace/project ID',
|
|
109
|
+
},
|
|
110
|
+
workflowId: {
|
|
111
|
+
type: 'string',
|
|
112
|
+
description: 'The workflow ID to execute',
|
|
113
|
+
},
|
|
114
|
+
input: {
|
|
115
|
+
type: 'object',
|
|
116
|
+
description: 'Input parameters for the workflow',
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
required: ['workspaceId', 'workflowId'],
|
|
120
|
+
},
|
|
121
|
+
handler: async (args) => {
|
|
122
|
+
// TODO: Implement
|
|
123
|
+
throw new Error('Not implemented yet - see tools/workflows.ts');
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: 'get_execution',
|
|
128
|
+
description: 'Get the status and results of a workflow execution',
|
|
129
|
+
inputSchema: {
|
|
130
|
+
type: 'object',
|
|
131
|
+
properties: {
|
|
132
|
+
workspaceId: {
|
|
133
|
+
type: 'number',
|
|
134
|
+
description: 'The workspace/project ID',
|
|
135
|
+
},
|
|
136
|
+
executionId: {
|
|
137
|
+
type: 'string',
|
|
138
|
+
description: 'The execution ID',
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
required: ['workspaceId', 'executionId'],
|
|
142
|
+
},
|
|
143
|
+
handler: async (args) => {
|
|
144
|
+
// TODO: Implement
|
|
145
|
+
throw new Error('Not implemented yet - see tools/workflows.ts');
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
name: 'get_schema',
|
|
150
|
+
description: 'Get the database schema (tables, columns, relationships)',
|
|
151
|
+
inputSchema: {
|
|
152
|
+
type: 'object',
|
|
153
|
+
properties: {
|
|
154
|
+
workspaceId: {
|
|
155
|
+
type: 'number',
|
|
156
|
+
description: 'The workspace/project ID',
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
required: ['workspaceId'],
|
|
160
|
+
},
|
|
161
|
+
handler: async (args) => {
|
|
162
|
+
// TODO: Implement
|
|
163
|
+
throw new Error('Not implemented yet - see tools/database.ts');
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
name: 'query_database',
|
|
168
|
+
description: 'Execute a read-only SQL query (SELECT only)',
|
|
169
|
+
inputSchema: {
|
|
170
|
+
type: 'object',
|
|
171
|
+
properties: {
|
|
172
|
+
workspaceId: {
|
|
173
|
+
type: 'number',
|
|
174
|
+
description: 'The workspace/project ID',
|
|
175
|
+
},
|
|
176
|
+
query: {
|
|
177
|
+
type: 'string',
|
|
178
|
+
description: 'SQL SELECT query to execute',
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
required: ['workspaceId', 'query'],
|
|
182
|
+
},
|
|
183
|
+
handler: async (args) => {
|
|
184
|
+
// TODO: Implement
|
|
185
|
+
throw new Error('Not implemented yet - see tools/database.ts');
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
name: 'get_deployment_status',
|
|
190
|
+
description: 'Get the current deployment status of a project',
|
|
191
|
+
inputSchema: {
|
|
192
|
+
type: 'object',
|
|
193
|
+
properties: {
|
|
194
|
+
workspaceId: {
|
|
195
|
+
type: 'number',
|
|
196
|
+
description: 'The workspace/project ID',
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
required: ['workspaceId'],
|
|
200
|
+
},
|
|
201
|
+
handler: async (args) => {
|
|
202
|
+
// TODO: Implement
|
|
203
|
+
throw new Error('Not implemented yet - see tools/deploy.ts');
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
name: 'get_env_vars',
|
|
208
|
+
description: 'Get environment variables for a project (values hidden)',
|
|
209
|
+
inputSchema: {
|
|
210
|
+
type: 'object',
|
|
211
|
+
properties: {
|
|
212
|
+
workspaceId: {
|
|
213
|
+
type: 'number',
|
|
214
|
+
description: 'The workspace/project ID',
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
required: ['workspaceId'],
|
|
218
|
+
},
|
|
219
|
+
handler: async (args) => {
|
|
220
|
+
// TODO: Implement
|
|
221
|
+
throw new Error('Not implemented yet - see tools/deploy.ts');
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
name: 'service_control',
|
|
226
|
+
description: 'Control services (start, stop, restart)',
|
|
227
|
+
inputSchema: {
|
|
228
|
+
type: 'object',
|
|
229
|
+
properties: {
|
|
230
|
+
workspaceId: {
|
|
231
|
+
type: 'number',
|
|
232
|
+
description: 'The workspace/project ID',
|
|
233
|
+
},
|
|
234
|
+
action: {
|
|
235
|
+
type: 'string',
|
|
236
|
+
enum: ['start', 'stop', 'restart'],
|
|
237
|
+
description: 'Action to perform',
|
|
238
|
+
},
|
|
239
|
+
service: {
|
|
240
|
+
type: 'string',
|
|
241
|
+
description: 'Optional specific service name',
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
required: ['workspaceId', 'action'],
|
|
245
|
+
},
|
|
246
|
+
handler: async (args) => {
|
|
247
|
+
// TODO: Implement
|
|
248
|
+
throw new Error('Not implemented yet - see tools/deploy.ts');
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
];
|
|
252
|
+
/**
|
|
253
|
+
* Register all tools with the MCP server
|
|
254
|
+
*/
|
|
255
|
+
function registerTools(server) {
|
|
256
|
+
// List available tools
|
|
257
|
+
server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => {
|
|
258
|
+
return {
|
|
259
|
+
tools: TOOLS.map(({ name, description, inputSchema }) => ({
|
|
260
|
+
name,
|
|
261
|
+
description,
|
|
262
|
+
inputSchema,
|
|
263
|
+
})),
|
|
264
|
+
};
|
|
265
|
+
});
|
|
266
|
+
// Handle tool calls
|
|
267
|
+
server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
268
|
+
const { name, arguments: args } = request.params;
|
|
269
|
+
const tool = TOOLS.find((t) => t.name === name);
|
|
270
|
+
if (!tool) {
|
|
271
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
272
|
+
}
|
|
273
|
+
try {
|
|
274
|
+
const result = await tool.handler(args);
|
|
275
|
+
return {
|
|
276
|
+
content: [
|
|
277
|
+
{
|
|
278
|
+
type: 'text',
|
|
279
|
+
text: JSON.stringify(result, null, 2),
|
|
280
|
+
},
|
|
281
|
+
],
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
catch (error) {
|
|
285
|
+
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
286
|
+
return {
|
|
287
|
+
content: [
|
|
288
|
+
{
|
|
289
|
+
type: 'text',
|
|
290
|
+
text: `Error: ${message}`,
|
|
291
|
+
},
|
|
292
|
+
],
|
|
293
|
+
isError: true,
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkOH,sCA4CC;AA3QD,iEAG4C;AAE5C,qDAAuC;AAKvC;;GAEG;AACH,MAAM,KAAK,GAAG;IACZ,+DAA+D;IAC/D,cAAc;IACd,+DAA+D;IAC/D;QACE,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,kEAAkE;QAC/E,W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AC,CAAC;YAC/C,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;qBACtC;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;YACzE,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,UAAU,OAAO,EAAE;qBAC1B;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project Tools
|
|
3
|
+
*
|
|
4
|
+
* Tools for managing Cadriciel projects.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* List all projects accessible by the authenticated user
|
|
8
|
+
*/
|
|
9
|
+
export declare function listProjects(): Promise<{
|
|
10
|
+
projects: Array<{
|
|
11
|
+
id: number;
|
|
12
|
+
name: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
path: string;
|
|
15
|
+
created_at: string;
|
|
16
|
+
updated_at: string;
|
|
17
|
+
}>;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* TODO: Get detailed information about a specific project
|
|
21
|
+
*
|
|
22
|
+
* @param projectId - The project ID
|
|
23
|
+
* @returns Project details including config, members, environments
|
|
24
|
+
*/
|
|
25
|
+
export declare function getProject(projectId: number): Promise<any>;
|
|
26
|
+
/**
|
|
27
|
+
* TODO: Create a new project
|
|
28
|
+
*
|
|
29
|
+
* @param options - Project creation options
|
|
30
|
+
* @returns Created project details
|
|
31
|
+
*/
|
|
32
|
+
export declare function createProject(options: {
|
|
33
|
+
title: string;
|
|
34
|
+
description?: string;
|
|
35
|
+
template?: string;
|
|
36
|
+
mode?: 'fullstack' | 'frontend' | 'backend';
|
|
37
|
+
backendType?: 'node' | 'python' | 'springboot';
|
|
38
|
+
}): Promise<any>;
|
|
39
|
+
/**
|
|
40
|
+
* TODO: Delete a project
|
|
41
|
+
*
|
|
42
|
+
* @param projectId - The project ID to delete
|
|
43
|
+
*/
|
|
44
|
+
export declare function deleteProject(projectId: number): Promise<void>;
|
|
45
|
+
//# sourceMappingURL=projects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/tools/projects.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH;;GAEG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC;IAC5C,QAAQ,EAAE,KAAK,CAAC;QACd,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC,CAAC;CACJ,CAAC,CAmBD;AAMD;;;;;GAKG;AACH,wBAAsB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAIhE;AAED;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,WAAW,GAAG,UAAU,GAAG,SAAS,CAAC;IAC5C,WAAW,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,YAAY,CAAC;CAChD,GAAG,OAAO,CAAC,GAAG,CAAC,CAIf;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIpE"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Project Tools
|
|
4
|
+
*
|
|
5
|
+
* Tools for managing Cadriciel projects.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.listProjects = listProjects;
|
|
9
|
+
exports.getProject = getProject;
|
|
10
|
+
exports.createProject = createProject;
|
|
11
|
+
exports.deleteProject = deleteProject;
|
|
12
|
+
const client_1 = require("../client");
|
|
13
|
+
// ============================================================
|
|
14
|
+
// IMPLEMENTED
|
|
15
|
+
// ============================================================
|
|
16
|
+
/**
|
|
17
|
+
* List all projects accessible by the authenticated user
|
|
18
|
+
*/
|
|
19
|
+
async function listProjects() {
|
|
20
|
+
const client = (0, client_1.getClient)();
|
|
21
|
+
const response = await client.get('/api/studio/projects');
|
|
22
|
+
if (!response.success) {
|
|
23
|
+
throw new Error(`Failed to list projects: ${response.error}`);
|
|
24
|
+
}
|
|
25
|
+
// Map the response to a cleaner format
|
|
26
|
+
const projects = (response.data || []).map((p) => ({
|
|
27
|
+
id: p.id,
|
|
28
|
+
name: p.name || p.title,
|
|
29
|
+
description: p.description,
|
|
30
|
+
path: p.path || p.path_with_namespace,
|
|
31
|
+
created_at: p.created_at,
|
|
32
|
+
updated_at: p.updated_at || p.last_activity_at,
|
|
33
|
+
}));
|
|
34
|
+
return { projects };
|
|
35
|
+
}
|
|
36
|
+
// ============================================================
|
|
37
|
+
// TODO: Implement these tools
|
|
38
|
+
// ============================================================
|
|
39
|
+
/**
|
|
40
|
+
* TODO: Get detailed information about a specific project
|
|
41
|
+
*
|
|
42
|
+
* @param projectId - The project ID
|
|
43
|
+
* @returns Project details including config, members, environments
|
|
44
|
+
*/
|
|
45
|
+
async function getProject(projectId) {
|
|
46
|
+
// TODO: Implement
|
|
47
|
+
// Endpoint: GET /api/studio/workspace/:projectId
|
|
48
|
+
throw new Error('Not implemented yet');
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* TODO: Create a new project
|
|
52
|
+
*
|
|
53
|
+
* @param options - Project creation options
|
|
54
|
+
* @returns Created project details
|
|
55
|
+
*/
|
|
56
|
+
async function createProject(options) {
|
|
57
|
+
// TODO: Implement
|
|
58
|
+
// Endpoint: POST /api/studio/projects
|
|
59
|
+
throw new Error('Not implemented yet');
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* TODO: Delete a project
|
|
63
|
+
*
|
|
64
|
+
* @param projectId - The project ID to delete
|
|
65
|
+
*/
|
|
66
|
+
async function deleteProject(projectId) {
|
|
67
|
+
// TODO: Implement
|
|
68
|
+
// Endpoint: DELETE /api/studio/projects/:projectId
|
|
69
|
+
throw new Error('Not implemented yet');
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=projects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../src/tools/projects.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAWH,oCA4BC;AAYD,gCAIC;AAQD,sCAUC;AAOD,sCAIC;AAlFD,sCAAsC;AAEtC,+DAA+D;AAC/D,cAAc;AACd,+DAA+D;AAE/D;;GAEG;AACI,KAAK,UAAU,YAAY;IAUhC,MAAM,MAAM,GAAG,IAAA,kBAAS,GAAE,CAAC;IAC3B,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;IAE1D,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,4BAA4B,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;IAChE,CAAC;IAED,uCAAuC;IACvC,MAAM,QAAQ,GAAG,CAAC,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC;QACtD,EAAE,EAAE,CAAC,CAAC,EAAE;QACR,IAAI,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK;QACvB,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,IAAI,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,mBAAmB;QACrC,UAAU,EAAE,CAAC,CAAC,UAAU;QACxB,UAAU,EAAE,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,gBAAgB;KAC/C,CAAC,CAAC,CAAC;IAEJ,OAAO,EAAE,QAAQ,EAAE,CAAC;AACtB,CAAC;AAED,+DAA+D;AAC/D,8BAA8B;AAC9B,+DAA+D;AAE/D;;;;;GAKG;AACI,KAAK,UAAU,UAAU,CAAC,SAAiB;IAChD,kBAAkB;IAClB,iDAAiD;IACjD,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;AACzC,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,aAAa,CAAC,OAMnC;IACC,kBAAkB;IAClB,sCAAsC;IACtC,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;AACzC,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,aAAa,CAAC,SAAiB;IACnD,kBAAkB;IAClB,mDAAmD;IACnD,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;AACzC,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Tools
|
|
3
|
+
*
|
|
4
|
+
* Tools for managing and executing Cadriciel workflows (airjobs).
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* TODO: List all workflows in a workspace
|
|
8
|
+
*
|
|
9
|
+
* @param workspaceId - The workspace/project ID
|
|
10
|
+
* @returns List of workflows with their stages and status
|
|
11
|
+
*/
|
|
12
|
+
export declare function listWorkflows(workspaceId: number): Promise<any>;
|
|
13
|
+
/**
|
|
14
|
+
* TODO: Get detailed information about a workflow
|
|
15
|
+
*
|
|
16
|
+
* @param workspaceId - The workspace/project ID
|
|
17
|
+
* @param workflowId - The workflow ID
|
|
18
|
+
* @returns Workflow definition including stages, edges, variables
|
|
19
|
+
*/
|
|
20
|
+
export declare function getWorkflow(workspaceId: number, workflowId: string): Promise<any>;
|
|
21
|
+
/**
|
|
22
|
+
* TODO: Execute a workflow
|
|
23
|
+
*
|
|
24
|
+
* @param workspaceId - The workspace/project ID
|
|
25
|
+
* @param workflowId - The workflow ID to execute
|
|
26
|
+
* @param input - Input parameters for the workflow
|
|
27
|
+
* @returns Execution ID and initial status
|
|
28
|
+
*/
|
|
29
|
+
export declare function executeWorkflow(workspaceId: number, workflowId: string, input?: Record<string, any>): Promise<{
|
|
30
|
+
executionId: string;
|
|
31
|
+
status: string;
|
|
32
|
+
}>;
|
|
33
|
+
/**
|
|
34
|
+
* TODO: Get execution status and results
|
|
35
|
+
*
|
|
36
|
+
* @param workspaceId - The workspace/project ID
|
|
37
|
+
* @param executionId - The execution ID
|
|
38
|
+
* @returns Execution status, progress, logs, and output
|
|
39
|
+
*/
|
|
40
|
+
export declare function getExecution(workspaceId: number, executionId: string): Promise<{
|
|
41
|
+
id: string;
|
|
42
|
+
status: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled';
|
|
43
|
+
progress: number;
|
|
44
|
+
currentStage: number;
|
|
45
|
+
startedAt: string;
|
|
46
|
+
completedAt?: string;
|
|
47
|
+
error?: string;
|
|
48
|
+
output?: Record<string, any>;
|
|
49
|
+
}>;
|
|
50
|
+
/**
|
|
51
|
+
* TODO: List recent executions
|
|
52
|
+
*
|
|
53
|
+
* @param workspaceId - The workspace/project ID
|
|
54
|
+
* @param workflowId - Optional filter by workflow
|
|
55
|
+
* @param limit - Number of executions to return
|
|
56
|
+
* @returns List of recent executions
|
|
57
|
+
*/
|
|
58
|
+
export declare function listExecutions(workspaceId: number, workflowId?: string, limit?: number): Promise<any>;
|
|
59
|
+
/**
|
|
60
|
+
* TODO: Cancel a running execution
|
|
61
|
+
*
|
|
62
|
+
* @param workspaceId - The workspace/project ID
|
|
63
|
+
* @param executionId - The execution ID to cancel
|
|
64
|
+
*/
|
|
65
|
+
export declare function cancelExecution(workspaceId: number, executionId: string): Promise<void>;
|
|
66
|
+
//# sourceMappingURL=workflows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/tools/workflows.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAIrE;AAED;;;;;;GAMG;AACH,wBAAsB,WAAW,CAC/B,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,GAAG,CAAC,CAId;AAED;;;;;;;GAOG;AACH,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC1B,OAAO,CAAC;IACT,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC,CAKD;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAChC,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC;IACT,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;IACrE,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC9B,CAAC,CAID;AAED;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAClC,WAAW,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,MAAM,EACnB,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,GAAG,CAAC,CAId;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAIf"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Workflow Tools
|
|
4
|
+
*
|
|
5
|
+
* Tools for managing and executing Cadriciel workflows (airjobs).
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.listWorkflows = listWorkflows;
|
|
9
|
+
exports.getWorkflow = getWorkflow;
|
|
10
|
+
exports.executeWorkflow = executeWorkflow;
|
|
11
|
+
exports.getExecution = getExecution;
|
|
12
|
+
exports.listExecutions = listExecutions;
|
|
13
|
+
exports.cancelExecution = cancelExecution;
|
|
14
|
+
// ============================================================
|
|
15
|
+
// TODO: Implement these tools
|
|
16
|
+
// ============================================================
|
|
17
|
+
/**
|
|
18
|
+
* TODO: List all workflows in a workspace
|
|
19
|
+
*
|
|
20
|
+
* @param workspaceId - The workspace/project ID
|
|
21
|
+
* @returns List of workflows with their stages and status
|
|
22
|
+
*/
|
|
23
|
+
async function listWorkflows(workspaceId) {
|
|
24
|
+
// TODO: Implement
|
|
25
|
+
// Endpoint: GET /api/studio/workspace/:workspaceId/airjobs/workflows
|
|
26
|
+
throw new Error('Not implemented yet');
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* TODO: Get detailed information about a workflow
|
|
30
|
+
*
|
|
31
|
+
* @param workspaceId - The workspace/project ID
|
|
32
|
+
* @param workflowId - The workflow ID
|
|
33
|
+
* @returns Workflow definition including stages, edges, variables
|
|
34
|
+
*/
|
|
35
|
+
async function getWorkflow(workspaceId, workflowId) {
|
|
36
|
+
// TODO: Implement
|
|
37
|
+
// Endpoint: GET /api/studio/workspace/:workspaceId/airjobs/workflows?id=:workflowId
|
|
38
|
+
throw new Error('Not implemented yet');
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* TODO: Execute a workflow
|
|
42
|
+
*
|
|
43
|
+
* @param workspaceId - The workspace/project ID
|
|
44
|
+
* @param workflowId - The workflow ID to execute
|
|
45
|
+
* @param input - Input parameters for the workflow
|
|
46
|
+
* @returns Execution ID and initial status
|
|
47
|
+
*/
|
|
48
|
+
async function executeWorkflow(workspaceId, workflowId, input) {
|
|
49
|
+
// TODO: Implement
|
|
50
|
+
// Endpoint: POST /api/studio/workspace/:workspaceId/airjobs/execute
|
|
51
|
+
// Body: { workflowId, input }
|
|
52
|
+
throw new Error('Not implemented yet');
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* TODO: Get execution status and results
|
|
56
|
+
*
|
|
57
|
+
* @param workspaceId - The workspace/project ID
|
|
58
|
+
* @param executionId - The execution ID
|
|
59
|
+
* @returns Execution status, progress, logs, and output
|
|
60
|
+
*/
|
|
61
|
+
async function getExecution(workspaceId, executionId) {
|
|
62
|
+
// TODO: Implement
|
|
63
|
+
// Endpoint: GET /api/studio/workspace/:workspaceId/airjobs/executions?id=:executionId
|
|
64
|
+
throw new Error('Not implemented yet');
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* TODO: List recent executions
|
|
68
|
+
*
|
|
69
|
+
* @param workspaceId - The workspace/project ID
|
|
70
|
+
* @param workflowId - Optional filter by workflow
|
|
71
|
+
* @param limit - Number of executions to return
|
|
72
|
+
* @returns List of recent executions
|
|
73
|
+
*/
|
|
74
|
+
async function listExecutions(workspaceId, workflowId, limit) {
|
|
75
|
+
// TODO: Implement
|
|
76
|
+
// Endpoint: GET /api/studio/workspace/:workspaceId/airjobs/executions
|
|
77
|
+
throw new Error('Not implemented yet');
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* TODO: Cancel a running execution
|
|
81
|
+
*
|
|
82
|
+
* @param workspaceId - The workspace/project ID
|
|
83
|
+
* @param executionId - The execution ID to cancel
|
|
84
|
+
*/
|
|
85
|
+
async function cancelExecution(workspaceId, executionId) {
|
|
86
|
+
// TODO: Implement
|
|
87
|
+
// Endpoint: POST /api/studio/workspace/:workspaceId/airjobs/executions/:executionId/cancel
|
|
88
|
+
throw new Error('Not implemented yet');
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=workflows.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflows.js","sourceRoot":"","sources":["../../src/tools/workflows.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAYH,sCAIC;AASD,kCAOC;AAUD,0CAYC;AASD,oCAgBC;AAUD,wCAQC;AAQD,0CAOC;AA9GD,+DAA+D;AAC/D,8BAA8B;AAC9B,+DAA+D;AAE/D;;;;;GAKG;AACI,KAAK,UAAU,aAAa,CAAC,WAAmB;IACrD,kBAAkB;IAClB,qEAAqE;IACrE,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;AACzC,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,WAAW,CAC/B,WAAmB,EACnB,UAAkB;IAElB,kBAAkB;IAClB,oFAAoF;IACpF,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;AACzC,CAAC;AAED;;;;;;;GAOG;AACI,KAAK,UAAU,eAAe,CACnC,WAAmB,EACnB,UAAkB,EAClB,KAA2B;IAK3B,kBAAkB;IAClB,oEAAoE;IACpE,8BAA8B;IAC9B,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;AACzC,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,YAAY,CAChC,WAAmB,EACnB,WAAmB;IAWnB,kBAAkB;IAClB,sFAAsF;IACtF,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;AACzC,CAAC;AAED;;;;;;;GAOG;AACI,KAAK,UAAU,cAAc,CAClC,WAAmB,EACnB,UAAmB,EACnB,KAAc;IAEd,kBAAkB;IAClB,sEAAsE;IACtE,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;AACzC,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,eAAe,CACnC,WAAmB,EACnB,WAAmB;IAEnB,kBAAkB;IAClB,2FAA2F;IAC3F,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;AACzC,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
apiVersion: apps/v1
|
|
2
|
+
kind: Deployment
|
|
3
|
+
metadata:
|
|
4
|
+
name: cadriciel-mcp
|
|
5
|
+
labels:
|
|
6
|
+
app: cadriciel-mcp
|
|
7
|
+
spec:
|
|
8
|
+
replicas: 5
|
|
9
|
+
selector:
|
|
10
|
+
matchLabels:
|
|
11
|
+
app: cadriciel-mcp
|
|
12
|
+
template:
|
|
13
|
+
metadata:
|
|
14
|
+
labels:
|
|
15
|
+
app: cadriciel-mcp
|
|
16
|
+
spec:
|
|
17
|
+
containers:
|
|
18
|
+
- name: mcp
|
|
19
|
+
image: registry.cerema.dev/cadriciel/mcp:latest
|
|
20
|
+
ports:
|
|
21
|
+
- containerPort: 3000
|
|
22
|
+
name: http
|
|
23
|
+
env:
|
|
24
|
+
- name: NODE_ENV
|
|
25
|
+
value: "production"
|
|
26
|
+
- name: PORT
|
|
27
|
+
value: "3000"
|
|
28
|
+
- name: CADRICIEL_API_URL
|
|
29
|
+
value: "https://api.cerema.dev"
|
|
30
|
+
resources:
|
|
31
|
+
requests:
|
|
32
|
+
memory: "128Mi"
|
|
33
|
+
cpu: "100m"
|
|
34
|
+
limits:
|
|
35
|
+
memory: "256Mi"
|
|
36
|
+
cpu: "500m"
|
|
37
|
+
livenessProbe:
|
|
38
|
+
httpGet:
|
|
39
|
+
path: /health
|
|
40
|
+
port: 3000
|
|
41
|
+
initialDelaySeconds: 5
|
|
42
|
+
periodSeconds: 10
|
|
43
|
+
readinessProbe:
|
|
44
|
+
httpGet:
|
|
45
|
+
path: /health
|
|
46
|
+
port: 3000
|
|
47
|
+
initialDelaySeconds: 5
|
|
48
|
+
periodSeconds: 5
|
package/k8s/ingress.yaml
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
apiVersion: networking.k8s.io/v1
|
|
2
|
+
kind: Ingress
|
|
3
|
+
metadata:
|
|
4
|
+
name: cadriciel-mcp
|
|
5
|
+
annotations:
|
|
6
|
+
kubernetes.io/ingress.class: nginx
|
|
7
|
+
cert-manager.io/cluster-issuer: letsencrypt-prod
|
|
8
|
+
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
|
|
9
|
+
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
|
|
10
|
+
# SSE support
|
|
11
|
+
nginx.ingress.kubernetes.io/proxy-buffering: "off"
|
|
12
|
+
spec:
|
|
13
|
+
tls:
|
|
14
|
+
- hosts:
|
|
15
|
+
- mcp.cerema.dev
|
|
16
|
+
secretName: mcp-cerema-dev-tls
|
|
17
|
+
rules:
|
|
18
|
+
- host: mcp.cerema.dev
|
|
19
|
+
http:
|
|
20
|
+
paths:
|
|
21
|
+
- path: /
|
|
22
|
+
pathType: Prefix
|
|
23
|
+
backend:
|
|
24
|
+
service:
|
|
25
|
+
name: cadriciel-mcp
|
|
26
|
+
port:
|
|
27
|
+
number: 80
|