dsh-charter 0.2.2 → 0.3.0
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 +31 -1
- package/CHANGELOG.zh.md +29 -1
- package/README.md +58 -43
- package/README.zh.md +49 -37
- package/docs/README.md +5 -4
- package/docs/README.zh.md +6 -3
- package/docs/assets/charter-graph-0.3.0.zh.png +0 -0
- package/docs/assets/charter-pane-0.3.0.png +0 -0
- package/docs/assets/charter-pane-0.3.0.zh.png +0 -0
- package/docs/design/charter-design-v1.md +2 -2
- package/docs/design/charter-design-v1.zh.md +2 -2
- package/docs/design/charter-gui-v1.zh.md +868 -0
- package/docs/design/charter-workspace-v2.zh.md +13 -1
- package/docs/design/compatibility.md +22 -6
- package/docs/design/compatibility.zh.md +21 -6
- package/docs/design/mockups/README.md +29 -0
- package/docs/design/mockups/mockup-graph.html +152 -0
- package/docs/design/mockups/mockup-home-clean.html +146 -0
- package/docs/design/mockups/mockup-home-dirty.html +191 -0
- package/docs/design/mockups/mockup.css +425 -0
- package/docs/design/mockups/style-tile.html +146 -0
- package/docs/design/mockups/tokens.css +670 -0
- package/docs/design/version-roadmap.md +28 -10
- package/docs/design/version-roadmap.zh.md +28 -8
- package/docs/release-notes/0.2.2.md +5 -5
- package/docs/release-notes/0.3.0.md +66 -0
- package/docs/release-notes/README.md +1 -1
- package/docs/releasing.md +5 -4
- package/docs/releasing.zh.md +5 -4
- package/docs/user-guide.md +9 -10
- package/docs/user-guide.zh.md +8 -10
- package/docs/verification.md +76 -9
- package/docs/verification.zh.md +66 -9
- package/lib/client/ChangeSetPanel.d.ts +24 -0
- package/lib/client/DependencyGraph.d.ts +1 -1
- package/lib/client/DiagnosticsPage.d.ts +5 -0
- package/lib/client/ReviewCenterPage.d.ts +5 -0
- package/lib/client/SectionNav.d.ts +14 -0
- package/lib/client/WorkspacePage.d.ts +5 -0
- package/lib/client/change-set-model.d.ts +55 -0
- package/lib/client/draft-store.d.ts +1 -1
- package/lib/client/locales.d.ts +32 -1
- package/lib/client/page-order.d.ts +26 -0
- package/lib/client/pane-format.d.ts +48 -0
- package/lib/client/pane-scope.d.ts +382 -0
- package/lib/client/pane-ui.d.ts +39 -0
- package/lib/client/section-routing.d.ts +12 -0
- package/lib/client/use-change-set-sheet.d.ts +13 -0
- package/lib/client.js +3678 -3125
- package/lib/host/types.d.ts +6 -1
- package/lib/index.js +1 -1
- package/lib/remote.js +1 -1
- package/lib/{service-MsIACddZ.js → service-DO3Q9uB2.js} +4 -2
- package/lib/version.d.ts +1 -1
- package/package.json +23 -18
package/docs/verification.zh.md
CHANGED
|
@@ -3,24 +3,25 @@
|
|
|
3
3
|
[English](verification.md) | 中文
|
|
4
4
|
|
|
5
5
|
> **状态:** Active — 当前操作记录。
|
|
6
|
-
> **版本范围:** `0.2.2
|
|
6
|
+
> **版本范围:** `0.2.2`,2026-11-11 已发布。
|
|
7
7
|
> **基准:** 2026-11-11
|
|
8
8
|
|
|
9
|
-
验证日期:2026-11-11。当前源码版本:`0.2.2
|
|
9
|
+
验证日期:2026-11-11。当前源码版本:`0.2.2`(2026-11-11 已发布)。本文件是当前证据记录;历史逐提交的叙事保留在 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.
|
|
12
|
+
环境:macOS,Node `v22.23.1`,npm `12.0.2`,pnpm `12.3.4`。本地 DSH 开发基线:`0.2.2-rc.2`(当前 npm
|
|
13
13
|
`next`)。
|
|
14
14
|
|
|
15
15
|
## 1. 当前结论
|
|
16
16
|
|
|
17
17
|
当前发布状态(2026-11-11):
|
|
18
18
|
|
|
19
|
-
- 已发布:`0.2.
|
|
20
|
-
- `0.2.
|
|
19
|
+
- 已发布:`0.2.2`(npm `latest`/`next`;精确 SHA-256 `ccb094342ceda030b77c2c3555bc2838ee8a4f6ef2efe4f1ac80a9d39fca7875`)。GitHub Release `v0.2.2` 已公开且不可变。
|
|
20
|
+
- `0.2.1`:上一公开版本;GitHub Release `v0.2.1` 保持不可变。
|
|
21
|
+
- `0.2.0`:更早的公开版本;GitHub Release `v0.2.0` 保持不可变。
|
|
21
22
|
- `0.1.0-rc.6`:更早的公开版本;使用 recovery tag `v0.1.0-rc.6-republished`。
|
|
22
23
|
- 从 0.2.0 起版本号使用普通递增,不使用 `rc` 后缀。
|
|
23
|
-
- 当前源码证据:0.2.2
|
|
24
|
+
- 当前源码证据:0.2.2 最终树在源码提交 `f9d93c0` 上通过 37 个测试文件 / 475 个测试;九版本矩阵在该树上 475/475 通过(Node `v22.23.1` / pnpm `12.3.4`,证据 `.tmp/0.2.2-final-matrix2.json`)。
|
|
24
25
|
- 发布后诊断:真实模型 compaction PASS(session `session-da7e7b0d-f0b0-49a2-8391-148b4782892c`);512 条性能于 2026-11-06 PASS(core read/planning p95,见下)。
|
|
25
26
|
|
|
26
27
|
| 项目 | 结果 |
|
|
@@ -35,8 +36,9 @@ tarball 和抓取内容位于 `.tmp/`,不进入发布包。
|
|
|
35
36
|
| 真实 `TypertGatewayService` | 精确 artifact 在隔离的 DSH `0.2.1-rc.3` / `rc.4` 依赖图上通过 |
|
|
36
37
|
| 兼容 sentinel | `0.1.7-rc.2`、`0.2.1-rc.2`、`0.2.1-rc.4`、`0.2.1-rc.5`、`0.2.2-rc.1` 通过 |
|
|
37
38
|
| Fresh Web profile matrix (historical rc.6) | PASS:历史 rc.6 artifact 曾在 DSH `0.1.7-rc.2`、`0.2.0-rc.2`、`0.2.1-rc.2`、`0.2.1-rc.4`、`0.2.1-rc.5` 上安装并启动 |
|
|
38
|
-
| Fresh Web 0.2.2 | 2026-11-05 PASS:全新 `DSH_HOME` + `dsh@0.2.2-rc.1 plugin --profile web add` 安装 `dsh-charter-0.2.0.tgz`(SHA-256 `fde5531d457effc713f4423f8b46c8f0e591770e59c55e19956f000c11bdeffc`);Web 启动、页面 HTTP 200、charter bundle HTTP 200;boot graph 含 `dsh-charter`,页面 index 含 `dsh-charter/client.js` |
|
|
39
|
-
| 0.2.2
|
|
39
|
+
| Fresh Web(历史 0.2.2 DSH / 0.2.0 插件) | 2026-11-05 PASS:全新 `DSH_HOME` + `dsh@0.2.2-rc.1 plugin --profile web add` 安装 `dsh-charter-0.2.0.tgz`(SHA-256 `fde5531d457effc713f4423f8b46c8f0e591770e59c55e19956f000c11bdeffc`);Web 启动、页面 HTTP 200、charter bundle HTTP 200;boot graph 含 `dsh-charter`,页面 index 含 `dsh-charter/client.js` |
|
|
40
|
+
| 0.2.2 promotion | 2026-11-11 PASS:候选 run `43024720739`(C `51789db`),checksum-only C+1 `d65a4d6`,promotion run `43026165062`;npm `latest`/`next` 均为 `0.2.2`,GitHub Release `v0.2.2` 已公开并带 tarball、`SHA256SUMS`、`release-evidence.json`。 |
|
|
41
|
+
| 0.2.2 精确 artifact smoke | 2026-11-11 PASS:已发布 `dsh-charter-0.2.2.tgz`(98 个文件,SHA-256 `ccb094342ceda030b77c2c3555bc2838ee8a4f6ef2efe4f1ac80a9d39fca7875`);package smoke 在空 consumer 中安装精确字节,packed recovery smoke 的 export/restore/两次重启/故障检查全部通过。 |
|
|
40
42
|
| 九版本全量 rerun | tracked `compat-matrix --versions all --allow-new-release` 通过(每版本 475/475) |
|
|
41
43
|
| 未跟踪 `0.2.2-alpha.2` probe | strict-peer install fails because DSH requires Cordis ~4.0.6-alpha.1 while rc.6 pins 4.0.5; no tests run;rc.6 明确不支持 |
|
|
42
44
|
| 本地 Web + Desktop profile | 0.2.0 开发 artifact 已装入本地 web/desktop profile;Desktop app 为 `0.2.2-rc.1`,真实 Electron ABI/交互仍需人工门禁 |
|
|
@@ -47,10 +49,65 @@ tarball 和抓取内容位于 `.tmp/`,不进入发布包。
|
|
|
47
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/人工门禁仍待完成。 |
|
|
48
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 不作为预算口径。 |
|
|
49
51
|
|
|
52
|
+
## 1.2 0.3.0 GUI 开发候选(未发布,待本地人工验收)
|
|
53
|
+
|
|
54
|
+
- 分支 `feat/0.3.0-gui`;W6 实现提交 `f3ac8f2`/`2ad1df3`/`bb576cd`/`840d202` 及后续文档提交已完成,审计时工作树干净。**未推送/未合并/未 tag/未发布**,无 0.3.0 可用性声明。
|
|
55
|
+
- 源码门禁(2026-11-12):`npm run check` = 39 文件 / **492 测试** PASS(typecheck、build、remote/client
|
|
56
|
+
smoke、Vitest、token gate);`npm run verify:ui-metrics -- --gate=css|ia` PASS。
|
|
57
|
+
- 度量记录(W1/W2/W4):CSS gate — 字号档 6、字重 3、颜色字面量 0、非 token 圆角 0、非 token shadow 0、
|
|
58
|
+
padding 9、gap 8、`!important` 0;IA gate — 旧 objective 卡片 0、旧 overview/stat/budget 0、`goSection` 滚动/聚焦
|
|
59
|
+
yes、操作条仅 dirty yes;final gate PASS。隔离 profile 与 CDP 矩阵均在已安装 livery 层
|
|
60
|
+
(`body[data-dsh-livery]` 存在)下采集暗/亮两套;没有第二个 livery preset 可做更广抽查。记录:
|
|
61
|
+
`.tmp/gui-acceptance/2026-11-12/livery-spotcheck.md`。
|
|
62
|
+
- Token 覆盖审计(W0):`charter.css` 使用的 41 个静态 host token 在全部 10 个声明 DSH 版本的
|
|
63
|
+
`@deepseek-ai/dsh-client-ui-theme` 中均有定义;`--dsh-content-font-size` 带 `14px` fallback;兼容块有意为空。
|
|
64
|
+
门禁:`npm run verify:tokens`。
|
|
65
|
+
- 真实浏览器证据(把新 bundle 通过 CDP 注入已安装 Web Host;除特别说明外**不等于**已安装 artifact):
|
|
66
|
+
320/375/560/850/1440 多宽度、明/暗、forced-colors、reduced-motion、page-scale 2x;AX tree 命名 region、
|
|
67
|
+
无嵌套 `main`、无空名按钮、命名 dialog;真实宿主滚动/焦点路由与窄屏 sheet Escape/focus restore。
|
|
68
|
+
- 隔离 profile 证据:当前树的 WIP artifact 曾安装到 `DSH_HOME=/tmp/dsh-w4-home`,安装后 `lib/client.js`
|
|
69
|
+
hash 与仓库 build 一致;该开发包曾命名为 `dsh-charter-0.2.2.tgz`,因与已发布不可变 0.2.2 的
|
|
70
|
+
artifact/digest 冲突,**审查后已删除**。今后 dev pack 必须先 bump 版本(如 `0.3.0`)再打包。
|
|
71
|
+
- 本地验收部署(2026-11-12):W6 验收构建为 `dist/dsh-charter-0.3.0-w6-final.tgz`
|
|
72
|
+
(SHA-256 `ab74591c…`,client `986f8403…`)。已安装到本地 `web` 与 `desktop` profile,包版本 `0.3.0`,
|
|
73
|
+
`engines.dsh` 为有界 0.2 线范围。另按用户要求恢复 Pane 页头版本 chip(`v0.3.0`)。
|
|
74
|
+
- Desktop 热更新(2026-11-12,纠正):Desktop **不需要**退出重开来加载重建后的 `dsh-charter` bundle。在已安装
|
|
75
|
+
profile 下,对 profile 依赖做替换后,CDP 驱动的 `127.0.0.1:51452` 页面无需刷新即完成 Pane 替换:bundle
|
|
76
|
+
probe 在 **824ms** 出现,CSS probe 在 **402ms** 生效,最终 bundle+CSS 在 **886ms** 生效。两次替换中
|
|
77
|
+
`.charter-tabs__tab` 始终为 3,`style[data-plugin-css="dsh-charter/charter.css"]` 始终为 1 个,版本 chip 与
|
|
78
|
+
Pane 保持挂载,页面无异常。路径为 Host profile 重组 + client bundle HMR;仅插件变更无需重启 Host。
|
|
79
|
+
- 依赖图 disclosure 文案(2026-11-12):执行路径折叠时显示“展开依赖图”,展开后显示“收起依赖图”;已实测关闭 → 展开 → 再关闭,section 无重复。
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
- 最终构建矩阵(2026-11-13):基于已安装 `w6-final` artifact(client `986f8403…`),重采 Review Center 的
|
|
83
|
+
320/375/560/850/1440 × 暗/亮 × 中/英共 20 张,并采 Diagnostics 850/1440 两张;每张均满足
|
|
84
|
+
`documentElement.scrollWidth == clientWidth`、3 个 `charter-tabs__tab`、Pane 已挂载。证据:
|
|
85
|
+
`.tmp/gui-acceptance/2026-11-13/matrix-final/`。这替换了 Review/Diagnostics 子集的旧 W6 前矩阵;另从合成暂存行重采了最终构建的脏态与依赖图各一张(1440)。
|
|
86
|
+
空/已应用/冲突状态与冻结稿并排对照仍缺。
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
- 最终构建专项证据(2026-11-13):从 `w6-final` 在 1440 重采 forced-colors、reduced-motion 与 page-scale-2 截图;Pane 已挂载、无横向溢出、3 个 tabs,媒体模拟命中。证据:`.tmp/gui-acceptance/2026-11-13/final-special/`。page-scale-2 是缩放代理,不等于完整 200% 文本布局、键盘或 AT 走查。
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
- 机械并排对照(2026-11-13):`.tmp/gui-acceptance/2026-11-13/side-by-side/` 下用冻结稿与 `w6-final` 构建合成了 dirty/graph 两张对照图;这是参考材料,不等于人工并排评审,empty/applied/conflict 截图仍缺。
|
|
93
|
+
|
|
94
|
+
- 十版本源码矩阵(2026-11-12):全部声明版本 `0.1.7-rc.2` … `0.2.2-rc.2` 通过 typecheck、build 与测试;
|
|
95
|
+
因 rc.2 仍在 pnpm 24 小时 `minimumReleaseAge` 窗口内,矩阵以 `--allow-new-release` 运行;已生成并跟踪 rc.2
|
|
96
|
+
的兼容 lockfile。证据:`.tmp/compat-matrix-0.3.0.json`。
|
|
97
|
+
- 兼容范围策略:`engines.dsh` 现为 `0.1.7-rc.2 || >=0.2.0-rc.1 <0.3.0-0`。DSH 以 `includePrerelease` 求值,
|
|
98
|
+
且存在 `engines.dsh` 时忽略 peers 做准入,因此未来 0.2.x prerelease 无需插件重新发版即可安装;`0.3.x` 被排除。
|
|
99
|
+
精确的 peer/`dshReleases` 列表仍是十版本矩阵已验证支持集;新版本先由 `compat-matrix --discover` 探测再加入。
|
|
100
|
+
- Pane 页面级拆分(2026-11-12):`CharterPane.tsx` 3459 → 1842 行;新增 `WorkspacePage`/`ReviewCenterPage`/
|
|
101
|
+
`DiagnosticsPage` 与生成的 `pane-scope.ts`;共享 `pane-format`/`pane-ui`;真实浏览器 v0.3.0 三区域路由验证;
|
|
102
|
+
492 测试 + final gate PASS。
|
|
103
|
+
- W6 文档感视觉冻结(2026-11-12):下划线 tabs 取代左侧纵向导航;≥1100 为 720px 文档列 + 280px Change Set rail;section/行解剖、36px 虚线空态、40/16/16 skeleton、单行 notice、quietlink、暂存 inset 语言与 px 几何依赖图(184px 节点、三层解剖、legend、紧凑 inspector)已落地。`charter.css` 现消费 41 个已审计静态 host token;`npm run check` 39 文件 / 492 测试 PASS;`verify:ui-metrics -- --gate=final` PASS。CDP 注入截图:`.tmp/gui-acceptance/2026-11-12/ux-after-workspace-1440.png`、`w6-dirty-1440.png`、`w6-graph-1440.png` 与九节点重叠回归 `w6-graph-9nodes.png`、`w6-review-1440.png`、`w6-diagnostics-1440.png`。CDP 视口实测:320/850/1440 的 root/document 横向溢出均为 0;图形区在 320/850 隐藏、1440 可见;用户字号 10/14/22 下节点文本 scrollWidth/clientWidth 与 scrollHeight/clientHeight 相等(无裁切)。冻结稿并排与人工验收仍待完成。
|
|
104
|
+
- 发布前仍需人工/环境证据:fresh-profile Host+Session Pane、Desktop 窗口、真实 screen reader、真实 200%
|
|
105
|
+
文本布局、zh/en 切换、livery 抽查记录,以及 W1–W6 全部人工验收。
|
|
106
|
+
|
|
50
107
|
## 2. 本地基线
|
|
51
108
|
|
|
52
109
|
```bash
|
|
53
|
-
npm run check
|
|
110
|
+
npm run check # typecheck + build + remote/client smoke + Vitest + token gate
|
|
54
111
|
npm run smoke:package
|
|
55
112
|
npm run smoke:package -- --artifact <tgz> --sha256 SHA256SUMS
|
|
56
113
|
node scripts/verify/recovery-smoke.mjs --artifact <tgz> --sha256 SHA256SUMS
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
+
import type { CharterOp } from '../core/schemas.js';
|
|
3
|
+
import { type ChangeSetConflictRow, type ChangeSetDiffContext } from './change-set-model.js';
|
|
4
|
+
import { CHARTER_LOCALE_NS } from './locales.js';
|
|
5
|
+
type Translate = TranslateNS<typeof CHARTER_LOCALE_NS>;
|
|
6
|
+
export interface ChangeSetPanelProps {
|
|
7
|
+
readonly t: Translate;
|
|
8
|
+
readonly headingId: string;
|
|
9
|
+
/** Ops are rendered in draft order; each row can be unstaged independently. */
|
|
10
|
+
readonly ops: readonly CharterOp[];
|
|
11
|
+
readonly stagedOps: number;
|
|
12
|
+
readonly promptBefore: string;
|
|
13
|
+
readonly promptAfter: string;
|
|
14
|
+
readonly itemsBefore: number;
|
|
15
|
+
readonly itemsAfter: number;
|
|
16
|
+
readonly editorOpen: boolean;
|
|
17
|
+
readonly conflicts: readonly ChangeSetConflictRow[];
|
|
18
|
+
readonly diffContext: ChangeSetDiffContext;
|
|
19
|
+
readonly canUnstage: boolean;
|
|
20
|
+
readonly hint?: string;
|
|
21
|
+
readonly onUnstage: (op: CharterOp) => void;
|
|
22
|
+
}
|
|
23
|
+
export declare function ChangeSetPanel({ t, headingId, ops, stagedOps, promptBefore, promptAfter, itemsBefore, itemsAfter, editorOpen, conflicts, diffContext, canUnstage, hint, onUnstage, }: ChangeSetPanelProps): JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -16,4 +16,4 @@ 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
|
-
export declare function DependencyGraph({ layout, model, focusId, activeKey,
|
|
19
|
+
export declare function DependencyGraph({ layout, model, focusId, activeKey, showSupersedes, editable, onFocus, onActiveKey, onShowSupersedes, onStageRequires, onLocateList, onProposal, t, }: DependencyGraphProps): JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
+
import type { CharterSection } from './draft-store.js';
|
|
3
|
+
import { CHARTER_LOCALE_NS } from './locales.js';
|
|
4
|
+
type Translate = TranslateNS<typeof CHARTER_LOCALE_NS>;
|
|
5
|
+
export type CharterArea = 'workspace' | 'review' | 'diagnostics';
|
|
6
|
+
export interface SectionNavProps {
|
|
7
|
+
readonly t: Translate;
|
|
8
|
+
readonly area: CharterArea;
|
|
9
|
+
readonly totalPending: number;
|
|
10
|
+
readonly onNavigate: (section: CharterSection) => void;
|
|
11
|
+
}
|
|
12
|
+
/** Underline tabs for the three real Pane routes. */
|
|
13
|
+
export declare function SectionNav({ t, area, totalPending, onNavigate }: SectionNavProps): JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { DependencyConflictDiff } from '../core/dependencies.js';
|
|
2
|
+
import type { CharterOp } from '../core/schemas.js';
|
|
3
|
+
export type ChangeSetOpCategory = 'objective' | 'item' | 'lifecycle' | 'proposal' | 'verification';
|
|
4
|
+
export interface ChangeSetConflictRow {
|
|
5
|
+
readonly key: string;
|
|
6
|
+
readonly text: string;
|
|
7
|
+
readonly kind: 'added' | 'worsened';
|
|
8
|
+
readonly before: number;
|
|
9
|
+
readonly after: number;
|
|
10
|
+
}
|
|
11
|
+
export interface ChangeSetConflictContext {
|
|
12
|
+
readonly dependencyPlan: readonly {
|
|
13
|
+
readonly id: string;
|
|
14
|
+
readonly localKey: string;
|
|
15
|
+
}[];
|
|
16
|
+
readonly projectedItems: readonly {
|
|
17
|
+
readonly id: string;
|
|
18
|
+
readonly text: string;
|
|
19
|
+
}[];
|
|
20
|
+
}
|
|
21
|
+
export declare function opCategory(op: CharterOp): ChangeSetOpCategory;
|
|
22
|
+
export declare function opText(op: CharterOp): string | null;
|
|
23
|
+
/** Whether the Pane can map this op back to a single draft target. */
|
|
24
|
+
export declare function opCanBeUnstaged(op: CharterOp): boolean;
|
|
25
|
+
export declare function buildChangeSetConflicts(diff: DependencyConflictDiff, context: ChangeSetConflictContext): readonly ChangeSetConflictRow[];
|
|
26
|
+
export interface ChangeSetDiffContext {
|
|
27
|
+
readonly objectiveBefore: string | null;
|
|
28
|
+
readonly objectiveAfter: string | null;
|
|
29
|
+
readonly itemsBefore: readonly {
|
|
30
|
+
readonly id: string;
|
|
31
|
+
readonly text: string;
|
|
32
|
+
}[];
|
|
33
|
+
readonly projectedItems: readonly {
|
|
34
|
+
readonly id: string;
|
|
35
|
+
readonly text: string;
|
|
36
|
+
}[];
|
|
37
|
+
}
|
|
38
|
+
export interface ChangeSetDiffLabel {
|
|
39
|
+
readonly key: string;
|
|
40
|
+
readonly params?: Readonly<Record<string, string | number>>;
|
|
41
|
+
}
|
|
42
|
+
export interface ChangeSetOpDiff {
|
|
43
|
+
readonly before: string | null;
|
|
44
|
+
readonly after: string | null;
|
|
45
|
+
/** Localized label for states/Progress; the Pane renders it via t(). */
|
|
46
|
+
readonly afterLabel?: ChangeSetDiffLabel;
|
|
47
|
+
}
|
|
48
|
+
/** Per-op before→after labels for the rail; null means "not applicable". */
|
|
49
|
+
export declare function opDiff(op: CharterOp, context: ChangeSetDiffContext): ChangeSetOpDiff;
|
|
50
|
+
export interface ChangeSetOpGroup {
|
|
51
|
+
readonly category: ChangeSetOpCategory;
|
|
52
|
+
readonly ops: readonly CharterOp[];
|
|
53
|
+
}
|
|
54
|
+
/** Stable grouping for the rail: category order is fixed, op order is draft order. */
|
|
55
|
+
export declare function groupChangeSetOps(ops: readonly CharterOp[]): readonly ChangeSetOpGroup[];
|
|
@@ -7,7 +7,7 @@ import type { CharterBootstrapProposal, 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';
|
|
10
|
-
export type CharterSection = 'overview' | 'objective' | 'invariants' | 'deliverables' | 'history' | 'context' | 'recovery';
|
|
10
|
+
export type CharterSection = 'overview' | 'objective' | 'invariants' | 'deliverables' | 'history' | 'context' | 'recovery' | 'diagnostics';
|
|
11
11
|
export type DraftEditor = {
|
|
12
12
|
readonly kind: 'objective';
|
|
13
13
|
} | {
|
package/lib/client/locales.d.ts
CHANGED
|
@@ -2,13 +2,14 @@ import type { LocaleDictOf } from '@deepseek-ai/dsh-client-ui-slots';
|
|
|
2
2
|
export declare const CHARTER_LOCALE_NS = "dsh-charter";
|
|
3
3
|
declare const en: {
|
|
4
4
|
readonly tab: "Charter";
|
|
5
|
-
readonly 'header.title': "
|
|
5
|
+
readonly 'header.title': "Session charter";
|
|
6
6
|
readonly 'header.subtitle': "Compaction rewrites history. Your commitments don't.";
|
|
7
7
|
readonly 'stats.revision': "rev {revision}";
|
|
8
8
|
readonly 'overview.afterApply': "After Apply";
|
|
9
9
|
readonly 'stats.afterApply': "{active} active / {stored} stored after Apply";
|
|
10
10
|
readonly 'stats.context': "{bytes} B context";
|
|
11
11
|
readonly 'stats.budget': "{used} / {limit} charter context";
|
|
12
|
+
readonly 'stats.budgetDelta': "{before} → {after} / {limit}";
|
|
12
13
|
readonly 'status.loading': "Loading charter...";
|
|
13
14
|
readonly 'status.unavailable': "Charter is unavailable.";
|
|
14
15
|
readonly 'status.notReady': "Charter is not ready.";
|
|
@@ -55,12 +56,32 @@ declare const en: {
|
|
|
55
56
|
readonly 'nav.recoveryHelp': "Export, restore, or explicitly initialize this Session's stored Charter record.";
|
|
56
57
|
readonly 'changeset.kicker': "Change Set";
|
|
57
58
|
readonly 'changeset.title': "Pending changes";
|
|
59
|
+
readonly 'changeset.open': "Review pending changes";
|
|
60
|
+
readonly 'changeset.close': "Close change set";
|
|
58
61
|
readonly 'changeset.ops': "{count} staged operations";
|
|
62
|
+
readonly 'changeset.promptShort': "Prompt bytes";
|
|
63
|
+
readonly 'changeset.itemsShort': "Items";
|
|
59
64
|
readonly 'changeset.prompt': "Model prompt after Apply: {used} / {limit}";
|
|
60
65
|
readonly 'changeset.promptDelta': "Prompt bytes: {before} → {after}";
|
|
61
66
|
readonly 'changeset.itemsDelta': "Items: {before} → {after}";
|
|
62
67
|
readonly 'changeset.editorOpen': "An inline editor is open";
|
|
63
68
|
readonly 'changeset.conflicts': "This Change Set introduces or worsens {count} dependency conflict(s)";
|
|
69
|
+
readonly 'changeset.unstage': "Unstage";
|
|
70
|
+
readonly 'changeset.op.unknown': "Change";
|
|
71
|
+
readonly 'changeset.state.accepted': "accepted";
|
|
72
|
+
readonly 'changeset.state.rejected': "rejected";
|
|
73
|
+
readonly 'changeset.state.archived': "archived";
|
|
74
|
+
readonly 'changeset.state.restored': "restored";
|
|
75
|
+
readonly 'changeset.state.purged': "purged";
|
|
76
|
+
readonly 'changeset.state.verified': "verified";
|
|
77
|
+
readonly 'changeset.state.unchecked': "unverified";
|
|
78
|
+
readonly 'changeset.state.attested': "attested";
|
|
79
|
+
readonly 'changeset.prerequisites': "{count} prerequisite(s)";
|
|
80
|
+
readonly 'changeset.op.objective': "Objective";
|
|
81
|
+
readonly 'changeset.op.item': "Item";
|
|
82
|
+
readonly 'changeset.op.lifecycle': "Lifecycle";
|
|
83
|
+
readonly 'changeset.op.proposal': "Proposal";
|
|
84
|
+
readonly 'changeset.op.verification': "Verification";
|
|
64
85
|
readonly 'changeset.conflictAdded': "new conflict ({before} → {after} blocking prerequisites)";
|
|
65
86
|
readonly 'changeset.conflictWorsened': "worsened ({before} → {after} blocking prerequisites)";
|
|
66
87
|
readonly 'changeset.conflictHint': "{count} dependency conflict(s) — Apply needs your confirmation";
|
|
@@ -106,6 +127,7 @@ declare const en: {
|
|
|
106
127
|
readonly 'review.source.fork': "Fork proposal";
|
|
107
128
|
readonly 'review.source.legacy-unknown': "Legacy unknown source";
|
|
108
129
|
readonly 'deps.title': "Dependencies and readiness";
|
|
130
|
+
readonly 'deps.executionPath': "Execution path";
|
|
109
131
|
readonly 'deps.status.ready': "ready";
|
|
110
132
|
readonly 'deps.status.waiting': "waiting";
|
|
111
133
|
readonly 'deps.status.dependency-conflict': "dependency conflict";
|
|
@@ -115,11 +137,14 @@ declare const en: {
|
|
|
115
137
|
readonly 'deps.prerequisiteConflict': "prerequisite conflict";
|
|
116
138
|
readonly 'deps.conflict': "The staged dependency plan contains a cycle or invalid reference. Remove or change a prerequisite before Apply.";
|
|
117
139
|
readonly 'deps.graphTitle': "Dependency map";
|
|
140
|
+
readonly 'deps.expandGraph': "Expand dependency map";
|
|
141
|
+
readonly 'deps.collapseGraph': "Collapse dependency map";
|
|
118
142
|
readonly 'deps.graphFocus': "Focus";
|
|
119
143
|
readonly 'deps.graphDepth': "Depth";
|
|
120
144
|
readonly 'deps.depth1': "1 hop";
|
|
121
145
|
readonly 'deps.depth2': "2 hops";
|
|
122
146
|
readonly 'deps.showSupersedes': "Show replacements";
|
|
147
|
+
readonly 'deps.historyToggle': "History";
|
|
123
148
|
readonly 'deps.zoomIn': "Zoom in";
|
|
124
149
|
readonly 'deps.zoomOut': "Zoom out";
|
|
125
150
|
readonly 'deps.resetLayout': "Reset zoom";
|
|
@@ -156,11 +181,16 @@ declare const en: {
|
|
|
156
181
|
readonly 'deps.locateInGraph': "Locate in graph";
|
|
157
182
|
readonly 'deps.graphHint': "The graph never changes state by itself; edits are staged into the Change Set and Apply remains the only commit.";
|
|
158
183
|
readonly 'deps.help': "Keys and notes";
|
|
184
|
+
readonly 'deps.legendCommitted': "Solid = active dependency";
|
|
185
|
+
readonly 'deps.legendStaged': "Dashed = staged new dependency";
|
|
186
|
+
readonly 'deps.legendProposed': "Dotted = proposed dependency";
|
|
187
|
+
readonly 'deps.graphNote': "The graph is an enhancement; the semantic list stays authoritative. Nodes use fixed px geometry and two-line truncation.";
|
|
159
188
|
readonly 'deps.graphEmpty': "No dependencies yet. Drag one node onto another, or open a list row to add a prerequisite.";
|
|
160
189
|
readonly 'deps.graphIsolatedTooMany': "No dependencies yet. The isolated-node preview is hidden for this many rows; use the list.";
|
|
161
190
|
readonly 'deps.requiresSummary': "Prerequisites: {keys}";
|
|
162
191
|
readonly 'deps.noRequires': "No prerequisites";
|
|
163
192
|
readonly 'deps.editRequires': "Edit prerequisites";
|
|
193
|
+
readonly 'deps.stagedChanged': "Staged edit";
|
|
164
194
|
readonly 'deps.stagedAdded': "staged addition";
|
|
165
195
|
readonly 'deps.dropInvalidSelf': "A deliverable cannot depend on itself.";
|
|
166
196
|
readonly 'deps.dropInvalidDuplicate': "This prerequisite is already present.";
|
|
@@ -195,6 +225,7 @@ declare const en: {
|
|
|
195
225
|
readonly 'bootstrap.unavailable': "Charter storage is unavailable, so the history draft cannot be read.";
|
|
196
226
|
readonly 'notice.conflict': string;
|
|
197
227
|
readonly 'objective.kicker': "Objective";
|
|
228
|
+
readonly 'objective.originalLabel': "Initial objective";
|
|
198
229
|
readonly 'objective.empty': "No objective has been set.";
|
|
199
230
|
readonly 'objective.set': "Set objective";
|
|
200
231
|
readonly 'objective.redirect': "Redirect";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Explicit page reading order used by the flex stack. Extracted from the Pane so
|
|
3
|
+
* the Workspace/Review/Diagnostics order contract is unit-tested instead of
|
|
4
|
+
* living as inline numbers.
|
|
5
|
+
*/
|
|
6
|
+
export declare const PAGE_ORDER: {
|
|
7
|
+
readonly workspace: {
|
|
8
|
+
readonly objective: 10;
|
|
9
|
+
readonly invariants: 20;
|
|
10
|
+
readonly deliverables: 30;
|
|
11
|
+
readonly execution: 40;
|
|
12
|
+
};
|
|
13
|
+
readonly review: {
|
|
14
|
+
readonly batches: 10;
|
|
15
|
+
readonly itemProposals: 20;
|
|
16
|
+
readonly objectiveProposals: 30;
|
|
17
|
+
readonly messageProposal: 40;
|
|
18
|
+
readonly bootstrap: 50;
|
|
19
|
+
readonly objectiveHistory: 60;
|
|
20
|
+
readonly inactive: 70;
|
|
21
|
+
};
|
|
22
|
+
readonly diagnostics: {
|
|
23
|
+
readonly contextPreview: -1;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export type PageOrder = typeof PAGE_ORDER;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
+
import type { CharterErrorCode } from '../core/errors.js';
|
|
3
|
+
import type { CharterRecordArchive, DeliverableProgress } from '../core/schemas.js';
|
|
4
|
+
import type { CharterView } from '../host/types.js';
|
|
5
|
+
import type { BootstrapProblem, DraftFeedback } from './draft-store.js';
|
|
6
|
+
import type { DependencyConflictDiff } from '../core/dependencies.js';
|
|
7
|
+
import type { ProjectedItem } from './preview.js';
|
|
8
|
+
import { CHARTER_LOCALE_NS, type CharterLocaleKey } from './locales.js';
|
|
9
|
+
export type CharterText = TranslateNS<typeof CHARTER_LOCALE_NS>;
|
|
10
|
+
export interface ArchivePreview {
|
|
11
|
+
readonly fileName: string;
|
|
12
|
+
readonly archive?: CharterRecordArchive;
|
|
13
|
+
readonly errorKey?: string;
|
|
14
|
+
readonly errorParams?: Readonly<Record<string, string>>;
|
|
15
|
+
readonly health?: 'healthy' | 'schema-invalid' | 'consistency-invalid' | 'lifecycle-mismatch';
|
|
16
|
+
readonly revision?: number | null;
|
|
17
|
+
readonly lifecycle?: string | null;
|
|
18
|
+
readonly digest?: string;
|
|
19
|
+
readonly exportedAt?: number;
|
|
20
|
+
readonly sourceSession?: string;
|
|
21
|
+
readonly payloadDigestOk?: boolean;
|
|
22
|
+
readonly recordDigestOk?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare function formatBytes(t: CharterText, bytes: number): string;
|
|
25
|
+
/** Pretty-print the JSON body of the rendered prompt for reading; exact bytes remain available. */
|
|
26
|
+
export declare function formatCharterPreview(preview: string): string | null;
|
|
27
|
+
export declare function progressLabel(progress: DeliverableProgress | undefined, t: CharterText): string;
|
|
28
|
+
export declare function errorLabel(code: CharterErrorCode | string, t: CharterText): string;
|
|
29
|
+
export declare function textIssueMessage(issue: 'empty' | 'control' | 'surrogate', t: CharterText): string;
|
|
30
|
+
export declare function countLabel(t: CharterText, count: number, one: CharterLocaleKey, other: CharterLocaleKey): string;
|
|
31
|
+
/** Resolve a stable feedback descriptor against the current locale. */
|
|
32
|
+
export declare function feedbackText(feedback: DraftFeedback | null, t: CharterText): string | null;
|
|
33
|
+
export declare function feedbackDetail(feedback: DraftFeedback | null): string | undefined;
|
|
34
|
+
export declare function bootstrapProblemText(problem: BootstrapProblem | null, t: CharterText): string | null;
|
|
35
|
+
/** One exhaustive switch over the Host-derived record state. */
|
|
36
|
+
export declare function statusMessage(view: CharterView, t: CharterText): string | null;
|
|
37
|
+
export declare function itemState(item: ProjectedItem): 'done' | 'warning' | 'ongoing' | 'idle';
|
|
38
|
+
export declare const EMPTY_CONFLICT_DIFF: DependencyConflictDiff;
|
|
39
|
+
export declare function shortText(text: string, length?: number): string;
|
|
40
|
+
/** Render the lifecycle fingerprint as a compact, stable date label for the UI. */
|
|
41
|
+
export declare function lifecycleLabel(value: string | null | undefined): string;
|
|
42
|
+
/** Render an archive timestamp without ever throwing on hostile values. */
|
|
43
|
+
export declare function formatTimestamp(value: number | undefined): string;
|
|
44
|
+
/** Localized health label for an archive preview. */
|
|
45
|
+
export declare function archiveHealthLabel(health: 'healthy' | 'schema-invalid' | 'consistency-invalid' | 'lifecycle-mismatch', t: CharterText): string;
|
|
46
|
+
/** Byte budget of the value the Host will store (normalized, not raw input). */
|
|
47
|
+
export declare function normalizedBytes(value: string): number;
|
|
48
|
+
export declare function normalizedNonEmpty(value: string): boolean;
|