dsh-charter 0.2.0 → 0.2.2

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +61 -1
  2. package/CHANGELOG.zh.md +51 -1
  3. package/CONTRIBUTING.md +12 -2
  4. package/CONTRIBUTING.zh.md +9 -2
  5. package/README.md +50 -20
  6. package/README.zh.md +39 -17
  7. package/docs/README.md +7 -3
  8. package/docs/README.zh.md +5 -3
  9. package/docs/assets/charter-pane.zh.png +0 -0
  10. package/docs/design/charter-dependency-graph-v1.zh.md +1101 -0
  11. package/docs/design/charter-design-v1.md +7 -3
  12. package/docs/design/charter-design-v1.zh.md +14 -1
  13. package/docs/design/charter-workspace-v2.zh.md +20 -3
  14. package/docs/design/version-roadmap.md +9 -9
  15. package/docs/design/version-roadmap.zh.md +18 -14
  16. package/docs/release-notes/0.2.0.md +7 -7
  17. package/docs/release-notes/0.2.1.md +58 -0
  18. package/docs/release-notes/0.2.2.md +60 -0
  19. package/docs/release-notes/README.md +1 -2
  20. package/docs/releasing.md +12 -7
  21. package/docs/releasing.zh.md +10 -7
  22. package/docs/user-guide.md +48 -22
  23. package/docs/user-guide.zh.md +43 -18
  24. package/docs/verification.md +40 -28
  25. package/docs/verification.zh.md +31 -24
  26. package/lib/client/DependencyGraph.d.ts +19 -0
  27. package/lib/client/locales.d.ts +97 -19
  28. package/lib/client/relation-graph.d.ts +135 -0
  29. package/lib/client/store.d.ts +5 -0
  30. package/lib/client.js +2552 -496
  31. package/lib/core/change-set.d.ts +7 -0
  32. package/lib/core/dependencies.d.ts +29 -0
  33. package/lib/core.js +1 -1
  34. package/lib/{fork-D5HVDV1i.js → fork-KSL6sovw.js} +70 -1
  35. package/lib/host/domain.d.ts +50 -0
  36. package/lib/host/service.d.ts +18 -1
  37. package/lib/host/types.d.ts +37 -1
  38. package/lib/index.js +2 -2
  39. package/lib/remote/service.d.ts +8 -1
  40. package/lib/remote/wire.d.ts +161 -3
  41. package/lib/remote.js +155 -4
  42. package/lib/{service-C3A59BG5.js → service-MsIACddZ.js} +186 -5
  43. package/lib/version.d.ts +1 -1
  44. package/package.json +1 -1
@@ -232,7 +232,10 @@ automatically verify; a failed verification does not automatically archive.
232
232
 
233
233
  1. `CharterService.init()` registers Session and Agent lifecycle listeners before opening the domain.
234
234
  2. `openDomain()` opens `dsh_charter_v1` with a `sessions` table (`layout: per-record`), validates all records,
235
- and marks semantically inconsistent records unavailable.
235
+ and marks semantically inconsistent records unavailable. It also opens the optional
236
+ `dsh_charter_archives_v1` domain with an `archives` table for the latest five owner-only recovery snapshots
237
+ per Session and at most 25 across the profile (oldest evicted first);
238
+ failure to open the cache degrades export/restore without bricking the primary record.
236
239
  3. On `session/created`, the service initializes the Session in the background.
237
240
  4. On `agent/created` (serial and awaitable), the listener awaits initialization before the first prompt can be
238
241
  assembled.
@@ -240,8 +243,9 @@ automatically verify; a failed verification does not automatically archive.
240
243
  it never leaves two initialization promises waiting on each other.
241
244
  6. If a child Session appears before its parent record is durable, the child waits for `domain/changed` and
242
245
  retries.
243
- 7. `session/disposed` aborts in-flight initialization and removes UI listeners. The durable record is not
244
- deleted.
246
+ 7. `session/disposed` aborts in-flight initialization and removes UI listeners. It does not delete the record
247
+ or its recovery cache; the durable record is the authority, and the cache is a bounded derivative with
248
+ profile-wide eviction (never a second authority).
245
249
  8. On plugin unload, new edits are blocked, in-flight writes are awaited, listeners and domain are released.
246
250
 
247
251
  Session disposal closes every open watch subscription (listeners receive `null` and the stream generator exits),
@@ -287,6 +287,19 @@ table: sessions
287
287
  key: SessionId
288
288
  ```
289
289
 
290
+ 恢复缓存使用独立 domain:
291
+
292
+ ```text
293
+ name: dsh_charter_archives_v1
294
+ version: 1
295
+ layout: per-record
296
+ table: archives
297
+ key: sessionId--revision
298
+ policy: 每 Session 最多 5 份;整个 profile 最多 25 份,最旧优先淘汰
299
+ ```
300
+
301
+ 缓存是 owner-only 的派生物,不是第二正本;host 打开失败时降级为无缓存,不影响主 record。
302
+
290
303
  记录形状:
291
304
 
292
305
  ```ts
@@ -752,7 +765,7 @@ Session dispose:
752
765
 
753
766
  - 停止该 Session 的初始化任务和流;
754
767
  - 清除 runtime 引用;
755
- - 不删除持久记录。
768
+ - 不删除持久记录,也不按 dispose 清空恢复缓存;缓存统一受 profile 级 LRU 上限约束。
756
769
 
757
770
  插件卸载:
758
771
 
@@ -20,11 +20,15 @@
20
20
  - Pane active/history/pending/inactive/batch 列表窗口化;store 走 summary + 分页 query,旧 Host 保留 full-watch fallback。
21
21
  - queryItems/queryProposals/queryChanges 的 facets、validity filter、filter digest、revision-bound cursor 和响应
22
22
  字节上限;`objectiveProposals` 独立 cursor 和字节上限。
