@codai/axiom-mcp 1.0.12 → 1.0.14
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/mcp-stdio.js +18 -5
- package/package.json +1 -1
- package/scripts/prepublish.js +25 -25
package/dist/mcp-stdio.js
CHANGED
|
@@ -28,7 +28,7 @@ function addVersionMetadata(result) {
|
|
|
28
28
|
}
|
|
29
29
|
const server = new Server({
|
|
30
30
|
name: "axiom-mcp",
|
|
31
|
-
version:
|
|
31
|
+
version: MCP_VERSION, // Use dynamic version from package.json
|
|
32
32
|
}, {
|
|
33
33
|
capabilities: {
|
|
34
34
|
tools: {},
|
|
@@ -338,11 +338,24 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
338
338
|
}
|
|
339
339
|
});
|
|
340
340
|
async function main() {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
341
|
+
console.error("[AXIOM MCP] Starting server initialization...");
|
|
342
|
+
try {
|
|
343
|
+
const transport = new StdioServerTransport();
|
|
344
|
+
console.error("[AXIOM MCP] Transport created, connecting...");
|
|
345
|
+
await server.connect(transport);
|
|
346
|
+
console.error("[AXIOM MCP] Server connected successfully");
|
|
347
|
+
console.error(`[AXIOM MCP] Version ${MCP_VERSION}, Engine ${packageJson.dependencies?.["@codai/axiom-engine"]}`);
|
|
348
|
+
console.error("[AXIOM MCP] Ready to receive requests via stdio");
|
|
349
|
+
// Keep process alive - MCP SDK handles stdin/stdout
|
|
350
|
+
// No explicit exit - let MCP SDK manage lifecycle
|
|
351
|
+
}
|
|
352
|
+
catch (error) {
|
|
353
|
+
console.error("[AXIOM MCP] FATAL - Initialization failed:", error.message || String(error));
|
|
354
|
+
console.error("[AXIOM MCP] Stack trace:", error.stack);
|
|
355
|
+
process.exit(1);
|
|
356
|
+
}
|
|
344
357
|
}
|
|
345
358
|
main().catch((error) => {
|
|
346
|
-
console.error("
|
|
359
|
+
console.error("[AXIOM MCP] FATAL - Uncaught error in main():", error);
|
|
347
360
|
process.exit(1);
|
|
348
361
|
});
|
package/package.json
CHANGED
package/scripts/prepublish.js
CHANGED
|
@@ -13,40 +13,40 @@ import { fileURLToPath } from 'url';
|
|
|
13
13
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
14
14
|
|
|
15
15
|
const INTERNAL_PACKAGES = [
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
'axiom-core',
|
|
17
|
+
'axiom-engine',
|
|
18
|
+
'axiom-policies',
|
|
19
|
+
'axiom-emitter-apiservice',
|
|
20
|
+
'axiom-emitter-batchjob',
|
|
21
|
+
'axiom-emitter-docker',
|
|
22
|
+
'axiom-emitter-webapp'
|
|
23
23
|
];
|
|
24
24
|
|
|
25
25
|
function copyDir(src, dest) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
mkdirSync(dest, { recursive: true });
|
|
27
|
+
|
|
28
|
+
for (const file of readdirSync(src)) {
|
|
29
|
+
const srcPath = join(src, file);
|
|
30
|
+
const destPath = join(dest, file);
|
|
31
|
+
|
|
32
|
+
if (statSync(srcPath).isDirectory()) {
|
|
33
|
+
copyDir(srcPath, destPath);
|
|
34
|
+
} else if (file.endsWith('.js') || file.endsWith('.d.ts')) {
|
|
35
|
+
copyFileSync(srcPath, destPath);
|
|
36
|
+
console.log(` ✓ ${file}`);
|
|
37
|
+
}
|
|
37
38
|
}
|
|
38
|
-
}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
console.log('📦 Bundling internal dependencies...\n');
|
|
42
42
|
|
|
43
43
|
for (const pkg of INTERNAL_PACKAGES) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
const srcDir = join(__dirname, '..', '..', pkg, 'dist');
|
|
45
|
+
const destDir = join(__dirname, '..', 'dist', 'vendor', pkg);
|
|
46
|
+
|
|
47
|
+
console.log(`Bundling @codai/${pkg}:`);
|
|
48
|
+
copyDir(srcDir, destDir);
|
|
49
|
+
console.log('');
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
console.log('✅ Bundle complete! Package is self-contained.\n');
|