@vfarcic/dot-ai 0.5.1 → 0.7.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/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/{src/cli.ts → dist/cli.js} +19 -26
- package/dist/core/claude.d.ts +42 -0
- package/dist/core/claude.d.ts.map +1 -0
- package/dist/core/claude.js +229 -0
- package/dist/core/deploy-operation.d.ts +38 -0
- package/dist/core/deploy-operation.d.ts.map +1 -0
- package/dist/core/deploy-operation.js +101 -0
- package/dist/core/discovery.d.ts +162 -0
- package/dist/core/discovery.d.ts.map +1 -0
- package/dist/core/discovery.js +758 -0
- package/dist/core/error-handling.d.ts +167 -0
- package/dist/core/error-handling.d.ts.map +1 -0
- package/dist/core/error-handling.js +399 -0
- package/dist/core/index.d.ts +42 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +123 -0
- package/dist/core/kubernetes-utils.d.ts +38 -0
- package/dist/core/kubernetes-utils.d.ts.map +1 -0
- package/dist/core/kubernetes-utils.js +177 -0
- package/dist/core/memory.d.ts +45 -0
- package/dist/core/memory.d.ts.map +1 -0
- package/dist/core/memory.js +113 -0
- package/dist/core/schema.d.ts +187 -0
- package/dist/core/schema.d.ts.map +1 -0
- package/dist/core/schema.js +655 -0
- package/dist/core/session-utils.d.ts +29 -0
- package/dist/core/session-utils.d.ts.map +1 -0
- package/dist/core/session-utils.js +121 -0
- package/dist/core/workflow.d.ts +70 -0
- package/dist/core/workflow.d.ts.map +1 -0
- package/dist/core/workflow.js +161 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +32 -0
- package/dist/interfaces/cli.d.ts +74 -0
- package/dist/interfaces/cli.d.ts.map +1 -0
- package/dist/interfaces/cli.js +769 -0
- package/dist/interfaces/mcp.d.ts +30 -0
- package/dist/interfaces/mcp.d.ts.map +1 -0
- package/dist/interfaces/mcp.js +105 -0
- package/dist/mcp/server.d.ts +9 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +151 -0
- package/dist/tools/answer-question.d.ts +27 -0
- package/dist/tools/answer-question.d.ts.map +1 -0
- package/dist/tools/answer-question.js +696 -0
- package/dist/tools/choose-solution.d.ts +23 -0
- package/dist/tools/choose-solution.d.ts.map +1 -0
- package/dist/tools/choose-solution.js +171 -0
- package/dist/tools/deploy-manifests.d.ts +25 -0
- package/dist/tools/deploy-manifests.d.ts.map +1 -0
- package/dist/tools/deploy-manifests.js +74 -0
- package/dist/tools/generate-manifests.d.ts +23 -0
- package/dist/tools/generate-manifests.d.ts.map +1 -0
- package/dist/tools/generate-manifests.js +424 -0
- package/dist/tools/index.d.ts +11 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +34 -0
- package/dist/tools/recommend.d.ts +23 -0
- package/dist/tools/recommend.d.ts.map +1 -0
- package/dist/tools/recommend.js +332 -0
- package/package.json +124 -2
- package/.claude/commands/context-load.md +0 -11
- package/.claude/commands/context-save.md +0 -16
- package/.claude/commands/prd-done.md +0 -115
- package/.claude/commands/prd-get.md +0 -25
- package/.claude/commands/prd-start.md +0 -87
- package/.claude/commands/task-done.md +0 -77
- package/.claude/commands/tests-reminder.md +0 -32
- package/.claude/settings.local.json +0 -20
- package/.eslintrc.json +0 -25
- package/.github/workflows/ci.yml +0 -170
- package/.prettierrc.json +0 -10
- package/.teller.yml +0 -8
- package/CLAUDE.md +0 -162
- package/assets/images/logo.png +0 -0
- package/bin/dot-ai.ts +0 -47
- package/bin.js +0 -19
- package/destroy.sh +0 -45
- package/devbox.json +0 -13
- package/devbox.lock +0 -225
- package/docs/API.md +0 -449
- package/docs/CONTEXT.md +0 -49
- package/docs/DEVELOPMENT.md +0 -203
- package/docs/NEXT_STEPS.md +0 -97
- package/docs/STAGE_BASED_API.md +0 -97
- package/docs/cli-guide.md +0 -798
- package/docs/design.md +0 -750
- package/docs/discovery-engine.md +0 -515
- package/docs/error-handling.md +0 -429
- package/docs/function-registration.md +0 -157
- package/docs/mcp-guide.md +0 -416
- package/renovate.json +0 -51
- package/setup.sh +0 -111
- package/src/core/claude.ts +0 -280
- package/src/core/deploy-operation.ts +0 -127
- package/src/core/discovery.ts +0 -900
- package/src/core/error-handling.ts +0 -562
- package/src/core/index.ts +0 -143
- package/src/core/kubernetes-utils.ts +0 -218
- package/src/core/memory.ts +0 -148
- package/src/core/schema.ts +0 -830
- package/src/core/session-utils.ts +0 -97
- package/src/core/workflow.ts +0 -234
- package/src/index.ts +0 -18
- package/src/interfaces/cli.ts +0 -872
- package/src/interfaces/mcp.ts +0 -183
- package/src/mcp/server.ts +0 -131
- package/src/tools/answer-question.ts +0 -807
- package/src/tools/choose-solution.ts +0 -169
- package/src/tools/deploy-manifests.ts +0 -94
- package/src/tools/generate-manifests.ts +0 -502
- package/src/tools/index.ts +0 -41
- package/src/tools/recommend.ts +0 -370
- package/tests/__mocks__/@kubernetes/client-node.ts +0 -106
- package/tests/build-system.test.ts +0 -345
- package/tests/configuration.test.ts +0 -226
- package/tests/core/deploy-operation.test.ts +0 -38
- package/tests/core/discovery.test.ts +0 -1648
- package/tests/core/error-handling.test.ts +0 -632
- package/tests/core/schema.test.ts +0 -1658
- package/tests/core/session-utils.test.ts +0 -245
- package/tests/core.test.ts +0 -439
- package/tests/fixtures/configmap-no-labels.yaml +0 -8
- package/tests/fixtures/crossplane-app-configuration.yaml +0 -6
- package/tests/fixtures/crossplane-providers.yaml +0 -45
- package/tests/fixtures/crossplane-rbac.yaml +0 -48
- package/tests/fixtures/invalid-configmap.yaml +0 -8
- package/tests/fixtures/invalid-deployment.yaml +0 -17
- package/tests/fixtures/test-deployment.yaml +0 -28
- package/tests/fixtures/valid-configmap.yaml +0 -15
- package/tests/infrastructure.test.ts +0 -426
- package/tests/interfaces/cli.test.ts +0 -1036
- package/tests/interfaces/mcp.test.ts +0 -139
- package/tests/kubernetes-utils.test.ts +0 -200
- package/tests/mcp/server.test.ts +0 -126
- package/tests/setup.ts +0 -31
- package/tests/tools/answer-question.test.ts +0 -367
- package/tests/tools/choose-solution.test.ts +0 -481
- package/tests/tools/deploy-manifests.test.ts +0 -185
- package/tests/tools/generate-manifests.test.ts +0 -441
- package/tests/tools/index.test.ts +0 -111
- package/tests/tools/recommend.test.ts +0 -180
- package/tsconfig.json +0 -34
package/src/interfaces/mcp.ts
DELETED
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Model Context Protocol (MCP) Interface for DevOps AI Toolkit
|
|
3
|
-
*
|
|
4
|
-
* Provides MCP server capabilities that expose DevOps AI Toolkit functionality
|
|
5
|
-
* to AI assistants like Claude through standardized protocol
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
9
|
-
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
10
|
-
import { DotAI } from '../core/index';
|
|
11
|
-
import {
|
|
12
|
-
ConsoleLogger,
|
|
13
|
-
Logger
|
|
14
|
-
} from '../core/error-handling';
|
|
15
|
-
import {
|
|
16
|
-
RECOMMEND_TOOL_NAME,
|
|
17
|
-
RECOMMEND_TOOL_DESCRIPTION,
|
|
18
|
-
RECOMMEND_TOOL_INPUT_SCHEMA,
|
|
19
|
-
handleRecommendTool
|
|
20
|
-
} from '../tools/recommend';
|
|
21
|
-
import {
|
|
22
|
-
CHOOSESOLUTION_TOOL_NAME,
|
|
23
|
-
CHOOSESOLUTION_TOOL_DESCRIPTION,
|
|
24
|
-
CHOOSESOLUTION_TOOL_INPUT_SCHEMA,
|
|
25
|
-
handleChooseSolutionTool
|
|
26
|
-
} from '../tools/choose-solution';
|
|
27
|
-
import {
|
|
28
|
-
ANSWERQUESTION_TOOL_NAME,
|
|
29
|
-
ANSWERQUESTION_TOOL_DESCRIPTION,
|
|
30
|
-
ANSWERQUESTION_TOOL_INPUT_SCHEMA,
|
|
31
|
-
handleAnswerQuestionTool
|
|
32
|
-
} from '../tools/answer-question';
|
|
33
|
-
import {
|
|
34
|
-
GENERATEMANIFESTS_TOOL_NAME,
|
|
35
|
-
GENERATEMANIFESTS_TOOL_DESCRIPTION,
|
|
36
|
-
GENERATEMANIFESTS_TOOL_INPUT_SCHEMA,
|
|
37
|
-
handleGenerateManifestsTool
|
|
38
|
-
} from '../tools/generate-manifests';
|
|
39
|
-
import {
|
|
40
|
-
DEPLOYMANIFESTS_TOOL_NAME,
|
|
41
|
-
DEPLOYMANIFESTS_TOOL_DESCRIPTION,
|
|
42
|
-
DEPLOYMANIFESTS_TOOL_INPUT_SCHEMA,
|
|
43
|
-
handleDeployManifestsTool
|
|
44
|
-
} from '../tools/deploy-manifests';
|
|
45
|
-
|
|
46
|
-
export interface MCPServerConfig {
|
|
47
|
-
name: string;
|
|
48
|
-
version: string;
|
|
49
|
-
description: string;
|
|
50
|
-
author?: string;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export class MCPServer {
|
|
54
|
-
private server: McpServer;
|
|
55
|
-
private dotAI: DotAI;
|
|
56
|
-
private initialized: boolean = false;
|
|
57
|
-
private logger: Logger;
|
|
58
|
-
private requestIdCounter: number = 0;
|
|
59
|
-
|
|
60
|
-
constructor(dotAI: DotAI, config: MCPServerConfig) {
|
|
61
|
-
this.dotAI = dotAI;
|
|
62
|
-
this.logger = new ConsoleLogger('MCPServer');
|
|
63
|
-
|
|
64
|
-
// Create McpServer instance
|
|
65
|
-
this.server = new McpServer(
|
|
66
|
-
{
|
|
67
|
-
name: config.name,
|
|
68
|
-
version: config.version
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
capabilities: {
|
|
72
|
-
tools: {}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
);
|
|
76
|
-
|
|
77
|
-
this.logger.info('Initializing MCP Server', {
|
|
78
|
-
name: config.name,
|
|
79
|
-
version: config.version,
|
|
80
|
-
author: config.author
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
// Register all tools directly with McpServer
|
|
84
|
-
this.registerTools();
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Register all tools with McpServer
|
|
89
|
-
*/
|
|
90
|
-
private registerTools(): void {
|
|
91
|
-
// Register recommend tool
|
|
92
|
-
this.server.tool(
|
|
93
|
-
RECOMMEND_TOOL_NAME,
|
|
94
|
-
RECOMMEND_TOOL_DESCRIPTION,
|
|
95
|
-
RECOMMEND_TOOL_INPUT_SCHEMA,
|
|
96
|
-
async (args: any) => {
|
|
97
|
-
const requestId = this.generateRequestId();
|
|
98
|
-
this.logger.info(`Processing ${RECOMMEND_TOOL_NAME} tool request`, { requestId });
|
|
99
|
-
return await handleRecommendTool(args, this.dotAI, this.logger, requestId);
|
|
100
|
-
}
|
|
101
|
-
);
|
|
102
|
-
|
|
103
|
-
// Register chooseSolution tool
|
|
104
|
-
this.server.tool(
|
|
105
|
-
CHOOSESOLUTION_TOOL_NAME,
|
|
106
|
-
CHOOSESOLUTION_TOOL_DESCRIPTION,
|
|
107
|
-
CHOOSESOLUTION_TOOL_INPUT_SCHEMA,
|
|
108
|
-
async (args: any) => {
|
|
109
|
-
const requestId = this.generateRequestId();
|
|
110
|
-
this.logger.info(`Processing ${CHOOSESOLUTION_TOOL_NAME} tool request`, { requestId });
|
|
111
|
-
return await handleChooseSolutionTool(args, this.dotAI, this.logger, requestId);
|
|
112
|
-
}
|
|
113
|
-
);
|
|
114
|
-
|
|
115
|
-
// Register answerQuestion tool
|
|
116
|
-
this.server.tool(
|
|
117
|
-
ANSWERQUESTION_TOOL_NAME,
|
|
118
|
-
ANSWERQUESTION_TOOL_DESCRIPTION,
|
|
119
|
-
ANSWERQUESTION_TOOL_INPUT_SCHEMA,
|
|
120
|
-
async (args: any) => {
|
|
121
|
-
const requestId = this.generateRequestId();
|
|
122
|
-
this.logger.info(`Processing ${ANSWERQUESTION_TOOL_NAME} tool request`, { requestId });
|
|
123
|
-
return await handleAnswerQuestionTool(args, this.dotAI, this.logger, requestId);
|
|
124
|
-
}
|
|
125
|
-
);
|
|
126
|
-
|
|
127
|
-
// Register generateManifests tool
|
|
128
|
-
this.server.tool(
|
|
129
|
-
GENERATEMANIFESTS_TOOL_NAME,
|
|
130
|
-
GENERATEMANIFESTS_TOOL_DESCRIPTION,
|
|
131
|
-
GENERATEMANIFESTS_TOOL_INPUT_SCHEMA,
|
|
132
|
-
async (args: any) => {
|
|
133
|
-
const requestId = this.generateRequestId();
|
|
134
|
-
this.logger.info(`Processing ${GENERATEMANIFESTS_TOOL_NAME} tool request`, { requestId });
|
|
135
|
-
return await handleGenerateManifestsTool(args, this.dotAI, this.logger, requestId);
|
|
136
|
-
}
|
|
137
|
-
);
|
|
138
|
-
|
|
139
|
-
// Register deployManifests tool
|
|
140
|
-
this.server.tool(
|
|
141
|
-
DEPLOYMANIFESTS_TOOL_NAME,
|
|
142
|
-
DEPLOYMANIFESTS_TOOL_DESCRIPTION,
|
|
143
|
-
DEPLOYMANIFESTS_TOOL_INPUT_SCHEMA,
|
|
144
|
-
async (args: any) => {
|
|
145
|
-
const requestId = this.generateRequestId();
|
|
146
|
-
this.logger.info(`Processing ${DEPLOYMANIFESTS_TOOL_NAME} tool request`, { requestId });
|
|
147
|
-
return await handleDeployManifestsTool(args, this.dotAI, this.logger, requestId);
|
|
148
|
-
}
|
|
149
|
-
);
|
|
150
|
-
|
|
151
|
-
this.logger.info('Registered all tools with McpServer', {
|
|
152
|
-
tools: [
|
|
153
|
-
RECOMMEND_TOOL_NAME,
|
|
154
|
-
CHOOSESOLUTION_TOOL_NAME,
|
|
155
|
-
ANSWERQUESTION_TOOL_NAME,
|
|
156
|
-
GENERATEMANIFESTS_TOOL_NAME,
|
|
157
|
-
DEPLOYMANIFESTS_TOOL_NAME
|
|
158
|
-
],
|
|
159
|
-
totalTools: 5
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
private generateRequestId(): string {
|
|
164
|
-
return `mcp_${Date.now()}_${++this.requestIdCounter}`;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
async start(): Promise<void> {
|
|
169
|
-
const transport = new StdioServerTransport();
|
|
170
|
-
await this.server.connect(transport);
|
|
171
|
-
this.initialized = true;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
async stop(): Promise<void> {
|
|
175
|
-
await this.server.close();
|
|
176
|
-
this.initialized = false;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
isReady(): boolean {
|
|
181
|
-
return this.initialized;
|
|
182
|
-
}
|
|
183
|
-
}
|
package/src/mcp/server.ts
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* MCP Server Entry Point for DevOps AI Toolkit
|
|
5
|
-
*
|
|
6
|
-
* This server exposes DevOps AI Toolkit functionality through the Model Context Protocol,
|
|
7
|
-
* enabling AI assistants like Claude Code to interact with Kubernetes deployment capabilities.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import { MCPServer } from '../interfaces/mcp.js';
|
|
11
|
-
import { DotAI } from '../core/index.js';
|
|
12
|
-
|
|
13
|
-
async function main() {
|
|
14
|
-
try {
|
|
15
|
-
// Validate required environment variables
|
|
16
|
-
process.stderr.write('Validating MCP server configuration...\n');
|
|
17
|
-
|
|
18
|
-
// Check session directory configuration
|
|
19
|
-
const sessionDir = process.env.DOT_AI_SESSION_DIR;
|
|
20
|
-
if (!sessionDir) {
|
|
21
|
-
process.stderr.write('FATAL: DOT_AI_SESSION_DIR environment variable is required\n');
|
|
22
|
-
process.stderr.write('Configuration:\n');
|
|
23
|
-
process.stderr.write('- Set DOT_AI_SESSION_DIR in .mcp.json env section\n');
|
|
24
|
-
process.stderr.write('- Example: "DOT_AI_SESSION_DIR": "/tmp/dot-ai-sessions"\n');
|
|
25
|
-
process.stderr.write('- Ensure the directory exists and is writable\n');
|
|
26
|
-
process.exit(1);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// Validate session directory exists and is writable
|
|
30
|
-
try {
|
|
31
|
-
const fs = await import('fs');
|
|
32
|
-
const path = await import('path');
|
|
33
|
-
|
|
34
|
-
// Check if directory exists
|
|
35
|
-
if (!fs.existsSync(sessionDir)) {
|
|
36
|
-
process.stderr.write(`FATAL: Session directory does not exist: ${sessionDir}\n`);
|
|
37
|
-
process.stderr.write('Solution: Create the directory or update DOT_AI_SESSION_DIR\n');
|
|
38
|
-
process.exit(1);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// Check if it's actually a directory
|
|
42
|
-
const stat = fs.statSync(sessionDir);
|
|
43
|
-
if (!stat.isDirectory()) {
|
|
44
|
-
process.stderr.write(`FATAL: Session directory path is not a directory: ${sessionDir}\n`);
|
|
45
|
-
process.stderr.write('Solution: Use a valid directory path in DOT_AI_SESSION_DIR\n');
|
|
46
|
-
process.exit(1);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// Test write permissions
|
|
50
|
-
const testFile = path.join(sessionDir, '.mcp-test-write');
|
|
51
|
-
try {
|
|
52
|
-
fs.writeFileSync(testFile, 'test');
|
|
53
|
-
fs.unlinkSync(testFile);
|
|
54
|
-
process.stderr.write(`Session directory validated: ${sessionDir}\n`);
|
|
55
|
-
} catch (writeError) {
|
|
56
|
-
process.stderr.write(`FATAL: Session directory is not writable: ${sessionDir}\n`);
|
|
57
|
-
process.stderr.write('Solution: Fix directory permissions or use a different directory\n');
|
|
58
|
-
process.exit(1);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
} catch (error) {
|
|
62
|
-
process.stderr.write(`FATAL: Session directory validation failed: ${error}\n`);
|
|
63
|
-
process.exit(1);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// Initialize DotAI - it will read KUBECONFIG and ANTHROPIC_API_KEY from environment
|
|
67
|
-
const dotAI = new DotAI();
|
|
68
|
-
|
|
69
|
-
// Test cluster connectivity immediately on startup
|
|
70
|
-
process.stderr.write('Testing cluster connectivity...\n');
|
|
71
|
-
try {
|
|
72
|
-
await dotAI.initialize();
|
|
73
|
-
await dotAI.discovery.connect();
|
|
74
|
-
process.stderr.write('Cluster connectivity verified successfully\n');
|
|
75
|
-
} catch (connectError) {
|
|
76
|
-
process.stderr.write(`FATAL: Failed to connect to Kubernetes cluster: ${connectError}\n`);
|
|
77
|
-
process.stderr.write('Troubleshooting:\n');
|
|
78
|
-
process.stderr.write('- Check KUBECONFIG environment variable\n');
|
|
79
|
-
process.stderr.write('- Verify cluster is running: kubectl cluster-info\n');
|
|
80
|
-
process.stderr.write('- Test kubectl connectivity: kubectl get nodes\n');
|
|
81
|
-
process.exit(1);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
// Create and configure MCP server
|
|
85
|
-
const mcpServer = new MCPServer(dotAI, {
|
|
86
|
-
name: 'dot-ai',
|
|
87
|
-
version: '0.1.0',
|
|
88
|
-
description: 'Universal Kubernetes application deployment agent with AI-powered orchestration',
|
|
89
|
-
author: 'Viktor Farcic'
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
// Start the MCP server
|
|
93
|
-
process.stderr.write('Starting DevOps AI Toolkit MCP server...\n');
|
|
94
|
-
await mcpServer.start();
|
|
95
|
-
process.stderr.write('DevOps AI Toolkit MCP server started successfully\n');
|
|
96
|
-
|
|
97
|
-
// Handle graceful shutdown
|
|
98
|
-
process.on('SIGINT', async () => {
|
|
99
|
-
process.stderr.write('Shutting down DevOps AI Toolkit MCP server...\n');
|
|
100
|
-
await mcpServer.stop();
|
|
101
|
-
process.exit(0);
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
process.on('SIGTERM', async () => {
|
|
105
|
-
process.stderr.write('Shutting down DevOps AI Toolkit MCP server...\n');
|
|
106
|
-
await mcpServer.stop();
|
|
107
|
-
process.exit(0);
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
} catch (error) {
|
|
111
|
-
process.stderr.write(`Failed to start DevOps AI Toolkit MCP server: ${error}\n`);
|
|
112
|
-
process.exit(1);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// Handle uncaught exceptions
|
|
117
|
-
process.on('uncaughtException', (error) => {
|
|
118
|
-
process.stderr.write(`Uncaught exception in MCP server: ${error}\n`);
|
|
119
|
-
process.exit(1);
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
process.on('unhandledRejection', (reason) => {
|
|
123
|
-
process.stderr.write(`Unhandled rejection in MCP server: ${reason}\n`);
|
|
124
|
-
process.exit(1);
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
// Start the server
|
|
128
|
-
main().catch((error) => {
|
|
129
|
-
process.stderr.write(`Fatal error starting MCP server: ${error}\n`);
|
|
130
|
-
process.exit(1);
|
|
131
|
-
});
|