dsh-workplan 3.0.3 → 3.0.6

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
@@ -1,3 +1,57 @@
1
+ ## 3.0.6 — 2026-11-18(审计后第 1–4 批:数据安全、并发排队、看板开销、收尾闸门与复审修复)
2
+
3
+ - **永久记忆不再可能被整体清空**:`recordLesson` 读文件失败(EACCES/EMFILE/EIO/路径被目录占用)时直接抛 `LESSONS_READ_FAILED` 并拒绝写入,不再把“读失败”当成“空文件”后覆盖;重写时把无法解析的坏行原样带回文件末尾;覆盖前留一代 `<file>.bak`。
4
+ - **journal 回读不再误报成功为失败**:写后校验从“只看末 5 行”改为全文件定位本次写入,避免并发追加把刚写入的行挤出窗口后误报 `JOURNAL_READBACK_FAILED`、调用方重试又重复写一条。
5
+ - **看板响应上限按字节计**:`body.length` 改为 `Buffer.byteLength`,截断后复检;先减会话数,再丢单会话大块明细,最后只留摘要,任何一级都返回合法 JSON。
6
+ - **鉴权 fail-closed**:`connection.requestRejection` 不存在时返回 503,不再因可选链静默放行全部会话计划。
7
+ - **文档更正**:README 不再声称“不写磁盘”“并发固定 5 个”;如实写明 journal/lessons 两类落盘文件,以及 5 个/轮 + 宿主 `maxActiveSubagents`(默认 8)的真实并发边界。
8
+ - **回归**:新增 4 例(读失败拒写、坏行保留 + `.bak`、字节截断、未超限原样返回);全量 **1218 例:pass 1217 / fail 0 / cancelled 0**(1 例 todo)。
9
+
10
+ ### 第 2 批:并发上限排队、看板轮询合并、静态资源缓存、留痕可选清理
11
+
12
+ - **撞宿主并发上限不再直接判失败**:新增 `startActivationQueued`,三处 `subagents.startActivation`(主导派发、自配档接续、成员派发)撞 `ACTIVATION_LIMIT_REACHED` 时按指数退避(1s→15s)+ 全局冷却等待空位,最多等 10 分钟;等待期间不写失败状态、不消耗子任务 attempt,取消时抛 `ABORTED`,等满才如实报“仍未等到空位”。
13
+ - **看板轮询按会话共享**:同一 `sessionId`(或“全部会话”)只保留一个 4 秒轮询器和一组订阅者,最后一个订阅者卸载时停止;不再每个 `TurnCard` 各发一份请求。
14
+ - **图表库只读一次**:`/dsh-workplan/vendor/chart.umd.js` 首次读取后缓存 Buffer,后续请求不再每次 `readFileSync` 210KB;读取失败不缓存,仍可重试。
15
+ - **留痕可选清理(默认关闭)**:新增 `journalRetentionDays` / `DSH_WORKPLAN_JOURNAL_RETENTION_DAYS`,默认 0 = 永久保留;正数时启动及每 24 小时删除超过该天数未更新的合法 `<planId>.jsonl`(跳过符号链接,单次最多 200 个最旧文件)。
16
+ - **回归**:新增 4 例并发排队 + 5 例留痕清理 + handle-policy 白名单登记;全量 **1227 例:pass 1226 / fail 0 / cancelled 0**(1 例 todo),`npm run build` 已同步 `lib/`。
17
+
18
+ ### 第 3 批:收尾等待上限、专用通知台账、结构化门禁死锁修复
19
+
20
+ - **回合收尾不再无限等待**:`agent/turn-stopping` 等待在途规划/派发新增上限 `turnStoppingMaxWaitMs` / `DSH_WORKPLAN_TURN_STOPPING_MAX_WAIT_MS`(默认 60 分钟,0 = 无限旧行为)。到点不杀任务:计划仍在后台执行、结果照常落盘;交互式按「等待预算耗尽」放行但留痕(`releasedIncomplete.reason='wait-exhausted'` + 每回合至多一条通知),fail-closed(headless)抛 `WORKPLAN_WAIT_EXHAUSTED` 并以错误收尾。只约束收尾等待,不构成部门/专家执行时限。
21
+ - **专用通知台账**:宿主禁止插件新增 Session 事件类型(重启会拒开)且 `appendPluginRecord` 保留给实验包,故通知权威流落在插件自有 JSONL(默认 `~/.dsh/workplan/notices.jsonl`,`DSH_WORKPLAN_NOTICES_FILE` 可覆盖):`appendUserMessage` 每次成功落盘 workplan 通知即同步记一行(sessionId/planId/kind/form/summary/text + 对应 surface seq),与用户真实输入彻底分离;写失败不拖垮投递,失败行进内存环形缓冲(上限 100)下次补落,绝不静默丢弃。
22
+ - **结构化门禁死锁修复**:复杂任务按裁决强制 ≥8 名专家(上限 12),而部门汇总 `sources` 必须逐人覆盖全部已派发专家——旧实现把 `sources` 也卡 6 条精简上限,7–12 人的部门永远交不出合法汇总。现 `sources` 单独放宽到 16 条(其余三个数组仍 6 条),契约文案同步。
23
+ - **回归**:新增 4 例收尾等待上限 + 5 例通知台账 + 1 例 sources 覆盖(12 人通过 / 其余数组仍限 6 条 / 第 17 人仍拒);测试进程全局隔离台账路径;全量 **1237 例:pass 1236 / fail 0 / cancelled 0**(1 例 todo),`npm run build` 已同步 `lib/`。
24
+
25
+ ### 第 4 批:复审修复(自引入回归 + 高危缺口 + 中危加固)
26
+
27
+ **自引入回归(第 1–3 批的收尾)**
28
+ - **journal 回读 O(n²) → O(窗口)**:写后校验不再全文件重读,只读末尾 64KB 窗口内定位本次写入(O_APPEND 保证新行必在末尾);单行体积超窗口的极端情形会在错误信息里如实呈现末 5 行摘要。
29
+ - **通知台账有界且加固**:新增 `NOTICE_LEDGER_MAX_LINES = 5000`(`DSH_WORKPLAN_NOTICES_MAX_LINES` 可覆盖),超限原子重写为最新 N 行;目录 0o700、文件 0o600,写前 lstat 防符号链接投毒(跳过 + warn,不抛错)。
30
+ - **等待耗尽标志按派发实例复位**:三处 `dispatchPromise` 赋值前清零 `turnWaitExhausted`/`waitExhaustedNotifiedTurn`,同一记录再次派发不再被"零预算"秒放行、不再每回合误发上限通知。
31
+ - **F11 文案与门禁同源**:下发部门负责人的 comm-format 文本改为「keyResults/keyInfo/importantInfo 每项最多 6 条;sources 最多 16 条且必须逐人覆盖」,不再与放宽后的门禁相互矛盾。
32
+
33
+ **高危缺口**
34
+ - **僵尸 in_progress 回收**:重启/崩溃回放时,无人调度且失联的 in_progress 行降级为 blocked(留痕 + warn),既有重置/重派路径可接管,不再永远"正在做";cancelled/superseded 计划的历史留痕原样回放不受影响。
35
+ - **salvaged 半截计划不再自动派发**:规划器只抢救出残缺结果时暂停自动执行,给用户一条可见通知,确认后再 `workplan_dispatch`。
36
+ - **bash 写保护绕过封堵**:`fileWriteGuardReason` 新增 shell 命令启发式(`>`/`>>`/heredoc、`tee`、`sed -i`、`mv`/`cp`/`install` 目标位、`dd of=`,按 `&&`/`;`/`|` 分段、去引号、20k 截断),已交付文件不能再用 bash 原地改写;只读命令不拦。
37
+ - **认可闸门否定/引用识别**:命中点前 40 字符窗口内出现否定词(不用/无需/不必/勿/别/禁止…)、制度转述词(原文/制度/规定/条款)或引号包裹时不再误触发,「不用经用户认可再执行」与粘贴的规章原文不再把计划按住。
38
+ - **澄清闸轮次上限**:同一会话连续 2 轮触发澄清后放行进入规划(30 分钟无触发自动归零 + `resetClarifyRounds` 导出),不再「越简短回答越问不出计划」的活锁。
39
+ - **看板三处**:`/plans` 轮询 15 秒超时(超时走错误路径 + 警告横幅,不再永久冻结)、后台标签页暂停轮询(回前台补一轮)、服务端截断标志(`truncated`/`omittedSessions`/`omittedDetail`)不再被前端丢弃,裁剪时看板显示"部分数据已省略"提示。
40
+
41
+ **中危加固**
42
+ - **lessons 仅限根会话**:`dsh_workplan_lessons` 增加根会话硬校验,子 Agent(含其他插件拉起的会话)不再能读全局跨项目经验文件。
43
+ - **本地文件权限收紧**:journal/lessons/notice-ledger 写路径统一 0o600 文件 + 0o700 目录 + 写前符号链接校验(lessons 遇符号链接抛 `LESSONS_WRITE_REFUSED`)。
44
+ - **原子门英文盲区**:句末符补英文句点(后跟空白/结尾才算,版本号 a.ts/1.12.0 不误伤)、并列词补 并/然后/接着/再(否定/频率语境不误伤);报错如实报告截断后长度。
45
+ - **验收措辞归一化**:覆盖匹配前对验收项与子 Agent 文本做全角折叠、完成态前缀剥离(已完成/完成/已/done/yes)、标点空白归一,「换个措辞就永远 missing」的无限退回关闭;three-phase 私有副本同步。
46
+ - **prune 增强**:清理排除当前活跃计划(不再误删"活跃但安静"的审计留痕)、unlink 失败逐条 warn + `errors` 留痕、首次清理挪出激活路径(启动 10 秒后,随插件卸载清除)。
47
+ - **回归**:新增 77 例(journal/ledger 9、wait-cap 1、comm-format 1、client 轮询 7、认可闸门 14、澄清闸 14、原子门 6、验收归一化 8、lessons 守卫 9、zombie 2、salvaged 2、bash 守卫 22、prune 4 等);全量 **1327 例:pass 1326 / fail 0 / cancelled 0**(1 例 todo),`npm test` 内置 build 已同步 `lib/`。
48
+
49
+ ## 3.0.5 — 2026-11-17
50
+
51
+ - **机制改进(用户四步闭环)**:第三层专家遇阻必须 `dsh_workplan_escalate` 向部门负责人请示;负责人在答复前必须全面梳理该问题与本部门全部已派发任务执行状态、研究方案,并用 `dsh_workplan_instruct` 把决定投回原专家;原专家继续执行。
52
+ - **硬闸门**:任一第三层成员待指示时,`dsh_workplan_delegate` 的 `review/dispatch/direct` 一律拒绝改派/重派/降级(`DELEGATE_ESCALATION_OPEN`);`dsh_workplan_instruct` 只允许答复已请示成员(`NOT_ESCALATED`),投递成功后原专家恢复执行。
53
+ - **回归**:新增 `tests/workplan-305-escalation-owner-continuity.test.ts`,并同步负责人 brief、专家任务书、工具描述与版本口径到 3.0.5。
54
+
1
55
  ## 3.0.3 — 2026-11-17
