dsh-workplan 1.11.0 → 1.11.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
@@ -1,3 +1,11 @@
1
+ ## 1.11.1 — 2026-11-02
2
+
3
+ 修复 1.11.0 中一个「已声称、但数据层未生效」的问题:
4
+
5
+ - **D-13 重规划 cancel 的下游悬挂**:1.11.0 只在 dispatch/readiness 阶段补了收束,而实时与回放共用的 `applyReplanStatuses` 仍只标记被取消行本身;直接走数据层时下游仍停在 `pending`(T12 探针在 1.11.0 的 `lib/` 上实测为 FAIL)。1.11.1 把传递闭包放进 `applyReplanStatuses`:直接下游的 `blockedBy` 指向被取消的上游,间接下游的 `error` 回溯到根源取消项与取消原因,刷新后与实时一致。
6
+ - 回归:新增 A→B→C 的取消级联用例;`npm test` **364 / 364 通过**。
7
+ - 其余 1.11.0 内容不变。
8
+
1
9
  ## 1.11.0 — 2026-11-02
2
10
 
3
11
  **闭环契约 v1:为「派发 → 执行 → 遇阻 → 请示 → 指示 → 回报 → 进度 → 重规划」补上回执、上行请示与重规划通道;并如实标注本版仍未落地的深度下限。**
package/README.en.md CHANGED
@@ -77,7 +77,7 @@ The full contract — roles, data shapes, state machine, recovery, and the three
77
77
  ## Install
78
78
 
79
79
  ```bash
80
- dsh plugin --profile web add dsh-workplan@1.11.0
80
+ dsh plugin --profile web add dsh-workplan@1.11.1
81
81
  ```
82
82
 
83
83
  Restart the DSH Web process (or reload the page) so the bundle is picked up.
package/README.md CHANGED
@@ -66,7 +66,7 @@ grep -RInE "child_process|execSync|eval\(|writeFileSync" src || echo "0 命中
66
66
  ## 一键安装
67
67
 
68
68
  ```bash
69
- dsh plugin --profile web add dsh-workplan@1.11.0
69
+ dsh plugin --profile web add dsh-workplan@1.11.1
70
70
  ```
71
71
 
72
72
  装完**重启一次 DSH Web**(或重新载入当前页面)让插件生效。
