@lotargo/memory_plugin 1.1.9 → 1.2.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.
@@ -49,8 +49,22 @@ export async function runSetup() {
49
49
  if (existsSync(legacyPluginFile)) {
50
50
  try { const { unlink } = await import("fs/promises"); await unlink(legacyPluginFile); } catch (e) {}
51
51
  }
52
+
53
+ // Purge stale OpenCode package cache for memory plugin so OpenCode downloads latest version
54
+ const opencodeCachePackages = join(home, ".cache", "opencode", "packages");
55
+ if (existsSync(opencodeCachePackages)) {
56
+ try {
57
+ const { rm } = await import("fs/promises");
58
+ const targets = ["@lotargo", "memory_plugin", "memory_plugin@latest", "opencode-memory-plugin", "opencode-memory-plugin@latest"];
59
+ for (const t of targets) {
60
+ const p = join(opencodeCachePackages, t);
61
+ if (existsSync(p)) await rm(p, { recursive: true, force: true });
62
+ }
63
+ } catch (e) {}
64
+ }
65
+
52
66
  await writeFile(opencodeConfigPath, JSON.stringify(config, null, 2));
53
- console.log(" [OK] OpenCode: configured plugin in ~/.config/opencode/opencode.json");
67
+ console.log(" [OK] OpenCode: configured plugin in ~/.config/opencode/opencode.json and cleared stale cache");
54
68
  configuredCount++;
55
69
  } catch (err) {
56
70
  console.log(" [SKIP] OpenCode setup skipped:", err.message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotargo/memory_plugin",
3
- "version": "1.1.9",
3
+ "version": "1.2.0",
4
4
  "description": "Persistent memory agent for coding AI tools — remembers user preferences and project context across sessions. Works with Antigravity, OpenCode, Claude Code, and Codex.",
5
5
  "type": "module",
6
6
  "main": "opencode-plugin/index.js",