23
- - message proposal 的选择器、正文范围、kind 和 projection digest;Change Set canonical preview digest/
23
+ - message proposal 的选择器、可编辑正文、kind 和 projection digest;编辑后的正文使用 manual provenance;Change Set canonical preview digest/
24
24
  `PREVIEW_MISMATCH`;proposedRequires 支持 batch-candidate 和同 Change Set 接受顺序;fork 重置 validity 并重映射
25
25
  proposedRequires/evidence;bootstrap active item dedupe;来源派生的 origin。
26
26
  - Evidence Integrity/Fact Validity:registered validator、owner-only、文件大小/总字节/总时长/并发边界、
27
27
  timeout/权限/不可读→unknown、正文变更→stale、结果不进 standing prompt;v1 verification→v2 validity 映射。
28
+ - Change Set 的 §6.5 依赖冲突确认:`dependencyConflictDiff` 标出新增/加重的 conflict,Pane 列出受影响交付物并要求
29
+ 两步确认;wire 上为 optional 字段,不影响既有 preview/summary digest。
30
+ - 依赖关系图形区:Workspace 执行依赖卡片内的客户端透镜,语义列表始终常驻且为权威操作面;图形区不提供列表
31
+ 之外的独有能力,编辑仍只产生 Change Set ops。实现与 W0 门禁见依赖图设计文档。
28
32
  - source registry 按 source kind/projectionVersion 复算 message/compaction/agent-tool projection;Review/query 面
29
33
  使用同一投影上下文并展示 batch integrity;未知投影返回 unsupported,缺 digest 返回 missing,不把“有 digest”当作
30
34
  intact。message selection 以 trim 后正文为 canonicalization 基准;agent source 不绑定会在 accept 时剥离的
@@ -35,7 +39,7 @@
35
39
  - fork source integrity 为 `unsupported`:child record 不保存父来源投影;fork typed refs 已保留但完整复算需要父记录。
36
40
  fork 将 validity 结论重置为 `unassessed`,保留 evidence/source 引用;不会把父 Session 的有效性结论带入 child。
37
41
  - `charter_propose` 的 requires 仍只解析当前 active deliverable IDs;agent batch-candidate 引用暂不支持。
38
- - message proposal 目前只接受真实 user message,不支持 assistant/tool 消息选择。
42
+ - message proposal 只接受真实 user message;选中正文会预填到可编辑框,保存前可自由修改。
39
43
  - Pane 仍一次取回全部分页(渲染已窗口化),网络层分页/窗口化仍是优化项。
40
44
  - queryProposals 的 review 过滤是 batch 级命中,响应保留该 batch 的全部 candidate;这是当前契约,不是 candidate 级过滤。
41
45
  - 真实 Gateway 授权/配额、Desktop ABI/Plugins UI、可访问性/触屏/200% 文本、真实模型 compaction、512 条性能人工
@@ -59,6 +63,7 @@
59
63
  4. 关系采用少量明确类型,不建设任意节点都能连线的通用图。
60
64
  5. 历史、时间、来源和诊断元数据不进入常驻 prompt。
61
65
  6. 模型只能读取当前契约和提出 proposal,不能接受提案、改变依赖、归档条目或切换当前重点。
66
+ 7. 恢复使用 Host 维护的归档快照:每 Session 最近 5 份、profile 全局最多 25 份,最旧优先清理;下载导出只用于外部校验、分析或备份,恢复不依赖下载。
62
67
 
63
68
  本文建议首个依赖模型只覆盖 deliverable 的 `requires`。该新增范围需要先修订版本路线,再形成实现承诺。
64
69
  约束适用范围 `appliesTo` 和用户控制的 Focus 作为后续实验项,只有受控 A/B 显示收益后才进入稳定契约。
@@ -504,6 +509,18 @@ UI 组合规则固定为:`done/cancelled → terminal`,但仍单独显示 pr
504
509
 
505
510
  结构非法会使整个 Change Set 失败。`dependency-conflict` 反映用户记录的实际状态,不自动回写 progress,也不把记录判为
506
511
  损坏;Change Set 必须醒目标出新增或加重的 conflict,并要求用户确认。`charter_propose` 不能确认或直接制造这类冲突。
512
+
513
+ **实现状态(2026-11-10)**:上面这条确认要求此前只在 `charter_propose` 侧生效,Pane 的 Change Set 并没有标注
514
+ 新增/加重的 conflict,Apply 一次点击就会提交。现已补齐:
515
+
516
+ - `dependencyConflictDiff(before, after)`(`src/core/dependencies.ts`)按 §6.5 的 1–2 条规则比较**冲突前置的数量**,
517
+ 输出 `added`(原本不是 conflict,现在成为 conflict;新条目记 `before: 'absent'`)与 `worsened`(两侧都是 conflict,
518
+ 但冲突前置数增加)。只比较 active dependency graph(`accepted + current`),因此 pending/superseded 条目不误报。
519
+ - `planChangeSet` 输出 `PlannedChangeSet.dependencyConflicts`,Host `previewChangeSet` 透传,wire 上是 **optional**
520
+ 字段:老 Host 的帧仍能解码,新字段也不参与 `summaryDigest` / `changeSetPreviewDigest` 的输入,既有 digest 不变。
521
+ - Pane 用同一个纯函数在本地算出冲突(不等预览往返),在 Change Set 面板列出受影响交付物(`D<n>` + 摘要 +
522
+ 冲突前置数变化),Apply 变为**两步确认**:第一次点击只把按钮改成"仍要应用(N 处冲突)",第二次才提交;
523
+ 暂存批次一变(含 unstage)确认态即失效,`unknown outcome` 与写锁期间无法用 `Esc` 绕过。
507
524
  首版不允许 inactive prerequisite,避免 prompt 中出现无法用局部标签引用的历史节点,也避免 restore 后恢复出悬空关系。
508
525
 
509
526
  ### 6.6 `appliesTo` 实验
@@ -1082,7 +1099,7 @@ predicate-based 批量写入。Host 计算的 canonical summary digest 与客户
1082
1099
  | `applyChangeSet` | owner / user | 复用 op 级授权;purge 和等价不可逆清除仍为 owner-only |
