mr-memory 2.21.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 (3) hide show
  1. package/index.ts +27 -0
  2. package/package.json +1 -1
  3. package/upload.ts +1 -1
package/index.ts CHANGED
@@ -708,6 +708,33 @@ const memoryRouterPlugin = {
708
708
  }
709
709
  });
710
710
 
711
+ mr.command("update")
712
+ .description("Update mr-memory plugin and restore memory settings")
713
+ .action(async () => {
714
+ try {
715
+ // 1. Update the npm package via OpenClaw's built-in plugin updater
716
+ console.log("Updating mr-memory plugin...");
717
+ const base = resolveOpenClawInvocation();
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 });
723
+
724
+ // 2. Restore memory search settings (in case OC update reset them)
725
+ if (memoryKey) {
726
+ console.log("\nRestoring memory settings...");
727
+ await optimizeMemorySearchConfig();
728
+ console.log(" ✓ Session memory scanning disabled (MR handles this)");
729
+ console.log(" ✓ Workspace file search kept active");
730
+ }
731
+
732
+ console.log("\n✅ mr-memory updated. Restart gateway to apply: openclaw gateway restart");
733
+ } catch (err) {
734
+ console.error(`Update failed: ${err instanceof Error ? err.message : String(err)}`);
735
+ }
736
+ });
737
+
711
738
  // Density commands
712
739
  for (const [name, desc] of [
713
740
  ["xhigh", "Set density to xhigh (160 results, ~50k tokens)"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mr-memory",
3
- "version": "2.21.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": [
package/upload.ts CHANGED
@@ -451,7 +451,7 @@ export async function runUpload(params: {
451
451
  }
452
452
  if (currentBatch.length > 0) batches.push(currentBatch);
453
453
 
454
- console.log(`\nSending ${allLines.length} memories in ${batches.length} batches...`);
454
+ console.log(`\nSending ${allLines.length} chunks in ${batches.length} batches...`);
455
455
 
456
456
  let totalProcessed = 0;
457
457
  let totalFailed = 0;