@codai/axiom-mcp 1.0.15 → 1.0.17

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.
Files changed (2) hide show
  1. package/README.md +36 -4
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -189,6 +189,18 @@ Apply manifest to filesystem or create Pull Request.
189
189
  branchName?: string,
190
190
  commitMessage?: string
191
191
  }
192
+
193
+ // Manifest artifact structure (enhanced v1.0.17):
194
+ interface Artifact {
195
+ path: string; // POSIX relative path
196
+ kind: "file" | "report";
197
+ sha256: string; // Content hash for validation
198
+ bytes: number;
199
+
200
+ // ✨ NEW in 1.0.17: Optional embedded content (store-less operation)
201
+ contentUtf8?: string; // UTF-8 text content (for README, configs)
202
+ contentBase64?: string; // Base64 binary content (for images, compiled assets)
203
+ }
192
204
  ```
193
205
 
194
206
  **Output**:
@@ -200,10 +212,30 @@ Apply manifest to filesystem or create Pull Request.
200
212
  ```
201
213
 
202
214
  **Features**:
203
- - ✅ **Auto-creates `./out/`**: No manual directory setup
204
- - ✅ **POSIX paths**: `filesWritten[]` use `/` on all platforms
205
- - **Security**: Blocks path traversal (`..`) and absolute paths
206
- - **SHA256 validation**: Verifies file integrity after write
215
+ - ✅ **Versioned Artifact Cache**: `.axiom/cache/v1/<sha256>` (future-proof structure)
216
+ - ✅ **3-Tier Content Fallback** (NEW in 1.0.17):
217
+ 1. `artifact.contentUtf8` Buffer.from(utf-8) - **Fastest, no store lookup**
218
+ 2. `artifact.contentBase64` Buffer.from(base64) - **Embedded binary content**
219
+ 3. `artifactStore.get(sha256)` → Cached content - **Fallback for large files**
220
+ 4. Throws `ERR_ARTIFACT_CONTENT_MISSING` if all sources unavailable
221
+ - ✅ **Real Filesystem Writes**: Physical `fs/promises.writeFile()` to `out/` directory
222
+ - ✅ **SHA256 Validation**: Verifies file integrity after write (throws `ERR_SHA256_MISMATCH`)
223
+ - ✅ **Auto-creates `./out/`**: No manual directory setup required
224
+ - ✅ **POSIX Paths**: `filesWritten[]` use `/` on all platforms (guaranteed no backslash)
225
+ - ✅ **Security**: Comprehensive protection:
226
+ - Blocks absolute paths (`/etc/passwd`)
227
+ - Blocks path traversal (`../../../sensitive`)
228
+ - Blocks mid-path traversal (`safe/../evil/hack.txt`)
229
+ - Validates all paths stay within `out/` directory
230
+ - ✅ **Error Handling**: Clear errors with diagnostic context
231
+
232
+ **Workflow Integration**:
233
+ 1. **Generate**: Creates manifest + optionally embeds small content OR caches by SHA256 in `.axiom/cache/v1/`
234
+ 2. **Apply**:
235
+ - Tries embedded content first (fast path for README, configs)
236
+ - Falls back to cache lookup for large artifacts
237
+ - Writes real files to `out/` with SHA256 validation
238
+ 3. **Deterministic**: Identical IR → identical SHA256 → identical files (verified post-write)
207
239
 
208
240
  ---
209
241
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codai/axiom-mcp",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
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.4",
28
+ "@codai/axiom-engine": "^1.0.17",
29
29
  "@codai/axiom-policies": "^1.0.1",
30
30
  "@modelcontextprotocol/sdk": "^1.20.1"
31
31
  },