1083
1100
  | `runValidators` | owner-only | 先检查 principal、Session resource、validator capability 和 workspace 权限,再读取文件或 storage |
1084
1101
  | `charter_propose` | 当前 live Session 的 agent tool call | 使用 pending-only 专用 handler,不复用 owner/user edit 权限 |
1085
- | export / initialize / restore | owner-only | 保持现有维护授权和 healthy-target 拒绝规则 |
1102
+ | export / initialize / restore / listArchives / readArchive | owner-only | 保持现有维护授权和 healthy-target 拒绝规则;归档缓存读取与导出同级 |
1086
1103
 
1087
1104
  `runValidators` 是一个 RPC 内的两阶段协议:先在已授权 workspace 上 evaluation,生成 validator version、input digest 和
1088
1105
  结构化结果;再在 mutation queue 内重读 base revision 和 input binding,以一个 durable Change Set 提交整批结果。Evaluation
@@ -6,7 +6,7 @@ English | [中文](version-roadmap.zh.md)
6
6
  >
7
7
  > **Status:** Active — version and scope authority.
8
8
  > **Version scope:** 0.1 history and current 0.2 development line.
9
- > **Baseline:** 2026-10-30; current development line `0.2.0` (no `rc` suffixes from 0.2.0 onward).
9
+ > **Baseline:** 2026-11-06; current line `0.2.1` is a post-`0.2.0` release candidate (plain increments, no `rc`).
10
10
  > **Authority:** Chinese [version-roadmap.zh.md](version-roadmap.zh.md) is normative for scope.
11
11
  > **Supersedes / Superseded by:** none / none
12
12
 
@@ -23,6 +23,7 @@ The release path is:
23
23
  → 0.1.0 stable
24
24
  → 0.1.1 only if stable needs a compatible patch
25
25
  → 0.2.0 development → 0.2.0
26
+ → 0.2.1 post-0.2.0 UI/diagnostics/recovery-cache patch
26
27
  ```
27
28
 
28
29
  **`0.1.0-rc.6`** is published and formally accepted; its GitHub Release uses recovery tag `v0.1.0-rc.6-republished`. **`0.1.0-rc.5`** is the previous accepted release and its canonical GitHub tag/release is pending restoration. `0.1.1-rc.1` remains a post-stable patch spelling, not another rc.6.
@@ -35,14 +36,13 @@ rc.5 fixed the correctness defect inside the promised 0.1 workflow: previously e
35
36
 
36
37
  ## 2. Current Release State
37
38
 
38
- - The latest published version is `0.1.0-rc.6`; npm `latest` and `next` point to it, and it passed formal acceptance.
39
- Its GitHub Release uses recovery tag `v0.1.0-rc.6-republished`; the exact artifact digest is in `SHA256SUMS`.
40
- - rc.5 is the previous accepted npm release; its canonical GitHub tag/release is pending restoration.
41
- - rc.4 remains a historical published compatibility patch and is immutable.
42
- - `main` contains the token-publish workflow used by the remaining promotion path. Published rc.4 history is
43
- never rewritten.
44
- - Active development: `0.2.0` on `feat/0.2.0-workspace`; no tag/Release/npm publication exists. From `0.2.0`
45
- onward package versions use plain increments and never an `rc` suffix.
39
+ - `0.2.1` is published on npm (`latest`/`next`) and as GitHub Release `v0.2.1`; its tag, assets, and npm bytes
40
+ are immutable.
41
+ - `0.2.0` is the previous public release.
42
+ - `0.2.1` is a compatible post-`0.2.0` patch: editable message proposals, clearer diagnostics/typography, and an
43
+ owner-only bounded recovery cache. It does not change `recordSchemaVersion` 2 or the model tool surface; the
44
+ `dsh_charter_archives_v1` domain is a bounded derivative cache, not a second authority.
45
+ - `0.1.0-rc.6` remains the previous public release. Historical rc tags and releases are immutable.
46
46
 
47
47
  ## 3. Why rc.5
48
48
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **状态:** Active — 版本与范围权威。
6
6
  > **版本范围:** 0.1 历史与当前 0.2 开发线。
7
- > **基准:** 2026-10-30;当前开发线 `0.2.0`(从 0.2.0 起不使用 `rc` 后缀)。
7
+ > **基准:** 2026-11-11;`0.2.1` 已发布;`0.2.2` 为依赖图与 §6.5 冲突确认补丁的候选线(普通递增,不使用 `rc` 后缀)。
8
8
  > **权威:** 中文版本为 scope 的 normative。
9
9
  > **替代/被替代:** 无 / 无
10
10
 
@@ -21,6 +21,8 @@
21
21
  → 0.1.0 stable
22
22
  → 0.1.1(仅在 stable 后确有兼容补丁时)
23
23
  → 0.2.0 开发线 → 0.2.0
24
+ → 0.2.1:0.2.0 之后的 UI、诊断与恢复缓存补丁
25
+ → 0.2.2:依赖关系图形视图 + §6.5 冲突确认(纯客户端补丁线)
24
26
  ```
25
27
 
26
28
  **`0.1.0-rc.5`** 已发布到 npm,是最新发布版本;其规范 GitHub tag/release 待恢复。**`0.1.0-rc.6`** 在验收前
@@ -34,19 +36,12 @@ rc.5 修复了与产品承诺冲突的审阅正确性问题:此前历史草案
34
36
 
35
37
  ## 2. 当前发布状态
36
38
 
