agenr 0.8.23 → 0.8.24

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.
@@ -276,20 +276,22 @@ function extractLastExchangeText(messages, maxTurns = EXCHANGE_USER_TURN_LIMIT)
276
276
  async function findPreviousSessionFile(sessionsDir, currentSessionId, logger) {
277
277
  try {
278
278
  const normalizedSessionId = currentSessionId?.trim();
279
- const currentSessionFileName = normalizedSessionId ? `${normalizedSessionId}.jsonl` : void 0;
279
+ const normalizedSessionFileName = normalizedSessionId ? `${normalizedSessionId}.jsonl` : void 0;
280
280
  const entries = await readdir(sessionsDir, { withFileTypes: true });
281
281
  const candidatePaths = [];
282
282
  for (const entry of entries) {
283
283
  if (!entry.isFile()) {
284
284
  continue;
285
285
  }
286
- if (!entry.name.endsWith(".jsonl")) {
286
+ const isPlainJsonl = entry.name.endsWith(".jsonl");
287
+ const isResetJsonl = entry.name.includes(".jsonl.reset.");
288
+ if (!isPlainJsonl && !isResetJsonl) {
287
289
  continue;
288
290
  }
289
291
  if (entry.name.includes(".deleted.")) {
290
292
  continue;
291
293
  }
292
- if (currentSessionFileName && entry.name === currentSessionFileName) {
294
+ if (normalizedSessionId && entry.name.startsWith(normalizedSessionId)) {
293
295
  continue;
294
296
  }
295
297
  candidatePaths.push(path2.join(sessionsDir, entry.name));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agenr",
3
- "version": "0.8.23",
3
+ "version": "0.8.24",
4
4
  "openclaw": {
5
5
  "extensions": [
6
6
  "dist/openclaw-plugin/index.js"
@@ -11,13 +11,6 @@
11
11
  "bin": {
12
12
  "agenr": "dist/cli.js"
13
13
  },
14
- "scripts": {
15
- "build": "tsup src/cli.ts src/cli-main.ts src/openclaw-plugin/index.ts --format esm --dts",
16
- "dev": "tsup src/cli.ts src/cli-main.ts --format esm --watch",
17
- "test": "vitest run",
18
- "test:watch": "vitest",
19
- "typecheck": "tsc --noEmit"
20
- },
21
14
  "dependencies": {
22
15
  "@clack/prompts": "^1.0.1",
23
16
  "@libsql/client": "^0.17.0",
@@ -61,9 +54,11 @@
61
54
  "README.md"
62
55
  ],
63
56
  "author": "agenr-ai",
64
- "pnpm": {
65
- "overrides": {
66
- "fast-xml-parser": "^5.3.6"
67
- }
57
+ "scripts": {
58
+ "build": "tsup src/cli.ts src/cli-main.ts src/openclaw-plugin/index.ts --format esm --dts",
59
+ "dev": "tsup src/cli.ts src/cli-main.ts --format esm --watch",
60
+ "test": "vitest run",
61
+ "test:watch": "vitest",
62
+ "typecheck": "tsc --noEmit"
68
63
  }
69
- }
64
+ }