zames_pro 2.82.96 → 2.82.98
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 +17 -7
- package/dist/qwen-chats.js +18 -5
- 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.98] - 2026-10-24
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **checkpoint:** a tar spawn error is reported, not thrown
|
|
15
|
+
|
|
16
|
+
## [2.82.97] - 2026-10-24
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- **qwen:** restore dialogue order from an ISO history timestamp
|
|
21
|
+
|
|
10
22
|
## [2.82.96] - 2026-10-24
|
|
11
23
|
|
|
12
24
|
### Fixed
|
package/dist/checkpoint.js
CHANGED
|
@@ -88,13 +88,23 @@ allRecords) {
|
|
|
88
88
|
// ---------- tar / fs plumbing ----------
|
|
89
89
|
function runTar(args, cwd, timeout = 60_000) {
|
|
90
90
|
return new Promise((resolve) => {
|
|
91
|
-
execFile
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
91
|
+
// `execFile` throws SYNCHRONOUSLY on a spawn error (ENOENT for the shell,
|
|
92
|
+
// ENOTDIR when the cwd is a regular file). A checkpoint must be
|
|
93
|
+
// BEST-EFFORT: an escaped throw aborted the task it was meant to protect
|
|
94
|
+
// (create) or crashed /rewind (restore) instead of returning null / a
|
|
95
|
+
// reason. Normalize it to the same machine failure every caller handles.
|
|
96
|
+
try {
|
|
97
|
+
execFile('tar', args, { cwd, timeout, maxBuffer: 1024 * 1024 * 8, windowsHide: true }, (err, _stdout, stderr) => {
|
|
98
|
+
if (!err)
|
|
99
|
+
return resolve({ code: 0, stderr: '' });
|
|
100
|
+
const raw = err.code;
|
|
101
|
+
const code = typeof raw === 'number' ? raw : 127;
|
|
102
|
+
resolve({ code, stderr: String(stderr || err.message || '') });
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
catch (e) {
|
|
106
|
+
resolve({ code: 127, stderr: e.message });
|
|
107
|
+
}
|
|
98
108
|
});
|
|
99
109
|
}
|
|
100
110
|
// Git fingerprint of a working tree: HEAD plus the porcelain status. Two
|
package/dist/qwen-chats.js
CHANGED
|
@@ -171,6 +171,21 @@ export function parseQwenChatList(json) {
|
|
|
171
171
|
* A message's text is taken from `content` (string) or from `fragments[]`
|
|
172
172
|
* (a DeepSeek-style payload: keep REQUEST for user, RESPONSE for assistant).
|
|
173
173
|
*/
|
|
174
|
+
const qwenStamp = (m) => {
|
|
175
|
+
const n = Number(m.timestamp);
|
|
176
|
+
if (Number.isFinite(n))
|
|
177
|
+
return n;
|
|
178
|
+
// An ISO stamp (`2026-10-23T10:00:00Z`) is not a number: `Number(...)` is
|
|
179
|
+
// NaN, the comparator fell back to insertion order, and a map whose order
|
|
180
|
+
// differs from the real chronology restored the model's answer BEFORE the
|
|
181
|
+
// operator's question (GLM's parser already falls back to Date.parse).
|
|
182
|
+
if (typeof m.timestamp === 'string') {
|
|
183
|
+
const t = Date.parse(m.timestamp);
|
|
184
|
+
if (Number.isFinite(t))
|
|
185
|
+
return t;
|
|
186
|
+
}
|
|
187
|
+
return NaN;
|
|
188
|
+
};
|
|
174
189
|
export function parseQwenHistory(json) {
|
|
175
190
|
const root = json;
|
|
176
191
|
// A BARE array (no `data` wrapper) and a top-level `messages` are the same
|
|
@@ -219,12 +234,10 @@ export function parseQwenHistory(json) {
|
|
|
219
234
|
// Order by index first — the map is in insertion order — and only then by
|
|
220
235
|
// stamp; a missing stamp inherits its neighbour's position instead of
|
|
221
236
|
// jumping to the front. A stable sort keeps the original order on a tie.
|
|
222
|
-
.map((m, i) => ({ m, i }))
|
|
237
|
+
.map((m, i) => ({ m, i, t: qwenStamp(m) }))
|
|
223
238
|
.sort((a, b) => {
|
|
224
|
-
const
|
|
225
|
-
const
|
|
226
|
-
const va = Number.isFinite(ta) ? ta : NaN;
|
|
227
|
-
const vb = Number.isFinite(tb) ? tb : NaN;
|
|
239
|
+
const va = a.t;
|
|
240
|
+
const vb = b.t;
|
|
228
241
|
if (Number.isFinite(va) && Number.isFinite(vb)) {
|
|
229
242
|
if (va !== vb)
|
|
230
243
|
return va - vb;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zames_pro",
|
|
3
|
-
"version": "2.82.
|
|
3
|
+
"version": "2.82.98",
|
|
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": {
|