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.
- package/index.ts +6 -19
- 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
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
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) {
|