zames_pro 2.82.45 → 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 +12 -0
- package/dist/checkpoint.js +6 -3
- package/dist/undo.js +6 -1
- package/package.json +1 -1
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.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
|
+
|
|
10
22
|
## [2.82.45] - 2026-10-22
|
|
11
23
|
|
|
12
24
|
### 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/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": {
|