mr-memory 2.11.0 → 2.11.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 +17 -4
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -611,15 +611,18 @@ const memoryRouterPlugin = {
611
611
  .action(async (key: string) => { await applyKey(key); });
612
612
 
613
613
  mr.command("off")
614
- .description("Disable MemoryRouter (removes key)")
614
+ .description("Disable MemoryRouter (removes key, keeps CLI available)")
615
615
  .action(async () => {
616
616
  try {
617
+ // Soft disable: clear key but keep plugin enabled so CLI remains available
618
+ // This avoids the catch-22 where disabling the plugin removes the `mr` command
617
619
  await setPluginConfig(api, {});
618
- await setPluginEnabled(api, false);
620
+ // Note: we intentionally do NOT call setPluginEnabled(api, false)
619
621
  // Restore OpenClaw's built-in session memory scanning
620
622
  await restoreMemorySearchConfig();
621
- console.log("✓ MemoryRouter disabled.");
623
+ console.log("✓ MemoryRouter disabled (key cleared).");
622
624
  console.log(" • Session memory scanning restored");
625
+ console.log(" • CLI still available — run `openclaw mr <key>` to re-enable");
623
626
  } catch (err) {
624
627
  console.error(`Failed to disable: ${err instanceof Error ? err.message : String(err)}`);
625
628
  }
@@ -689,7 +692,17 @@ const memoryRouterPlugin = {
689
692
  .description("Show MemoryRouter vault stats")
690
693
  .option("--json", "JSON output")
691
694
  .action(async (opts) => {
692
- if (!memoryKey) { console.error("Not configured. Run: openclaw mr <key>"); return; }
695
+ if (!memoryKey) {
696
+ if (opts.json) {
697
+ console.log(JSON.stringify({ enabled: false, key: null }, null, 2));
698
+ } else {
699
+ console.log("MemoryRouter Status");
700
+ console.log("───────────────────────────");
701
+ console.log(`Enabled: ✗ No (no key configured)`);
702
+ console.log(`\nRun: openclaw mr <key> to enable`);
703
+ }
704
+ return;
705
+ }
693
706
  try {
694
707
  const res = await fetch(`${endpoint}/v1/memory/stats`, {
695
708
  headers: { Authorization: `Bearer ${memoryKey}` },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mr-memory",
3
- "version": "2.11.0",
3
+ "version": "2.11.1",
4
4
  "description": "MemoryRouter persistent memory plugin for OpenClaw — your AI remembers every conversation",
5
5
  "type": "module",
6
6
  "files": [