@@ -0,0 +1,63 @@
1
+ # Release record — dsh-workplan 1.11.0 (2026-11-02)
2
+
3
+ Every value below was observed on the machine that produced the release; re-check
4
+ with the command in parentheses.
5
+
6
+ ## Source
7
+
8
+ | Item | Value |
9
+ | --- | --- |
10
+ | Branch / commit | `main` @ `71f0b65` (`git log -1 --format=%H`) |
11
+ | Tag (annotated object) | `v1.11.0` @ `c2901e6c3aa735fb24b09778118183dae8b38772` (`gh api repos/abbaababa/dsh-workplan/git/ref/tags/v1.11.0`) |
12
+ | Tagged commit | `71f0b652fc805244e43d7034e34668b370e00cbd` (`git rev-parse v1.11.0^{commit}`) |
13
+ | Remote | `git@github.com:abbaababa/dsh-workplan.git` |
14
+ | Version declarations | `package.json`, `package-lock.json` (root + `packages[""]`), `src/host.ts` meta, `CHANGELOG.md`, `README.md`, `README.en.md` — all `1.11.0` (asserted by `tests/version-sync.test.ts`) |
15
+
16
+ ## Verification
17
+
18
+ | Check | Result |
19
+ | --- | --- |
20
+ | `npm run check` (`tsc --noEmit`) | exit 0 |
21
+ | `npm test` | **363 / 363 passed, 0 failed** (build + version assertions included) |
22
+ | `npm run verify` | passed (build, `lib/client.js` consistency) |
23
+ | Clean-clone build | `git clone --branch v1.11.0` → `npm ci` → `npm run build` → `npm pack` succeeded |
24
+
25
+ ## GitHub Release
26
+
27
+ - URL: https://github.com/abbaababa/dsh-workplan/releases/tag/v1.11.0
28
+ - Asset: `dsh-workplan-1.11.0.tgz`
29
+ - Size: 915,092 bytes (gh reports 893 KB)
30
+ - SHA-256: `96e0a7fc35a7e8edbbd54e5bb29d2bf7d599f97bddb1bd8fabe04b092c6915b4`
31
+ - Download check: `HTTP 200`, byte count and digest identical to the packed file
32
+ (`curl -sL -o /tmp/dl-1.11.0.tgz -w '%{http_code}' https://github.com/abbaababa/dsh-workplan/releases/download/v1.11.0/dsh-workplan-1.11.0.tgz`)
33
+
34
+ ## npm
35
+
36
+ - `dsh-workplan@1.11.0`, dist-tag `latest` (`npm view dsh-workplan@latest version` → `1.11.0`)
37
+ - Tarball: https://registry.npmjs.org/dsh-workplan/-/dsh-workplan-1.11.0.tgz
38
+ - Smoke install: `npm install dsh-workplan@1.11.0` in an empty package → version `1.11.0`, `lib/replan.js` present, `createHandoffTool` present in `lib/host.js`.
39
+
40
+ ## Catalog index
41
+
42
+ - Upstream: `awesome-dsh-plugin/awesome-dsh-plugin`
43
+ - File: `data/plugins/abbaababa__dsh-workplan.yml`, line 4 `tarball`
44
+ - before: `.../releases/download/v1.10.6/dsh-workplan-1.10.6.tgz`
45
+ - after: `.../releases/download/v1.11.0/dsh-workplan-1.11.0.tgz`
46
+ - PR: https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/pull/11316 (OPEN, MERGEABLE, one file)
47
+ - The catalog npm package itself is regenerated by the upstream repository's own
48
+ scheduled CI; this release does not publish it.
49
+ - jsDelivr caches an unpinned URL for roughly 12 hours; prefer the Release asset
50
+ or the npm tarball when verifying immediately.
51
+
52
+ ## Scope notes (honest limits of this release)
53
+
54
+ - Included: claim/receipt lifecycle for dispatch and instruction, in-loop
55
+ escalation and instruction tools, in-place replanning during execution,
56
+ cross-department handoff registry with delivery gating, acceptance coverage
57
+ checks (criteria must be answered individually and carry evidence), cancelled
58
+ dependency handling, child-session delivery ban, progress-panel chips and the
59
+ pending-change banner.
60
+ - Not included (tracked as design work, not claimed fixed): push/SSE transport
61
+ (panel still polls every 4 s), full automatic dispatch, independent reviewer,
62
+ per-task budget/concurrency tuning, department duties encoded as data
63
+ (contract v2 draft), checkpoint runtime semantics.
package/lib/host.js CHANGED
@@ -1120,7 +1120,7 @@ export function apply(ctx, config = {}) {
1120
1120
  }
1121
1121
  export const meta = {
1122
1122
  name,
1123
- version: '1.11.0',
1123
+ version: '1.11.1',
1124
1124
  promptOrder: PROMPT_ORDER,
1125
1125
  routes: ['/dsh-workplan/plans', '/dsh-workplan/vendor/chart.umd.js'],
1126
1126
  };
package/lib/replan.js CHANGED
@@ -484,6 +484,82 @@ export function applyReplanStatuses(statuses, payload) {
484
484
  },
485
485
  ];
486
486
  }
