@danielmarbach/mnemonic-mcp 0.26.2 → 0.27.0
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 +12 -0
- package/README.md +10 -4
- package/build/consolidate.d.ts +21 -0
- package/build/consolidate.d.ts.map +1 -1
- package/build/consolidate.js +124 -0
- package/build/consolidate.js.map +1 -1
- package/build/index.js +158 -18
- package/build/index.js.map +1 -1
- package/build/structured-content.d.ts +218 -0
- package/build/structured-content.d.ts.map +1 -1
- package/build/structured-content.js +77 -0
- package/build/structured-content.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,18 @@ The format is loosely based on Keep a Changelog and uses semver-style version he
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.27.0] - 2026-04-28
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- `recall` supports optional `evidence: "compact"` for per-result retrieval rationale (channels, rank band, freshness, supersession signals).
|
|
14
|
+
- Consolidation strategies support optional `evidence: true` for per-note merge evidence, warnings, and risk classification.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Consolidation evidence defaults on for safety — `detect-duplicates`, `suggest-merges`, `dry-run`, and `execute-merge` surface trust signals by default.
|
|
19
|
+
- Warnings identify which note they apply to; risk reflects each note's own signals rather than group heuristics.
|
|
20
|
+
|
|
9
21
|
## [0.26.2] - 2026-04-26
|
|
10
22
|
|
|
11
23
|
### Fixed
|
package/README.md
CHANGED
|
@@ -362,6 +362,12 @@ Recall modes:
|
|
|
362
362
|
- `mode: "temporal"`: enrich top matches with compact git-backed history (no raw diffs by default).
|
|
363
363
|
- `mode: "workflow"`: prioritize RPIR-style chain reconstruction while remaining compatible with legacy `related-to` links.
|
|
364
364
|
|
|
365
|
+
Recall evidence:
|
|
366
|
+
|
|
367
|
+
- `evidence: "compact"` (optional recall): add compact retrieval rationale per result in text and structured output.
|
|
368
|
+
- `retrievalEvidence` includes stable abstractions such as `channels`, `rankBand`, `projectRelevant`, `freshness`, and optional supersession hints (`supersededBy`, `supersededCount`).
|
|
369
|
+
- Recall evidence defaults off; consolidate evidence defaults `true` for safety.
|
|
370
|
+
|
|
365
371
|
**What temporal mode shows:**
|
|
366
372
|
|
|
367
373
|
- **Per-change descriptions** (`changeDescription`): human-readable summaries like "Expanded the note with additional detail" or "Minor refinement to existing content."
|
|
@@ -503,13 +509,13 @@ Imported notes are written to the main vault with `lifecycle: permanent` and `sc
|
|
|
503
509
|
| Prompt | Description |
|
|
504
510
|
|--------|-------------|
|
|
505
511
|
| `mnemonic-rpi-workflow` | Optional. Returns RPIR stage protocol and conventions: request root note pattern, stage checklists, apply/task split, sparse relationships, subagent handoff contract, and commit discipline. |
|
|
506
|
-
| `mnemonic-workflow-hint` | Optional. Returns a compact decision protocol: use `recall` or `list` first, inspect with `get`, update existing memories, remember only when nothing matches, then organize with `relate`, `consolidate`, or `move_memory`. It also reinforces summary-first orientation via `project_memory_summary`, temporary-note recovery only after orientation, and that roles are optional prioritization hints while lifecycle stays separate. |
|
|
512
|
+
| `mnemonic-workflow-hint` | Optional. Returns a compact decision protocol: use `recall` or `list` first, inspect with `get`, update existing memories, remember only when nothing matches, then organize with `relate`, `consolidate`, or `move_memory`. It also reinforces summary-first orientation via `project_memory_summary`, temporary-note recovery only after orientation, evidence on for safety during consolidation (lifecycle, risk, warnings), and that roles are optional prioritization hints while lifecycle stays separate. |
|
|
507
513
|
|
|
508
514
|
## Tools
|
|
509
515
|
|
|
510
516
|
| Tool | Description |
|
|
511
517
|
|-----------------------------|--------------------------------------------------------------------------|
|
|
512
|
-
| `consolidate` | Merge
|
|
518
|
+
| `consolidate` | Merge and analyze overlapping notes; evidence defaults `true` for analysis strategies and execute-merge (lifecycle, risk, warnings) |
|
|
513
519
|
| `detect_project` | Resolve `cwd` to stable project id via git remote URL |
|
|
514
520
|
| `discover_tags` | Suggest canonical tags for a note using title/content/query context; `mode: "browse"` opts into broader inventory output |
|
|
515
521
|
| `execute_migration` | Execute a named migration (supports dry-run) |
|
|
@@ -522,7 +528,7 @@ Imported notes are written to the main vault with `lifecycle: permanent` and `sc
|
|
|
522
528
|
| `memory_graph` | Show compact adjacency list of relationships |
|
|
523
529
|
| `move_memory` | Move note between vaults without changing id |
|
|
524
530
|
| `project_memory_summary` | Session-start entrypoint: themed notes, anchors, and orientation for fast project orientation |
|
|
525
|
-
| `recall` | Semantic search with optional project boost, temporal
|
|
531
|
+
| `recall` | Semantic search with optional project boost, temporal/workflow modes, and optional `evidence: "compact"` rationale |
|
|
526
532
|
| `recent_memories` | Show most recently updated notes for scope |
|
|
527
533
|
| `remember` | Write note + embedding; `cwd` sets context, `scope` picks storage, `lifecycle` picks temporary vs permanent |
|
|
528
534
|
| `relate` | Create typed relationship between notes (bidirectional) |
|
|
@@ -608,7 +614,7 @@ No. The embeddings here are **local vector representations** generated by Ollama
|
|
|
608
614
|
|
|
609
615
|
**Why do project memories appear first in `recall` results even when global memories are more similar?**
|
|
610
616
|
|
|
611
|
-
When you call `recall` with `cwd`, mnemonic adds a fixed
|
|
617
|
+
When you call `recall` with `cwd`, mnemonic adds a small fixed project tiebreaker (**currently +0.03**) to notes belonging to the detected project. This is a soft boost, not a hard filter — global memories are still included when relevant. The tiebreaker helps project context float to the top without overwhelming stronger global matches.
|
|
612
618
|
|
|
613
619
|
**I want to brainstorm with no repo yet. Should I create a temp folder first?**
|
|
614
620
|
|
package/build/consolidate.d.ts
CHANGED
|
@@ -1,7 +1,28 @@
|
|
|
1
1
|
import type { Note, Relationship } from "./storage.js";
|
|
2
2
|
import type { ConsolidationMode } from "./project-memory-policy.js";
|
|
3
|
+
export type MergeRisk = "low" | "medium" | "high";
|
|
4
|
+
export interface ConsolidateNoteEvidence {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
lifecycle: "temporary" | "permanent";
|
|
8
|
+
role?: Note["role"];
|
|
9
|
+
ageDays: number;
|
|
10
|
+
superseded: boolean;
|
|
11
|
+
supersededBy?: string;
|
|
12
|
+
supersededCount?: number;
|
|
13
|
+
relatedCount: number;
|
|
14
|
+
warnings?: string[];
|
|
15
|
+
mergeRisk: MergeRisk;
|
|
16
|
+
}
|
|
17
|
+
type NoteForWarnings = Pick<Note, "id" | "title" | "lifecycle" | "role" | "updatedAt" | "relatedTo">;
|
|
18
|
+
export declare function buildNoteWarnings(note: NoteForWarnings, allNotes: NoteForWarnings[], targetNote?: Pick<Note, "id" | "updatedAt">): string[];
|
|
19
|
+
export declare function buildGroupWarnings(notes: NoteForWarnings[], targetNote?: Pick<Note, "id" | "updatedAt">): string[];
|
|
20
|
+
export declare function deriveMergeRisk(warnings: string[]): MergeRisk;
|
|
21
|
+
export declare function aggregateMergeRisk(noteRisks: MergeRisk[]): MergeRisk;
|
|
22
|
+
export declare function buildConsolidateNoteEvidence(note: NoteForWarnings, allNotes: NoteForWarnings[], targetNote?: Pick<Note, "id" | "updatedAt">, now?: Date): ConsolidateNoteEvidence;
|
|
3
23
|
export declare function normalizeMergePlanSourceIds(sourceIds: string[]): string[];
|
|
4
24
|
export declare function mergeRelationshipsFromNotes(notes: Array<Pick<Note, "relatedTo">>, sourceIds: Set<string>): Relationship[];
|
|
5
25
|
export declare function filterRelationships(relationships: Relationship[] | undefined, noteIds: Iterable<string>): Relationship[] | undefined;
|
|
6
26
|
export declare function resolveEffectiveConsolidationMode(sourceNotes: Array<Pick<Note, "lifecycle">>, fallbackMode: ConsolidationMode, explicitMode?: ConsolidationMode): ConsolidationMode;
|
|
27
|
+
export {};
|
|
7
28
|
//# sourceMappingURL=consolidate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consolidate.d.ts","sourceRoot":"","sources":["../src/consolidate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACvD,OA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YAAY,EAAE,GAAG,SAAS,CAY5B;AAED,wBAAgB,iCAAiC,CAC/C,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,EAC3C,YAAY,EAAE,iBAAiB,EAC/B,YAAY,CAAC,EAAE,iBAAiB,GAC/B,iBAAiB,CAUnB"}
|
package/build/consolidate.js
CHANGED
|
@@ -1,3 +1,127 @@
|
|
|
1
|
+
function noteAgeDays(updatedAt, now = new Date()) {
|
|
2
|
+
const updated = new Date(updatedAt);
|
|
3
|
+
if (Number.isNaN(updated.getTime())) {
|
|
4
|
+
return 0;
|
|
5
|
+
}
|
|
6
|
+
const diffMs = now.getTime() - updated.getTime();
|
|
7
|
+
return Math.max(0, diffMs / (1000 * 60 * 60 * 24));
|
|
8
|
+
}
|
|
9
|
+
function buildSupersededByMap(notes) {
|
|
10
|
+
const inbound = new Map();
|
|
11
|
+
for (const note of notes) {
|
|
12
|
+
for (const rel of note.relatedTo ?? []) {
|
|
13
|
+
if (rel.type !== "supersedes")
|
|
14
|
+
continue;
|
|
15
|
+
if (!inbound.has(rel.id)) {
|
|
16
|
+
inbound.set(rel.id, note.id);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return inbound;
|
|
21
|
+
}
|
|
22
|
+
function isTemporaryResearchNote(note) {
|
|
23
|
+
return note.lifecycle === "temporary" && note.role === "research";
|
|
24
|
+
}
|
|
25
|
+
function majorityLifecycle(notes) {
|
|
26
|
+
const counts = new Map();
|
|
27
|
+
for (const note of notes) {
|
|
28
|
+
counts.set(note.lifecycle, (counts.get(note.lifecycle) ?? 0) + 1);
|
|
29
|
+
}
|
|
30
|
+
let best;
|
|
31
|
+
let bestCount = 0;
|
|
32
|
+
for (const [lc, count] of counts) {
|
|
33
|
+
if (count > bestCount) {
|
|
34
|
+
best = lc;
|
|
35
|
+
bestCount = count;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
const total = [...counts.values()].reduce((a, b) => a + b, 0);
|
|
39
|
+
if (bestCount <= total - bestCount) {
|
|
40
|
+
return undefined;
|
|
41
|
+
}
|
|
42
|
+
return best;
|
|
43
|
+
}
|
|
44
|
+
export function buildNoteWarnings(note, allNotes, targetNote) {
|
|
45
|
+
const warnings = [];
|
|
46
|
+
if (isTemporaryResearchNote(note)) {
|
|
47
|
+
warnings.push("temporary research - consider whether it contains unique evidence");
|
|
48
|
+
}
|
|
49
|
+
const supersedesCount = (note.relatedTo ?? []).filter((rel) => rel.type === "supersedes").length;
|
|
50
|
+
if (supersedesCount > 0) {
|
|
51
|
+
warnings.push(`supersedes ${supersedesCount} other${supersedesCount > 1 ? "s" : ""} - merging may orphan the supersedes chain`);
|
|
52
|
+
}
|
|
53
|
+
if (targetNote && targetNote.id === note.id) {
|
|
54
|
+
const targetUpdatedAt = new Date(targetNote.updatedAt);
|
|
55
|
+
if (!Number.isNaN(targetUpdatedAt.getTime())) {
|
|
56
|
+
const newerCount = allNotes
|
|
57
|
+
.filter((n) => n.id !== targetNote.id)
|
|
58
|
+
.reduce((count, n) => {
|
|
59
|
+
const updated = new Date(n.updatedAt);
|
|
60
|
+
return !Number.isNaN(updated.getTime()) && updated.getTime() > targetUpdatedAt.getTime()
|
|
61
|
+
? count + 1
|
|
62
|
+
: count;
|
|
63
|
+
}, 0);
|
|
64
|
+
if (newerCount > 0) {
|
|
65
|
+
warnings.push(`target is older than ${newerCount} source${newerCount > 1 ? "s" : ""} - stale summary risk`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
if (note.role) {
|
|
70
|
+
const majority = majorityLifecycle(allNotes);
|
|
71
|
+
if (majority && note.lifecycle !== majority) {
|
|
72
|
+
warnings.push(`lifecycle (${note.lifecycle}) differs from group majority (${majority})`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return warnings;
|
|
76
|
+
}
|
|
77
|
+
export function buildGroupWarnings(notes, targetNote) {
|
|
78
|
+
const warnings = [];
|
|
79
|
+
for (const note of notes) {
|
|
80
|
+
const noteWarnings = buildNoteWarnings(note, notes, targetNote);
|
|
81
|
+
for (const w of noteWarnings) {
|
|
82
|
+
warnings.push(`${note.title}: ${w}`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return warnings;
|
|
86
|
+
}
|
|
87
|
+
export function deriveMergeRisk(warnings) {
|
|
88
|
+
if (warnings.length === 0) {
|
|
89
|
+
return "low";
|
|
90
|
+
}
|
|
91
|
+
const hasCritical = warnings.some((warning) => warning.includes("supersedes chain")
|
|
92
|
+
|| warning.includes("stale summary risk"));
|
|
93
|
+
if (hasCritical) {
|
|
94
|
+
return "high";
|
|
95
|
+
}
|
|
96
|
+
if (warnings.length >= 2) {
|
|
97
|
+
return "high";
|
|
98
|
+
}
|
|
99
|
+
return "medium";
|
|
100
|
+
}
|
|
101
|
+
export function aggregateMergeRisk(noteRisks) {
|
|
102
|
+
const riskOrder = { low: 0, medium: 1, high: 2 };
|
|
103
|
+
if (noteRisks.length === 0)
|
|
104
|
+
return "low";
|
|
105
|
+
return noteRisks.reduce((max, r) => riskOrder[r] > riskOrder[max] ? r : max, "low");
|
|
106
|
+
}
|
|
107
|
+
export function buildConsolidateNoteEvidence(note, allNotes, targetNote, now = new Date()) {
|
|
108
|
+
const supersededByMap = buildSupersededByMap(allNotes);
|
|
109
|
+
const supersedes = (note.relatedTo ?? []).filter((rel) => rel.type === "supersedes");
|
|
110
|
+
const noteWarnings = buildNoteWarnings(note, allNotes, targetNote);
|
|
111
|
+
return {
|
|
112
|
+
id: note.id,
|
|
113
|
+
title: note.title,
|
|
114
|
+
lifecycle: note.lifecycle,
|
|
115
|
+
role: note.role,
|
|
116
|
+
ageDays: noteAgeDays(note.updatedAt, now),
|
|
117
|
+
superseded: supersedes.length > 0,
|
|
118
|
+
supersededBy: supersededByMap.get(note.id),
|
|
119
|
+
supersededCount: supersedes.length > 0 ? supersedes.length : undefined,
|
|
120
|
+
relatedCount: note.relatedTo?.length ?? 0,
|
|
121
|
+
warnings: noteWarnings.length > 0 ? noteWarnings : undefined,
|
|
122
|
+
mergeRisk: deriveMergeRisk(noteWarnings),
|
|
123
|
+
};
|
|
124
|
+
}
|
|
1
125
|
export function normalizeMergePlanSourceIds(sourceIds) {
|
|
2
126
|
return Array.from(new Set(sourceIds));
|
|
3
127
|
}
|
package/build/consolidate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consolidate.js","sourceRoot":"","sources":["../src/consolidate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"consolidate.js","sourceRoot":"","sources":["../src/consolidate.ts"],"names":[],"mappings":"AAmBA,SAAS,WAAW,CAAC,SAAiB,EAAE,MAAY,IAAI,IAAI,EAAE;IAC5D,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;IACpC,IAAI,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;QACpC,OAAO,CAAC,CAAC;IACX,CAAC;IAED,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IACjD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;AACrD,CAAC;AAED,SAAS,oBAAoB,CAAC,KAA4C;IACxE,MAAM,OAAO,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC1C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,SAAS,IAAI,EAAE,EAAE,CAAC;YACvC,IAAI,GAAG,CAAC,IAAI,KAAK,YAAY;gBAAE,SAAS;YACxC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;gBACzB,OAAO,CAAC,GAA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