37
- ### 2.1 已发布版本
38
-
39
- - 最新已发布版本是 `0.1.0-rc.6`;npm `latest` 和 `next` 指向 rc.6,并已正式验收。GitHub Release 使用
40
- recovery tag `v0.1.0-rc.6-republished`;精确产物 digest 记录在根 `SHA256SUMS`。
41
- - rc.5 是上一个已验收 npm 版本;规范 GitHub tag/release 待恢复。
42
- - rc.4 是历史发布和不可变的 compatibility-only patch。
43
-
44
- ### 2.2 rc.5 候选
45
-
46
- - rc.5 已实现、candidate 全绿并发布到 npm;规范 GitHub tag/release 待恢复,发布后检查仍需完成。
47
- 发布后检查仍待完成。
48
- - rc.6 已通过验收并发布;GitHub Release 使用 recovery tag `v0.1.0-rc.6-republished`。
49
- - `main` 已包含剩余 promotion 路径使用的 token 发布 workflow。已发布的 rc.4 历史永不改写。
39
+ - `0.2.1` 已发布到 npm(`latest`/`next`)和 GitHub Release `v0.2.1`;tag、资产和 npm 字节不可变。
40
+ - `0.2.2` 为当前候选线:依赖关系图形视图(纯客户端,不改 record/Remote/prompt)与 §6.5 冲突确认。
41
+ - `0.2.0` 是上一公开版本。
42
+ - `0.2.1` 是 `0.2.0` 之后的兼容补丁:可编辑消息提案、更清晰的诊断/排版、owner-only 有界恢复缓存。不改变
43
+ `recordSchemaVersion` 2 或模型工具面;`dsh_charter_archives_v1` 是有界派生物缓存,不是第二正本。
44
+ - `0.1.0-rc.6` 仍是上一个公开版本。历史 rc tag/release 不可变。
50
45
 
51
46
  ## 3. 为什么是 rc.5
52
47
 
@@ -437,6 +432,14 @@ v1 item/proposal 的来源映射:可证明的 fork 保留 fork 引用;其余
437
432
 
438
433
  alpha 阶段允许 schema 调整,但每次都要提供测试 fixture 迁移;beta 起冻结持久化与 Remote 主契约;rc 起冻结功能。
439
434
 
435
+ ### 14.1 `0.2.2` 新增范围:依赖关系图形视图与 §6.5 确认
436
+
437
+ 范围严格限定在客户端展示层与既有 §6.5 正确性修复:新增客户端关系图语义/几何纯函数、Workspace 图形区与
438
+ inspector、中英 locales、客户端测试,以及 Change Set 的新增/加重依赖冲突标注和两步确认。不改 record schema、
439
+ 迁移、fork、Host service、Remote/wire(预览字段为 optional)、prompt 投影与字节,不改 `engines.dsh`/peer
440
+ ranges/`dshReleases`。对里程碑的影响:不新增人工门禁类别,但新增客户端布局/渲染性能与图形区无障碍证据;
441
+ 沿用 §5.7 与既有 W0/W2 验收方式。W0/真实浏览器门禁未通过则本范围整体退出 0.2.2,不拆分半成品进版本。
442
+
440
443
  ## 14. 0.2.0 非目标
441
444
 
442
445
  - 不增加 decision/environment 等新 item kind。
@@ -503,3 +506,4 @@ alpha 阶段允许 schema 调整,但每次都要提供测试 fixture 迁移;
503
506
  | `0.1.0` | rc.5 稳定化与发布状态收敛 | 新功能 |
504
507
  | `0.1.1` | stable 后兼容 bug/security/DSH/a11y patch | 新持久状态、新 API、新工作流 |
505
508
  | `0.2.0` | 四个产品支柱、record v2、查询面、三中心 UI、架构重构 | 通用记忆、执行策略、任意 validator、无必要的新 domain |
509
+ | `0.2.2` | 客户端依赖关系图形视图、§6.5 conflict 确认、预览 optional 字段 | 新 record schema/domain、新 Remote 方法、模型可见能力变更、图形独有能力 |
@@ -1,14 +1,14 @@
1
1
  # dsh-charter 0.2.0
2
2
 
3
- > **Status:** Release candidate — publication pending the protected promotion gate.
3
+ > **Status:** Released 2026-11-05 — npm and GitHub Release published.
4
4
  > **Version scope:** `0.2.0`
5
5
  > **Baseline:** 2026-11-05
6
6
  > **Authority:** [version roadmap](../design/version-roadmap.md); [verification](../verification.md) for evidence.
7
- > **Supersedes / Superseded by:** none / pending.
7
+ > **Supersedes / Superseded by:** none / none.
8
8
 
9
- `0.2.0` is the workspace, constraint-relationship, evidence, and release-process upgrade. It is currently a
10
- release candidate on `feat/0.2.0-workspace`; no tag or npm publication exists yet. Publication uses the
11
- protected candidate/promotion workflow. Functional boundaries are listed in the workspace design.
9
+ `0.2.0` is the workspace, constraint-relationship, evidence, and release-process upgrade. It is published as
10
+ npm `dsh-charter@0.2.0` (`latest` and `next`) and GitHub Release `v0.2.0`. Functional boundaries are listed in
11
+ the workspace design.
12
12
 
13
13
  ## Status
14
14
 
@@ -18,8 +18,8 @@ protected candidate/promotion workflow. Functional boundaries are listed in the
18
18
  `rc` suffix.
19
19
  - Source acceptance: strict TypeScript, build/smoke, 36 files / 434 tests, and the nine-version DSH
20
20
  compatibility matrix pass on the current tree.
21
- - Release acceptance still requires the optional real Desktop/browser diagnostics, real-model compaction, performance, and
22
- remaining manual gates recorded in [verification](../verification.md).
21
+ - Post-release diagnostics (real Desktop/browser checks, real-model compaction, performance) remain recorded in
22
+ [verification](../verification.md); they do not change the immutable published bytes.
23
23
 
24
24
  ## Added
25
25
 
