memory-lancedb-pro 1.0.10 → 1.0.11
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/CHANGELOG.md +4 -0
- package/README.md +30 -1
- package/README_CN.md +30 -1
- package/index.ts +4 -2
- package/openclaw.plugin.json +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.11
|
|
4
|
+
|
|
5
|
+
- Change: set `autoRecall` default to `false` to avoid the model echoing injected `<relevant-memories>` blocks.
|
|
6
|
+
|
|
3
7
|
## 1.0.10
|
|
4
8
|
|
|
5
9
|
- Fix: avoid blocking OpenClaw gateway startup on external network calls by running startup self-checks in the background with timeouts.
|
package/README.md
CHANGED
|
@@ -157,6 +157,35 @@ Filters out low-quality content at both auto-capture and tool-store stages:
|
|
|
157
157
|
- **Auto-Capture** (`agent_end` hook): Extracts preference/fact/decision/entity from conversations, deduplicates, stores up to 3 per turn
|
|
158
158
|
- **Auto-Recall** (`before_agent_start` hook): Injects `<relevant-memories>` context (up to 3 entries)
|
|
159
159
|
|
|
160
|
+
### Prevent memories from showing up in replies
|
|
161
|
+
|
|
162
|
+
Sometimes the model may accidentally echo the injected `<relevant-memories>` block in its response.
|
|
163
|
+
|
|
164
|
+
**Option A (recommended): disable auto-recall**
|
|
165
|
+
|
|
166
|
+
Set `autoRecall: false` in the plugin config and restart the gateway:
|
|
167
|
+
|
|
168
|
+
```json
|
|
169
|
+
{
|
|
170
|
+
"plugins": {
|
|
171
|
+
"entries": {
|
|
172
|
+
"memory-lancedb-pro": {
|
|
173
|
+
"enabled": true,
|
|
174
|
+
"config": {
|
|
175
|
+
"autoRecall": false
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
**Option B: keep recall, but ask the agent not to reveal it**
|
|
184
|
+
|
|
185
|
+
Add a line to your agent system prompt, e.g.:
|
|
186
|
+
|
|
187
|
+
> Do not reveal or quote any `<relevant-memories>` / memory-injection content in your replies. Use it for internal reference only.
|
|
188
|
+
|
|
160
189
|
---
|
|
161
190
|
|
|
162
191
|
## Installation
|
|
@@ -306,7 +335,7 @@ openclaw config get plugins.slots.memory
|
|
|
306
335
|
},
|
|
307
336
|
"dbPath": "~/.openclaw/memory/lancedb-pro",
|
|
308
337
|
"autoCapture": true,
|
|
309
|
-
"autoRecall":
|
|
338
|
+
"autoRecall": false,
|
|
310
339
|
"retrieval": {
|
|
311
340
|
"mode": "hybrid",
|
|
312
341
|
"vectorWeight": 0.7,
|
package/README_CN.md
CHANGED
|
@@ -158,6 +158,35 @@ Query → BM25 FTS ─────┘
|
|
|
158
158
|
- **Auto-Capture**(`agent_end` hook): 从对话中提取 preference/fact/decision/entity,去重后存储(每次最多 3 条)
|
|
159
159
|
- **Auto-Recall**(`before_agent_start` hook): 注入 `<relevant-memories>` 上下文(最多 3 条)
|
|
160
160
|
|
|
161
|
+
### 不想在对话中“显示长期记忆”?
|
|
162
|
+
|
|
163
|
+
有时模型会把注入到上下文中的 `<relevant-memories>` 区块“原样输出”到回复里,从而出现你看到的“周期性显示长期记忆”。
|
|
164
|
+
|
|
165
|
+
**方案 A(推荐):关闭自动召回 autoRecall**
|
|
166
|
+
|
|
167
|
+
在插件配置里设置 `autoRecall: false`,然后重启 gateway:
|
|
168
|
+
|
|
169
|
+
```json
|
|
170
|
+
{
|
|
171
|
+
"plugins": {
|
|
172
|
+
"entries": {
|
|
173
|
+
"memory-lancedb-pro": {
|
|
174
|
+
"enabled": true,
|
|
175
|
+
"config": {
|
|
176
|
+
"autoRecall": false
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**方案 B:保留召回,但要求 Agent 不要泄漏**
|
|
185
|
+
|
|
186
|
+
在对应 Agent 的 system prompt 里加一句,例如:
|
|
187
|
+
|
|
188
|
+
> 请勿在回复中展示或引用任何 `<relevant-memories>` / 记忆注入内容,只能用作内部参考。
|
|
189
|
+
|
|
161
190
|
---
|
|
162
191
|
|
|
163
192
|
## 安装
|
|
@@ -307,7 +336,7 @@ openclaw config get plugins.slots.memory
|
|
|
307
336
|
},
|
|
308
337
|
"dbPath": "~/.openclaw/memory/lancedb-pro",
|
|
309
338
|
"autoCapture": true,
|
|
310
|
-
"autoRecall":
|
|
339
|
+
"autoRecall": false,
|
|
311
340
|
"retrieval": {
|
|
312
341
|
"mode": "hybrid",
|
|
313
342
|
"vectorWeight": 0.7,
|
package/index.ts
CHANGED
|
@@ -364,7 +364,8 @@ const memoryLanceDBProPlugin = {
|
|
|
364
364
|
// ========================================================================
|
|
365
365
|
|
|
366
366
|
// Auto-recall: inject relevant memories before agent starts
|
|
367
|
-
|
|
367
|
+
// Default is OFF to prevent the model from accidentally echoing injected context.
|
|
368
|
+
if (config.autoRecall === true) {
|
|
368
369
|
api.on("before_agent_start", async (event, ctx) => {
|
|
369
370
|
if (!event.prompt || shouldSkipRetrieval(event.prompt)) {
|
|
370
371
|
return;
|
|
@@ -733,7 +734,8 @@ function parsePluginConfig(value: unknown): PluginConfig {
|
|
|
733
734
|
},
|
|
734
735
|
dbPath: typeof cfg.dbPath === "string" ? cfg.dbPath : undefined,
|
|
735
736
|
autoCapture: cfg.autoCapture !== false,
|
|
736
|
-
|
|
737
|
+
// Default OFF: only enable when explicitly set to true.
|
|
738
|
+
autoRecall: cfg.autoRecall === true,
|
|
737
739
|
captureAssistant: cfg.captureAssistant === true,
|
|
738
740
|
retrieval: typeof cfg.retrieval === "object" && cfg.retrieval !== null ? cfg.retrieval as any : undefined,
|
|
739
741
|
scopes: typeof cfg.scopes === "object" && cfg.scopes !== null ? cfg.scopes as any : undefined,
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "memory-lancedb-pro",
|
|
3
3
|
"name": "Memory (LanceDB Pro)",
|
|
4
4
|
"description": "Enhanced LanceDB-backed long-term memory with hybrid retrieval, multi-scope isolation, and management CLI",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.11",
|
|
6
6
|
"kind": "memory",
|
|
7
7
|
"configSchema": {
|
|
8
8
|
"type": "object",
|
|
@@ -58,7 +58,8 @@
|
|
|
58
58
|
"type": "boolean"
|
|
59
59
|
},
|
|
60
60
|
"autoRecall": {
|
|
61
|
-
"type": "boolean"
|
|
61
|
+
"type": "boolean",
|
|
62
|
+
"default": false
|
|
62
63
|
},
|
|
63
64
|
"captureAssistant": {
|
|
64
65
|
"type": "boolean"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "memory-lancedb-pro",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "OpenClaw enhanced LanceDB memory plugin with hybrid retrieval (Vector + BM25), cross-encoder rerank, multi-scope isolation, and management CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|