dsh-plugin-bridge 0.2.10
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/LICENSE +21 -0
- package/README.md +146 -0
- package/README.zh.md +146 -0
- package/cordis.patch.yml +18 -0
- package/docs/articles/agent-session-handoff.md +162 -0
- package/docs/benchmark.md +165 -0
- package/docs/design.md +82 -0
- package/docs/guide.zh.md +152 -0
- package/docs/native-webui-feasibility.md +44 -0
- package/docs/plan.md +65 -0
- package/lib/api-rpc.d.ts +64 -0
- package/lib/api-rpc.js +76 -0
- package/lib/cli.d.ts +2 -0
- package/lib/cli.js +368 -0
- package/lib/command.d.ts +92 -0
- package/lib/command.js +377 -0
- package/lib/compression.d.ts +90 -0
- package/lib/compression.js +369 -0
- package/lib/fold.d.ts +39 -0
- package/lib/fold.js +406 -0
- package/lib/index.d.ts +55 -0
- package/lib/index.js +76 -0
- package/lib/migrate.d.ts +176 -0
- package/lib/migrate.js +449 -0
- package/lib/rpc.d.ts +34 -0
- package/lib/rpc.js +76 -0
- package/lib/types.d.ts +64 -0
- package/lib/types.js +9 -0
- package/package.json +106 -0
- package/reports/v0.2.3-e2e-2026-08-20T13-19-13-924Z.raw.json +2727 -0
- package/reports/v0.2.3-e2e-report.md +116 -0
- package/reports/v0.2.6-rc11-vision-report.md +65 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Bridge v0.2.3 端到端迁移验收报告
|
|
2
|
+
|
|
3
|
+
日期:2026-08-20
|
|
4
|
+
|
|
5
|
+
环境:macOS,本机隔离 `DSH_HOME`,DeepSeek Harness `0.1.0-rc.8`,DeepSeek v4-pro/high
|
|
6
|
+
|
|
7
|
+
对象:`dsh-plugin-bridge` v0.2.3 基线 + 本报告记录的 obsolete-value 修复
|
|
8
|
+
|
|
9
|
+
## 结论
|
|
10
|
+
|
|
11
|
+
**修复后的 release candidate 通过。** 12 个迁移单元覆盖短会话/真实 compaction、minimal/standard/code 三种目标 preset,以及默认确认/同轮继续两种模式;摘要、迁移复述和首次有效工作均为 100% 事实命中,关键事实 100%,旧值复活为 0。
|
|
12
|
+
|
|
13
|
+
这个结论不能倒推为“远端 v0.2.3 发布物已经通过”:最终矩阵使用了当前工作树中的提示词修复。远端目前也没有可解析的 `v0.2.3` Git tag;在新版本合并并创建真实 tag 之前,README 中 pin tag 的一键安装命令不具备可复现性。
|
|
14
|
+
|
|
15
|
+
## 验收矩阵
|
|
16
|
+
|
|
17
|
+
每个 fixture 冻结 5 个低碰撞事实,其中端口、禁用项、路径为关键事实。confirm 与 continue 共用同一份摘要,因此共有 6 份独立摘要、12 个目标会话。
|
|
18
|
+
|
|
19
|
+
| 会话 | 目标 | 模式 | 摘要 | 复述 | 首次工作 | 旧值复活 | 目标请求 | Target nominal / processed |
|
|
20
|
+
|---|---|---|---:|---:|---:|---:|---:|---:|
|
|
21
|
+
| short | minimal | confirm | 5/5 | 5/5 | 5/5 | 0 | 2 | 1,360 / 4,048 |
|
|
22
|
+
| short | minimal | continue | 5/5 | 5/5 | 5/5 | 0 | 1 | 5,368 / 6,392 |
|
|
23
|
+
| short | standard | confirm | 5/5 | 5/5 | 5/5 | 0 | 2 | 8,821 / 17,397 |
|
|
24
|
+
| short | standard | continue | 5/5 | 5/5 | 5/5 | 0 | 1 | 761 / 8,953 |
|
|
25
|
+
| short | code | confirm | 5/5 | 5/5 | 5/5 | 0 | 2 | 10,112 / 19,840 |
|
|
26
|
+
| short | code | continue | 5/5 | 5/5 | 5/5 | 0 | 1 | 9,176 / 10,200 |
|
|
27
|
+
| compacted | minimal | confirm | 5/5 | 5/5 | 5/5 | 0 | 2 | 2,002 / 5,970 |
|
|
28
|
+
| compacted | minimal | continue | 5/5 | 5/5 | 5/5 | 0 | 1 | 1,269 / 2,421 |
|
|
29
|
+
| compacted | standard | confirm | 5/5 | 5/5 | 5/5 | 0 | 2 | 8,396 / 17,356 |
|
|
30
|
+
| compacted | standard | continue | 5/5 | 5/5 | 5/5 | 0 | 1 | 8,330 / 8,714 |
|
|
31
|
+
| compacted | code | confirm | 5/5 | 5/5 | 5/5 | 0 | 2 | 10,095 / 20,591 |
|
|
32
|
+
| compacted | code | continue | 5/5 | 5/5 | 5/5 | 0 | 1 | 9,026 / 10,050 |
|
|
33
|
+
|
|
34
|
+
汇总 gate:
|
|
35
|
+
|
|
36
|
+
- 摘要事实 30/30,关键事实 18/18;摘要按 6 份独立样本计,不重复计算 confirm/continue。
|
|
37
|
+
- 迁移复述 60/60,关键事实 36/36。
|
|
38
|
+
- 首次有效工作 60/60,关键事实 36/36;12/12 均精确输出五行执行契约。
|
|
39
|
+
- 3 个 long fixture 均包含 21 条用户消息、一次真实 compaction,且 `reusedCompaction=true`。
|
|
40
|
+
- 预定义旧值复活 0;timeout/cap 0;整组失忆 0。
|
|
41
|
+
|
|
42
|
+
## 本轮发现并修复的问题
|
|
43
|
+
|
|
44
|
+
原提示要求模型保留“旧值已作废”的决策理由,导致摘要仍会写出旧端口、旧路径等具体字符串。模型虽然能正确说明它们已经作废,但迁移复述仍把不应传播的旧事实带到了新会话,既增加 token,也增加未来误用风险。
|
|
45
|
+
|
|
46
|
+
修复包含两道防线:
|
|
47
|
+
|
|
48
|
+
1. 摘要生成指令要求完全省略已作废、撤销或被覆盖的具体旧值,只保留当前生效替代值。
|
|
49
|
+
2. kickoff 明确只把当前生效值视为可执行事实,不引用或复述旧具体值。
|
|
50
|
+
|
|
51
|
+
修复后重新生成 3 份 long 摘要,再完成 6 个 long 目标单元,旧值命中从非零降为 0;新增回归测试覆盖中英文摘要指令与 kickoff。
|
|
52
|
+
|
|
53
|
+
## Token 成本
|
|
54
|
+
|
|
55
|
+
定义:
|
|
56
|
+
|
|
57
|
+
- `nominal = uncached input + output`,用于本报告主比较。
|
|
58
|
+
- `processed = uncached input + cache read + cache write + output`,作为敏感性口径;它不是金额。
|
|
59
|
+
- “含 worker”只包含一次 Bridge 摘要 worker 与目标会话截至首次有效工作的请求,不包含用户原会话的既有成本和官方 compaction 成本。
|
|
60
|
+
|
|
61
|
+
### Confirm 相对 Continue
|
|
62
|
+
|
|
63
|
+
| 口径 | 配对中位数 | 范围 | P90 | 六对合并总量 |
|
|
64
|
+
|---|---:|---:|---:|---:|
|
|
65
|
+
| Target nominal extra | +11.0% | -74.7% ~ +1059.1% | +558.4% | +20.21% |
|
|
66
|
+
| Target processed extra | +96.8% | -36.7% ~ +146.6% | +125.7% | +82.33% |
|
|
67
|
+
| 含 fixed worker nominal extra | +8.1% | -47.9% ~ +206.7% | +110.4% | +12.82% |
|
|
68
|
+
| 含 fixed worker processed extra | +65.6% | -22.5% ~ +69.7% | +69.3% | +52.56% |
|
|
69
|
+
|
|
70
|
+
continue 在所有单元都把“复述 + 首次工作”合并为 1 次目标请求;confirm 固定为 2 次。模型输出长度和缓存命中导致单次 token 离散度很大,甚至出现 confirm 比 continue 更少的单元,因此不能从 n=1/cell 推导一个通用“节省 X%”。对产品可以稳定承诺的是少一次目标模型请求,而不是固定 token 百分比。
|
|
71
|
+
|
|
72
|
+
修复后 6 份摘要 worker 合计为 19,551 nominal / 26,463 processed;12 个目标会话合计为 74,716 / 131,932。按每对共享一次摘要计算,干净验收组件合计为 **94,267 nominal / 158,395 processed**。worker 在其中占 20.74% nominal / 16.71% processed;这是构成占比,不是相对“无 Bridge”的因果增量。
|
|
73
|
+
|
|
74
|
+
### 本任务实际消耗
|
|
75
|
+
|
|
76
|
+
从隔离环境建立到最终报告,累计测得:
|
|
77
|
+
|
|
78
|
+
- uncached input:200,145
|
|
79
|
+
- cache read:198,144
|
|
80
|
+
- cache write:0
|
|
81
|
+
- output:37,543
|
|
82
|
+
- nominal:**237,688**
|
|
83
|
+
- processed:**435,832**
|
|
84
|
+
|
|
85
|
+
该累计值包含前置探路、fixture 建立、真实 compaction、发现旧值问题后的修复重跑,以及一次误把 `/bridge --doctor` 作为普通 prompt 发送的设置错误。该错误会话已取消并归档,单独消耗 20,450 nominal / 53,730 processed。累计值不能当作普通用户完成一次迁移的成本。
|
|
86
|
+
|
|
87
|
+
## WebUI、稳定性与归档
|
|
88
|
+
|
|
89
|
+
- 使用独立 `DSH_HOME` 和 3180 端口安装并加载官方 rc.8 WebUI;用户原有 3080/rc.6 服务全程保持在线且未修改。
|
|
90
|
+
- WebUI 能打开,Bridge 命令能注册和执行;真实 `/compact` 经 WebUI command endpoint 成功生成一次 compaction。rc.8 的 minimal preset 本身不提供 `/compact`,因此 long source 使用 standard,目标仍覆盖三种 preset。
|
|
91
|
+
- 12/12 创建 goal、pause goal、发送 kickoff。confirm 为 2 个目标请求,continue 为 1 个目标请求。
|
|
92
|
+
- 每个目标做两次 idle soak,共 24 次;新增 turn 和 token 均为 0。
|
|
93
|
+
- host 完成一次 down/up 重启。6 个仍处于 paused 状态的 compacted target 在重启后没有自动续跑;6 个 short target 当时已归档,只能证明归档会话未变化。
|
|
94
|
+
- 最终阶段 raw ledger 的 9/9 tracked sessions 已归档;扩大核验后,本次隔离环境创建的 63/63 sessions 均已归档、运行中为 0、workspace 为 0。
|
|
95
|
+
|
|
96
|
+
## 局限
|
|
97
|
+
|
|
98
|
+
- 这是修复驱动的多阶段 release acceptance,不是一次未经调整的盲测;short 单元继承自前序阶段,long 单元使用修复后冻结摘要。
|
|
99
|
+
- 独立摘要只有 6 份,每个 cell 只跑 1 次,不支持置信区间或显著性结论。若要对外发布稳定 token 百分比,应至少每 cell 运行 5 个随机种子。
|
|
100
|
+
- fact grader 使用严格字符串命中并配合旧值检查、五行契约检查;仍可能漏掉未预定义的额外幻觉。
|
|
101
|
+
- 只覆盖中文提示、DeepSeek v4-pro/high、官方 rc.8 与本机环境。
|
|
102
|
+
- processed 把缓存与非缓存 token 等权相加;两种 token 口径都不是实际账单金额。
|
|
103
|
+
|
|
104
|
+
## 发布建议
|
|
105
|
+
|
|
106
|
+
1. 合并 obsolete-value 修复与回归测试。
|
|
107
|
+
2. 升版并创建真实 Git tag;README 的一键安装命令只引用确实存在的 tag。
|
|
108
|
+
3. README 可以写“12/12 release acceptance、三层事实 100%、旧值复活 0、confirm=2 requests、continue=1 request”,但不要写固定 token 节省百分比。
|
|
109
|
+
4. 当前验收已足够作为发布 gate;用户不需要再自行花 token 补测。只有要把 token 百分比当成公开 benchmark 时,才需要多 seed 扩跑。
|
|
110
|
+
|
|
111
|
+
## 证据
|
|
112
|
+
|
|
113
|
+
- 最终 raw:[`v0.2.3-e2e-2026-08-20T13-19-13-924Z.raw.json`](./v0.2.3-e2e-2026-08-20T13-19-13-924Z.raw.json)
|
|
114
|
+
- 最终 manifest:[`v0.2.3-e2e-2026-08-20T13-19-13-924Z.manifest.json`](./v0.2.3-e2e-2026-08-20T13-19-13-924Z.manifest.json)
|
|
115
|
+
- 修复后 long summaries:[`minimal`](./v0.2.3-minimal-summary-fixed.json) · [`standard`](./v0.2.3-standard-summary-fixed.json) · [`code`](./v0.2.3-code-summary-fixed.json)
|
|
116
|
+
- 可复现实验入口:[`../eval/v023.mjs`](../eval/v023.mjs)
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Bridge 0.2.6 · DSH 0.1.1-rc.2 vision migration acceptance
|
|
2
|
+
|
|
3
|
+
Date: 2026-08-21
|
|
4
|
+
|
|
5
|
+
Host: isolated official `@deepseek-ai/dsh@0.1.1-rc.2` Web profile
|
|
6
|
+
|
|
7
|
+
Model: `deepseek-official/deepseek-v4-flash-vision-exp` (`high`)
|
|
8
|
+
|
|
9
|
+
Fixture: `eval/fixtures/rc11-vision.png` (`fcde25225381226631b56f693eeb9845133812e488208824db8d4f9cdb15d0e0`)
|
|
10
|
+
|
|
11
|
+
## Verdict
|
|
12
|
+
|
|
13
|
+
**Pass.** The installed `/bridge` command preserved the source VLM selection, moved one unresolved durable image into the target kickoff, and the target extracted all five non-guessable visual facts correctly in its first response.
|
|
14
|
+
|
|
15
|
+
| Gate | Result |
|
|
16
|
+
|---|---:|
|
|
17
|
+
| rc.2 clean isolated install and plugin registration | Pass |
|
|
18
|
+
| `/bridge --doctor` gateway contract | **13/13** |
|
|
19
|
+
| Resolved visual evidence: source → target facts | **5/5 → 5/5** |
|
|
20
|
+
| Resolved path raw images resent | **0** |
|
|
21
|
+
| Unresolved raw-image core path: target facts | **5/5** |
|
|
22
|
+
| Installed `/bridge minimal` → `--go --continue`: target facts | **5/5** |
|
|
23
|
+
| Installed command raw images sent | **1** |
|
|
24
|
+
| Source → target model selection | vision-exp → vision-exp |
|
|
25
|
+
| Goal created / paused / kickoff sent | Pass |
|
|
26
|
+
| Tracked worker/target sessions archived | Pass |
|
|
27
|
+
|
|
28
|
+
The five exact facts were `VIS-RC11-8472`, `CYAN TRIANGLE`, `57431`, `vision/rc11/evidence.png`, and `MAGENTA CIRCLE`. They were visible only in the PNG; the target text prompt did not contain their values.
|
|
29
|
+
|
|
30
|
+
## Bug found and fixed
|
|
31
|
+
|
|
32
|
+
The first installed-command run exposed an rc.2 interaction that unit-only testing had missed. The preview worker selects `deepseek-v4-pro`; rc.2 persists `session.selectModel` as the host default. A target created after preview therefore inherited `v4-pro` instead of the source session's vision model.
|
|
33
|
+
|
|
34
|
+
Bridge 0.2.6 now reads the source session's provider, model, and reasoning effort, then explicitly selects the same route on the blank target before goal creation or kickoff. Failure is visible as a warning rather than a silent model change. A regression test locks this order and the full suite passes 121/121.
|
|
35
|
+
|
|
36
|
+
## Token ledger
|
|
37
|
+
|
|
38
|
+
`Nominal = uncached input + output`. `Processed` also includes cache-read/cache-write tokens and is a sensitivity measure, not a provider bill.
|
|
39
|
+
|
|
40
|
+
Final installed-command path:
|
|
41
|
+
|
|
42
|
+
| Session | Uncached input | Cache read | Output | Nominal | Processed |
|
|
43
|
+
|---|---:|---:|---:|---:|---:|
|
|
44
|
+
| Preview worker (`deepseek-v4-pro`) | 77 | 1,408 | 807 | 884 | 2,292 |
|
|
45
|
+
| Minimal target (`deepseek-v4-flash-vision-exp`) | 398 | 1,536 | 488 | 886 | 2,422 |
|
|
46
|
+
| **Migration total** | **475** | **2,944** | **1,295** | **1,770** | **4,714** |
|
|
47
|
+
|
|
48
|
+
The unresolved source was cancelled immediately after its image-bearing user message became durable, so it consumed 0 model tokens. These are absolute measurements for one controlled fixture, not a percentage overhead versus a no-Bridge counterfactual. Preset system prompts and cache state make the numbers unsuitable for a universal cost claim.
|
|
49
|
+
|
|
50
|
+
## Method
|
|
51
|
+
|
|
52
|
+
1. Render a 1280×800 PNG containing five low-collision facts.
|
|
53
|
+
2. Verify the VLM can inspect it and produce the five exact facts.
|
|
54
|
+
3. Resolved path: preserve the associated assistant response verbatim outside the bounded summary; migrate without resending the PNG.
|
|
55
|
+
4. Unresolved path: persist the image-bearing user message, cancel before assistant analysis, migrate the durable attachment, and require the target VLM to inspect it.
|
|
56
|
+
5. Installed-plugin path: execute `/bridge minimal`, then `/bridge minimal --go --continue` through rc.2's command registry; verify the first target response, exact model route, image count, paused goal, and archive state.
|
|
57
|
+
|
|
58
|
+
The core-path raw data is in [v0.2.5-rc11-vision-2026-08-21T14-36-56-330Z.raw.json](v0.2.5-rc11-vision-2026-08-21T14-36-56-330Z.raw.json). The installed-command result is in [v0.2.5-rc11-command-2026-08-21T14-37-24-022Z.raw.json](v0.2.5-rc11-command-2026-08-21T14-37-24-022Z.raw.json). The filenames retain the package version present when the sessions ran; the model-preservation fix is the 0.2.6 change documented here.
|
|
59
|
+
|
|
60
|
+
## Limits
|
|
61
|
+
|
|
62
|
+
- One resolved fixture and one unresolved fixture; this is a release gate, not a population accuracy estimate.
|
|
63
|
+
- The resolved core result reuses a previously archived passing source/target pair to avoid spending the same vision tokens again.
|
|
64
|
+
- The installed-command target used `minimal`; token totals should not be compared directly with `code` or `standard` targets.
|
|
65
|
+
- This validates PNG attachment recovery and the selected experimental VLM, not every image format or provider.
|