2
56
 
3
57
  - release v3.0.3: latest source + version publish
package/README.en.md CHANGED
@@ -3,12 +3,12 @@
3
3
  > **Two selling points, one line: a full ISO/IEC 15408:2026 evidence pack you can verify with 5 commands, and a one-command install with zero runtime dependencies.**
4
4
 
5
5
  [![verify](https://github.com/abbaababa/dsh-workplan/actions/workflows/verify.yml/badge.svg)](https://github.com/abbaababa/dsh-workplan/actions/workflows/verify.yml)
6
- [![version](https://img.shields.io/badge/version-3.0.3-blue.svg)](https://github.com/abbaababa/dsh-workplan/releases/tag/v3.0.3)
6
+ [![version](https://img.shields.io/badge/version-3.0.6-blue.svg)](https://github.com/abbaababa/dsh-workplan/releases/tag/v3.0.6)
7
7
 
8
8
  Adds "plan first → dispatch real department subagents → watch progress in the sidebar" to **DeepSeek Harness (DSH)**. No app, no DSH source patch, no page replacement.
9
9
 
10
10
  - A task-decomposition block appears in the conversation first: stages, work items, departments, acceptance criteria
11
- - Up to 5 real subagents run in parallel and write results back into the session
11
+ - Up to 5 department leads start per round; the whole session tree is capped by the host's `maxActiveSubagents` (default 8)
12
12
  - The **Task progress** panel shows who is working, how far, and what is stuck
13
13
 
14
14
  **中文(简体)说明:** [README.md](README.md)
@@ -52,7 +52,7 @@ For every new task with a real goal, the plugin inserts three beats:
52
52
 
53
53
  1. **Plan before acting.** Before the model's first step, it writes a plan: stages → concrete work items → which department owns each one → how to do it → what counts as done → what could go wrong.
54
54
  2. **Show the plan first.** The plan appears in the conversation as a task-decomposition block, so you can see the reasoning and acceptance criteria instead of a one-line promise.
55
- 3. **Dispatch real work.** Each work item is handed to a **real DSH subagent** (up to 5 at a time), and results are written back to the session. The main agent must dispatch and wait for the department results before it continues.
55
+ 3. **Dispatch real work.** Each work item is handed to a **real DSH subagent** (up to 5 leads per round; leads may spawn experts, and the whole tree is capped by the host's `maxActiveSubagents`, default 8), and results are written back to the session. The main agent must dispatch and wait for the department results before it continues.
56
56
 
57
57
  Greetings, thanks, and status questions ("how far along are we?") do not trigger a plan.
58
58
 
@@ -80,7 +80,7 @@ The full contract — roles, data shapes, state machine, recovery, and the three
80
80
  ## Install
81
81
 
82
82
  ```bash
83
- dsh plugin --profile web add dsh-workplan@3.0.3
83
+ dsh plugin --profile web add dsh-workplan@3.0.6
84
84
  ```
85
85
 
86
86
  Restart the DSH Web process (or reload the page) so the bundle is picked up.
@@ -151,7 +151,7 @@ A passing retrospective is appended to the **permanent lesson memory** at `~/.ds
151
151
  | Planner stall window | 90 s of missing output after streaming starts; transport health only | `DSH_WORKPLAN_PLANNER_IDLE_TIMEOUT_MS` |
152
152
  | Planner absolute ceiling | 15 min; planning only | Scales with `…_PLANNER_TIMEOUT_MS` |
153
153
  | Automatic resumes | 2; non-time pause recovery, not an execution clock | `DSH_WORKPLAN_MAX_RESUMES` |
154
- | Subagent concurrency | 5 (fixed) | — |
154
+ | Subagent concurrency | **Up to 5 leads per round**; the whole tree is capped by the host's `maxActiveSubagents` (default 8) | — |
155
155
 
156
156
  Individual model connections, Bash commands, and disposal waits retain their local health checks; they are not department task deadlines. Without automatic time-based termination, genuinely stuck work can keep consuming concurrency and spend, so use the dashboard/`status` and explicitly cancel or redirect it. Legacy deadlines, extension journals, timeout counts, and criterion fields remain readable history but never arm new timers.
157
157
 
@@ -161,10 +161,17 @@ Non-time settings can still be placed in the plugin config:
161
161
  { "maxResumes": 2 }
162
162
  ```
163
163
 
164
+ The plan journal is kept **forever** by default. Only when a positive retention is configured does the plugin prune `<planId>.jsonl` files untouched for that many days, at startup and every 24 hours (at most 200 oldest files per run; active plans keep appending and are never pruned):
165
+
166
+ ```jsonc
167
+ { "journalRetentionDays": 90 }
168
+ // same as DSH_WORKPLAN_JOURNAL_RETENTION_DAYS=90
169
+ ```
170
+
164
171
  ## Security and privacy
165
172
 
166
173
  - **No third-party runtime dependencies** — `dependencies` is empty.
167
- - **No filesystem writes** — no `writeFileSync` / `appendFileSync` / `mkdirSync` in `src/`; results go into the DSH session record.
174
+ - **Writes only two local file families, never your project** — ① `~/.dsh/workplan/journal/<planId>.jsonl` (plan journal); ② `~/.dsh/workplan/lessons.jsonl` (permanent lessons). Both paths can be overridden by env vars; `appendFileSync` / `writeFileSync` appear only in `dept-journal.ts` and `lessons.ts`.
168
175
  - **No outbound traffic** — no `child_process`, no external `fetch`/`http.request`; the one `fetch` is the browser asking its own origin for `/dsh-workplan/plans`.
169
176
  - **The panel route is authenticated** — unauthenticated requests get 401.
170
177
  - **Chart.js is vendored** (`vendor/chart.umd.js`, MIT); no CDN script is loaded.
@@ -173,7 +180,8 @@ Verify it yourself:
173
180
 
174
181
  ```bash
175
182
  npm view dsh-workplan@latest dependencies
176
- grep -RInE "writeFileSync|child_process|eval\(" src
183
+ grep -RInE "child_process|eval\(" src
184
+ grep -RIn "appendFileSync\|writeFileSync" src # only dept-journal.ts and lessons.ts
177
185
  npm audit --omit=dev
178
186
  ```
179
187
 
package/README.md CHANGED
@@ -3,12 +3,12 @@
3
3
  > **两个卖点,一句话:ISO/IEC 15408:2026 全套安全证据,5 条命令自己验;安装一条命令、零第三方运行时依赖。**
4
4
 
5
5
  [![verify](https://github.com/abbaababa/dsh-workplan/actions/workflows/verify.yml/badge.svg)](https://github.com/abbaababa/dsh-workplan/actions/workflows/verify.yml)
6
- [![version](https://img.shields.io/badge/version-3.0.3-blue.svg)](https://github.com/abbaababa/dsh-workplan/releases/tag/v3.0.3)
6
+ [![version](https://img.shields.io/badge/version-3.0.6-blue.svg)](https://github.com/abbaababa/dsh-workplan/releases/tag/v3.0.6)
7
7
 
8
8
  给 **DeepSeek Harness(DSH)** 加一段「先拆计划 → 真派部门子 Agent 去做 → 左侧栏实时看进度」的能力。不装 App、不改 DSH 源码、不换页面。
9
9
 
10
10
  - 对话里先出【任务分解】:阶段、子任务、部门、验收标准,一样不缺
11
- - 最多 5 个真实子 Agent 并行执行,结果写回会话
11
+ - 每轮最多 5 个部门负责人并行启动;负责人还会再派专家,整棵会话树同时活跃的子 Agent 受宿主 `maxActiveSubagents` 约束(默认 8)
12
12
  - 左侧栏「任务进度」:谁在做、做到哪、哪件卡住了
13
13
 
14
14
  **English (US) — plain-language guide:** [README.en.md](README.en.md)
@@ -54,7 +54,7 @@ grep -RInE "child_process|execSync|eval\(|writeFileSync" src || echo "0 命中
54
54
 
55
55
  1. **先排计划**:你发出任务后、AI 真正动手前,它先写一份计划——分几个阶段、每个阶段几件具体工作、每件工作交给哪个部门、怎么做、什么算做完、可能卡在哪。
56
56
  2. **计划先给你看**:这份计划以「任务分解」的形式出现在对话里,包含每一步的依据与验收标准,而不是一句话糊过去。
57
- 3. **真的派人去做**:确认后,每一件具体工作交给一个**真实的 DSH 子 Agent** 去执行(最多 5 个同时跑),结果写回会话;你在左侧栏「任务进度」里随时能看到谁在做、做到哪、哪件卡住了。
57
+ 3. **真的派人去做**:确认后,每一件具体工作交给一个**真实的 DSH 子 Agent** 去执行(每轮最多 5 个负责人同时启动;负责人再派专家,整棵树受宿主上限约束,默认 8),结果写回会话;你在左侧栏「任务进度」里随时能看到谁在做、做到哪、哪件卡住了。
58
58
 
59
59
  计划不是装饰品:主 Agent 必须先派发、等到部门结果回来,才能继续往下答。
60
60
 
@@ -69,7 +69,7 @@ grep -RInE "child_process|execSync|eval\(|writeFileSync" src || echo "0 命中
69
69
  ## 一键安装
70
70
 
71
71
  ```bash
72
- dsh plugin --profile web add dsh-workplan@3.0.3
72
+ dsh plugin --profile web add dsh-workplan@3.0.6
73
73
  ```
74
74
 
75
75
  装完**重启一次 DSH Web**(或重新载入当前页面)让插件生效。
@@ -114,7 +114,7 @@ dsh plugin --profile web add "$(pwd)"
114
114
  | `dsh_workplan_handoff` | 处置跨部门需求:`list` / `assign` / `resolve` / `close`。未处置会拦住交付;对「待指示」的行 `resolve` 会直接把答复投递给子会话。 |
115
115
  | `dsh_workplan_followup` | 给已中止或暂停、但产物已落盘的直接子会话补一条收尾说明。 |
116
116
  | `dsh_workplan_verify` | 子 Agent 在**阶段三(验证阶段)**提交三阶段证据做核验;阶段一、二调用会返回 `PHASE_GATE`。核验通过≠完成,最终仍由完成判定复核。 |
117
- | `dsh_workplan_lessons` | 只读查看**永久教训记忆**:`list` / `search` / `stats`。它只读文件,不改计划状态;用来核对「到底记住了什么、哪些错误在重复发生」。 |
117
+ | `dsh_workplan_lessons` | 只读查看**永久教训记忆**:`list` / `search` / `stats`。仅限根会话调用(子 Agent 不能跨项目读取);它只读文件,不改计划状态;用来核对「到底记住了什么、哪些错误在重复发生」。 |
118
118
 
119
119
  在 **plan 模式**下只会给你看计划,`dispatch` 会被明确拦下并说明原因,不会偷偷开跑。
120
120
 
@@ -178,7 +178,9 @@ DSH_WORKPLAN_LESSONS_FILE=/path/x.jsonl # 需要时用环境变量覆盖
178
178
  | 规划器静默判定 | 90 秒(仅规划输出传输健康保护) | `DSH_WORKPLAN_PLANNER_IDLE_TIMEOUT_MS` |
179
179
  | 规划器绝对上限 | 15 分钟(仅规划器) | 随 `…_PLANNER_TIMEOUT_MS` 等比变化 |
180
180
  | 自动续跑次数 | 2 次(处理可续跑的非时间暂停,不是执行时钟) | `DSH_WORKPLAN_MAX_RESUMES` |
181
- | 并发子 Agent | 5 个(固定) | — |
181
+ | 回合收尾等待上限 | 60 分钟(只约束收尾时"等计划/派发落地"的等待;到点放行或报错但**不杀任务**,部门/专家执行本身仍无时限;0 = 无限旧行为) | `DSH_WORKPLAN_TURN_STOPPING_MAX_WAIT_MS` |
182
+ | 澄清闸轮次上限 | 同一回合对话连续触发 2 轮澄清提问后放行进入规划(30 分钟无触发自动归零) | 固定 |
183
+ | 并发子 Agent | **每轮最多 5 个负责人**;负责人还会再派专家,整棵会话树同时活跃的子 Agent 受宿主 `maxActiveSubagents` 约束(默认 8) | — |
182
184
 
183
185
  单次模型网络请求、单条 Bash 命令和清理等待仍有各自的局部健康保护;它们不是部门任务的总时限,不能用一条慢命令的传输超时替代整个任务 deadline。后台任务也不能绕过用户显式取消。
184
186
 
@@ -191,10 +193,17 @@ DSH_WORKPLAN_LESSONS_FILE=/path/x.jsonl # 需要时用环境变量覆盖
191
193
  { "maxResumes": 2 }
192
194
  ```
193
195
 
196
+ 留痕(`journal`)默认**永久保留**,不自动删除任何审计证据。只有显式配置正数时,才会在启动 10 秒后(不阻塞激活)和之后每 24 小时清理一次“超过该天数未更新”的 `<planId>.jsonl`(单次最多 200 个最旧文件;**当前活跃的计划始终排除**,正在执行的计划也会持续追加,不会被误删;单个文件删除失败会逐条告警留痕):
197
+
198
+ ```jsonc
199
+ { "journalRetentionDays": 90 }
200
+ // 等价环境变量:DSH_WORKPLAN_JOURNAL_RETENTION_DAYS=90
201
+ ```
202
+
194
203
  ## 安全与隐私(可以自己复核)
195
204
 
196
205
  - **没有第三方运行时依赖**:`dependencies` 是空的;装出来的只有这个插件自己的 JS、配置、图标和说明。
197
- - **不写你的磁盘**:源码里没有任何 `writeFileSync` / `appendFileSync` / `mkdirSync`(可 `grep` 验证);结果只写进 DSH 会话记录。
206
+ - **只写三类本地文件,不写你的项目目录**:① `~/.dsh/workplan/journal/<planId>.jsonl`(计划留痕:派发、指示、请示、完成);② `~/.dsh/workplan/lessons.jsonl`(永久教训记忆);③ `~/.dsh/workplan/notices.jsonl`(专用通知台账:workplan 通知的权威机器可读流,与用户真实输入分离)。三者都可用环境变量改到别处,统一 **0o600 文件 / 0o700 目录**权限并拒绝向符号链接写入;台账默认最多保留最新 5000 行(`DSH_WORKPLAN_NOTICES_MAX_LINES` 可改),超限原子重写;源码里的 `appendFileSync` / `writeFileSync` 只出现在留痕/记忆/台账这几个模块。
198
207
  - **不向外发数据**:源码里没有 `child_process`、没有对外 `fetch`/`http.request`;唯一的一次 `fetch` 是浏览器端请求**同源**的 `/dsh-workplan/plans`。
199
208
  - **面板数据要登录**:该路由走 DSH 自己的鉴权,未登录直接返回 401。
200
209
  - **图表库是本地自带**:`vendor/chart.umd.js`(Chart.js 4.6.1,MIT)随包分发,不加载任何 CDN 脚本。
@@ -203,7 +212,8 @@ DSH_WORKPLAN_LESSONS_FILE=/path/x.jsonl # 需要时用环境变量覆盖
203
212
 
204
213
  ```bash
205
214
  npm view dsh-workplan@latest dependencies # 应为空
206
- grep -RInE "writeFileSync|child_process|eval\(" src # 应无命中
215
+ grep -RInE "child_process|eval\(" src # 应无命中
216
+ grep -RIn "appendFileSync\|writeFileSync" src # 只应出现在 dept-journal.ts、lessons.ts 与 notice-ledger.ts
207
217
  npm audit --omit=dev
208
218
  ```
209
219
 
package/README.zh.md CHANGED
@@ -3,12 +3,12 @@
3
3
  > **两个卖点,一句话:ISO/IEC 15408:2026 全套安全证据,5 条命令自己验;安装一条命令、零第三方运行时依赖。**
4
4
 
5
5
  [![verify](https://github.com/abbaababa/dsh-workplan/actions/workflows/verify.yml/badge.svg)](https://github.com/abbaababa/dsh-workplan/actions/workflows/verify.yml)
6
- [![version](https://img.shields.io/badge/version-3.0.3-blue.svg)](https://github.com/abbaababa/dsh-workplan/releases/tag/v3.0.3)
6
+ [![version](https://img.shields.io/badge/version-3.0.6-blue.svg)](https://github.com/abbaababa/dsh-workplan/releases/tag/v3.0.6)
7
7
 
8
8
  给 **DeepSeek Harness(DSH)** 加一段「先拆计划 → 真派部门子 Agent 去做 → 左侧栏实时看进度」的能力。不装 App、不改 DSH 源码、不换页面。
9
9
 
10
10
  - 对话里先出【任务分解】:阶段、子任务、部门、验收标准,一样不缺
11
- - 最多 5 个真实子 Agent 并行执行,结果写回会话
11
+ - 每轮最多 5 个部门负责人并行启动;负责人还会再派专家,整棵会话树同时活跃的子 Agent 受宿主 `maxActiveSubagents` 约束(默认 8)
12
12
  - 左侧栏「任务进度」:谁在做、做到哪、哪件卡住了
13
13
 
14
14
  **English (US) — plain-language guide:** [README.en.md](README.en.md)
@@ -54,7 +54,7 @@ grep -RInE "child_process|execSync|eval\(|writeFileSync" src || echo "0 命中
54
54
 
55
55
  1. **先排计划**:你发出任务后、AI 真正动手前,它先写一份计划——分几个阶段、每个阶段几件具体工作、每件工作交给哪个部门、怎么做、什么算做完、可能卡在哪。
56
56
  2. **计划先给你看**:这份计划以「任务分解」的形式出现在对话里,包含每一步的依据与验收标准,而不是一句话糊过去。
57
- 3. **真的派人去做**:确认后,每一件具体工作交给一个**真实的 DSH 子 Agent** 去执行(最多 5 个同时跑),结果写回会话;你在左侧栏「任务进度」里随时能看到谁在做、做到哪、哪件卡住了。
57
+ 3. **真的派人去做**:确认后,每一件具体工作交给一个**真实的 DSH 子 Agent** 去执行(每轮最多 5 个负责人同时启动;负责人再派专家,整棵树受宿主上限约束,默认 8),结果写回会话;你在左侧栏「任务进度」里随时能看到谁在做、做到哪、哪件卡住了。
58
58
 
59
59
  计划不是装饰品:主 Agent 必须先派发、等到部门结果回来,才能继续往下答。
60
60
 
@@ -69,7 +69,7 @@ grep -RInE "child_process|execSync|eval\(|writeFileSync" src || echo "0 命中
69
69
  ## 一键安装
70
70
 
71
71
  ```bash
72
- dsh plugin --profile web add dsh-workplan@3.0.3
72
+ dsh plugin --profile web add dsh-workplan@3.0.6
73
73
  ```
74
74
 
75
75
  装完**重启一次 DSH Web**(或重新载入当前页面)让插件生效。
@@ -139,7 +139,7 @@ dsh plugin --profile web add "$(pwd)"
139
139
  | 规划器静默判定 | 90 秒(输出开始后连一个字都不再来才算卡死) | `DSH_WORKPLAN_PLANNER_IDLE_TIMEOUT_MS` |
140
140
  | 规划器绝对上限 | 15 分钟(= 无进展上限 × 3,有无产出都到此为止) | 随 `…_PLANNER_TIMEOUT_MS` 等比变化 |
141
141
  | 自动续跑次数 | 2 次 | `DSH_WORKPLAN_MAX_RESUMES` |
142
- | 并发子 Agent | 5 个(固定) | — |
142
+ | 并发子 Agent | **每轮最多 5 个负责人**;整棵树受宿主 `maxActiveSubagents` 约束(默认 8) | — |
143
143
 
144
144
  这些规划器时限只保护“生成计划”这一步,不会作用到负责人或专家执行。执行阶段只由真实完成、真实错误、证据/质量门禁或用户取消改变;重试可由真实失败触发,不会因计时器到点触发。
145
145
 
@@ -148,7 +148,7 @@ dsh plugin --profile web add "$(pwd)"
148
148
  ## 安全与隐私(可以自己复核)
149
149
 
150
150
  - **没有第三方运行时依赖**:`dependencies` 是空的;装出来的只有这个插件自己的 JS、配置、图标和说明。
151
- - **不写你的磁盘**:源码里没有任何 `writeFileSync` / `appendFileSync` / `mkdirSync`(可 `grep` 验证);结果只写进 DSH 会话记录。
151
+ - **只写两类本地文件,不写你的项目目录**:① `~/.dsh/workplan/journal/<planId>.jsonl`(计划留痕);② `~/.dsh/workplan/lessons.jsonl`(永久教训记忆)。两者都可用环境变量改到别处;`appendFileSync` / `writeFileSync` 只出现在 `dept-journal.ts` 与 `lessons.ts`。
152
152
  - **不向外发数据**:源码里没有 `child_process`、没有对外 `fetch`/`http.request`;唯一的一次 `fetch` 是浏览器端请求**同源**的 `/dsh-workplan/plans`。
153
153
  - **面板数据要登录**:该路由走 DSH 自己的鉴权,未登录直接返回 401。
154
154
  - **图表库是本地自带**:`vendor/chart.umd.js`(Chart.js 4.6.1,MIT)随包分发,不加载任何 CDN 脚本。
@@ -157,7 +157,8 @@ dsh plugin --profile web add "$(pwd)"
157
157
 
158
158
  ```bash
159
159
  npm view dsh-workplan@latest dependencies # 应为空
160
- grep -RInE "writeFileSync|child_process|eval\(" src # 应无命中
160
+ grep -RInE "child_process|eval\(" src # 应无命中
161
+ grep -RIn "appendFileSync\|writeFileSync" src # 只应出现在 dept-journal.ts 与 lessons.ts
161
162
  npm audit --omit=dev
162
163
  ```
163
164
 
package/client.js CHANGED
@@ -224,6 +224,7 @@ window.__ModuleLoader__.load({
224
224
  "vizStageTitle": "分步进度",
225
225
  "vizOverall": "总体进度",
226
226
  "allPlansHint": "上面是当前各会话最新计划的合计;历史计划不在此汇总,下面每张卡片只统计本计划。",
227
+ "trimNotice": "计划数据过大,部分会话或明细已在服务端省略,当前仅展示子集;缩小范围或会话后再看完整数据。",
227
228
  "openHint": "打开左侧「任务进度」看完整安排。",
228
229
  "timeNegotiation": "执行时间(无时限)",
229
230
  "noTimeLimit": "部门负责人和全球顶尖专家执行无时限;预估仅供参考,不影响完成验收",
@@ -459,6 +460,7 @@ window.__ModuleLoader__.load({
459
460
  "vizStageTitle": "Step progress",
460
461
  "vizOverall": "Overall progress",
461
462
  "allPlansHint": "These totals cover the latest plan in each live session; older plans are not included. Each card below counts only its own plan.",
463
+ "trimNotice": "The plan data was too large, so some sessions or details were omitted on the server; only a subset is shown. Narrow the scope to see the full data.",
462
464
  "openHint": "Open “Task progress” on the left for the full plan.",
463
465
  "timeNegotiation": "Execution time (no limit)",
464
466
  "noTimeLimit": "Department leads and domain experts have no execution time limit; estimates are informational and do not affect acceptance",
@@ -1539,37 +1541,178 @@ window.__ModuleLoader__.load({
1539
1541
  if (!payload || payload.ok !== true) {
1540
1542
  throw new Error(asText(payload?.error) || '计划接口返回异常');
1541
1543
  }
1542
- return Array.isArray(payload.sessions) ? payload.sessions : [];
1544
+ /*
1545
+ * [复审修复] 返回完整载荷,不再只回 sessions:服务端 2.5MB 上限
1546
+ * (runtime.ts MAX_PLANS_RESPONSE_BYTES + trimPlansPayload)裁剪时会置
1547
+ * truncated / omittedSessions / omittedDetail,旧实现把它们丢掉,看板
1548
+ * 静默少显示数据。向后兼容:调用方仍取 .sessions(数组)。
1549
+ *
1550
+ * omittedDetail 在服务端是挂在每个 session 项上的(trimPlansPayload
1551
+ * 里 sessions[].omittedDetail = true),顶层也可能有;两者都要看。
1552
+ */
1553
+ const sessions = Array.isArray(payload.sessions) ? payload.sessions : [];
1554
+ const omittedSessions = typeof payload.omittedSessions === 'number'
1555
+ && Number.isFinite(payload.omittedSessions) ? payload.omittedSessions : 0;
1556
+ const omittedDetail = payload.omittedDetail === true
1557
+ || sessions.some((item) => item && item.omittedDetail === true);
1558
+ return { sessions, truncated: payload.truncated === true, omittedSessions, omittedDetail };
1559
+ }
1560
+ /*
1561
+ * [3.0.6][第 2 批] 看板轮询按会话共享。
1562
+ *
1563
+ * 旧实现里每个 TurnCard 都调用 usePlans(sessionId),各自 4 秒一次请求:
1564
+ * 一个会话有 30 张卡就是 30 请求/4s,服务端每次还要重建无内存记录的计划。
1565
+ * 现在同一 key(''=全部会话,或具体 sessionId)只有一个轮询器 + 一组订阅者,
1566
+ * 最后一个订阅者卸载时才停止;新订阅者立即拿到当前快照,不重复请求。
1567
+ */
1568
+ const planPolls = new Map();
1569
+ /* [复审修复] 单次轮询的挂死上限:到点按超时错误路径处理,绝不让 running 永真。 */
1570
+ const PLAN_POLL_TIMEOUT_MS = 15000;
1571
+ function emptyPlansState() {
1572
+ return {
1573
+ loading: true,
1574
+ sessions: [],
1575
+ truncated: false,
1576
+ omittedSessions: 0,
1577
+ omittedDetail: false,
1578
+ error: null,
1579
+ updatedAt: null,
1580
+ };
1543
1581
  }
1544
1582
  function usePlans(sessionId) {
1545
- const [state, setState] = useState({ loading: true, sessions: [], error: null, updatedAt: null });
1546
- const load = useCallback(async (signal) => {
1547
- try {
1548
- const sessions = await fetchPlans(sessionId, signal);
1549
- if (signal?.aborted)
1550
- return;
1551
- setState({ loading: false, sessions, error: null, updatedAt: Date.now() });
1583
+ const key = sessionId || '';
1584
+ const [state, setState] = useState(() => planPolls.get(key)?.state ?? emptyPlansState());
1585
+ useEffect(() => {
1586
+ let entry = planPolls.get(key);
1587
+ if (!entry) {
1588
+ entry = {
1589
+ state: emptyPlansState(),
1590
+ listeners: new Set(),
1591
+ timer: null,
1592
+ controller: null,
1593
+ running: false,
1594
+ run: null,
1595
+ timedOut: false,
1596
+ onVisible: null,
1597
+ };
1598
+ planPolls.set(key, entry);
1552
1599
  }
1553
- catch (error) {
1554
- if (signal?.aborted)
1555
- return;
1556
- setState((previous) => ({
1557
- ...previous,
1558
- loading: false,
1559
- error: error instanceof Error ? error.message : String(error),
1560
- }));
1600
+ const listener = (next) => setState(next);
1601
+ entry.listeners.add(listener);
1602
+ setState(entry.state);
1603
+ if (!entry.run) {
1604
+ entry.run = async () => {
1605
+ if (entry.running)
1606
+ return;
1607
+ /*
1608
+ * [复审修复] 后台标签页跳过本次轮询:interval 保留,回到前台后
1609
+ * 自然恢复;另有 visibilitychange 监听立即补一轮(见下方注册)。
1610
+ */
1611
+ if (typeof document !== 'undefined' && document.visibilityState === 'hidden')
1612
+ return;
1613
+ entry.running = true;
1614
+ entry.timedOut = false;
1615
+ const controller = new AbortController();
1616
+ entry.controller = controller;
1617
+ /*
1618
+ * [复审修复] 15s 超时:一次挂死的请求不再让 entry.running 永真、
1619
+ * 看板永久冻结。卸载中止保持静默;超时中止走错误路径:
1620
+ * console.warn + 结束本次 running,interval 继续。
1621
+ *
1622
+ * 优先 AbortSignal.timeout + AbortSignal.any(无 JS 侧计时器句柄,
1623
+ * 不存在悬挂/句柄卫生问题);宿主运行时不支持 any() 时退回手动
1624
+ * setTimeout 控制器(等效实现),句柄挂在 entry 上,finally 与
1625
+ * 卸载 cleanup 双路清理——注意这里禁止 unref:这是收束类计时器
1626
+ * (tests/handle-policy.test.ts 契约),unref 会让 node 事件循环
1627
+ * 提前排空、看板错误路径永远到不了。
1628
+ */
1629
+ const anySignal = typeof AbortSignal.any === 'function'
1630
+ && typeof AbortSignal.timeout === 'function';
1631
+ let timeoutTimer = null;
1632
+ const signal = anySignal
1633
+ ? AbortSignal.any([controller.signal, AbortSignal.timeout(PLAN_POLL_TIMEOUT_MS)])
1634
+ : (() => {
1635
+ timeoutTimer = setTimeout(() => {
1636
+ entry.timedOut = true;
1637
+ controller.abort();
1638
+ }, PLAN_POLL_TIMEOUT_MS);
1639
+ return controller.signal;
1640
+ })();
1641
+ entry.timeoutTimer = timeoutTimer;
1642
+ try {
1643
+ const plansPayload = await fetchPlans(sessionId, signal);
1644
+ if (signal.aborted)
1645
+ return;
1646
+ entry.state = {
1647
+ loading: false,
1648
+ sessions: plansPayload.sessions,
1649
+ truncated: plansPayload.truncated === true,
1650
+ omittedSessions: plansPayload.omittedSessions,
1651
+ omittedDetail: plansPayload.omittedDetail === true,
1652
+ error: null,
1653
+ updatedAt: Date.now(),
1654
+ };
1655
+ }
1656
+ catch (error) {
1657
+ /*
1658
+ * 静默条件:仅「主动中止(卸载/重入)」。超时的判定两路都要覆盖——
1659
+ * 手动兜底路径置了 entry.timedOut;AbortSignal.any 路径里超时只体现为
1660
+ * 组合 signal 被中止而 controller 没有(卸载恰好相反:controller 先中止)。
1661
+ */
1662
+ const timedOut = entry.timedOut === true
1663
+ || (signal.aborted === true && controller.signal.aborted === false);
1664
+ if (signal.aborted && !timedOut)
1665
+ return;
1666
+ if (timedOut) {
1667
+ console.warn('[dsh-workplan] plans 轮询超时(15000ms),已结束本轮,下一轮继续', error);
1668
+ }
1669
+ entry.state = {
1670
+ ...entry.state,
1671
+ loading: false,
1672
+ error: error instanceof Error ? error.message : String(error),
1673
+ };
1674
+ }
1675
+ finally {
1676
+ if (timeoutTimer !== null)
1677
+ clearTimeout(timeoutTimer);
1678
+ entry.timeoutTimer = null;
1679
+ entry.running = false;
1680
+ entry.timedOut = false;
1681
+ entry.controller = null;
1682
+ entry.listeners.forEach((notify) => notify(entry.state));
1683
+ }
1684
+ };
1685
+ entry.run();
1686
+ entry.timer = setInterval(() => entry.run(), 4000);
1687
+ /*
1688
+ * [复审修复] 回到前台立即补一轮:后台期间 interval 触发的轮询
1689
+ * 全部被跳过,不补的话用户切回来最多干等一个周期。
1690
+ */
1691
+ entry.onVisible = () => {
1692
+ if (typeof document !== 'undefined' && document.visibilityState === 'visible') {
1693
+ entry.run?.();
1694
+ }
1695
+ };
1696
+ if (typeof document !== 'undefined' && typeof document.addEventListener === 'function') {
1697
+ document.addEventListener('visibilitychange', entry.onVisible);
1698
+ }
1561
1699
  }
1562
- }, [sessionId]);
1563
- useEffect(() => {
1564
- const controller = new AbortController();
1565
- load(controller.signal);
1566
- const timer = setInterval(() => load(controller.signal), 4000);
1567
1700
  return () => {
1568
- controller.abort();
1569
- clearInterval(timer);
1701
+ entry.listeners.delete(listener);
1702
+ if (entry.listeners.size === 0) {
1703
+ if (entry.timer)
1704
+ clearInterval(entry.timer);
1705
+ if (entry.timeoutTimer)
1706
+ clearTimeout(entry.timeoutTimer);
1707
+ entry.controller?.abort();
1708
+ if (typeof document !== 'undefined' && typeof document.removeEventListener === 'function') {
1709
+ document.removeEventListener('visibilitychange', entry.onVisible);
1710
+ }
1711
+ planPolls.delete(key);
1712
+ }
1570
1713
  };
1571
- }, [load]);
1572
- return { ...state, reload: () => load() };
1714
+ }, [key, sessionId]);
1715
+ return { ...state, reload: () => planPolls.get(key)?.run?.() };
1573
1716
  }
1574
1717
  function ErrorBanner({ message, onRetry, t }) {
1575
1718
  return h('div', { className: 'dsh-wp-banner dsh-wp-banner--error', role: 'alert' }, h('div', { className: 'dsh-wp-section-title' }, t('error')), h('div', { className: 'dsh-wp-error-text' }, message || t('noResult')), h('button', { type: 'button', className: 'dsh-wp-button', style: { marginTop: '8px' }, onClick: onRetry }, t('retry')));
@@ -2762,7 +2905,7 @@ window.__ModuleLoader__.load({
2762
2905
  /* [T4] 回到顶部的显示阈值(px):scrollTop 严格大于该值才显示。 */
2763
2906
  const BACK_TOP_THRESHOLD = 200;
2764
2907
  function Dashboard({ t }) {
2765
- const { sessions, error, loading, updatedAt, reload } = usePlans();
2908
+ const { sessions, error, loading, updatedAt, reload, truncated, omittedSessions, omittedDetail, } = usePlans();
2766
2909
  const [openSessionId, setOpenSessionId] = useState(null);
2767
2910
  const selectSession = useCallback((sessionId) => {
2768
2911
  if (!sessionId)
@@ -2944,7 +3087,18 @@ window.__ModuleLoader__.load({
2944
3087
  className: 'dsh-wp',
2945
3088
  ref: (node) => { if (node !== panelEl)
2946
3089
  setPanelEl(node); },
2947
- }, h('header', { className: 'dsh-wp-header' }, h('div', null, h('h1', { className: 'dsh-wp-title' }, t('title')), h('p', { className: 'dsh-wp-subtitle' }, t('subtitle')), h('div', { className: 'dsh-wp-meta' }, updatedAt ? h('span', null, `${t('updatedAt')} ${formatTime(updatedAt)}`) : null, h('span', null, `${t('scopeAll')}:${activeSessions.length} ${t('sessionCount')},${t('taskBreakdown')} ${totals.total} ${t('subtaskCount')}`))), h('button', { type: 'button', className: 'dsh-wp-button', onClick: reload, disabled: loading }, t('refresh'))), error ? h(ErrorBanner, { message: error, onRetry: reload, t }) : null, activeSessions.length > 0 ? h('div', { className: 'dsh-wp-statbar', role: 'list' }, h('div', { className: 'dsh-wp-stat dsh-wp-stat--tasks', role: 'listitem' }, h('div', { className: 'dsh-wp-stat-value' }, activeSessions.length), h('div', { className: 'dsh-wp-stat-label' }, t('sessionCount'))), h('div', { className: 'dsh-wp-stat', role: 'listitem' }, h('div', { className: 'dsh-wp-stat-value' }, totals.total), h('div', { className: 'dsh-wp-stat-label' }, t('workItems'))), h('div', { className: 'dsh-wp-stat dsh-wp-stat--done', role: 'listitem' }, h('div', { className: 'dsh-wp-stat-value' }, totals.done), h('div', { className: 'dsh-wp-stat-label' }, t('stats.done'))), h('div', { className: 'dsh-wp-stat dsh-wp-stat--active', role: 'listitem' }, h('div', { className: 'dsh-wp-stat-value' }, totals.inProgress), h('div', { className: 'dsh-wp-stat-label' }, t('stats.inProgress'))), h('div', { className: 'dsh-wp-stat dsh-wp-stat--blocked', role: 'listitem' }, h('div', { className: 'dsh-wp-stat-value' }, totals.blocked), h('div', { className: 'dsh-wp-stat-label' }, t('stats.blocked')))) : null, activeSessions.length > 0 ? h('div', { className: 'dsh-wp-scope-note' }, t('allPlansHint')) : null, activeSessions.length === 0
3090
+ }, h('header', { className: 'dsh-wp-header' }, h('div', null, h('h1', { className: 'dsh-wp-title' }, t('title')), h('p', { className: 'dsh-wp-subtitle' }, t('subtitle')), h('div', { className: 'dsh-wp-meta' }, updatedAt ? h('span', null, `${t('updatedAt')} ${formatTime(updatedAt)}`) : null, h('span', null, `${t('scopeAll')}:${activeSessions.length} ${t('sessionCount')},${t('taskBreakdown')} ${totals.total} ${t('subtaskCount')}`))), h('button', { type: 'button', className: 'dsh-wp-button', onClick: reload, disabled: loading }, t('refresh'))), error ? h(ErrorBanner, { message: error, onRetry: reload, t }) : null,
3091
+ /*
3092
+ * [复审修复] 服务端裁剪提示:载荷被 2.5MB 上限裁剪(truncated /
3093
+ * omittedSessions / omittedDetail 任一成立)时明确告知「展示为子集」,
3094
+ * 不再静默少显示数据。复用现有 degraded 横幅样式,不新增 CSS/依赖。
3095
+ */
3096
+ (truncated === true || Number(omittedSessions) > 0 || omittedDetail === true)
3097
+ ? h('div', {
3098
+ className: 'dsh-wp-banner dsh-wp-banner--degraded dsh-wp-trim-notice',
3099
+ role: 'status',
3100
+ }, t('trimNotice'))
3101
+ : null, activeSessions.length > 0 ? h('div', { className: 'dsh-wp-statbar', role: 'list' }, h('div', { className: 'dsh-wp-stat dsh-wp-stat--tasks', role: 'listitem' }, h('div', { className: 'dsh-wp-stat-value' }, activeSessions.length), h('div', { className: 'dsh-wp-stat-label' }, t('sessionCount'))), h('div', { className: 'dsh-wp-stat', role: 'listitem' }, h('div', { className: 'dsh-wp-stat-value' }, totals.total), h('div', { className: 'dsh-wp-stat-label' }, t('workItems'))), h('div', { className: 'dsh-wp-stat dsh-wp-stat--done', role: 'listitem' }, h('div', { className: 'dsh-wp-stat-value' }, totals.done), h('div', { className: 'dsh-wp-stat-label' }, t('stats.done'))), h('div', { className: 'dsh-wp-stat dsh-wp-stat--active', role: 'listitem' }, h('div', { className: 'dsh-wp-stat-value' }, totals.inProgress), h('div', { className: 'dsh-wp-stat-label' }, t('stats.inProgress'))), h('div', { className: 'dsh-wp-stat dsh-wp-stat--blocked', role: 'listitem' }, h('div', { className: 'dsh-wp-stat-value' }, totals.blocked), h('div', { className: 'dsh-wp-stat-label' }, t('stats.blocked')))) : null, activeSessions.length > 0 ? h('div', { className: 'dsh-wp-scope-note' }, t('allPlansHint')) : null, activeSessions.length === 0
2948
3102
  ? h('div', { className: 'dsh-wp-empty' }, h('div', { style: { fontWeight: 650, marginBottom: '4px' } }, t('empty')), h('div', null, t('emptyHint')))
2949
3103
  : h('div', { className: 'dsh-wp-groups' },
2950
3104
  // [用户要求] 总览块(完成率环 + 每个任务的进度)上移到分组之前:
@@ -0,0 +1,7 @@
1
+ # v3.0.3
2
+
3
+ release v3.0.3: latest source + version publish
4
+
5
+ - tag: v3.0.3
6
+ - date: 2026-11-17
7
+ - npm: https://www.npmjs.com/package/dsh-workplan/v/3.0.3