Skip to content

Commit 94f1689

Browse files
authored
Merge pull request #1159 from MemPalace/develop
release: v3.3.3 — sync develop → main for tag cut
2 parents 87102fb + 7a75791 commit 94f1689

57 files changed

Lines changed: 6127 additions & 265 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude-plugin/.mcp.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{
22
"mempalace": {
3-
"command": "python3",
4-
"args": [
5-
"-m",
6-
"mempalace.mcp_server"
7-
]
3+
"command": "mempalace-mcp"
84
}
95
}
Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
#!/bin/bash
22
# MemPalace PreCompact Hook — thin wrapper calling Python CLI
33
# All logic lives in mempalace.hooks_cli for cross-harness extensibility
4-
INPUT=$(cat)
5-
echo "$INPUT" | python3 -m mempalace hook run --hook precompact --harness claude-code
4+
run_mempalace_hook() {
5+
if command -v mempalace >/dev/null 2>&1; then
6+
mempalace hook run "$@"
7+
return $?
8+
fi
9+
10+
if command -v python3 >/dev/null 2>&1 && python3 -c "import mempalace" >/dev/null 2>&1; then
11+
python3 -m mempalace hook run "$@"
12+
return $?
13+
fi
14+
15+
if command -v python >/dev/null 2>&1 && python -c "import mempalace" >/dev/null 2>&1; then
16+
python -m mempalace hook run "$@"
17+
return $?
18+
fi
19+
20+
echo "MemPalace hook error: could not find a runnable mempalace command or module" >&2
21+
return 1
22+
}
23+
24+
run_mempalace_hook --hook precompact --harness claude-code
Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
#!/bin/bash
22
# MemPalace Stop Hook — thin wrapper calling Python CLI
33
# All logic lives in mempalace.hooks_cli for cross-harness extensibility
4-
INPUT=$(cat)
5-
echo "$INPUT" | python3 -m mempalace hook run --hook stop --harness claude-code
4+
run_mempalace_hook() {
5+
if command -v mempalace >/dev/null 2>&1; then
6+
mempalace hook run "$@"
7+
return $?
8+
fi
9+
10+
if command -v python3 >/dev/null 2>&1 && python3 -c "import mempalace" >/dev/null 2>&1; then
11+
python3 -m mempalace hook run "$@"
12+
return $?
13+
fi
14+
15+
if command -v python >/dev/null 2>&1 && python -c "import mempalace" >/dev/null 2>&1; then
16+
python -m mempalace hook run "$@"
17+
return $?
18+
fi
19+
20+
echo "MemPalace hook error: could not find a runnable mempalace command or module" >&2
21+
return 1
22+
}
23+
24+
run_mempalace_hook --hook stop --harness claude-code

.claude-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"name": "mempalace",
1010
"source": "./.claude-plugin",
1111
"description": "AI memory system — mine projects and conversations into a searchable palace. 19 MCP tools, auto-save hooks, guided setup.",
12-
"version": "3.3.2",
12+
"version": "3.3.3",
1313
"author": {
1414
"name": "milla-jovovich"
1515
}

