diff --git a/openclaw.plugin.json b/openclaw.plugin.json index 46af698..76c8c3b 100644 --- a/openclaw.plugin.json +++ b/openclaw.plugin.json @@ -1,6 +1,20 @@ { "id": "memory-powermem", "kind": "memory", + "contracts": { + "tools": [ + "memory_recall", + "memory_store", + "memory_forget", + "experience_store", + "experience_recall", + "agent_memory_add", + "agent_memory_share", + "cross_scope_share", + "agent_memory_list", + "agent_memory_shared" + ] + }, "uiHints": { "mode": { "label": "Backend mode", diff --git a/src/index.ts b/src/index.ts index d67767f..b1a1631 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2214,8 +2214,6 @@ const memoryPlugin = { for (const msg of messages) { if (!msg || typeof msg !== "object") continue; const msgObj = msg as Record; - const role = msgObj.role; - if (role !== "user" && role !== "assistant") continue; const content = msgObj.content; if (typeof content === "string") { texts.push(content); @@ -2237,11 +2235,10 @@ const memoryPlugin = { } } - const MIN_LEN = 10; const MAX_CHUNK_LEN = 6000; const MAX_CHUNKS_PER_SESSION = 3; const sanitized = texts - .filter((t): t is string => typeof t === "string" && t.trim().length >= MIN_LEN) + .filter((t): t is string => typeof t === "string" && t.trim().length > 0) .map((t) => t.trim()) .filter( (t) => diff --git a/src/wal.ts b/src/wal.ts index 620b4e6..ced67e4 100644 --- a/src/wal.ts +++ b/src/wal.ts @@ -104,8 +104,6 @@ export async function walCapture( session: WalSession, deps: WalDeps, ): Promise> { - if (!detectKeySignals(prompt)) return []; - const reply = await deps.callLlm(prompt, { systemPrompt: WAL_EXTRACT_PROMPT, maxTokens: 512,