claude-memory-hub 0.8.1 → 0.8.2
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/CHANGELOG.md +11 -0
- package/README.md +40 -15
- package/dist/hooks/post-compact.js +1 -1
- package/dist/hooks/post-tool-use.js +2 -2
- package/dist/hooks/pre-compact.js +1 -1
- package/dist/hooks/session-end.js +2 -2
- package/dist/hooks/user-prompt-submit.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,17 @@ Format follows [Keep a Changelog](https://keepachangelog.com/).
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [0.8.2] - 2026-04-02
|
|
9
|
+
|
|
10
|
+
Increased context injection limits for richer cross-session memory.
|
|
11
|
+
|
|
12
|
+
### Context Injection Limits
|
|
13
|
+
|
|
14
|
+
- **UserPromptSubmit cap doubled** — `MAX_CHARS` increased from 4,500 (~1,125 tokens) to 8,000 (~2,000 tokens). Session-start context injection now carries significantly more past knowledge
|
|
15
|
+
- **Proactive retrieval cap doubled** — `MAX_INJECTION_CHARS` increased from 1,500 (~375 tokens) to 3,000 (~750 tokens). Mid-session topic-shift injections now include fuller context from L3
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
8
19
|
## [0.8.1] - 2026-04-02
|
|
9
20
|
|
|
10
21
|
Token-budget-aware MCP tools + proactive mid-session memory retrieval.
|
package/README.md
CHANGED
|
@@ -17,6 +17,31 @@ Zero API key. Zero Python. Zero config. One install command.
|
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
+
## Why memory-hub?
|
|
21
|
+
|
|
22
|
+
**Claude Code forgets everything.** Every session starts from zero. Auto-compact destroys 90% of your context. You lose files, decisions, errors — hours of work, gone.
|
|
23
|
+
|
|
24
|
+
**claude-memory-hub fixes this.** One install command. No API key. No Python. No Docker.
|
|
25
|
+
|
|
26
|
+
What makes it different? **The Compact Interceptor** — something no other memory tool has. When Claude Code auto-compacts at 200K tokens, memory-hub *tells the compact engine what matters*. PreCompact hook injects priority instructions. PostCompact hook saves the full summary. Result: 90% context salvage instead of vaporization.
|
|
27
|
+
|
|
28
|
+
But it doesn't stop there:
|
|
29
|
+
- **Cross-session memory** — past work auto-injected when you start a new session
|
|
30
|
+
- **3-engine hybrid search** — FTS5 + TF-IDF + semantic embeddings (384-dim, offline)
|
|
31
|
+
- **Proactive retrieval** — detects topic shifts mid-session, injects relevant context automatically
|
|
32
|
+
- **91 unit tests**, batch queue (75ms→3ms), JSONL export/import, browser UI
|
|
33
|
+
- **Multi-agent ready** — subagents share memory for free via MCP
|
|
34
|
+
|
|
35
|
+
Built for developers who use Claude Code daily and are tired of repeating themselves.
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
bunx claude-memory-hub install
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
That's it. Your Claude now remembers.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
20
45
|
## The Problem
|
|
21
46
|
|
|
22
47
|
Claude Code forgets everything between sessions. Within long sessions, auto-compact destroys 90% of context. Search is keyword-only with no ranking.
|
|
@@ -156,10 +181,10 @@ User prompt contains "remember that we use TypeScript strict"
|
|
|
156
181
|
## Architecture
|
|
157
182
|
|
|
158
183
|
```
|
|
159
|
-
|
|
160
|
-
│ Claude Code
|
|
161
|
-
│
|
|
162
|
-
│ 5 Lifecycle Hooks
|
|
184
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
185
|
+
│ Claude Code │
|
|
186
|
+
│ │
|
|
187
|
+
│ 5 Lifecycle Hooks │
|
|
163
188
|
│ ┌───────────────┐ ┌──────────────┐ ┌──────────────┐ │
|
|
164
189
|
│ │ PostToolUse │ │ PreCompact │ │ PostCompact │ │
|
|
165
190
|
│ │ batch queue │ │ inject │ │ save summary │ │
|
|
@@ -169,25 +194,25 @@ User prompt contains "remember that we use TypeScript strict"
|
|
|
169
194
|
│ │UserPrompt │ │ │ Stop │ │
|
|
170
195
|
│ │Submit: inject│ │ │ session end │ │
|
|
171
196
|
│ │past context │ │ │ summarize │ │
|
|
172
|
-
│ └──────────────┘ │ └──────────────┘ │
|
|
197
|
+
│ └──────────────┘ │ └──────────────┘ │
|
|
173
198
|
│ │ │
|
|
174
199
|
│ MCP Server (stdio, long-lived) │
|
|
175
200
|
│ ┌─────────────────────────────────────────────────────┐ │
|
|
176
201
|
│ │ memory_recall memory_search (L1 index) │ │
|
|
177
202
|
│ │ memory_entities memory_timeline (L2 context) │ │
|
|
178
203
|
│ │ memory_session_notes memory_fetch (L3 full) │ │
|
|
179
|
-
│ │ memory_store memory_context_budget
|
|
180
|
-
│ │ memory_health
|
|
181
|
-
│ │
|
|
182
|
-
│ │ L1 WorkingMemory: read-through cache over L2
|
|
204
|
+
│ │ memory_store memory_context_budget │ │
|
|
205
|
+
│ │ memory_health │ │
|
|
206
|
+
│ │ │ │
|
|
207
|
+
│ │ L1 WorkingMemory: read-through cache over L2 │ │
|
|
183
208
|
│ └─────────────────────────────────────────────────────┘ │
|
|
184
|
-
│
|
|
185
|
-
│ Resource Intelligence Browser UI (:37888)
|
|
209
|
+
│ │
|
|
210
|
+
│ Resource Intelligence Browser UI (:37888) │
|
|
186
211
|
│ ┌──────────────────┐ ┌──────────────────┐ │
|
|
187
212
|
│ │ scan → track → │ │ search, browse, │ │
|
|
188
|
-
│ │ analyze overhead
|
|
213
|
+
│ │ analyze overhead │ │ stats, health │ │
|
|
189
214
|
│ └──────────────────┘ └──────────────────┘ │
|
|
190
|
-
|
|
215
|
+
└─────────────────────────────────────────────────────────────┘
|
|
191
216
|
│
|
|
192
217
|
┌─────────┴──────────┐
|
|
193
218
|
│ SQLite + FTS5 │
|
|
@@ -195,7 +220,7 @@ User prompt contains "remember that we use TypeScript strict"
|
|
|
195
220
|
│ memory-hub/ │
|
|
196
221
|
│ │
|
|
197
222
|
│ memory.db │
|
|
198
|
-
│ batch/queue.jsonl
|
|
223
|
+
│ batch/queue.jsonl│
|
|
199
224
|
│ logs/ │
|
|
200
225
|
└────────────────────┘
|
|
201
226
|
```
|
|
@@ -216,7 +241,7 @@ User prompt contains "remember that we use TypeScript strict"
|
|
|
216
241
|
│ files, errors, decisions Per-session scope │
|
|
217
242
|
│ observations (14 patterns) Importance scored 1-5 │
|
|
218
243
|
├─────────────────────────────────────────────────────┤
|
|
219
|
-
│ L3: LongTermStore SQLite + FTS5 + TF-IDF
|
|
244
|
+
│ L3: LongTermStore SQLite + FTS5 + TF-IDF │
|
|
220
245
|
│ Cross-session summaries <100ms access │
|
|
221
246
|
│ Hybrid ranked search Persistent forever │
|
|
222
247
|
│ Semantic embeddings 3-layer progressive │
|
|
@@ -1424,7 +1424,7 @@ function safeJson(text, fallback) {
|
|
|
1424
1424
|
|
|
1425
1425
|
// src/context/injection-validator.ts
|
|
1426
1426
|
var log3 = createLogger("injection-validator");
|
|
1427
|
-
var MAX_CHARS =
|
|
1427
|
+
var MAX_CHARS = 8000;
|
|
1428
1428
|
|
|
1429
1429
|
class InjectionValidator {
|
|
1430
1430
|
registry;
|
|
@@ -1841,7 +1841,7 @@ var log6 = createLogger("proactive-retrieval");
|
|
|
1841
1841
|
var DATA_DIR2 = join6(homedir5(), ".claude-memory-hub");
|
|
1842
1842
|
var PROACTIVE_DIR = join6(DATA_DIR2, "proactive");
|
|
1843
1843
|
var TOOL_CALL_INTERVAL = 15;
|
|
1844
|
-
var MAX_INJECTION_CHARS =
|
|
1844
|
+
var MAX_INJECTION_CHARS = 3000;
|
|
1845
1845
|
function evaluateProactiveInjection(sessionId, toolName, toolInput, toolResponse) {
|
|
1846
1846
|
const state = loadState(sessionId);
|
|
1847
1847
|
state.toolCallCount++;
|
|
@@ -1424,7 +1424,7 @@ function safeJson(text, fallback) {
|
|
|
1424
1424
|
|
|
1425
1425
|
// src/context/injection-validator.ts
|
|
1426
1426
|
var log3 = createLogger("injection-validator");
|
|
1427
|
-
var MAX_CHARS =
|
|
1427
|
+
var MAX_CHARS = 8000;
|
|
1428
1428
|
|
|
1429
1429
|
class InjectionValidator {
|
|
1430
1430
|
registry;
|
|
@@ -2029,7 +2029,7 @@ var log9 = createLogger("proactive-retrieval");
|
|
|
2029
2029
|
var DATA_DIR = join5(homedir4(), ".claude-memory-hub");
|
|
2030
2030
|
var PROACTIVE_DIR = join5(DATA_DIR, "proactive");
|
|
2031
2031
|
var TOOL_CALL_INTERVAL = 15;
|
|
2032
|
-
var MAX_INJECTION_CHARS =
|
|
2032
|
+
var MAX_INJECTION_CHARS = 3000;
|
|
2033
2033
|
function evaluateProactiveInjection(sessionId, toolName, toolInput, toolResponse) {
|
|
2034
2034
|
const state = loadState(sessionId);
|
|
2035
2035
|
state.toolCallCount++;
|
package/package.json
CHANGED