mr-memory 2.11.0 → 2.11.2

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