From f06ce983122dc311fcf2cebec5d9a0f953f995ea Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 18 Jan 2026 15:47:56 +0000 Subject: [PATCH] refactor: rename lancedb memory plugin --- docs/plugin.md | 1 + extensions/memory/index.test.ts | 8 ++++---- extensions/memory/index.ts | 28 +++++++++++++++------------- extensions/memory/package.json | 4 ++-- 4 files changed, 22 insertions(+), 19 deletions(-) diff --git a/docs/plugin.md b/docs/plugin.md index dbf711956..44d1b1def 100644 --- a/docs/plugin.md +++ b/docs/plugin.md @@ -37,6 +37,7 @@ See [Voice Call](/plugins/voice-call) for a concrete example plugin. - Microsoft Teams is plugin-only as of 2026.1.15; install `@clawdbot/msteams` if you use Teams. - Memory (Core) — bundled memory search plugin (enabled by default via `plugins.slots.memory`) +- Memory (LanceDB) — bundled long-term memory plugin (auto-recall/capture; set `plugins.slots.memory = "memory-lancedb"`) - [Voice Call](/plugins/voice-call) — `@clawdbot/voice-call` - [Zalo Personal](/plugins/zalouser) — `@clawdbot/zalouser` - [Matrix](/channels/matrix) — `@clawdbot/matrix` diff --git a/extensions/memory/index.test.ts b/extensions/memory/index.test.ts index edf1e3983..18fe30791 100644 --- a/extensions/memory/index.test.ts +++ b/extensions/memory/index.test.ts @@ -37,8 +37,8 @@ describeWithKey("memory plugin e2e", () => { // Dynamic import to avoid loading LanceDB when not testing const { default: memoryPlugin } = await import("./index.js"); - expect(memoryPlugin.id).toBe("memory"); - expect(memoryPlugin.name).toBe("Memory (Vector)"); + expect(memoryPlugin.id).toBe("memory-lancedb"); + expect(memoryPlugin.name).toBe("Memory (LanceDB)"); expect(memoryPlugin.kind).toBe("memory"); expect(memoryPlugin.configSchema).toBeDefined(); expect(memoryPlugin.register).toBeInstanceOf(Function); @@ -185,8 +185,8 @@ describeWithKey("memory plugin live tests", () => { const logs: string[] = []; const mockApi = { - id: "memory", - name: "Memory (Vector)", + id: "memory-lancedb", + name: "Memory (LanceDB)", source: "test", config: {}, pluginConfig: { diff --git a/extensions/memory/index.ts b/extensions/memory/index.ts index b171a8525..7f9f082c1 100644 --- a/extensions/memory/index.ts +++ b/extensions/memory/index.ts @@ -1,5 +1,5 @@ /** - * Clawdbot Memory Plugin + * Clawdbot Memory (LanceDB) Plugin * * Long-term memory with vector search for AI conversations. * Uses LanceDB for storage and OpenAI for embeddings. @@ -214,9 +214,9 @@ function detectCategory(text: string): MemoryCategory { // ============================================================================ const memoryPlugin = { - id: "memory", - name: "Memory (Vector)", - description: "Long-term memory with vector search and seamless auto-recall/capture", + id: "memory-lancedb", + name: "Memory (LanceDB)", + description: "LanceDB-backed long-term memory with auto-recall/capture", kind: "memory" as const, configSchema: memoryConfigSchema, @@ -227,7 +227,9 @@ const memoryPlugin = { const db = new MemoryDB(resolvedDbPath, vectorDim); const embeddings = new Embeddings(cfg.embedding.apiKey, cfg.embedding.model!); - api.logger.info(`memory: plugin registered (db: ${resolvedDbPath}, lazy init)`); + api.logger.info( + `memory-lancedb: plugin registered (db: ${resolvedDbPath}, lazy init)`, + ); // ======================================================================== // Tools @@ -417,7 +419,7 @@ const memoryPlugin = { ({ program }) => { const memory = program .command("ltm") - .description("Long-term memory plugin commands"); + .description("LanceDB memory plugin commands"); memory .command("list") @@ -477,14 +479,14 @@ const memoryPlugin = { .join("\n"); api.logger.info?.( - `memory: injecting ${results.length} memories into context`, + `memory-lancedb: injecting ${results.length} memories into context`, ); return { prependContext: `\nThe following memories may be relevant to this conversation:\n${memoryContext}\n`, }; } catch (err) { - api.logger.warn(`memory: recall failed: ${String(err)}`); + api.logger.warn(`memory-lancedb: recall failed: ${String(err)}`); } }); } @@ -559,10 +561,10 @@ const memoryPlugin = { } if (stored > 0) { - api.logger.info(`memory: auto-captured ${stored} memories`); + api.logger.info(`memory-lancedb: auto-captured ${stored} memories`); } } catch (err) { - api.logger.warn(`memory: capture failed: ${String(err)}`); + api.logger.warn(`memory-lancedb: capture failed: ${String(err)}`); } }); } @@ -572,14 +574,14 @@ const memoryPlugin = { // ======================================================================== api.registerService({ - id: "memory", + id: "memory-lancedb", start: () => { api.logger.info( - `memory: initialized (db: ${resolvedDbPath}, model: ${cfg.embedding.model})`, + `memory-lancedb: initialized (db: ${resolvedDbPath}, model: ${cfg.embedding.model})`, ); }, stop: () => { - api.logger.info("memory: stopped"); + api.logger.info("memory-lancedb: stopped"); }, }); }, diff --git a/extensions/memory/package.json b/extensions/memory/package.json index 0542f2276..8e52c8b5a 100644 --- a/extensions/memory/package.json +++ b/extensions/memory/package.json @@ -1,8 +1,8 @@ { - "name": "@clawdbot/memory", + "name": "@clawdbot/memory-lancedb", "version": "0.0.1", "type": "module", - "description": "Clawdbot long-term memory plugin with vector search and seamless auto-recall/capture", + "description": "Clawdbot LanceDB-backed long-term memory plugin with auto-recall/capture", "dependencies": { "@lancedb/lancedb": "^0.15.0", "@sinclair/typebox": "0.34.47",