dsh-charter 0.2.1 → 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.
- package/CHANGELOG.md +32 -1
- package/CHANGELOG.zh.md +25 -1
- package/README.md +37 -21
- package/README.zh.md +27 -17
- package/docs/README.md +5 -2
- package/docs/README.zh.md +3 -2
- package/docs/assets/charter-pane.zh.png +0 -0
- package/docs/design/charter-dependency-graph-v1.zh.md +1101 -0
- package/docs/design/charter-workspace-v2.zh.md +16 -0
- package/docs/design/version-roadmap.md +2 -3
- package/docs/design/version-roadmap.zh.md +14 -4
- package/docs/release-notes/0.2.1.md +8 -6
- package/docs/release-notes/0.2.2.md +60 -0
- package/docs/release-notes/README.md +1 -2
- package/docs/releasing.md +4 -6
- package/docs/releasing.zh.md +4 -6
- package/docs/user-guide.md +36 -15
- package/docs/user-guide.zh.md +34 -13
- package/docs/verification.md +35 -29
- package/docs/verification.zh.md +30 -25
- package/lib/client/DependencyGraph.d.ts +19 -0
- package/lib/client/locales.d.ts +62 -6
- package/lib/client/relation-graph.d.ts +135 -0
- package/lib/client.js +1829 -206
- package/lib/core/change-set.d.ts +7 -0
- package/lib/core/dependencies.d.ts +29 -0
- package/lib/core.js +1 -1
- package/lib/{fork-D5HVDV1i.js → fork-KSL6sovw.js} +70 -1
- package/lib/host/types.d.ts +2 -0
- package/lib/index.js +2 -2
- package/lib/remote/wire.d.ts +37 -3
- package/lib/remote.js +23 -3
- package/lib/{service-CNjnvioR.js → service-MsIACddZ.js} +6 -3
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
package/docs/verification.zh.md
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
[English](verification.md) | 中文
|
|
4
4
|
|
|
5
5
|
> **状态:** Active — 当前操作记录。
|
|
6
|
-
> **版本范围:**
|
|
7
|
-
> **基准:** 2026-11-
|
|
6
|
+
> **版本范围:** `0.2.2` 开发候选。
|
|
7
|
+
> **基准:** 2026-11-11
|
|
8
8
|
|
|
9
|
-
验证日期:2026-11-
|
|
9
|
+
验证日期:2026-11-11。当前源码版本:`0.2.2`(开发候选,尚未发布)。本文件是当前证据记录;历史逐提交的叙事保留在 Git 历史和 Changelog。临时目录、profile、
|
|
10
10
|
tarball 和抓取内容位于 `.tmp/`,不进入发布包。
|
|
11
11
|
|
|
12
12
|
环境:macOS,Node `v22.23.1`,npm `12.0.2`,pnpm `12.3.4`。本地 DSH 开发基线:`0.2.2-rc.1`(当前 npm
|
|
@@ -14,33 +14,38 @@ tarball 和抓取内容位于 `.tmp/`,不进入发布包。
|
|
|
14
14
|
|
|
15
15
|
## 1. 当前结论
|
|
16
16
|
|
|
17
|
-
当前发布状态(2026-11-
|
|
17
|
+
当前发布状态(2026-11-11):
|
|
18
18
|
|
|
19
|
-
- 已发布:`0.2.
|
|
20
|
-
-
|
|
21
|
-
- `0.1.0-rc.6
|
|
19
|
+
- 已发布:`0.2.1`(npm `latest`/`next`;精确 SHA-256 `d4ae14e19b4d65264a53b57c0f9d3f93eb8303189e8daa3f3f35beb97104d498`)。GitHub Release `v0.2.1` 已公开且不可变。
|
|
20
|
+
- `0.2.0`:上一公开版本;GitHub Release `v0.2.0` 保持不可变。
|
|
21
|
+
- `0.1.0-rc.6`:更早的公开版本;使用 recovery tag `v0.1.0-rc.6-republished`。
|
|
22
22
|
- 从 0.2.0 起版本号使用普通递增,不使用 `rc` 后缀。
|
|
23
|
-
- 当前源码证据:0.2.
|
|
24
|
-
-
|
|
23
|
+
- 当前源码证据:0.2.2 最终候选树在源码提交 `f9d93c0` 上通过 37 个测试文件 / 475 个测试;九版本矩阵在该树上 475/475 通过(Node `v22.23.1` / pnpm `12.3.4`,证据 `.tmp/0.2.2-final-matrix2.json`)。
|
|
24
|
+
- 发布后诊断:真实模型 compaction PASS(session `session-da7e7b0d-f0b0-49a2-8391-148b4782892c`);512 条性能于 2026-11-06 PASS(core read/planning p95,见下)。
|
|
25
25
|
|
|
26
26
|
| 项目 | 结果 |
|
|
27
27
|
| --- | --- |
|
|
28
28
|
| TypeScript 严格检查 | 当前树通过 |
|
|
29
|
-
| Vitest |
|
|
29
|
+
| Vitest | 37 个测试文件 / 475 个测试通过(`npm test`,先 build) |
|
|
30
30
|
| Host ESM 构建 + 浏览器 factory bundle | 通过 |
|
|
31
31
|
| Remote 契约与 client smoke | 通过 |
|
|
32
32
|
| 普通 package smoke | 通过 |
|
|
33
|
-
| exact-artifact package smoke |
|
|
33
|
+
| exact-artifact package smoke | 对已发布 `0.2.1` `.tgz` 字节(`d4ae14e1…`)通过,不重建 |
|
|
34
34
|
| packed recovery smoke | 通过:export、删除 target、restore、receipt replay、两次 restart、健康目标拒绝、packed fault 子集 |
|
|
35
35
|
| 真实 `TypertGatewayService` | 精确 artifact 在隔离的 DSH `0.2.1-rc.3` / `rc.4` 依赖图上通过 |
|
|
36
36
|
| 兼容 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
37
|
| 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
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
|
-
|
|
|
39
|
+
| 0.2.2 精确 artifact smoke | 2026-11-11 PASS:`dsh-charter-0.2.2.tgz`(98 个文件,SHA-256 `032cb9048d5068f70243364f9ad60cdab6fef015e984d8bee2b1e8496fdc0651`);package smoke 在空 consumer 中安装精确字节,packed recovery smoke 的 export/restore/两次重启/故障检查全部通过。 |
|
|
40
|
+
| 九版本全量 rerun | tracked `compat-matrix --versions all --allow-new-release` 通过(每版本 475/475) |
|
|
40
41
|
| 未跟踪 `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 明确不支持 |
|
|
41
42
|
| 本地 Web + Desktop profile | 0.2.0 开发 artifact 已装入本地 web/desktop profile;Desktop app 为 `0.2.2-rc.1`,真实 Electron ABI/交互仍需人工门禁 |
|
|
42
43
|
| 真实浏览器恢复 | 受保护的人工 evidence gate;未自动化 |
|
|
43
44
|
| 真实模型 compaction | 2026-10-22 记录 PASS;仍是人工发布门禁 |
|
|
45
|
+
| 0.2.2 兼容矩阵 | 2026-11-11 PASS:源码 `f9d93c031eabfe5e44cf17e302729eb7093d7e94`,Node `v22.23.1` / pnpm `12.3.4`;九个声明 DSH 版本全部通过 typecheck、build 和 475/475 测试(`.tmp/0.2.2-final-matrix2.json`)。 |
|
|
46
|
+
| 0.2.2 全新 profile 安装 | 2026-11-11 PASS:隔离 `DSH_HOME=/tmp/dsh-charter-fresh-022-home` 初始化全新 Web profile,安装精确本地 `dsh-charter-0.2.2.tgz`;`dsh web` 提供 Pane 入口(HTTP 303 token redirect)。已验证 CLI/tarball 路径;Desktop、真实 Pane 交互和中英切换仍需人工。 |
|
|
47
|
+
| 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
|
+
| 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 不作为预算口径。 |
|
|
44
49
|
|
|
45
50
|
## 2. 本地基线
|
|
46
51
|
|
|
@@ -70,19 +75,19 @@ CI(`.github/workflows/ci.yml`)在 Node `22.19.0` / `24` 上运行 `npm run c
|
|
|
70
75
|
|
|
71
76
|
| DSH 版本 | 证据 |
|
|
72
77
|
| --- | --- |
|
|
73
|
-
| `0.1.7-rc.2` |
|
|
74
|
-
| `0.2.0-rc.1` |
|
|
75
|
-
| `0.2.0-rc.2` |
|
|
76
|
-
| `0.2.1-rc.1` |
|
|
77
|
-
| `0.2.1-rc.2` |
|
|
78
|
-
| `0.2.1-rc.3` |
|
|
79
|
-
| `0.2.1-rc.4` |
|
|
80
|
-
| `0.2.1-rc.5` |
|
|
81
|
-
| `0.2.2-rc.1` |
|
|
82
|
-
|
|
83
|
-
0.2.
|
|
84
|
-
`compat-matrix --versions all --allow-new-release
|
|
85
|
-
`.tmp/0.2.
|
|
78
|
+
| `0.1.7-rc.2` | 475/475 tracked matrix PASS |
|
|
79
|
+
| `0.2.0-rc.1` | 475/475 tracked matrix PASS |
|
|
80
|
+
| `0.2.0-rc.2` | 475/475 tracked matrix PASS |
|
|
81
|
+
| `0.2.1-rc.1` | 475/475 tracked matrix PASS |
|
|
82
|
+
| `0.2.1-rc.2` | 475/475 tracked matrix PASS |
|
|
83
|
+
| `0.2.1-rc.3` | 475/475 tracked matrix PASS |
|
|
84
|
+
| `0.2.1-rc.4` | 475/475 tracked matrix PASS |
|
|
85
|
+
| `0.2.1-rc.5` | 475/475 tracked matrix PASS |
|
|
86
|
+
| `0.2.2-rc.1` | 475/475 tracked matrix PASS |
|
|
87
|
+
|
|
88
|
+
0.2.2 候选树在源码提交 `f9d93c031eabfe5e44cf17e302729eb7093d7e94` 上于 2026-11-11 通过
|
|
89
|
+
`compat-matrix --versions all --allow-new-release`(Node `v22.23.1` / pnpm `12.3.4`):每个声明版本均通过
|
|
90
|
+
typecheck、build 和 475/475 测试;本地证据为 `.tmp/0.2.2-final-matrix2.json`。安装使用 pnpm strict peer、精确工具版本、单一 zod 4.6.7 图、完整 `pnpm list --depth Infinity` 图校验,并记录 lockfile SHA-256。未跟踪 `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 明确不支持。
|
|
86
91
|
|
|
87
92
|
## 4. 测试覆盖
|
|
88
93
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { GraphLayout, RelationGraphModel } from './relation-graph.js';
|
|
2
|
+
export interface DependencyGraphProps {
|
|
3
|
+
readonly layout: GraphLayout;
|
|
4
|
+
readonly model: RelationGraphModel;
|
|
5
|
+
readonly focusId: string | undefined;
|
|
6
|
+
readonly activeKey: string | undefined;
|
|
7
|
+
readonly depth: 1 | 2;
|
|
8
|
+
readonly showSupersedes: boolean;
|
|
9
|
+
readonly editable: boolean;
|
|
10
|
+
readonly onFocus: (id: string) => void;
|
|
11
|
+
readonly onActiveKey: (key: string) => void;
|
|
12
|
+
readonly onDepth: (depth: 1 | 2) => void;
|
|
13
|
+
readonly onShowSupersedes: (show: boolean) => void;
|
|
14
|
+
readonly onStageRequires: (targetId: string, nextRequires: readonly string[]) => void;
|
|
15
|
+
readonly onLocateList: (id: string) => void;
|
|
16
|
+
readonly onProposal: (id: string) => void;
|
|
17
|
+
readonly t: (key: string, values?: Record<string, string | number>) => string;
|
|
18
|
+
}
|
|
19
|
+
export declare function DependencyGraph({ layout, model, focusId, activeKey, depth, showSupersedes, editable, onFocus, onActiveKey, onDepth, onShowSupersedes, onStageRequires, onLocateList, onProposal, t, }: DependencyGraphProps): JSX.Element;
|
package/lib/client/locales.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ declare const en: {
|
|
|
44
44
|
readonly 'nav.recovery': "Storage & recovery";
|
|
45
45
|
readonly 'nav.open': "Open";
|
|
46
46
|
readonly 'nav.workspaceHelp': "See the current objective, global invariants, execution plan, and unresolved blockers.";
|
|
47
|
-
readonly 'nav.reviewHelp': "Review
|
|
47
|
+
readonly 'nav.reviewHelp': "Review message proposals, compaction-history drafts, pending proposals, and recent changes.";
|
|
48
48
|
readonly 'nav.diagnosticsHelp': "Inspect prompt, budgets, record health, recovery, and capability diagnostics.";
|
|
49
49
|
readonly 'nav.overviewHelp': "See active commitments, counts, budget, and any pending review at a glance.";
|
|
50
50
|
readonly 'nav.objectiveHelp': "Read or redirect the current objective while the original objective stays immutable.";
|
|
@@ -60,6 +60,11 @@ declare const en: {
|
|
|
60
60
|
readonly 'changeset.promptDelta': "Prompt bytes: {before} → {after}";
|
|
61
61
|
readonly 'changeset.itemsDelta': "Items: {before} → {after}";
|
|
62
62
|
readonly 'changeset.editorOpen': "An inline editor is open";
|
|
63
|
+
readonly 'changeset.conflicts': "This Change Set introduces or worsens {count} dependency conflict(s)";
|
|
64
|
+
readonly 'changeset.conflictAdded': "new conflict ({before} → {after} blocking prerequisites)";
|
|
65
|
+
readonly 'changeset.conflictWorsened': "worsened ({before} → {after} blocking prerequisites)";
|
|
66
|
+
readonly 'changeset.conflictHint': "{count} dependency conflict(s) — Apply needs your confirmation";
|
|
67
|
+
readonly 'changeset.conflictConfirmHint': "Confirm to apply with {count} known dependency conflict(s)";
|
|
63
68
|
readonly 'review.itemProposals': "Item proposals";
|
|
64
69
|
readonly 'review.messageProposal': "Message proposal";
|
|
65
70
|
readonly 'review.messageProposalHint': "Turn one recent user message into a pending proposal. Nothing changes until you review and apply it.";
|
|
@@ -88,7 +93,8 @@ declare const en: {
|
|
|
88
93
|
readonly 'review.objectiveReason': "Reason for replacing the current objective";
|
|
89
94
|
readonly 'review.acceptObjective': "Accept objective";
|
|
90
95
|
readonly 'review.rejectObjective': "Reject objective";
|
|
91
|
-
readonly 'review.
|
|
96
|
+
readonly 'review.heading': "Review Center";
|
|
97
|
+
readonly 'review.headingHint': "Review message proposals, compaction-history drafts, pending proposals, and recent changes. Nothing changes until you apply it.";
|
|
92
98
|
readonly 'review.title': "Proposal batches";
|
|
93
99
|
readonly 'review.captured': "Captured at revision {revision}";
|
|
94
100
|
readonly 'review.sourceIntegrity': "Source: {integrity}";
|
|
@@ -99,10 +105,7 @@ declare const en: {
|
|
|
99
105
|
readonly 'review.source.agent-tool': "Agent tool proposal";
|
|
100
106
|
readonly 'review.source.fork': "Fork proposal";
|
|
101
107
|
readonly 'review.source.legacy-unknown': "Legacy unknown source";
|
|
102
|
-
readonly 'deps.kicker': "Execution plan";
|
|
103
108
|
readonly 'deps.title': "Dependencies and readiness";
|
|
104
|
-
readonly 'deps.requires': "Requires {keys}";
|
|
105
|
-
readonly 'deps.editAria': "Prerequisites for {key}";
|
|
106
109
|
readonly 'deps.status.ready': "ready";
|
|
107
110
|
readonly 'deps.status.waiting': "waiting";
|
|
108
111
|
readonly 'deps.status.dependency-conflict': "dependency conflict";
|
|
@@ -111,12 +114,64 @@ declare const en: {
|
|
|
111
114
|
readonly 'deps.status.terminal': "terminal";
|
|
112
115
|
readonly 'deps.prerequisiteConflict': "prerequisite conflict";
|
|
113
116
|
readonly 'deps.conflict': "The staged dependency plan contains a cycle or invalid reference. Remove or change a prerequisite before Apply.";
|
|
117
|
+
readonly 'deps.graphTitle': "Dependency map";
|
|
118
|
+
readonly 'deps.graphFocus': "Focus";
|
|
119
|
+
readonly 'deps.graphDepth': "Depth";
|
|
120
|
+
readonly 'deps.depth1': "1 hop";
|
|
121
|
+
readonly 'deps.depth2': "2 hops";
|
|
122
|
+
readonly 'deps.showSupersedes': "Show replacements";
|
|
123
|
+
readonly 'deps.zoomIn': "Zoom in";
|
|
124
|
+
readonly 'deps.zoomOut': "Zoom out";
|
|
125
|
+
readonly 'deps.resetLayout': "Reset zoom";
|
|
126
|
+
readonly 'deps.hideGraph': "Hide graph";
|
|
127
|
+
readonly 'deps.showGraph': "Show graph";
|
|
128
|
+
readonly 'deps.graphAria': "Dependency graph";
|
|
129
|
+
readonly 'deps.graphKeys': "Tab enters the graph once. Arrow keys move along dependencies; [ and ] visit every node and edge; Enter opens details; Esc closes details, then returns to the list.";
|
|
130
|
+
readonly 'deps.historyKicker': "Replaced";
|
|
131
|
+
readonly 'deps.historyStatus': "Not in the execution order";
|
|
132
|
+
readonly 'deps.candidateKicker': "Candidate";
|
|
133
|
+
readonly 'deps.candidateStatus': "Not in the execution order";
|
|
134
|
+
readonly 'deps.historyAria': "Replaced item {text}; not in the execution order";
|
|
135
|
+
readonly 'deps.candidateAria': "Candidate {text}; not in the execution order";
|
|
136
|
+
readonly 'deps.edgeAria': "{to} depends on {from}";
|
|
137
|
+
readonly 'deps.edgeAriaAdded': "{to} depends on {from} (added in this draft)";
|
|
138
|
+
readonly 'deps.edgeAriaRemoved': "{to} depends on {from} (removed in this draft)";
|
|
139
|
+
readonly 'deps.proposedEdgeAria': "Candidate prerequisite {from} for {to}; Enter opens the proposal";
|
|
140
|
+
readonly 'deps.supersedesEdgeAria': "{from} is replaced by {to}";
|
|
141
|
+
readonly 'deps.graphDegradedSupersedes': "The replacement history is hidden because this view is too dense.";
|
|
142
|
+
readonly 'deps.graphDegradedDepth': "Depth was reduced to one hop because this view is too dense.";
|
|
143
|
+
readonly 'deps.graphTooDense': "This dependency view has {count} navigable items; use the list instead.";
|
|
144
|
+
readonly 'deps.inspectorTitle': "Dependency details · {key}";
|
|
145
|
+
readonly 'deps.closeInspector': "Close details";
|
|
146
|
+
readonly 'deps.inspectorStatus': "Status";
|
|
147
|
+
readonly 'deps.inspectorRequires': "Requires";
|
|
148
|
+
readonly 'deps.addRequires': "Add a prerequisite";
|
|
149
|
+
readonly 'deps.removeRequires': "Remove {key}";
|
|
150
|
+
readonly 'deps.removeEdge': "Remove this dependency";
|
|
151
|
+
readonly 'deps.openProposal': "Open proposal";
|
|
152
|
+
readonly 'deps.skipToList': "Skip to the dependency list";
|
|
153
|
+
readonly 'deps.showMore': "Show {count} more dependency rows";
|
|
154
|
+
readonly 'deps.rowPosition': "Dependency {index} of {total}";
|
|
155
|
+
readonly 'deps.locateInList': "Locate in the list";
|
|
156
|
+
readonly 'deps.locateInGraph': "Locate in graph";
|
|
157
|
+
readonly 'deps.graphHint': "The graph never changes state by itself; edits are staged into the Change Set and Apply remains the only commit.";
|
|
158
|
+
readonly 'deps.help': "Keys and notes";
|
|
159
|
+
readonly 'deps.graphEmpty': "No dependencies yet. Drag one node onto another, or open a list row to add a prerequisite.";
|
|
160
|
+
readonly 'deps.graphIsolatedTooMany': "No dependencies yet. The isolated-node preview is hidden for this many rows; use the list.";
|
|
161
|
+
readonly 'deps.requiresSummary': "Prerequisites: {keys}";
|
|
162
|
+
readonly 'deps.noRequires': "No prerequisites";
|
|
163
|
+
readonly 'deps.editRequires': "Edit prerequisites";
|
|
164
|
+
readonly 'deps.stagedAdded': "staged addition";
|
|
165
|
+
readonly 'deps.dropInvalidSelf': "A deliverable cannot depend on itself.";
|
|
166
|
+
readonly 'deps.dropInvalidDuplicate': "This prerequisite is already present.";
|
|
167
|
+
readonly 'deps.stagedRemoved': "staged removal";
|
|
168
|
+
readonly 'deps.candidateCycle': "candidate dependencies form a cycle; acceptance will be rejected";
|
|
114
169
|
readonly 'overview.budget': "Budget";
|
|
115
170
|
readonly 'overview.budgetDetail': "Prompt, objective, and item limits";
|
|
116
171
|
readonly 'overview.nothing': "Nothing configured yet.";
|
|
117
172
|
readonly 'overview.objectiveHint': "The original objective is immutable; a redirect keeps it for review.";
|
|
118
173
|
readonly 'bootstrap.kicker': "History draft";
|
|
119
|
-
readonly 'bootstrap.title': "
|
|
174
|
+
readonly 'bootstrap.title': "Compaction history draft";
|
|
120
175
|
readonly 'bootstrap.body': string;
|
|
121
176
|
readonly 'bootstrap.source': "Source: compaction summary ({tokens} tokens shadowed)";
|
|
122
177
|
readonly 'bootstrap.sourcePlain': "Source: compaction summary";
|
|
@@ -251,6 +306,7 @@ declare const en: {
|
|
|
251
306
|
readonly 'footer.abandon': "Abandon unknown request";
|
|
252
307
|
readonly 'footer.abandonConfirm': "Confirm abandon — this discards the retained request and local draft text";
|
|
253
308
|
readonly 'footer.applying': "Applying...";
|
|
309
|
+
readonly 'footer.applyConfirmConflicts': "Apply with {count} conflict(s)";
|
|
254
310
|
readonly 'budget.editorOver': "This text exceeds the {limit} limit.";
|
|
255
311
|
readonly 'budget.shrinking': "Over the limit, but shortening is allowed and will be admitted.";
|
|
256
312
|
readonly 'budget.notGrowing': "Over the limit, but this edit does not increase the prompt; it will be admitted.";
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import type { DeliverableProgress } from '../core/schemas.js';
|
|
2
|
+
/**
|
|
3
|
+
* Client-side dependency-graph projection.
|
|
4
|
+
*
|
|
5
|
+
* The design contract is split in two:
|
|
6
|
+
* - buildRelationGraph compares committed and projected items and derives
|
|
7
|
+
* execution/candidate/history lanes plus edge staging state;
|
|
8
|
+
* - layoutRelationGraph is a deterministic, font-free geometry pass over the
|
|
9
|
+
* semantic model.
|
|
10
|
+
*
|
|
11
|
+
* Both functions are pure. The Pane renders their output; the Host is not
|
|
12
|
+
* involved and no graph coordinate enters the record, prompt, or digest.
|
|
13
|
+
*/
|
|
14
|
+
export declare const GRAPH: {
|
|
15
|
+
readonly nodePaddingEm: 0.625;
|
|
16
|
+
readonly summaryEm: 0.78;
|
|
17
|
+
readonly nodeMinWidthEm: 9;
|
|
18
|
+
readonly nodeWidthEm: 10;
|
|
19
|
+
readonly nodeMaxWidthEm: 12;
|
|
20
|
+
readonly nodeHeightEm: {
|
|
21
|
+
readonly 1: 3;
|
|
22
|
+
readonly 2: 4.5;
|
|
23
|
+
};
|
|
24
|
+
readonly rankPitchEm: 12.5;
|
|
25
|
+
readonly rowPitchEm: 5.5;
|
|
26
|
+
readonly candidateGapEm: 2.5;
|
|
27
|
+
readonly historyGapEm: 2.5;
|
|
28
|
+
readonly navigationLimit: 60;
|
|
29
|
+
readonly isolatedNodeLimit: 20;
|
|
30
|
+
readonly touchTargetPx: 44;
|
|
31
|
+
};
|
|
32
|
+
export declare const LINE_CAPACITY: number;
|
|
33
|
+
export type GraphLane = 'execution' | 'candidate' | 'history';
|
|
34
|
+
export type NodeState = 'unchanged' | 'staged-added' | 'staged-removed' | 'staged-changed';
|
|
35
|
+
export type EdgeState = 'committed' | 'staged-added' | 'staged-removed';
|
|
36
|
+
export type EdgeKind = 'requires' | 'proposed' | 'supersedes';
|
|
37
|
+
export interface GraphInputItem {
|
|
38
|
+
readonly id: string;
|
|
39
|
+
readonly kind: string;
|
|
40
|
+
readonly text: string;
|
|
41
|
+
readonly review: string;
|
|
42
|
+
readonly lifecycle: string;
|
|
43
|
+
readonly progress?: DeliverableProgress;
|
|
44
|
+
readonly requires?: readonly string[];
|
|
45
|
+
readonly proposedRequires?: readonly string[];
|
|
46
|
+
readonly supersedes?: string;
|
|
47
|
+
readonly supersededBy?: string;
|
|
48
|
+
readonly order?: number;
|
|
49
|
+
}
|
|
50
|
+
export interface RelationNode {
|
|
51
|
+
readonly id: string;
|
|
52
|
+
readonly lane: GraphLane;
|
|
53
|
+
readonly ghost?: boolean;
|
|
54
|
+
readonly localKey: string | undefined;
|
|
55
|
+
readonly text: string;
|
|
56
|
+
readonly rank: number | undefined;
|
|
57
|
+
readonly order: number;
|
|
58
|
+
readonly groupRank: number | undefined;
|
|
59
|
+
readonly progress: DeliverableProgress | undefined;
|
|
60
|
+
readonly executionDisplay: string | undefined;
|
|
61
|
+
readonly prerequisiteStatus: string | undefined;
|
|
62
|
+
readonly state: NodeState;
|
|
63
|
+
readonly candidateCycle?: boolean;
|
|
64
|
+
}
|
|
65
|
+
export interface RelationEdge {
|
|
66
|
+
readonly from: string;
|
|
67
|
+
readonly to: string;
|
|
68
|
+
readonly kind: EdgeKind;
|
|
69
|
+
readonly state: EdgeState;
|
|
70
|
+
readonly editable: boolean;
|
|
71
|
+
readonly focusable: boolean;
|
|
72
|
+
readonly targetProposalId?: string;
|
|
73
|
+
}
|
|
74
|
+
export interface RelationGraphModel {
|
|
75
|
+
readonly nodes: readonly RelationNode[];
|
|
76
|
+
readonly edges: readonly RelationEdge[];
|
|
77
|
+
readonly topoOrder: readonly string[];
|
|
78
|
+
readonly committedTopoOrder: readonly string[];
|
|
79
|
+
readonly navigables: number;
|
|
80
|
+
}
|
|
81
|
+
export interface PlacedNode extends RelationNode {
|
|
82
|
+
readonly col: number;
|
|
83
|
+
readonly x: number;
|
|
84
|
+
readonly y: number;
|
|
85
|
+
readonly w: number;
|
|
86
|
+
readonly h: number;
|
|
87
|
+
readonly labelLines: 1 | 2;
|
|
88
|
+
}
|
|
89
|
+
export interface PlacedEdge extends RelationEdge {
|
|
90
|
+
readonly key: string;
|
|
91
|
+
readonly path: string;
|
|
92
|
+
readonly labelAt: {
|
|
93
|
+
readonly x: number;
|
|
94
|
+
readonly y: number;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
export interface GraphLayout {
|
|
98
|
+
readonly nodes: readonly PlacedNode[];
|
|
99
|
+
readonly edges: readonly PlacedEdge[];
|
|
100
|
+
readonly width: number;
|
|
101
|
+
readonly height: number;
|
|
102
|
+
readonly traversal: readonly string[];
|
|
103
|
+
readonly navigables: number;
|
|
104
|
+
readonly focusId: string | undefined;
|
|
105
|
+
readonly depth: 1 | 2;
|
|
106
|
+
readonly degraded: {
|
|
107
|
+
readonly supersedesHidden: boolean;
|
|
108
|
+
readonly depthReduced: boolean;
|
|
109
|
+
readonly hidden: boolean;
|
|
110
|
+
readonly isolatedTooMany: boolean;
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
export interface BuildRelationGraphInput {
|
|
114
|
+
readonly committed: readonly GraphInputItem[];
|
|
115
|
+
readonly projected: readonly GraphInputItem[];
|
|
116
|
+
readonly ops?: readonly unknown[];
|
|
117
|
+
readonly showSupersedes?: boolean;
|
|
118
|
+
}
|
|
119
|
+
export declare function buildRelationGraph(input: BuildRelationGraphInput): RelationGraphModel;
|
|
120
|
+
export declare function labelLines(text: string): 1 | 2;
|
|
121
|
+
export declare function defaultFocus(model: RelationGraphModel): string | undefined;
|
|
122
|
+
interface LayoutOptions {
|
|
123
|
+
readonly focusId?: string | undefined;
|
|
124
|
+
readonly depth?: 1 | 2;
|
|
125
|
+
readonly supersedesHidden?: boolean;
|
|
126
|
+
}
|
|
127
|
+
export declare function layoutRelationGraph(model: RelationGraphModel, options?: LayoutOptions): GraphLayout;
|
|
128
|
+
export type GraphNavigationKey = 'Home' | 'End' | 'BracketLeft' | 'BracketRight' | 'PageUp' | 'PageDown' | 'ArrowLeft' | 'ArrowRight' | 'ArrowUp' | 'ArrowDown';
|
|
129
|
+
export declare function graphNavigationTarget(layout: GraphLayout, currentKey: string, key: GraphNavigationKey): string | null;
|
|
130
|
+
export interface OverlapPair {
|
|
131
|
+
readonly left: string;
|
|
132
|
+
readonly right: string;
|
|
133
|
+
}
|
|
134
|
+
export declare function graphOverlaps(layout: GraphLayout): readonly OverlapPair[];
|
|
135
|
+
export {};
|