@n24q02m/mnemo-plugin 1.0.1 → 1.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 +50 -25
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,21 +14,28 @@ Gives your AI coding assistant **persistent memory** across sessions. Facts, pre
|
|
|
14
14
|
- **Automatic Capture** -- Detects user preferences and constraints from chat (always/never/must/prefer patterns)
|
|
15
15
|
- **Adaptive Context Injection** -- Smart budget system scales memory injection to model context window
|
|
16
16
|
- **Project-Scoped** -- Memories auto-tagged with project name for relevant recall
|
|
17
|
-
- **Dual Platform** -- Works with both OpenCode
|
|
17
|
+
- **Dual Platform** -- Works with both OpenCode and Claude Code
|
|
18
18
|
|
|
19
19
|
## Architecture
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Full memory support requires **both** the plugin and the MCP server working together:
|
|
22
|
+
|
|
23
|
+
| Component | Role | Behavior |
|
|
24
|
+
|-----------|------|----------|
|
|
25
|
+
| **Plugin** (this package) | Proactive | Hooks: inject memories into system prompt, auto-capture constraints, preserve context on compaction |
|
|
26
|
+
| **MCP Server** ([mnemo-mcp](https://github.com/n24q02m/mnemo-mcp)) | Reactive | Tools: AI calls search/remember/forget when it decides to |
|
|
22
27
|
|
|
23
28
|
```
|
|
24
|
-
|
|
29
|
+
AI Coding Assistant
|
|
30
|
+
|
|
|
31
|
+
+-- mnemo-plugin (TypeScript) ........... hooks (proactive)
|
|
32
|
+
| |
|
|
33
|
+
| +-- bridge -> mnemo-mcp subprocess
|
|
25
34
|
|
|
|
26
|
-
+-- mnemo-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|-- Qwen3 embeddings (semantic search)
|
|
31
|
-
|-- rclone sync (backup)
|
|
35
|
+
+-- mnemo-mcp (Python, standalone) ..... tools (reactive)
|
|
36
|
+
|-- SQLite FTS5 (keyword search)
|
|
37
|
+
|-- Qwen3 embeddings (semantic search)
|
|
38
|
+
|-- rclone sync (backup)
|
|
32
39
|
```
|
|
33
40
|
|
|
34
41
|
## Prerequisites
|
|
@@ -38,43 +45,61 @@ OpenCode / Claude Code
|
|
|
38
45
|
|
|
39
46
|
## Installation
|
|
40
47
|
|
|
48
|
+
Both plugin **and** MCP server are required for full functionality.
|
|
49
|
+
|
|
41
50
|
### OpenCode
|
|
42
51
|
|
|
43
|
-
Add to your `opencode.json`:
|
|
52
|
+
Add **both** to your `opencode.json`:
|
|
44
53
|
|
|
45
54
|
```json
|
|
46
55
|
{
|
|
47
|
-
"plugin": ["@n24q02m/mnemo-plugin"]
|
|
56
|
+
"plugin": ["@n24q02m/mnemo-plugin@latest"],
|
|
57
|
+
"mcp": {
|
|
58
|
+
"mnemo": {
|
|
59
|
+
"type": "local",
|
|
60
|
+
"command": ["uvx", "--python", "3.13", "mnemo-mcp@latest"],
|
|
61
|
+
"environment": {
|
|
62
|
+
"LOG_LEVEL": "WARNING"
|
|
63
|
+
},
|
|
64
|
+
"enabled": true
|
|
65
|
+
}
|
|
66
|
+
}
|
|
48
67
|
}
|
|
49
68
|
```
|
|
50
69
|
|
|
70
|
+
- **Plugin** provides hooks (system-prompt injection, auto-capture, compaction)
|
|
71
|
+
- **MCP server** provides tools (mnemo_memory_add, search, delete, etc.)
|
|
72
|
+
|
|
73
|
+
Restart OpenCode after configuration.
|
|
74
|
+
|
|
51
75
|
### Claude Code
|
|
52
76
|
|
|
53
|
-
|
|
77
|
+
The plugin bundles both MCP server and hooks in one install:
|
|
54
78
|
|
|
55
79
|
```
|
|
56
80
|
/plugin marketplace add n24q02m/mnemo-plugin
|
|
57
|
-
|
|
58
|
-
/plugin install mnemo-plugin
|
|
81
|
+
/plugin install mnemo-plugin@n24q02m
|
|
59
82
|
```
|
|
60
83
|
|
|
61
|
-
Restart Claude Code.
|
|
84
|
+
Restart Claude Code. The plugin automatically registers:
|
|
85
|
+
- MCP server (`uvx mnemo-mcp`) for memory tools
|
|
86
|
+
- SessionStart hook for health check
|
|
62
87
|
|
|
63
|
-
## Tools
|
|
88
|
+
## Tools (via MCP server)
|
|
64
89
|
|
|
65
90
|
| Tool | Description |
|
|
66
91
|
|------|-------------|
|
|
67
|
-
| `mnemo_search` | Search stored memories by query, with optional category filter |
|
|
68
|
-
| `mnemo_remember` | Store a new persistent memory (fact, preference, decision) |
|
|
69
|
-
| `mnemo_forget` | Delete an outdated or incorrect memory by ID |
|
|
92
|
+
| `mnemo_search` / `memory_search` | Search stored memories by query, with optional category filter |
|
|
93
|
+
| `mnemo_remember` / `memory_add` | Store a new persistent memory (fact, preference, decision) |
|
|
94
|
+
| `mnemo_forget` / `memory_delete` | Delete an outdated or incorrect memory by ID |
|
|
70
95
|
|
|
71
|
-
## Hooks (
|
|
96
|
+
## Hooks (via plugin)
|
|
72
97
|
|
|
73
|
-
| Hook | Description |
|
|
74
|
-
|
|
75
|
-
| `system-prompt` | Injects relevant memories into system prompt with adaptive budget |
|
|
76
|
-
| `auto-capture` | Buffers chat messages and extracts constraints
|
|
77
|
-
| `compaction` | Preserves memory context during session compaction |
|
|
98
|
+
| Hook | Trigger | Description |
|
|
99
|
+
|------|---------|-------------|
|
|
100
|
+
| `system-prompt` | Session start | Injects relevant memories into system prompt with adaptive budget |
|
|
101
|
+
| `auto-capture` | Session idle | Buffers chat messages and extracts constraints automatically |
|
|
102
|
+
| `compaction` | Context compaction | Preserves memory context during session compaction |
|
|
78
103
|
|
|
79
104
|
## Development
|
|
80
105
|
|