fix(config): warn for missing official memory slot · openclaw/openclaw@d1787b7
giodl73-repo
·
2026-05-16
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | --- |
2 | | -summary: "Configure the bundled LanceDB memory plugin, including local Ollama-compatible embeddings" |
| 2 | +summary: "Configure the official external LanceDB memory plugin, including local Ollama-compatible embeddings" |
3 | 3 | read_when: |
4 | | - - You are configuring the bundled memory-lancedb plugin |
| 4 | + - You are configuring the memory-lancedb plugin |
5 | 5 | - You want LanceDB-backed long-term memory with auto-recall or auto-capture |
6 | 6 | - You are using local OpenAI-compatible embeddings such as Ollama |
7 | 7 | title: "Memory LanceDB" |
8 | 8 | sidebarTitle: "Memory LanceDB" |
9 | 9 | --- |
10 | 10 | |
11 | | -`memory-lancedb` is a bundled memory plugin that stores long-term memory in |
| 11 | +`memory-lancedb` is an official external memory plugin that stores long-term memory in |
12 | 12 | LanceDB and uses embeddings for recall. It can automatically recall relevant |
13 | 13 | memories before a model turn and capture important facts after a response. |
14 | 14 | |
15 | 15 | Use it when you want a local vector database for memory, need an |
16 | 16 | OpenAI-compatible embedding endpoint, or want to keep a memory database outside |
17 | 17 | the default built-in memory store. |
18 | 18 | |
| 19 | +## Installation |
| 20 | + |
| 21 | +Install `memory-lancedb` before setting `plugins.slots.memory = "memory-lancedb"`: |
| 22 | + |
| 23 | +```bash |
| 24 | +openclaw plugins install @openclaw/memory-lancedb |
| 25 | +``` |
| 26 | + |
| 27 | +The plugin is published to npm and is not bundled into the OpenClaw runtime image. |
| 28 | +The installer writes the plugin entry and switches the memory slot when no other |
| 29 | +plugin owns it. |
| 30 | + |
19 | 31 | <Note> |
20 | 32 | `memory-lancedb` is an active memory plugin. Enable it by selecting the memory |
21 | 33 | slot with `plugins.slots.memory = "memory-lancedb"`. Companion plugins such as |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -330,6 +330,33 @@ describe("config plugin validation", () => {
|
330 | 330 | ).toBe(false); |
331 | 331 | }); |
332 | 332 | |
| 333 | +it("warns instead of failing when an official external memory slot plugin is not installed", () => { |
| 334 | +const res = validateConfigObjectWithPlugins( |
| 335 | +{ |
| 336 | +agents: { list: [{ id: "pi" }] }, |
| 337 | +plugins: { |
| 338 | +slots: { memory: "memory-lancedb" }, |
| 339 | +entries: { "memory-lancedb": { enabled: true } }, |
| 340 | +}, |
| 341 | +}, |
| 342 | +{ |
| 343 | +env: suiteEnv(), |
| 344 | +pluginMetadataSnapshot: { |
| 345 | +manifestRegistry: { |
| 346 | +plugins: [], |
| 347 | +diagnostics: [], |
| 348 | +}, |
| 349 | +}, |
| 350 | +}, |
| 351 | +); |
| 352 | + |
| 353 | +expect(res.ok).toBe(true); |
| 354 | +const message = |
| 355 | +"plugin not installed: memory-lancedb — install the official external plugin with: openclaw plugins install @openclaw/memory-lancedb"; |
| 356 | +expectPathMessage(res.warnings, "plugins.slots.memory", message); |
| 357 | +expectPathMessage(res.warnings, "plugins.entries.memory-lancedb", message); |
| 358 | +}); |
| 359 | + |
333 | 360 | it.runIf(process.platform !== "win32")( |
334 | 361 | "reports configured blocked plugins without stale not-found wording", |
335 | 362 | async () => { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1557,7 +1557,9 @@ function validateConfigObjectWithPluginsBase(
|
1557 | 1557 | memorySlot.trim() && |
1558 | 1558 | !knownIds.has(memorySlot) |
1559 | 1559 | ) { |
1560 | | -pushMissingPluginIssue("plugins.slots.memory", memorySlot); |
| 1560 | +pushMissingPluginIssue("plugins.slots.memory", memorySlot, { |
| 1561 | +warnOnly: Boolean(formatMissingOfficialExternalPluginWarning(memorySlot)), |
| 1562 | +}); |
1561 | 1563 | } |
1562 | 1564 | |
1563 | 1565 | let selectedMemoryPluginId: string | null = null; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。