mr-memory 1.0.3 → 1.0.4
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 +14 -11
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -73,7 +73,7 @@ const memoryRouterPlugin = {
|
|
|
73
73
|
if (memoryKey) {
|
|
74
74
|
api.logger.info?.(`memoryrouter: registered (endpoint: ${endpoint})`);
|
|
75
75
|
} else {
|
|
76
|
-
api.logger.info?.("memoryrouter: no key configured — run: openclaw mr
|
|
76
|
+
api.logger.info?.("memoryrouter: no key configured — run: openclaw mr <key>");
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
if (memoryKey) {
|
|
@@ -118,12 +118,15 @@ const memoryRouterPlugin = {
|
|
|
118
118
|
|
|
119
119
|
api.registerCli(
|
|
120
120
|
({ program }) => {
|
|
121
|
-
const mr = program.command("mr")
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
.
|
|
125
|
-
|
|
126
|
-
|
|
121
|
+
const mr = program.command("mr")
|
|
122
|
+
.description("MemoryRouter memory commands")
|
|
123
|
+
.argument("[key]", "Your MemoryRouter memory key (mk_xxx)")
|
|
124
|
+
.action(async (key: string | undefined) => {
|
|
125
|
+
if (!key) {
|
|
126
|
+
// No key provided — show help
|
|
127
|
+
mr.help();
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
127
130
|
if (!key.startsWith("mk")) {
|
|
128
131
|
console.error("Invalid key format. Keys start with 'mk' (e.g. mk_xxx)");
|
|
129
132
|
return;
|
|
@@ -139,7 +142,7 @@ const memoryRouterPlugin = {
|
|
|
139
142
|
.action(async () => {
|
|
140
143
|
await api.updatePluginConfig({});
|
|
141
144
|
console.log("✓ MemoryRouter disabled. LLM calls go direct to provider.");
|
|
142
|
-
console.log(" Key removed. Re-enable with: openclaw mr
|
|
145
|
+
console.log(" Key removed. Re-enable with: openclaw mr <key>");
|
|
143
146
|
});
|
|
144
147
|
|
|
145
148
|
mr.command("status")
|
|
@@ -147,7 +150,7 @@ const memoryRouterPlugin = {
|
|
|
147
150
|
.option("--json", "JSON output")
|
|
148
151
|
.action(async (opts) => {
|
|
149
152
|
if (!memoryKey) {
|
|
150
|
-
console.error("MemoryRouter not configured. Run: openclaw mr
|
|
153
|
+
console.error("MemoryRouter not configured. Run: openclaw mr <key>");
|
|
151
154
|
return;
|
|
152
155
|
}
|
|
153
156
|
try {
|
|
@@ -182,7 +185,7 @@ const memoryRouterPlugin = {
|
|
|
182
185
|
.option("--brain <dir>", "State directory with sessions (default: ~/.openclaw)")
|
|
183
186
|
.action(async (targetPath: string | undefined, opts: { workspace?: string; brain?: string }) => {
|
|
184
187
|
if (!memoryKey) {
|
|
185
|
-
console.error("MemoryRouter not configured. Run: openclaw mr
|
|
188
|
+
console.error("MemoryRouter not configured. Run: openclaw mr <key>");
|
|
186
189
|
return;
|
|
187
190
|
}
|
|
188
191
|
const os = await import("node:os");
|
|
@@ -211,7 +214,7 @@ const memoryRouterPlugin = {
|
|
|
211
214
|
.description("Clear all memories from vault")
|
|
212
215
|
.action(async () => {
|
|
213
216
|
if (!memoryKey) {
|
|
214
|
-
console.error("MemoryRouter not configured. Run: openclaw mr
|
|
217
|
+
console.error("MemoryRouter not configured. Run: openclaw mr <key>");
|
|
215
218
|
return;
|
|
216
219
|
}
|
|
217
220
|
try {
|