pi bridge: RemoteMcpClient is now the only copy (pi-extensions retired mcp-loader.ts)

pi-extensions 750b2a8 removed mcp-loader.ts in favour of pi's built-in MCP
support (builtin:mcp, ~/.pi/agent/mcp.json). The bridge's RemoteMcpClient was
vendored from that file and kept in step by an MCP-STREAMABLE-HTTP-CLIENT-SYNC
token, checked by scripts/check-mcp-client-sync.sh. With the canonical copy
gone the guard could only ever SKIP (or, on images that still bake
/opt/pi-extensions/extensions/mcp-loader.ts, compare against a dead file), so
it is removed rather than left looking like a check.

Comment and README only; no code change. The bridge still type-strips and
imports (node 24), and evaluateDormancy is exported as before. The README
records why MemPalace itself does not move to the built-in: its wake-up,
mailbox, feed and stamping need their own client, and built-in tools would be
mcp__mempalace__* with codemode exposure by default.
This commit is contained in:
2026-10-13 00:17:02 +02:00
parent 975ab92943
commit a30af61883
3 changed files with 17 additions and 92 deletions
+8 -10
View File
@@ -576,17 +576,15 @@ class StdioMcpClient implements IMcpClient {
// ───────────────────────────────────────────────────────────────────────
// RemoteMcpClient — EXTERNAL transport (streamable-HTTP / sessionless JSON-RPC).
//
// VENDORED from pi-extensions/extensions/mcp-loader.ts (class RemoteMcpClient).
// Kept as a copy rather than a shared import because the two repos ship
// independently; the canonical implementation lives in mcp-loader.ts. Port
// protocol fixes in both directions.
// ORIGIN: vendored from pi-extensions/extensions/mcp-loader.ts (class
// RemoteMcpClient). mcp-loader.ts was RETIRED on 2026-10-12 (pi-extensions
// 750b2a8) in favour of pi's built-in MCP support, so THIS copy is now the only
// one. There is no canonical partner left to sync with, so the former
// MCP-STREAMABLE-HTTP-CLIENT-SYNC token and scripts/check-mcp-client-sync.sh
// were removed with it. The last canonical version is
// `git show a88fa99:extensions/mcp-loader.ts` in pi-extensions.
//
// MCP-STREAMABLE-HTTP-CLIENT-SYNC: v1
// This token must match the canonical block's. Bump it in BOTH files whenever
// the streamable-HTTP protocol handling changes; scripts/check-mcp-client-sync.sh
// fails when they diverge (skips gracefully if pi-extensions isn't checked out).
//
// Deltas from the canonical copy:
// Deltas from that last canonical copy:
// • protocolVersion pinned to "2024-11-05" to match mempalace-mcp's stdio
// handshake (the server echoes whatever it is sent, so cosmetic today,
// but keeps both transports consistent).