dsh-cabinet-mode 0.4.1 → 0.5.1

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 CHANGED
@@ -2,6 +2,39 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
+ ## [0.5.1] - 2026-11-07
6
+
7
+ ### Fixed
8
+
9
+ - Make the Cabinet preset load again on DSH 0.2.2-rc.1. The preset still listed
10
+ `@deepseek-ai/dsh-tool-subagent-control/list-agents`, a subpath that
11
+ 0.2.2-rc.1 no longer exports; the row failed to resolve, the preset registry
12
+ marked the whole preset broken, and the mode picker hid it while the settings
13
+ page showed a load-failure badge.
14
+ - Drop that row (`list_agents` now comes from the control entry itself), rename
15
+ `modelSelectionSettings` to `modelSelection: true` plus `modelDiscovery: true`,
16
+ and set `applyPatch: false` on the `tool-fs` row to match the shipped
17
+ Standard Mode.
18
+
19
+ ### Changed
20
+
21
+ - The tested reference DSH is now 0.2.2-rc.1. Users still on 0.2.1-rc.5 should
22
+ stay on the 0.4.x line: those releases ship `list_agents` through the removed
23
+ subpath, so this release trades that tool away on rc.5.
24
+
25
+ ## [0.5.0] - 2026-11-06
26
+
27
+ ### Added
28
+
29
+ - Task dependency curves and blocker endpoint dots in the Cabinet panel, using
30
+ existing blockedBy data. Completed blockers are green, pending blockers grey,
31
+ and active blockers blue with flowing dashes; running owners brighten the flow.
32
+ - Resize, scrolling, task updates and dependency-chip expansion remeasure geometry.
33
+ Reduced motion disables the flow animation. Card content masks prevent curves
34
+ crossing unrelated text; same-column dependencies use the right gutter.
35
+ - Regression coverage for opaque IDs, duplicate dependencies, deleted/missing
36
+ tasks and geometry updates. No host protocol or model-routing changes.
37
+
5
38
  ## [0.4.1] - 2026-11-06
6
39
 
7
40
  ### Tests
