mr-memory 2.22.0 → 2.22.1

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.
Files changed (2) hide show
  1. package/index.ts +6 -19
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -712,27 +712,14 @@ const memoryRouterPlugin = {
712
712
  .description("Update mr-memory plugin and restore memory settings")
713
713
  .action(async () => {
714
714
  try {
715
- // 1. Update the npm package
715
+ // 1. Update the npm package via OpenClaw's built-in plugin updater
716
716
  console.log("Updating mr-memory plugin...");
717
- const { execSync } = await import("node:child_process");
718
- const extensionDir = (await import("node:path")).join(
719
- (await import("node:os")).homedir(),
720
- ".openclaw",
721
- "extensions",
722
- "mr-memory",
723
- );
724
- // Remove old install
725
- try {
726
- await (await import("node:fs/promises")).rm(extensionDir, { recursive: true, force: true });
727
- } catch { /* may not exist */ }
728
-
729
- // Reinstall from npm
730
717
  const base = resolveOpenClawInvocation();
731
- const installArgs = [...base.args, "plugins", "install", "mr-memory"];
732
- execSync(`${base.command} ${installArgs.slice(base.args.length === 0 ? 0 : 1).join(" ")}`, {
733
- stdio: "inherit",
734
- env: process.env,
735
- });
718
+ const { execSync } = await import("node:child_process");
719
+ const updateCmd = base.args.length > 0
720
+ ? `${base.command} ${base.args.join(" ")} plugins update mr-memory`
721
+ : `openclaw plugins update mr-memory`;
722
+ execSync(updateCmd, { stdio: "inherit", env: process.env });
736
723
 
737
724
  // 2. Restore memory search settings (in case OC update reset them)
738
725
  if (memoryKey) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mr-memory",
3
- "version": "2.22.0",
3
+ "version": "2.22.1",
4
4
  "description": "MemoryRouter persistent memory plugin for OpenClaw — your AI remembers every conversation",
5
5
  "type": "module",
6
6
  "files": [