dsh-trajectory-traceview-plus 0.11.6 → 0.11.7
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/README.en.md +9 -9
- package/README.md +9 -9
- package/docs/DESIGN.md +3 -0
- package/docs/PROVENANCE.md +1 -0
- package/lib/client.js +21 -2
- package/package.json +1 -1
- package/scripts/browser-check.mjs +1 -1
- package/scripts/readme-numbers.mjs +1 -1
- package/src/30-helpers.js +21 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.11.7 — 0.11.6 之后的检查(2026-11-28)
|
|
4
|
+
|
|
5
|
+
- **导出的表头少了「工具总耗时」。** 屏幕上的 KPI 条有五项:轮次 / 步骤 / 工具 / 出错步骤 /
|
|
6
|
+
工具总耗时。导出的首行只抄了四项——你看着「900 ms 工具总耗时」,把导出粘进 issue,
|
|
7
|
+
恰好丢的就是这个数。现在首行与屏幕逐项对齐。断言 `EXPORTKPI1` 与探针 23n
|
|
8
|
+
(23n 是把屏幕数字和导出数字真的比一遍,不是查字面);变异(删掉那一项)→ 两处同时红。
|
|
9
|
+
- **探针第三次拆分。** `probe-detail2.js` 已经涨到 37 秒,超过 `agent-browser eval` 的 30 秒上限;
|
|
10
|
+
变异验证时它直接报「无法解析」而不是红断言——那等于没有验证。现在 `probe-detail3.js`
|
|
11
|
+
单独承载 0.11.6 之后新增的 7 组。拆分时还撞到一个真问题:两个探针文件都在**顶层**写
|
|
12
|
+
`const healthySnap = …`,它落在页面全局作用域上,第二个文件一 eval 就
|
|
13
|
+
`Identifier 'healthySnap' has already been declared`。两边都改成 IIFE 内声明。
|
|
14
|
+
- **模型正在生成的那一步,被排到了本轮第一步的前面。** 流式 partial 的时间戳是
|
|
15
|
+
`轮次最早 seq + 0.5`,所以当本轮已经有步骤 1、2 时,进行中的步骤 3 排到了步骤 1 **之前**:
|
|
16
|
+
实测顺序 `用户 → 步骤3(运行中) → 步骤1 → 步骤2`。正在跑的那张卡出现在已完成工作左边,
|
|
17
|
+
时间顺序读起来是错的。现在取本轮**最大** seq + 0.5(`用户 → 步骤1 → 步骤2 → 步骤3`)。
|
|
18
|
+
断言 `PARTIALORDER1`(含"第一步的 partial 仍要跟在用户消息后"这一反向用例);
|
|
19
|
+
变异(退回 `轮次最早 + 0.5`)→ 红。
|
|
20
|
+
|
|
3
21
|
## 0.11.6 — 全维度审查后的修复(2026-11-28)
|
|
4
22
|
|
|
5
23
|
四个只读审查(两个 Codex worker + 本项目自己的 subagent)在 0.11.5 上报了可复现的问题。
|
package/README.en.md
CHANGED
|
@@ -123,7 +123,7 @@ dsh-trajectory-traceview-plus/ # repo root (directory name == npm package name
|
|
|
123
123
|
├── docs/ # DESIGN.md (why each change) / PROVENANCE.md (generated)
|
|
124
124
|
├── test/
|
|
125
125
|
│ ├── smoke.test.cjs # helper unit tests (plain node)
|
|
126
|
-
│ └── browser/ # fixture.js (host stub) / probe
|
|
126
|
+
│ └── browser/ # fixture.js (host stub) / probe*.js in 4 parts + probe-en.js (English chrome)
|
|
127
127
|
│ # probe-en.js (English UI)
|
|
128
128
|
│ # harness.html is generated by browser-harness.mjs and not committed
|
|
129
129
|
└── lib/
|
|
@@ -136,7 +136,7 @@ dsh-trajectory-traceview-plus/ # repo root (directory name == npm package name
|
|
|
136
136
|
Install from npm (recommended — **pin the exact version**):
|
|
137
137
|
|
|
138
138
|
```powershell
|
|
139
|
-
dsh plugin --profile web add dsh-trajectory-traceview-plus@0.11.
|
|
139
|
+
dsh plugin --profile web add dsh-trajectory-traceview-plus@0.11.7
|
|
140
140
|
```
|
|
141
141
|
|
|
142
142
|
> **Why not `@latest`**: `dsh plugin` forwards to pnpm, and **pnpm 12 ships a supply-chain delay** (`minimumReleaseAge`, default **1440 minutes = 24 hours**): a version published less than a day ago is not selected by `@latest`, and pnpm **silently falls back to the previous release** — no warning at all. Right after 0.11.0 was published, `pnpm add pkg@latest` installed 0.10.0, which the newer DSH hosts skip entirely. An exact version has no such ambiguity (verified with both cold and warm caches).
|
|
@@ -148,10 +148,10 @@ dsh plugin --profile web add dsh-trajectory-traceview-plus@0.11.6
|
|
|
148
148
|
Install from GitHub (**always pin the tag**):
|
|
149
149
|
|
|
150
150
|
```powershell
|
|
151
|
-
dsh plugin --profile web add "github:MisonL/dsh-trajectory-traceview-plus#v0.11.
|
|
151
|
+
dsh plugin --profile web add "github:MisonL/dsh-trajectory-traceview-plus#v0.11.7"
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
-
> **Why the `#v0.11.
|
|
154
|
+
> **Why the `#v0.11.7` matters**: a `github:` spec without a ref installs the **default branch HEAD**, not any released version. This repository keeps committing after a release (v0.11.0 was followed by five docs/scripts commits), so an unpinned install can hand you different code tomorrow while still reporting version 0.11.0. Pinning the tag is what makes "installed" and "released" the same code.
|
|
155
155
|
|
|
156
156
|
Then **restart `dsh web`** to take effect.
|
|
157
157
|
|
|
@@ -268,8 +268,8 @@ The tests run the helper region against mock snapshots covering: tree building /
|
|
|
268
268
|
**What needs a real browser** (`react-dom/server` cannot see scroll, focus, clipboard, intervals or layout):
|
|
269
269
|
|
|
270
270
|
```powershell
|
|
271
|
-
node scripts/browser-check.mjs # builds the harness;
|
|
272
|
-
node scripts/browser-check.mjs --shots # saves screenshots and adds 1 more group / 3 assertions: 375px overflow (
|
|
271
|
+
node scripts/browser-check.mjs # builds the harness; 314 assertions over 48 recorded groups
|
|
272
|
+
node scripts/browser-check.mjs --shots # saves screenshots and adds 1 more group / 3 assertions: 375px overflow (49 total)
|
|
273
273
|
```
|
|
274
274
|
|
|
275
275
|
It needs `agent-browser` (Chrome via CDP). **Deliberately not in CI**: adding a browser to the runner is more moving parts than the check is worth, and a flaky browser job trains people to ignore red builds. Run it locally before releasing.
|
|
@@ -331,10 +331,10 @@ node scripts/provenance.mjs # 4. refresh the provenance list (rerun
|
|
|
331
331
|
npm run check # 5. the 7 local gates; all green before going further
|
|
332
332
|
git add -A; git commit -m "..." # 6.
|
|
333
333
|
git push origin main # 7.
|
|
334
|
-
git tag -a v0.11.
|
|
335
|
-
git push origin v0.11.
|
|
334
|
+
git tag -a v0.11.7 -m "..." # 8.
|
|
335
|
+
git push origin v0.11.7 # 9.
|
|
336
336
|
npm publish # 10. runs prepublishOnly -> the whole check again
|
|
337
|
-
gh release create v0.11.
|
|
337
|
+
gh release create v0.11.7 --notes-file … # 11. the badge reads the Release, not the tag
|
|
338
338
|
|
|
339
339
|
node scripts/release-status.mjs # 12. do all four agree? (tag / Release / npm metadata / tarball)
|
|
340
340
|
```
|
package/README.md
CHANGED
|
@@ -126,7 +126,7 @@ dsh-trajectory-traceview-plus/ # 仓库根(目录名 = npm 包名)
|
|
|
126
126
|
├── docs/ # DESIGN.md(每处改动的原因)/ PROVENANCE.md(自动生成)
|
|
127
127
|
├── test/
|
|
128
128
|
│ ├── smoke.test.cjs # 纯 helpers 单测(node 直接跑)
|
|
129
|
-
│ └── browser/ # fixture.js(宿主桩)/ probe
|
|
129
|
+
│ └── browser/ # fixture.js(宿主桩)/ probe*.js 共 4 段 + probe-en.js(英文界面)
|
|
130
130
|
│ # probe-en.js(英文界面)
|
|
131
131
|
│ # harness.html 由 browser-harness.mjs 生成,不入库
|
|
132
132
|
└── lib/
|
|
@@ -139,7 +139,7 @@ dsh-trajectory-traceview-plus/ # 仓库根(目录名 = npm 包名)
|
|
|
139
139
|
从 npm 安装(推荐,**写死版本号**):
|
|
140
140
|
|
|
141
141
|
```powershell
|
|
142
|
-
dsh plugin --profile web add dsh-trajectory-traceview-plus@0.11.
|
|
142
|
+
dsh plugin --profile web add dsh-trajectory-traceview-plus@0.11.7
|
|
143
143
|
```
|
|
144
144
|
|
|
145
145
|
> **为什么不用 `@latest`**:`dsh plugin` 底层是 pnpm,而 **pnpm 12 有供应链延迟保护**
|
|
@@ -160,10 +160,10 @@ dsh plugin --profile web add dsh-trajectory-traceview-plus@0.11.6
|
|
|
160
160
|
从 GitHub 安装(**必须带 tag**):
|
|
161
161
|
|
|
162
162
|
```powershell
|
|
163
|
-
dsh plugin --profile web add "github:MisonL/dsh-trajectory-traceview-plus#v0.11.
|
|
163
|
+
dsh plugin --profile web add "github:MisonL/dsh-trajectory-traceview-plus#v0.11.7"
|
|
164
164
|
```
|
|
165
165
|
|
|
166
|
-
> **为什么必须带 `#v0.11.
|
|
166
|
+
> **为什么必须带 `#v0.11.7`**:`github:` 规格不带 ref 时装的是**默认分支的 HEAD**,
|
|
167
167
|
> 不是任何发布版本。而这个仓库在发版后还会继续提交(本轮 v0.11.0 之后就有 5 个
|
|
168
168
|
> 文档/脚本提交),所以"不带 ref"装到的东西**明天可能是另一个样子**,而版本号
|
|
169
169
|
> 仍写着 0.11.0。带 tag 才能让"装到的"和"发布过的"是同一份代码。
|
|
@@ -286,8 +286,8 @@ npm test # 只跑 smoke
|
|
|
286
286
|
**需要真实浏览器的部分**(`react-dom/server` 测不到滚动、焦点、剪贴板、定时器、响应式):
|
|
287
287
|
|
|
288
288
|
```powershell
|
|
289
|
-
node scripts/browser-check.mjs # 起 harness,跑
|
|
290
|
-
node scripts/browser-check.mjs --shots # 另存截图,并另加 1 组 / 3 条断言(375px 溢出,共
|
|
289
|
+
node scripts/browser-check.mjs # 起 harness,跑 314 条断言 / 记录 48 组观测
|
|
290
|
+
node scripts/browser-check.mjs --shots # 另存截图,并另加 1 组 / 3 条断言(375px 溢出,共 49 组)
|
|
291
291
|
```
|
|
292
292
|
|
|
293
293
|
它需要 `agent-browser`(Chrome via CDP)。**故意不进 CI**:把浏览器塞进 runner 的
|
|
@@ -356,10 +356,10 @@ node scripts/provenance.mjs # 4. 刷新来源清单(新增/改名
|
|
|
356
356
|
npm run check # 5. 10 步门禁,全绿再往下
|
|
357
357
|
git add -A; git commit -m "..." # 6.
|
|
358
358
|
git push origin main # 7.
|
|
359
|
-
git tag -a v0.11.
|
|
360
|
-
git push origin v0.11.
|
|
359
|
+
git tag -a v0.11.7 -m "..." # 8.
|
|
360
|
+
git push origin v0.11.7 # 9.
|
|
361
361
|
npm publish # 10. 触发 prepublishOnly → 再跑一遍 check
|
|
362
|
-
gh release create v0.11.
|
|
362
|
+
gh release create v0.11.7 --notes-file … # 11. 徽章读的是 Release,不是 tag
|
|
363
363
|
|
|
364
364
|
node scripts/release-status.mjs # 12. 四处对齐了吗?(tag / Release / npm 元数据 / tarball)
|
|
365
365
|
```
|
package/docs/DESIGN.md
CHANGED
|
@@ -10718,6 +10718,9 @@ boundary: false ← 没有渲染失败卡
|
|
|
10718
10718
|
| 24 | 锚点“向前翻页直到命中”无端到端覆盖 | 夹具 `loadOlder` 秒回且不加载,只能测两端点 | 探针 23k(变异 → 红) |
|
|
10719
10719
|
| 25 | 压缩重放被标成“调用不在窗口内” | 真实会话 13 组重复 result,全部误标 | `REPLAY1` + 探针 23l(变异 → 红) |
|
|
10720
10720
|
| 26 | 窗口外系统提示显示成“0 字” | 契约说该场景 `prompt.system` 为空,真文本在 `systemPrompts` | `SYSOUT1` + 探针 23m(变异 → 红) |
|
|
10721
|
+
| 27 | 生成中的步骤排到本轮第一步之前 | partial 时间戳用轮次最早 seq + 0.5 | `PARTIALORDER1`(变异 → 红) |
|
|
10722
|
+
| 28 | 导出表头少了「工具总耗时」 | 屏幕五项、导出四项 | `EXPORTKPI1` + 探针 23n(变异 → 红) |
|
|
10723
|
+
| 29 | 探针涨到 37 秒,变异验证变成「无法解析」 | `eval` 30 秒上限,超时不是失败 | 拆出 `probe-detail3.js`;`healthySnap` 移进 IIFE |
|
|
10721
10724
|
|
|
10722
10725
|
### 13.82.9 夹具与官方契约的一处偏差:`callSchemas` 是 Map,不是对象
|
|
10723
10726
|
|
package/docs/PROVENANCE.md
CHANGED
package/lib/client.js
CHANGED
|
@@ -2259,7 +2259,22 @@ window.__ModuleLoader__.load({
|
|
|
2259
2259
|
const p = snap?.partial;
|
|
2260
2260
|
if (p != null && Array.isArray(p.blocks) && p.blocks.length > 0) {
|
|
2261
2261
|
const turn = typeof p.turn === "number" ? p.turn : 0;
|
|
2262
|
-
|
|
2262
|
+
// The in-flight step belongs at the END of its turn, not just after the turn's
|
|
2263
|
+
// first event. `+0.5` was added to the turn's EARLIEST seq, so a partial that
|
|
2264
|
+
// arrived while steps 1 and 2 already existed sorted BEFORE step 1: the
|
|
2265
|
+
// "running" card appeared to the left of finished work (measured order
|
|
2266
|
+
// user → step3(live) → step1 → step2). Take the turn's largest known seq.
|
|
2267
|
+
const seq = (() => {
|
|
2268
|
+
if (lastTurnEntry == null) return 0.5;
|
|
2269
|
+
let maxSeq = lastTurnEntry.seq;
|
|
2270
|
+
for (const st0 of lastTurnEntry.steps?.values() ?? []) {
|
|
2271
|
+
if (Number.isFinite(st0.seq) && st0.seq > maxSeq) maxSeq = st0.seq;
|
|
2272
|
+
}
|
|
2273
|
+
for (const s0 of lastTurnEntry.stations) {
|
|
2274
|
+
if (Number.isFinite(s0.seq) && s0.seq > maxSeq) maxSeq = s0.seq;
|
|
2275
|
+
}
|
|
2276
|
+
return maxSeq + 0.5;
|
|
2277
|
+
})();
|
|
2263
2278
|
flushUser(turn, seq);
|
|
2264
2279
|
const e = ensureTurn(turn, seq);
|
|
2265
2280
|
const step = stepOf(p.step);
|
|
@@ -3503,7 +3518,11 @@ window.__ModuleLoader__.load({
|
|
|
3503
3518
|
L.push(`# ${t("export.title")}`);
|
|
3504
3519
|
L.push("");
|
|
3505
3520
|
const s = tree.stats;
|
|
3506
|
-
|
|
3521
|
+
// The header KPI strip carries FIVE numbers, and the export carried four: a
|
|
3522
|
+
// reader who saw "900 ms 工具总耗时" on screen and pasted the export into a bug
|
|
3523
|
+
// report lost exactly that number. Same rule as the warning lines below — the
|
|
3524
|
+
// file states what the screen states.
|
|
3525
|
+
L.push(`> ${t("node.turn")} ${s.turns} · ${t("node.step")} ${s.steps} · ${t("node.tool")} ${s.tools} · ${t("kpi.errors")} ${s.errors} · ${t("kpi.toolTime")} ${fmtDur(s.toolMs)} · ${t("kpi.tokensIn")} ${fmtTokens(s.tokensIn)} · ${t("kpi.tokensOut")} ${fmtTokens(s.tokensOut)}${s.lastModel ? ` · ${s.lastModel}` : ""}`);
|
|
3507
3526
|
// The panel warns about a damaged or drifting log in its header; the export used
|
|
3508
3527
|
// to state only the totals, so a saved "study notes" file silently claimed a
|
|
3509
3528
|
// clean read of a log the screen was actively flagging. Same rule as the error
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-trajectory-traceview-plus",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.7",
|
|
4
4
|
"description": "轨迹视图增强版(Plus):在「轨迹」标签旁新增可回放的横向时间轴——minimap、窗口内检索(显式标注覆盖边界)、回放、轮次跳转、跟随模式、历史分页、步骤/子调用耗时与吞吐、时钟轴切换、稳定锚点复制与深链、孤立工具结果站点、提示词变更对比、原始请求分析与 Markdown 导出。基于 AFAP/dsh-trajectory-traceview (MIT) 改造。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -29,7 +29,7 @@ run("agent-browser", ["wait", "1200"]);
|
|
|
29
29
|
// BOTH halves share one page: the browser is opened once and the evals run in order, so
|
|
30
30
|
// `probe-detail.js` continues from the state `probe.js` leaves. Split because
|
|
31
31
|
// `agent-browser eval` aborts at 30 s and the single file had reached 27.4 s (§13.70).
|
|
32
|
-
const probeFiles = ["test/browser/probe.js", "test/browser/probe-detail.js", "test/browser/probe-detail2.js"];
|
|
32
|
+
const probeFiles = ["test/browser/probe.js", "test/browser/probe-detail.js", "test/browser/probe-detail2.js", "test/browser/probe-detail3.js"];
|
|
33
33
|
const probe = fs.readFileSync(path.join(root, probeFiles[0]), "utf8");
|
|
34
34
|
const out = run("agent-browser", ["eval", "--stdin"], probe);
|
|
35
35
|
const raw = (out.stdout || "").trim();
|
|
@@ -39,7 +39,7 @@ const localSteps = pkg.scripts.check.split('&&').map((s) => s.trim()).filter(Boo
|
|
|
39
39
|
// aborts at 30 s and the language switch pushed the single file over it (§13.69) — and
|
|
40
40
|
// leaving it out of this count is exactly the one-source-vs-two-sources blindness this
|
|
41
41
|
// very block has already been fixed for once (§13.44).
|
|
42
|
-
const PROBE_FILES = ['test/browser/probe.js', 'test/browser/probe-detail.js', 'test/browser/probe-detail2.js', 'test/browser/probe-en.js'];
|
|
42
|
+
const PROBE_FILES = ['test/browser/probe.js', 'test/browser/probe-detail.js', 'test/browser/probe-detail2.js', 'test/browser/probe-detail3.js', 'test/browser/probe-en.js'];
|
|
43
43
|
const probes = PROBE_FILES.map((f) => read(f));
|
|
44
44
|
const observedGroups = new Set();
|
|
45
45
|
let assertions = 0;
|
package/src/30-helpers.js
CHANGED
|
@@ -1498,7 +1498,22 @@
|
|
|
1498
1498
|
const p = snap?.partial;
|
|
1499
1499
|
if (p != null && Array.isArray(p.blocks) && p.blocks.length > 0) {
|
|
1500
1500
|
const turn = typeof p.turn === "number" ? p.turn : 0;
|
|
1501
|
-
|
|
1501
|
+
// The in-flight step belongs at the END of its turn, not just after the turn's
|
|
1502
|
+
// first event. `+0.5` was added to the turn's EARLIEST seq, so a partial that
|
|
1503
|
+
// arrived while steps 1 and 2 already existed sorted BEFORE step 1: the
|
|
1504
|
+
// "running" card appeared to the left of finished work (measured order
|
|
1505
|
+
// user → step3(live) → step1 → step2). Take the turn's largest known seq.
|
|
1506
|
+
const seq = (() => {
|
|
1507
|
+
if (lastTurnEntry == null) return 0.5;
|
|
1508
|
+
let maxSeq = lastTurnEntry.seq;
|
|
1509
|
+
for (const st0 of lastTurnEntry.steps?.values() ?? []) {
|
|
1510
|
+
if (Number.isFinite(st0.seq) && st0.seq > maxSeq) maxSeq = st0.seq;
|
|
1511
|
+
}
|
|
1512
|
+
for (const s0 of lastTurnEntry.stations) {
|
|
1513
|
+
if (Number.isFinite(s0.seq) && s0.seq > maxSeq) maxSeq = s0.seq;
|
|
1514
|
+
}
|
|
1515
|
+
return maxSeq + 0.5;
|
|
1516
|
+
})();
|
|
1502
1517
|
flushUser(turn, seq);
|
|
1503
1518
|
const e = ensureTurn(turn, seq);
|
|
1504
1519
|
const step = stepOf(p.step);
|
|
@@ -2742,7 +2757,11 @@
|
|
|
2742
2757
|
L.push(`# ${t("export.title")}`);
|
|
2743
2758
|
L.push("");
|
|
2744
2759
|
const s = tree.stats;
|
|
2745
|
-
|
|
2760
|
+
// The header KPI strip carries FIVE numbers, and the export carried four: a
|
|
2761
|
+
// reader who saw "900 ms 工具总耗时" on screen and pasted the export into a bug
|
|
2762
|
+
// report lost exactly that number. Same rule as the warning lines below — the
|
|
2763
|
+
// file states what the screen states.
|
|
2764
|
+
L.push(`> ${t("node.turn")} ${s.turns} · ${t("node.step")} ${s.steps} · ${t("node.tool")} ${s.tools} · ${t("kpi.errors")} ${s.errors} · ${t("kpi.toolTime")} ${fmtDur(s.toolMs)} · ${t("kpi.tokensIn")} ${fmtTokens(s.tokensIn)} · ${t("kpi.tokensOut")} ${fmtTokens(s.tokensOut)}${s.lastModel ? ` · ${s.lastModel}` : ""}`);
|
|
2746
2765
|
// The panel warns about a damaged or drifting log in its header; the export used
|
|
2747
2766
|
// to state only the totals, so a saved "study notes" file silently claimed a
|
|
2748
2767
|
// clean read of a log the screen was actively flagging. Same rule as the error
|