@@ -0,0 +1,58 @@
1
+ # dsh-charter 0.2.1
2
+
3
+ > **Status:** Released 2026-11-06 — npm and GitHub Release published.
4
+ > **Version scope:** `0.2.1`
5
+ > **Baseline:** 2026-11-06
6
+ > **Authority:** [version roadmap](../design/version-roadmap.md); [verification](../verification.md) for evidence.
7
+ > **Supersedes / Superseded by:** `0.2.0` / none.
8
+
9
+ `0.2.1` is the post-`0.2.0` patch for the message-proposal form, diagnostics presentation, Pane typography, and
10
+ bounded recovery cache. It is published as npm `dsh-charter@0.2.1` (`latest` and `next`) and GitHub Release
11
+ `v0.2.1`.
12
+
13
+ ## Status
14
+
15
+ - Package version: `0.2.1`.
16
+ - DSH compatibility: unchanged from `0.2.0`; all nine declared versions are matrix targets.
17
+ - Record schema: unchanged (`recordSchemaVersion: 2`); the new `dsh_charter_archives_v1` domain is a bounded,
18
+ owner-only recovery derivative, not a second authority.
19
+ - Source acceptance: strict TypeScript, build/smoke, 36 files / 441 tests, and the nine-version compatibility
20
+ matrix; candidate and promotion workflows passed.
21
+ - Local acceptance and real Web/Desktop ABI passed on 2026-11-06.
22
+ - Post-release: real-model compaction PASS (post-compaction `charter_read` recorded); 512-item core
23
+ read/planning performance PASS (p95 5.2 ms / 0.6 ms). See [verification](../verification.md).
24
+
25
+ ## Added
26
+
27
+ - Editable message proposals. Selecting a user message fills an editable body; the old character-range inputs are
28
+ removed. Edited proposals use manual provenance and reject non-human actors.
29
+ - Owner-only recovery cache with `listArchives`/`readArchive` Remote methods. Snapshots are bounded to five per
30
+ Session and 25 per profile, evicted oldest-first.
31
+ - Diagnostics form for fact validity with explicit target, method, path, and expectation fields; evidence
32
+ integrity is a separate action and explanation.
33
+
34
+ ## Changed
35
+
36
+ - Review and recovery forms share one field-label, helper-text, and card-description hierarchy.
37
+ - Pane header uses the lighter `dsh-context` title scale, compact metadata, and a flat divider instead of a hero
38
+ card.
39
+ - Recovery lists cached snapshots directly; download is an independent export/audit operation. Local JSON import
40
+ remains an advanced path.
41
+ - README/README.zh describe the current 0.2.1 capabilities and carry a current Pane screenshot.
42
+
43
+ ## Fixed
44
+
45
+ - Message proposal and diagnostics state reset across Sessions.
46
+ - Proposal-batch source integrity survives the same-revision transition from an accepted Host view to the query
47
+ view.
48
+ - Recovery cache survives Host restart; Session disposal no longer deletes it, and profile-wide LRU bounds stale
49
+ entries.
50
+ - Restore labels distinguish cached recovery from imported files.
51
+
52
+ ## Upgrade notes
53
+
54
+ - Existing `0.2.0` records are read without migration. The archive-cache domain is created lazily and is optional;
55
+ if it cannot open, the primary record and ordinary editing remain available.
56
+ - `listArchives` and `readArchive` require the same owner-only maintenance capability as export/restore.
57
+ - Health records still refuse restore; cached snapshots are offered only for `absent-unconfirmed` or `invalid`
58
+ targets.
@@ -0,0 +1,60 @@
1
+ # dsh-charter 0.2.2
2
+
3
+ > **Status:** Development candidate — source accepted locally; release acceptance, promotion, tag, and npm publication pending.
4
+ > **Version scope:** `0.2.2`
5
+ > **Baseline:** 2026-11-11
6
+ > **Authority:** [version roadmap](../design/version-roadmap.md); [verification](../verification.md) for evidence.
7
+ > **Supersedes / Superseded by:** none / none.
8
+
9
+ `0.2.2` adds a dependency-graph workspace view and closes the existing §6.5 dependency-conflict confirmation
10
+ gap. It is a client-focused patch: no record schema, migration, Host service, Remote wire, or prompt-projection
11
+ change.
12
+
13
+ ## Status
14
+
15
+ - Package version: `0.2.2` (development candidate; not published).
16
+ - DSH compatibility: unchanged; the nine declared versions passed the final-tree matrix on 2026-11-11
17
+ (Node `v22.23.1`, pnpm `12.3.4`, source `f9d93c0`, 475/475 tests each).
18
+ - Record schema: unchanged (`recordSchemaVersion: 2`); no new storage domain, Remote method, or model-visible
19
+ capability.
20
+ - Source acceptance: strict TypeScript, build/smoke, 37 files / 475 tests, dependency-graph product tests, and
21
+ package smoke.
22
+ - Bundle budget: `gzip -9 -c lib/client.js` 113,990 → 130,474 B (+16,484 B), within the `<40 KB` budget; raw
23
+ bytes are diagnostic only.
24
+ - Artifact: `dsh-charter-0.2.2.tgz` (98 files, SHA-256 `032cb9048d5068f70243364f9ad60cdab6fef015e984d8bee2b1e8496fdc0651`),
25
+ exact-artifact package/recovery smokes passed; an isolated fresh Web profile installed and booted it.
26
+ - Pending: user's fresh-profile/Desktop ABI and Pane interaction acceptance, W0-1/2/3, real AT, forced colors,
27
+ reduced motion, 200% text scaling, 512-item UI performance re-record, promotion. See [verification](../verification.md).
28
+
29
+ ## Added
30
+
31
+ - **Dependency graph in Workspace.** Local ego view with execution, candidate, and replacement-history lanes,
32
+ synchronized with the always-present semantic list.
33
+ - **Bounded isolated fallback.** Contracts without dependency edges show a grid of at most 20 execution nodes and
34
+ a short “add a prerequisite” hint; larger unlinked contracts hide the graph with an isolated-specific message.
35
+ - **Keyboard graph contract.** One Tab stop, arrow/`[`/`]` traversal, Enter for details, Escape to close and
36
+ return toward the list, and a skip link to the semantic list.
37
+ - **Dependency-conflict confirmation.** A Change Set that adds or worsens a dependency conflict lists affected
38
+ deliverables and requires a second Apply confirmation.
39
+ - **Compact prerequisite editing and windowing.** Each dependency row is a summary; its checkbox editor is opened
40
+ on demand. The list renders 50 rows at a time with a “show more” path.
41
+
42
+ ## Changed
43
+
44
+ - The dependency list no longer renders a native multi-select with up to 511 options per row.
45
+ - Graph and list edits produce byte-identical `deliverable.requires` Change Set ops; Apply remains the only
46
+ commit point.
47
+ - Dense graph views degrade in order: hide replacement history, reduce depth, then hide the graph with a reason.
48
+
49
+ ## Fixed
50
+
51
+ - Graph-to-list and graph-to-proposal focus paths expand the visible window before moving focus.
52
+ - Dependency summaries show local `D<n>` keys rather than internal item ids.
53
+ - Edge keys include the relation kind so matching requires/supersedes endpoints cannot collide.
54
+
55
+ ## Upgrade notes
56
+
57
+ - Existing `0.2.1` records need no migration.
58
+ - The graph is a view over the existing relationship data; it is not a second source of truth.
59
+ - A dependency conflict still allows an explicit user override after the two-step confirmation; the graph never
60
+ changes progress or lifecycle automatically.
@@ -4,8 +4,7 @@
4
4
  > **Version scope:** all release notes.
