mr-memory 2.9.3 → 2.9.5

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 +12 -4
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -233,9 +233,13 @@ const memoryRouterPlugin = {
233
233
 
234
234
  if (data.context) {
235
235
  log(
236
- `memoryrouter: injected ${data.memories_found || 0} memories (${data.memory_tokens || 0} memory tokens, ${data.tokens_billed || 0} total billed)`,
236
+ `memoryrouter: injected ${data.memories_found || 0} memories (${data.memory_tokens || 0} tokens)`,
237
237
  );
238
- return { prependContext: wrapForInjection(data.context) };
238
+ // Return both fields for forward/backward compat:
239
+ // - Old OpenClaw: ignores appendSystemPrompt, uses prependContext
240
+ // - New OpenClaw (PR #25866): same content → uses appendSystemPrompt only
241
+ const wrapped = wrapForInjection(data.context);
242
+ return { appendSystemPrompt: wrapped, prependContext: wrapped };
239
243
  }
240
244
  } catch {
241
245
  // Silent fail on tool iterations — don't block the agent
@@ -335,9 +339,13 @@ const memoryRouterPlugin = {
335
339
 
336
340
  if (data.context) {
337
341
  log(
338
- `memoryrouter: injected ${data.memories_found || 0} memories (${data.memory_tokens || 0} memory tokens, ${data.tokens_billed || 0} total billed)`,
342
+ `memoryrouter: injected ${data.memories_found || 0} memories (${data.memory_tokens || 0} tokens)`,
339
343
  );
340
- return { prependContext: wrapForInjection(data.context) };
344
+ // Return both fields for forward/backward compat:
345
+ // - Old OpenClaw: ignores appendSystemPrompt, uses prependContext
346
+ // - New OpenClaw (PR #25866): same content → uses appendSystemPrompt only
347
+ const wrapped = wrapForInjection(data.context);
348
+ return { appendSystemPrompt: wrapped, prependContext: wrapped };
341
349
  }
342
350
  } catch (err) {
343
351
  log(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mr-memory",
3
- "version": "2.9.3",
3
+ "version": "2.9.5",
4
4
  "description": "MemoryRouter persistent memory plugin for OpenClaw — your AI remembers every conversation",
5
5
  "type": "module",
6
6
  "files": [