@phi-code-admin/phi-code 0.84.0 → 0.84.2
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 +24 -0
- package/extensions/phi/mcp/index.ts +10 -4
- package/package.json +1 -1
- package/scripts/postinstall.cjs +10 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.84.2] - 2026-06-14
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **The `/mcp` command was missing until at least one server was configured.**
|
|
8
|
+
The bundled mcp extension returned early when `mcp.json` had no servers, so
|
|
9
|
+
`/mcp` never registered and there was no way to discover how to set MCP up. It
|
|
10
|
+
now always registers `/mcp` (plus `/mcp:start`, `/mcp:stop`, `/mcp:auth`); when
|
|
11
|
+
no servers are configured, `/mcp` prints guidance and an example `mcp.json`.
|
|
12
|
+
Servers are still only connected when one is actually configured.
|
|
13
|
+
|
|
14
|
+
## [0.84.1] - 2026-06-14
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- **`phi` failed to start with "Cannot find module 'zod'" after the bundled MCP
|
|
19
|
+
extension shipped.** The postinstall scaffolds a copy of the bundled extensions
|
|
20
|
+
under `~/.phi/agent/extensions/` and symlinks their runtime deps into that
|
|
21
|
+
folder's `node_modules`, but it only linked the sigma packages, not `zod` or
|
|
22
|
+
`@modelcontextprotocol/sdk` (both added with the mcp extension in 0.83.0). The
|
|
23
|
+
global copy of `mcp/` could therefore not resolve `zod`. The postinstall now
|
|
24
|
+
also links `zod` and `@modelcontextprotocol/sdk`. (typebox and phi-code*
|
|
25
|
+
resolve through the loader's module aliases, so they do not need linking.)
|
|
26
|
+
|
|
3
27
|
## [0.84.0] - 2026-06-14
|
|
4
28
|
|
|
5
29
|
### Added
|
|
@@ -69,10 +69,9 @@ export default async function (pi: ExtensionAPI): Promise<void> {
|
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
72
|
+
// Even with zero configured servers we proceed so the bundled `/mcp` command
|
|
73
|
+
// is always available (discoverability); it then guides the user to create an
|
|
74
|
+
// mcp.json. Servers are still only connected when one is actually configured.
|
|
76
75
|
|
|
77
76
|
// ── 2. Initialize bridge components ──────────────────────────────────────
|
|
78
77
|
// Auth callbacks — opens browser and notifies user when OAuth is needed
|
|
@@ -172,6 +171,13 @@ export default async function (pi: ExtensionAPI): Promise<void> {
|
|
|
172
171
|
.filter(Boolean)
|
|
173
172
|
.join("\n");
|
|
174
173
|
ctx.ui.notify(detail, "info");
|
|
174
|
+
} else if (manager.getAllServers().length === 0) {
|
|
175
|
+
// No servers configured yet: guide the user instead of showing nothing.
|
|
176
|
+
ctx.ui.notify(
|
|
177
|
+
'No MCP servers configured. Create ~/.phi/agent/mcp.json (global) or .phi/mcp.json (project) with an "mcpServers" block, e.g.:\n' +
|
|
178
|
+
'{ "mcpServers": { "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "."], "lifecycle": "eager" } } }',
|
|
179
|
+
"info",
|
|
180
|
+
);
|
|
175
181
|
} else {
|
|
176
182
|
// Summary view: all servers
|
|
177
183
|
ctx.ui.notify(manager.getStatusSummary(), "info");
|
package/package.json
CHANGED
package/scripts/postinstall.cjs
CHANGED
|
@@ -48,16 +48,21 @@ for (const { src, dest, label } of copies) {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
// 2. Make
|
|
52
|
-
// Create node_modules with symlinks to the actual packages
|
|
53
|
-
|
|
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
|
|
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);
|