5
5
  > **Authority:** [version roadmap](../design/version-roadmap.md).
6
6
 
7
- The latest published release is [0.1.0-rc.6](0.1.0-rc.6.md). [0.2.0](0.2.0.md) is the current development candidate
8
- (not published); [0.1.0-rc.5](0.1.0-rc.5.md) is the previous accepted release.
7
+ The latest published release is [0.2.1](0.2.1.md). [0.2.2](0.2.2.md) is the current development candidate; [0.2.0](0.2.0.md) is the previous public release; [0.1.0-rc.6](0.1.0-rc.6.md) precedes it.
9
8
 
10
9
  Published release history is summarized in [CHANGELOG.md](../../CHANGELOG.md) and remains available through the
11
10
  immutable Git tags and GitHub Releases. Older per-release note files were removed during the rc.5 documentation
package/docs/releasing.md CHANGED
@@ -10,12 +10,12 @@ This is the current release checklist. It replaces the older per-rc staging note
10
10
  Releases, and npm versions are immutable: never move a tag, delete a published release, or rebuild bytes after
11
11
  tagging.
12
12
 
13
- ## Current state (2026-11-05)
13
+ ## Current state (2026-11-06)
14
14
 
15
- - **Published:** `0.1.0-rc.6` — latest public npm release; exact artifact SHA-256
16
- `21ddbea0ae3fd88994d4e4731429ef4d8cb75db2b97e83cd7530a0386e425825`.
17
- - **Release candidate:** `0.2.0` merged locally to `main`; target tag `v0.2.0`.
18
- - **Pending:** main-branch candidate workflow and promotion workflow.
15
+ - **Published:** `0.2.1` — npm `latest`/`next`, GitHub Release `v0.2.1`; exact artifact SHA-256
16
+ `d4ae14e19b4d65264a53b57c0f9d3f93eb8303189e8daa3f3f35beb97104d498`.
17
+ - **Previous release:** `0.2.0` (GitHub Release `v0.2.0`, npm `latest`/`next` before 0.2.1).
18
+ - **Post-release diagnostics:** real-model compaction and 512-item core performance both passed.
19
19
  - Do not manually publish or bypass the protected gates.
20
20
 
21
21
  ## 1. Prepare the source
@@ -24,11 +24,16 @@ tagging.
24
24
  plan. No unplanned feature should enter a release candidate.
25
25
  2. Update every metadata site in one change: `package.json` version, `engines.dsh`, peer ranges,
26
26
  `dsh.compatibility.dshReleases`, `package-lock.json`, README/README.zh, compatibility docs,
27
- verification, CHANGELOGs, release notes, and root `SHA256SUMS`.
27
+ verification, CHANGELOGs, release notes, and root `SHA256SUMS`. Before the candidate is built, refresh
28
+ README/README.zh with the latest capabilities and the current Pane screenshots from the accepted build; stale
29
+ README copy or screenshots block the release.
28
30
  3. Run `npm ci`, `npm run check`, and the normal `npm run smoke:package`.
29
31
  4. Run the compatibility regression over every declared DSH version and probe untracked `next`/`latest`
30
32
  versions. A missing, peer-drifted, or untested version blocks release.
31
- 5. Run the local gates on a local non-`main` branch. Merge into local `main` linearly, then push `main`. Do not push development branches; the remote keeps only `main`. Keep the worktree free of secrets, user records, and `.tmp` artifacts.
33
+ 5. Run the local gates on a local non-`main` branch and build the acceptance tarball/profile. Perform local human
34
+ acceptance against that exact build. Only after acceptance, merge into local `main` linearly, then push
35
+ `main`. Do not push development branches; the remote keeps only `main`. Keep the worktree free of secrets,
36
+ user records, and `.tmp` artifacts.
32
37
 
33
38
  ## 2. Build the candidate bytes once
34
39
 
@@ -9,12 +9,12 @@
9
9
  这是当前发布清单,取代早期按 rc 编写的暂存说明。已发布的 tag、GitHub Release 和 npm 版本不可变:不移动
10
10
  tag、不删除已发布 Release、不在打 tag 后重建字节。
11
11
 
12
- ## 当前状态(2026-11-05)
12
+ ## 当前状态(2026-11-06)
13
13
 
