observability-toolkit 1.8.0 → 1.8.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.
- package/README.md +81 -3
- package/dist/backends/index.d.ts +119 -0
- package/dist/backends/index.d.ts.map +1 -1
- package/dist/backends/index.js +57 -0
- package/dist/backends/index.js.map +1 -1
- package/dist/backends/index.test.d.ts +5 -0
- package/dist/backends/index.test.d.ts.map +1 -0
- package/dist/backends/index.test.js +156 -0
- package/dist/backends/index.test.js.map +1 -0
- package/dist/backends/local-jsonl-boolean-search.test.js +8 -27
- package/dist/backends/local-jsonl-boolean-search.test.js.map +1 -1
- package/dist/backends/local-jsonl-logs.test.d.ts +2 -0
- package/dist/backends/local-jsonl-logs.test.d.ts.map +1 -0
- package/dist/backends/local-jsonl-logs.test.js +603 -0
- package/dist/backends/local-jsonl-logs.test.js.map +1 -0
- package/dist/backends/local-jsonl-traces.test.d.ts +2 -0
- package/dist/backends/local-jsonl-traces.test.d.ts.map +1 -0
- package/dist/backends/local-jsonl-traces.test.js +1723 -0
- package/dist/backends/local-jsonl-traces.test.js.map +1 -0
- package/dist/backends/local-jsonl.d.ts +4 -1
- package/dist/backends/local-jsonl.d.ts.map +1 -1
- package/dist/backends/local-jsonl.js +185 -1
- package/dist/backends/local-jsonl.js.map +1 -1
- package/dist/backends/local-jsonl.test.js +723 -46
- package/dist/backends/local-jsonl.test.js.map +1 -1
- package/dist/backends/signoz-api.d.ts +32 -0
- package/dist/backends/signoz-api.d.ts.map +1 -1
- package/dist/backends/signoz-api.js +231 -33
- package/dist/backends/signoz-api.js.map +1 -1
- package/dist/backends/signoz-api.test.js +410 -63
- package/dist/backends/signoz-api.test.js.map +1 -1
- package/dist/lib/constants.d.ts +59 -0
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/constants.js +252 -6
- package/dist/lib/constants.js.map +1 -1
- package/dist/lib/constants.test.js +357 -21
- package/dist/lib/constants.test.js.map +1 -1
- package/dist/lib/edge-cases.test.d.ts +11 -0
- package/dist/lib/edge-cases.test.d.ts.map +1 -0
- package/dist/lib/edge-cases.test.js +634 -0
- package/dist/lib/edge-cases.test.js.map +1 -0
- package/dist/lib/error-sanitizer.d.ts +57 -0
- package/dist/lib/error-sanitizer.d.ts.map +1 -0
- package/dist/lib/error-sanitizer.js +207 -0
- package/dist/lib/error-sanitizer.js.map +1 -0
- package/dist/lib/error-sanitizer.test.d.ts +8 -0
- package/dist/lib/error-sanitizer.test.d.ts.map +1 -0
- package/dist/lib/error-sanitizer.test.js +369 -0
- package/dist/lib/error-sanitizer.test.js.map +1 -0
- package/dist/lib/file-utils.d.ts +134 -0
- package/dist/lib/file-utils.d.ts.map +1 -1
- package/dist/lib/file-utils.js +395 -9
- package/dist/lib/file-utils.js.map +1 -1
- package/dist/lib/file-utils.test.js +444 -3
- package/dist/lib/file-utils.test.js.map +1 -1
- package/dist/lib/indexer.d.ts +9 -1
- package/dist/lib/indexer.d.ts.map +1 -1
- package/dist/lib/indexer.js +51 -2
- package/dist/lib/indexer.js.map +1 -1
- package/dist/lib/indexer.test.js +138 -20
- package/dist/lib/indexer.test.js.map +1 -1
- package/dist/lib/input-validator.d.ts +103 -0
- package/dist/lib/input-validator.d.ts.map +1 -0
- package/dist/lib/input-validator.js +250 -0
- package/dist/lib/input-validator.js.map +1 -0
- package/dist/lib/input-validator.test.d.ts +2 -0
- package/dist/lib/input-validator.test.d.ts.map +1 -0
- package/dist/lib/input-validator.test.js +287 -0
- package/dist/lib/input-validator.test.js.map +1 -0
- package/dist/lib/query-sanitizer.d.ts +143 -0
- package/dist/lib/query-sanitizer.d.ts.map +1 -0
- package/dist/lib/query-sanitizer.js +261 -0
- package/dist/lib/query-sanitizer.js.map +1 -0
- package/dist/lib/query-sanitizer.test.d.ts +5 -0
- package/dist/lib/query-sanitizer.test.d.ts.map +1 -0
- package/dist/lib/query-sanitizer.test.js +400 -0
- package/dist/lib/query-sanitizer.test.js.map +1 -0
- package/dist/lib/server-utils.d.ts +80 -0
- package/dist/lib/server-utils.d.ts.map +1 -0
- package/dist/lib/server-utils.js +141 -0
- package/dist/lib/server-utils.js.map +1 -0
- package/dist/lib/shared-schemas.d.ts +59 -0
- package/dist/lib/shared-schemas.d.ts.map +1 -0
- package/dist/lib/shared-schemas.js +58 -0
- package/dist/lib/shared-schemas.js.map +1 -0
- package/dist/lib/shared-schemas.test.d.ts +5 -0
- package/dist/lib/shared-schemas.test.d.ts.map +1 -0
- package/dist/lib/shared-schemas.test.js +106 -0
- package/dist/lib/shared-schemas.test.js.map +1 -0
- package/dist/lib/toon-encoder.d.ts +21 -0
- package/dist/lib/toon-encoder.d.ts.map +1 -0
- package/dist/lib/toon-encoder.js +46 -0
- package/dist/lib/toon-encoder.js.map +1 -0
- package/dist/server.d.ts +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +155 -81
- package/dist/server.js.map +1 -1
- package/dist/server.test.js +363 -0
- package/dist/server.test.js.map +1 -1
- package/dist/test-helpers/env-utils.d.ts +65 -0
- package/dist/test-helpers/env-utils.d.ts.map +1 -0
- package/dist/test-helpers/env-utils.js +94 -0
- package/dist/test-helpers/env-utils.js.map +1 -0
- package/dist/test-helpers/file-utils.d.ts +93 -0
- package/dist/test-helpers/file-utils.d.ts.map +1 -0
- package/dist/test-helpers/file-utils.js +206 -0
- package/dist/test-helpers/file-utils.js.map +1 -0
- package/dist/test-helpers/index.d.ts +10 -0
- package/dist/test-helpers/index.d.ts.map +1 -0
- package/dist/test-helpers/index.js +28 -0
- package/dist/test-helpers/index.js.map +1 -0
- package/dist/test-helpers/mock-backends.d.ts +139 -0
- package/dist/test-helpers/mock-backends.d.ts.map +1 -0
- package/dist/test-helpers/mock-backends.js +227 -0
- package/dist/test-helpers/mock-backends.js.map +1 -0
- package/dist/test-helpers/mock-backends.test.d.ts +5 -0
- package/dist/test-helpers/mock-backends.test.d.ts.map +1 -0
- package/dist/test-helpers/mock-backends.test.js +368 -0
- package/dist/test-helpers/mock-backends.test.js.map +1 -0
- package/dist/test-helpers/schema-validators.d.ts +32 -0
- package/dist/test-helpers/schema-validators.d.ts.map +1 -0
- package/dist/test-helpers/schema-validators.js +125 -0
- package/dist/test-helpers/schema-validators.js.map +1 -0
- package/dist/test-helpers/test-data-builders.d.ts +223 -0
- package/dist/test-helpers/test-data-builders.d.ts.map +1 -0
- package/dist/test-helpers/test-data-builders.js +288 -0
- package/dist/test-helpers/test-data-builders.js.map +1 -0
- package/dist/test-helpers/test-data-builders.test.d.ts +2 -0
- package/dist/test-helpers/test-data-builders.test.d.ts.map +1 -0
- package/dist/test-helpers/test-data-builders.test.js +306 -0
- package/dist/test-helpers/test-data-builders.test.js.map +1 -0
- package/dist/test-helpers/tool-validators.d.ts +28 -0
- package/dist/test-helpers/tool-validators.d.ts.map +1 -0
- package/dist/test-helpers/tool-validators.js +56 -0
- package/dist/test-helpers/tool-validators.js.map +1 -0
- package/dist/tools/context-stats.d.ts +1 -0
- package/dist/tools/context-stats.d.ts.map +1 -1
- package/dist/tools/context-stats.js +9 -5
- package/dist/tools/context-stats.js.map +1 -1
- package/dist/tools/context-stats.test.js +24 -10
- package/dist/tools/context-stats.test.js.map +1 -1
- package/dist/tools/get-trace-url.js +2 -2
- package/dist/tools/get-trace-url.js.map +1 -1
- package/dist/tools/health-check.js +2 -2
- package/dist/tools/health-check.js.map +1 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/query-evaluations.d.ts +186 -0
- package/dist/tools/query-evaluations.d.ts.map +1 -0
- package/dist/tools/query-evaluations.js +351 -0
- package/dist/tools/query-evaluations.js.map +1 -0
- package/dist/tools/query-evaluations.test.d.ts +5 -0
- package/dist/tools/query-evaluations.test.d.ts.map +1 -0
- package/dist/tools/query-evaluations.test.js +733 -0
- package/dist/tools/query-evaluations.test.js.map +1 -0
- package/dist/tools/query-llm-events.d.ts +24 -18
- package/dist/tools/query-llm-events.d.ts.map +1 -1
- package/dist/tools/query-llm-events.js +103 -60
- package/dist/tools/query-llm-events.js.map +1 -1
- package/dist/tools/query-llm-events.test.js +271 -9
- package/dist/tools/query-llm-events.test.js.map +1 -1
- package/dist/tools/query-logs.d.ts +28 -20
- package/dist/tools/query-logs.d.ts.map +1 -1
- package/dist/tools/query-logs.js +85 -61
- package/dist/tools/query-logs.js.map +1 -1
- package/dist/tools/query-logs.test.js +74 -145
- package/dist/tools/query-logs.test.js.map +1 -1
- package/dist/tools/query-metrics.d.ts +20 -20
- package/dist/tools/query-metrics.d.ts.map +1 -1
- package/dist/tools/query-metrics.js +109 -61
- package/dist/tools/query-metrics.js.map +1 -1
- package/dist/tools/query-metrics.test.js +26 -61
- package/dist/tools/query-metrics.test.js.map +1 -1
- package/dist/tools/query-traces.d.ts +24 -22
- package/dist/tools/query-traces.d.ts.map +1 -1
- package/dist/tools/query-traces.js +95 -70
- package/dist/tools/query-traces.js.map +1 -1
- package/dist/tools/query-traces.test.js +294 -90
- package/dist/tools/query-traces.test.js.map +1 -1
- package/dist/tools/setup-claudeignore.js +7 -7
- package/dist/tools/setup-claudeignore.js.map +1 -1
- package/dist/tools/setup-claudeignore.test.js +4 -25
- package/dist/tools/setup-claudeignore.test.js.map +1 -1
- package/package.json +3 -4
package/dist/server.js
CHANGED
|
@@ -11,31 +11,15 @@ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
|
11
11
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
12
12
|
import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
13
13
|
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
isAllowed() {
|
|
24
|
-
const now = Date.now();
|
|
25
|
-
// Remove expired entries
|
|
26
|
-
this.requests = this.requests.filter(t => now - t < RATE_LIMIT.windowMs);
|
|
27
|
-
if (this.requests.length >= RATE_LIMIT.maxRequests) {
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
this.requests.push(now);
|
|
31
|
-
return true;
|
|
32
|
-
}
|
|
33
|
-
getRemainingRequests() {
|
|
34
|
-
const now = Date.now();
|
|
35
|
-
this.requests = this.requests.filter(t => now - t < RATE_LIMIT.windowMs);
|
|
36
|
-
return Math.max(0, RATE_LIMIT.maxRequests - this.requests.length);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
14
|
+
import { createRequire } from 'module';
|
|
15
|
+
import { queryTracesTool, queryMetricsTool, queryLogsTool, queryLLMEventsTool, queryEvaluationsTool, healthCheckTool, contextStatsTool, getTraceUrlTool, setupClaudeignoreTool, } from './tools/index.js';
|
|
16
|
+
import { sanitizeErrorForResponse } from './lib/error-sanitizer.js';
|
|
17
|
+
import { RateLimiter, ServerInitError } from './lib/server-utils.js';
|
|
18
|
+
// Import version from package.json (L1 fix)
|
|
19
|
+
const require = createRequire(import.meta.url);
|
|
20
|
+
const { version: packageVersion } = require('../package.json');
|
|
21
|
+
// Re-export for backwards compatibility
|
|
22
|
+
export { RateLimiter, ServerInitError } from './lib/server-utils.js';
|
|
39
23
|
const rateLimiter = new RateLimiter();
|
|
40
24
|
// Tool definitions
|
|
41
25
|
const tools = [
|
|
@@ -43,6 +27,7 @@ const tools = [
|
|
|
43
27
|
queryMetricsTool,
|
|
44
28
|
queryLogsTool,
|
|
45
29
|
queryLLMEventsTool,
|
|
30
|
+
queryEvaluationsTool,
|
|
46
31
|
healthCheckTool,
|
|
47
32
|
contextStatsTool,
|
|
48
33
|
getTraceUrlTool,
|
|
@@ -60,69 +45,158 @@ function convertZodToJsonSchema(zodSchema) {
|
|
|
60
45
|
const { $schema, ...rest } = schema;
|
|
61
46
|
return rest;
|
|
62
47
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
return {
|
|
75
|
-
tools: tools.map(tool => ({
|
|
76
|
-
name: tool.name,
|
|
77
|
-
description: tool.description,
|
|
78
|
-
inputSchema: convertZodToJsonSchema(tool.inputSchema),
|
|
79
|
-
})),
|
|
80
|
-
};
|
|
81
|
-
});
|
|
82
|
-
// Handle tool calls
|
|
83
|
-
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
84
|
-
const { name, arguments: args } = request.params;
|
|
85
|
-
// Rate limiting check
|
|
86
|
-
if (!rateLimiter.isAllowed()) {
|
|
87
|
-
return {
|
|
88
|
-
content: [{ type: 'text', text: `Rate limit exceeded. Please wait before making more requests. Remaining: ${rateLimiter.getRemainingRequests()}` }],
|
|
89
|
-
isError: true,
|
|
90
|
-
};
|
|
48
|
+
/**
|
|
49
|
+
* Validate that all tools are properly configured before starting the server.
|
|
50
|
+
* @throws ServerInitError if any tool is misconfigured
|
|
51
|
+
*/
|
|
52
|
+
function validateTools() {
|
|
53
|
+
if (tools.length === 0) {
|
|
54
|
+
throw new ServerInitError('tool-validation', null, 'No tools registered. Server cannot start without at least one tool.');
|
|
55
|
+
}
|
|
56
|
+
for (const tool of tools) {
|
|
57
|
+
if (!tool.name || typeof tool.name !== 'string') {
|
|
58
|
+
throw new ServerInitError('tool-validation', null, `Tool missing required 'name' property`);
|
|
91
59
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
return {
|
|
95
|
-
content: [{ type: 'text', text: `Unknown tool: ${name}` }],
|
|
96
|
-
isError: true,
|
|
97
|
-
};
|
|
60
|
+
if (!tool.handler || typeof tool.handler !== 'function') {
|
|
61
|
+
throw new ServerInitError('tool-validation', null, `Tool '${tool.name}' missing required 'handler' function`);
|
|
98
62
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
const input = tool.inputSchema.parse(args || {});
|
|
102
|
-
// Execute handler - use type assertion since we've validated input
|
|
103
|
-
const result = await tool.handler(input);
|
|
104
|
-
return {
|
|
105
|
-
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
106
|
-
};
|
|
63
|
+
if (!tool.inputSchema) {
|
|
64
|
+
throw new ServerInitError('tool-validation', null, `Tool '${tool.name}' missing required 'inputSchema'`);
|
|
107
65
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
66
|
+
if (!tool.description || typeof tool.description !== 'string') {
|
|
67
|
+
throw new ServerInitError('tool-validation', null, `Tool '${tool.name}' missing required 'description'`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
async function main() {
|
|
72
|
+
// Step 1: Validate tool configuration
|
|
73
|
+
console.error('[init] Validating tool configuration...');
|
|
74
|
+
try {
|
|
75
|
+
validateTools();
|
|
76
|
+
console.error(`[init] Validated ${tools.length} tools successfully`);
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
if (error instanceof ServerInitError) {
|
|
80
|
+
throw error;
|
|
81
|
+
}
|
|
82
|
+
throw new ServerInitError('tool-validation', error, 'Failed to validate tool configuration');
|
|
83
|
+
}
|
|
84
|
+
// Step 2: Create MCP server instance
|
|
85
|
+
console.error('[init] Creating MCP server instance...');
|
|
86
|
+
let server;
|
|
87
|
+
try {
|
|
88
|
+
server = new Server({
|
|
89
|
+
name: 'observability-toolkit',
|
|
90
|
+
version: packageVersion,
|
|
91
|
+
}, {
|
|
92
|
+
capabilities: {
|
|
93
|
+
tools: {},
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
throw new ServerInitError('server-creation', error, 'Failed to create MCP server instance. Check @modelcontextprotocol/sdk installation.');
|
|
99
|
+
}
|
|
100
|
+
// Step 3: Register request handlers
|
|
101
|
+
console.error('[init] Registering request handlers...');
|
|
102
|
+
try {
|
|
103
|
+
// List available tools
|
|
104
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
112
105
|
return {
|
|
113
|
-
|
|
114
|
-
|
|
106
|
+
tools: tools.map(tool => ({
|
|
107
|
+
name: tool.name,
|
|
108
|
+
description: tool.description,
|
|
109
|
+
inputSchema: convertZodToJsonSchema(tool.inputSchema),
|
|
110
|
+
})),
|
|
115
111
|
};
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
112
|
+
});
|
|
113
|
+
// Handle tool calls
|
|
114
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
115
|
+
const { name, arguments: args } = request.params;
|
|
116
|
+
// Rate limiting check
|
|
117
|
+
if (!rateLimiter.isAllowed()) {
|
|
118
|
+
return {
|
|
119
|
+
content: [{ type: 'text', text: `Rate limit exceeded. Please wait before making more requests. Remaining: ${rateLimiter.getRemainingRequests()}` }],
|
|
120
|
+
isError: true,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
const tool = tools.find(t => t.name === name);
|
|
124
|
+
if (!tool) {
|
|
125
|
+
return {
|
|
126
|
+
content: [{ type: 'text', text: `Unknown tool: ${name}` }],
|
|
127
|
+
isError: true,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
try {
|
|
131
|
+
// Parse and validate input
|
|
132
|
+
const input = tool.inputSchema.parse(args || {});
|
|
133
|
+
// Execute handler - use type assertion since we've validated input
|
|
134
|
+
const result = await tool.handler(input);
|
|
135
|
+
return {
|
|
136
|
+
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
catch (error) {
|
|
140
|
+
// Security: sanitize error messages to prevent information disclosure
|
|
141
|
+
// - Removes absolute file paths
|
|
142
|
+
// - Removes stack traces in production
|
|
143
|
+
// - Returns generic messages for internal errors
|
|
144
|
+
const errorText = sanitizeErrorForResponse(error);
|
|
145
|
+
return {
|
|
146
|
+
content: [{ type: 'text', text: errorText }],
|
|
147
|
+
isError: true,
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
catch (error) {
|
|
153
|
+
throw new ServerInitError('handler-registration', error, 'Failed to register request handlers');
|
|
154
|
+
}
|
|
155
|
+
// Step 4: Create and connect transport
|
|
156
|
+
console.error('[init] Connecting stdio transport...');
|
|
157
|
+
try {
|
|
158
|
+
const transport = new StdioServerTransport();
|
|
159
|
+
await server.connect(transport);
|
|
160
|
+
}
|
|
161
|
+
catch (error) {
|
|
162
|
+
throw new ServerInitError('transport-connection', error, 'Failed to connect stdio transport. Ensure stdin/stdout are available.');
|
|
163
|
+
}
|
|
164
|
+
// Log startup success to stderr (stdout is for MCP protocol)
|
|
165
|
+
console.error('[init] Observability Toolkit MCP server started successfully');
|
|
166
|
+
console.error(`[init] Available tools: ${tools.map(t => t.name).join(', ')}`);
|
|
123
167
|
}
|
|
124
168
|
main().catch((error) => {
|
|
125
|
-
|
|
169
|
+
if (error instanceof ServerInitError) {
|
|
170
|
+
console.error(`[FATAL] Server initialization failed at step '${error.step}'`);
|
|
171
|
+
console.error(`[FATAL] Error: ${error.message}`);
|
|
172
|
+
if (error.cause) {
|
|
173
|
+
console.error(`[FATAL] Cause: ${error.cause instanceof Error ? error.cause.message : String(error.cause)}`);
|
|
174
|
+
}
|
|
175
|
+
console.error('[FATAL] Please check:');
|
|
176
|
+
switch (error.step) {
|
|
177
|
+
case 'tool-validation':
|
|
178
|
+
console.error(' - All tool modules are properly imported');
|
|
179
|
+
console.error(' - Each tool has name, description, inputSchema, and handler');
|
|
180
|
+
break;
|
|
181
|
+
case 'server-creation':
|
|
182
|
+
console.error(' - @modelcontextprotocol/sdk is installed correctly');
|
|
183
|
+
console.error(' - Run: npm install @modelcontextprotocol/sdk');
|
|
184
|
+
break;
|
|
185
|
+
case 'handler-registration':
|
|
186
|
+
console.error(' - Request schema imports are correct');
|
|
187
|
+
console.error(' - zod-to-json-schema is installed');
|
|
188
|
+
break;
|
|
189
|
+
case 'transport-connection':
|
|
190
|
+
console.error(' - Server is being run with proper stdin/stdout');
|
|
191
|
+
console.error(' - Not running in a detached process');
|
|
192
|
+
break;
|
|
193
|
+
default:
|
|
194
|
+
console.error(' - Check the error message above for details');
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
console.error('[FATAL] Unexpected error during server startup:', error);
|
|
199
|
+
}
|
|
126
200
|
process.exit(1);
|
|
127
201
|
});
|
|
128
202
|
//# sourceMappingURL=server.js.map
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AACA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AACA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EACL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