toon-memory 3.1.0 → 3.3.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 +140 -5
- package/dist/cli/setup.js +1265 -6
- package/mcp/server.js +44861 -29662
- package/package.json +7 -2
- package/src/cli/constants.ts +4 -0
- package/src/cli/setup.ts +16 -7
- package/src/lib/checkpoint.ts +132 -0
- package/src/lib/graph.ts +16 -0
- package/src/mcp/config.ts +5 -0
- package/src/mcp/prompts.ts +55 -0
- package/src/mcp/resources.ts +21 -2
- package/src/mcp/server.ts +22 -3
- package/src/mcp/session-store.ts +276 -0
- package/src/mcp/tools.ts +31 -1
- package/src/viewer/d3.v7.min.js +2 -0
- package/src/viewer/data.ts +48 -0
- package/src/viewer/html.ts +922 -0
- package/src/viewer/index.ts +76 -0
- package/src/viewer/server.ts +1 -0
- package/src/viewer/types.ts +29 -0
package/README.md
CHANGED
|
@@ -8,15 +8,16 @@
|
|
|
8
8
|
[](https://opensource.org/licenses/MIT)
|
|
9
9
|
[](https://github.com/LuiggiVal08/toon-memory/actions/workflows/ci.yml)
|
|
10
10
|
[](https://luiggival08.github.io/toon-memory/)
|
|
11
|
+
[](https://lobehub.com/mcp/luiggival08-toon-memory)
|
|
11
12
|
|
|
12
13
|
---
|
|
13
14
|
|
|
14
15
|
## Table of Contents
|
|
15
16
|
|
|
16
|
-
- [
|
|
17
|
+
- [Overview](#overview)
|
|
17
18
|
- [Blog Post](#blog-post)
|
|
18
19
|
- [Features](#features)
|
|
19
|
-
- [
|
|
20
|
+
- [Installation](#installation)
|
|
20
21
|
- [Supported Agents](#supported-agents)
|
|
21
22
|
- [MCP Tools](#mcp-tools)
|
|
22
23
|
- [Coordinación multi-sesión](#coordinación-multi-sesión)
|
|
@@ -30,11 +31,12 @@
|
|
|
30
31
|
- [FAQ](#faq)
|
|
31
32
|
- [Development](#development)
|
|
32
33
|
- [Contributing](#contributing)
|
|
34
|
+
- [Security & Privacy](#security--privacy)
|
|
33
35
|
- [License](#license)
|
|
34
36
|
|
|
35
37
|
---
|
|
36
38
|
|
|
37
|
-
##
|
|
39
|
+
## Overview
|
|
38
40
|
|
|
39
41
|
Ever had that feeling where your AI agent forgets everything from yesterday's session? You explain the same architecture decision for the third time, and it still suggests the approach you already rejected?
|
|
40
42
|
|
|
@@ -98,7 +100,7 @@ Read [How toon-memory Makes Your AI Agent Smarter](https://luiggival08.github.io
|
|
|
98
100
|
|
|
99
101
|
---
|
|
100
102
|
|
|
101
|
-
##
|
|
103
|
+
## Installation
|
|
102
104
|
|
|
103
105
|
### 1. Install
|
|
104
106
|
|
|
@@ -139,6 +141,53 @@ memory_remember # Save important decisions
|
|
|
139
141
|
|
|
140
142
|
> **Tip:** Always run `memory_recall` at the start of a session. Your agent will have context from previous sessions instantly.
|
|
141
143
|
|
|
144
|
+
### MCP Client Quick Setup
|
|
145
|
+
|
|
146
|
+
#### Cursor
|
|
147
|
+
|
|
148
|
+
Add to `.cursor/mcp.json`:
|
|
149
|
+
|
|
150
|
+
```json
|
|
151
|
+
{
|
|
152
|
+
"mcpServers": {
|
|
153
|
+
"toon-memory": {
|
|
154
|
+
"command": "npx",
|
|
155
|
+
"args": ["-y", "toon-memory", "mcp"]
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
#### Claude Desktop
|
|
162
|
+
|
|
163
|
+
Add to `claude_desktop_config.json`:
|
|
164
|
+
|
|
165
|
+
```json
|
|
166
|
+
{
|
|
167
|
+
"mcpServers": {
|
|
168
|
+
"toon-memory": {
|
|
169
|
+
"command": "npx",
|
|
170
|
+
"args": ["-y", "toon-memory", "mcp"]
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
#### Windsurf
|
|
177
|
+
|
|
178
|
+
Add to `~/.codeium/windsurf/mcp_config.json`:
|
|
179
|
+
|
|
180
|
+
```json
|
|
181
|
+
{
|
|
182
|
+
"mcpServers": {
|
|
183
|
+
"toon-memory": {
|
|
184
|
+
"command": "npx",
|
|
185
|
+
"args": ["-y", "toon-memory", "mcp"]
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
142
191
|
---
|
|
143
192
|
|
|
144
193
|
## Supported Agents
|
|
@@ -206,9 +255,16 @@ Memory is also exposed as MCP resources for direct context reading:
|
|
|
206
255
|
| Resource | URI | Description |
|
|
207
256
|
|----------|-----|-------------|
|
|
208
257
|
| Memory Entries | `toon://memory/entries` | Full memory dump |
|
|
258
|
+
| Current Memory | `toon://memory/current` | Current memory state with recent entries |
|
|
209
259
|
| Memory Stats | `toon://memory/stats` | Category counts and TTL info |
|
|
210
260
|
| System Primer | `toon://memory/summaries` | Auto-generated knowledge map (top entries, categories, patterns) |
|
|
211
261
|
|
|
262
|
+
### MCP Prompts
|
|
263
|
+
|
|
264
|
+
| Prompt | Description |
|
|
265
|
+
|--------|-------------|
|
|
266
|
+
| `summarize_project_context` | Analyze current TOON memory and generate a compact project summary. Optional `intent` parameter to focus on a specific area |
|
|
267
|
+
|
|
212
268
|
### Examples
|
|
213
269
|
|
|
214
270
|
#### Remember a decision
|
|
@@ -646,6 +702,57 @@ On `toon-memory init`, the CLI scans your dependency manifests and writes a `voc
|
|
|
646
702
|
|
|
647
703
|
---
|
|
648
704
|
|
|
705
|
+
## Memory Graph Viewer
|
|
706
|
+
|
|
707
|
+
Visualize your memory as an interactive force-directed graph. See entries, their connections, categories, and access patterns at a glance.
|
|
708
|
+
|
|
709
|
+
### CLI viewer (standalone HTTP server)
|
|
710
|
+
|
|
711
|
+
```bash
|
|
712
|
+
npx toon-memory viewer # Start HTTP server + open browser
|
|
713
|
+
npx toon-memory viewer --port 3001 # Custom port
|
|
714
|
+
npx toon-memory viewer --export # Save as static HTML
|
|
715
|
+
```
|
|
716
|
+
|
|
717
|
+
Once open, press `r` in the terminal to reload from disk, or `r` / ↻ in the browser to refresh the page.
|
|
718
|
+
|
|
719
|
+
### Inline viewer (MCP Apps)
|
|
720
|
+
|
|
721
|
+
Call `memory_visualize` in any MCP Apps–compatible host to render the graph inline — no server needed. The viewer appears as an interactive panel inside the chat interface.
|
|
722
|
+
|
|
723
|
+
### Features
|
|
724
|
+
|
|
725
|
+
| Interaction | Description |
|
|
726
|
+
|---|---|
|
|
727
|
+
| **Hover** a node | See tooltip with content preview, quality, access count |
|
|
728
|
+
| **Click** a node | Select + center + highlight neighbors |
|
|
729
|
+
| **Double-click** a node | Open the Detail panel |
|
|
730
|
+
| **Drag** a node | Reposition manually (right-click to unfix) |
|
|
731
|
+
| **Search** | Filter entries; matching nodes pulse with glow |
|
|
732
|
+
| **⇿ Path finder** | Click two nodes to find and highlight the shortest path |
|
|
733
|
+
| **Zoom/pan** | Mouse wheel or +/− buttons |
|
|
734
|
+
| **⚙ Physics** | Adjust charge, link distance, center gravity |
|
|
735
|
+
| **Theme toggle** | Dark/light mode (persisted) |
|
|
736
|
+
| **Export** | Save graph as PNG or SVG |
|
|
737
|
+
|
|
738
|
+
### Screenshots
|
|
739
|
+
|
|
740
|
+
| Graph view | Search highlights | Path finder | Detail panel |
|
|
741
|
+
|---|---|---|---|
|
|
742
|
+
|  |  |  |  |
|
|
743
|
+
|
|
744
|
+

|
|
745
|
+
|
|
746
|
+
### Capturing your own screenshots
|
|
747
|
+
|
|
748
|
+
```bash
|
|
749
|
+
npm run capture:viewer
|
|
750
|
+
```
|
|
751
|
+
|
|
752
|
+
Requires [Playwright](https://playwright.dev) (`npx playwright install chromium`) and `ffmpeg`.
|
|
753
|
+
|
|
754
|
+
---
|
|
755
|
+
|
|
649
756
|
## Tips & Best Practices
|
|
650
757
|
|
|
651
758
|
Here are some patterns that work well with toon-memory:
|
|
@@ -718,6 +825,9 @@ npx toon-memory status # Check installation status
|
|
|
718
825
|
npx toon-memory stats # View memory statistics
|
|
719
826
|
npx toon-memory export # Export memory to JSON
|
|
720
827
|
npx toon-memory import <file> # Import memory from JSON
|
|
828
|
+
npx toon-memory viewer # Open the memory graph viewer (http server)
|
|
829
|
+
npx toon-memory viewer --export # Save viewer as static HTML
|
|
830
|
+
npx toon-memory viewer --port 3001 # Custom port
|
|
721
831
|
npx toon-memory watch [options] # Auto-backup with options
|
|
722
832
|
npx toon-memory upgrade # Update to latest version
|
|
723
833
|
npx toon-memory uninstall # Remove from all agents
|
|
@@ -1172,7 +1282,18 @@ toon-memory/
|
|
|
1172
1282
|
│ │ ├── setup.ts # CLI commands
|
|
1173
1283
|
│ │ └── toon-memory.ts # CLI runner
|
|
1174
1284
|
│ ├── mcp/
|
|
1175
|
-
│ │
|
|
1285
|
+
│ │ ├── server.ts # MCP server (29 tools + 4 resources + 1 prompt)
|
|
1286
|
+
│ │ ├── tools.ts # Tool registration (29 tools)
|
|
1287
|
+
│ │ ├── resources.ts # Resource registration (4 resources)
|
|
1288
|
+
│ │ ├── prompts.ts # Prompt registration (1 prompt)
|
|
1289
|
+
│ │ ├── session-store.ts # Session layer (auto-promote, cleanup)
|
|
1290
|
+
│ │ ├── memory-io.ts # Memory file read/write
|
|
1291
|
+
│ │ ├── entries.ts # Entry parsing & utilities
|
|
1292
|
+
│ │ ├── scoring.ts # Entry scoring & access tracking
|
|
1293
|
+
│ │ ├── archive.ts # Archive management
|
|
1294
|
+
│ │ ├── consolidation.ts # Duplicate consolidation
|
|
1295
|
+
│ │ ├── config.ts # Config loading & saving
|
|
1296
|
+
│ │ └── crypto.ts # AES-256-GCM encryption
|
|
1176
1297
|
│ ├── lib/
|
|
1177
1298
|
│ │ ├── lock.ts # Advisory file lock + atomic write
|
|
1178
1299
|
│ │ ├── sessions.ts # Multi-session coordination
|
|
@@ -1208,6 +1329,20 @@ Contributions are welcome! Please read our [Code of Conduct](CODE_OF_CONDUCT.md)
|
|
|
1208
1329
|
|
|
1209
1330
|
---
|
|
1210
1331
|
|
|
1332
|
+
## Security & Privacy
|
|
1333
|
+
|
|
1334
|
+
toon-memory is designed with security and privacy as a core principle.
|
|
1335
|
+
|
|
1336
|
+
- **100% local storage** — All memory is stored locally on your machine in `.toon-memory/memory/`. No data is ever sent to external servers, cloud services, or third parties.
|
|
1337
|
+
- **No telemetry** — The project has zero telemetry, analytics, or tracking of any kind. No usage data is collected.
|
|
1338
|
+
- **No remote code execution** — toon-memory runs as a standard MCP server over stdio. It does not download, execute, or evaluate remote code.
|
|
1339
|
+
- **Encryption at rest** — Optional AES-256-GCM encryption for the entire memory file. Enable with `memory_encrypt` (requires `TOON_MEMORY_KEY` environment variable).
|
|
1340
|
+
- **Encryption key is never stored** — The encryption key must be provided via environment variable and is never persisted by toon-memory. If lost, data cannot be recovered.
|
|
1341
|
+
- **Per-project isolation** — Each project has its own isolated memory file. Memory does not leak between projects.
|
|
1342
|
+
- **Automatic `.gitignore`** — The installer adds `.toon-memory/memory/` to `.gitignore` to prevent accidental commits of memory data.
|
|
1343
|
+
|
|
1344
|
+
---
|
|
1345
|
+
|
|
1211
1346
|
## License
|
|
1212
1347
|
|
|
1213
1348
|
MIT
|