zames_pro 2.82.44 → 2.82.47
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 +18 -0
- package/dist/checkpoint.js +6 -3
- package/dist/net-capture.js +4 -1
- package/dist/undo.js +6 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.82.47] - 2026-10-22
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **checkpoint:** take the pre-rewind backup after a successful extract
|
|
15
|
+
|
|
16
|
+
## [2.82.46] - 2026-10-22
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- **undo:** report no backup for an unreadable target
|
|
21
|
+
|
|
22
|
+
## [2.82.45] - 2026-10-22
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- **net-log:** rotate only real dumps, never a foreign txt
|
|
27
|
+
|
|
10
28
|
## [2.82.44] - 2026-10-22
|
|
11
29
|
|
|
12
30
|
### Fixed
|
package/dist/checkpoint.js
CHANGED
|
@@ -258,15 +258,18 @@ export class CheckpointStore {
|
|
|
258
258
|
.catch(() => false);
|
|
259
259
|
if (!exists)
|
|
260
260
|
return { ok: false, reason: 'archive_missing' };
|
|
261
|
-
// Backup the CURRENT tree before touching it.
|
|
262
|
-
const backup = await this.create(record.workdir, 'pre-rewind', false);
|
|
263
261
|
// Extract to a temp dir FIRST; only a successful extract may touch workdir
|
|
264
|
-
// (otherwise a bad archive would wipe the tree).
|
|
262
|
+
// (otherwise a bad archive would wipe the tree). The pre-rewind backup is
|
|
263
|
+
// taken AFTER this check: a corrupt archive would otherwise cost a FULL
|
|
264
|
+
// snapshot of the tree on every attempt, filling /checkpoints with
|
|
265
|
+
// identical entries and evicting the real ones.
|
|
265
266
|
const tmp = await fs.mkdtemp(path.join(os.tmpdir(), 'zames-rewind-'));
|
|
266
267
|
try {
|
|
267
268
|
const res = await runTar(tarExtractArgs(record.file, tmp), tmp);
|
|
268
269
|
if (res.code !== 0)
|
|
269
270
|
return { ok: false, reason: 'extract_failed' };
|
|
271
|
+
// Backup the CURRENT tree before touching it.
|
|
272
|
+
const backup = await this.create(record.workdir, 'pre-rewind', false);
|
|
270
273
|
// Full restore: drop everything in workdir except the excludes, then
|
|
271
274
|
// copy the snapshot in. A partial extract would leave behind files the
|
|
272
275
|
// task created after the checkpoint.
|
package/dist/net-capture.js
CHANGED
|
@@ -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
|
-
|
|
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();
|
package/dist/undo.js
CHANGED
|
@@ -44,8 +44,13 @@ export class UndoStore {
|
|
|
44
44
|
existed = true;
|
|
45
45
|
}
|
|
46
46
|
catch (e) {
|
|
47
|
+
// A missing file is the normal first-write case. Anything else (a
|
|
48
|
+
// DIRECTORY at the path: EISDIR; a permission error) means no backup
|
|
49
|
+
// can be taken — return null instead of throwing a raw Node error out
|
|
50
|
+
// of the tool call (the same rule as CheckpointStore.create()).
|
|
47
51
|
if (e.code !== 'ENOENT')
|
|
48
|
-
|
|
52
|
+
return null;
|
|
53
|
+
// ENOENT: the file does not exist yet (`existed` stays false).
|
|
49
54
|
}
|
|
50
55
|
const stamp = Date.now();
|
|
51
56
|
// The name only needs to be SHORT and unique; the backup name also
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zames_pro",
|
|
3
|
-
"version": "2.82.
|
|
3
|
+
"version": "2.82.47",
|
|
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": {
|