hippo-memory 0.13.3 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -43,6 +43,10 @@ hippo recall "data pipeline issues" --budget 2000
43
43
 
44
44
  That's it. You have a memory system.
45
45
 
46
+ ### What's new in v0.14.0
47
+
48
+ - **OpenClaw backup cleanup.** Plugin updates no longer leave `hippo-memory.bak-*` directories that cause duplicate plugin ID errors. Cleanup runs automatically at boot.
49
+
46
50
  ### What's new in v0.13.3
47
51
 
48
52
  - **Final polish.** 8 remaining review findings fixed: ROLLBACK safety, MCP protocol compliance, dead code removal, atomic write cleanup, env var trimming, ESM import consistency.
@@ -8,7 +8,7 @@
8
8
  */
9
9
 
10
10
  import { execFileSync } from 'child_process';
11
- import { existsSync } from 'fs';
11
+ import { existsSync, readdirSync, rmSync } from 'fs';
12
12
  import { join } from 'path';
13
13
  import { basename as posixBasename, dirname as posixDirname } from 'path/posix';
14
14
 
@@ -163,6 +163,30 @@ function formatToolErrorMemory(toolName: string, error: string): string {
163
163
  return `Tool '${toolName}' failed: ${truncated}${suffix}`;
164
164
  }
165
165
 
166
+ /**
167
+ * Remove stale hippo-memory.bak-* directories from the OpenClaw extensions folder.
168
+ * These are left behind by plugin updates and cause duplicate plugin ID errors on boot.
169
+ */
170
+ function cleanupBackupPlugins(logger?: { info?: (...args: unknown[]) => void }): void {
171
+ try {
172
+ const extensionsDir = join(
173
+ process.env.USERPROFILE || process.env.HOME || '',
174
+ '.openclaw', 'extensions'
175
+ );
176
+ if (!existsSync(extensionsDir)) return;
177
+
178
+ for (const entry of readdirSync(extensionsDir)) {
179
+ if (entry.startsWith('hippo-memory.bak')) {
180
+ const fullPath = join(extensionsDir, entry);
181
+ rmSync(fullPath, { recursive: true, force: true });
182
+ logger?.info?.(`[hippo] Removed stale backup: ${entry}`);
183
+ }
184
+ }
185
+ } catch {
186
+ // Best-effort cleanup — don't break boot
187
+ }
188
+ }
189
+
166
190
  function hippoRememberSucceeded(result: string): boolean {
167
191
  return result.includes('Remembered [');
168
192
  }
@@ -184,6 +208,9 @@ function runHippo(args: readonly string[], cwd?: string): string {
184
208
  export default function register(api: any) {
185
209
  const logger = api.logger ?? console;
186
210
 
211
+ // Clean up stale backup plugins from previous updates
212
+ cleanupBackupPlugins(logger);
213
+
187
214
  // --- Tool: hippo_recall ---
188
215
  api.registerTool((ctx: HippoRuntimeContext) => ({
189
216
  name: 'hippo_recall',
@@ -2,7 +2,7 @@
2
2
  "id": "hippo-memory",
3
3
  "name": "Hippo Memory",
4
4
  "description": "Biologically-inspired memory for AI agents. Decay by default, retrieval strengthening, sleep consolidation.",
5
- "version": "0.13.3",
5
+ "version": "0.14.0",
6
6
 
7
7
  "configSchema": {
8
8
  "type": "object",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hippo-memory",
3
- "version": "0.13.3",
3
+ "version": "0.14.0",
4
4
  "description": "Hippo Memory plugin for OpenClaw - biologically-inspired agent memory",
5
5
  "main": "index.ts",
6
6
  "openclaw": {
@@ -2,7 +2,7 @@
2
2
  "id": "hippo-memory",
3
3
  "name": "Hippo Memory",
4
4
  "description": "Biologically-inspired memory for AI agents. Decay by default, retrieval strengthening, sleep consolidation.",
5
- "version": "0.13.3",
5
+ "version": "0.14.0",
6
6
  "configSchema": {
7
7
  "type": "object",
8
8
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hippo-memory",
3
- "version": "0.13.3",
3
+ "version": "0.14.0",
4
4
  "description": "Biologically-inspired memory system for AI agents. Decay by default, strength through use.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",