@memoryrelay/plugin-memoryrelay-ai 0.17.0 → 0.17.1
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 +12 -0
- package/index.ts +3 -3
- package/openclaw.plugin.json +2 -2
- package/package.json +4 -1
- package/src/cache/local-cache.ts +13 -4
- package/src/client/memoryrelay-client.ts +1 -1
package/README.md
CHANGED
|
@@ -34,6 +34,18 @@ MemoryRelay is designed for engineering teams managing complex, long-running pro
|
|
|
34
34
|
openclaw plugins install @memoryrelay/plugin-memoryrelay-ai
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
+
**1b. Install native dependencies (for local SQLite cache)**
|
|
38
|
+
|
|
39
|
+
The local cache requires `better-sqlite3`, which includes native bindings. After plugin installation, run:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
cd ~/.openclaw/extensions/plugin-memoryrelay-ai && npm install --omit=dev
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Or install globally: `npm install -g better-sqlite3`
|
|
46
|
+
|
|
47
|
+
> **Note:** If you skip this step, the plugin still works — it falls back to API-only mode (no local cache).
|
|
48
|
+
|
|
37
49
|
**2. Set your API key**
|
|
38
50
|
|
|
39
51
|
```bash
|
package/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* OpenClaw Memory Plugin - MemoryRelay
|
|
3
|
-
* Version: 0.
|
|
3
|
+
* Version: 0.17.1
|
|
4
4
|
*
|
|
5
5
|
* Long-term memory with vector search using MemoryRelay API.
|
|
6
6
|
* Provides auto-recall and auto-capture via lifecycle hooks.
|
|
@@ -358,7 +358,7 @@ export default async function plugin(api: OpenClawPluginApi): Promise<void> {
|
|
|
358
358
|
api.logger.error(`memory-memoryrelay: health check failed: ${String(err)}`);
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
-
// --- Local Cache + SyncDaemon (v0.17.0) ---
|
|
361
|
+
// --- Local Cache + SyncDaemon (v0.17.0+) ---
|
|
362
362
|
// Replaces the stub file hack from v0.16.x. LocalCache creates a real SQLite
|
|
363
363
|
// database at the expected path, satisfying OpenClaw's existsSync scanner and
|
|
364
364
|
// enabling local-first recall/capture pipelines.
|
|
@@ -472,7 +472,7 @@ export default async function plugin(api: OpenClawPluginApi): Promise<void> {
|
|
|
472
472
|
// ========================================================================
|
|
473
473
|
|
|
474
474
|
api.logger.info?.(
|
|
475
|
-
`memory-memoryrelay: plugin v0.17.
|
|
475
|
+
`memory-memoryrelay: plugin v0.17.1 loaded (${Object.values(TOOL_GROUPS).flat().length} tools, autoRecall: ${pluginConfig.autoRecall}, autoCapture: ${autoCaptureConfig.enabled ? autoCaptureConfig.tier : "off"}, debug: ${debugEnabled})`,
|
|
476
476
|
);
|
|
477
477
|
|
|
478
478
|
// ========================================================================
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"id": "plugin-memoryrelay-ai",
|
|
3
3
|
"kind": "memory",
|
|
4
4
|
"name": "MemoryRelay AI",
|
|
5
|
-
"description": "MemoryRelay v0.17.
|
|
6
|
-
"version": "0.17.
|
|
5
|
+
"description": "MemoryRelay v0.17.1 - Long-term memory with pipeline architecture, 42 tools, 17 commands, V2 async, sessions, decisions, patterns & projects (api.memoryrelay.net)",
|
|
6
|
+
"version": "0.17.1",
|
|
7
7
|
"uiHints": {
|
|
8
8
|
"apiKey": {
|
|
9
9
|
"label": "MemoryRelay API Key",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memoryrelay/plugin-memoryrelay-ai",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.1",
|
|
4
4
|
"description": "OpenClaw memory plugin for MemoryRelay API - 42 tools, 17 commands, V2 async, sessions, decisions, patterns, projects & semantic search",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|
|
@@ -52,6 +52,9 @@
|
|
|
52
52
|
"src/",
|
|
53
53
|
"skills/"
|
|
54
54
|
],
|
|
55
|
+
"bundledDependencies": [
|
|
56
|
+
"better-sqlite3"
|
|
57
|
+
],
|
|
55
58
|
"engines": {
|
|
56
59
|
"node": ">=20.0.0"
|
|
57
60
|
},
|
package/src/cache/local-cache.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type BetterSqlite3 from "better-sqlite3";
|
|
2
2
|
import { statSync } from "node:fs";
|
|
3
3
|
import { migrateIfNeeded } from "./schema.js";
|
|
4
4
|
import type {
|
|
@@ -62,21 +62,30 @@ function rowToBuffer(row: BufferRow): BufferEntry {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
export class LocalCache {
|
|
65
|
-
private db:
|
|
65
|
+
private db: BetterSqlite3.Database;
|
|
66
66
|
private readonly _dbPath: string;
|
|
67
67
|
private readonly config: LocalCacheConfig;
|
|
68
68
|
|
|
69
69
|
constructor(dbPath: string, config: LocalCacheConfig) {
|
|
70
|
+
let Database: typeof BetterSqlite3;
|
|
71
|
+
try {
|
|
72
|
+
Database = require("better-sqlite3");
|
|
73
|
+
} catch {
|
|
74
|
+
throw new Error(
|
|
75
|
+
"better-sqlite3 not available — run: cd ~/.openclaw/extensions/plugin-memoryrelay-ai && npm install --omit=dev",
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
70
79
|
this._dbPath = dbPath;
|
|
71
80
|
this.config = config;
|
|
72
|
-
this.db = this.initDb(dbPath);
|
|
81
|
+
this.db = this.initDb(dbPath, Database);
|
|
73
82
|
}
|
|
74
83
|
|
|
75
84
|
get dbPath(): string {
|
|
76
85
|
return this._dbPath;
|
|
77
86
|
}
|
|
78
87
|
|
|
79
|
-
private initDb(dbPath: string):
|
|
88
|
+
private initDb(dbPath: string, Database: typeof BetterSqlite3): BetterSqlite3.Database {
|
|
80
89
|
const db = new Database(dbPath);
|
|
81
90
|
db.pragma("journal_mode = WAL");
|
|
82
91
|
db.pragma("foreign_keys = ON");
|
|
@@ -153,7 +153,7 @@ export class MemoryRelayClient implements IMemoryRelayClient {
|
|
|
153
153
|
headers: {
|
|
154
154
|
"Content-Type": "application/json",
|
|
155
155
|
Authorization: `Bearer ${this.apiKey}`,
|
|
156
|
-
"User-Agent": "openclaw-memory-memoryrelay/0.17.
|
|
156
|
+
"User-Agent": "openclaw-memory-memoryrelay/0.17.1",
|
|
157
157
|
},
|
|
158
158
|
body: body ? JSON.stringify(body) : undefined,
|
|
159
159
|
},
|