dsh-charter 0.3.1 → 0.3.3
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 +45 -0
- package/CHANGELOG.zh.md +40 -0
- package/README.md +55 -23
- package/README.zh.md +45 -19
- package/docs/README.md +4 -2
- package/docs/README.zh.md +5 -3
- package/docs/assets/charter-graph-0.3.3.png +0 -0
- package/docs/assets/charter-graph-0.3.3.zh.png +0 -0
- package/docs/assets/charter-graph-root-text-200-0.3.2.png +0 -0
- package/docs/assets/charter-pane-0.3.3.png +0 -0
- package/docs/assets/charter-pane-0.3.3.zh.png +0 -0
- package/docs/assets/charter-state-applied-0.3.2.png +0 -0
- package/docs/assets/charter-state-conflict-0.3.2.png +0 -0
- package/docs/assets/charter-state-empty-0.3.2.png +0 -0
- package/docs/assets/charter-state-forced-colors-0.3.2.png +0 -0
- package/docs/assets/charter-state-reduced-motion-0.3.2.png +0 -0
- package/docs/assets/charter-state-staged-0.3.2.png +0 -0
- package/docs/design/charter-dependency-graph-v1.zh.md +5 -4
- package/docs/design/charter-draft-calibration-v1.zh.md +617 -0
- package/docs/design/charter-draft-extraction-v1.zh.md +346 -0
- package/docs/design/charter-gui-v1.zh.md +31 -18
- package/docs/design/compatibility.md +11 -5
- package/docs/design/compatibility.zh.md +10 -5
- package/docs/design/version-roadmap.md +12 -15
- package/docs/design/version-roadmap.zh.md +14 -11
- package/docs/release-notes/0.3.1.md +7 -4
- package/docs/release-notes/0.3.2.md +35 -0
- package/docs/release-notes/0.3.3.md +32 -0
- package/docs/release-notes/README.md +1 -1
- package/docs/releasing.md +6 -4
- package/docs/releasing.zh.md +6 -4
- package/docs/user-guide.md +16 -2
- package/docs/user-guide.zh.md +15 -2
- package/docs/verification.md +73 -48
- package/docs/verification.zh.md +69 -44
- package/lib/client/DependencyGraph.d.ts +2 -0
- package/lib/client/bootstrap-plan.d.ts +9 -1
- package/lib/client/draft-store.d.ts +12 -1
- package/lib/client/locales.d.ts +12 -0
- package/lib/client/pane-scope.d.ts +2 -0
- package/lib/client/store.d.ts +12 -1
- package/lib/client.js +567 -240
- package/lib/core/bootstrap.d.ts +14 -0
- package/lib/core/schemas.d.ts +3 -0
- package/lib/core/structured-bootstrap.d.ts +49 -0
- package/lib/core.js +2 -2
- package/lib/{fork-KSL6sovw.js → fork-h8Gx4AJd.js} +178 -166
- package/lib/host/draft-translation.d.ts +47 -0
- package/lib/host/service.d.ts +19 -1
- package/lib/host/types.d.ts +43 -0
- package/lib/index.js +3 -3
- package/lib/remote/service.d.ts +6 -1
- package/lib/remote/wire.d.ts +91 -2
- package/lib/remote.js +116 -4
- package/lib/{service-BSrE7Kbu.js → service-CPha5Ipx.js} +734 -42
- package/lib/version.d.ts +1 -1
- package/package.json +19 -18
package/docs/verification.zh.md
CHANGED
|
@@ -3,51 +3,44 @@
|
|
|
3
3
|
[English](verification.md) | 中文
|
|
4
4
|
|
|
5
5
|
> **状态:** Active — 当前操作记录。
|
|
6
|
-
> **版本范围:** `0.
|
|
7
|
-
> **基准:** 2026-11-
|
|
6
|
+
> **版本范围:** `0.3.3` 结构化草案/语言跟随版本(2026-11-24 发布);上一个已发布 `0.3.2`。
|
|
7
|
+
> **基准:** 2026-11-23
|
|
8
8
|
|
|
9
|
-
验证日期:2026-11-
|
|
9
|
+
验证日期:2026-11-24。当前源码版本:`0.3.3`;最新已发布版本为 `0.3.3`(上一个 `0.3.2`)。本文件是当前证据记录;历史逐提交的叙事保留在 Git 历史和 Changelog。临时目录、profile、
|
|
10
10
|
tarball 和抓取内容位于 `.tmp/`,不进入发布包。
|
|
11
11
|
|
|
12
|
-
环境:macOS,Node `v22.23.1`,npm `12.0.2`,pnpm `12.3.4`。本地 DSH 开发基线:`0.2.2-rc.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
- `0.
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
| 本地 Web + Desktop profile | 0.2.0 开发 artifact 已装入本地 web/desktop profile;Desktop app 为 `0.2.2-rc.1`,真实 Electron ABI/交互仍需人工门禁 |
|
|
45
|
-
| 真实浏览器恢复 | 受保护的人工 evidence gate;未自动化 |
|
|
46
|
-
| 真实模型 compaction | 2026-10-22 记录 PASS;仍是人工发布门禁 |
|
|
47
|
-
| 0.2.2 兼容矩阵 | 2026-11-11 PASS:源码 `f9d93c031eabfe5e44cf17e302729eb7093d7e94`,Node `v22.23.1` / pnpm `12.3.4`;九个声明 DSH 版本全部通过 typecheck、build 和 475/475 测试(`.tmp/0.2.2-final-matrix2.json`)。 |
|
|
48
|
-
| 0.2.2 全新 profile 安装 | 2026-11-11 PASS:隔离 `DSH_HOME=/tmp/dsh-charter-fresh-022-home` 初始化全新 Web profile,安装精确本地 `dsh-charter-0.2.2.tgz`;`dsh web` 提供 Pane 入口(HTTP 303 token redirect)。已验证 CLI/tarball 路径;Desktop、真实 Pane 交互和中英切换仍需人工。 |
|
|
49
|
-
| 0.2.2 依赖图源码 | 2026-11-11 PASS:`npm run check` 37 个文件 / 475 个测试;W0-0 原型 41/41(旧契约;无边孤立节点网格例外由 `tests/client/relation-graph.spec.ts` 的产品测试覆盖);Web Pane 在 3 条 active + 4 条 pending 交付物的 Session 上渲染图形、候选泳道、inspector 和常驻语义列表;浏览器 console 无错误。UI 自测(2026-11-11):三节点孤立图 + 空提示、紧凑列表、添加依赖/隐藏/显示、本地 key 前置摘要均正常,无 console 错误。W0-1/2/3 与真实 AT/人工门禁仍待完成。 |
|
|
50
|
-
| 0.2.2 依赖图 bundle | 2026-11-11 以 `d362d6f` 为基线,按统一预算方法 `gzip -9 -c lib/client.js | wc -c` 实测:113,990 → 130,474 B(+16,484 B),`<40 KB` gzip 预算通过。raw 仅作诊断:`lib/client.js` 591,936 → 670,173 字节(+78,237 B),CSS output 47,230 → 55,540 B(+8,310 B);raw 不作为预算口径。 |
|
|
12
|
+
环境:macOS,Node `v22.23.1`,npm `12.0.2`,pnpm `12.3.4`。本地 DSH 开发基线:`0.2.2-rc.5`(当前 npm `latest`/`next`)。
|
|
13
|
+
|
|
14
|
+
## 1. 当前状态(2026-11-23)
|
|
15
|
+
|
|
16
|
+
- 最新已发布版本:`0.3.3`(npm `latest`/`next`,GitHub Release `v0.3.3`;精确 artifact digest 记录在 C+1 checksum commit 与 release evidence 中)。
|
|
17
|
+
- 上一个已发布版本:`0.3.2`(SHA-256 `9dcb82ae34eaaeb6d266bb98f3e1f92f3a0798042ce3dc282abe9173ff79e056`)。
|
|
18
|
+
- 更早发布:`0.3.1`、`0.3.0`、`0.2.2`;已发布 tag 与字节不可变。
|
|
19
|
+
- 当前源码线:`0.3.3` 结构化草案/语言跟随候选,未发布。新增 additive draft Remote/objective ref 与自动语言跟随;record schema 仍为 2,prompt 投影未变。
|
|
20
|
+
- 当前源码门禁:`npm run check`(44 文件 / 524 测试)、token 覆盖 41 static + 1 dynamic、
|
|
21
|
+
13 个声明 DSH 版本,以及 `verify:ui-metrics --gate=final`。
|
|
22
|
+
- 兼容矩阵:13 个声明版本通过本地矩阵(`.tmp/compat-13-adaptive-final.json`);最新 DSH `0.2.2-rc.5` 为主基线。这是本地证据,不是 CI 结论。
|
|
23
|
+
- 发布后在隔离 `DSH_HOME` 做 exact CLI 安装,npm 解析到 `dsh-charter@0.3.2`,client `6ef68d25…` 与已发布
|
|
24
|
+
artifact 一致。
|
|
25
|
+
- 已发布 artifact:`dsh-charter-0.3.2.tgz` SHA-256
|
|
26
|
+
`9dcb82ae34eaaeb6d266bb98f3e1f92f3a0798042ce3dc282abe9173ff79e056`(client `6ef68d25…`);tag/GitHub
|
|
27
|
+
Release `v0.3.2` 已公开。根 `SHA256SUMS` 匹配,本地 profile 指向同一 artifact。exact-artifact package smoke
|
|
28
|
+
与 packed recovery smoke PASS。
|
|
29
|
+
- 0.3.2 根字号证据:根字号 16/24/32 px 时图形画布整体缩放 1/1.5/2;实测文本无新增裁切,viewport 在 200%
|
|
30
|
+
下可横向滚动。证据:`docs/assets/charter-graph-root-text-200-0.3.2.png`。
|
|
31
|
+
- 真实 AT/VoiceOver、最终六状态截图、Desktop 原生窗口矩阵、W0-1/W0-2 实测仍为已知缺口;0.3.2 candidate/promotion 已完成。
|
|
32
|
+
|
|
33
|
+
### 0.3.2 残留门禁
|
|
34
|
+
|
|
35
|
+
| 区域 | 当前状态 | 证据 / 下一步 |
|
|
36
|
+
| --- | --- | --- |
|
|
37
|
+
| A1 200% 根字号 | 已实现并实测(CDP 强制根字号) | 画布 scale 1/1.5/2;文本 scroll 指标不变;真实浏览器字号/最小字号设置并入 A2 人工走查 |
|
|
38
|
+
| A2 VoiceOver/NVDA | 未完成 | 真实 AT 走查 tabs/sheet/graph/meter/notice;不能用 AX-tree 代替 |
|
|
39
|
+
| A3 六状态 + media | 部分完成 | 已采 empty/staged/applied/conflict-confirmation + forced-colors/reduced-motion;unknown/replay 待补(`docs/assets/charter-state-*-0.3.2.png`) |
|
|
40
|
+
| A4 冻结稿并排 | 未完成 | 人工并排评审记录 |
|
|
41
|
+
| A5 Desktop 原生窗口 | 未完成 | Electron 窗口/ABI 矩阵 |
|
|
42
|
+
| A6 W0-1/W0-2 | 未完成 | px 化后的断点/栏宽与行容量实测 |
|
|
43
|
+
| B1–B6 文档/治理 | 本次处理 | 状态头、附录 D 对账、verification/index/tag 清理 |
|
|
51
44
|
|
|
52
45
|
## 1.2 0.3.0 GUI 正式版本(2026-11-13 已发布)
|
|
53
46
|
|
|
@@ -76,7 +69,7 @@ tarball 和抓取内容位于 `.tmp/`,不进入发布包。
|
|
|
76
69
|
`31daf17dbc823837c1b0c1ba7bc1033444db1059a2f2cd6f1a481f8d330b5d78`;npm `latest`/`next` 均为 `0.3.0`,
|
|
77
70
|
GitHub Release `v0.3.0` 已公开且不可变。安装以该发布 artifact 取代本地 `w6-final` 开发包。
|
|
78
71
|
- 0.3.1 GUI 收敛候选(2026-11-13):`npm run check` 41 文件 / **499 测试** PASS;
|
|
79
|
-
token 覆盖 41 static + 1 dynamic、11 个声明 DSH 版本 PASS
|
|
72
|
+
token 覆盖 41 static + 1 dynamic、11 个声明 DSH 版本 PASS;十一版本矩阵在候选兼容证据(run `43445530821`)中 PASS。共享 standing-envelope 构造函数由 Host 与
|
|
80
73
|
Diagnostics 共用;64 个交付物、生产长度 id 的 fixture 证明 id 开销恰为 49 B/交付物且 envelope 不超过 32 KiB。
|
|
81
74
|
- `traffic-check` 的 propose 遥测改为解析真实 JSON tool-result envelope(`{ok, message}`),不再对序列化
|
|
82
75
|
文本做正则。fixture 覆盖单个 `D1` 拒绝、未知 id、非 requires 类失败和 accepted:display-key=1、
|
|
@@ -95,11 +88,15 @@ tarball 和抓取内容位于 `.tmp/`,不进入发布包。
|
|
|
95
88
|
id 开销和 80%/超限三态。
|
|
96
89
|
- 0.3.1 README 截图由精确本地构建注入运行中的 Web app 后重采:
|
|
97
90
|
`docs/assets/charter-pane-0.3.1.png`、`charter-pane-0.3.1.zh.png`、`charter-graph-0.3.1.zh.png`。
|
|
91
|
+
- 0.3.1 正式发布(2026-11-13):候选 run `43445530821`,producer commit
|
|
92
|
+
`de1b83be004aecc63b09cfaeaf647ca94fb7567a`;release commit `0c00715d85be0e873d43175a4a26b724ea6c14d4`;
|
|
93
|
+
提升 run `43449411538`。已发布 artifact `dsh-charter-0.3.1.tgz`,SHA-256
|
|
94
|
+
`62fd230209dbf5c58aed09f0870775aa6d0d69feb4eff18aebf83f9803f28353`;npm `latest`/`next` 均为 `0.3.1`,
|
|
95
|
+
GitHub Release `v0.3.1` 已公开且不可变。候选兼容证据覆盖 11 个声明 DSH 版本(含 `0.2.2-rc.3`)。
|
|
98
96
|
- 本地验收 artifact(2026-11-13):`dist/dsh-charter-0.3.1.tgz` SHA-256
|
|
99
97
|
`9f779443fd83c8e320d94d1981c18dc896d9d5905a7cc3f7dc8673f307806860`;exact-artifact package smoke 与 packed
|
|
100
98
|
recovery smoke PASS。`dist/dsh-charter-0.3.1.tgz`(同一字节)已安装到本地 `web` 与 `desktop` profile;
|
|
101
99
|
两端 client 均为 `fcd56a48…`。Host 版本 chip 在干净重启 Host 后更新。
|
|
102
|
-
- 0.3.1 尚未发布;人工验收前不构造 candidate/promotion 证据。
|
|
103
100
|
- 本地验收部署(2026-11-12):W6 验收构建为 `dist/dsh-charter-0.3.0-w6-final.tgz`
|
|
104
101
|
(SHA-256 `ab74591c…`,client `986f8403…`)。已安装到本地 `web` 与 `desktop` profile,包版本 `0.3.0`,
|
|
105
102
|
`engines.dsh` 为有界 0.2 线范围。另按用户要求恢复 Pane 页头版本 chip(`v0.3.0`)。
|
|
@@ -278,3 +275,31 @@ rm -rf .tmp
|
|
|
278
275
|
```
|
|
279
276
|
|
|
280
277
|
`.tmp/` 不进入 Git 和 npm 包。
|
|
278
|
+
|
|
279
|
+
## 1.3 0.3.2 无障碍/证据发布(2026-11-16,带已知缺口发布)
|
|
280
|
+
|
|
281
|
+
- 源码:`npm run check` 42 文件 / **500 测试** PASS;11 个声明 DSH 版本 token 覆盖 PASS;
|
|
282
|
+
`verify:ui-metrics -- --gate=final` PASS;十一版本源码矩阵 PASS(`.tmp/compat-032-release.json`,source commit `0425a06`)。
|
|
283
|
+
- A1 根字号:根字号 16/24/32px 时图形画布整体 scale 1/1.5/2;节点文本 scrollWidth/clientWidth 与
|
|
284
|
+
scrollHeight/clientHeight 未新增裁切;viewport 在 200% 下可横向滚动。证据:
|
|
285
|
+
`docs/assets/charter-graph-root-text-200-0.3.2.png`。
|
|
286
|
+
- A3 状态/媒体证据:空/暂存/已应用/冲突确认(`docs/assets/charter-state-empty-0.3.2.png`、`docs/assets/charter-state-staged-0.3.2.png`、
|
|
287
|
+
`docs/assets/charter-state-applied-0.3.2.png`、`docs/assets/charter-state-conflict-0.3.2.png`)以及 forced-colors/reduced-motion 截图(`docs/assets/charter-state-forced-colors-0.3.2.png`、`docs/assets/charter-state-reduced-motion-0.3.2.png`);
|
|
288
|
+
已截取冲突确认态;unknown/replay 仍需最终复核。staged 截图已重采,画面不含前置编辑器或残留 bootstrap notice。
|
|
289
|
+
- A6 断点:860/900/1000/1100/1200/1440 无横向溢出、无节点重叠、列表行无溢出;1100 下 graphcard
|
|
290
|
+
因 app shell 内容容器窄于 880px 折叠,语义列表仍可用,记为 layout observation。
|
|
291
|
+
- B:GUI 方案状态头、附录 D 对账、dependency-graph 状态、verification 当前状态、roadmap/docs index
|
|
292
|
+
pending 措辞已清理;本地已 fetch `v0.3.0`/`v0.3.1` tag。
|
|
293
|
+
- A2/A4/A5 仍待人工/受环境阻塞:VoiceOver 可启动但 Apple Events/辅助功能授权缺失,不能声称真实 AT 已跑;
|
|
294
|
+
冻结稿并排签收仍是人工门禁;Desktop 原生截图被 macOS Screen Recording 权限阻塞(`screencapture` 报
|
|
295
|
+
`could not create image from display`)。未有证据前不标记完成。
|
|
296
|
+
|
|
297
|
+
## 1.4 0.3.3 结构化草案与语言跟随(2026-11-23,候选)
|
|
298
|
+
|
|
299
|
+
- 源码门禁:`npm run check` = 44 文件 / 524 测试 PASS;token coverage PASS;`verify:ui-metrics --gate=final` PASS。
|
|
300
|
+
- 结构化抽取:只按句边界切分、超长保留、>4x 显式截断、全等/前缀折叠、语言标注、稳定 `d-*` ref;见 `tests/core/structured-bootstrap.spec.ts`。
|
|
301
|
+
- Host apply:`charter/bootstrapDraft` + `d-*` ref + objective `clientRef`;legacy `charter/bootstrap` 与旧 clientRef 由既有 composition 测试继续覆盖。
|
|
302
|
+
- 自动语言跟随:首个 `bootstrapDraft` 请求即返回源语言草案(`language.status=pending`);客户端立即渲染后再发 `awaitTranslation:true` 请求,由 Host 解析当前会话模型,经 `ctx.llm` 做有界分批严格 JSON 调用(本地流式文本组装);模型缺失/输出不合格时回退原文并返回显式 `language.status`。每批独立超时并允许一次拆分重试;失败批保留源文并返回 `language.status=partial`;可选 `languageFollowProvider`/`languageFollowModel` 覆盖会话模型。单测覆盖成功、malformed、max-tokens、缺 ref、多批合并与 partial 合并;composition 测试覆盖假模型翻译、翻译后 apply、自定义翻译路由、partial 状态和 `languageFollow: false`;client 测试覆盖非 zh/en 结构化 bootstrap、方法缺失/失败回退和业务错误上抛。legacy golden fixture 锁定 0.3.2 抽取输出。
|
|
303
|
+
- 人工验收(2026-11-23):用户在自适应翻译修改后确认 39 条 en→zh Desktop 草案可用;zh→en 由用户明确放弃人工验收,改由自动化 target-zh 翻译测试覆盖。README Pane/依赖图截图已从实时 `v0.3.3` Desktop 视图重拍。
|
|
304
|
+
- legacy golden fixture 为 10 条合成摘要(对方案“≥10 条真实摘要”目标记为接受偏差;当前无可安全提交的真实摘要语料)。
|
|
305
|
+
- 候选 artifact `dist/dsh-charter-0.3.3.tgz` SHA-256 `6f987d7b8508fcc68d7420d19cca5ba24517b0f6759213aef0ceb33c377f0ea1`;exact-artifact package smoke 与 packed recovery smoke PASS。13 版本矩阵 PASS(`.tmp/compat-13-adaptive-final.json`,source `e67de59`;含 DSH 最新 `0.2.2-rc.5`);Web/Desktop profile 安装同一 `6f987d…` artifact,143 个包文件逐字节相同;Web profile 由 DSH `0.2.2-rc.5` CLI 启动并显示 Pane `v0.3.3`;Desktop app 为 `0.2.2-rc.5`,profile 由 Electron 独占,原生窗口仍为人工门禁。当前候选未发布。真实 en→zh 已由用户确认;zh→en 按用户决定仅做自动化覆盖。一个 39 条 / 7589 B 的真实摘要此前在 10s 后台超时下返回 `translation finished with aborted`;分批 + 每批超时/拆分重试 + partial 合并 + 60s 后台窗口 + 可选专用翻译路由 + DeepSeek `reasoningEffort: off` 是修复,需重跑该人工用例。
|
|
@@ -16,4 +16,6 @@ export interface DependencyGraphProps {
|
|
|
16
16
|
readonly onProposal: (id: string) => void;
|
|
17
17
|
readonly t: (key: string, values?: Record<string, string | number>) => string;
|
|
18
18
|
}
|
|
19
|
+
/** Scale the whole graph canvas when the user enlarges the root text size. */
|
|
20
|
+
export declare function graphTextScale(rootFontPx: number): number;
|
|
19
21
|
export declare function DependencyGraph({ layout, model, focusId, activeKey, showSupersedes, editable, onFocus, onActiveKey, onShowSupersedes, onStageRequires, onLocateList, onProposal, t, }: DependencyGraphProps): JSX.Element;
|
|
@@ -7,6 +7,14 @@ export interface BootstrapDraftItem {
|
|
|
7
7
|
readonly kind: 'invariant' | 'deliverable';
|
|
8
8
|
readonly text: string;
|
|
9
9
|
readonly selected: boolean;
|
|
10
|
+
/** Host-issued stable ref; absent for the legacy extractor. */
|
|
11
|
+
readonly clientRef?: string;
|
|
12
|
+
readonly lang?: 'zh' | 'en' | 'mixed';
|
|
13
|
+
readonly oversized?: boolean;
|
|
14
|
+
readonly truncatedFrom?: number;
|
|
15
|
+
readonly foldCount?: number;
|
|
16
|
+
/** Text as extracted/translated, used to tell an edit from an untouched oversized candidate. */
|
|
17
|
+
readonly originalText?: string;
|
|
10
18
|
}
|
|
11
19
|
/** The model-visible part of a history import plus its deferred proposals. */
|
|
12
20
|
export interface BootstrapPlan {
|
|
@@ -37,7 +45,7 @@ export interface BootstrapPlan {
|
|
|
37
45
|
* final verification: if it ever disagrees, the quadratic fallback recomputes
|
|
38
46
|
* the plan, so correctness never depends on the estimate.
|
|
39
47
|
*/
|
|
40
|
-
export declare function buildBootstrapPlan(view: CharterView, objective: string, items: readonly BootstrapDraftItem[]): BootstrapPlan;
|
|
48
|
+
export declare function buildBootstrapPlan(view: CharterView, objective: string, items: readonly BootstrapDraftItem[], structuredDraft?: boolean): BootstrapPlan;
|
|
41
49
|
export interface DraftTextIssue {
|
|
42
50
|
readonly issue: UserTextIssue;
|
|
43
51
|
readonly where: 'objective' | 'candidate';
|
|
@@ -3,7 +3,7 @@ import { type UserTextIssue } from '../core/normalize.js';
|
|
|
3
3
|
import type { CharterErrorCode } from '../core/errors.js';
|
|
4
4
|
import type { CharterInitializeRequest, CharterRecordArchive, CharterRestoreRequest } from '../core/schemas.js';
|
|
5
5
|
import type { CharterOp } from '../core/schemas.js';
|
|
6
|
-
import type { CharterBootstrapProposal, CharterView } from '../host/types.js';
|
|
6
|
+
import type { CharterBootstrapLanguage, CharterBootstrapProposal, CharterDraftLanguage, CharterView } from '../host/types.js';
|
|
7
7
|
import type { CharterSessionSource } from './store.js';
|
|
8
8
|
import { opTargets } from './preview.js';
|
|
9
9
|
import { type BootstrapDraftItem, type BootstrapPlan } from './bootstrap-plan.js';
|
|
@@ -118,6 +118,8 @@ export interface CharterDraftState {
|
|
|
118
118
|
/** How many candidates the review currently exposes; never resets on section changes. */
|
|
119
119
|
readonly bootstrapVisibleCount: number;
|
|
120
120
|
readonly bootstrapProblem: BootstrapProblem | null;
|
|
121
|
+
readonly bootstrapLanguage?: CharterBootstrapLanguage | undefined;
|
|
122
|
+
readonly bootstrapDraftLang?: CharterDraftLanguage | undefined;
|
|
121
123
|
/** A stream frame made the reviewed draft stale while its RPC outcome was unknown. */
|
|
122
124
|
readonly bootstrapNeedsStale: boolean;
|
|
123
125
|
/** View revision captured when the reviewed history draft was accepted. */
|
|
@@ -250,6 +252,15 @@ export declare class CharterDraft {
|
|
|
250
252
|
ensureBootstrap(view: CharterView, connectionReady: boolean): void;
|
|
251
253
|
retryBootstrap(view: CharterView): void;
|
|
252
254
|
private runBootstrap;
|
|
255
|
+
/** Materialize the review draft; shared by the initial and localized responses. */
|
|
256
|
+
private acceptBootstrapProposal;
|
|
257
|
+
/**
|
|
258
|
+
* The first extraction returns source text immediately. Resolve the
|
|
259
|
+
* deferred model translation in the background and replace the draft only
|
|
260
|
+
* while it is still pristine, so a fast reviewer never gets an edited draft
|
|
261
|
+
* overwritten under their hands.
|
|
262
|
+
*/
|
|
263
|
+
private localizeBootstrapProposal;
|
|
253
264
|
/** Explicit dismissal: one full cleanup of the draft and any replay evidence. */
|
|
254
265
|
dismissBootstrap(): void;
|
|
255
266
|
/**
|
package/lib/client/locales.d.ts
CHANGED
|
@@ -149,6 +149,7 @@ declare const en: {
|
|
|
149
149
|
readonly 'deps.laneCandidate': "Candidate";
|
|
150
150
|
readonly 'deps.laneHistory': "History";
|
|
151
151
|
readonly 'deps.legendHistory': "Dash-dot = replacement history";
|
|
152
|
+
readonly 'deps.textScaleHint': "Text scaling {percent}%: the graph is enlarged and can be scrolled horizontally.";
|
|
152
153
|
readonly 'deps.zoomIn': "Zoom in";
|
|
153
154
|
readonly 'deps.zoomOut': "Zoom out";
|
|
154
155
|
readonly 'deps.resetLayout': "Reset zoom";
|
|
@@ -227,6 +228,17 @@ declare const en: {
|
|
|
227
228
|
readonly 'bootstrap.notLive': "This Session is not live in this Host process. Open it here to read its compaction history.";
|
|
228
229
|
readonly 'bootstrap.noSummary': "No usable compaction summary exists for this Session yet. A draft appears after a compaction.";
|
|
229
230
|
readonly 'bootstrap.unavailable': "Charter storage is unavailable, so the history draft cannot be read.";
|
|
231
|
+
readonly 'bootstrap.languageTranslated': "Draft normalized to {language}.";
|
|
232
|
+
readonly 'bootstrap.languagePending': "Showing the source draft while {language} normalization runs in the background…";
|
|
233
|
+
readonly 'bootstrap.languagePartial': "Some candidates could not be normalized to {language}; those kept their source text.";
|
|
234
|
+
readonly 'bootstrap.languageFallback': "Could not normalize the draft to {language}; showing the source language.";
|
|
235
|
+
readonly 'bootstrap.languageTag': "{language} draft";
|
|
236
|
+
readonly 'bootstrap.oversizedHint': "This candidate exceeds the item limit. Edit or split it before applying.";
|
|
237
|
+
readonly 'bootstrap.truncatedHint': "Truncated from {bytes} bytes; the complete source remains in compaction history.";
|
|
238
|
+
readonly 'bootstrap.foldedHint': "{count} similar candidates folded into this row.";
|
|
239
|
+
readonly 'locale.zh': "Chinese";
|
|
240
|
+
readonly 'locale.en': "English";
|
|
241
|
+
readonly 'locale.mixed': "Mixed language";
|
|
230
242
|
readonly 'notice.conflict': string;
|
|
231
243
|
readonly 'objective.kicker': "Objective";
|
|
232
244
|
readonly 'objective.originalLabel': "Initial objective";
|
|
@@ -91,6 +91,8 @@ export interface PaneScope {
|
|
|
91
91
|
readonly bootstrapId: string;
|
|
92
92
|
readonly bootstrapItems: readonly import("./bootstrap-plan.js").BootstrapDraftItem[];
|
|
93
93
|
readonly bootstrapObjective: string;
|
|
94
|
+
readonly bootstrapLanguage?: import("../host/types.js").CharterBootstrapLanguage | undefined;
|
|
95
|
+
readonly bootstrapDraftLang?: import("../host/types.js").CharterDraftLanguage | undefined;
|
|
94
96
|
readonly bootstrapObjectiveOver: boolean;
|
|
95
97
|
readonly bootstrapPlan: import("./bootstrap-plan.js").BootstrapPlan;
|
|
96
98
|
readonly bootstrapPromptBytes: number;
|
package/lib/client/store.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Context as ClientContext } from '@deepseek-ai/cordis';
|
|
|
2
2
|
import type { SessionId } from '@deepseek-ai/dsh-session/types';
|
|
3
3
|
import type { TypertRemoteNamespaceMap } from '@deepseek-ai/dsh-typert-protocol';
|
|
4
4
|
import type { CharterBootstrapApplyRequest, CharterEditRequest, CharterInitializeRequest, CharterRestoreRequest } from '../core/schemas.js';
|
|
5
|
-
import type { CharterBootstrapResult, CharterEditResult, CharterRecordExport, CharterRecordOperationResult, CharterView, CharterChangeSetPreviewResult } from '../host/types.js';
|
|
5
|
+
import type { CharterBootstrapDraftResult, CharterBootstrapResult, CharterEditResult, CharterRecordExport, CharterRecordOperationResult, CharterView, CharterChangeSetPreviewResult } from '../host/types.js';
|
|
6
6
|
import { CharterDraft } from './draft-store.js';
|
|
7
7
|
import { type CharterConnectionErrorKind } from './remote-error.js';
|
|
8
8
|
export interface CharterClientState {
|
|
@@ -55,6 +55,9 @@ export declare class CharterSessionSource implements CharterSource {
|
|
|
55
55
|
/** Attach that has been requested but does not own the stream yet (an earlier dispose is pending). */
|
|
56
56
|
private pendingRemote;
|
|
57
57
|
private attachGeneration;
|
|
58
|
+
/** A Host without bootstrapDraft (or one that failed method-level) stays on the legacy path for this source. */
|
|
59
|
+
private structuredBootstrapUnavailable;
|
|
60
|
+
private draftTargetLanguage;
|
|
58
61
|
private connection;
|
|
59
62
|
private readonly connectionListeners;
|
|
60
63
|
private watchdog;
|
|
@@ -72,6 +75,14 @@ export declare class CharterSessionSource implements CharterSource {
|
|
|
72
75
|
readonly getSnapshot: () => CharterClientState;
|
|
73
76
|
readonly subscribe: (listener: () => void) => (() => void);
|
|
74
77
|
readonly bootstrap: () => Promise<CharterBootstrapResult>;
|
|
78
|
+
/**
|
|
79
|
+
* Resolve the deferred language normalization for the current draft.
|
|
80
|
+
*
|
|
81
|
+
* The initial `bootstrap` returns the source draft immediately; the Pane
|
|
82
|
+
* calls this in the background and replaces the draft only while it is still
|
|
83
|
+
* pristine. Old Hosts without this method return undefined.
|
|
84
|
+
*/
|
|
85
|
+
readonly localizeBootstrap: () => Promise<CharterBootstrapDraftResult | undefined>;
|
|
75
86
|
readonly edit: (request: CharterEditRequest) => Promise<CharterEditResult>;
|
|
76
87
|
readonly applyBootstrap: (request: CharterBootstrapApplyRequest) => Promise<CharterEditResult>;
|
|
77
88
|
readonly previewChangeSet: (request: CharterEditRequest) => Promise<CharterChangeSetPreviewResult>;
|