create-byan-agent 2.9.6 → 2.9.7

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/CHANGELOG.md CHANGED
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ---
9
9
 
10
+ ## [2.9.7] - 2026-04-21
11
+
12
+ ### Fixed - MCP server empty-directory install bug
13
+
14
+ - **`copyMcpServer` now asserts `server.js` exists after copy** — previously, a partial copy could leave `_byan/mcp/byan-mcp-server/` empty, causing Claude Code to fail with `Cannot find module '.../server.js'` on the next launch. The post-copy check now throws a clear error instead of silently succeeding.
15
+ - **`create-byan-agent-v2.js` surfaces Claude native-setup failures in red** — prior behavior showed a yellow "partial" warning that users missed; now the failure is explicit and points at the MCP directory to inspect.
16
+ - **Regression test** added in `claude-native-setup.test.js` that mocks `fs.copy` to a no-op and verifies the post-copy assertion throws.
17
+ - **Observed on**: byan_web install with 2.9.6, dossier `_byan/mcp/byan-mcp-server/` vide, MCP failed in Claude Code.
18
+
19
+ ---
20
+
10
21
  ## [2.7.0] - 2026-02-21
11
22
 
12
23
  ### Added - Soul System + Tao System
@@ -1349,7 +1349,12 @@ async function install() {
1349
1349
  try {
1350
1350
  await setupClaudeNative(projectRoot);
1351
1351
  } catch (error) {
1352
- console.log(chalk.yellow(` Claude native setup partial: ${error.message}`));
1352
+ console.log(chalk.red(` Claude native setup failed: ${error.message}`));
1353
+ console.log(
1354
+ chalk.yellow(
1355
+ ` → MCP, hooks or skills may be incomplete. Inspect _byan/mcp/byan-mcp-server/ and re-run if empty.`
1356
+ )
1357
+ );
1353
1358
  }
1354
1359
  }
1355
1360
 
@@ -56,6 +56,15 @@ async function copyMcpServer(projectRoot) {
56
56
  if (!(await fs.pathExists(src))) return { copied: false };
57
57
  await fs.ensureDir(dst);
58
58
  await fs.copy(src, dst, { overwrite: true, filter: (s) => !s.includes('node_modules') });
59
+ // Post-copy sanity check: server.js must exist, otherwise the MCP client will
60
+ // fail on next Claude Code launch with "Cannot find module" (seen on 2.9.6).
61
+ const serverFile = path.join(dst, 'server.js');
62
+ if (!(await fs.pathExists(serverFile))) {
63
+ throw new Error(
64
+ `MCP server copy produced no server.js at ${serverFile}. ` +
65
+ `Template source: ${src}. Re-run install or copy manually.`
66
+ );
67
+ }
59
68
  return { copied: true, path: dst };
60
69
  }
61
70
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-byan-agent",
3
- "version": "2.9.6",
3
+ "version": "2.9.7",
4
4
  "description": "BYAN v2.8 - Intelligent AI agent creator with ELO trust system + scientific fact-check + Hermes universal dispatcher + native Claude Code integration (hooks, skills, MCP server). Multi-platform (Copilot CLI, Claude Code, Codex). Merise Agile + TDD + 64 Mantras. ~54% LLM cost savings.",
5
5
  "main": "src/index.js",
6
6
  "bin": {