@phi-code-admin/phi-code 0.84.0 → 0.84.1

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
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.84.1] - 2026-06-14
4
+
5
+ ### Fixed
6
+
7
+ - **`phi` failed to start with "Cannot find module 'zod'" after the bundled MCP
8
+ extension shipped.** The postinstall scaffolds a copy of the bundled extensions
9
+ under `~/.phi/agent/extensions/` and symlinks their runtime deps into that
10
+ folder's `node_modules`, but it only linked the sigma packages, not `zod` or
11
+ `@modelcontextprotocol/sdk` (both added with the mcp extension in 0.83.0). The
12
+ global copy of `mcp/` could therefore not resolve `zod`. The postinstall now
13
+ also links `zod` and `@modelcontextprotocol/sdk`. (typebox and phi-code*
14
+ resolve through the loader's module aliases, so they do not need linking.)
15
+
3
16
  ## [0.84.0] - 2026-06-14
4
17
 
5
18
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phi-code-admin/phi-code",
3
- "version": "0.84.0",
3
+ "version": "0.84.1",
4
4
  "description": "Coding agent CLI with persistent memory, sub-agents, intelligent routing, and orchestration",
5
5
  "type": "module",
6
6
  "piConfig": {
@@ -48,16 +48,21 @@ for (const { src, dest, label } of copies) {
48
48
  }
49
49
  }
50
50
 
51
- // 2. Make sigma packages resolvable from ~/.phi/agent/extensions/
52
- // Create node_modules with symlinks to the actual packages
53
- const sigmaPackages = ["sigma-memory", "sigma-agents", "sigma-skills"];
51
+ // 2. Make bundled-extension runtime deps resolvable from ~/.phi/agent/extensions/
52
+ // Create node_modules with symlinks to the actual packages. Includes the sigma
53
+ // packages plus the non-phi-internal deps the bundled extensions import directly
54
+ // (zod + the MCP SDK for the mcp extension). typebox and phi-code* resolve via the
55
+ // loader's module aliases, so they are not listed here. Any new bundled-extension
56
+ // dependency that is not phi-internal and not typebox must be added to this list.
57
+ const extensionDeps = ["sigma-memory", "sigma-agents", "sigma-skills", "zod", "@modelcontextprotocol/sdk"];
54
58
  const extensionsNodeModules = join(agentDir, "extensions", "node_modules");
55
59
  mkdirSync(extensionsNodeModules, { recursive: true });
56
60
 
57
- for (const pkg of sigmaPackages) {
61
+ for (const pkg of extensionDeps) {
58
62
  const srcPkg = join(packageDir, "node_modules", pkg);
59
63
  const destLink = join(extensionsNodeModules, pkg);
60
-
64
+ mkdirSync(dirname(destLink), { recursive: true });
65
+
61
66
  if (!existsSync(srcPkg)) {
62
67
  // Try parent node_modules (hoisted)
63
68
  let parent = dirname(packageDir);