.claude-plugin/plugin.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mempalace",
3-
"version": "3.3.2",
3+
"version": "3.3.3",
44
"description": "Give your AI a memory — mine projects and conversations into a searchable palace. 19 MCP tools, auto-save hooks, and guided setup.",
55
"author": {
66
"name": "milla-jovovich"
@@ -9,11 +9,7 @@
99
"commands": [],
1010
"mcpServers": {
1111
"mempalace": {
12-
"command": "python3",
13-
"args": [
14-
"-m",
15-
"mempalace.mcp_server"
16-
]
12+
"command": "mempalace-mcp"
1713
}
1814
},
1915
"keywords": [

.codex-plugin/hooks/mempal-hook.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -euo pipefail
33
HOOK_NAME="${1:?Usage: mempal-hook.sh <hook-name>}"
44
INPUT_FILE=$(mktemp) || { echo "Failed to create temp file" >&2; exit 1; }
55
cat > "$INPUT_FILE"
6-
cat "$INPUT_FILE" | python3 -m mempalace hook run --hook "$HOOK_NAME" --harness codex
6+
cat "$INPUT_FILE" | mempalace hook run --hook "$HOOK_NAME" --harness codex
77
EXIT_CODE=$?
88
rm -f "$INPUT_FILE" 2>/dev/null
99
exit $EXIT_CODE

.codex-plugin/plugin.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mempalace",
3-
"version": "3.3.2",
3+
"version": "3.3.3",
44
"description": "Give your AI a memory — mine projects and conversations into a searchable palace. 19 MCP tools, auto-save hooks, and guided setup.",
55
"author": {
66
"name": "milla-jovovich"
@@ -21,11 +21,7 @@
2121
"hooks": "./hooks.json",
2222
"mcpServers": {
2323
"mempalace": {
24-
"command": "python3",
25-
"args": [
26-
"-m",
27-
"mempalace.mcp_server"
28-
]
24+
"command": "mempalace-mcp"
2925
}
3026
},
3127
"interface": {

CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,44 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66

77
---
88

9+
## [3.3.3] — 2026-04-23
10+
11+
### Bug Fixes
12+
13+
- **Install regression**`mempalace-mcp` console script is now declared in `pyproject.toml` alongside `.claude-plugin/plugin.json`'s reference to it. In v3.3.2 the two drifted apart (plugin.json shipped the new `"command": "mempalace-mcp"` form before the matching entry point landed), so every fresh `pip install mempalace==3.3.2` produced a Claude Code plugin config pointing at a binary that wasn't installed. (#1093, #340)
14+
- Restore silent-save visibility after the Claude Code 2.1.114 client regression — production transcript saves were failing silently until this PR. (#1021)
15+
- Paginate `status`-path metadata fetches so large palaces don't trip SQLite variable limits. (#851)
16+
- Resolve the Claude plugin hook runner across platform / plugin-dir variations; previously broke on Windows and some macOS layouts. (#942)
17+
- Real `python3` resolution for `.sh` hooks with a `MEMPAL_PYTHON` override path. (#833)
18+
- Add optional `wing` parameter to `tool_diary_write` / `tool_diary_read` and derive per-project wing from the Claude Code transcript path when writing from the stop hook — diary entries from different projects no longer collapse into a shared default wing. (#659)
19+
- Treat empty string as "no filter" in `mempalace_search` `wing`/`room`; LLM agents that default to filling every optional parameter with `""` no longer get bounced with `must be a non-empty string`. (#1097, #1084)
20+
- Broaden `_wing_from_transcript_path` to handle Claude Code project folders without a `-Projects-` segment (e.g. `~/dev/<parent>/<project>`, `~/code/<project>`). The project name is now derived from the final dash-separated token of the encoded folder, so Linux users with code outside `~/Projects/` get per-project diary scoping instead of falling through to `wing_sessions`. (#1145, follow-up to #659)
21+
- `mempalace_diary_read(wing="")` now returns diary entries from every wing this agent has written to, matching the #1097 "empty-string as no filter" pattern. Previously defaulted to `wing_<agent>`, siloing entries that hooks wrote to project-derived wings. (#1145)
22+
- `mempalace mine` now skips the generated `entities.json` file so its contents aren't re-ingested as project content. (#1175)
23+
24+
### Improvements
25+
26+
- **Deterministic hook saves.** Save hook now uses a silent Python API path, so successive hook invocations produce reproducible results and zero data loss on the hot path. (#673)
27+
- **Graph cache with write-invalidation** inside `build_graph()` — warm-path calls no longer rebuild the palace-graph per request. (#661)
28+
- **`mempalace init` entity detection overhaul.** Canonical project names now come from package manifests (`package.json`, `pyproject.toml`, `Cargo.toml`, `go.mod`) and real people come from git commit authors, rather than being inferred from prose. Includes union-find dedup across name/email aliases, bot filtering that keeps `@users.noreply.github.com` humans, and automatic "mine" flagging by contribution share. (#1148)
29+
- **Regex detector accuracy.** CamelCase extraction so `MemPalace`, `ChromaDB`, `OpenAI` aren't fragmented; tighter versioned/hyphenated pattern kills `context-manager` / `multi-word` false positives; dialogue `^NAME:\s` requires ≥2 hits so `Created: <date>` metadata stops classifying field names as people; expanded stopwords for common English participles and descriptors; high-pronoun signal classifies as person rather than dumping to uncertain. (#1148)
30+
- **Init → miner wire-up.** Confirmed entities merge into `~/.mempalace/known_entities.json` on init, which the miner reads to tag drawer metadata for entity-filtered search. Previously init's output was not consumed by the miner; the per-project `entities.json` is kept as an audit trail. (#1157)
31+
- **Case-insensitive project dedup** across manifest, git, and convo sources so casing variants of the same project name collapse into one review entry. (#1175)
32+
33+
### Added
34+
35+
- i18n: Belarusian translation. (#1051)
36+
- i18n: entity detection for German, Spanish, and French locales. (#1001)
37+
- i18n: Traditional + Simplified Chinese entity detection. (#945)
38+
- **`mempalace init --llm`**: optional LLM-assisted entity classification. Defaults to local Ollama (zero-API); also supports any OpenAI-compatible endpoint (LM Studio, llama.cpp server, vLLM, OpenRouter, etc.) and the Anthropic Messages API. Runs interactively with a progress indicator; Ctrl-C cancels cleanly and returns partial results. Useful for prose-heavy folders where the regex detector struggles (diaries, transcripts, research notes). Opt-in only — default init path remains zero-API. (#1150)
39+
- **Claude Code conversation scanner.** `~/.claude/projects/<slug>/` directories now contribute project entities using each session's authoritative `cwd` metadata, avoiding slug-decoding ambiguity. (#1150)
40+
41+
### Known — deferred to v3.3.4
42+
43+
- HNSW parallel-insert SIGSEGV when `hnsw:num_threads` is unset on collection creation (#974) — fix in-flight as #976, awaiting rebase against develop.
44+
45+
---
46+
947
## [3.3.2] — 2026-04-19
1048

1149
### Bug Fixes

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ PRs welcome. See [CONTRIBUTING.md](CONTRIBUTING.md).
177177
MIT — see [LICENSE](LICENSE).
178178

179179
<!-- Link Definitions -->
180-
[version-shield]: https://img.shields.io/badge/version-3.3.2-4dc9f6?style=flat-square&labelColor=0a0e14
180+
[version-shield]: https://img.shields.io/badge/version-3.3.3-4dc9f6?style=flat-square&labelColor=0a0e14
181181
[release-link]: https://github.com/MemPalace/mempalace/releases
182182
[python-shield]: https://img.shields.io/badge/python-3.9+-7dd8f8?style=flat-square&labelColor=0a0e14&logo=python&logoColor=7dd8f8
183183
[python-link]: https://www.python.org/

examples/HOOKS_TUTORIAL.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,27 @@ Add this to your configuration file to enable automatic background saving:
2525
}
2626
]
2727
}
28-
}
28+
}
29+
```
30+
31+
### 3. What changed (v3.1.0+)
32+
33+
Both hooks now have **two-layer capture**:
34+
35+
1. **Auto-mine**: Before blocking the AI, the hook runs the normalizer on the JSONL transcript and upserts chunks directly into the palace. This captures raw tool output (Bash results, search findings, build errors) that the AI would otherwise summarize away.
36+
37+
2. **Updated reason messages**: The block reason now explicitly tells the AI to save tool output verbatim — not just topics and decisions.
38+
39+
### 4. Backfill past conversations (one-time)
40+
41+
The hooks capture conversations going forward, but you probably have months of past sessions. Run this once to mine them all:
42+
43+
```bash
44+
mempalace mine ~/.claude/projects/ --mode convos
45+
```
46+
47+
### 5. Configuration
48+
49+
- **`SAVE_INTERVAL=15`** — How many human messages between saves
50+
- **`MEMPALACE_PYTHON`** — Python interpreter with mempalace + chromadb. Auto-detects: env var → repo venv → system python3
51+
- **`MEMPAL_DIR`** — Optional directory for auto-ingest via `mempalace mine`

0 commit comments

Comments
 (0)