toon-memory 2.11.0 → 3.1.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/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [English](README.md) | [Español](README.es.md) | [中文](README.zh.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [Português (BR)](README.pt-br.md) | [Deutsch](README.de.md) | [Français](README.fr.md)
2
+
1
3
  # toon-memory
2
4
 
3
5
  > MCP memory server for AI coding agents — remember decisions, patterns, and bugs between sessions.
@@ -61,7 +63,7 @@ Read [How toon-memory Makes Your AI Agent Smarter](https://luiggival08.github.io
61
63
 
62
64
  ## Features
63
65
 
64
- - **21 MCP tools** — Full memory management via Model Context Protocol, including `memory_smart_recall` (unified recall), `memory_sessions` for multi-session coordination, and `context_*` tools for one-call context generation (briefing, diff, focus, health audit, export)
66
+ - **29 MCP tools** — Full memory management via Model Context Protocol, including `memory_smart_recall` (unified recall), `memory_sessions` for multi-session coordination, `context_*` tools for one-call context generation (briefing, diff, focus, health audit, export), `memory_compress` (LLM-powered compression), `memory_compress_all` (batch compression), `memory_primer` (auto-injected context), `memory_merge_sessions` (cross-session merge), and `memory_export_gist`/`memory_import_gist` (GitHub Gist sync)
65
67
  - **MCP Resources** — Read memory as context without tool invocations, including a System Primer (auto-generated knowledge map)
66
68
  - **15 agents supported** — OpenCode, VS Code, Claude Code, Cursor, Windsurf, Cline, Continue, Codex CLI, Gemini CLI, Zed, Antigravity, Aider, KiloCode, OpenClaw, Kiro
67
69
  - **Interactive installer** — Select which agents to configure from a menu
@@ -83,11 +85,16 @@ Read [How toon-memory Makes Your AI Agent Smarter](https://luiggival08.github.io
83
85
  - **BM25 + centrality ranking** — Recall re-ranks by BM25 relevance and graph centrality (hubs surface even without the query word); per-hop decay keeps distant nodes low
84
86
  - **Auto-tag from dependencies** — `toon-memory init` scans `package.json`/`Cargo.toml`/`requirements.txt`/`go.mod` and writes a project vocabulary so entries mentioning a dependency get auto-tagged with it
85
87
  - **Smart Recall** — `memory_smart_recall` combines BM25 + graph + decay + quality in one call; the LLM calls this at the start of every task
86
- - **Quality scoring** — Every entry gets a 0–1 quality score based on structure (tags, links, content specificity, recency); high-quality entries surface first
88
+ - **Quality scoring** — Every entry gets a 0–1 quality score based on structure (tags, links, content specificity, recency, access count); high-quality entries surface first
87
89
  - **Merge-dedup** — Saving with the same `key` merges attributes (union of tags, max confidence, latest date, combined links) instead of overwriting
90
+ - **Near-duplicate detection** — Consolidation detects near-duplicates via Jaccard similarity (threshold 0.7) and merges them
88
91
  - **Confidence score** — Each entry tracks reliability: user-asserted = 1.0, inferred = 0.65–0.75
92
+ - **LLM-powered compression** — `memory_compress` uses AI to summarize long entries; `memory_compress_all` does batch compression deterministically
93
+ - **Cross-session merge** — `memory_merge_sessions` merges observations across parallel sessions for a file
94
+ - **GitHub Gist sync** — `memory_export_gist` and `memory_import_gist` sync memory entries via GitHub Gist (zero dependencies)
95
+ - **Verbatim mode** — `config.verbatim` preserves original entries instead of overwriting on save
89
96
  - **Context generation tools** — `context_generate` (full briefing), `context_diff` (incremental), `context_focus` (targeted), `context_health` (audit), `context_export` (markdown) — each replaces 5-6 manual tool calls. Zero LLM, pure deterministic aggregation
90
- - **System Primer** — Auto-generated knowledge map exposed as MCP resource; agents load it at session start for instant context
97
+ - **System Primer** — Auto-injected at session start via `systemPrimer()`, showing top 5 memories for instant context
91
98
 
92
99
  ---
93
100
 
@@ -140,7 +147,7 @@ memory_remember # Save important decisions
140
147
  |-------|-----------------|--------|-------|------------|
141
148
  | **OpenCode** | `.opencode/opencode.json` + `.opencode/plugins/toon-memory.ts` | Plugin | SessionStart (plugin, no top-level `hooks`) | ✅ |
142
149
  | **VS Code / Copilot** | `.vscode/mcp.json` | JSON | — | ✅ |
143
- | **Claude Code** | `.claude/settings.json` | JSON | SessionStart + PostToolUse + Stop | ✅ |
150
+ | **Claude Code** | `.mcp.json` (MCP) + `.claude/settings.json` (hooks) | JSON | SessionStart + PostToolUse + Stop | ✅ |
144
151
  | **Cursor** | `.cursor/mcp.json` | JSON | — | ✅ |
145
152
  | **Windsurf** | `~/.codeium/windsurf/mcp_config.json` | JSON | — | ✅ |
146
153
  | **Cline** | `.cline/mcp.json` | JSON | — | ✅ |
@@ -148,7 +155,7 @@ memory_remember # Save important decisions
148
155
  | **Codex CLI** | `.codex/config.toml` | TOML | SessionStart + PostToolUse + Stop (`[[hooks]] event=`) | ✅ |
149
156
  | **Gemini CLI** | `.gemini/settings.json` | JSON | SessionStart + PostToolUse + Stop (`hooks.*`) | ✅ |
150
157
  | **Zed** | `~/.config/zed/settings.json` | JSONC | — | ✅ |
151
- | **Antigravity** | `.gemini/config/mcp_config.json` + `.gemini/config/hooks.json` | hooks.json | PreInvocation + PostToolUse + Stop (no SessionStart event) | ✅ |
158
+ | **Antigravity** | `.agents/mcp_config.json` + `.agents/hooks.json` | hooks.json | PreInvocation + PostToolUse + Stop (no SessionStart event) | ✅ |
152
159
  | **Aider** | — | — | — | 📝 Instructions |
153
160
  | **KiloCode** | `~/.kilocode/mcp_settings.json` | JSON | — | ✅ |
154
161
  | **OpenClaw** | `.openclaw.json` | JSON | — | ✅ |
@@ -177,6 +184,14 @@ memory_remember # Save important decisions
177
184
  | `memory_captured` | List activity auto-captured by hooks (opt-in) or clear the log |
178
185
  | `memory_consolidate` | Merge-dedup entries: same-key entries are merged (tags union, max confidence, latest date), then exact-content duplicates removed (deterministic, no LLM) |
179
186
  | `memory_sessions` | Show active agent sessions (branch, files, last-seen) and soft conflicts for parallel work |
187
+ | `memory_compress` | LLM-powered two-step compression: summarize + overwrite. Uses `anthropic`/`openai` CLI if available, otherwise returns prompt for manual compression |
188
+ | `memory_compress_all` | Batch compression: overwrites all entries under 100 tokens with a compressed version. Deterministic, no LLM |
189
+ | `memory_primer` | One-call context primer: top memories + categories + session file changes. Auto-injected at session start |
190
+ | `memory_merge_sessions` | Merge observations across parallel sessions for a file. Deduplicates and optionally auto-promotes to memory |
191
+ | `memory_export_gist` | Export memory entries to a GitHub Gist (public or private). Uses `GITHUB_TOKEN` or `gh` CLI |
192
+ | `memory_import_gist` | Import entries from a GitHub Gist. Merges with existing entries (union of tags, max confidence) |
193
+ | `memory_merge_similar` | Find entries with >50% word similarity (Jaccard) and merge them deterministically. No LLM needed |
194
+ | `memory_graph_path` | BFS shortest path between two entries in the knowledge graph. Shows how concepts are connected |
180
195
  | `context_brief` | **One-call context briefing**: memory + sessions + health in compact markdown. Use instead of 5-6 separate memory_* calls. Zero LLM, pure deterministic aggregation |
181
196
  | `context_generate` | **Full project briefing**: combines project structure, git state, memory entries, and active sessions in one call. Replaces 5-6 manual tool calls |
182
197
  | `context_diff` | **Incremental briefing**: git commits + modified files + new/updated memory + active sessions since last session |
@@ -828,7 +843,7 @@ Add to `.opencode/opencode.json` or `~/.config/opencode/opencode.json`:
828
843
 
829
844
  ### Claude Code
830
845
 
831
- Add to `.claude/settings.json`:
846
+ Add to `.mcp.json` (project root):
832
847
 
833
848
  ```json
834
849
  {
@@ -1157,7 +1172,7 @@ toon-memory/
1157
1172
  │ │ ├── setup.ts # CLI commands
1158
1173
  │ │ └── toon-memory.ts # CLI runner
1159
1174
  │ ├── mcp/
1160
- │ │ └── server.ts # MCP server (21 tools + 3 resources)
1175
+ │ │ └── server.ts # MCP server (29 tools + 3 resources)
1161
1176
  │ ├── lib/
1162
1177
  │ │ ├── lock.ts # Advisory file lock + atomic write
1163
1178
  │ │ ├── sessions.ts # Multi-session coordination