memoryrouter-claude 2.5.0 → 2.6.1
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 +17 -0
- package/README.md +2 -0
- package/bin/cli.js +82 -12
- package/lib/hook-runner.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.6.1 (2026-08-18)
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- `inspect` CLI verb: lineage drill-down by memory id (`--id`, `--json`). Shows the tier, the source memories a reflection consolidated, and what a raw memory was consolidated into. Use repeatedly to walk from a tier 3 reflection through tier 2 to the raw memories underneath.
|
|
8
|
+
- `date-search` rows now print the memory id so inspect can be run directly on a result.
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- The verbatim-detail guidance in the injected hint and `date-search` help now teaches lineage drill-down: search `--tiers 3`, then inspect down through tier 2 to raw memories; direct `--tiers 1` remains the fallback when exact wording is known.
|
|
13
|
+
|
|
14
|
+
## 2.6.0 (2026-08-17)
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Tier-guide teaching text on every model-facing surface: the injected recall hint, the `date-search` CLI help, and the in-code guidance now teach that tier 3 holds the highest-level consolidated reflections (identity, principles, what matters most), tier 2 holds reflections of specific meaningful events, and tier 1 holds raw verbatim memories. Broad "most important things" questions use `--tiers 3 --importance 8`; specific events use `--tiers 2`; exact details use tier 1 or blended.
|
|
19
|
+
|
|
3
20
|
## 2.5.0 (2026-08-17)
|
|
4
21
|
|
|
5
22
|
### Added
|
package/README.md
CHANGED
|
@@ -173,6 +173,7 @@ The key is stored only at `~/.memoryrouter/config.json` with mode `0600` in a mo
|
|
|
173
173
|
| `npx memoryrouter-claude doctor` | Diagnose config, permissions, hooks, project ID, pending capture, API, and MCP |
|
|
174
174
|
| `npx memoryrouter-claude status` | Show key, vault stats, consolidation debt, and active project scope |
|
|
175
175
|
| `npx memoryrouter-claude date-search` | Retrieve memories from a specific time window with tier and importance filters |
|
|
176
|
+
| `npx memoryrouter-claude inspect` | Drill down a memory's lineage by id: sources it consolidated and what it became |
|
|
176
177
|
| `npx memoryrouter-claude reflect` | Consolidate memories into reflections using your local `claude` CLI |
|
|
177
178
|
| `npx memoryrouter-claude mcp install` | Add the OAuth MCP manual surface with current Claude CLI syntax |
|
|
178
179
|
| `npx memoryrouter-claude mcp status` | Inspect MCP configuration |
|
|
@@ -189,6 +190,7 @@ npx memoryrouter-claude date-search --from 2026-08-10 #
|
|
|
189
190
|
npx memoryrouter-claude date-search --from 2026-08-01 --to 2026-08-15 --query "launches"
|
|
190
191
|
npx memoryrouter-claude date-search --from 2026-08-10 --tiers 2,3 --importance 7 # most important lately
|
|
191
192
|
npx memoryrouter-claude date-search --from 2026-08-10 --json # raw server response
|
|
193
|
+
npx memoryrouter-claude inspect --id <memory id> # lineage drill-down
|
|
192
194
|
```
|
|
193
195
|
|
|
194
196
|
Flags: `--from` (required, ISO 8601), `--to` (default now), `--query`, `--tiers 1,2,3` (only tiers 2 and 3 carry importance ratings), `--importance N` (minimum threshold 1 to 10; raw memories are excluded whenever this is set), `--max-tokens N` (1000 to 200000), `--json`. Truncated windows print a continuation cursor. The injected recall context also carries a one-line hint teaching Claude this exact pattern, so the agent can answer "what are the most important things we've done lately?" by itself.
|
package/bin/cli.js
CHANGED
|
@@ -52,21 +52,44 @@ Usage:
|
|
|
52
52
|
npx memoryrouter-claude date-search --from <ISO> [--to <ISO>] [--query <text>] [--tiers 1,2,3] [--importance N] [--max-tokens N] [--json]
|
|
53
53
|
Retrieve memories from a specific time window. Use for questions like
|
|
54
54
|
'what happened last week' or 'most important things this month or lately'.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
Tier guide: tier 3 holds the highest-level consolidated reflections
|
|
56
|
+
(identity, principles, what matters most), tier 2 holds reflections of
|
|
57
|
+
specific meaningful events, tier 1 holds raw verbatim memories. Match
|
|
58
|
+
filters to the question. Broad 'most important things last month'
|
|
59
|
+
questions: --tiers 3 --importance 8 with a generous --max-tokens.
|
|
60
|
+
Big-picture overviews of a period: --tiers 3 with no importance filter.
|
|
61
|
+
Specific lookups like 'find the decision about X': omit --tiers and
|
|
62
|
+
--importance; a high importance filter hides the specific detail you
|
|
63
|
+
are looking for. Specific events without raw noise: --tiers 2 or
|
|
64
|
+
--tiers 2,3. Exact verbatim detail: if the detail is not already in
|
|
65
|
+
context, drill down by lineage: search --tiers 3 to find the relevant
|
|
66
|
+
thread, then run inspect --id <memory id> to see the tier 2 reflections
|
|
67
|
+
it consolidated, then inspect those to reach the raw memories
|
|
68
|
+
underneath. Direct --tiers 1 search works when you know exact wording
|
|
69
|
+
to match. Mixing tiers is fine;
|
|
70
|
+
adjust the importance threshold to the question rather than always
|
|
71
|
+
setting it high. Only reflections (tiers 2 and 3) carry
|
|
72
|
+
importance ratings. Omit --query for a chronological review; include
|
|
73
|
+
--query to rank by relevance within the window. Resolve relative phrases
|
|
74
|
+
like 'lately' to concrete ISO dates before calling.
|
|
60
75
|
--from Window start, ISO 8601 date or datetime (required)
|
|
61
76
|
--to Window end, ISO 8601 date or datetime (default: now)
|
|
62
77
|
--query Optional relevance query (omit for chronological browse)
|
|
63
|
-
--tiers Comma-separated subset of 1,2,3 (
|
|
78
|
+
--tiers Comma-separated subset of 1,2,3 (3 highest-level reflections,
|
|
79
|
+
2 specific-event reflections, 1 raw; only 2 and 3 carry ratings)
|
|
64
80
|
--importance Minimum importance threshold, 1 to 10. Only reflections
|
|
65
81
|
(tiers 2 and 3) carry ratings, so raw memories are excluded
|
|
66
82
|
whenever this is set.
|
|
67
83
|
--max-tokens Token budget 1000 to 200000 (server default 50000)
|
|
68
84
|
--json Print the raw server response
|
|
69
85
|
|
|
86
|
+
npx memoryrouter-claude inspect --id <memory id> [--json]
|
|
87
|
+
Inspect a memory's consolidation lineage by id: its tier, the sources
|
|
88
|
+
it consolidated, and what it was consolidated into. Use repeatedly to
|
|
89
|
+
drill down from a high-level reflection to the tier 2 reflections and
|
|
90
|
+
raw memories beneath it. Memory ids come from date-search --json output
|
|
91
|
+
or a previous inspect.
|
|
92
|
+
|
|
70
93
|
npx memoryrouter-claude reflect [--tier 1|2] [--batches N|all] [--max-tokens N] [--dry-run]
|
|
71
94
|
Consolidate unconsolidated memories into reflections. Checks out a batch
|
|
72
95
|
under a 15 minute lease, runs YOUR local Claude Code (claude -p) with the
|
|
@@ -134,6 +157,7 @@ function parseArgs(argv) {
|
|
|
134
157
|
else if (value === '--file') args.file = argv[++i];
|
|
135
158
|
else if (value === '--dismiss') args.dismiss = true;
|
|
136
159
|
else if (value === '--final') args.final = true;
|
|
160
|
+
else if (value === '--id') args.id = argv[++i];
|
|
137
161
|
else if (value === '--from') args.from = argv[++i];
|
|
138
162
|
else if (value === '--to') args.to = argv[++i];
|
|
139
163
|
else if (value === '--query') args.query = argv[++i];
|
|
@@ -273,11 +297,16 @@ async function cmdStatus() {
|
|
|
273
297
|
|
|
274
298
|
async function cmdDateSearch(args) {
|
|
275
299
|
// Time-window retrieval. Use for questions like 'what happened last week'
|
|
276
|
-
// or 'most important things this month or lately'.
|
|
277
|
-
//
|
|
278
|
-
//
|
|
279
|
-
//
|
|
280
|
-
//
|
|
300
|
+
// or 'most important things this month or lately'. Tier guide: tier 3 holds
|
|
301
|
+
// the highest-level consolidated reflections (identity, principles, what
|
|
302
|
+
// matters most), tier 2 holds reflections of specific meaningful events,
|
|
303
|
+
// tier 1 holds raw verbatim memories. Broad 'most important' questions:
|
|
304
|
+
// --tiers 3 --importance 8. Big-picture overviews: --tiers 3 alone.
|
|
305
|
+
// Specific lookups: omit --tiers and --importance (high importance filters
|
|
306
|
+
// hide specific detail). Specific events: --tiers 2 or 2,3. Omit --query for a
|
|
307
|
+
// chronological review; include --query to rank by relevance within the
|
|
308
|
+
// window. Resolve relative phrases like 'lately' to concrete ISO dates
|
|
309
|
+
// before calling.
|
|
281
310
|
const key = getApiKey();
|
|
282
311
|
if (!key) throw new Error('No Memory Key configured. Run: npx memoryrouter-claude init');
|
|
283
312
|
if (!args.from) throw new Error('--from <ISO date or datetime> is required (e.g. --from 2026-08-10)');
|
|
@@ -320,7 +349,8 @@ async function cmdDateSearch(args) {
|
|
|
320
349
|
for (const row of rows) {
|
|
321
350
|
const tierTag = row.tier != null ? ` | tier ${row.tier}` : '';
|
|
322
351
|
const importanceTag = row.importance != null ? ` | importance ${row.importance}` : '';
|
|
323
|
-
|
|
352
|
+
const idTag = row.id ? ` | id ${row.id}` : '';
|
|
353
|
+
console.log(` [${row.date || 'unknown date'}${tierTag}${importanceTag}${idTag}]`);
|
|
324
354
|
console.log(` ${String(row.content || '').split('\n').join('\n ')}\n`);
|
|
325
355
|
}
|
|
326
356
|
if (data.truncated) {
|
|
@@ -487,6 +517,45 @@ async function cmdMcp(args) {
|
|
|
487
517
|
} else throw new Error(`Unknown mcp action: ${action}`);
|
|
488
518
|
}
|
|
489
519
|
|
|
520
|
+
async function cmdInspect(args) {
|
|
521
|
+
// Lineage drill-down. Use repeatedly to walk from a tier 3 reflection to
|
|
522
|
+
// the tier 2 reflections it consolidated and the raw memories underneath.
|
|
523
|
+
const key = getApiKey();
|
|
524
|
+
if (!key) throw new Error('No Memory Key configured. Run: npx memoryrouter-claude init');
|
|
525
|
+
const id = args.id || args._[1];
|
|
526
|
+
if (!id || typeof id !== 'string') throw new Error('--id <memory id> is required (from date-search --json or a previous inspect)');
|
|
527
|
+
const res = await api.inspect(key, String(id).trim(), { timeoutMs: 15000 });
|
|
528
|
+
if (!res.ok) {
|
|
529
|
+
if (res.status === 404) throw new Error('No memory with that id in the connected vault.');
|
|
530
|
+
const detail = res.data && res.data.error ? `: ${res.data.error}` : '';
|
|
531
|
+
throw new Error(`inspect failed (HTTP ${res.status})${detail}`);
|
|
532
|
+
}
|
|
533
|
+
const data = res.data || {};
|
|
534
|
+
if (args.json) {
|
|
535
|
+
console.log(JSON.stringify(data, null, 2));
|
|
536
|
+
return;
|
|
537
|
+
}
|
|
538
|
+
console.log(`\n Memory ${data.memory_id || id} | tier ${data.tier != null ? data.tier : 'unknown'}`);
|
|
539
|
+
if (data.covers && (data.covers.from || data.covers.to)) {
|
|
540
|
+
console.log(` Covers ${data.covers.from || 'unknown'} to ${data.covers.to || 'unknown'}`);
|
|
541
|
+
}
|
|
542
|
+
const sources = Array.isArray(data.sources) ? data.sources : [];
|
|
543
|
+
if (sources.length) {
|
|
544
|
+
console.log(`\n Consolidated from ${sources.length} source memories:`);
|
|
545
|
+
for (const src of sources) {
|
|
546
|
+
const tierTag = src.tier != null ? ` | tier ${src.tier}` : '';
|
|
547
|
+
console.log(` [id ${src.id}${tierTag}]`);
|
|
548
|
+
console.log(` ${String(src.content || '').split('\n').join('\n ')}\n`);
|
|
549
|
+
}
|
|
550
|
+
} else {
|
|
551
|
+
console.log(' No sources: this is a raw memory or an unconsolidated row.');
|
|
552
|
+
}
|
|
553
|
+
const into = Array.isArray(data.consolidated_into) ? data.consolidated_into : [];
|
|
554
|
+
if (into.length) {
|
|
555
|
+
console.log(` Consolidated into: ${into.join(', ')}`);
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
|
|
490
559
|
async function main() {
|
|
491
560
|
const args = parseArgs(process.argv.slice(2));
|
|
492
561
|
const cmd = args._[0];
|
|
@@ -496,6 +565,7 @@ async function main() {
|
|
|
496
565
|
case 'init': return cmdInit(args);
|
|
497
566
|
case 'status': return cmdStatus();
|
|
498
567
|
case 'date-search': return cmdDateSearch(args);
|
|
568
|
+
case 'inspect': return cmdInspect(args);
|
|
499
569
|
case 'reflect': return cmdReflect(args);
|
|
500
570
|
case 'reflect-auto': {
|
|
501
571
|
// Internal entrypoint for the detached automatic consolidation run
|
package/lib/hook-runner.js
CHANGED
|
@@ -97,7 +97,7 @@ function mergeContexts(results, identity, maxChars) {
|
|
|
97
97
|
: `MemoryRouter recall (project scope ${identity.id})`;
|
|
98
98
|
// One-line teaching hint: time-window and importance questions have a
|
|
99
99
|
// dedicated retrieval path the model cannot reach through /prepare.
|
|
100
|
-
const hint = "For time-window questions like 'what happened last week' or 'most important things lately', run: npx memoryrouter-claude date-search --from <ISO
|
|
100
|
+
const hint = "For time-window questions like 'what happened last week' or 'most important things lately', run: npx memoryrouter-claude date-search --from <ISO>. Tier guide: tier 3 holds the highest-level consolidated reflections (identity, principles, what matters most), tier 2 holds reflections of specific meaningful events, tier 1 holds raw verbatim memories. Match filters to the question: broad 'most important' questions use --tiers 3 --importance 8; big-picture overviews use --tiers 3 with no importance filter; specific lookups omit --tiers and --importance (a high importance filter hides the specific detail); specific events without raw noise use --tiers 2 or --tiers 2,3; for exact verbatim detail not already in context, search --tiers 3 then drill down by lineage with npx memoryrouter-claude inspect --id <memory id> through tier 2 to the raw memories (direct --tiers 1 works when you know exact wording). Mixing tiers is fine; only reflections carry ratings. Resolve relative phrases to concrete ISO dates first.";
|
|
101
101
|
return compactText(`${header}\n${hint}\n${sections.join('\n\n')}`, maxChars);
|
|
102
102
|
}
|
|
103
103
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "memoryrouter-claude",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"description": "Deterministic, project-scoped persistent memory for Claude Code: automatic hook retrieval/capture plus an optional OAuth MCP control surface.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "John Rood <john@memoryrouter.ai>",
|