14
- - **已发布:** `0.1.0-rc.6` — 当前 npm 公开发布版本;精确产物 SHA-256
15
- `21ddbea0ae3fd88994d4e4731429ef4d8cb75db2b97e83cd7530a0386e425825`。
16
- - **发布候选:** `0.2.0` 已本地合入 `main`;目标 tag `v0.2.0`。
17
- - **待完成:** main 分支 candidate workflow 和 promotion workflow。
14
+ - **已发布:** `0.2.1` — npm `latest`/`next`,GitHub Release `v0.2.1`;精确产物 SHA-256
15
+ `d4ae14e19b4d65264a53b57c0f9d3f93eb8303189e8daa3f3f35beb97104d498`。
16
+ - **上一版本:** `0.2.0`(GitHub Release `v0.2.0`,0.2.1 之前的 npm `latest`/`next`)。
17
+ - **发布后诊断:** 真实模型 compaction 和 512 条 core 性能均已通过。
18
18
  - 不得手动 publish,也不得绕过受保护门禁。
19
19
 
20
20
  ## 1. 准备源码
@@ -22,11 +22,14 @@ tag、不删除已发布 Release、不在打 tag 后重建字节。
22
22
  1. 确认范围符合[版本路线](design/version-roadmap.zh.md)和当前稳定化计划;候选版本不夹带计划外功能。
23
23
  2. 在同一次修改中更新全部元数据:`package.json` version、`engines.dsh`、peer ranges、
24
24
  `dsh.compatibility.dshReleases`、`package-lock.json`、README/README.zh、兼容文档、验证记录、
25
- CHANGELOG、release notes 和根 `SHA256SUMS`。
25
+ CHANGELOG、release notes 和根 `SHA256SUMS`。构建候选字节前,必须把 README/README.zh 更新到当前最新能力,
26
+ 并用已验收构建重新生成 Pane 截图;README 文案或截图过期会阻断发布。
26
27
  3. 运行 `npm ci`、`npm run check` 和普通 `npm run smoke:package`。
27
28
  4. 对每个声明 DSH 版本跑兼容回归,并 probe 未跟踪的 `next`/`latest` 版本;缺失、peer drift 或未验证版本
28
29
  阻断发布。
29
- 5. 在本地非 `main` 分支跑完门禁,线性合入本地 `main`,再推送 `main`。不要推送开发分支;远程只保留 `main`。工作树不得包含 secrets、用户记录或 `.tmp` 产物。
30
+ 5. 在本地非 `main` 分支跑完门禁并构建验收 tarball/profile,对该精确构建做本地人工验收。验收确认后,
31
+ 再线性合入本地 `main` 并推送 `main`。不要推送开发分支;远程只保留 `main`。工作树不得包含 secrets、
32
+ 用户记录或 `.tmp` 产物。
30
33
 
31
34
  ## 2. 只构建一次候选字节
32
35
 
@@ -3,8 +3,8 @@
3
3
  English | [中文](user-guide.zh.md)
4
4
 
5
5
  > **Status:** Active — current operating record.
6
- > **Version scope:** current development line.
7
- > **Baseline:** 2026-11-03
6
+ > **Version scope:** `0.2.2` release candidate.
7
+ > **Baseline:** 2026-11-11
8
8
 
9
9
  This guide is for installing and using the plugin. For design constraints see the
10
10
  [design specification](design/charter-design-v1.md); for version differences see the
@@ -13,7 +13,7 @@ This guide is for installing and using the plugin. For design constraints see th
13
13
  ## 1. Before installing
14
14
 
15
15
  ```bash
16
- dsh --version # >= 0.1.7-rc.2; 0.2.0-rc.1+ recommended
16
+ dsh --version # a compatibility-matrix version; 0.2.2-rc.1 recommended
17
17
  node --version # ^22.19.0 || >=24.0.0
18
18
  dsh --profile web --dump-config | grep -n "charter" || true
19
19
  ```
@@ -27,24 +27,23 @@ For a Web or Desktop profile the plugin registers:
27
27
 
28
28
  ## 2. Install
29
29
 
30
- > **Install channels.** The latest published release is `0.2.0` (npm `latest`/`next`), formally accepted. Its GitHub Release uses
31
- > recovery tag `v0.2.0-republished`; the canonical 0.2.0 tag/release remains pending restoration. Install the
32
- > published rc.6 exact version for normal use.
30
+ > **Install channels.** The latest published release is `0.2.1` (npm `latest`/`next`). The `0.2.2` candidate is
31
+ > installed from its local acceptance tarball until promotion.
33
32
 
34
33
  ### 2.1 Requirements
35
34
 
36
35
  - DSH: only the versions listed in the [compatibility matrix](design/compatibility.md) are supported
37
36
  (`0.1.7-rc.2`, `0.2.0-rc.1`/`rc.2`, `0.2.1-rc.1`/`rc.2`/`rc.3`/`rc.4`/`0.2.0`, `0.2.2-rc.1`); newer stable/release versions are not
38
- claimed until the matrix is extended. `0.2.1+` is required for per-Peer Remote resource authorization. DSH
39
- `0.2.1-0.2.0` is supported by the published rc.6 artifact; the 0.2.0 artifact does not declare it.
37
+ claimed until the matrix is extended. `0.2.1+` is required for per-Peer Remote resource authorization.
38
+
40
39
  - Node.js **`^22.19.0 || >=24.0.0`**.
41
40
  - A Web or Desktop profile.
42
41
 
43
42
  ### 2.2 Offline / local tarball fallback
44
43
 
45
44
  ```bash
46
- npm pack dsh-charter@0.2.0
47
- dsh plugin --profile web add ./dsh-charter-0.2.0.tgz
45
+ npm pack dsh-charter@0.2.1
46
+ dsh plugin --profile web add ./dsh-charter-0.2.1.tgz
48
47
  ```
49
48
 
50
49
  For Desktop, use the Plugins page if local import is available; otherwise install the tarball through the Desktop
@@ -54,12 +53,12 @@ dependency is a local `file:` path. Prefer npm install in §2.3 when the registr
54
53
  ### 2.3 npm / Registry install (recommended) — Web profile by version or tag
55
54
 
56
55
  ```bash
57
- dsh plugin --profile web add dsh-charter@0.2.0 # exact 0.2.0 release target
58
- dsh plugin --profile web add dsh-charter@next # currently 0.1.0-rc.6 until promotion
56
+ dsh plugin --profile web add dsh-charter@0.2.1 # latest published exact version
57
+ dsh plugin --profile web add ./dsh-charter-0.2.2.tgz # local 0.2.2 candidate
59
58
  ```
