Skip to content

Commit 8c62e48

Browse files
feat(cartridge): scaffolder for boj-server cartridge skeletons (standards#89 Phase 2b) (#24)
Adds `iseriser cartridge --manifest <toml> --output <dir>` which emits a complete boj-server cartridge skeleton at `<output>/<iser>-mcp/`: <iser>-mcp/ ├── README.adoc cartridge overview + build ├── cartridge.json registration manifest ├── mod.js JS-worker fallback path ├── panels/manifest.json observability panel registration ├── abi/ │ ├── README.adoc │ ├── <iser>-mcp.ipkg Idris2 package │ └── <Iser>Mcp/Safe<Iser>.idr exposure-gate contract + tools ├── ffi/ │ ├── README.adoc │ ├── build.zig shared-shim wiring │ └── <iser>_ffi.zig ADR-0006 5-symbol C-ABI └── adapter/ ├── README.adoc ├── build.zig └── <iser>_adapter.zig unified gated adapter (4-protocol) The cartridge is meant to be placed inside `boj-server/cartridges/`; the emitted Zig build files reference the shared invoke-shim at `boj-server/ffi/zig/src/cartridge_shim.zig` via `../../../`. Modelled on the k9iser-mcp pilot (boj-server#73). Skeleton-only: the exposure/transaction gate, the 5-symbol ABI plumbing, and the unified 4-protocol adapter are all production-ready; per-tool dispatch bodies are stubs ready for replacement. Verified end-to-end against the actual boj-server tree: - `zig build test` on emitted ffi/ → 4/4 tests pass - `zig build test` on emitted adapter/ → 5/5 tests pass - `idris2 --build` on emitted .ipkg → SafeChapeliser type-checks (RC=0) - `cargo test`: 57 unit + 9 integration green (8 new tests added) - `zig fmt --check` on all emitted .zig files: clean - `cartridge.json` + `panels/manifest.json` parse as valid JSON Two pilot-vs-scaffold deltas worth noting: - The pilot `.ipkg` ships `depends = base, contrib` which is invalid in Idris2 0.8.0 (parser stops at the comma). The scaffold emits `depends = base` to compile cleanly; `contrib` can be added on a separate `depends` line when actually needed. - The pilot's per-tool bodies (k9_load_manifest, k9_generate, ...) are k9iser-specific. The scaffold emits one example tool (`<iser>_generate`) plus a status panel; expand as the cartridge grows. Refs hyperpolymath/standards#89, #90 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c2d0664 commit 8c62e48

3 files changed

Lines changed: 1370 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)