@memoryrelay/plugin-memoryrelay-ai 0.2.3 → 0.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 +71 -0
- package/index.ts +23 -5
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,6 +28,51 @@ npm install -g @memoryrelay/plugin-memoryrelay-ai
|
|
|
28
28
|
|
|
29
29
|
## Quick Start
|
|
30
30
|
|
|
31
|
+
### 1. Install the plugin
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
openclaw plugins install @memoryrelay/plugin-memoryrelay-ai
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 2. Configure API credentials
|
|
38
|
+
|
|
39
|
+
**Option A: Config file** (recommended)
|
|
40
|
+
```bash
|
|
41
|
+
cat ~/.openclaw/openclaw.json | jq '.plugins.entries."plugin-memoryrelay-ai".config = {
|
|
42
|
+
"apiKey": "YOUR_API_KEY",
|
|
43
|
+
"agentId": "YOUR_AGENT_ID",
|
|
44
|
+
"autoRecall": true,
|
|
45
|
+
"autoCapture": false
|
|
46
|
+
}' > /tmp/config.json && \
|
|
47
|
+
mv /tmp/config.json ~/.openclaw/openclaw.json && \
|
|
48
|
+
chmod 600 ~/.openclaw/openclaw.json
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Option B: Environment variables**
|
|
52
|
+
```bash
|
|
53
|
+
export MEMORYRELAY_API_KEY="YOUR_API_KEY"
|
|
54
|
+
export MEMORYRELAY_AGENT_ID="YOUR_AGENT_ID"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 3. Restart the gateway
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
openclaw gateway restart
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### 4. Verify it's working
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
openclaw status
|
|
67
|
+
# Should show: Memory | enabled (plugin plugin-memoryrelay-ai)
|
|
68
|
+
|
|
69
|
+
# Check logs
|
|
70
|
+
journalctl -u openclaw-gateway --since '1 minute ago' | grep memory-memoryrelay
|
|
71
|
+
# Should show: "connected to api.memoryrelay.net"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Get your API key from [memoryrelay.ai](https://memoryrelay.ai).
|
|
75
|
+
|
|
31
76
|
### 1. Get API Key
|
|
32
77
|
|
|
33
78
|
Sign up at [memoryrelay.io](https://memoryrelay.io) or use the public demo API.
|
|
@@ -396,6 +441,32 @@ MIT © 2026 MemoryRelay
|
|
|
396
441
|
|
|
397
442
|
## Changelog
|
|
398
443
|
|
|
444
|
+
### v0.3.0 (2026-02-13) - Better Installation UX
|
|
445
|
+
|
|
446
|
+
**Improved Installation Experience:**
|
|
447
|
+
- ✅ API key can now come from `MEMORYRELAY_API_KEY` env var
|
|
448
|
+
- ✅ Agent ID can come from `MEMORYRELAY_AGENT_ID` env var or defaults to "default"
|
|
449
|
+
- ✅ Clear error message with setup instructions when config is missing
|
|
450
|
+
- ✅ Comprehensive installation guide in README
|
|
451
|
+
- ✅ No more silent failures - helpful error messages
|
|
452
|
+
|
|
453
|
+
**Breaking Change:**
|
|
454
|
+
- Debug logging removed (replaced with helpful error messages)
|
|
455
|
+
|
|
456
|
+
**Migration:**
|
|
457
|
+
Works out of the box with env vars, or add config after install:
|
|
458
|
+
```bash
|
|
459
|
+
cat ~/.openclaw/openclaw.json | jq '.plugins.entries."plugin-memoryrelay-ai".config = {"apiKey": "YOUR_KEY", "agentId": "YOUR_AGENT"}' > /tmp/config.json && mv /tmp/config.json ~/.openclaw/openclaw.json
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
### v0.2.4 (2026-02-13)
|
|
463
|
+
|
|
464
|
+
**Debug Logging:**
|
|
465
|
+
- Added detailed logging to diagnose config loading issues
|
|
466
|
+
- Logs pluginConfig type, keys, and specific missing fields
|
|
467
|
+
- Helps identify why apiKey/agentId aren't being read
|
|
468
|
+
- Better error messages for troubleshooting
|
|
469
|
+
|
|
399
470
|
### v0.2.3 (2026-02-13)
|
|
400
471
|
|
|
401
472
|
**Critical Fix:**
|
package/index.ts
CHANGED
|
@@ -152,16 +152,34 @@ function shouldCapture(text: string): boolean {
|
|
|
152
152
|
// ============================================================================
|
|
153
153
|
|
|
154
154
|
export default async function plugin(api: OpenClawPluginApi): Promise<void> {
|
|
155
|
+
// Debug: log what config we're receiving
|
|
156
|
+
api.logger.info(`memory-memoryrelay: plugin loaded, checking config...`);
|
|
157
|
+
api.logger.info(`memory-memoryrelay: pluginConfig type: ${typeof api.pluginConfig}`);
|
|
158
|
+
api.logger.info(`memory-memoryrelay: pluginConfig keys: ${api.pluginConfig ? Object.keys(api.pluginConfig).join(', ') : 'null'}`);
|
|
159
|
+
|
|
155
160
|
const cfg = api.pluginConfig as MemoryRelayConfig | undefined;
|
|
156
|
-
|
|
157
|
-
|
|
161
|
+
|
|
162
|
+
// Try to get config from multiple sources
|
|
163
|
+
const apiKey = cfg?.apiKey || process.env.MEMORYRELAY_API_KEY;
|
|
164
|
+
const agentId = cfg?.agentId || process.env.MEMORYRELAY_AGENT_ID || "default";
|
|
165
|
+
|
|
166
|
+
if (!apiKey) {
|
|
167
|
+
api.logger.error(
|
|
168
|
+
"memory-memoryrelay: missing API key. Configure in one of these ways:\n" +
|
|
169
|
+
" 1. Add to config: plugins.entries.\"plugin-memoryrelay-ai\".config.apiKey\n" +
|
|
170
|
+
" 2. Set environment variable: MEMORYRELAY_API_KEY\n" +
|
|
171
|
+
" 3. Run: cat ~/.openclaw/openclaw.json | jq '.plugins.entries.\"plugin-memoryrelay-ai\".config = {\"apiKey\": \"YOUR_KEY\", \"agentId\": \"YOUR_AGENT\"}' > /tmp/config.json && mv /tmp/config.json ~/.openclaw/openclaw.json\n" +
|
|
172
|
+
"Get your API key from: https://memoryrelay.ai"
|
|
173
|
+
);
|
|
158
174
|
return;
|
|
159
175
|
}
|
|
176
|
+
|
|
177
|
+
api.logger.info(`memory-memoryrelay: using agentId: ${agentId}`);
|
|
160
178
|
|
|
161
179
|
const client = new MemoryRelayClient(
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
cfg
|
|
180
|
+
apiKey,
|
|
181
|
+
agentId,
|
|
182
|
+
cfg?.apiUrl || "https://api.memoryrelay.net",
|
|
165
183
|
);
|
|
166
184
|
|
|
167
185
|
// Verify connection on startup
|
package/openclaw.plugin.json
CHANGED