dsh-charter 0.3.2 → 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 +19 -1
- package/CHANGELOG.zh.md +18 -1
- package/README.md +46 -26
- package/README.zh.md +37 -21
- package/docs/README.md +2 -0
- package/docs/README.zh.md +2 -0
- 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-pane-0.3.3.png +0 -0
- package/docs/assets/charter-pane-0.3.3.zh.png +0 -0
- 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 +2 -2
- package/docs/design/compatibility.md +11 -5
- package/docs/design/compatibility.zh.md +10 -5
- package/docs/design/version-roadmap.md +9 -11
- package/docs/design/version-roadmap.zh.md +6 -4
- package/docs/release-notes/0.3.2.md +6 -5
- package/docs/release-notes/0.3.3.md +32 -0
- package/docs/release-notes/README.md +1 -1
- package/docs/releasing.md +6 -5
- package/docs/releasing.zh.md +6 -5
- package/docs/user-guide.md +16 -2
- package/docs/user-guide.zh.md +15 -2
- package/docs/verification.md +31 -23
- package/docs/verification.zh.md +32 -23
- package/lib/client/bootstrap-plan.d.ts +9 -1
- package/lib/client/draft-store.d.ts +12 -1
- package/lib/client/locales.d.ts +11 -0
- package/lib/client/pane-scope.d.ts +2 -0
- package/lib/client/store.d.ts +12 -1
- package/lib/client.js +328 -41
- 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/releasing.zh.md
CHANGED
|
@@ -9,12 +9,13 @@
|
|
|
9
9
|
这是当前发布清单,取代早期按 rc 编写的暂存说明。已发布的 tag、GitHub Release 和 npm 版本不可变:不移动
|
|
10
10
|
tag、不删除已发布 Release、不在打 tag 后重建字节。
|
|
11
11
|
|
|
12
|
-
## 当前状态(2026-11-
|
|
12
|
+
## 当前状态(2026-11-16)
|
|
13
13
|
|
|
14
|
-
-
|
|
15
|
-
- **已发布:** `0.3.
|
|
16
|
-
`dsh-charter-0.3.
|
|
17
|
-
- **上一版本:** `0.3.
|
|
14
|
+
- **发布候选:** `0.3.3` — 结构化草案抽取 + 非阻塞中英文语言跟随;本地 candidate artifact `6f987d7b…`,源码门禁与 profile 验收完成。尚未推送、未 tag、未发布;C+1 checksum 与 promotion 等待明确的发布执行。
|
|
15
|
+
- **已发布:** `0.3.2` — npm `latest`/`next`,GitHub Release `v0.3.2`;精确产物
|
|
16
|
+
`dsh-charter-0.3.2.tgz`,SHA-256 `9dcb82ae34eaaeb6d266bb98f3e1f92f3a0798042ce3dc282abe9173ff79e056`。
|
|
17
|
+
- **上一版本:** `0.3.1` — GitHub Release `v0.3.1`。
|
|
18
|
+
- **更早版本:** `0.3.0` — GitHub Release `v0.3.0`。
|
|
18
19
|
- **更早版本:** `0.2.1`。
|
|
19
20
|
- **发布后诊断:** 真实模型 compaction 和 512 条 core 性能均已通过。
|
|
20
21
|
- 不得手动 publish,也不得绕过受保护门禁。
|
package/docs/user-guide.md
CHANGED
|
@@ -243,6 +243,11 @@ Defaults live in `cordis.patch.yml`. Override the same keys in the profile's `co
|
|
|
243
243
|
maxObjectiveBytes: 4096
|
|
244
244
|
maxItemBytes: 1024
|
|
245
245
|
contextOrder: 130
|
|
246
|
+
languageFollow: true
|
|
247
|
+
languageFollowTimeoutMs: 60000
|
|
248
|
+
# Optional dedicated translation route; omit to use the session model.
|
|
249
|
+
languageFollowProvider: your-provider
|
|
250
|
+
languageFollowModel: your-fast-model
|
|
246
251
|
```
|
|
247
252
|
|
|
248
253
|
| Field | Default | Meaning |
|
|
@@ -258,6 +263,10 @@ Defaults live in `cordis.patch.yml`. Override the same keys in the profile's `co
|
|
|
258
263
|
| `maxHistoryBytes` | 131072 | recent history bytes |
|
|
259
264
|
| `mutationLimit` | 128 | recent mutation receipts |
|
|
260
265
|
| `contextOrder` | 130 | runtime-context order; after sandbox/approval/subagent by default |
|
|
266
|
+
| `languageFollow` | true | normalize a review draft to the active `zh`/`en` DSH language through the session model; set `false` to disable the automatic model call |
|
|
267
|
+
| `languageFollowTimeoutMs` | 60000 | upper bound for one background translation call; failed batches split and keep source text |
|
|
268
|
+
| `languageFollowProvider` | unset | optional dedicated translation provider; requires `languageFollowModel` |
|
|
269
|
+
| `languageFollowModel` | unset | optional dedicated translation model; omit both to use the current session model |
|
|
261
270
|
|
|
262
271
|
The only model-visible capacity is `maxPromptBytes`; active item counts are not capped separately. Storage is
|
|
263
272
|
bounded by `maxItems`, `maxPendingItems`, and `maxRecordBytes`. Values that would make a Session ready but
|
|
@@ -271,8 +280,8 @@ seats remain visible.
|
|
|
271
280
|
|
|
272
281
|
The tab shows a live context meter and per-field byte counters. Nothing is silently truncated:
|
|
273
282
|
|
|
274
|
-
- Long history-draft items are split
|
|
275
|
-
|
|
283
|
+
- Long history-draft items are split only at sentence boundaries; an over-limit sentence is kept whole and
|
|
284
|
+
marked. An oversized/truncated candidate is highlighted and Apply stays disabled until you edit or split it.
|
|
276
285
|
- The objective is kept whole. If it exceeds `maxObjectiveBytes`, the draft shows the full text and an over-limit
|
|
277
286
|
message; shorten it before applying.
|
|
278
287
|
- If candidates do not fit the context budget, the candidates that fit become active and the rest are saved as
|
|
@@ -281,6 +290,11 @@ The tab shows a live context meter and per-field byte counters. Nothing is silen
|
|
|
281
290
|
- The objective, per-item byte limits, and storage/atomic limits remain hard gates; the UI shows the exact
|
|
282
291
|
problem and Apply stays disabled only for those real limits.
|
|
283
292
|
|
|
293
|
+
When `languageFollow` is enabled and the draft language differs from the DSH UI language, the source draft renders
|
|
294
|
+
first; the Host then sends active candidates to the session model in bounded background calls and replaces the
|
|
295
|
+
draft if it is still untouched. Set `languageFollow: false` in the profile to keep the source language and avoid
|
|
296
|
+
that automatic call; the deterministic extraction still runs. For custom APIs with very different latency, set the optional `languageFollowProvider`/`languageFollowModel` pair so translation uses a known fast model instead of the session default.
|
|
297
|
+
|
|
284
298
|
Raise the budgets in the profile when your charter needs more room.
|
|
285
299
|
|
|
286
300
|
### 4.2 Over-budget records
|
package/docs/user-guide.zh.md
CHANGED
|
@@ -224,6 +224,11 @@ Change Set 引入或加重依赖冲突时,Review/Apply 会列出受影响交
|
|
|
224
224
|
maxObjectiveBytes: 4096
|
|
225
225
|
maxItemBytes: 1024
|
|
226
226
|
contextOrder: 130
|
|
227
|
+
languageFollow: true
|
|
228
|
+
languageFollowTimeoutMs: 60000
|
|
229
|
+
# 可选:专用翻译路由;省略则使用当前会话模型
|
|
230
|
+
languageFollowProvider: your-provider
|
|
231
|
+
languageFollowModel: your-fast-model
|
|
227
232
|
```
|
|
228
233
|
|
|
229
234
|
| 字段 | 默认 | 说明 |
|
|
@@ -239,6 +244,10 @@ Change Set 引入或加重依赖冲突时,Review/Apply 会列出受影响交
|
|
|
239
244
|
| `maxHistoryBytes` | 131072 | 近期 history 字节上限 |
|
|
240
245
|
| `mutationLimit` | 128 | 近期 mutation 回执上限 |
|
|
241
246
|
| `contextOrder` | 130 | runtime context 排序;默认在 sandbox/approval/subagent 之后 |
|
|
247
|
+
| `languageFollow` | true | 按当前 `zh`/`en` DSH 界面语言,通过后续模型归一草案;设为 `false` 可关闭自动模型调用 |
|
|
248
|
+
| `languageFollowTimeoutMs` | 60000 | 单批后台翻译等待上限;失败批会拆分并保留源文 |
|
|
249
|
+
| `languageFollowProvider` | 未设置 | 可选专用翻译 provider;需同时设置 model |
|
|
250
|
+
| `languageFollowModel` | 未设置 | 可选专用翻译模型;两者都不设时使用当前会话模型 |
|
|
242
251
|
|
|
243
252
|
模型可见容量只有 `maxPromptBytes`;active 条目数不再单独设上限。存储由 `maxItems`、`maxPendingItems` 和
|
|
244
253
|
`maxRecordBytes` 约束。会让 Session 处于 ready 但永久不可编辑的配置值会被抬到文档化最小值,并由 Host 记录 warning。
|
|
@@ -250,13 +259,17 @@ Change Set 引入或加重依赖冲突时,Review/Apply 会列出受影响交
|
|
|
250
259
|
|
|
251
260
|
标签页显示实时上下文预算条和每个字段的字节计数。任何内容都不会被静默截断:
|
|
252
261
|
|
|
253
|
-
-
|
|
254
|
-
|
|
262
|
+
- 历史草案中的长条目只按句边界拆分;超过单条上限的整句会保留并标记。超限/截断候选会高亮,应用
|
|
263
|
+
保持禁用,直到你编辑或拆分它。
|
|
255
264
|
- 目标保持完整。若超过 `maxObjectiveBytes`,草案显示全文和超限提示;请缩短后再应用。
|
|
256
265
|
- 候选放不进上下文预算时,能放下的部分直接生效,其余保存为**待审提案**。应用 仍然可用;不会拒绝、
|
|
257
266
|
截断、丢弃或再次摘要。等上下文有余量时再逐条接受提案。
|
|
258
267
|
- 目标、单条字节、存储/单批容量仍是硬限制;UI 会显示具体问题,只有这些真实限制会让应用 禁用。
|
|
259
268
|
|
|
269
|
+
启用 `languageFollow` 且草案语言与 DSH 界面语言不一致时,先立即显示源语言草案;Host 再在后台把当前候选
|
|
270
|
+
分批发送给会话模型,并在草案仍未被操作时替换。可在 profile 设置 `languageFollow: false` 保留源语言并关闭
|
|
271
|
+
该自动调用;确定性抽取仍然生效。自定义 API 延迟差异较大时,可设置 `languageFollowProvider`/`languageFollowModel` 使用已知较快的专用翻译模型。`languageFollowTimeoutMs` 限制后台等待(默认 60 秒)。
|
|
272
|
+
|
|
260
273
|
会话契约需要更多空间时,可在 profile 中调高预算。
|
|
261
274
|
|
|
262
275
|
### 4.2 超预算记录
|
package/docs/verification.md
CHANGED
|
@@ -3,37 +3,35 @@
|
|
|
3
3
|
English | [中文](verification.zh.md)
|
|
4
4
|
|
|
5
5
|
> **Status:** Active — current operating record.
|
|
6
|
-
> **Version scope:** `0.3.
|
|
7
|
-
> **Baseline:** 2026-11-
|
|
6
|
+
> **Version scope:** `0.3.3` structured-draft/language release (published 2026-11-24); previous published `0.3.2`.
|
|
7
|
+
> **Baseline:** 2026-11-23
|
|
8
8
|
|
|
9
|
-
Verification date: 2026-11-
|
|
9
|
+
Verification date: 2026-11-24. Current source version: `0.3.3`; latest published release is `0.3.3` (previous `0.3.2`). This is the current evidence record; historical per-commit narratives live in Git
|
|
10
10
|
history and the Changelog. Temporary directories, profiles, tarballs, and fetched HTML live under `.tmp/` and are
|
|
11
11
|
excluded from the published package.
|
|
12
12
|
|
|
13
13
|
Environment: macOS, Node `v22.23.1`, npm `12.0.2`, pnpm `12.3.4`. Local DSH development baseline:
|
|
14
|
-
`0.2.2-rc.
|
|
15
|
-
|
|
16
|
-
## 1. Current status (2026-11-
|
|
17
|
-
|
|
18
|
-
- Latest published release: `0.3.
|
|
19
|
-
|
|
20
|
-
- Previous releases: `0.3.0`, `0.2.2`; published tags and bytes are immutable.
|
|
21
|
-
- Current source line: `0.3.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
`
|
|
29
|
-
candidate name remains in `dist/`, the stale 0.3.1-name dev tarball was removed, and local profiles point to
|
|
30
|
-
this exact file. Root `SHA256SUMS` still records published `0.3.1` until a 0.3.2 release candidate exists.
|
|
14
|
+
`0.2.2-rc.5` (the current npm `latest`/`next`).
|
|
15
|
+
|
|
16
|
+
## 1. Current status (2026-11-23)
|
|
17
|
+
|
|
18
|
+
- Latest published release: `0.3.3` (npm `latest`/`next`, GitHub Release `v0.3.3`; exact artifact digest is recorded in the C+1 checksum commit and release evidence).
|
|
19
|
+
- Previous published release: `0.3.2` (SHA-256 `9dcb82ae34eaaeb6d266bb98f3e1f92f3a0798042ce3dc282abe9173ff79e056`).
|
|
20
|
+
- Previous releases: `0.3.1`, `0.3.0`, `0.2.2`; published tags and bytes are immutable.
|
|
21
|
+
- Current source line: `0.3.3` structured-draft/language candidate, not published. It adds additive draft Remote/objective refs and automatic language following; record schema remains 2 and prompt projection is unchanged.
|
|
22
|
+
- Source gates on the current tree: `npm run check` (44 files / 524 tests), token coverage 41 static + 1 dynamic over 13 declared DSH versions, and `verify:ui-metrics --gate=final`.
|
|
23
|
+
- Compatibility: thirteen declared DSH versions are local-matrix verified (`.tmp/compat-13-adaptive-final.json`); latest DSH `0.2.2-rc.5` is the primary baseline. This is local evidence, not a CI claim.
|
|
24
|
+
- Post-release fresh exact CLI install in an isolated `DSH_HOME` resolved `dsh-charter@0.3.2` from npm and
|
|
25
|
+
loaded client `6ef68d25…`, matching the published artifact.
|
|
26
|
+
- Published artifact: `dsh-charter-0.3.2.tgz` SHA-256
|
|
27
|
+
`9dcb82ae34eaaeb6d266bb98f3e1f92f3a0798042ce3dc282abe9173ff79e056` (client `6ef68d25…`); tag/GitHub
|
|
28
|
+
Release `v0.3.2` is public. Root `SHA256SUMS` matches; local professional profiles point to the same artifact.
|
|
31
29
|
Exact-artifact package smoke and packed recovery smoke PASS.
|
|
32
30
|
- 0.3.2 root-text evidence: graph canvas scales as a unit at root font 16/24/32 px (scale 1/1.5/2); measured
|
|
33
31
|
text has no new clipping and the viewport becomes horizontally scrollable. Evidence:
|
|
34
32
|
`docs/assets/charter-graph-root-text-200-0.3.2.png`.
|
|
35
|
-
- Real AT/VoiceOver, final six-state screenshots, Desktop native-window matrix, W0-1/W0-2 measurements
|
|
36
|
-
|
|
33
|
+
- Real AT/VoiceOver, final six-state screenshots, Desktop native-window matrix, and W0-1/W0-2 measurements
|
|
34
|
+
remain known gaps. The 0.3.2 candidate/promotion completed.
|
|
37
35
|
|
|
38
36
|
### 0.3.2 residual gates
|
|
39
37
|
|
|
@@ -327,7 +325,7 @@ rm -rf .tmp
|
|
|
327
325
|
|
|
328
326
|
`.tmp/` is excluded from Git and the npm package.
|
|
329
327
|
|
|
330
|
-
## 1.3 0.3.2 accessibility/evidence
|
|
328
|
+
## 1.3 0.3.2 accessibility/evidence release (2026-11-16, published with known gaps)
|
|
331
329
|
|
|
332
330
|
- Source: `npm run check` 42 files / **500 tests** PASS; token coverage PASS over 11 declared DSH versions;
|
|
333
331
|
`verify:ui-metrics -- --gate=final` PASS; eleven-version source matrix PASS (`.tmp/compat-032-release.json`, source commit `0425a06`).
|
|
@@ -345,3 +343,13 @@ rm -rf .tmp
|
|
|
345
343
|
no real AT claim is made; the frozen-mockup side-by-side sign-off is still human; native Desktop capture is
|
|
346
344
|
blocked by macOS Screen Recording permission (`screencapture` reports `could not create image from display`).
|
|
347
345
|
These gates are not marked complete without evidence.
|
|
346
|
+
|
|
347
|
+
## 1.4 0.3.3 structured draft and language following (2026-11-23, candidate)
|
|
348
|
+
|
|
349
|
+
- Source gates: `npm run check` = 44 files / 524 tests PASS; token coverage PASS; `verify:ui-metrics --gate=final` PASS.
|
|
350
|
+
- Structured extraction: sentence-boundary-only splits, oversized retention, >4x explicit truncation, exact/prefix folding, language tags, stable `d-*` refs; added to `tests/core/structured-bootstrap.spec.ts`.
|
|
351
|
+
- Host apply: `charter/bootstrapDraft` + `d-*` refs + objective `clientRef`; legacy `charter/bootstrap` and legacy clientRefs remain covered by the existing composition suite.
|
|
352
|
+
- Automatic language following: The first `bootstrapDraft` request returns the source draft with `language.status=pending`; the client renders it immediately and sends a second `awaitTranslation:true` request, which resolves the current session model in bounded batches with local streamed-text assembly, requires a complete strict-JSON `{items:[{ref,text}]}` response, and falls back to source text with an explicit `language.status` when the model is absent or invalid. Translation is batched by count/source bytes (12 items / 6000 B, at most four concurrent calls) so a 39-item draft does not hit a single response cap. Each batch has its own timeout and one split retry; failures keep source text and produce `language.status=partial`; an optional `languageFollowProvider`/`languageFollowModel` pair overrides the session model. Unit tests cover success, malformed output, max-tokens, missing refs, multi-batch merging, and partial merge; composition tests cover fake-model translation, translated apply, custom translation route, partial status, and `languageFollow: false`; client tests cover non-zh/en structured bootstrap, missing/failing-method fallback, and business-error propagation. A legacy golden fixture locks the 0.3.2 extraction output.
|
|
353
|
+
- Manual acceptance (2026-11-23): user confirmed the 39-item en→zh Desktop draft after the adaptive translation changes; zh→en was explicitly waived by the user and is covered by the automated target-zh translation test. README Pane/graph screenshots were recaptured from the live `v0.3.3` Desktop view.
|
|
354
|
+
- Legacy golden fixture contains 10 synthetic summaries (accepted deviation from the design's ≥10 real-summary target; real summaries were not available to commit).
|
|
355
|
+
- Candidate artifact `dist/dsh-charter-0.3.3.tgz` SHA-256 `6f987d7b8508fcc68d7420d19cca5ba24517b0f6759213aef0ceb33c377f0ea1`; exact-artifact package smoke and packed recovery smoke PASS. Thirteen-version matrix PASS (`.tmp/compat-13-adaptive-final.json`, source `e67de59`; includes current DSH `0.2.2-rc.5`); Web and Desktop profiles install the same `6f987d…` artifact and their 143 package files are byte-identical. The Web profile boots through the DSH `0.2.2-rc.5` CLI and reports `v0.3.3`; Desktop app is `0.2.2-rc.5`, but its profile is Electron-owned (CLI boot refused by design), so the native window remains a manual gate. The candidate is not published. The live en→zh case is user-confirmed; zh→en is automated-only by user decision. A live 39-item/7589-byte summary produced `translation finished with aborted` under the previous 10s background timeout; batching, per-batch timeouts with split retry, partial merge, a 60s background window, an optional dedicated translation route, and DeepSeek `reasoningEffort: off` are the fix and require re-running that manual case.
|
package/docs/verification.zh.md
CHANGED
|
@@ -3,33 +3,32 @@
|
|
|
3
3
|
[English](verification.md) | 中文
|
|
4
4
|
|
|
5
5
|
> **状态:** Active — 当前操作记录。
|
|
6
|
-
> **版本范围:** `0.3.
|
|
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
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
`
|
|
27
|
-
|
|
28
|
-
|
|
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
29
|
- 0.3.2 根字号证据:根字号 16/24/32 px 时图形画布整体缩放 1/1.5/2;实测文本无新增裁切,viewport 在 200%
|
|
30
30
|
下可横向滚动。证据:`docs/assets/charter-graph-root-text-200-0.3.2.png`。
|
|
31
|
-
- 真实 AT/VoiceOver、最终六状态截图、Desktop 原生窗口矩阵、W0-1/W0-2
|
|
32
|
-
仍未完成;这些在下方按门禁跟踪,不写成已完成。
|
|
31
|
+
- 真实 AT/VoiceOver、最终六状态截图、Desktop 原生窗口矩阵、W0-1/W0-2 实测仍为已知缺口;0.3.2 candidate/promotion 已完成。
|
|
33
32
|
|
|
34
33
|
### 0.3.2 残留门禁
|
|
35
34
|
|
|
@@ -277,7 +276,7 @@ rm -rf .tmp
|
|
|
277
276
|
|
|
278
277
|
`.tmp/` 不进入 Git 和 npm 包。
|
|
279
278
|
|
|
280
|
-
## 1.3 0.3.2
|
|
279
|
+
## 1.3 0.3.2 无障碍/证据发布(2026-11-16,带已知缺口发布)
|
|
281
280
|
|
|
282
281
|
- 源码:`npm run check` 42 文件 / **500 测试** PASS;11 个声明 DSH 版本 token 覆盖 PASS;
|
|
283
282
|
`verify:ui-metrics -- --gate=final` PASS;十一版本源码矩阵 PASS(`.tmp/compat-032-release.json`,source commit `0425a06`)。
|
|
@@ -294,3 +293,13 @@ rm -rf .tmp
|
|
|
294
293
|
- A2/A4/A5 仍待人工/受环境阻塞:VoiceOver 可启动但 Apple Events/辅助功能授权缺失,不能声称真实 AT 已跑;
|
|
295
294
|
冻结稿并排签收仍是人工门禁;Desktop 原生截图被 macOS Screen Recording 权限阻塞(`screencapture` 报
|
|
296
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` 是修复,需重跑该人工用例。
|
|
@@ -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
|
@@ -228,6 +228,17 @@ declare const en: {
|
|
|
228
228
|
readonly 'bootstrap.notLive': "This Session is not live in this Host process. Open it here to read its compaction history.";
|
|
229
229
|
readonly 'bootstrap.noSummary': "No usable compaction summary exists for this Session yet. A draft appears after a compaction.";
|
|
230
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";
|
|
231
242
|
readonly 'notice.conflict': string;
|
|
232
243
|
readonly 'objective.kicker': "Objective";
|
|
233
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>;
|