From b70d6eea96d645e361984bc8fc3fdb1dad5c0cae Mon Sep 17 00:00:00 2001 From: Mahesh Sanikommu Date: Tue, 8 Sep 2026 19:23:00 -0700 Subject: [PATCH 1/2] Declare hyphenated tool aliases in plugin manifest OpenClaw 2026.9.x rejects tool registrations missing from contracts.tools, so the four hyphenated aliases logged activation errors and never loaded. Declare them alongside the snake_case names and mark snake_case deprecated in the README, ahead of removal in 3.0. Fixes supermemoryai/openclaw-supermemory#63 --- README.md | 18 ++++++++++++------ openclaw.plugin.json | 4 ++++ package.json | 2 +- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8e7dad0..9e43633 100644 --- a/README.md +++ b/README.md @@ -51,12 +51,18 @@ Everything runs in the cloud. Supermemory handles extraction, deduplication, and The AI uses these tools autonomously. With custom container tags enabled, all tools support a `containerTag` parameter for routing to specific containers. -| Tool | Description | -| --------------------- | ------------------------------------------------------ | -| `supermemory_store` | Save information to memory. | -| `supermemory_search` | Search memories by query. | -| `supermemory_forget` | Delete a memory by query or ID. | -| `supermemory_profile` | View user profile (persistent facts + recent context). | +| Tool | Description | +| ----------------------- | ------------------------------------------------------ | +| `supermemory-save` | Save information to memory. | +| `supermemory-search` | Search memories by query. | +| `supermemory-forget` | Delete a memory by query or ID. | +| `supermemory-profile` | View user profile (persistent facts + recent context). | + +The hyphenated names above are the standard across all Supermemory plugins. The +older `supermemory_store`, `supermemory_search`, `supermemory_forget` and +`supermemory_profile` names still work and resolve to the same tools, but they +are deprecated and will be removed in 3.0. Update any tool allowlists to the +hyphenated names. ## CLI Commands diff --git a/openclaw.plugin.json b/openclaw.plugin.json index b18665f..d3b9427 100644 --- a/openclaw.plugin.json +++ b/openclaw.plugin.json @@ -9,6 +9,10 @@ ], "contracts": { "tools": [ + "supermemory-search", + "supermemory-save", + "supermemory-forget", + "supermemory-profile", "supermemory_search", "supermemory_store", "supermemory_forget", diff --git a/package.json b/package.json index 44e8281..4cd2553 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@supermemory/openclaw-supermemory", - "version": "2.1.15", + "version": "2.1.17", "type": "module", "description": "OpenClaw Supermemory memory plugin", "license": "MIT", From f36a7e0ca74eec539d76a45d456727f57bbf4b6c Mon Sep 17 00:00:00 2001 From: Mahesh Sanikommu Date: Tue, 8 Sep 2026 19:30:42 -0700 Subject: [PATCH 2/2] Recognize hyphenated tool names in prompt section and setup buildPromptSection only checked the snake_case names, so an allowlist narrowed to the hyphenated tools dropped the whole memory section, including the warning not to use local memory files. Prefer the hyphenated names, fall back to snake_case, and name whichever tool is actually present. Setup now allowlists both spellings. --- commands/cli.ts | 5 +++++ runtime.ts | 21 ++++++++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/commands/cli.ts b/commands/cli.ts index 773d049..a1f683d 100644 --- a/commands/cli.ts +++ b/commands/cli.ts @@ -7,7 +7,12 @@ import type { SupermemoryClient } from "../client.ts" import { DEFAULT_BASE_URL } from "../config.ts" import { log } from "../logger.ts" +// Hyphenated names are current; snake_case is deprecated and removed in 3.0. const SUPERMEMORY_TOOL_NAMES = [ + "supermemory-save", + "supermemory-search", + "supermemory-forget", + "supermemory-profile", "supermemory_store", "supermemory_search", "supermemory_forget", diff --git a/runtime.ts b/runtime.ts index c256b15..1ed621d 100644 --- a/runtime.ts +++ b/runtime.ts @@ -111,9 +111,16 @@ export function buildMemoryRuntime( export function buildPromptSection(params: { availableTools: Set }): string[] { - const hasSearch = params.availableTools.has("supermemory_search") - const hasStore = params.availableTools.has("supermemory_store") - if (!hasSearch && !hasStore) return [] + // Prefer the hyphenated names; fall back to the deprecated snake_case ones. + const pick = (hyphen: string, snake: string): string | null => { + if (params.availableTools.has(hyphen)) return hyphen + if (params.availableTools.has(snake)) return snake + return null + } + + const searchTool = pick("supermemory-search", "supermemory_search") + const storeTool = pick("supermemory-save", "supermemory_store") + if (!searchTool && !storeTool) return [] const lines: string[] = [ "## Memory (Supermemory)", @@ -123,14 +130,14 @@ export function buildPromptSection(params: { "", ] - if (hasSearch) { + if (searchTool) { lines.push( - "Use supermemory_search to look up prior conversations, preferences, and facts.", + `Use ${searchTool} to look up prior conversations, preferences, and facts.`, ) } - if (hasStore) { + if (storeTool) { lines.push( - "Use supermemory_store to save important information the user asks you to remember.", + `Use ${storeTool} to save important information the user asks you to remember.`, ) }