60
59
 
61
- The latest published release remains `0.1.0-rc.6` until the protected `0.2.0` promotion completes. Use the exact
62
- `0.2.0` target after promotion; before that, use the candidate tarball from the release PR. npm `next`/`latest` move
60
+ The latest published release is `0.2.1`. Use the exact `0.2.2` target after promotion; before that, use the
61
+ candidate tarball from the release PR. npm `next`/`latest` move
63
62
  together on a stable promotion (npm keeps a `latest` tag and the project chooses where it points; this is our policy,
64
63
  not an npm requirement). Use the offline tarball fallback only when the registry is unreachable or for
65
64
  candidate verification. Pin an explicit version for reproducible profiles.
@@ -69,7 +68,7 @@ dependency and bundle selection:
69
68
 
70
69
  ```json
71
70
  {
72
- "dependencies": { "dsh-charter": "0.2.0" },
71
+ "dependencies": { "dsh-charter": "0.2.1" },
73
72
  "dsh": { "profile": { "bundles": ["...", "dsh-charter"] } }
74
73
  }
75
74
  ```
@@ -90,10 +89,13 @@ short record digest, and over-budget flag.
90
89
 
91
90
  - **Export** downloads the complete record archive (identity, current snapshot, bounded history, mutation and
92
91
  maintenance receipts). The archive contains your charter text and is sensitive.
93
- - **Recovery** accepts a local JSON archive only (never a URL or Host path). The Pane validates the outer envelope,
94
- file size (`maxRecoveryBytes`), Session, and lifecycle, previews health/revision/lifecycle/digest, and requires a
95
- second confirmation before the Host revalidates and writes anything. Restore is offered only for an
96
- `absent-unconfirmed` or `invalid` target; a healthy record cannot be overwritten.
92
+ - **Recovery** lists the latest five archives cached by the Host; the Pane previews health/revision/lifecycle/digest
93
+ and requires a second confirmation before the Host revalidates and writes anything. No download is needed.
94
+ Restore is offered only for an `absent-unconfirmed` or `invalid` target; a healthy record cannot be overwritten.
95
+ - **Advanced import** accepts a local JSON archive only (never a URL or Host path), for archives exported from
96
+ another machine or kept before the cache existed. The same validation and confirmation gates apply.
97
+ - The download is for external analysis, auditing, or backup; it is independent from restore. A downloaded
98
+ archive is not required to recover.
97
99
  - **Explicit empty initialization** is available for `absent-unconfirmed` and requires a destructive second
98
100
  confirmation, because an unreadable outer document also appears absent.
99
101
  - `write-uncertain` means a storage write may or may not have landed. Restart the Host so it reloads the medium; the
@@ -209,6 +211,28 @@ Editing and history-draft extraction require the Session to be live in the curre
209
211
  Session upgrades the tab to editable. `charter.bootstrap` therefore returns `not-live` rather than reading
210
212
  another process's event log.
211
213
 
214
+ ### 3.7 Dependency graph
215
+
216
+ The Workspace dependency card has two synchronized parts:
217
+
218
+ - a graph area showing execution, candidate, and replacement-history lanes;
219
+ - a compact semantic list that remains the authoritative editing surface.
220
+
221
+ The graph is a lens, not a second store. Adding or removing a prerequisite in the graph stages the same
222
+ `deliverable.requires` Change Set operation as the list; **Apply** remains the only commit point.
223
+
224
+ Keyboard and fallback behavior:
225
+
226
+ - `Tab` enters the graph once; `↑/↓/←/→` move through dependency relations and `[`/`]` walk every visible node
227
+ and edge; `Enter` opens details and `Esc` closes details or returns toward the list.
228
+ - The skip link moves focus directly to the semantic list.
229
+ - With no dependency edges, a bounded grid of isolated nodes is shown with an “add a prerequisite” hint.
230
+ - If there are too many isolated nodes or navigable graph elements, the graph is hidden and the list remains.
231
+
232
+ When a Change Set introduces or worsens a dependency conflict, Review/Apply lists the affected deliverables and
233
+ requires a second confirmation before Apply. The graph displays the same conflict state; it does not auto-change
234
+ progress or lifecycle.
235
+
212
236
  ## 4. Configuration
213
237
 
214
238
  Defaults live in `cordis.patch.yml`. Override the same keys in the profile's `cordis.patch.yml`:
@@ -271,7 +295,9 @@ record ceiling is shown in **Context**.
271
295
 
272
296
  ## 5. Data and privacy
273
297
 
274
- - Authority: the `sessions` table in the `dsh_charter_v1` domain, one record per Session.
298
+ - Authority: the `sessions` table in the `dsh_charter_v1` domain, one record per Session. Recovery snapshots live
299
+ in the bounded owner-only `archives` table of the `dsh_charter_archives_v1` domain (at most five per Session,
300
+ oldest-first eviction, and at most 25 across the profile).
275
301
  - The record contains the objective, items, derived `promptText`/digest, recent history, and mutation receipts.
276
302
  - The record is bound to `createdAt`, `cwd`, and `parentSession`; reusing a Session id with a different
277
303
  lifecycle rejects reads and overwrites.
@@ -328,8 +354,8 @@ After uninstalling:
328
354
  - reinstalling reads the same record for the same Session.
329
355
 
330
356
  UI Purge is **per-item only**: it cannot remove the objective, the record identity/revision, or a whole Session
331
- record. To delete charter data permanently, stop DSH and remove the corresponding `dsh_charter_v1` domain
332
- record (or the whole profile storage directory) after verifying the path.
357
+ record. To delete charter data permanently, stop DSH and remove both the corresponding `dsh_charter_v1` record and
358
+ its `dsh_charter_archives_v1` cache entries (or the whole profile storage directory) after verifying the path.
333
359
 
334
360
  ## 9. Development
335
361