@memoryrelay/plugin-memoryrelay-ai 0.12.1 → 0.12.2
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 +249 -23
- package/index.ts +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -8,8 +8,10 @@ AI-powered long-term memory for OpenClaw agents. Gives your AI assistant persist
|
|
|
8
8
|
## Features
|
|
9
9
|
|
|
10
10
|
- **39 Tools** covering memories, entities, sessions, decisions, patterns, and projects
|
|
11
|
+
- **6 Gateway Methods** for stats, debugging, and onboarding (v0.8.0+, Phase 1)
|
|
12
|
+
- **Smart Auto-Capture** - Tier-based privacy system with automatic filtering (v0.12.0+)
|
|
13
|
+
- **Daily Memory Stats** - Morning/evening summaries with growth metrics (v0.12.0+)
|
|
11
14
|
- **Debug & Monitoring** - Comprehensive logging, health checks, and performance metrics (v0.8.0+)
|
|
12
|
-
- **CLI Commands** - 4 commands for debugging and diagnostics (v0.8.0+)
|
|
13
15
|
- **Semantic Search** - Vector-based retrieval finds relevant context by meaning
|
|
14
16
|
- **Auto-Recall** - Automatically injects relevant memories into agent context
|
|
15
17
|
- **Project-First Workflow** - Agents receive workflow instructions to start with project context
|
|
@@ -23,7 +25,7 @@ AI-powered long-term memory for OpenClaw agents. Gives your AI assistant persist
|
|
|
23
25
|
### Requirements
|
|
24
26
|
|
|
25
27
|
- OpenClaw >= 2026.2.26
|
|
26
|
-
- Node.js >=
|
|
28
|
+
- Node.js >= 20.0.0
|
|
27
29
|
- MemoryRelay API key ([get one at memoryrelay.ai](https://memoryrelay.ai))
|
|
28
30
|
|
|
29
31
|
### Install via OpenClaw CLI
|
|
@@ -62,7 +64,7 @@ openclaw gateway restart
|
|
|
62
64
|
| `defaultProject` | string | — | Default project slug applied to sessions, decisions, and memories |
|
|
63
65
|
| `enabledTools` | string | `all` | Comma-separated tool groups: `memory`, `entity`, `agent`, `session`, `decision`, `pattern`, `project`, `health` |
|
|
64
66
|
| `autoRecall` | boolean | `true` | Inject relevant memories into context each turn |
|
|
65
|
-
| `autoCapture` | boolean | `
|
|
67
|
+
| `autoCapture` | boolean\|object | `{enabled: true, tier: "smart"}` | Auto-capture config. Boolean for backward compat, object for tier system: `{enabled, tier, confirmFirst}`. Tiers: `off`, `conservative`, `smart`, `aggressive`. See Phase 1 features below. |
|
|
66
68
|
| `recallLimit` | number | `5` | Max memories to inject per turn (1-20) |
|
|
67
69
|
| `recallThreshold` | number | `0.3` | Minimum similarity score for recall (0-1) |
|
|
68
70
|
| `excludeChannels` | string[] | `[]` | Channel IDs to skip auto-recall |
|
|
@@ -71,6 +73,195 @@ openclaw gateway restart
|
|
|
71
73
|
| `logFile` | string | — | Optional file path for persistent debug logs (v0.8.0+) |
|
|
72
74
|
| `maxLogEntries` | number | `100` | Circular buffer size for in-memory logs (v0.8.0+) |
|
|
73
75
|
|
|
76
|
+
# Phase 1 Section for README
|
|
77
|
+
|
|
78
|
+
## Phase 1: Zero-Friction Adoption Framework (v0.12.0+)
|
|
79
|
+
|
|
80
|
+
Phase 1 introduces features designed to make MemoryRelay "just work" without manual effort. The goal: store 3-5x more memories with zero additional work.
|
|
81
|
+
|
|
82
|
+
### Smart Auto-Capture (Issue #12)
|
|
83
|
+
|
|
84
|
+
**Tier-Based Privacy System** — Four capture modes with built-in privacy protection:
|
|
85
|
+
|
|
86
|
+
| Tier | When to Use | Privacy Level |
|
|
87
|
+
|------|-------------|---------------|
|
|
88
|
+
| `off` | Manual storage only | N/A |
|
|
89
|
+
| `conservative` | Low-risk conversations only | High (blocks most patterns) |
|
|
90
|
+
| `smart` | **Default** — Balanced automation | Medium (blocks sensitive data) |
|
|
91
|
+
| `aggressive` | Maximum capture | Low (minimal blocking) |
|
|
92
|
+
|
|
93
|
+
**Privacy Blocklist** — Automatically filters:
|
|
94
|
+
- Passwords and API keys (`password: xxx`, `api_key=xxx`)
|
|
95
|
+
- Credit card numbers (Visa, MC, Amex, Discover patterns)
|
|
96
|
+
- Social Security Numbers (`SSN: xxx-xx-xxxx`)
|
|
97
|
+
- Email addresses and phone numbers (when tier < aggressive)
|
|
98
|
+
|
|
99
|
+
**Configuration**:
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"autoCapture": {
|
|
104
|
+
"enabled": true,
|
|
105
|
+
"tier": "smart",
|
|
106
|
+
"confirmFirst": 5
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**Backward Compatibility**: Boolean values still work (`true` → `{enabled: true, tier: "smart"}`)
|
|
112
|
+
|
|
113
|
+
**First-5 Confirmations** — On `smart`/`aggressive` tiers, first 5 captures show confirmation prompts. After 5, auto-capture runs silently. Reset by setting `confirmFirst: 5` again.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
### Daily Memory Stats (Issue #10)
|
|
118
|
+
|
|
119
|
+
**Morning Check** (9:00 AM) — Start your day with memory growth stats:
|
|
120
|
+
```
|
|
121
|
+
📊 Memory Stats (Morning Check)
|
|
122
|
+
Total: 1,247 memories | Today: 8 (+3 since yesterday)
|
|
123
|
+
This week: 52 memories (+15% vs last week)
|
|
124
|
+
Top categories: development (18), decisions (12), patterns (7)
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
**Evening Review** (8:00 PM) — End your day with activity summary:
|
|
128
|
+
```
|
|
129
|
+
🌙 Memory Activity (Evening Review)
|
|
130
|
+
Today: 12 memories stored | Most recalled: "NorthRelay API v9.0 architecture"
|
|
131
|
+
Most valuable: [Memory about critical bug fix in authentication flow]
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**Gateway Method**: `memoryrelay:heartbeat`
|
|
135
|
+
|
|
136
|
+
**Configuration**:
|
|
137
|
+
```json
|
|
138
|
+
{
|
|
139
|
+
"dailyStats": {
|
|
140
|
+
"enabled": true,
|
|
141
|
+
"morningTime": "09:00",
|
|
142
|
+
"eveningTime": "20:00"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**Integration with HEARTBEAT.md** — Add to your workspace `HEARTBEAT.md`:
|
|
148
|
+
```markdown
|
|
149
|
+
## MemoryRelay Health
|
|
150
|
+
Every heartbeat, check memory stats:
|
|
151
|
+
- Run morning check at 9 AM
|
|
152
|
+
- Run evening review at 8 PM
|
|
153
|
+
- Report if memory storage rate drops below 5/week
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
### CLI Stats Command (Issue #11)
|
|
159
|
+
|
|
160
|
+
**Comprehensive Statistics** — View memory metrics anytime:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
openclaw gateway-call memoryrelay.stats
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**Text Output**:
|
|
167
|
+
```
|
|
168
|
+
MemoryRelay Statistics
|
|
169
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
170
|
+
|
|
171
|
+
Storage
|
|
172
|
+
Total: 1,247 memories
|
|
173
|
+
Today: 8 memories
|
|
174
|
+
This week: 52 memories (+15% vs last week)
|
|
175
|
+
This month: 218 memories (+8% vs last month)
|
|
176
|
+
|
|
177
|
+
Top 10 Categories
|
|
178
|
+
development ........................ 342 (27%)
|
|
179
|
+
decisions .......................... 156 (12%)
|
|
180
|
+
patterns ........................... 128 (10%)
|
|
181
|
+
infrastructure ..................... 94 (8%)
|
|
182
|
+
[...]
|
|
183
|
+
|
|
184
|
+
Recent Memories (last 5)
|
|
185
|
+
[2026-03-06 12:35] Phase 1 validation test
|
|
186
|
+
[2026-03-06 10:25] Phase 1 implementation complete
|
|
187
|
+
[2026-03-06 09:11] Issue #8 broken down
|
|
188
|
+
[...]
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
**JSON Output** (for scripts):
|
|
192
|
+
```bash
|
|
193
|
+
openclaw gateway-call memoryrelay.stats '{"format": "json"}'
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
**Verbose Mode** (includes growth charts, recall stats):
|
|
197
|
+
```bash
|
|
198
|
+
openclaw gateway-call memoryrelay.stats '{"verbose": true}'
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
### First-Run Onboarding (Issue #9)
|
|
204
|
+
|
|
205
|
+
**Automatic Welcome** — On fresh install (no memories + no onboarding state):
|
|
206
|
+
|
|
207
|
+
1. Plugin detects first run
|
|
208
|
+
2. Creates welcome memory: "Welcome to MemoryRelay! This is your first memory."
|
|
209
|
+
3. Shows auto-capture explanation
|
|
210
|
+
4. Saves state to `~/.openclaw/memoryrelay-onboarding.json`
|
|
211
|
+
5. Never repeats (state file persists)
|
|
212
|
+
|
|
213
|
+
**Manual Trigger** (show again or for new users):
|
|
214
|
+
```bash
|
|
215
|
+
openclaw gateway-call memoryrelay.onboarding
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**What Users See**:
|
|
219
|
+
```
|
|
220
|
+
🎉 Welcome to MemoryRelay!
|
|
221
|
+
|
|
222
|
+
I just stored my first memory: "Welcome to MemoryRelay! This is your first memory."
|
|
223
|
+
|
|
224
|
+
Auto-capture is enabled (tier: smart). I'll automatically remember:
|
|
225
|
+
✓ Important decisions and changes
|
|
226
|
+
✓ Technical discoveries and solutions
|
|
227
|
+
✓ Project context and conventions
|
|
228
|
+
|
|
229
|
+
Privacy protected — I filter out:
|
|
230
|
+
✗ Passwords and API keys
|
|
231
|
+
✗ Credit card numbers
|
|
232
|
+
✗ Social Security Numbers
|
|
233
|
+
✗ Personal secrets
|
|
234
|
+
|
|
235
|
+
You're all set! I'll build memory over time as we work together.
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
### Gateway Methods Summary
|
|
241
|
+
|
|
242
|
+
| Method | Purpose | Example |
|
|
243
|
+
|--------|---------|---------|
|
|
244
|
+
| `memoryrelay:heartbeat` | Daily stats check (morning/evening) | `openclaw gateway-call memoryrelay.heartbeat` |
|
|
245
|
+
| `memoryrelay:stats` | CLI stats command | `openclaw gateway-call memoryrelay.stats '{"format": "json"}'` |
|
|
246
|
+
| `memoryrelay:onboarding` | Show/restart onboarding | `openclaw gateway-call memoryrelay.onboarding` |
|
|
247
|
+
|
|
248
|
+
**Note**: These are gateway methods, not shell commands. Invoke via `openclaw gateway-call memoryrelay.<method>`.
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
### Expected Impact
|
|
253
|
+
|
|
254
|
+
Based on Zero-Friction Adoption Strategy (Issue #8):
|
|
255
|
+
|
|
256
|
+
| Metric | Before | After Phase 1 | Target |
|
|
257
|
+
|--------|--------|---------------|--------|
|
|
258
|
+
| Memory storage rate | 5/week | 15-25/week | 3-5x |
|
|
259
|
+
| Daily active usage | 10% | 40-50% | 4-5x |
|
|
260
|
+
| Auto-capture adoption | 0% | 40-50% | 70% |
|
|
261
|
+
| First memory time | N/A | <2 min | <5 min |
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
74
265
|
## Debug & Monitoring (v0.8.0+)
|
|
75
266
|
|
|
76
267
|
### Enable Debug Mode
|
|
@@ -94,29 +285,31 @@ openclaw gateway restart
|
|
|
94
285
|
}
|
|
95
286
|
```
|
|
96
287
|
|
|
97
|
-
###
|
|
288
|
+
### Debug Commands (Gateway Methods)
|
|
289
|
+
|
|
290
|
+
The plugin provides four debug commands accessible via OpenClaw gateway methods:
|
|
98
291
|
|
|
99
|
-
|
|
292
|
+
**Note**: These are **gateway methods**, not standalone shell commands. Invoke them using `openclaw gateway-call memoryrelay.<method>`.
|
|
100
293
|
|
|
101
294
|
#### View Debug Logs
|
|
102
295
|
```bash
|
|
103
296
|
# Last 20 logs
|
|
104
|
-
memoryrelay
|
|
297
|
+
openclaw gateway-call memoryrelay.logs
|
|
105
298
|
|
|
106
299
|
# Last 50 logs
|
|
107
|
-
memoryrelay
|
|
300
|
+
openclaw gateway-call memoryrelay.logs '{"limit": 50}'
|
|
108
301
|
|
|
109
302
|
# Filter by tool
|
|
110
|
-
memoryrelay
|
|
303
|
+
openclaw gateway-call memoryrelay.logs '{"tool": "memory_store", "limit": 20}'
|
|
111
304
|
|
|
112
305
|
# Show errors only
|
|
113
|
-
memoryrelay
|
|
306
|
+
openclaw gateway-call memoryrelay.logs '{"errorsOnly": true}'
|
|
114
307
|
```
|
|
115
308
|
|
|
116
309
|
#### Health Check
|
|
117
310
|
```bash
|
|
118
311
|
# Run comprehensive health check
|
|
119
|
-
memoryrelay
|
|
312
|
+
openclaw gateway-call memoryrelay.health
|
|
120
313
|
|
|
121
314
|
# Tests API connectivity, authentication, and core tools
|
|
122
315
|
```
|
|
@@ -124,15 +317,15 @@ memoryrelay-health
|
|
|
124
317
|
#### Test Individual Tools
|
|
125
318
|
```bash
|
|
126
319
|
# Test specific tool
|
|
127
|
-
memoryrelay
|
|
128
|
-
memoryrelay
|
|
129
|
-
memoryrelay
|
|
320
|
+
openclaw gateway-call memoryrelay.test '{"tool": "memory_store"}'
|
|
321
|
+
openclaw gateway-call memoryrelay.test '{"tool": "memory_recall"}'
|
|
322
|
+
openclaw gateway-call memoryrelay.test '{"tool": "project_list"}'
|
|
130
323
|
```
|
|
131
324
|
|
|
132
325
|
#### View Performance Metrics
|
|
133
326
|
```bash
|
|
134
327
|
# Show performance statistics
|
|
135
|
-
memoryrelay
|
|
328
|
+
openclaw gateway-call memoryrelay.metrics
|
|
136
329
|
|
|
137
330
|
# Displays per-tool metrics:
|
|
138
331
|
# - Call count
|
|
@@ -141,16 +334,9 @@ memoryrelay-metrics
|
|
|
141
334
|
# - p95/p99 latencies
|
|
142
335
|
```
|
|
143
336
|
|
|
144
|
-
### Gateway Method Calls
|
|
145
|
-
|
|
146
|
-
You can also call these commands via the OpenClaw gateway:
|
|
337
|
+
### Alternative: Direct Gateway Method Calls
|
|
147
338
|
|
|
148
|
-
|
|
149
|
-
openclaw gateway call memoryrelay.logs '{"limit": 20}'
|
|
150
|
-
openclaw gateway call memoryrelay.health
|
|
151
|
-
openclaw gateway call memoryrelay.test '{"tool": "memory_store"}'
|
|
152
|
-
openclaw gateway call memoryrelay.metrics
|
|
153
|
-
```
|
|
339
|
+
The same methods can be called programmatically from code or scripts (same syntax as above).
|
|
154
340
|
|
|
155
341
|
### Enhanced Status Reporting
|
|
156
342
|
|
|
@@ -491,6 +677,46 @@ curl -X POST https://api.memoryrelay.net/v1/memories \
|
|
|
491
677
|
|
|
492
678
|
## Changelog
|
|
493
679
|
|
|
680
|
+
### v0.12.2 (2026-03-06)
|
|
681
|
+
|
|
682
|
+
**📚 Documentation & Maintenance Release**
|
|
683
|
+
|
|
684
|
+
- **FIX**: Corrected Node.js requirement from >=18.0.0 to >=20.0.0 (CI uses Node 20, dependencies require 20+)
|
|
685
|
+
- **FIX**: Version string in plugin load message now shows correct version (was hardcoded to 0.12.0)
|
|
686
|
+
- **DOCS**: Complete Phase 1 features documentation added
|
|
687
|
+
- **DOCS**: Updated `autoCapture` configuration with tier system details
|
|
688
|
+
- **DOCS**: Added v0.12.0 and v0.12.1 changelog entries (were missing)
|
|
689
|
+
- **DOCS**: Clarified gateway methods vs CLI commands
|
|
690
|
+
- **DOCS**: Added troubleshooting for Phase 1 features
|
|
691
|
+
|
|
692
|
+
### v0.12.1 (2026-03-06)
|
|
693
|
+
|
|
694
|
+
**🐛 Bugfix Release**
|
|
695
|
+
|
|
696
|
+
- **FIX**: Include `src/` directory in npm package (Phase 1 modules were missing)
|
|
697
|
+
- **FIX**: Package.json `files` array now includes `src/` for heartbeat, cli, and onboarding modules
|
|
698
|
+
- **IMPACT**: Critical fix - v0.12.0 was non-functional without src/ directory
|
|
699
|
+
|
|
700
|
+
### v0.12.0 (2026-03-06)
|
|
701
|
+
|
|
702
|
+
**🎉 Phase 1: Zero-Friction Adoption Framework**
|
|
703
|
+
|
|
704
|
+
- **NEW**: Smart auto-capture with 4 privacy tiers (off/conservative/smart/aggressive)
|
|
705
|
+
- **NEW**: Privacy blocklist for sensitive data (passwords, SSN, credit cards, API keys)
|
|
706
|
+
- **NEW**: Daily memory stats in heartbeat (morning 9 AM, evening 8 PM)
|
|
707
|
+
- **NEW**: CLI stats command with text/JSON output (`memoryrelay:stats`)
|
|
708
|
+
- **NEW**: First-run onboarding wizard with welcome memory
|
|
709
|
+
- **NEW**: Three gateway methods: `memoryrelay:heartbeat`, `memoryrelay:stats`, `memoryrelay:onboarding`
|
|
710
|
+
- **NEW**: Auto-capture default changed from `false` to `smart` tier
|
|
711
|
+
- **NEW**: Modular architecture with `src/` directory (heartbeat, cli, onboarding modules)
|
|
712
|
+
- **CHANGE**: `autoCapture` config accepts boolean (backward compat) or object with tier system
|
|
713
|
+
- **DOCS**: PHASE1_CHANGELOG.md with complete implementation details
|
|
714
|
+
- **TESTS**: All existing tests pass, Phase 1 features validated
|
|
715
|
+
|
|
716
|
+
**Implementation**: 820 lines across 3 new modules
|
|
717
|
+
**Time**: 50 minutes (38% faster than 80-minute estimate)
|
|
718
|
+
**Backward Compatibility**: Fully compatible, no breaking changes
|
|
719
|
+
|
|
494
720
|
### v0.8.0 (2026-03-05)
|
|
495
721
|
|
|
496
722
|
**🚀 Debug & Monitoring Release**
|
package/index.ts
CHANGED
|
@@ -3842,7 +3842,7 @@ export default async function plugin(api: OpenClawPluginApi): Promise<void> {
|
|
|
3842
3842
|
}
|
|
3843
3843
|
|
|
3844
3844
|
api.logger.info?.(
|
|
3845
|
-
`memory-memoryrelay: plugin v0.12.
|
|
3845
|
+
`memory-memoryrelay: plugin v0.12.2 loaded (39 tools, autoRecall: ${cfg?.autoRecall}, autoCapture: ${autoCaptureConfig.enabled ? autoCaptureConfig.tier : 'off'}, debug: ${debugEnabled})`,
|
|
3846
3846
|
);
|
|
3847
3847
|
|
|
3848
3848
|
// ========================================================================
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memoryrelay/plugin-memoryrelay-ai",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"description": "OpenClaw memory plugin for MemoryRelay API - sessions, decisions, patterns, projects & semantic search",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|
|
@@ -51,6 +51,6 @@
|
|
|
51
51
|
"src/"
|
|
52
52
|
],
|
|
53
53
|
"engines": {
|
|
54
|
-
"node": ">=
|
|
54
|
+
"node": ">=20.0.0"
|
|
55
55
|
}
|
|
56
56
|
}
|