cleanup and remote only
This commit is contained in:
@@ -8,6 +8,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
|
||||
## [3.3.5] — unreleased
|
||||
|
||||
### Added
|
||||
|
||||
- **Server-mode deployment for cross-machine memory.** New `deploy/unraid/` directory ships a containerized MemPalace stack designed for users running AI tools across multiple machines who want one shared palace. Two-container compose: `mempalace` runs the existing `mempalace-mcp` (stdio) wrapped by `mcp-proxy` for SSE plus a new in-process HTTP transcript-ingest endpoint, and `caddy` terminates TLS, enforces a bearer-token check on every request, and reverse-proxies both endpoints. A `Dockerfile` at the repo root builds the server image (Python 3.13-slim, runs as `99:100` for Unraid `nobody:users`); a dockerMan template (`mempalace-server.xml`) is also provided for users who explicitly want a single-container, no-auth, LAN-trust-only install. ChromaDB's HNSW index is not safe for multi-process writes, so the ingest endpoint deliberately runs as a daemon thread inside the same process as the MCP server rather than as a separate container — exactly one Chroma writer per palace. Default stdio-only path is unchanged; the ingest thread starts only when `MEMPALACE_INGEST_PORT` is set.
|
||||
- **`mempalace/ingest_server.py` — HTTP transcript ingest endpoint.** Stdlib `http.server` running in a daemon thread, reachable at `POST /ingest/transcript` with raw JSONL body and `X-Session-Id` / `X-Wing` headers. Drops the upload into `<palace>/inbox/<session>/<session>.jsonl` and runs the existing `convo_miner.mine_convos` pipeline against that directory — same entity detection, room assignment, dedup, and idempotency the local CLI gets. Optional `Authorization: Bearer` check via `MEMPALACE_INGEST_TOKEN` (defense-in-depth alongside the reverse-proxy gate). 50 MB hard cap per upload. Unauth'd `GET /healthz` for liveness probes.
|
||||
- **Remote-aware hook variants.** New `hooks/mempal_save_hook_remote.sh` and `hooks/mempal_precompact_hook_remote.sh` are drop-in replacements for the existing local hooks when the palace runs on a server. Same trigger logic (count user messages, fire on `SAVE_INTERVAL`), but `curl`s the active transcript to `$MEMPAL_REMOTE_URL/ingest/transcript` instead of running `mempalace mine` locally. Save variant is async (backgrounded `curl`); pre-compact variant is synchronous and bounded by the Claude Code hook timeout. No-op with a one-line log when env vars are unset, so installing them on a machine that doesn't have a remote configured is safe.
|
||||
- **`deploy/unraid/README.md` — full install/usage guide.** Architecture diagram, prerequisites, step-by-step compose-based install with auth, client config for Claude Code / Codex / Antigravity (with bearer headers and self-signed-cert handling), hook setup, backfilling history from past sessions, backups, and troubleshooting (401s, `MineAlreadyRunning` collisions, stalled embedding-model downloads, cert handshake failures). dockerMan-template path documented as the explicit no-auth fallback.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **`mempalace_diary_read` silently dropped entries on agent-name case mismatch.** `tool_diary_write` stored the `agent` metadata verbatim after `sanitize_name`, which preserves case, while `tool_diary_read` filtered by exact match. Writing as `"Claude"` and reading as `"claude"` (or vice-versa) returned zero rows. Both endpoints now lowercase `agent_name` immediately after sanitization, so reads are case-insensitive and the default per-agent wing slug is stable across casings. **Behavior change:** entries written prior to this fix under mixed-case agent names will not match the new lowercase filter; run `mempalace repair` if you need to migrate legacy diary metadata. (#1243)
|
||||
|
||||
Reference in New Issue
Block a user