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.
- package/index.ts +12 -4
- 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}
|
|
236
|
+
`memoryrouter: injected ${data.memories_found || 0} memories (${data.memory_tokens || 0} tokens)`,
|
|
237
237
|
);
|
|
238
|
-
|
|
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}
|
|
342
|
+
`memoryrouter: injected ${data.memories_found || 0} memories (${data.memory_tokens || 0} tokens)`,
|
|
339
343
|
);
|
|
340
|
-
|
|
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(
|