pi-lean-ctx 3.7.3 → 3.7.4
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/extensions/index.ts +14 -7
- package/package.json +1 -1
package/extensions/index.ts
CHANGED
|
@@ -618,10 +618,14 @@ export default async function (pi: ExtensionAPI) {
|
|
|
618
618
|
|
|
619
619
|
const enableMcpBridge = PI_CONFIG.enableMcp;
|
|
620
620
|
const adapterConfigured = isMcpAdapterConfigured();
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
621
|
+
// An explicit opt-in to the embedded bridge wins over mcp.json detection (#361).
|
|
622
|
+
// A `lean-ctx` entry in ~/.pi/agent/mcp.json does NOT prove that pi-mcp-adapter
|
|
623
|
+
// is actually serving it — pi has no native MCP support, and `lean-ctx init
|
|
624
|
+
// --agent pi` writes that entry by default — so it must not silently disable the
|
|
625
|
+
// bridge a user explicitly requested via LEAN_CTX_PI_ENABLE_MCP=1 / enableMcp.
|
|
626
|
+
const mcpBridge = enableMcpBridge
|
|
627
|
+
? new McpBridge(resolveBinary(), PI_CONFIG.forwardedEnv)
|
|
628
|
+
: null;
|
|
625
629
|
|
|
626
630
|
if (mcpBridge) {
|
|
627
631
|
try {
|
|
@@ -644,9 +648,7 @@ export default async function (pi: ExtensionAPI) {
|
|
|
644
648
|
lines.push(`Config: ${PI_CONFIG.configPath}`);
|
|
645
649
|
}
|
|
646
650
|
lines.push(`Mode: ${PI_MODE}`);
|
|
647
|
-
if (
|
|
648
|
-
lines.push("MCP bridge: adapter-configured (extension bridge disabled)");
|
|
649
|
-
} else if (!enableMcpBridge) {
|
|
651
|
+
if (!enableMcpBridge) {
|
|
650
652
|
lines.push("MCP bridge: disabled (CLI-first)");
|
|
651
653
|
lines.push(' Enable: LEAN_CTX_PI_ENABLE_MCP=1 or "enableMcp": true in config.json, then restart Pi');
|
|
652
654
|
} else if (status) {
|
|
@@ -656,6 +658,11 @@ export default async function (pi: ExtensionAPI) {
|
|
|
656
658
|
if (status.toolNames.length > 0) {
|
|
657
659
|
lines.push(` ${status.toolNames.join(", ")}`);
|
|
658
660
|
}
|
|
661
|
+
if (adapterConfigured) {
|
|
662
|
+
lines.push(
|
|
663
|
+
" Note: ~/.pi/agent/mcp.json also has a lean-ctx entry. The embedded bridge is serving tools; if you additionally run pi-mcp-adapter you may see duplicates.",
|
|
664
|
+
);
|
|
665
|
+
}
|
|
659
666
|
if (status.lastHungTool) {
|
|
660
667
|
lines.push(`Last hung tool: ${status.lastHungTool}`);
|
|
661
668
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-lean-ctx",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.4",
|
|
4
4
|
"description": "Pi Coding Agent extension (CLI-first) \u2014 routes bash/read/grep/find/ls through lean-ctx CLI for strong token savings. Optional MCP bridge can register advanced tools.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|