@codai/axiom-mcp 1.0.23 → 2.0.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/LICENSE +22 -0
- package/README.md +124 -423
- package/dist/axm-lazy-WdJHPy6W.js +2 -0
- package/dist/axm-lazy.js +12776 -0
- package/dist/cli-main.js +26407 -0
- package/dist/cli.js +19 -0
- package/dist/gate-lazy.js +8979 -0
- package/dist/index.d.ts +133 -0
- package/dist/index.js +904 -0
- package/package.json +72 -36
- package/spec/biome.json +6 -0
- package/spec/codai-tools.json +283 -0
- package/spec/tools.json +1966 -0
- package/dist/mcp-stdio.js +0 -368
- package/dist/postinstall.js +0 -31
- package/dist/server.js +0 -115
- package/dist/tools/fs-probe-write.js +0 -81
- package/scripts/prepublish.js +0 -52
package/package.json
CHANGED
|
@@ -1,37 +1,73 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@codai/axiom-mcp",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
},
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@codai/axiom-mcp",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "AXIOM v2 MCP server (stdio) and CLI: validate, compile, check and transactionally apply content-addressed manifest bundles inside an allowlisted set of roots",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Dragos Catalin Vladulescu",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/dragoscv/axiom.git",
|
|
10
|
+
"directory": "packages/mcp"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/dragoscv/axiom#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/dragoscv/axiom/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"axiom",
|
|
18
|
+
"mcp",
|
|
19
|
+
"model-context-protocol",
|
|
20
|
+
"agent",
|
|
21
|
+
"cli",
|
|
22
|
+
"hook"
|
|
23
|
+
],
|
|
24
|
+
"type": "module",
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=22.14"
|
|
27
|
+
},
|
|
28
|
+
"bin": {
|
|
29
|
+
"axiom": "./dist/cli.js",
|
|
30
|
+
"axiom-mcp": "./dist/cli.js"
|
|
31
|
+
},
|
|
32
|
+
"main": "./dist/index.js",
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"exports": {
|
|
35
|
+
".": {
|
|
36
|
+
"types": "./dist/index.d.ts",
|
|
37
|
+
"import": "./dist/index.js"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"files": [
|
|
41
|
+
"dist",
|
|
42
|
+
"!dist/**/*.map",
|
|
43
|
+
"spec",
|
|
44
|
+
"README.md"
|
|
45
|
+
],
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@codai/axiom-apply": "2.0.0",
|
|
48
|
+
"@codai/axiom-axm": "2.0.0",
|
|
49
|
+
"@codai/axiom-canon": "2.0.0",
|
|
50
|
+
"@codai/axiom-checks": "2.0.0",
|
|
51
|
+
"@codai/axiom-plan": "2.0.0",
|
|
52
|
+
"@codai/axiom-schema": "2.0.0",
|
|
53
|
+
"@modelcontextprotocol/sdk": "1.30.0",
|
|
54
|
+
"zod": "4.6.5"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"tsdown": "0.23.0",
|
|
58
|
+
"tsx": "4.23.13",
|
|
59
|
+
"typescript": "7.0.2",
|
|
60
|
+
"vitest": "5.0.1"
|
|
61
|
+
},
|
|
62
|
+
"publishConfig": {
|
|
63
|
+
"access": "public",
|
|
64
|
+
"provenance": true
|
|
65
|
+
},
|
|
66
|
+
"scripts": {
|
|
67
|
+
"build": "tsdown && pnpm run build:spec",
|
|
68
|
+
"build:spec": "node --import tsx/esm scripts/gen-tools-json.ts",
|
|
69
|
+
"dev": "tsdown --watch",
|
|
70
|
+
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
71
|
+
"test": "vitest run"
|
|
72
|
+
}
|
|
37
73
|
}
|
package/spec/biome.json
ADDED
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "2.0.0",
|
|
3
|
+
"description": "AXIOM MCP tools in the shape of codai packages/agent-core/spec/tools-v2.json entries. GENERATED from packages/mcp/src/tools.ts by `pnpm --filter @codai/axiom-mcp build:spec` — do not edit. `risk` is derived from the MCP annotations (readOnlyHint → READ, destructiveHint → SENSITIVE, else ACT). Serve via `npx @codai/axiom-mcp mcp --root <dir>`; see docs/integration/codai.md.",
|
|
4
|
+
"tools": [
|
|
5
|
+
{
|
|
6
|
+
"name": "axiom_plan_validate",
|
|
7
|
+
"risk": "READ",
|
|
8
|
+
"description": "Validate a Plan against PlanSchema and, when all sources are inline, compute its planDigest. Read-only; touches no files.",
|
|
9
|
+
"parameters": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"plan": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"propertyNames": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"additionalProperties": {},
|
|
18
|
+
"description": "Plan document (apiVersion axiom.dev/v2, kind Plan)"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"required": [
|
|
22
|
+
"plan"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "axiom_plan_compile",
|
|
28
|
+
"risk": "ACT",
|
|
29
|
+
"description": "Compile a Plan into a content-addressed ManifestBundle (sorted artifacts, sha256 digests, in-toto planDigest). `store: cas` writes blobs under <root>/.axiom/cas instead of inlining them. When a root is given the bundle is stored under <root>/.axiom/manifests/<hex>.json so later tools can reference it by digest.",
|
|
30
|
+
"parameters": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"properties": {
|
|
33
|
+
"plan": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"propertyNames": {
|
|
36
|
+
"type": "string"
|
|
37
|
+
},
|
|
38
|
+
"additionalProperties": {},
|
|
39
|
+
"description": "Plan document"
|
|
40
|
+
},
|
|
41
|
+
"store": {
|
|
42
|
+
"description": "Blob transport; default inline",
|
|
43
|
+
"type": "string",
|
|
44
|
+
"enum": [
|
|
45
|
+
"inline",
|
|
46
|
+
"cas"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"root": {
|
|
50
|
+
"description": "Absolute repository root; must equal or lie inside an allowlisted --root",
|
|
51
|
+
"type": "string"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"required": [
|
|
55
|
+
"plan"
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "axiom_manifest_verify",
|
|
61
|
+
"risk": "READ",
|
|
62
|
+
"description": "Structural and content-address verification: schema, recomputed manifestDigest, every inline blob hashes to its key, attestation subject matches. Never writes.",
|
|
63
|
+
"parameters": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"properties": {
|
|
66
|
+
"bundle": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"propertyNames": {
|
|
69
|
+
"type": "string"
|
|
70
|
+
},
|
|
71
|
+
"additionalProperties": {},
|
|
72
|
+
"description": "ManifestBundle"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"required": [
|
|
76
|
+
"bundle"
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "axiom_check",
|
|
82
|
+
"risk": "READ",
|
|
83
|
+
"description": "Evaluate the profile's predicates (plus the manifest's own checks) against the bundle. Repo facts are read from the root when one is available and the profile allows it. Verdict `error` means a provider could not run — never a silent pass.",
|
|
84
|
+
"parameters": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"properties": {
|
|
87
|
+
"bundle": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"propertyNames": {
|
|
90
|
+
"type": "string"
|
|
91
|
+
},
|
|
92
|
+
"additionalProperties": {},
|
|
93
|
+
"description": "ManifestBundle"
|
|
94
|
+
},
|
|
95
|
+
"profile": {
|
|
96
|
+
"description": "Profile name (builtin default|strict|permissive, or <root>/.axiom/profiles/<name>.json)",
|
|
97
|
+
"type": "string"
|
|
98
|
+
},
|
|
99
|
+
"root": {
|
|
100
|
+
"description": "Absolute repository root; must equal or lie inside an allowlisted --root",
|
|
101
|
+
"type": "string"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"required": [
|
|
105
|
+
"bundle"
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"name": "axiom_apply_dry_run",
|
|
111
|
+
"risk": "READ",
|
|
112
|
+
"description": "Stage the bundle under <root>/.axiom/staging, run pre-apply checks and produce a unified diff against the current tree. Nothing outside .axiom/ is touched. Echo the returned manifestDigest as `confirmDigest` to axiom_apply.",
|
|
113
|
+
"parameters": {
|
|
114
|
+
"type": "object",
|
|
115
|
+
"properties": {
|
|
116
|
+
"bundle": {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"propertyNames": {
|
|
119
|
+
"type": "string"
|
|
120
|
+
},
|
|
121
|
+
"additionalProperties": {},
|
|
122
|
+
"description": "ManifestBundle"
|
|
123
|
+
},
|
|
124
|
+
"root": {
|
|
125
|
+
"description": "Absolute repository root; must equal or lie inside an allowlisted --root",
|
|
126
|
+
"type": "string"
|
|
127
|
+
},
|
|
128
|
+
"profile": {
|
|
129
|
+
"description": "Profile name (builtin default|strict|permissive, or <root>/.axiom/profiles/<name>.json)",
|
|
130
|
+
"type": "string"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"required": [
|
|
134
|
+
"bundle"
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "axiom_apply",
|
|
140
|
+
"risk": "SENSITIVE",
|
|
141
|
+
"description": "Transactionally write the bundle into the root: pre-image verification, staging, journal, atomic renames, scoped rollback on failure. Requires `confirmDigest === bundle.manifestDigest` (echo the digest you saw in dry-run). Idempotent: re-applying an applied digest is a no-op.",
|
|
142
|
+
"parameters": {
|
|
143
|
+
"type": "object",
|
|
144
|
+
"properties": {
|
|
145
|
+
"bundle": {
|
|
146
|
+
"type": "object",
|
|
147
|
+
"propertyNames": {
|
|
148
|
+
"type": "string"
|
|
149
|
+
},
|
|
150
|
+
"additionalProperties": {},
|
|
151
|
+
"description": "ManifestBundle"
|
|
152
|
+
},
|
|
153
|
+
"root": {
|
|
154
|
+
"description": "Absolute repository root; must equal or lie inside an allowlisted --root",
|
|
155
|
+
"type": "string"
|
|
156
|
+
},
|
|
157
|
+
"profile": {
|
|
158
|
+
"description": "Profile name (builtin default|strict|permissive, or <root>/.axiom/profiles/<name>.json)",
|
|
159
|
+
"type": "string"
|
|
160
|
+
},
|
|
161
|
+
"confirmDigest": {
|
|
162
|
+
"description": "Must equal bundle.manifestDigest",
|
|
163
|
+
"type": "string"
|
|
164
|
+
},
|
|
165
|
+
"mode": {
|
|
166
|
+
"description": "fs (default) writes files; pr additionally creates a git branch and commits exactly the touched paths (no push, no PR creation)",
|
|
167
|
+
"type": "string",
|
|
168
|
+
"enum": [
|
|
169
|
+
"fs",
|
|
170
|
+
"pr"
|
|
171
|
+
]
|
|
172
|
+
},
|
|
173
|
+
"branch": {
|
|
174
|
+
"description": "pr mode: branch name (default axiom/<name>/<digest12>)",
|
|
175
|
+
"type": "string"
|
|
176
|
+
},
|
|
177
|
+
"commitMessage": {
|
|
178
|
+
"description": "pr mode: commit message (passed to git on stdin)",
|
|
179
|
+
"type": "string"
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"required": [
|
|
183
|
+
"bundle"
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"name": "axiom_rollback",
|
|
189
|
+
"risk": "SENSITIVE",
|
|
190
|
+
"description": "Replay the journal of a committed/committing manifest in reverse: restore backups, remove created files, drop the applied marker.",
|
|
191
|
+
"parameters": {
|
|
192
|
+
"type": "object",
|
|
193
|
+
"properties": {
|
|
194
|
+
"root": {
|
|
195
|
+
"description": "Absolute repository root; must equal or lie inside an allowlisted --root",
|
|
196
|
+
"type": "string"
|
|
197
|
+
},
|
|
198
|
+
"manifestDigest": {
|
|
199
|
+
"type": "string",
|
|
200
|
+
"description": "`sha256:<hex>` (or bare hex) of the manifest to roll back"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"required": [
|
|
204
|
+
"manifestDigest"
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"name": "axiom_manifest_diff",
|
|
210
|
+
"risk": "READ",
|
|
211
|
+
"description": "Compare two manifests by artifact path and digest. Each side is a ManifestBundle or a `sha256:<hex>` reference to a bundle stored under an allowlisted root.",
|
|
212
|
+
"parameters": {
|
|
213
|
+
"type": "object",
|
|
214
|
+
"properties": {
|
|
215
|
+
"a": {
|
|
216
|
+
"anyOf": [
|
|
217
|
+
{
|
|
218
|
+
"type": "string",
|
|
219
|
+
"pattern": "^sha256:[a-f0-9]{64}$",
|
|
220
|
+
"description": "sha256:<64 lowercase hex>"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"type": "object",
|
|
224
|
+
"propertyNames": {
|
|
225
|
+
"type": "string"
|
|
226
|
+
},
|
|
227
|
+
"additionalProperties": {}
|
|
228
|
+
}
|
|
229
|
+
],
|
|
230
|
+
"description": "A ManifestBundle object, or `sha256:<hex>` of a bundle stored under <root>/.axiom/manifests"
|
|
231
|
+
},
|
|
232
|
+
"b": {
|
|
233
|
+
"anyOf": [
|
|
234
|
+
{
|
|
235
|
+
"type": "string",
|
|
236
|
+
"pattern": "^sha256:[a-f0-9]{64}$",
|
|
237
|
+
"description": "sha256:<64 lowercase hex>"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"type": "object",
|
|
241
|
+
"propertyNames": {
|
|
242
|
+
"type": "string"
|
|
243
|
+
},
|
|
244
|
+
"additionalProperties": {}
|
|
245
|
+
}
|
|
246
|
+
],
|
|
247
|
+
"description": "A ManifestBundle object, or `sha256:<hex>` of a bundle stored under <root>/.axiom/manifests"
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"required": [
|
|
251
|
+
"a",
|
|
252
|
+
"b"
|
|
253
|
+
]
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"name": "axiom_axm_parse",
|
|
258
|
+
"risk": "READ",
|
|
259
|
+
"description": "Parse .axm v2 text into a Plan with 1-based {line, column} diagnostics; `plan` is present only when error-free. Read-only.",
|
|
260
|
+
"parameters": {
|
|
261
|
+
"type": "object",
|
|
262
|
+
"properties": {
|
|
263
|
+
"source": {
|
|
264
|
+
"type": "string",
|
|
265
|
+
"description": ".axm source text"
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"required": [
|
|
269
|
+
"source"
|
|
270
|
+
]
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"name": "axiom_roots_list",
|
|
275
|
+
"risk": "READ",
|
|
276
|
+
"description": "The frozen set of roots this server may read and write, as given by --root at startup.",
|
|
277
|
+
"parameters": {
|
|
278
|
+
"type": "object",
|
|
279
|
+
"properties": {}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
]
|
|
283
|
+
}
|