zames_pro 2.82.46 → 2.82.48
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/sessions.js +8 -2
- 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.48] - 2026-10-22
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **sessions:** cap the stored todo checklist
|
|
15
|
+
|
|
16
|
+
## [2.82.47] - 2026-10-22
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- **checkpoint:** take the pre-rewind backup after a successful extract
|
|
21
|
+
|
|
10
22
|
## [2.82.46] - 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/sessions.js
CHANGED
|
@@ -67,6 +67,8 @@ function safeName(id) {
|
|
|
67
67
|
}
|
|
68
68
|
// Save/update a session. workdir is needed so that when launched from the same
|
|
69
69
|
// project we restore exactly its last chat.
|
|
70
|
+
/** Hard cap on the todo checklist stored with a session. */
|
|
71
|
+
export const SESSION_TODOS_CAP = 1000;
|
|
70
72
|
export function saveSession({ id, title = '', workdir = '', todos, provider, }) {
|
|
71
73
|
if (!id)
|
|
72
74
|
return null;
|
|
@@ -91,8 +93,12 @@ export function saveSession({ id, title = '', workdir = '', todos, provider, })
|
|
|
91
93
|
// Keep the previous checklist unless a new one is explicitly passed —
|
|
92
94
|
// saveLastChat() calls this for title/workdir only and must not wipe it.
|
|
93
95
|
const nextTodos = todos !== undefined ? todos : prev.todos;
|
|
94
|
-
if (nextTodos !== undefined)
|
|
95
|
-
|
|
96
|
+
if (nextTodos !== undefined) {
|
|
97
|
+
// A checklist is a UI indicator, not a database: a model that keeps
|
|
98
|
+
// appending items would grow the session file (read on every
|
|
99
|
+
// startup/restore) without bound. Keep the NEWEST entries.
|
|
100
|
+
data.todos = nextTodos.slice(-SESSION_TODOS_CAP);
|
|
101
|
+
}
|
|
96
102
|
writeJsonAtomic(file, data);
|
|
97
103
|
writeIndex({ id, workdir: data.workdir });
|
|
98
104
|
return data;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zames_pro",
|
|
3
|
-
"version": "2.82.
|
|
3
|
+
"version": "2.82.48",
|
|
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": {
|