@tocharianou/mcp-server-kibana 0.6.1
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/LICENSE +201 -0
- package/README.md +530 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +417 -0
- package/dist/index.js.map +1 -0
- package/dist/kibana-openapi-source.yaml +52597 -0
- package/dist/src/analysis-tools.d.ts +6 -0
- package/dist/src/analysis-tools.js +134 -0
- package/dist/src/analysis-tools.js.map +1 -0
- package/dist/src/base-tools.d.ts +2 -0
- package/dist/src/base-tools.js +349 -0
- package/dist/src/base-tools.js.map +1 -0
- package/dist/src/dependency-analyzer.d.ts +65 -0
- package/dist/src/dependency-analyzer.js +233 -0
- package/dist/src/dependency-analyzer.js.map +1 -0
- package/dist/src/health-analyzer.d.ts +60 -0
- package/dist/src/health-analyzer.js +301 -0
- package/dist/src/health-analyzer.js.map +1 -0
- package/dist/src/kibana-openapi-source.yaml +52597 -0
- package/dist/src/openapi-simplifier.d.ts +33 -0
- package/dist/src/openapi-simplifier.js +122 -0
- package/dist/src/openapi-simplifier.js.map +1 -0
- package/dist/src/prompts.d.ts +2 -0
- package/dist/src/prompts.js +91 -0
- package/dist/src/prompts.js.map +1 -0
- package/dist/src/resources.d.ts +2 -0
- package/dist/src/resources.js +125 -0
- package/dist/src/resources.js.map +1 -0
- package/dist/src/types.d.ts +150 -0
- package/dist/src/types.js +38 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/vl_create_tools.d.ts +5 -0
- package/dist/src/vl_create_tools.js +264 -0
- package/dist/src/vl_create_tools.js.map +1 -0
- package/dist/src/vl_delete_tools.d.ts +5 -0
- package/dist/src/vl_delete_tools.js +158 -0
- package/dist/src/vl_delete_tools.js.map +1 -0
- package/dist/src/vl_get_tools.d.ts +5 -0
- package/dist/src/vl_get_tools.js +201 -0
- package/dist/src/vl_get_tools.js.map +1 -0
- package/dist/src/vl_search_tools.d.ts +9 -0
- package/dist/src/vl_search_tools.js +290 -0
- package/dist/src/vl_search_tools.js.map +1 -0
- package/dist/src/vl_update_tools.d.ts +5 -0
- package/dist/src/vl_update_tools.js +372 -0
- package/dist/src/vl_update_tools.js.map +1 -0
- package/kibana-openapi-source.yaml +52597 -0
- package/package.json +95 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
|
+
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
5
|
+
import express from "express";
|
|
6
|
+
import { randomUUID } from "crypto";
|
|
7
|
+
import axios from "axios";
|
|
8
|
+
import fs from "fs";
|
|
9
|
+
import { KibanaConfigSchema, KibanaError } from "./src/types.js";
|
|
10
|
+
// Import all tool modules
|
|
11
|
+
import { registerBaseTools } from "./src/base-tools.js";
|
|
12
|
+
import { registerPrompts } from "./src/prompts.js";
|
|
13
|
+
import { registerResources } from "./src/resources.js";
|
|
14
|
+
import { registerVlTools } from "./src/vl_search_tools.js";
|
|
15
|
+
import { registerVLGetTools } from "./src/vl_get_tools.js";
|
|
16
|
+
import { registerVLDeleteTools } from "./src/vl_delete_tools.js";
|
|
17
|
+
import { registerVLCreateTools } from "./src/vl_create_tools.js";
|
|
18
|
+
import { registerVLUpdateTools } from "./src/vl_update_tools.js";
|
|
19
|
+
import { registerAnalysisTools } from "./src/analysis-tools.js";
|
|
20
|
+
// Create Kibana client
|
|
21
|
+
function createKibanaClient(config) {
|
|
22
|
+
const axiosConfig = {
|
|
23
|
+
baseURL: config.url,
|
|
24
|
+
timeout: 60000, // 60 seconds
|
|
25
|
+
headers: {
|
|
26
|
+
'Content-Type': 'application/json',
|
|
27
|
+
'kbn-xsrf': 'true'
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
// Add authentication - prioritize in order: API Key > Basic Auth > Cookies
|
|
31
|
+
if (config.apiKey) {
|
|
32
|
+
// API Key authentication
|
|
33
|
+
axiosConfig.headers['Authorization'] = `ApiKey ${config.apiKey}`;
|
|
34
|
+
}
|
|
35
|
+
else if (config.username && config.password) {
|
|
36
|
+
// Basic authentication
|
|
37
|
+
axiosConfig.auth = {
|
|
38
|
+
username: config.username,
|
|
39
|
+
password: config.password,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
else if (config.cookies) {
|
|
43
|
+
// Cookie-based authentication
|
|
44
|
+
axiosConfig.headers['Cookie'] = config.cookies;
|
|
45
|
+
}
|
|
46
|
+
// Add CA certificate
|
|
47
|
+
if (config.caCert) {
|
|
48
|
+
try {
|
|
49
|
+
axiosConfig.httpsAgent = new (require("https").Agent)({
|
|
50
|
+
ca: fs.readFileSync(config.caCert),
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
console.error("Error loading CA certificate:", error);
|
|
55
|
+
throw new KibanaError("Failed to load CA certificate", undefined, error);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
// 动态的 URL 转换逻辑 - 支持每次调用时指定空间
|
|
59
|
+
const buildSpaceAwareUrl = (url, space) => {
|
|
60
|
+
const targetSpace = space || config.defaultSpace;
|
|
61
|
+
if (targetSpace && targetSpace !== 'default' && url.startsWith('/api/')) {
|
|
62
|
+
return `/s/${targetSpace}${url}`;
|
|
63
|
+
}
|
|
64
|
+
return url;
|
|
65
|
+
};
|
|
66
|
+
const axiosInstance = axios.create(axiosConfig);
|
|
67
|
+
axiosInstance.interceptors.response.use((response) => {
|
|
68
|
+
return response.data;
|
|
69
|
+
}, (error) => {
|
|
70
|
+
console.error('API request failed:', error.message);
|
|
71
|
+
return Promise.reject(error);
|
|
72
|
+
});
|
|
73
|
+
return {
|
|
74
|
+
get: async (url, options) => {
|
|
75
|
+
const spaceAwareUrl = buildSpaceAwareUrl(url, options?.space);
|
|
76
|
+
try {
|
|
77
|
+
const response = await axiosInstance.get(spaceAwareUrl, {
|
|
78
|
+
params: options?.params,
|
|
79
|
+
headers: { ...axiosConfig.headers, ...options?.headers }
|
|
80
|
+
});
|
|
81
|
+
return response;
|
|
82
|
+
}
|
|
83
|
+
catch (error) {
|
|
84
|
+
const axiosError = error;
|
|
85
|
+
throw new KibanaError(`GET request failed: ${axiosError.message}`, axiosError.response?.status, axiosError.response?.data);
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
post: async (url, data, options) => {
|
|
89
|
+
const spaceAwareUrl = buildSpaceAwareUrl(url, options?.space);
|
|
90
|
+
try {
|
|
91
|
+
const response = await axiosInstance.post(spaceAwareUrl, data, {
|
|
92
|
+
headers: { ...axiosConfig.headers, ...options?.headers }
|
|
93
|
+
});
|
|
94
|
+
return response;
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
const axiosError = error;
|
|
98
|
+
throw new KibanaError(`POST request failed: ${axiosError.message}`, axiosError.response?.status, axiosError.response?.data);
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
put: async (url, data, options) => {
|
|
102
|
+
const spaceAwareUrl = buildSpaceAwareUrl(url, options?.space);
|
|
103
|
+
try {
|
|
104
|
+
const response = await axiosInstance.put(spaceAwareUrl, data, {
|
|
105
|
+
headers: { ...axiosConfig.headers, ...options?.headers }
|
|
106
|
+
});
|
|
107
|
+
return response;
|
|
108
|
+
}
|
|
109
|
+
catch (error) {
|
|
110
|
+
const axiosError = error;
|
|
111
|
+
throw new KibanaError(`PUT request failed: ${axiosError.message}`, axiosError.response?.status, axiosError.response?.data);
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
delete: async (url, options) => {
|
|
115
|
+
const spaceAwareUrl = buildSpaceAwareUrl(url, options?.space);
|
|
116
|
+
try {
|
|
117
|
+
const response = await axiosInstance.delete(spaceAwareUrl, {
|
|
118
|
+
headers: { ...axiosConfig.headers, ...options?.headers }
|
|
119
|
+
});
|
|
120
|
+
return response;
|
|
121
|
+
}
|
|
122
|
+
catch (error) {
|
|
123
|
+
const axiosError = error;
|
|
124
|
+
throw new KibanaError(`DELETE request failed: ${axiosError.message}`, axiosError.response?.status, axiosError.response?.data);
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
patch: async (url, data, options) => {
|
|
128
|
+
const spaceAwareUrl = buildSpaceAwareUrl(url, options?.space);
|
|
129
|
+
try {
|
|
130
|
+
const response = await axiosInstance.patch(spaceAwareUrl, data, {
|
|
131
|
+
headers: { ...axiosConfig.headers, ...options?.headers }
|
|
132
|
+
});
|
|
133
|
+
return response;
|
|
134
|
+
}
|
|
135
|
+
catch (error) {
|
|
136
|
+
const axiosError = error;
|
|
137
|
+
throw new KibanaError(`PATCH request failed: ${axiosError.message}`, axiosError.response?.status, axiosError.response?.data);
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
// Create Kibana MCP server
|
|
143
|
+
export async function createKibanaMcpServer(options) {
|
|
144
|
+
const { name, version, transport, config, description } = options;
|
|
145
|
+
// Validate configuration
|
|
146
|
+
const validatedConfig = KibanaConfigSchema.parse(config);
|
|
147
|
+
const kibanaClient = createKibanaClient(validatedConfig);
|
|
148
|
+
const defaultSpace = validatedConfig.defaultSpace || 'default';
|
|
149
|
+
const server = new McpServer({
|
|
150
|
+
name,
|
|
151
|
+
version,
|
|
152
|
+
transport: transport || new StdioServerTransport(),
|
|
153
|
+
capabilities: {
|
|
154
|
+
tools: {},
|
|
155
|
+
prompts: { listChanged: false },
|
|
156
|
+
resources: {}
|
|
157
|
+
},
|
|
158
|
+
description
|
|
159
|
+
});
|
|
160
|
+
// Create an adapter to convert McpServer to ServerBase
|
|
161
|
+
const serverBase = {
|
|
162
|
+
tool: (name, ...args) => {
|
|
163
|
+
if (args.length === 1) {
|
|
164
|
+
const [cb] = args;
|
|
165
|
+
server.tool(name, async (extra) => {
|
|
166
|
+
try {
|
|
167
|
+
const result = await Promise.resolve(cb(extra));
|
|
168
|
+
return result;
|
|
169
|
+
}
|
|
170
|
+
catch (error) {
|
|
171
|
+
return {
|
|
172
|
+
content: [{
|
|
173
|
+
type: "text",
|
|
174
|
+
text: `Error: ${error instanceof Error ? error.message : String(error)}`
|
|
175
|
+
}],
|
|
176
|
+
isError: true
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
const [description, schema, handler] = args;
|
|
183
|
+
server.tool(name, description, schema.shape, async (args, extra) => {
|
|
184
|
+
try {
|
|
185
|
+
const result = await Promise.resolve(handler(args, extra));
|
|
186
|
+
return result;
|
|
187
|
+
}
|
|
188
|
+
catch (error) {
|
|
189
|
+
if (error instanceof KibanaError) {
|
|
190
|
+
return {
|
|
191
|
+
content: [{
|
|
192
|
+
type: "text",
|
|
193
|
+
text: `Error: ${error.message}${error.details ? `\nDetails: ${JSON.stringify(error.details)}` : ''}`
|
|
194
|
+
}],
|
|
195
|
+
isError: true
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
return {
|
|
199
|
+
content: [{
|
|
200
|
+
type: "text",
|
|
201
|
+
text: `Error: ${error instanceof Error ? error.message : String(error)}`
|
|
202
|
+
}],
|
|
203
|
+
isError: true
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
prompt: (name, schema, handler) => {
|
|
210
|
+
server.prompt(name, schema.shape, async (args, extra) => {
|
|
211
|
+
try {
|
|
212
|
+
const result = await Promise.resolve(handler(args, extra));
|
|
213
|
+
return result;
|
|
214
|
+
}
|
|
215
|
+
catch (error) {
|
|
216
|
+
return {
|
|
217
|
+
content: [{
|
|
218
|
+
type: "text",
|
|
219
|
+
text: `Error in prompt '${name}': ${error instanceof Error ? error.message : String(error)}`
|
|
220
|
+
}],
|
|
221
|
+
isError: true
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
},
|
|
226
|
+
resource: (name, uriOrTemplate, handler) => {
|
|
227
|
+
server.resource(name, uriOrTemplate, async (...args) => {
|
|
228
|
+
try {
|
|
229
|
+
const result = await Promise.resolve(handler(...args));
|
|
230
|
+
return result;
|
|
231
|
+
}
|
|
232
|
+
catch (error) {
|
|
233
|
+
return {
|
|
234
|
+
content: [{
|
|
235
|
+
type: "text",
|
|
236
|
+
text: `Error in resource '${name}': ${error instanceof Error ? error.message : String(error)}`
|
|
237
|
+
}],
|
|
238
|
+
isError: true
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
// Register all tool modules
|
|
245
|
+
const registrations = [
|
|
246
|
+
registerBaseTools(serverBase, kibanaClient, defaultSpace),
|
|
247
|
+
registerPrompts(serverBase, defaultSpace),
|
|
248
|
+
registerResources(serverBase, kibanaClient, defaultSpace),
|
|
249
|
+
registerVlTools(serverBase, kibanaClient, defaultSpace),
|
|
250
|
+
registerVLGetTools(serverBase, kibanaClient),
|
|
251
|
+
registerVLDeleteTools(serverBase, kibanaClient),
|
|
252
|
+
registerVLCreateTools(serverBase, kibanaClient),
|
|
253
|
+
registerVLUpdateTools(serverBase, kibanaClient),
|
|
254
|
+
registerAnalysisTools(serverBase, kibanaClient, defaultSpace)
|
|
255
|
+
];
|
|
256
|
+
await Promise.all(registrations);
|
|
257
|
+
return server;
|
|
258
|
+
}
|
|
259
|
+
// Main function
|
|
260
|
+
async function main() {
|
|
261
|
+
try {
|
|
262
|
+
// Create configuration from environment variables
|
|
263
|
+
const config = {
|
|
264
|
+
url: process.env.KIBANA_URL || "http://localhost:5601",
|
|
265
|
+
username: process.env.KIBANA_USERNAME || "",
|
|
266
|
+
password: process.env.KIBANA_PASSWORD || "",
|
|
267
|
+
cookies: process.env.KIBANA_COOKIES,
|
|
268
|
+
apiKey: process.env.KIBANA_API_KEY,
|
|
269
|
+
caCert: process.env.KIBANA_CA_CERT,
|
|
270
|
+
timeout: parseInt(process.env.KIBANA_TIMEOUT || "30000", 10),
|
|
271
|
+
maxRetries: parseInt(process.env.KIBANA_MAX_RETRIES || "3", 10),
|
|
272
|
+
defaultSpace: process.env.KIBANA_DEFAULT_SPACE || 'default'
|
|
273
|
+
};
|
|
274
|
+
const defaultSpace = config.defaultSpace || 'default';
|
|
275
|
+
const serverName = "kibana-mcp-server";
|
|
276
|
+
const serverDescription = defaultSpace === 'default'
|
|
277
|
+
? "Kibana MCP Server with multi-space support"
|
|
278
|
+
: `Kibana MCP Server with multi-space support (default: '${defaultSpace}')`;
|
|
279
|
+
// Check if HTTP mode is enabled
|
|
280
|
+
const useHttp = process.env.MCP_TRANSPORT === 'http';
|
|
281
|
+
const httpPort = parseInt(process.env.MCP_HTTP_PORT || '3000', 10);
|
|
282
|
+
const httpHost = process.env.MCP_HTTP_HOST || 'localhost';
|
|
283
|
+
if (useHttp) {
|
|
284
|
+
// HTTP Mode - Use Streamable HTTP Transport
|
|
285
|
+
process.stderr.write(`Starting Kibana MCP Server in HTTP mode on ${httpHost}:${httpPort}\n`);
|
|
286
|
+
process.stderr.write(`Default Kibana space: ${defaultSpace}\n`);
|
|
287
|
+
const app = express();
|
|
288
|
+
app.use(express.json());
|
|
289
|
+
// Store active transports by session ID
|
|
290
|
+
const transports = new Map();
|
|
291
|
+
// Health check endpoint
|
|
292
|
+
app.get('/health', (req, res) => {
|
|
293
|
+
res.json({ status: 'ok', transport: 'streamable-http' });
|
|
294
|
+
});
|
|
295
|
+
// MCP endpoint
|
|
296
|
+
app.post('/mcp', async (req, res) => {
|
|
297
|
+
const sessionId = req.headers['mcp-session-id'];
|
|
298
|
+
try {
|
|
299
|
+
let transport;
|
|
300
|
+
// Check if we have an existing session
|
|
301
|
+
if (sessionId && transports.has(sessionId)) {
|
|
302
|
+
transport = transports.get(sessionId);
|
|
303
|
+
}
|
|
304
|
+
else {
|
|
305
|
+
// Create new transport for new session
|
|
306
|
+
transport = new StreamableHTTPServerTransport({
|
|
307
|
+
sessionIdGenerator: () => randomUUID(),
|
|
308
|
+
onsessioninitialized: async (newSessionId) => {
|
|
309
|
+
transports.set(newSessionId, transport);
|
|
310
|
+
process.stderr.write(`New MCP session initialized: ${newSessionId}\n`);
|
|
311
|
+
},
|
|
312
|
+
onsessionclosed: async (closedSessionId) => {
|
|
313
|
+
transports.delete(closedSessionId);
|
|
314
|
+
process.stderr.write(`MCP session closed: ${closedSessionId}\n`);
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
// Create server for this transport
|
|
318
|
+
const server = await createKibanaMcpServer({
|
|
319
|
+
name: serverName,
|
|
320
|
+
version: "0.6.0",
|
|
321
|
+
config,
|
|
322
|
+
description: serverDescription
|
|
323
|
+
});
|
|
324
|
+
await server.connect(transport);
|
|
325
|
+
}
|
|
326
|
+
// Handle the request
|
|
327
|
+
await transport.handleRequest(req, res, req.body);
|
|
328
|
+
}
|
|
329
|
+
catch (error) {
|
|
330
|
+
process.stderr.write(`Error handling MCP request: ${error}\n`);
|
|
331
|
+
if (!res.headersSent) {
|
|
332
|
+
res.status(500).json({
|
|
333
|
+
jsonrpc: '2.0',
|
|
334
|
+
error: {
|
|
335
|
+
code: -32603,
|
|
336
|
+
message: 'Internal server error',
|
|
337
|
+
},
|
|
338
|
+
id: null,
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
});
|
|
343
|
+
// GET endpoint for SSE streams
|
|
344
|
+
app.get('/mcp', async (req, res) => {
|
|
345
|
+
const sessionId = req.headers['mcp-session-id'];
|
|
346
|
+
if (!sessionId || !transports.has(sessionId)) {
|
|
347
|
+
res.status(400).json({
|
|
348
|
+
jsonrpc: '2.0',
|
|
349
|
+
error: {
|
|
350
|
+
code: -32000,
|
|
351
|
+
message: 'Invalid or missing session ID',
|
|
352
|
+
},
|
|
353
|
+
id: null,
|
|
354
|
+
});
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
try {
|
|
358
|
+
const transport = transports.get(sessionId);
|
|
359
|
+
await transport.handleRequest(req, res);
|
|
360
|
+
}
|
|
361
|
+
catch (error) {
|
|
362
|
+
process.stderr.write(`Error handling SSE stream: ${error}\n`);
|
|
363
|
+
if (!res.headersSent) {
|
|
364
|
+
res.status(500).json({
|
|
365
|
+
jsonrpc: '2.0',
|
|
366
|
+
error: {
|
|
367
|
+
code: -32603,
|
|
368
|
+
message: 'Failed to establish SSE stream',
|
|
369
|
+
},
|
|
370
|
+
id: null,
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
});
|
|
375
|
+
// Start HTTP server
|
|
376
|
+
app.listen(httpPort, httpHost, () => {
|
|
377
|
+
console.log(`\n✓ Kibana MCP Server (HTTP Mode) is running`);
|
|
378
|
+
console.log(` Endpoint: http://${httpHost}:${httpPort}/mcp`);
|
|
379
|
+
console.log(` Health: http://${httpHost}:${httpPort}/health`);
|
|
380
|
+
console.log(` Transport: Streamable HTTP`);
|
|
381
|
+
console.log(` Default Space: ${defaultSpace}\n`);
|
|
382
|
+
});
|
|
383
|
+
// Handle process termination
|
|
384
|
+
process.on("SIGINT", async () => {
|
|
385
|
+
console.log("\nShutting down server...");
|
|
386
|
+
for (const [sessionId, transport] of transports.entries()) {
|
|
387
|
+
await transport.close();
|
|
388
|
+
}
|
|
389
|
+
process.exit(0);
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
else {
|
|
393
|
+
// Stdio Mode (Default) - Use Stdio Transport
|
|
394
|
+
process.stderr.write(`Starting Kibana MCP Server in Stdio mode for space: ${defaultSpace}\n`);
|
|
395
|
+
const server = await createKibanaMcpServer({
|
|
396
|
+
name: serverName,
|
|
397
|
+
version: "0.6.0",
|
|
398
|
+
config,
|
|
399
|
+
description: serverDescription
|
|
400
|
+
});
|
|
401
|
+
const transport = new StdioServerTransport();
|
|
402
|
+
await server.connect(transport);
|
|
403
|
+
// Handle process termination
|
|
404
|
+
process.on("SIGINT", async () => {
|
|
405
|
+
await server.close();
|
|
406
|
+
process.exit(0);
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
catch (error) {
|
|
411
|
+
console.error("Fatal error:", error);
|
|
412
|
+
process.exit(1);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
// Start server
|
|
416
|
+
main();
|
|
417
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,OAAO,EAQL,kBAAkB,EAClB,WAAW,EAEZ,MAAM,gBAAgB,CAAC;AAExB,0BAA0B;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGhE,uBAAuB;AACvB,SAAS,kBAAkB,CAA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