@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,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Tools
|
|
3
|
+
*
|
|
4
|
+
* Tools for managing and executing Cadriciel workflows (airjobs).
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// ============================================================
|
|
8
|
+
// TODO: Implement these tools
|
|
9
|
+
// ============================================================
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* TODO: List all workflows in a workspace
|
|
13
|
+
*
|
|
14
|
+
* @param workspaceId - The workspace/project ID
|
|
15
|
+
* @returns List of workflows with their stages and status
|
|
16
|
+
*/
|
|
17
|
+
export async function listWorkflows(workspaceId: number): Promise<any> {
|
|
18
|
+
// TODO: Implement
|
|
19
|
+
// Endpoint: GET /api/studio/workspace/:workspaceId/airjobs/workflows
|
|
20
|
+
throw new Error('Not implemented yet');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* TODO: Get detailed information about a workflow
|
|
25
|
+
*
|
|
26
|
+
* @param workspaceId - The workspace/project ID
|
|
27
|
+
* @param workflowId - The workflow ID
|
|
28
|
+
* @returns Workflow definition including stages, edges, variables
|
|
29
|
+
*/
|
|
30
|
+
export async function getWorkflow(
|
|
31
|
+
workspaceId: number,
|
|
32
|
+
workflowId: string
|
|
33
|
+
): Promise<any> {
|
|
34
|
+
// TODO: Implement
|
|
35
|
+
// Endpoint: GET /api/studio/workspace/:workspaceId/airjobs/workflows?id=:workflowId
|
|
36
|
+
throw new Error('Not implemented yet');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* TODO: Execute a workflow
|
|
41
|
+
*
|
|
42
|
+
* @param workspaceId - The workspace/project ID
|
|
43
|
+
* @param workflowId - The workflow ID to execute
|
|
44
|
+
* @param input - Input parameters for the workflow
|
|
45
|
+
* @returns Execution ID and initial status
|
|
46
|
+
*/
|
|
47
|
+
export async function executeWorkflow(
|
|
48
|
+
workspaceId: number,
|
|
49
|
+
workflowId: string,
|
|
50
|
+
input?: Record<string, any>
|
|
51
|
+
): Promise<{
|
|
52
|
+
executionId: string;
|
|
53
|
+
status: string;
|
|
54
|
+
}> {
|
|
55
|
+
// TODO: Implement
|
|
56
|
+
// Endpoint: POST /api/studio/workspace/:workspaceId/airjobs/execute
|
|
57
|
+
// Body: { workflowId, input }
|
|
58
|
+
throw new Error('Not implemented yet');
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* TODO: Get execution status and results
|
|
63
|
+
*
|
|
64
|
+
* @param workspaceId - The workspace/project ID
|
|
65
|
+
* @param executionId - The execution ID
|
|
66
|
+
* @returns Execution status, progress, logs, and output
|
|
67
|
+
*/
|
|
68
|
+
export async function getExecution(
|
|
69
|
+
workspaceId: number,
|
|
70
|
+
executionId: string
|
|
71
|
+
): Promise<{
|
|
72
|
+
id: string;
|
|
73
|
+
status: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled';
|
|
74
|
+
progress: number;
|
|
75
|
+
currentStage: number;
|
|
76
|
+
startedAt: string;
|
|
77
|
+
completedAt?: string;
|
|
78
|
+
error?: string;
|
|
79
|
+
output?: Record<string, any>;
|
|
80
|
+
}> {
|
|
81
|
+
// TODO: Implement
|
|
82
|
+
// Endpoint: GET /api/studio/workspace/:workspaceId/airjobs/executions?id=:executionId
|
|
83
|
+
throw new Error('Not implemented yet');
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* TODO: List recent executions
|
|
88
|
+
*
|
|
89
|
+
* @param workspaceId - The workspace/project ID
|
|
90
|
+
* @param workflowId - Optional filter by workflow
|
|
91
|
+
* @param limit - Number of executions to return
|
|
92
|
+
* @returns List of recent executions
|
|
93
|
+
*/
|
|
94
|
+
export async function listExecutions(
|
|
95
|
+
workspaceId: number,
|
|
96
|
+
workflowId?: string,
|
|
97
|
+
limit?: number
|
|
98
|
+
): Promise<any> {
|
|
99
|
+
// TODO: Implement
|
|
100
|
+
// Endpoint: GET /api/studio/workspace/:workspaceId/airjobs/executions
|
|
101
|
+
throw new Error('Not implemented yet');
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* TODO: Cancel a running execution
|
|
106
|
+
*
|
|
107
|
+
* @param workspaceId - The workspace/project ID
|
|
108
|
+
* @param executionId - The execution ID to cancel
|
|
109
|
+
*/
|
|
110
|
+
export async function cancelExecution(
|
|
111
|
+
workspaceId: number,
|
|
112
|
+
executionId: string
|
|
113
|
+
): Promise<void> {
|
|
114
|
+
// TODO: Implement
|
|
115
|
+
// Endpoint: POST /api/studio/workspace/:workspaceId/airjobs/executions/:executionId/cancel
|
|
116
|
+
throw new Error('Not implemented yet');
|
|
117
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"lib": ["ES2022"],
|
|
6
|
+
"outDir": "./dist",
|
|
7
|
+
"rootDir": "./src",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"declaration": true,
|
|
14
|
+
"declarationMap": true,
|
|
15
|
+
"sourceMap": true
|
|
16
|
+
},
|
|
17
|
+
"include": ["src/**/*"],
|
|
18
|
+
"exclude": ["node_modules", "dist"]
|
|
19
|
+
}
|