package/README.md CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  **Install:** [Use the plugin market (recommended)](#install-from-the-plugin-market-recommended).
6
6
 
7
+ **Website:** [luodaoyi.github.io/dsh-cabinet-mode](https://luodaoyi.github.io/dsh-cabinet-mode/) (bilingual intro page, served from `site/` in this repository).
8
+
7
9
  <p align="center">
8
10
  <img src="docs/images/cabinet-portrait.jpg" width="200" alt="Cabinet Mode — grand-secretary portrait, shipped as the bundle icon (icon.svg)"/>
9
11
  </p>
@@ -151,6 +153,29 @@ preset declaration:
151
153
  [Supported names and naming convention](docs/images/avatars/aliases.md) cover
152
154
  composite pinyin names, Chinese titles, separators and numeric suffixes.
153
155
 
156
+ ### Task dependency edges
157
+
158
+ Cross-member dependencies (`blockedBy`) are wired up inside the cabinet panel:
159
+ a hand-written SVG overlay draws one cubic curve per dependency, from the
160
+ blocked task row to the blocker task row, ending in a small dot on the blocker
161
+ side — a workflow line linking, for example, the Hanlin research task to the
162
+ Works task it gates. Three states, mirrored from the blocker's status:
163
+
164
+ - **completed** — solid green: the dependency is cleared;
165
+ - **in_progress** — dashes flowing toward the blocker ("the dependency is progressing"),
166
+ faster and brighter while the blocker's owner is actually running;
167
+ - **pending** — static grey dashes: still waiting.
168
+
169
+ A missing or deleted blocker draws no line. The edges are a panel-only
170
+ visualization of the existing `team.tasks.blockedBy` data — no new data channel
171
+ or protocol — and the flow animation stands still under `prefers-reduced-motion`
172
+ while the static line stays.
173
+
174
+ Curves are masked behind card content so they do not cross task text; endpoint
175
+ dots remain visible. Same-column links use the right gutter. Colours adapt to
176
+ light and dark themes. The existing dependency chips remain the textual reference
177
+ when curves overlap or are partially hidden by another card.
178
+
154
179
  The five original chibi portraits use Ming-style black winged hats, round-collar robes and square rank badges. The Lead wears burgundy with a crane badge (an artistic setting of a grand secretary with an additional first-rank title); Hanlin editor wears a seventh-rank duck badge, the Minister of Works a second-rank golden pheasant, the Chief Minister of the Court of Judicial Review a third-rank peacock, and the Left Censor-in-Chief a second-rank censor’s xiezhi badge. Robe colours distinguish roles and are not presented as mandatory rank colours.
155
180
 
156
181
  See [costume references, role settings and generation prompts](docs/images/avatars/README.md). The 1254px square sources are downscaled by `src/build_avatars.py` to 128px PNGs embedded in `client.js`. At the panel's 22–24px display size, role labels remain the primary identification.
@@ -218,7 +243,7 @@ On failure, show the exact error. For $.format must be 1, replace the webpage so
218
243
  Use this only when the market is unavailable or for local development. Fully quit desktop DSH first to release the profile lock, then install the release bundle:
219
244
 
220
245
  ```sh
221
- dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.4.1/dsh-cabinet-mode-0.4.1.tgz
246
+ dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.5.1/dsh-cabinet-mode-0.5.1.tgz
222
247
  dsh plugin --profile desktop list
223
248
  ```
224
249
 
@@ -233,7 +258,7 @@ the same install command with the new version URL (or pick the new `.tgz` in the
233
258
  plugin page), then fully quit and restart DeepSeek Harness:
234
259
 
235
260
  ```sh
236
- dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.4.1/dsh-cabinet-mode-0.4.1.tgz
261
+ dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.5.1/dsh-cabinet-mode-0.5.1.tgz
237
262
  ```
238
263
 
239
264
  `dsh plugin --profile desktop list` should report the new version. Upgrades were
package/README.zh.md CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  **安装入口:** [优先从插件市场安装](#从插件市场安装索引源推荐)。
6
6
 
7
+ **介绍站:** [luodaoyi.github.io/dsh-cabinet-mode](https://luodaoyi.github.io/dsh-cabinet-mode/)(中英双语介绍页,源码在本仓库 `site/` 目录)。
8
+
7
9
  <p align="center">
8
10
  <img src="docs/images/cabinet-portrait.jpg" width="200" alt="内阁模式图标来源:明代内阁首辅画像(已作为 bundle 图标 icon.svg 随包发布)"/>
9
11
  </p>
@@ -99,6 +101,22 @@
99
101
  - **任务三色**:待办灰、进行中蓝、已完成绿(面板底部附图例)。
100
102
  - **成员形象**:每行包含圆形头像、中文称谓与成员原名、状态文字和当前模型。别名共享衙门头像,成员卡片、Owner 标签和不在册分组保留原名以区分身份;截断文字提供完整提示,未匹配名称保留原始身份,使用浅色、无官阶补纹的人物头像,不再显示暗色字母占位。详见[支持的名称与命名约定](docs/images/avatars/aliases.md),覆盖复合拼音、中文官名、分隔符和数字后缀。
101
103
 
104
+ ### 任务依赖连线
105
+
106
+ 跨成员依赖(`blockedBy`)在内阁面板内用手写 SVG 连起来:每条依赖一条贝塞尔曲线,
107
+ 从被阻塞任务行连到 blocker 任务行,末端圆点落在 blocker 一侧——像工作流一样把
108
+ 「翰林院编修先调研、工部再动手」这类先后关系画出来。三态取 blocker 任务的状态:
109
+
110
+ - **已完成**:绿色实线,依赖已解除;
111
+ - **进行中**:蓝色虚线沿连线向 blocker 方向流动(依赖正在推进),blocker 的
112
+ owner 真在干活时流速更快、颜色更亮;
113
+ - **待办**:灰色静态虚线,仍在等待。
114
+
115
+ blocker 缺失或任务已删则不画线。连线只是面板内对既有 `team.tasks.blockedBy`
116
+ 数据的可视化,不新增数据通道与协议;`prefers-reduced-motion` 下流动动画停止、保留静态线。
117
+
118
+ 曲线在卡片正文后方遮挡,避免横穿任务文字,端点圆点仍可见;同列连线从右侧间隙绕行,颜色适配浅色与深色主题。曲线重叠或被其他卡片部分遮挡时,原有依赖标签仍提供明确的文字对应关系。
119
+
102
120
  五张原创 Q 版头像采用明代乌纱帽、圆领袍与方形胸补。首辅用酒红袍、鹤补(明确采用“加一品衔大学士”的艺术设定);翰林院编修为正七品,用鸂鶒补;工部尚书为正二品,用锦鸡补;大理寺卿为正三品,用孔雀补;左都御史为正二品,使用风宪官獬豸补。袍色用于区分角色,不宣称是各品级常服的固定颜色。
103
121
 
104
122
  详见[衣冠依据、角色设定与生成提示词](docs/images/avatars/README.md)。1254px 正方形源图经 `src/build_avatars.py` 缩放为 128px PNG 并内嵌到 `client.js`;界面实际显示 22–24px,身份辨认仍以角色文字为准。
@@ -158,7 +176,7 @@ https://raw.githubusercontent.com/luodaoyi/dsh-cabinet-mode/market-index/marketp
158
176
  仅在商店不可用或本地开发时使用。先完全退出桌面 DSH,释放 profile 锁,再执行:
159
177
 
160
178
  ```sh
161
- dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.4.1/dsh-cabinet-mode-0.4.1.tgz
179
+ dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.5.1/dsh-cabinet-mode-0.5.1.tgz
162
180
  dsh plugin --profile desktop list
163
181
  ```
164
182
 
@@ -169,7 +187,7 @@ dsh plugin --profile desktop list
169
187
  若通过插件市场安装:刷新市场,先在**已安装**页卸载旧版本,再从**插件市场**安装新版本,然后重启——没有 tgz URL 要换,也没有一键更新。否则用同一条安装命令换新版本 URL(或在插件页选新 `.tgz`),然后完全退出并重启 DeepSeek Harness:
170
188
 
171
189
  ```sh
172
- dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.4.1/dsh-cabinet-mode-0.4.1.tgz
190
+ dsh plugin --profile desktop add https://github.com/luodaoyi/dsh-cabinet-mode/releases/download/v0.5.1/dsh-cabinet-mode-0.5.1.tgz
173
191
  ```
174
192
 
175
193
  `dsh plugin --profile desktop list` 应显示新版本。升级已在 Windows 实测:
package/client.js CHANGED
@@ -2407,8 +2407,20 @@ window.__ModuleLoader__.load({
2407
2407
  'body[data-ds-dark-theme] .cabinet-status-running{color:#4ade80}body[data-ds-dark-theme] .cabinet-status-inactive{color:#adb2b8}body[data-ds-dark-theme] .cabinet-status-provisioning{color:#f7ad31}body[data-ds-dark-theme] .cabinet-status-failed{color:#f25a5a}',
2408
2408
  '.cabinet-task-pending{color:#61666b}.cabinet-task-in_progress{color:#2563eb}.cabinet-task-completed{color:#15803d}',
2409
2409
  'body[data-ds-dark-theme] .cabinet-task-pending{color:#adb2b8}body[data-ds-dark-theme] .cabinet-task-in_progress{color:#60a5fa}body[data-ds-dark-theme] .cabinet-task-completed{color:#4ed17e}',
2410
+ // task dependency edges (blocked → blocker): one class per blocker state,
2411
+ // same palette as TASK_COLOR (done #22c55e / active #3b82f6 / pending #9aa0a6)
2412
+ '@keyframes cabinetEdgeFlow{to{stroke-dashoffset:-24}}',
2413
+ '.cabinet-edge{fill:none;stroke-width:1.5;stroke-linecap:round}',
2414
+ '.cabinet-edge-done{stroke:light-dark(#15803d,#4ade80)}',
2415
+ '.cabinet-edge-pending{stroke:light-dark(#6b7280,#9ca3af);stroke-dasharray:4 5}',
2416
+ '.cabinet-edge-active{stroke:light-dark(#2563eb,#60a5fa);stroke-dasharray:6 6;animation:cabinetEdgeFlow .9s linear infinite}',
2417
+ // blocker's owner actually running: faster flow, brighter blue — the same
2418
+ // visual language as cabinet-task-live (bar pulse on the in-progress row)
2419
+ '.cabinet-edge-active.cabinet-edge-live{stroke:light-dark(#1d4ed8,#93c5fd);animation-duration:.45s}',
2420
+ '.cabinet-edge-dot{stroke:none}',
2421
+ '.cabinet-edge-dot-done{fill:light-dark(#15803d,#4ade80)}.cabinet-edge-dot-pending{fill:light-dark(#6b7280,#9ca3af)}.cabinet-edge-dot-active{fill:light-dark(#2563eb,#60a5fa)}',
2410
2422
  // accessibility: everything above stands still
2411
- '@media (prefers-reduced-motion:reduce){[data-cabinet-status="running"],img.cabinet-avatar-running,.cabinet-live-breathe,.cabinet-dots i,.cabinet-task-live::after{animation:none!important}.cabinet-avatar-slot.cabinet-ring-live::before{animation:none!important;opacity:.8}.cabinet-row-live{animation:none!important;background-image:none}}',
2423
+ '@media (prefers-reduced-motion:reduce){[data-cabinet-status="running"],img.cabinet-avatar-running,.cabinet-live-breathe,.cabinet-dots i,.cabinet-task-live::after{animation:none!important}.cabinet-avatar-slot.cabinet-ring-live::before{animation:none!important;opacity:.8}.cabinet-row-live{animation:none!important;background-image:none}.cabinet-edge-active,.cabinet-edge-active.cabinet-edge-live{animation:none!important}}',
2412
2424
  ].join('');
2413
2425
 
2414
2426
  const PANEL = {
@@ -2933,7 +2945,7 @@ window.__ModuleLoader__.load({
2933
2945
  }, children);
2934
2946
  }
2935
2947
 
2936
- function Row({ tickTop = 12, highlight, bare, className, children, style }) {
2948
+ function Row({ tickTop = 12, highlight, bare, className, children, style, ...rest }) {
2937
2949
  // Geometry: every RailList is marginLeft 12 + 1px border + paddingLeft 14 and
2938
2950
  // every row is marginLeft -6 + padding 6, so a tick at left -9 / width 15
2939
2951
  // starts on the rail and ends exactly at the row content. The tree root
@@ -2941,7 +2953,9 @@ window.__ModuleLoader__.load({
2941
2953
  // `highlight` (running member) maps to .cabinet-row-live so the animated
2942
2954
  // sweep lives in CSS instead of an inline background (which would win).
2943
2955
  const classes = [className, highlight ? 'cabinet-row-live' : ''].filter(Boolean).join(' ');
2944
- return h('div', {
2956
+ // `rest` carries data-* hooks (data-cabinet-task anchors the edge layer's
2957
+ // getBoundingClientRect endpoints) through to the row element.
2958
+ return h('div', Object.assign({
2945
2959
  className: classes || undefined,
2946
2960
  style: Object.assign({
2947
2961
  position: 'relative',
@@ -2954,7 +2968,7 @@ window.__ModuleLoader__.load({
2954
2968
  marginLeft: -6,
2955
2969
  borderRadius: 6
2956
2970
  }, style || {})
2957
- }, bare ? children : [
2971
+ }, rest), bare ? children : [
2958
2972
  h('span', {
2959
2973
  key: 'tick',
2960
2974
  'aria-hidden': 'true',
@@ -3029,7 +3043,7 @@ window.__ModuleLoader__.load({
3029
3043
  const [openBlockers, setOpenBlockers] = React.useState(true);
3030
3044
  const status = TASK_COLOR[task.status] ? task.status : 'pending';
3031
3045
  const color = TASK_COLOR[status];
3032
- const blockers = Array.isArray(task.blockedBy) ? task.blockedBy : [];
3046
+ const blockers = Array.isArray(task.blockedBy) ? [...new Set(task.blockedBy.filter((id) => typeof id === 'string' && id !== task.id))] : [];
3033
3047
  const parts = [
3034
3048
  h('span', {
3035
3049
  key: 'dot',
@@ -3078,12 +3092,51 @@ window.__ModuleLoader__.load({
3078
3092
  ]));
3079
3093
  }
3080
3094
  // in_progress tasks pulse only while their owner is actually running.
3095
+ // data-cabinet-task anchors this row for the dependency-edge overlay.
3081
3096
  return h(Row, {
3082
3097
  tickTop: 12,
3098
+ 'data-cabinet-task': task.id,
3083
3099
  className: ownerRunning && status === 'in_progress' ? 'cabinet-task-live' : undefined
3084
3100
  }, children);
3085
3101
  }
3086
3102
 
3103
+ // Dependency-edge overlay: one cubic path + one blocker-side dot per edge,
3104
+ // paths are masked behind card interiors; endpoint dots remain visible. The
3105
+ // layer is pointer-transparent, so rows stay
3106
+ // clickable. `data-cabinet-edge="<blocked>-><blocker>"` plus a
3107
+ // cabinet-edge-pending/active/done class makes every edge assertable.
3108
+ function TaskEdgeLayer({ edges, cards = [] }) {
3109
+ const maskId = React.useId();
3110
+ if (!Array.isArray(edges) || edges.length === 0) return null;
3111
+ return h('svg', {
3112
+ 'aria-hidden': 'true',
3113
+ className: 'cabinet-edge-layer',
3114
+ style: { position: 'absolute', left: 0, top: 0, width: '100%', height: '100%', pointerEvents: 'none', overflow: 'visible', zIndex: 2 }
3115
+ }, [
3116
+ h('defs', { key: 'defs' }, h('mask', { id: maskId, maskUnits: 'userSpaceOnUse', x: -20, y: -20, width: '120%', height: '120%' }, [
3117
+ h('rect', { key: 'base', x: -20, y: -20, width: '120%', height: '120%', fill: 'white' }),
3118
+ ...cards.map((card, index) => h('rect', { key: index, x: card.left, y: card.top, width: card.width, height: card.height, fill: 'black' }))
3119
+ ])),
3120
+ ...edges.flatMap((edge) => [
3121
+ h('path', {
3122
+ key: 'p:' + edge.key,
3123
+ className: 'cabinet-edge cabinet-edge-' + edge.state + (edge.live ? ' cabinet-edge-live' : ''),
3124
+ 'data-cabinet-edge': edge.key,
3125
+ mask: 'url(#' + maskId + ')',
3126
+ d: edge.d
3127
+ }),
3128
+ h('circle', {
3129
+ key: 'c:' + edge.key,
3130
+ 'aria-hidden': 'true',
3131
+ className: 'cabinet-edge-dot cabinet-edge-dot-' + edge.state,
3132
+ 'data-cabinet-edge-dot': edge.key,
3133
+ cx: edge.ex,
3134
+ cy: edge.ey,
3135
+ r: 3
3136
+ })
3137
+ ])]);
3138
+ }
3139
+
3087
3140
  // #region connectors — pure geometry (the self-test harness extracts this)
3088
3141
  // Builds the 品字形 org-chart links per row: every row owns a horizontal bus
3089
3142
  // 8px above its cards, each card drops a short vertical stub onto that bus,
@@ -3187,6 +3240,146 @@ window.__ModuleLoader__.load({
3187
3240
  }
3188
3241
  return paths;
3189
3242
  }
3243
+ // One cubic per dependency: from the blocked task's row to its blocker's
3244
+ // row, both endpoints taken from task-row DOM rects relative to the
3245
+ // overlay container. State mirrors the BLOCKER's status — completed →
3246
+ // solid green, in_progress → flowing dashes (travelling toward the
3247
+ // blocker, "the dependency is progressing"), pending → static grey
3248
+ // dashes; a missing or deleted blocker, or an unmeasured row, draws
3249
+ // nothing (tolerant, never throws). Edges sharing a source row or a
3250
+ // target row fan their control points apart so parallel lines never sit
3251
+ // exactly on top of each other. Returns null while the panel is hidden
3252
+ // (zero-size base) so a collapsed pane keeps the last drawing.
3253
+ function buildTaskEdges(base, tasks, rectOf, isLive) {
3254
+ if (!base || base.width === 0 || base.height === 0) return null;
3255
+ const list = Array.isArray(tasks) ? tasks : [];
3256
+ const byId = new Map();
3257
+ for (const task of list) if (task && task.id !== undefined && task.id !== null) byId.set(task.id, task);
3258
+ const seen = new Set();
3259
+ // JSON escaping also handles lone UTF-16 surrogates without URIError.
3260
+ const encodeId = (id) => encodeURIComponent(JSON.stringify(id).slice(1, -1));
3261
+ const edges = [];
3262
+ const rel = (rect) => ({
3263
+ left: rect.left - base.left,
3264
+ top: rect.top - base.top,
3265
+ right: rect.right - base.left,
3266
+ bottom: rect.bottom - base.top
3267
+ });
3268
+ for (const task of list) {
3269
+ if (!task || typeof task.id !== 'string' || task.status === 'deleted') continue;
3270
+ const blockers = Array.isArray(task.blockedBy) ? task.blockedBy : [];
3271
+ for (const blockerId of blockers) {
3272
+ if (typeof blockerId !== 'string' || blockerId === task.id) continue;
3273
+ const key = encodeId(task.id) + '->' + encodeId(blockerId);
3274
+ if (seen.has(key)) continue; // duplicated blocker ids draw once
3275
+ seen.add(key);
3276
+ const blocker = byId.get(blockerId);
3277
+ if (!blocker || blocker.status === 'deleted') continue; // missing/removed task: skip, don't crash
3278
+ const from = rectOf(task.id);
3279
+ const to = rectOf(blockerId);
3280
+ if (!from || !to || from.width === 0 || from.height === 0 || to.width === 0 || to.height === 0) continue;
3281
+ const state = blocker.status === 'completed' ? 'done'
3282
+ : blocker.status === 'in_progress' ? 'active'
3283
+ : 'pending';
3284
+ edges.push({
3285
+ key,
3286
+ state,
3287
+ live: state === 'active' && typeof isLive === 'function' && isLive(blockerId) === true,
3288
+ fromId: task.id,
3289
+ toId: blockerId,
3290
+ from: rel(from),
3291
+ to: rel(to)
3292
+ });
3293
+ }
3294
+ }
3295
+ // Horizontal pairing faces the other row; same-column pairs use a side gutter.
3296
+ for (const edge of edges) {
3297
+ const f = edge.from;
3298
+ const t = edge.to;
3299
+ const fcx = (f.left + f.right) / 2;
3300
+ const fcy = (f.top + f.bottom) / 2;
3301
+ const tcx = (t.left + t.right) / 2;
3302
+ const tcy = (t.top + t.bottom) / 2;
3303
+ let sx; let sy; let ex; let ey; let c1x; let c1y; let c2x; let c2y;
3304
+ if (Math.abs(tcx - fcx) >= 24) {
3305
+ const dir = tcx >= fcx ? 1 : -1;
3306
+ sx = dir > 0 ? f.right : f.left;
3307
+ sy = fcy;
3308
+ ex = dir > 0 ? t.left : t.right;
3309
+ ey = tcy;
3310
+ const span = Math.max(24, Math.abs(ex - sx) * 0.45);
3311
+ c1x = sx + dir * span; c1y = sy;
3312
+ c2x = ex - dir * span; c2y = ey;
3313
+ edge.axis = 'x';
3314
+ } else {
3315
+ // Adjacent rows can share a top/bottom boundary. Route through
3316
+ // the right gutter instead of collapsing to a zero-length loop.
3317
+ sx = f.right; sy = fcy;
3318
+ ex = t.right; ey = tcy;
3319
+ c1x = c2x = Math.max(f.right, t.right) + 40;
3320
+ c1y = sy; c2y = ey;
3321
+ edge.axis = 'y';
3322
+ }
3323
+ edge.s = [sx, sy];
3324
+ edge.c1 = [c1x, c1y];
3325
+ edge.c2 = [c2x, c2y];
3326
+ edge.e = [ex, ey];
3327
+ }
3328
+ // Parallel-edge offset: edges from the same row (or into the same
3329
+ // blocker row) share an anchor, so shift their control points apart
3330
+ // perpendicular to the travel axis (7px pitch, centred on the group).
3331
+ const fan = (pointField, idField, prefix) => {
3332
+ const groups = new Map();
3333
+ for (const edge of edges) {
3334
+ const id = prefix + edge[idField];
3335
+ if (!groups.has(id)) groups.set(id, []);
3336
+ groups.get(id).push(edge);
3337
+ }
3338
+ for (const group of groups.values()) {
3339
+ if (group.length < 2) continue;
3340
+ group.sort((a, b) => (a.key < b.key ? -1 : a.key > b.key ? 1 : 0));
3341
+ group.forEach((edge, index) => {
3342
+ const shift = (index - (group.length - 1) / 2) * 7;
3343
+ const point = edge[pointField];
3344
+ if (edge.axis === 'x') point[1] += shift;
3345
+ else point[0] += shift;
3346
+ });
3347
+ }
3348
+ };
3349
+ fan('c1', 'fromId', 's:');
3350
+ fan('c2', 'toId', 't:');
3351
+ const r1 = (value) => Math.round(value * 10) / 10;
3352
+ for (const edge of edges) {
3353
+ edge.d = 'M ' + r1(edge.s[0]) + ' ' + r1(edge.s[1])
3354
+ + ' C ' + r1(edge.c1[0]) + ' ' + r1(edge.c1[1])
3355
+ + ' ' + r1(edge.c2[0]) + ' ' + r1(edge.c2[1])
3356
+ + ' ' + r1(edge.e[0]) + ' ' + r1(edge.e[1]);
3357
+ edge.ex = edge.e[0];
3358
+ edge.ey = edge.e[1];
3359
+ delete edge.from;
3360
+ delete edge.to;
3361
+ delete edge.axis;
3362
+ }
3363
+ return edges;
3364
+ }
3365
+
3366
+ // Geometry freshness gate for the edge state: identical key/state sets with
3367
+ // every anchor within 0.5px need no redraw (rAF-throttled re-measure can
3368
+ // fire often; only a real move, state flip or live-toggle updates React).
3369
+ function taskEdgesEqual(prev, next) {
3370
+ if (prev === next) return true;
3371
+ if (!Array.isArray(prev) || !Array.isArray(next) || prev.length !== next.length) return false;
3372
+ for (let index = 0; index < prev.length; index++) {
3373
+ const a = prev[index];
3374
+ const b = next[index];
3375
+ if (a.key !== b.key || a.state !== b.state || !!a.live !== !!b.live) return false;
3376
+ for (const point of ['s', 'c1', 'c2', 'e']) {
3377
+ if (Math.abs(a[point][0] - b[point][0]) >= 0.5) return false;
3378
+ if (Math.abs(a[point][1] - b[point][1]) >= 0.5) return false;
3379
+ }
3380
+ }
3381
+ return true;
3382
+ }
3190
3383
  // #endregion connectors
3191
3384
 
3192
3385
  // ---------- the body ------------------------------------------------
@@ -3218,7 +3411,14 @@ window.__ModuleLoader__.load({
3218
3411
  // ---- measured connector layer (品字形 org chart) ----
3219
3412
  const treeRef = React.useRef(null);
3220
3413
  const leadRef = React.useRef(null);
3414
+ const panelRef = React.useRef(null);
3415
+ // Task list + live-owner set for the dependency-edge layer; measureLinks
3416
+ // reads them through refs because it is a stable callback (no deps) while
3417
+ // the task board changes every commit.
3418
+ const edgeDataRef = React.useRef({ tasks: [], live: new Set() });
3221
3419
  const [linkPaths, setLinkPaths] = React.useState([]);
3420
+ const [edges, setEdges] = React.useState([]);
3421
+ const [edgeCards, setEdgeCards] = React.useState([]);
3222
3422
  const measureLinks = React.useCallback(() => {
3223
3423
  const tree = treeRef.current;
3224
3424
  const leadEl = leadRef.current;
@@ -3229,9 +3429,28 @@ window.__ModuleLoader__.load({
3229
3429
  const paths = buildConnectorPaths(base, leadRect, nodes, -8);
3230
3430
  if (paths === null) return; // hidden pane: keep the last drawing, redraw on wake
3231
3431
  setLinkPaths((prev) => (prev.join(' ') === paths.join(' ') ? prev : paths));
3432
+ // Dependency edges: endpoints are the two task-row rects
3433
+ // (data-cabinet-task anchors) in overlay coordinates; a row that is
3434
+ // not rendered (or a task removed from the board) drops its edge.
3435
+ const rectById = new Map();
3436
+ for (const row of tree.querySelectorAll('[data-cabinet-task]')) {
3437
+ rectById.set(row.getAttribute('data-cabinet-task'), row.getBoundingClientRect());
3438
+ }
3439
+ const cards = Array.from(tree.querySelectorAll('.cabinet-card'), (card) => {
3440
+ const rect = card.getBoundingClientRect();
3441
+ return { left: rect.left - base.left, top: rect.top - base.top, width: rect.width, height: rect.height };
3442
+ });
3443
+ setEdgeCards((prev) => JSON.stringify(prev) === JSON.stringify(cards) ? prev : cards);
3444
+ const edgeData = edgeDataRef.current;
3445
+ const nextEdges = buildTaskEdges(base, edgeData.tasks, (id) => rectById.get(id) || null, (id) => edgeData.live.has(id));
3446
+ if (nextEdges === null) return;
3447
+ setEdges((prev) => (taskEdgesEqual(prev, nextEdges) ? prev : nextEdges));
3232
3448
  }, []);
3233
3449
  // Re-measure after every commit: React owns card content, so a bare
3234
3450
  // layout effect catches member/task/model changes without a dep list.
3451
+ // TaskLine's own state (the 「等待 N」chip toggle) re-renders only the
3452
+ // row subtree, so that height change is caught by the MutationObserver
3453
+ // below instead of this effect.
3235
3454
  React.useLayoutEffect(() => { measureLinks(); });
3236
3455
  const hasTeam = team !== undefined;
3237
3456
  React.useEffect(() => {
@@ -3252,8 +3471,10 @@ window.__ModuleLoader__.load({
3252
3471
  else clearTimeout(pending.id);
3253
3472
  pending = null;
3254
3473
  };
3255
- // container size, any DOM change inside it, and window resize all
3256
- // funnel into one rAF-throttled re-measure; none of them animate.
3474
+ // container size, any DOM change inside it (including the 「等待 N」
3475
+ // chip toggle, which mutates button text in place — characterData),
3476
+ // window resize and panel scroll all funnel into one rAF-throttled
3477
+ // re-measure; none of them animate.
3257
3478
  let ro = null;
3258
3479
  if (typeof ResizeObserver !== 'undefined') {
3259
3480
  ro = new ResizeObserver(schedule);
@@ -3262,15 +3483,25 @@ window.__ModuleLoader__.load({
3262
3483
  let mo = null;
3263
3484
  if (typeof MutationObserver !== 'undefined') {
3264
3485
  mo = new MutationObserver(schedule);
3265
- mo.observe(tree, { childList: true, subtree: true });
3486
+ mo.observe(tree, { childList: true, subtree: true, characterData: true });
3266
3487
  }
3267
3488
  window.addEventListener('resize', schedule);
3489
+ // The panel is the scroll container; scroll does not change relative
3490
+ // endpoints, but re-measuring keeps the layer honest if the browser
3491
+ // reports sub-pixel layout shifts while scrolling.
3492
+ const panel = panelRef.current;
3493
+ if (panel && typeof panel.addEventListener === 'function') {
3494
+ panel.addEventListener('scroll', schedule, { passive: true });
3495
+ }
3268
3496
  schedule();
3269
3497
  return () => {
3270
3498
  cancel();
3271
3499
  if (ro) ro.disconnect();
3272
3500
  if (mo) mo.disconnect();
3273
3501
  window.removeEventListener('resize', schedule);
3502
+ if (panel && typeof panel.removeEventListener === 'function') {
3503
+ panel.removeEventListener('scroll', schedule);
3504
+ }
3274
3505
  };
3275
3506
  }, [measureLinks, hasTeam]);
3276
3507
 
@@ -3289,6 +3520,22 @@ window.__ModuleLoader__.load({
3289
3520
  const taskById = new Map(tasks.map((task) => [task.id, task]));
3290
3521
  const blockerOf = (id) => taskById.get(id);
3291
3522
 
3523
+ // Edge-layer input: every live task plus the in_progress tasks whose
3524
+ // owner is actually running (the blocker's owner running makes its flow
3525
+ // edge bright/fast — same language as the cabinet-task-live pulse).
3526
+ const memberByName = new Map(members.map((member) => [member.name, member]));
3527
+ const edgeLead = members.find((member) => member.role === 'lead');
3528
+ const liveTaskIds = new Set();
3529
+ for (const task of tasks) {
3530
+ if (task.status !== 'in_progress' || !task.ownerName) continue;
3531
+ const member = memberByName.get(task.ownerName);
3532
+ const running = member ? runningOf(member.id)
3533
+ : (edgeLead && (task.ownerName === 'lead' || task.ownerName === edgeLead.name)) ? runningOf(edgeLead.id)
3534
+ : false;
3535
+ if (running) liveTaskIds.add(task.id);
3536
+ }
3537
+ edgeDataRef.current = { tasks, live: liveTaskIds };
3538
+
3292
3539
  const counts = { pending: 0, in_progress: 0, completed: 0 };
3293
3540
  for (const task of tasks) if (counts[task.status] !== undefined) counts[task.status] += 1;
3294
3541
 
@@ -3320,7 +3567,7 @@ window.__ModuleLoader__.load({
3320
3567
  style: { fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Consolas, monospace', fontSize: 11, wordBreak: 'break-all' }
3321
3568
  }, 'leadSessionId=' + String(leadSessionId) + (readSession === identityHook ? ' (useSession 未注入)' : ''))
3322
3569
  ]));
3323
- return h('div', { style: PANEL }, body);
3570
+ return h('div', { ref: panelRef, style: PANEL }, body);
3324
3571
  }
3325
3572
 
3326
3573
  const lead = members.find((member) => member.role === 'lead');
@@ -3376,6 +3623,9 @@ window.__ModuleLoader__.load({
3376
3623
  d,
3377
3624
  style: { fill: 'none', stroke: LINE, strokeWidth: 2, strokeLinecap: 'round' }
3378
3625
  }))),
3626
+ // dependency edges paint above the cards (endpoints sit on task rows
3627
+ // inside cards) but never take pointer events
3628
+ h(TaskEdgeLayer, { key: 'edges', edges, cards: edgeCards }),
3379
3629
  h('div', {
3380
3630
  key: 'leadwrap',
3381
3631
  ref: leadRef,
@@ -3409,7 +3659,7 @@ window.__ModuleLoader__.load({
3409
3659
  t: tt,
3410
3660
  // tasks live inside the card, elbow-connected by RailList
3411
3661
  children: own.length > 0
3412
- ? h(RailList, { style: { marginTop: 4 } }, own.map((task) => h(TaskLine, {
3662
+ ? h(RailList, { key: 'tasks', style: { marginTop: 4 } }, own.map((task) => h(TaskLine, {
3413
3663
  key: task.id,
3414
3664
  task,
3415
3665
  blockerOf,
@@ -3417,7 +3667,7 @@ window.__ModuleLoader__.load({
3417
3667
  taskLabel,
3418
3668
  ownerRunning: memberRunning
3419
3669
  })))
3420
- : h('div', { style: { fontSize: 11, color: INK3, padding: '2px 0' } }, tt('task.none'))
3670
+ : h('div', { key: 'tasks', style: { fontSize: 11, color: INK3, padding: '2px 0' } }, tt('task.none'))
3421
3671
  });
3422
3672
  } else {
3423
3673
  content = h('div', { className: 'cabinet-card', style: { position: 'relative', zIndex: 1 } }, [
@@ -3457,7 +3707,7 @@ window.__ModuleLoader__.load({
3457
3707
  ]))
3458
3708
  ]));
3459
3709
 
3460
- return h('div', { style: PANEL }, body);
3710
+ return h('div', { ref: panelRef, style: PANEL }, body);
3461
3711
  }
3462
3712
 
3463
3713
  // ---------- settings section: 内阁成员 ---------------------------------
package/cordis.patch.yml CHANGED
@@ -84,6 +84,8 @@
84
84
  disabled: !!js process.platform !== 'win32'
85
85
  - id: tool-fs
86
86
  name: '@deepseek-ai/dsh-tool-fs'
87
+ config:
88
+ applyPatch: false
87
89
  - id: tool-fs-search
88
90
  name: '@deepseek-ai/dsh-tool-fs-search'
89
91
  config:
@@ -146,14 +148,13 @@
146
148
  config:
147
149
  - id: tool-subagent-control
148
150
  name: '@deepseek-ai/dsh-tool-subagent-control'
149
- - id: tool-subagent-list-agents
150
- name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
151
151
  - id: tool-subagent
152
152
  name: '@deepseek-ai/dsh-tool-subagent'
153
153
  config:
154
154
  provider: spawn
155
155
  toolName: subagent
156
- modelSelectionSettings: true
156
+ modelSelection: true
157
+ modelDiscovery: true
157
158
  - id: tool-subagent-fork
158
159
  name: '@deepseek-ai/dsh-tool-subagent'
159
160
  config:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-cabinet-mode",
3
- "version": "0.4.1",
3
+ "version": "0.5.1",
4
4
  "description": "Cabinet Mode (内阁模式) for DeepSeek Harness: a declarative DSH bundle that adds a dual-identity Lead/teammate agent preset for the Great Ming Research Bureau cabinet team.",
5
5
  "license": "MIT",
6
6
  "icon": "./icon.svg",
@@ -7,6 +7,7 @@ const source = readFileSync(new URL('../client.js', import.meta.url), 'utf8');
7
7
  const exportPoint = 'return { inject, apply };';
8
8
  assert.equal(source.split(exportPoint).length, 2);
9
9
  const React = {
10
+ useId: () => 'test-mask',
10
11
  createElement: (type, props, ...children) => ({ type, props, children }),
11
12
  useRef: () => ({ current: null }),
12
13
  useState: (initial) => [initial, () => {}],
@@ -14,7 +15,7 @@ const React = {
14
15
  useLayoutEffect: () => {}, useEffect: () => {},
15
16
  };
16
17
  runInNewContext(source.replace(exportPoint,
17
- 'return { inject, apply, avatarFor, displayName, CabinetPanel, MemberCard, TaskLine, zh, en, BUREAUX, AVATARS, setMemberConfig, memberLabel, configuredAvatar, configuredPrompt, factoryPromptFor, DEFAULT_MEMBER_PROMPTS, DEFAULT_LEAD_PROMPT };'), {
18
+ 'return { inject, apply, avatarFor, displayName, CabinetPanel, MemberCard, TaskLine, TaskEdgeLayer, buildTaskEdges, taskEdgesEqual, zh, en, BUREAUX, AVATARS, setMemberConfig, memberLabel, configuredAvatar, configuredPrompt, factoryPromptFor, DEFAULT_MEMBER_PROMPTS, DEFAULT_LEAD_PROMPT };'), {
18
19
  window: { __ModuleLoader__: { load: ({ factory }) => {
19
20
  client = factory((name) => { assert.equal(name, 'react'); return React; });
20
21
  } } },
@@ -157,4 +158,136 @@ for (const name of ['lead', 'hanlin-bianxiu', 'gongbu-zhushi', 'dalisi-pingshi',
157
158
  const card = elements(client.MemberCard({member:{name,phase:'active'},statusLabel:s=>s}));
158
159
  assert.ok(card.some(n=>n.type==='img' && n.props.src===client.avatarFor(name)), name);
159
160
  }
161
+ // --- task dependency edges: cross-member blockedBy wires with three states ---
162
+ const edgeRect = (left, top) => ({ left, top, right: left + 140, bottom: top + 26, width: 140, height: 26 });
163
+ const edgeRects = new Map([
164
+ ['t-research', edgeRect(20, 200)], // hanlin, completed blocker
165
+ ['t-build', edgeRect(300, 60)], // works, in_progress blocker (owner running)
166
+ ['t-audit', edgeRect(300, 200)], // dali, pending blocker
167
+ ['t-extra', edgeRect(20, 60)], // yushi
168
+ ['t-report', edgeRect(560, 60)], // cross-row source sharing both endpoints
169
+ ]);
170
+ const edgeTasks = [
171
+ { id: 't-research', subject: '调研', ownerName: 'hanlin', status: 'completed' },
172
+ { id: 't-build', subject: '实现', ownerName: 'works', status: 'in_progress', blockedBy: ['t-research', 't-ghost'] },
173
+ { id: 't-audit', subject: '审核', ownerName: 'dali', status: 'pending', blockedBy: ['t-build'] },
174
+ { id: 't-extra', subject: '归档', ownerName: 'yushi', status: 'pending', blockedBy: ['t-audit'] },
175
+ { id: 't-report', subject: '复核', ownerName: 'hanlin', status: 'pending', blockedBy: ['t-research', 't-audit'] },
176
+ ];
177
+ const edgeBase = { left: 0, top: 0, width: 800, height: 400 };
178
+ const edgeRectOf = (id) => edgeRects.get(id) || null;
179
+ const built = client.buildTaskEdges(edgeBase, edgeTasks, edgeRectOf, (id) => id === 't-build');
180
+ assert.equal(built.length, 5, 'one edge per resolvable blocker; t-ghost is missing and draws nothing');
181
+ assert.deepEqual(Array.from(built, (edge) => edge.key).sort(), [
182
+ 't-audit->t-build', 't-build->t-research', 't-extra->t-audit', 't-report->t-audit', 't-report->t-research',
183
+ ], 'edges come from the vm realm; compare as host arrays');
184
+ const stateByKey = Object.fromEntries(built.map((edge) => [edge.key, edge.state]));
185
+ assert.equal(stateByKey['t-build->t-research'], 'done', 'completed blocker → done');
186
+ assert.equal(stateByKey['t-audit->t-build'], 'active', 'in_progress blocker → active');
187
+ assert.equal(stateByKey['t-extra->t-audit'], 'pending', 'pending blocker → pending');
188
+ const liveByKey = Object.fromEntries(built.map((edge) => [edge.key, edge.live]));
189
+ assert.equal(liveByKey['t-audit->t-build'], true, "blocker's owner running lights the flow edge");
190
+ assert.equal(liveByKey['t-build->t-research'], false, 'done edges never animate');
191
+ for (const edge of built) {
192
+ assert.match(edge.d, /^M -?[\d.]+ -?[\d.]+ C -?[\d.]+ -?[\d.]+ -?[\d.]+ -?[\d.]+ -?[\d.]+ -?[\d.]+$/, edge.key);
193
+ assert.equal(typeof edge.ex, 'number', edge.key);
194
+ assert.equal(typeof edge.ey, 'number', edge.key);
195
+ }
196
+ // hidden panel (zero-size base) keeps the last drawing, like the org connectors
197
+ assert.equal(client.buildTaskEdges({ left: 0, top: 0, width: 0, height: 0 }, edgeTasks, edgeRectOf, () => false), null);
198
+ // a task removed from the board leaves no dangling edge to or from it
199
+ const withoutAudit = edgeTasks.filter((task) => task.id !== 't-audit');
200
+ const orphaned = client.buildTaskEdges(edgeBase, withoutAudit, edgeRectOf, () => false);
201
+ assert.equal(orphaned.length, 2, 'blocker rows that no longer exist are skipped, not crashed on');
202
+ assert.ok(orphaned.every((edge) => !edge.key.includes('t-audit->') && edge.key !== 't-extra->t-audit' && edge.key !== 't-report->t-audit'));
203
+ // duplicated blocker ids inside one task collapse into a single edge
204
+ const dup = client.buildTaskEdges(edgeBase,
205
+ [{ id: 'a', subject: 'a', ownerName: 'hanlin', status: 'pending', blockedBy: ['b', 'b'] },
206
+ { id: 'b', subject: 'b', ownerName: 'works', status: 'completed' }],
207
+ (id) => edgeRects.get(id === 'a' ? 't-extra' : 't-build') || null, () => false);
208
+ assert.equal(dup.length, 1, 'duplicate blockedBy entries draw once');
209
+ // geometry freshness: <0.5px is noise, a real move or a state flip redraws
210
+ const rebuilt = client.buildTaskEdges(edgeBase, edgeTasks, edgeRectOf, (id) => id === 't-build');
211
+ assert.ok(client.taskEdgesEqual(built, rebuilt), 'identical rects need no redraw');
212
+ const nudgedRects = new Map(edgeRects);
213
+ nudgedRects.set('t-build', edgeRect(300.3, 60.2));
214
+ const nudged = client.buildTaskEdges(edgeBase, edgeTasks, (id) => nudgedRects.get(id) || null, (id) => id === 't-build');
215
+ assert.ok(client.taskEdgesEqual(built, nudged), 'a <0.5px rect change must not redraw');
216
+ const shiftedRects = new Map(edgeRects);
217
+ shiftedRects.set('t-build', edgeRect(340, 60));
218
+ const shifted = client.buildTaskEdges(edgeBase, edgeTasks, (id) => shiftedRects.get(id) || null, (id) => id === 't-build');
219
+ assert.ok(!client.taskEdgesEqual(built, shifted), 'a real move must trigger a redraw');
220
+ const progressed = edgeTasks.map((task) => (task.id === 't-audit' ? { ...task, status: 'in_progress' } : task));
221
+ const progressedEdges = client.buildTaskEdges(edgeBase, progressed, edgeRectOf, () => false);
222
+ assert.ok(!client.taskEdgesEqual(built, progressedEdges), 'a blocker status change must switch the edge state');
223
+ // rendered overlay: one path + one dot per edge, data attribute and state class
224
+ const layerEls = elements(client.TaskEdgeLayer({ edges: built }));
225
+ const edgePaths = layerEls.filter((node) => node.type === 'path');
226
+ assert.equal(edgePaths.length, 5, 'one path per dependency edge');
227
+ for (const path of edgePaths) {
228
+ assert.match(path.props['data-cabinet-edge'], /^[^\s]+->[^\s]+$/, 'data-cabinet-edge is "<blockedId>-><blockerId>"');
229
+ assert.ok(/^cabinet-edge cabinet-edge-(pending|active|done)\b/.test(path.props.className), path.props.className);
230
+ }
231
+ const classByKey = Object.fromEntries(edgePaths.map((path) => [path.props['data-cabinet-edge'], path.props.className]));
232
+ assert.ok(classByKey['t-build->t-research'].includes('cabinet-edge-done'), classByKey['t-build->t-research']);
233
+ assert.ok(classByKey['t-audit->t-build'].includes('cabinet-edge-active'), classByKey['t-audit->t-build']);
234
+ assert.ok(classByKey['t-audit->t-build'].includes('cabinet-edge-live'), 'running-owner flow edge is distinguishable');
235
+ assert.ok(classByKey['t-extra->t-audit'].includes('cabinet-edge-pending'), classByKey['t-extra->t-audit']);
236
+ const edgeDots = layerEls.filter((node) => node.type === 'circle');
237
+ assert.equal(edgeDots.length, 5, 'every edge ends in a dot on the blocker side');
238
+ assert.ok(edgeDots.every((dot) => dot.props['data-cabinet-edge-dot'].includes('->')));
239
+ assert.equal(client.TaskEdgeLayer({ edges: [] }), null, 'no edges → no overlay layer');
240
+ // panel render: cross-member tasks all expose measurement anchors, no premature edges
241
+ const depTeam = {
242
+ members: [
243
+ { id: 'm-lead', name: 'lead', role: 'lead', phase: 'active' },
244
+ { id: 'm-hanlin', name: 'hanlin', role: 'mate', phase: 'active' },
245
+ { id: 'm-works', name: 'works', role: 'mate', phase: 'active' },
246
+ ],
247
+ tasks: edgeTasks,
248
+ };
249
+ const depEls = elements(render(depTeam, client.zh));
250
+ const anchored = depEls.filter((node) => node.props && 'data-cabinet-task' in node.props);
251
+ assert.equal(anchored.length, edgeTasks.length, 'every task row carries a data-cabinet-task anchor');
252
+ assert.deepEqual(anchored.map((node) => node.props['data-cabinet-task']).sort(), edgeTasks.map((task) => task.id).sort());
253
+ assert.ok(!depEls.some((node) => node.props && 'data-cabinet-edge' in node.props),
254
+ 'edges are drawn only after measurement, never from stale render state');
255
+ // TaskLine forwards the anchor id through Row onto the row element
256
+ const depLine = client.TaskLine({
257
+ task: edgeTasks[1],
258
+ blockerOf: (id) => edgeTasks.find((task) => task.id === id),
259
+ t: (key) => key,
260
+ taskLabel: (status) => status,
261
+ });
262
+ const rowEl = elements(depLine).find((node) => node.props && 'data-cabinet-task' in node.props);
263
+ assert.equal(rowEl.props['data-cabinet-task'], 't-build');
264
+ // reduced-motion + palette: CSS keeps the static line, kills only the flow
265
+ const reducedLines = source.split('\n').filter((line) => line.includes('prefers-reduced-motion'));
266
+ const reducedMedia = reducedLines.find((line) => line.includes('@media'));
267
+ assert.ok(reducedMedia, 'a prefers-reduced-motion media query must exist');
268
+ assert.ok(reducedMedia.includes('.cabinet-edge-active') && reducedMedia.includes('animation:none'),
269
+ 'flow animation stands still under prefers-reduced-motion while the dashed line stays');
270
+ assert.ok(source.includes('.cabinet-edge-done{stroke:light-dark(#15803d,#4ade80)}'), 'done edge has theme-specific green contrast');
271
+ assert.ok(source.includes('.cabinet-edge-pending{stroke:light-dark(#6b7280,#9ca3af)'), 'pending edge is static grey');
272
+ assert.ok(source.includes('cabinetEdgeFlow'), 'active edge gets the dash-offset flow');
160
273
  console.log('PASS: avatars, stale-team warnings, and distinct member/owner/group identities; mocked React, not browser E2E');
274
+ console.log('PASS: task dependency edges — data attributes, three states, missing-blocker tolerance, reduced-motion CSS, geometry refresh gate');
275
+
276
+ // IDs are opaque; delimiter-bearing pairs must not collide or inject markup.
277
+ const special = client.buildTaskEdges(edgeBase, [
278
+ {id:'a->b',blockedBy:['c','c']}, {id:'a',blockedBy:['b->c']},
279
+ {id:'c'}, {id:'b->c'}, null, {id:'deleted',status:'deleted',blockedBy:['c']},
280
+ {id:'self',blockedBy:['self']}
281
+ ], () => edgeRect(20,20));
282
+ assert.equal(special.length,2);
283
+ assert.equal(new Set(special.map(e=>e.key)).size,2);
284
+ assert.equal(client.buildTaskEdges(edgeBase,[{id:'\ud800',blockedBy:['c']},{id:'c'}],()=>edgeRect(20,20)).length,1);
285
+ const masked = elements(client.TaskEdgeLayer({edges:built,cards:[{left:300,top:200,width:140,height:26}]}));
286
+ assert.ok(masked.filter(e=>e.type==='path').every(e=>e.props.mask==='url(#test-mask)'));
287
+ assert.ok(masked.some(e=>e.type==='rect' && e.props.fill==='black' && e.props.x===300));
288
+ console.log('PASS: opaque IDs, malformed/deleted/self dependency filtering and card-content masks');
289
+
290
+ const adjacent=client.buildTaskEdges(edgeBase,[{id:'top'},{id:'bottom',blockedBy:['top']}],id=>edgeRect(20,id==='top'?100:126));
291
+ assert.equal(adjacent.length,1);assert.notEqual(adjacent[0].s[1],adjacent[0].e[1]);
292
+ assert.ok(adjacent[0].c1[0]>adjacent[0].s[0]);
293
+ console.log('PASS: adjacent same-column rows retain a nonzero gutter curve');
@@ -36,7 +36,7 @@ import { tmpdir } from 'node:os';
36
36
  const ROOT = fileURLToPath(new URL('..', import.meta.url));
37
37
  const PATCH_PATH = join(ROOT, 'cordis.patch.yml');
38
38
  const PACKAGE_PATH = join(ROOT, 'package.json');
39
- const TESTS_ON = '0.2.1-rc.3';
39
+ const TESTS_ON = '0.2.2-rc.1';
40
40
  const EXPECTED_PLUGINS = [
41
41
  'persona', 'agent-instructions', 'time-context', 'tool-bash', 'tool-pwsh',
42
42
  'tool-fs', 'tool-fs-search', 'tool-jobs', 'tool-schedule',