Compare commits
3 Commits
ab5ff8ec56
...
v1.1.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 314c3767a8 | |||
| 05e88c5c75 | |||
| 7f67c36a1c |
+46
-1
@@ -11,7 +11,52 @@ Pre-v1.0.0 tags followed the pi npm version (`v{pi_version}[letter]`).
|
||||
|
||||
---
|
||||
|
||||
## Unreleased
|
||||
## v1.1.1 — 2026-06-13
|
||||
|
||||
Patch release: pi `0.79.1` → `0.79.3` (auto-resolved at build) plus the
|
||||
mempalace-mcp hang fix below.
|
||||
|
||||
### Fixed
|
||||
|
||||
- **`mempalace-mcp` no longer hangs the pi TUI uninterruptibly.** When
|
||||
the palace is bind-mounted from the macOS host (OrbStack virtiofs) and
|
||||
the container opened a large `chroma.sqlite3` for the first time, a
|
||||
cold storage open / HNSW load could stall the server before it emitted
|
||||
its JSON-RPC response. The awaiting promise then hung forever and the
|
||||
TUI froze — ESC cancels the LLM stream, not a pending MCP tool call, so
|
||||
there was no way out short of `docker exec <container> pkill -9 -f
|
||||
mempalace-mcp` and restarting pi.
|
||||
|
||||
The fix lives in the `mempalace.ts` pi extension shipped by
|
||||
**mempalace-toolkit** (cloned into the base at build time via
|
||||
`MEMPALACE_TOOLKIT_REF`, default `main`): the JSON-RPC client now arms
|
||||
a **per-request** timeout. On expiry it rejects the request *and* kills
|
||||
the stalled child (SIGTERM→SIGKILL), so pi surfaces an error instead of
|
||||
hanging; the bridge then marks itself unavailable so subsequent calls
|
||||
fail fast (restart pi to retry). This is deliberately per-REQUEST, not
|
||||
a process-lifetime `timeout 60 mempalace-mcp` wrapper — the long-lived
|
||||
server is only killed when a request genuinely stalls.
|
||||
|
||||
Tunables (env): `MEMPALACE_MCP_TIMEOUT_MS` (tool-call timeout, default
|
||||
`60000`), `MEMPALACE_MCP_INIT_TIMEOUT_MS` (initialize/tools-list
|
||||
handshake, default `120000`); set either to `0` to disable. Requires a
|
||||
base rebuild to pull the updated extension. The earlier plan of a
|
||||
standalone Python stdio-watchdog shim was dropped: the extension
|
||||
already owns request/response correlation, so a separate
|
||||
framing-reparsing shim is unnecessary.
|
||||
|
||||
Still open (out of scope here): sharing one palace across harnesses
|
||||
ideally wants a single host-side `mempalace-mcp` daemon multiplexing
|
||||
stdio over a UNIX socket, so all clients share one writer on native
|
||||
APFS rather than each cold-opening over virtiofs.
|
||||
`mempalace-mcp` that applies a per-request timeout and kills the child
|
||||
on stall, **without** killing the long-lived server itself (a naive
|
||||
`timeout 60 mempalace-mcp` wrapper is wrong — it kills the server
|
||||
mid-session). Sharing the palace across harnesses (native pi, container
|
||||
pi, opencode) remains the goal — isolated palaces defeat the point.
|
||||
Longer term: run a single mempalace-mcp daemon on the host and
|
||||
multiplex stdio over a UNIX socket so all clients share one writer on
|
||||
native APFS.
|
||||
|
||||
### Added
|
||||
|
||||
|
||||
@@ -279,6 +279,16 @@ RUN ARCH=$(case "${TARGETARCH}" in amd64) echo "x86_64" ;; arm64) echo "aarch64"
|
||||
# Provides semantic search over conversation history via 29 MCP tools.
|
||||
# Always installed in the base. Set INSTALL_MEMPALACE=false at base-build
|
||||
# time to shave ~300 MB.
|
||||
#
|
||||
# Stall protection (fixed 2026-06-13): mempalace-mcp is launched by the
|
||||
# `mempalace.ts` pi extension from mempalace-toolkit (cloned below). That
|
||||
# extension now applies a per-REQUEST timeout in its JSON-RPC client and
|
||||
# kills the child on stall, so a virtiofs cold-open of chroma.sqlite3 /
|
||||
# HNSW load can no longer hang the pi TUI uninterruptibly. Tunables:
|
||||
# MEMPALACE_MCP_TIMEOUT_MS (default 60000), MEMPALACE_MCP_INIT_TIMEOUT_MS
|
||||
# (default 120000); 0 disables. A standalone stdio-watchdog shim is NOT
|
||||
# needed — the extension already owns request/response correlation. See
|
||||
# CHANGELOG.md "Unreleased > Fixed".
|
||||
ARG INSTALL_MEMPALACE=true
|
||||
# Pin to a known-good version. Bump deliberately, not implicitly: an
|
||||
# unpinned install silently swept in mempalace 3.3.x/3.4.0 with a broken
|
||||
|
||||
Reference in New Issue
Block a user