487
+ /*
488
+ * [1.11.1] D-13:cancel 不能把下游留在 pending。
489
+ *
490
+ * 旧实现只把被取消的行标成 replanned;下游既没 blocked 也没错误码,
491
+ * 调度器判定「依赖未完成」后永远不再派发——用户看到的是「卡住但没有任何原因」。
492
+ * 这里按依赖图做传递闭包:直接下游的 blockedBy 指向被取消的上游(或已阻塞的
493
+ * 中间行),间接下游的 error 必须回溯到根源取消项与取消原因,而不是只说
494
+ * 「上游 B 阻塞」。实时路径与回放路径共用本函数,因此刷新后结论一致。
495
+ */
496
+ const cancelled = new Map();
497
+ for (const mark of payload.marks ?? []) {
498
+ if (mark.action !== 'cancel')
499
+ continue;
500
+ cancelled.set(String(mark.subtaskId), String(mark.reason ?? payload.reason ?? ''));
501
+ }
502
+ if (cancelled.size > 0 && payload.plan) {
503
+ const deps = new Map();
504
+ const order = [];
505
+ for (const { subtask } of flattenSubtasks(payload.plan)) {
506
+ const id = String(subtask?.id ?? '');
507
+ if (!id)
508
+ continue;
509
+ deps.set(id, Array.isArray(subtask.dependsOn) ? subtask.dependsOn.map(String) : []);
510
+ order.push(id);
511
+ }
512
+ const cascaded = new Map();
513
+ for (const id of order) {
514
+ if (cancelled.has(id))
515
+ continue;
516
+ const direct = (deps.get(id) ?? []).filter((dep) => cancelled.has(dep));
517
+ if (direct.length > 0)
518
+ cascaded.set(id, { direct: direct[0], roots: new Set(direct) });
519
+ }
520
+ let grew = true;
521
+ while (grew) {
522
+ grew = false;
523
+ for (const id of order) {
524
+ if (cancelled.has(id) || cascaded.has(id))
525
+ continue;
526
+ const direct = (deps.get(id) ?? []).filter((dep) => cascaded.has(dep));
527
+ if (direct.length === 0)
528
+ continue;
529
+ const roots = new Set();
530
+ for (const dep of direct) {
531
+ for (const root of cascaded.get(dep)?.roots ?? [])
532
+ roots.add(root);
533
+ }
534
+ cascaded.set(id, { direct: direct[0], roots });
535
+ grew = true;
536
+ }
537
+ }
538
+ for (const [id, info] of cascaded) {
539
+ const current = next.find((item) => item?.subtaskId === id);
540
+ if (!current || current.closure === 'replanned')
541
+ continue;
542
+ if (current.status !== 'pending')
543
+ continue;
544
+ const rootText = [...info.roots].join('、');
545
+ const cause = [...info.roots]
546
+ .map((root) => cancelled.get(root))
547
+ .filter((value) => value && value.length > 0)[0] ?? String(payload.reason ?? '');
548
+ try {
549
+ next = applyStatus(next, id, {
550
+ status: 'blocked',
551
+ closure: 'blocked',
552
+ blockedBy: [{ id: info.direct, reason: `上游 ${info.direct} 因重规划取消而无法完成` }],
553
+ error: `依赖链上游 ${rootText} 已被重规划取消(取消原因:${cause || '未填写'}),本项无法继续;请用 dsh_workplan_replan(action=replace) 重新安排,或显式 cancel 它。`,
554
+ updatedBy: 'system',
555
+ revision,
556
+ });
557
+ }
558
+ catch {
559
+ // 单行冲突不中断回放;下一轮 readiness 仍会把悬挂项拦在交付门外。
560
+ }
561
+ }
562
+ }
487
563
  return next;
488
564
  }
