A 1.2 MB pure-Rust rewrite of headless Blender built for AI agents — 3D B-rep modeling engine, CLI, and MCP server
fix(docs,npm): ship docs/ in npm tarball for llms.txt links and fix recipe count (Fixes #102, #103) (#110)
Nebulad46a1c67ac0f
diff --git a/docs/README.md b/docs/README.mdindex 03dd805..a414074 100644--- a/docs/README.md+++ b/docs/README.md@@ -53,7 +53,7 @@ flowchart LRThese root files are packaged inside the `forma-3d` npm tarball and tuned for coding agents:-- [`SKILL.md`](../SKILL.md): Drop-in agent skill with four smoke-tested `Forma-Pipe` recipes.+- [`SKILL.md`](../SKILL.md): Drop-in agent skill with five smoke-tested `Forma-Pipe` recipes.- [`AGENTS.md`](../AGENTS.md): Compact agent workflow rules and CLI/MCP invocation guide.- [`llms.txt`](../llms.txt): Self-contained machine-readable language cheat sheet and repository index.- [`grammar/forma_pipe.gbnf`](../grammar/forma_pipe.gbnf): Formal GBNF grammar for constrained local-LLM decoding.diff --git a/package.json b/package.jsonindex 94f80da..b63fe28 100644--- a/package.json+++ b/package.json@@ -44,6 +44,7 @@"files": ["bin/","lib/",+ "docs/","wasm/forma.wasm","grammar/forma_pipe.gbnf","SKILL.md",diff --git a/tests/npm_smoke.mjs b/tests/npm_smoke.mjsindex a66341f..7d131ae 100644--- a/tests/npm_smoke.mjs+++ b/tests/npm_smoke.mjs@@ -176,10 +176,20 @@ section(flange, 0.0)assert.equal(badFlagCode, 2, "unknown flag must exit with code 2");console.log("PASS 3/5: CLI bin/forma.mjs (eval --strict, --unit mm, exit codes, .glb/.png/.svg)");- // 3. Test every recipe inside SKILL.md via npm WASM CLI+ // 3. Test every recipe inside SKILL.md via npm WASM CLI + verify packaged docs/llms.txt links (#102, #103)const skillMd = readFileSync(join(ROOT, "SKILL.md"), "utf-8");const recipes = [...skillMd.matchAll(/```forma\n([\s\S]*?)\n```/g)].map((m) => m[1]);- assert.ok(recipes.length >= 4, "SKILL.md has >=4 recipes");+ assert.equal(recipes.length, 5, "SKILL.md has 5 recipes");+ const docsReadme = readFileSync(join(ROOT, "docs", "README.md"), "utf-8");+ assert.ok(docsReadme.includes("five smoke-tested `Forma-Pipe` recipes"), "docs/README.md recipe count matches SKILL.md");+ const pkgJson = JSON.parse(readFileSync(join(ROOT, "package.json"), "utf-8"));+ assert.ok(pkgJson.files.includes("docs/"), "package.json files must include docs/ so llms.txt links resolve");+ const llmsTxt = readFileSync(join(ROOT, "llms.txt"), "utf-8");+ const docsLinks = [...llmsTxt.matchAll(/\]\((docs\/[^)]+)\)/g)].map((m) => m[1]);+ assert.ok(docsLinks.length >= 6, "llms.txt links docs/ pages");+ for (const rel of docsLinks) {+ assert.ok(statSync(join(ROOT, rel)).isFile(), `llms.txt link target missing: ${rel}`);+ }for (let i = 0; i < recipes.length; i++) {const out = execFileSync(process.execPath, [cli, "eval", "--strict"], {input: recipes[i],