zames_pro 2.82.43 → 2.82.45

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/CHANGELOG.md CHANGED
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.82.45] - 2026-10-22
11
+
12
+ ### Fixed
13
+
14
+ - **net-log:** rotate only real dumps, never a foreign txt
15
+
16
+ ## [2.82.44] - 2026-10-22
17
+
18
+ ### Fixed
19
+
20
+ - **transcript:** rotate by timestamp, not by the workdir label
21
+
10
22
  ## [2.82.43] - 2026-10-22
11
23
 
12
24
  ### Fixed
@@ -399,7 +399,10 @@ export async function rotateNetLog(dir, keep = NET_LOG_KEEP, now = Date.now()) {
399
399
  // The stamp prefix sorts the names chronologically, so a plain sort is
400
400
  // enough — no stat() per file (a directory with 77k entries would make
401
401
  // 77k syscalls on every response).
402
- const names = (await fs.readdir(dir).catch(() => [])).filter((n) => n.endsWith('.txt'));
402
+ // ONLY our own dumps count: a foreign `.txt` in the directory must not be
403
+ // deleted, and must not eat a slot of the keep window either.
404
+ const DUMP_RE = /^\d{4}-\d{2}-\d{2}T[\d-]+Z_/;
405
+ const names = (await fs.readdir(dir).catch(() => [])).filter((n) => n.endsWith('.txt') && DUMP_RE.test(n));
403
406
  if (names.length <= keep)
404
407
  return 0;
405
408
  names.sort();
@@ -20,7 +20,22 @@ export function rotateTranscripts(dir, keep = MAX_TRANSCRIPT_FILES) {
20
20
  }
21
21
  if (names.length <= keep)
22
22
  return 0;
23
- names.sort();
23
+ // The name is `<sessionName>-<ISO stamp>.jsonl`, and sessionName is the
24
+ // WORKDIR label: one log dir holds several projects, so a plain name sort
25
+ // orders by the LABEL and deletes the newest file of an early-alphabet
26
+ // project (or the CURRENT run's transcript). Order by the STAMP instead,
27
+ // with the name as a tie-break.
28
+ const stampOf = (n) => {
29
+ const m = /(\d{4}-\d{2}-\d{2}T[\d-]+Z)\.jsonl$/.exec(n);
30
+ return m ? m[1] : '';
31
+ };
32
+ names.sort((a, b) => {
33
+ const sa = stampOf(a);
34
+ const sb = stampOf(b);
35
+ if (sa !== sb)
36
+ return sa < sb ? -1 : 1;
37
+ return a < b ? -1 : a > b ? 1 : 0;
38
+ });
24
39
  let removed = 0;
25
40
  for (const n of names.slice(0, names.length - keep)) {
26
41
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zames_pro",
3
- "version": "2.82.43",
3
+ "version": "2.82.45",
4
4
  "description": "Terminal coding agent that drives a real browser to chat with DeepSeek, Qwen and other web LLMs — no API key required. Reads and edits files, runs commands, commits to git, like Claude Code / Codex CLI.",
5
5
  "type": "module",
6
6
  "bin": {