mr-memory 2.21.0 → 2.22.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/index.ts +40 -0
- package/package.json +1 -1
- package/upload.ts +1 -1
package/index.ts
CHANGED
|
@@ -708,6 +708,46 @@ 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
|
|
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
|
+
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
|
+
});
|
|
736
|
+
|
|
737
|
+
// 2. Restore memory search settings (in case OC update reset them)
|
|
738
|
+
if (memoryKey) {
|
|
739
|
+
console.log("\nRestoring memory settings...");
|
|
740
|
+
await optimizeMemorySearchConfig();
|
|
741
|
+
console.log(" ✓ Session memory scanning disabled (MR handles this)");
|
|
742
|
+
console.log(" ✓ Workspace file search kept active");
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
console.log("\n✅ mr-memory updated. Restart gateway to apply: openclaw gateway restart");
|
|
746
|
+
} catch (err) {
|
|
747
|
+
console.error(`Update failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
748
|
+
}
|
|
749
|
+
});
|
|
750
|
+
|
|
711
751
|
// Density commands
|
|
712
752
|
for (const [name, desc] of [
|
|
713
753
|
["xhigh", "Set density to xhigh (160 results, ~50k tokens)"],
|
package/package.json
CHANGED
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}
|
|
454
|
+
console.log(`\nSending ${allLines.length} chunks in ${batches.length} batches...`);
|
|
455
455
|
|
|
456
456
|
let totalProcessed = 0;
|
|
457
457
|
let totalFailed = 0;
|