refactor: rename lancedb memory plugin

This commit is contained in:
Peter Steinberger
2026-01-18 15:47:56 +00:00
parent b546b2a48d
commit f06ce98312
4 changed files with 22 additions and 19 deletions

View File

@@ -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. - 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 (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` - [Voice Call](/plugins/voice-call) — `@clawdbot/voice-call`
- [Zalo Personal](/plugins/zalouser) — `@clawdbot/zalouser` - [Zalo Personal](/plugins/zalouser) — `@clawdbot/zalouser`
- [Matrix](/channels/matrix) — `@clawdbot/matrix` - [Matrix](/channels/matrix) — `@clawdbot/matrix`

View File

@@ -37,8 +37,8 @@ describeWithKey("memory plugin e2e", () => {
// Dynamic import to avoid loading LanceDB when not testing // Dynamic import to avoid loading LanceDB when not testing
const { default: memoryPlugin } = await import("./index.js"); const { default: memoryPlugin } = await import("./index.js");
expect(memoryPlugin.id).toBe("memory"); expect(memoryPlugin.id).toBe("memory-lancedb");
expect(memoryPlugin.name).toBe("Memory (Vector)"); expect(memoryPlugin.name).toBe("Memory (LanceDB)");
expect(memoryPlugin.kind).toBe("memory"); expect(memoryPlugin.kind).toBe("memory");
expect(memoryPlugin.configSchema).toBeDefined(); expect(memoryPlugin.configSchema).toBeDefined();
expect(memoryPlugin.register).toBeInstanceOf(Function); expect(memoryPlugin.register).toBeInstanceOf(Function);
@@ -185,8 +185,8 @@ describeWithKey("memory plugin live tests", () => {
const logs: string[] = []; const logs: string[] = [];
const mockApi = { const mockApi = {
id: "memory", id: "memory-lancedb",
name: "Memory (Vector)", name: "Memory (LanceDB)",
source: "test", source: "test",
config: {}, config: {},
pluginConfig: { pluginConfig: {

View File

@@ -1,5 +1,5 @@
/** /**
* Clawdbot Memory Plugin * Clawdbot Memory (LanceDB) Plugin
* *
* Long-term memory with vector search for AI conversations. * Long-term memory with vector search for AI conversations.
* Uses LanceDB for storage and OpenAI for embeddings. * Uses LanceDB for storage and OpenAI for embeddings.
@@ -214,9 +214,9 @@ function detectCategory(text: string): MemoryCategory {
// ============================================================================ // ============================================================================
const memoryPlugin = { const memoryPlugin = {
id: "memory", id: "memory-lancedb",
name: "Memory (Vector)", name: "Memory (LanceDB)",
description: "Long-term memory with vector search and seamless auto-recall/capture", description: "LanceDB-backed long-term memory with auto-recall/capture",
kind: "memory" as const, kind: "memory" as const,
configSchema: memoryConfigSchema, configSchema: memoryConfigSchema,
@@ -227,7 +227,9 @@ const memoryPlugin = {
const db = new MemoryDB(resolvedDbPath, vectorDim); const db = new MemoryDB(resolvedDbPath, vectorDim);
const embeddings = new Embeddings(cfg.embedding.apiKey, cfg.embedding.model!); 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 // Tools
@@ -417,7 +419,7 @@ const memoryPlugin = {
({ program }) => { ({ program }) => {
const memory = program const memory = program
.command("ltm") .command("ltm")
.description("Long-term memory plugin commands"); .description("LanceDB memory plugin commands");
memory memory
.command("list") .command("list")
@@ -477,14 +479,14 @@ const memoryPlugin = {
.join("\n"); .join("\n");
api.logger.info?.( api.logger.info?.(
`memory: injecting ${results.length} memories into context`, `memory-lancedb: injecting ${results.length} memories into context`,
); );
return { return {
prependContext: `<relevant-memories>\nThe following memories may be relevant to this conversation:\n${memoryContext}\n</relevant-memories>`, prependContext: `<relevant-memories>\nThe following memories may be relevant to this conversation:\n${memoryContext}\n</relevant-memories>`,
}; };
} catch (err) { } 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) { if (stored > 0) {
api.logger.info(`memory: auto-captured ${stored} memories`); api.logger.info(`memory-lancedb: auto-captured ${stored} memories`);
} }
} catch (err) { } 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({ api.registerService({
id: "memory", id: "memory-lancedb",
start: () => { start: () => {
api.logger.info( api.logger.info(
`memory: initialized (db: ${resolvedDbPath}, model: ${cfg.embedding.model})`, `memory-lancedb: initialized (db: ${resolvedDbPath}, model: ${cfg.embedding.model})`,
); );
}, },
stop: () => { stop: () => {
api.logger.info("memory: stopped"); api.logger.info("memory-lancedb: stopped");
}, },
}); });
}, },

View File

@@ -1,8 +1,8 @@
{ {
"name": "@clawdbot/memory", "name": "@clawdbot/memory-lancedb",
"version": "0.0.1", "version": "0.0.1",
"type": "module", "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": { "dependencies": {
"@lancedb/lancedb": "^0.15.0", "@lancedb/lancedb": "^0.15.0",
"@sinclair/typebox": "0.34.47", "@sinclair/typebox": "0.34.47",