@codai/axiom-mcp 1.0.10 → 1.0.12
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 +25 -9
- package/package.json +2 -2
package/dist/mcp-stdio.js
CHANGED
|
@@ -10,6 +10,22 @@ import { check } from "@codai/axiom-engine/dist/check.js";
|
|
|
10
10
|
import { reverseIR } from "@codai/axiom-engine/dist/reverse-ir.js";
|
|
11
11
|
import { diff } from "@codai/axiom-engine/dist/axpatch.js";
|
|
12
12
|
import { apply } from "@codai/axiom-engine/dist/apply.js";
|
|
13
|
+
import { readFileSync } from "node:fs";
|
|
14
|
+
import { fileURLToPath } from "node:url";
|
|
15
|
+
import { dirname, join } from "node:path";
|
|
16
|
+
// Read version from package.json
|
|
17
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
18
|
+
const __dirname = dirname(__filename);
|
|
19
|
+
const packageJson = JSON.parse(readFileSync(join(__dirname, "../package.json"), "utf-8"));
|
|
20
|
+
const MCP_VERSION = packageJson.version;
|
|
21
|
+
// Helper to add version metadata to all responses
|
|
22
|
+
function addVersionMetadata(result) {
|
|
23
|
+
return {
|
|
24
|
+
...result,
|
|
25
|
+
_axiom_mcp_version: MCP_VERSION,
|
|
26
|
+
_axiom_engine_version: packageJson.dependencies?.["@codai/axiom-engine"] || "unknown"
|
|
27
|
+
};
|
|
28
|
+
}
|
|
13
29
|
const server = new Server({
|
|
14
30
|
name: "axiom-mcp",
|
|
15
31
|
version: "1.0.2",
|
|
@@ -167,7 +183,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
167
183
|
content: [
|
|
168
184
|
{
|
|
169
185
|
type: "text",
|
|
170
|
-
text: JSON.stringify({ ir, diagnostics }, null, 2),
|
|
186
|
+
text: JSON.stringify(addVersionMetadata({ ir, diagnostics }), null, 2),
|
|
171
187
|
},
|
|
172
188
|
],
|
|
173
189
|
};
|
|
@@ -180,7 +196,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
180
196
|
content: [
|
|
181
197
|
{
|
|
182
198
|
type: "text",
|
|
183
|
-
text: JSON.stringify({ ok: false, diagnostics: parse.error.issues }, null, 2),
|
|
199
|
+
text: JSON.stringify(addVersionMetadata({ ok: false, diagnostics: parse.error.issues }), null, 2),
|
|
184
200
|
},
|
|
185
201
|
],
|
|
186
202
|
};
|
|
@@ -190,7 +206,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
190
206
|
content: [
|
|
191
207
|
{
|
|
192
208
|
type: "text",
|
|
193
|
-
text: JSON.stringify(result, null, 2),
|
|
209
|
+
text: JSON.stringify(addVersionMetadata(result), null, 2),
|
|
194
210
|
},
|
|
195
211
|
],
|
|
196
212
|
};
|
|
@@ -217,7 +233,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
217
233
|
content: [
|
|
218
234
|
{
|
|
219
235
|
type: "text",
|
|
220
|
-
text: JSON.stringify({ artifacts, manifest }, null, 2),
|
|
236
|
+
text: JSON.stringify(addVersionMetadata({ artifacts, manifest }), null, 2),
|
|
221
237
|
},
|
|
222
238
|
],
|
|
223
239
|
};
|
|
@@ -230,7 +246,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
230
246
|
content: [
|
|
231
247
|
{
|
|
232
248
|
type: "text",
|
|
233
|
-
text: JSON.stringify(result, null, 2),
|
|
249
|
+
text: JSON.stringify(addVersionMetadata(result), null, 2),
|
|
234
250
|
},
|
|
235
251
|
],
|
|
236
252
|
};
|
|
@@ -245,7 +261,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
245
261
|
content: [
|
|
246
262
|
{
|
|
247
263
|
type: "text",
|
|
248
|
-
text: JSON.stringify({ ir, diagnostics: [] }, null, 2),
|
|
264
|
+
text: JSON.stringify(addVersionMetadata({ ir, diagnostics: [] }), null, 2),
|
|
249
265
|
},
|
|
250
266
|
],
|
|
251
267
|
};
|
|
@@ -269,12 +285,12 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
269
285
|
isError: true,
|
|
270
286
|
};
|
|
271
287
|
}
|
|
272
|
-
const patch = diff(oldParse.data, newParse.data);
|
|
288
|
+
const patch = await diff(oldParse.data, newParse.data);
|
|
273
289
|
return {
|
|
274
290
|
content: [
|
|
275
291
|
{
|
|
276
292
|
type: "text",
|
|
277
|
-
text: JSON.stringify({ patch }, null, 2),
|
|
293
|
+
text: JSON.stringify(addVersionMetadata({ patch }), null, 2),
|
|
278
294
|
},
|
|
279
295
|
],
|
|
280
296
|
};
|
|
@@ -292,7 +308,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
292
308
|
content: [
|
|
293
309
|
{
|
|
294
310
|
type: "text",
|
|
295
|
-
text: JSON.stringify(result, null, 2),
|
|
311
|
+
text: JSON.stringify(addVersionMetadata(result), null, 2),
|
|
296
312
|
},
|
|
297
313
|
],
|
|
298
314
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codai/axiom-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"axiom-mcp": "dist/server.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@codai/axiom-emitter-batchjob": "^1.0.1",
|
|
26
26
|
"@codai/axiom-emitter-docker": "^1.0.1",
|
|
27
27
|
"@codai/axiom-emitter-webapp": "^1.0.1",
|
|
28
|
-
"@codai/axiom-engine": "^1.0.
|
|
28
|
+
"@codai/axiom-engine": "^1.0.4",
|
|
29
29
|
"@codai/axiom-policies": "^1.0.1",
|
|
30
30
|
"@modelcontextprotocol/sdk": "^1.20.1"
|
|
31
31
|
},
|