fix: regenerate pi-claude-cli MCP config per session and auto-sync skill tools

The MCP config was generated lazily once and locked, so engine session-scoped
tools (fn_review_spec, fn_review_step) never reached the Claude CLI subprocess
and triage/executor sessions failed with "unknown tool" errors. Now the config
is hashed per call and rewritten when the tool set changes.

Also adds scripts/sync-fusion-skill-tools.mjs to regenerate the SKILL.md
tool-categories block from extension.ts at build time, with a --check mode
wired into skill-sync tests so drift fails CI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-04-25 14:10:56 -07:00
parent c597dd4055
commit e8aab69c67
8 changed files with 231 additions and 26 deletions

View File

@@ -18,6 +18,8 @@
"dev:ui": "pnpm --filter @fusion/dashboard dev",
"dev:hmr": "node scripts/dev-hmr.mjs",
"lint": "eslint .",
"sync:fusion-skill": "node scripts/sync-fusion-skill-tools.mjs",
"sync:fusion-skill:check": "node scripts/sync-fusion-skill-tools.mjs --check",
"build": "pnpm -r build",
"verify:workspace": "pnpm lint && pnpm test && pnpm build",
"build:exe": "pnpm build && pnpm --filter @runfusion/fusion build:exe",