fix(openclaw): fix MEMORY.md project query mismatch and add feed botToken support

Three fixes for the OpenClaw plugin:

1. Fix MEMORY.md sync returning empty content
   - syncMemoryToWorkspace() was querying basename(workspaceDir) as the
     project name (e.g. 'workspace'), but observations are stored under
     agent-scoped names like 'openclaw-main'
   - Now queries both the base project and agent-scoped project name
   - Passes EventContext through so the correct project can be derived

2. Add dedicated botToken support for observation feed
   - New optional 'botToken' field in observationFeed config
   - When set, sends observations directly via Telegram Bot API instead
     of routing through the gateway's channel plugin
   - Allows using a separate bot for the observation stream

3. Fix plugin kind for memory slot compatibility
   - Changed plugin kind from 'integration' to 'memory' so OpenClaw
     recognizes it as a valid memory slot plugin
   - Fixes 'memory slot plugin not found' warning when
     plugins.slots.memory = 'claude-mem' is configured
This commit is contained in:
Alex Newman
2026-02-12 23:48:44 -05:00
parent 26ac35ad40
commit 6cad77328b
2 changed files with 55 additions and 12 deletions
+5 -1
View File
@@ -2,7 +2,7 @@
"id": "claude-mem",
"name": "Claude-Mem (Persistent Memory)",
"description": "Official OpenClaw plugin for Claude-Mem. Records observations from embedded runner sessions and streams them to messaging channels.",
"kind": "integration",
"kind": "memory",
"version": "1.0.0",
"author": "thedotmack",
"homepage": "https://claude-mem.com",
@@ -41,6 +41,10 @@
"to": {
"type": "string",
"description": "Target chat/user ID to send observations to"
},
"botToken": {
"type": "string",
"description": "Optional dedicated Telegram bot token for the feed (bypasses gateway channel)"
}
}
}