mr-memory 2.11.2 → 2.11.3

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/package.json +1 -1
  2. package/upload.ts +7 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mr-memory",
3
- "version": "2.11.2",
3
+ "version": "2.11.3",
4
4
  "description": "MemoryRouter persistent memory plugin for OpenClaw — your AI remembers every conversation",
5
5
  "type": "module",
6
6
  "files": [
package/upload.ts CHANGED
@@ -170,7 +170,11 @@ async function discoverBrainFiles(stateDir: string): Promise<string[]> {
170
170
  const sessionsDir = path.join(stateDir, "agents", "main", "sessions");
171
171
  if (await exists(sessionsDir)) {
172
172
  const allSessionFiles = await fs.readdir(sessionsDir);
173
- const sessionFiles = (allSessionFiles as string[]).filter((f) => f.endsWith(".jsonl"));
173
+ // Match both active sessions (.jsonl) and soft-deleted ones (.jsonl.deleted.*)
174
+ // OpenClaw renames old sessions instead of deleting them — the data is still valid
175
+ const sessionFiles = (allSessionFiles as string[]).filter((f) =>
176
+ f.endsWith(".jsonl") || f.includes(".jsonl.deleted.")
177
+ );
174
178
  files.push(...sessionFiles.map((f) => path.join(sessionsDir, f)));
175
179
  }
176
180
 
@@ -260,7 +264,8 @@ export async function runUpload(params: {
260
264
  for (const file of files) {
261
265
  const displayName = path.basename(file);
262
266
  try {
263
- const lines = file.endsWith(".jsonl") ? await sessionToJsonl(file) : await fileToJsonl(file);
267
+ const isSession = file.endsWith(".jsonl") || file.includes(".jsonl.deleted.");
268
+ const lines = isSession ? await sessionToJsonl(file) : await fileToJsonl(file);
264
269
  if (lines.length === 0) {
265
270
  skippedEmpty++;
266
271
  continue;