489
565
  /** durable `workplan-replan` 消息:正文 + 一行 JSON 载荷。 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-workplan",
3
- "version": "1.11.0",
3
+ "version": "1.11.1",
4
4
  "description": "Automatic task decomposition, real department subagents, and a responsive workplan dashboard for DeepSeek Harness.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/host.ts CHANGED
@@ -1219,7 +1219,7 @@ export function apply(ctx: any, config: WorkplanConfig = {}) {
1219
1219
 
1220
1220
  export const meta = {
1221
1221
  name,
1222
- version: '1.11.0',
1222
+ version: '1.11.1',
1223
1223
  promptOrder: PROMPT_ORDER,
1224
1224
  routes: ['/dsh-workplan/plans', '/dsh-workplan/vendor/chart.umd.js'],
1225
1225
  }
package/src/replan.ts CHANGED
@@ -516,6 +516,72 @@ export function applyReplanStatuses(statuses: any, payload: ReplanPayload): any[
516
516
  },
517
517
  ]
518
518
  }
519
+ /*
520
+ * [1.11.1] D-13:cancel 不能把下游留在 pending。
521
+ *
522
+ * 旧实现只把被取消的行标成 replanned;下游既没 blocked 也没错误码,
523
+ * 调度器判定「依赖未完成」后永远不再派发——用户看到的是「卡住但没有任何原因」。
524
+ * 这里按依赖图做传递闭包:直接下游的 blockedBy 指向被取消的上游(或已阻塞的
525
+ * 中间行),间接下游的 error 必须回溯到根源取消项与取消原因,而不是只说
526
+ * 「上游 B 阻塞」。实时路径与回放路径共用本函数,因此刷新后结论一致。
527
+ */
528
+ const cancelled = new Map<string, string>()
529
+ for (const mark of payload.marks ?? []) {
530
+ if (mark.action !== 'cancel') continue
531
+ cancelled.set(String(mark.subtaskId), String(mark.reason ?? payload.reason ?? ''))
532
+ }
533
+ if (cancelled.size > 0 && payload.plan) {
534
+ const deps = new Map<string, string[]>()
535
+ const order: string[] = []
536
+ for (const { subtask } of flattenSubtasks(payload.plan)) {
537
+ const id = String(subtask?.id ?? '')
538
+ if (!id) continue
539
+ deps.set(id, Array.isArray(subtask.dependsOn) ? subtask.dependsOn.map(String) : [])
540
+ order.push(id)
541
+ }
542
+ const cascaded = new Map<string, { direct: string; roots: Set<string> }>()
543
+ for (const id of order) {
544
+ if (cancelled.has(id)) continue
545
+ const direct = (deps.get(id) ?? []).filter((dep) => cancelled.has(dep))
546
+ if (direct.length > 0) cascaded.set(id, { direct: direct[0], roots: new Set(direct) })
547
+ }
548
+ let grew = true
549
+ while (grew) {
550
+ grew = false
551
+ for (const id of order) {
552
+ if (cancelled.has(id) || cascaded.has(id)) continue
553
+ const direct = (deps.get(id) ?? []).filter((dep) => cascaded.has(dep))
554
+ if (direct.length === 0) continue
555
+ const roots = new Set<string>()
556
+ for (const dep of direct) {
557
+ for (const root of cascaded.get(dep)?.roots ?? []) roots.add(root)
558
+ }
559
+ cascaded.set(id, { direct: direct[0], roots })
560
+ grew = true
561
+ }
562
+ }
563
+ for (const [id, info] of cascaded) {
564
+ const current = next.find((item: any) => item?.subtaskId === id)
565
+ if (!current || current.closure === 'replanned') continue
566
+ if (current.status !== 'pending') continue
567
+ const rootText = [...info.roots].join('、')
568
+ const cause = [...info.roots]
569
+ .map((root) => cancelled.get(root))
570
+ .filter((value) => value && value.length > 0)[0] ?? String(payload.reason ?? '')
571
+ try {
572
+ next = applyStatus(next, id, {
573
+ status: 'blocked',
574
+ closure: 'blocked',
575
+ blockedBy: [{ id: info.direct, reason: `上游 ${info.direct} 因重规划取消而无法完成` }],
576
+ error: `依赖链上游 ${rootText} 已被重规划取消(取消原因:${cause || '未填写'}),本项无法继续;请用 dsh_workplan_replan(action=replace) 重新安排,或显式 cancel 它。`,
577
+ updatedBy: 'system',
578
+ revision,
579
+ })
580
+ } catch {
581
+ // 单行冲突不中断回放;下一轮 readiness 仍会把悬挂项拦在交付门外。
582
+ }
583
+ }
584
+ }
519
585
  return next
520
586
  }
521
587