memoryrouter-claude 2.6.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 +11 -0
- package/README.md +2 -0
- package/bin/cli.js +56 -2
- package/lib/hook-runner.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
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
|
+
|
|
3
14
|
## 2.6.0 (2026-08-17)
|
|
4
15
|
|
|
5
16
|
### Changed
|
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
|
@@ -61,7 +61,12 @@ Usage:
|
|
|
61
61
|
Specific lookups like 'find the decision about X': omit --tiers and
|
|
62
62
|
--importance; a high importance filter hides the specific detail you
|
|
63
63
|
are looking for. Specific events without raw noise: --tiers 2 or
|
|
64
|
-
--tiers 2,3. Exact verbatim detail:
|
|
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;
|
|
65
70
|
adjust the importance threshold to the question rather than always
|
|
66
71
|
setting it high. Only reflections (tiers 2 and 3) carry
|
|
67
72
|
importance ratings. Omit --query for a chronological review; include
|
|
@@ -78,6 +83,13 @@ Usage:
|
|
|
78
83
|
--max-tokens Token budget 1000 to 200000 (server default 50000)
|
|
79
84
|
--json Print the raw server response
|
|
80
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
|
+
|
|
81
93
|
npx memoryrouter-claude reflect [--tier 1|2] [--batches N|all] [--max-tokens N] [--dry-run]
|
|
82
94
|
Consolidate unconsolidated memories into reflections. Checks out a batch
|
|
83
95
|
under a 15 minute lease, runs YOUR local Claude Code (claude -p) with the
|
|
@@ -145,6 +157,7 @@ function parseArgs(argv) {
|
|
|
145
157
|
else if (value === '--file') args.file = argv[++i];
|
|
146
158
|
else if (value === '--dismiss') args.dismiss = true;
|
|
147
159
|
else if (value === '--final') args.final = true;
|
|
160
|
+
else if (value === '--id') args.id = argv[++i];
|
|
148
161
|
else if (value === '--from') args.from = argv[++i];
|
|
149
162
|
else if (value === '--to') args.to = argv[++i];
|
|
150
163
|
else if (value === '--query') args.query = argv[++i];
|
|
@@ -336,7 +349,8 @@ async function cmdDateSearch(args) {
|
|
|
336
349
|
for (const row of rows) {
|
|
337
350
|
const tierTag = row.tier != null ? ` | tier ${row.tier}` : '';
|
|
338
351
|
const importanceTag = row.importance != null ? ` | importance ${row.importance}` : '';
|
|
339
|
-
|
|
352
|
+
const idTag = row.id ? ` | id ${row.id}` : '';
|
|
353
|
+
console.log(` [${row.date || 'unknown date'}${tierTag}${importanceTag}${idTag}]`);
|
|
340
354
|
console.log(` ${String(row.content || '').split('\n').join('\n ')}\n`);
|
|
341
355
|
}
|
|
342
356
|
if (data.truncated) {
|
|
@@ -503,6 +517,45 @@ async function cmdMcp(args) {
|
|
|
503
517
|
} else throw new Error(`Unknown mcp action: ${action}`);
|
|
504
518
|
}
|
|
505
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
|
+
|
|
506
559
|
async function main() {
|
|
507
560
|
const args = parseArgs(process.argv.slice(2));
|
|
508
561
|
const cmd = args._[0];
|
|
@@ -512,6 +565,7 @@ async function main() {
|
|
|
512
565
|
case 'init': return cmdInit(args);
|
|
513
566
|
case 'status': return cmdStatus();
|
|
514
567
|
case 'date-search': return cmdDateSearch(args);
|
|
568
|
+
case 'inspect': return cmdInspect(args);
|
|
515
569
|
case 'reflect': return cmdReflect(args);
|
|
516
570
|
case 'reflect-auto': {
|
|
517
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>. 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. Mixing tiers is fine; only reflections carry ratings. Resolve relative phrases to concrete ISO dates first.";
|
|
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.6.
|
|
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>",
|