dsh-workplan 1.9.1 → 1.10.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-workplan",
3
- "version": "1.9.1",
3
+ "version": "1.10.6",
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",
@@ -65,7 +65,7 @@
65
65
  },
66
66
  "scripts": {
67
67
  "clean": "rm -rf dist dist-tests",
68
- "build": "rm -rf dist && tsc -p tsconfig.json && cp dist/plan.js dist/runtime.js dist/host.js dist/watchdog.js dist/supersede-digest.js dist/supersede.js lib/ && cp dist/client.js client.js",
68
+ "build": "rm -rf dist && tsc -p tsconfig.json && cp dist/*.js lib/ && cp dist/client.js client.js",
69
69
  "check": "tsc -p tsconfig.json --noEmit",
70
70
  "test": "npm run build && rm -rf dist-tests && tsc -p tsconfig.test.json && node --test dist-tests/tests/*.test.js",
71
71
  "verify": "npm run check && npm test",
@@ -0,0 +1,246 @@
1
+ /**
2
+ * [1.10.4][auto-resume] Automatic continuation of a plan whose round budget ran out.
3
+ *
4
+ * Why this module exists
5
+ * ----------------------
6
+ * The 2026-11-01 incident: subtask T12 was killed by the whole-round budget
7
+ * (`TOTAL_TIMEOUT`, 20 min) at 15:31:26, reset to `pending`, and then **never
8
+ * ran again** — the plan stayed `paused` until a human dispatched it 24 minutes
9
+ * later. `shouldRetryAttempt()` is right to refuse `ABORTED`/`TOTAL_TIMEOUT`
10
+ * *inside* a round: that round has no budget left, so a retry would be cut by
11
+ * the same blade. The missing layer is not "retry the child"; it is
12
+ * "start the next round" — a new deadline, the same plan, and `done` work
13
+ * never re-run.
14
+ *
15
+ * This module owns only the decision table (`should we continue?`). It is a
16
+ * pure function with no timer, no I/O and no record mutation, so every branch
17
+ * can be pinned by a unit test without mounting the host. The runtime supplies
18
+ * the bookkeeping; `src/runtime.ts` owns the timer.
19
+ *
20
+ * Safety stance (the reason it is more than a loop)
21
+ * -------------------------------------------------
22
+ * Automatic recovery must never manufacture a green result. Therefore:
23
+ * - it only ever continues a `paused` plan; `blocked` means a real failure and
24
+ * is repaired by a human adjudication or the resume budget, never silently;
25
+ * - `done` rows are never re-run (the resumer calls `resetBlockedStatuses`,
26
+ * which only clears blocked/in_progress, and a paused round leaves them
27
+ * `pending`);
28
+ * - it never adjudicates evidence: every continuation goes through the normal
29
+ * child path (`settleFromOutput` → `deliveryReadiness`), so "all done" is
30
+ * still decided by structured evidence;
31
+ * - "all done but evidence gaps" stops here on purpose (`NOTHING_PENDING`):
32
+ * re-running a done subtask cannot fix a missing acceptance item, it only
33
+ * produces duplicate work and a chance to overwrite the evidence.
34
+ *
35
+ * Default: **off**. See `AUTO_RESUME_DEFAULTS.enabled`.
36
+ */
37
+
38
+ /** Tunables that are policy, not deployment config. */
39
+ export const AUTO_RESUME_DEFAULTS = Object.freeze({
40
+ /**
41
+ * [1.10.6] On by default.
42
+ *
43
+ * The 2026-11-01 user verdict on the previous "off by default" stance was
44
+ * unambiguous: a subtask killed by the round budget sat untouched for 1h57m
45
+ * and the only reason was a flag nobody had been told to flip. A recovery
46
+ * feature that ships silent is indistinguishable from a missing one.
47
+ *
48
+ * Every safety branch below still applies when this is on (cancel, plan mode,
49
+ * blocked rows, no-progress, attempt cap), and `autoResume: false` in the
50
+ * profile or `DSH_WORKPLAN_AUTO_RESUME=0` turns it off for one deployment.
51
+ */
52
+ enabled: true,
53
+ /** How many continuation rounds one plan may start without a human. */
54
+ maxAttempts: 2,
55
+ /** Delay before the first continuation round. */
56
+ baseDelayMs: 30_000,
57
+ /** Upper bound of the exponential backoff. */
58
+ maxDelayMs: 300_000,
59
+ /** Consecutive continuation rounds that completed no new subtask before stopping. */
60
+ stallLimit: 1,
61
+ })
62
+
63
+ /** Hard cap for a configured attempt budget (0 disables the chain). */
64
+ export const AUTO_RESUME_MAX_ATTEMPTS_CAP = 4
65
+
66
+ /**
67
+ * Clamp a configured attempt budget.
68
+ *
69
+ * Non-numeric input falls back to the default instead of disabling the feature
70
+ * silently; only an explicit in-range number is honoured.
71
+ *
72
+ * @param value - configured value, if any.
73
+ * @returns an integer within `[0, AUTO_RESUME_MAX_ATTEMPTS_CAP]`.
74
+ */
75
+ export function autoResumeAttemptCap(value: any) {
76
+ const numeric = Number(value)
77
+ if (!Number.isFinite(numeric)) return AUTO_RESUME_DEFAULTS.maxAttempts
78
+ return Math.min(AUTO_RESUME_MAX_ATTEMPTS_CAP, Math.max(0, Math.floor(numeric)))
79
+ }
80
+
81
+ /**
82
+ * [1.10.6] Resolve the feature flag from profile config + environment.
83
+ *
84
+ * Explicit config wins; an explicit environment value wins over the default;
85
+ * anything unset falls back to `AUTO_RESUME_DEFAULTS.enabled` (now true).
86
+ * Values are read the same way for both sources so `0/false/no/off` turn it off
87
+ * instead of being treated as "present, therefore on".
88
+ *
89
+ * @param configValue - `autoResume` from the profile config, if any.
90
+ * @param envValue - `DSH_WORKPLAN_AUTO_RESUME`, if set.
91
+ * @returns whether automatic continuation rounds are allowed.
92
+ */
93
+ export function autoResumeEnabledFrom(configValue: any, envValue: any) {
94
+ if (typeof configValue === 'boolean') return configValue
95
+ const raw = envValue === undefined || envValue === null ? '' : String(envValue).trim()
96
+ if (raw !== '') {
97
+ if (/^(1|true|yes|on)$/i.test(raw)) return true
98
+ if (/^(0|false|no|off)$/i.test(raw)) return false
99
+ }
100
+ return AUTO_RESUME_DEFAULTS.enabled === true
101
+ }
102
+
103
+ /** `schedule` = arm the next round; `stop` = leave the plan to a human. */
104
+ export type AutoResumeAction = 'schedule' | 'stop'
105
+
106
+ /**
107
+ * Why the machine stopped. Stable strings: the status tool exposes them and
108
+ * tests assert on the literal values.
109
+ */
110
+ export type AutoResumeCode =
111
+ | 'SCHEDULED'
112
+ | 'AUTO_RESUME_DISABLED'
113
+ | 'NO_PLAN'
114
+ | 'CANCELLED'
115
+ | 'SUPERSEDED'
116
+ | 'ALREADY_RUNNING'
117
+ | 'PLAN_MODE'
118
+ | 'PHASE_NOT_PAUSED'
119
+ | 'NOTHING_PENDING'
120
+ | 'HAS_BLOCKED'
121
+ | 'BUDGET_EXHAUSTED'
122
+ | 'NO_PROGRESS'
123
+
124
+ /** Everything the decision needs; all fields are primitives by design. */
125
+ export interface AutoResumeInput {
126
+ /** Feature flag. */
127
+ enabled: boolean
128
+ /** `record.phase` at the moment the round ended. */
129
+ phase: string
130
+ /** The user stopped this plan. */
131
+ cancelled: boolean
132
+ /** Automatic decomposition degraded; there is no usable plan. */
133
+ degraded: boolean
134
+ /** The session is in plan mode (a plan is for review, not execution). */
135
+ planMode: boolean
136
+ /** A dispatch is still in flight. */
137
+ running: boolean
138
+ /** Defined subtasks. */
139
+ total: number
140
+ /** Subtasks currently `done`. */
141
+ done: number
142
+ /** Subtasks currently `pending`. */
143
+ pending: number
144
+ /** Subtasks currently `blocked`. */
145
+ blocked: number
146
+ /** Continuation rounds already started by this machine. */
147
+ attempt: number
148
+ /** Configured continuation budget. */
149
+ maxAttempts: number
150
+ /** Consecutive continuation rounds that added no `done` row. */
151
+ noProgressRounds: number
152
+ /** Stop after this many stalled rounds. */
153
+ stallLimit: number
154
+ /** Backoff base. */
155
+ baseDelayMs: number
156
+ /** Backoff ceiling. */
157
+ maxDelayMs: number
158
+ }
159
+
160
+ export interface AutoResumeDecision {
161
+ action: AutoResumeAction
162
+ code: AutoResumeCode
163
+ /** Human/model readable; goes into `record.errors` and the status tool. */
164
+ reason: string
165
+ /** Attempt index of the round that would start (unchanged when stopping). */
166
+ attempt: number
167
+ /** Delay before that round; `0` when stopping. */
168
+ delayMs: number
169
+ }
170
+
171
+ /**
172
+ * Decide whether one more round may start, and when.
173
+ *
174
+ * Branch order is the contract (first match wins):
175
+ * 1. feature flag / no plan
176
+ * 2. user stop (`cancelled`, `superseded`) — never resurrect a decision
177
+ * 3. already running / plan mode
178
+ * 4. only a `paused` phase is auto-continuable
179
+ * 5. nothing pending (includes "all done, evidence gap" — human work)
180
+ * 6. any `blocked` row — a real failure, not a budget artifact
181
+ * 7. attempt / progress budgets
182
+ *
183
+ * @param input - the frozen facts of the round that just ended.
184
+ * @returns the decision plus a model-readable reason.
185
+ */
186
+ export function decideAutoResume(input: AutoResumeInput): AutoResumeDecision {
187
+ const attempt = Math.max(0, Math.floor(Number(input.attempt) || 0))
188
+ const maxAttempts = Math.max(0, Math.floor(Number(input.maxAttempts) || 0))
189
+ const stop = (code: AutoResumeCode, reason: string): AutoResumeDecision => ({
190
+ action: 'stop',
191
+ code,
192
+ reason,
193
+ attempt,
194
+ delayMs: 0,
195
+ })
196
+
197
+ if (input.enabled !== true) {
198
+ return stop('AUTO_RESUME_DISABLED', '自动续跑开关未开启(默认关闭)')
199
+ }
200
+ if (input.degraded === true || Number(input.total) <= 0) {
201
+ return stop('NO_PLAN', '没有可续跑的计划(自动分解降级或子任务数为 0)')
202
+ }
203
+ if (input.cancelled === true || input.phase === 'cancelled') {
204
+ return stop('CANCELLED', '用户已取消:自动重来等于违背停下的决定')
205
+ }
206
+ if (input.phase === 'superseded') {
207
+ return stop('SUPERSEDED', '责任已转移到承接计划,本计划不得自动续跑')
208
+ }
209
+ if (input.running === true) {
210
+ return stop('ALREADY_RUNNING', '已有一轮在跑,不能并发再开一轮')
211
+ }
212
+ if (input.planMode === true) {
213
+ return stop('PLAN_MODE', 'plan 模式下计划只供审阅,不自动执行')
214
+ }
215
+ if (input.phase !== 'paused') {
216
+ return stop('PHASE_NOT_PAUSED', `计划阶段是 ${String(input.phase ?? 'unknown')},只有 paused(预算到点)才自动续跑`)
217
+ }
218
+ if (Number(input.pending) <= 0) {
219
+ /*
220
+ * Also the evidence-gap case: all rows done but deliveryReady=false.
221
+ * Re-running done work is forbidden by the delivery contract; the gap can
222
+ * only be closed by a human re-adjudication, so stop and say so.
223
+ */
224
+ return stop('NOTHING_PENDING', '没有 pending 项:若仍未就绪,那是证据缺口,需主 Agent 复核,不能靠重跑 done 项解决')
225
+ }
226
+ if (Number(input.blocked) > 0) {
227
+ return stop('HAS_BLOCKED', `存在 ${input.blocked} 个 blocked 子任务:那是真实失败,需人工改判或显式续跑,不自动修复`)
228
+ }
229
+ if (attempt >= maxAttempts) {
230
+ return stop('BUDGET_EXHAUSTED', `自动续跑已用满 ${maxAttempts} 轮,交给主 Agent 决定`)
231
+ }
232
+ if (Number(input.noProgressRounds) >= Math.max(1, Number(input.stallLimit) || 1)) {
233
+ return stop('NO_PROGRESS', `连续 ${input.noProgressRounds} 轮没有新增完成项,停止空转`)
234
+ }
235
+
236
+ const base = Math.max(0, Number(input.baseDelayMs) || 0)
237
+ const cap = Math.max(base, Number(input.maxDelayMs) || base)
238
+ const delayMs = Math.min(cap, base * Math.pow(2, attempt))
239
+ return {
240
+ action: 'schedule',
241
+ code: 'SCHEDULED',
242
+ reason: `第 ${attempt + 1}/${maxAttempts} 轮自动续跑将在 ${Math.round(delayMs / 1000)}s 后开始`,
243
+ attempt: attempt + 1,
244
+ delayMs,
245
+ }
246
+ }
package/src/client.ts CHANGED
@@ -119,6 +119,10 @@ window.__ModuleLoader__.load({
119
119
  "willDeliver": "做完交付",
120
120
  "waitFor": "要等",
121
121
  "blockedReason": "卡住原因",
122
+ "pendingReason": "还没做完的原因",
123
+ "lastErrorNote": "上一轮的失败记录(已完成,仅留档)",
124
+ "notDeliverable": "还不能交付",
125
+ "notDeliverableHint": "「全部做完」不等于「可以交付」:交付还需要每一行都有可核对的证据。下面是没有通过的部分。",
122
126
  "progressLabel": "进度",
123
127
  "more": "更多细节(不看也不影响理解)",
124
128
  "why": "为什么这样安排",
@@ -291,6 +295,10 @@ window.__ModuleLoader__.load({
291
295
  "willDeliver": "What it delivers",
292
296
  "waitFor": "Waits for",
293
297
  "blockedReason": "Why it is stuck",
298
+ "pendingReason": "Why it is not finished yet",
299
+ "lastErrorNote": "Previous attempt's failure (done, kept for the record)",
300
+ "notDeliverable": "Not deliverable yet",
301
+ "notDeliverableHint": "All rows done does not mean deliverable: every row needs checkable evidence. The gaps are listed below.",
294
302
  "progressLabel": "Progress",
295
303
  "more": "More detail (optional)",
296
304
  "why": "Why it is arranged this way",
@@ -1442,7 +1450,21 @@ window.__ModuleLoader__.load({
1442
1450
  status === 'in_progress' ? h(Progress, { value: pct, tone }) : null,
1443
1451
  status === 'in_progress' ? h('div', { className: 'dsh-wp-progress-meta' }, h('span', null, `${t('progressLabel')} ${pct}%`)) : null,
1444
1452
  status !== 'blocked' && item?.summary ? h('p', { className: 'dsh-wp-muted' }, `${t('summary')}:${plainError(item.summary)}`) : null,
1445
- item?.error ? h('p', { className: 'dsh-wp-error-text' }, `${t('blockedReason')}:${plainError(item.error)}`) : null,
1453
+ /*
1454
+ * [1.10.0] R-02:「卡住原因」只属于没做完的行。
1455
+ *
1456
+ * 1.9.1 无条件渲染 `item.error`,只要历史记录里残留一句失败文本,就会在
1457
+ * 一行 status=done 的卡片下面写「卡住原因:本轮预算用尽…」——「已完成」
1458
+ * 与「卡住了」同屏,正是用户截图里的矛盾。数据层已经保证 done 行没有
1459
+ * error(I12),这里再做一次呈现守卫:任何历史载荷、旧缓存都不会重现。
1460
+ */
1461
+ item?.error && status !== 'done'
1462
+ ? h('p', { className: 'dsh-wp-error-text' },
1463
+ `${t(status === 'blocked' ? 'blockedReason' : 'pendingReason')}:${plainError(item.error)}`)
1464
+ : null,
1465
+ status === 'done' && item?.lastError
1466
+ ? h('p', { className: 'dsh-wp-muted' }, `${t('lastErrorNote')}:${plainError(item.lastError)}`)
1467
+ : null,
1446
1468
  h('details', { className: 'dsh-wp-details' },
1447
1469
  h('summary', null, t('more')),
1448
1470
  h('div', { className: 'dsh-wp-grid', style: { marginTop: '8px' } },
@@ -1601,6 +1623,22 @@ window.__ModuleLoader__.load({
1601
1623
  return total > 0 ? Math.round((done / total) * 100) : null
1602
1624
  }
1603
1625
 
1626
+ /*
1627
+ * [1.10.0] C-11:100% 只有一个来源。
1628
+ *
1629
+ * `done/total` 是「行数」,服务端的 `stats.progress` 是「加权完成度」,
1630
+ * 二者在 12 done + 1 blocked@95 时分别是 92 与 95(T3 实测)。界面只展示
1631
+ * 一个数:行数百分比;但只要加权口径还差一点(或全部行 done 却不可交付),
1632
+ * 就不允许显示成 100——"100%" 在这一页上必须同时意味着「每行都做完」。
1633
+ */
1634
+ function cappedPercent(raw: number | null, stats: any): number | null {
1635
+ if (raw === null) return null
1636
+ const weighted = Number(stats?.progress)
1637
+ if (raw >= 100 && Number.isFinite(weighted) && weighted < 100) return 99
1638
+ if (raw > 100) return 100
1639
+ return raw
1640
+ }
1641
+
1604
1642
  // 与 groupTotals 同一套口径:先夹到 [0,total],再让「正在做/还没开始」
1605
1643
  // 吃掉剩余量,四段之和恒等于总数(构成条不会溢出或出现负宽度)。
1606
1644
  function planCounts(stats: any): PlanCounts {
@@ -1610,7 +1648,7 @@ window.__ModuleLoader__.load({
1610
1648
  const blocked = Math.min(planCount(source.blocked), total - done)
1611
1649
  const active = Math.min(planCount(source.inProgress), total - done - blocked)
1612
1650
  const pending = Math.max(0, total - done - blocked - active)
1613
- return { total, done, active, blocked, pending, percent: planPercent(done, total) }
1651
+ return { total, done, active, blocked, pending, percent: cappedPercent(planPercent(done, total), source) }
1614
1652
  }
1615
1653
 
1616
1654
  /*
@@ -1987,6 +2025,23 @@ window.__ModuleLoader__.load({
1987
2025
  h('div', null, plainError(session.error || '')),
1988
2026
  h('div', { className: 'dsh-wp-muted' }, t('degradedHint')),
1989
2027
  ) : null,
2028
+ /*
2029
+ * [1.10.0] C-09:把服务端已经下发、却从来没人读的交付门禁搬上界面。
2030
+ *
2031
+ * 1.9.1 的载荷里一直带着 `deliveryReady / deliveryBlockers`(present 用的
2032
+ * 就是同一份判定),但 `client.ts` 一处都没消费。于是「13/13、100%、绿」,
2033
+ * 而 present 被拒——「进度 100% ≠ 可交付」这条事实在界面上完全不可见。
2034
+ */
2035
+ session.deliveryReady === false
2036
+ ? h('div', { className: 'dsh-wp-banner dsh-wp-banner--degraded' },
2037
+ h('strong', null, t('notDeliverable')),
2038
+ h('div', { className: 'dsh-wp-muted' }, t('notDeliverableHint')),
2039
+ Array.isArray(session.deliveryBlockers) && session.deliveryBlockers.length
2040
+ ? h('ul', { className: 'dsh-wp-muted' },
2041
+ session.deliveryBlockers.slice(0, 6).map((blocker: any, index: any) =>
2042
+ h('li', { key: index }, plainError(String(blocker)))))
2043
+ : null,
2044
+ ) : null,
1990
2045
  h(Guide, { session, t }),
1991
2046
  departments.length ? h('div', { className: 'dsh-wp-section' },
1992
2047
  h('div', { className: 'dsh-wp-section-title' }, t('who')),
@@ -2594,7 +2649,7 @@ window.__ModuleLoader__.load({
2594
2649
  return {
2595
2650
  label: raw.length > 14 ? `${raw.slice(0, 14)}…` : raw,
2596
2651
  // [1.5.2] 与卡片/组头同一个百分比函数,杜绝第二套口径。
2597
- value: planPercent(planCount(session.stats?.done), planCount(session.stats?.total)) ?? 0,
2652
+ value: cappedPercent(planPercent(planCount(session.stats?.done), planCount(session.stats?.total)), session.stats) ?? 0,
2598
2653
  }
2599
2654
  }), [groups, t])
2600
2655
  /*
package/src/host.ts CHANGED
@@ -22,6 +22,7 @@ import {
22
22
  updateToolOutputSchema,
23
23
  } from './runtime.js'
24
24
  import { isRecord } from './plan.js'
25
+ import { autoResumeEnabledFrom } from './auto-resume.js'
25
26
 
26
27
  /*
27
28
  * [1.8.14] Identity of the modules this process actually loaded (N1).
@@ -153,6 +154,16 @@ export type WorkplanConfig = {
153
154
  idleTimeoutMs?: number
154
155
  totalTimeoutMs?: number
155
156
  maxResumes?: number
157
+ /**
158
+ * [1.10.4] 整轮预算到点后自动开始下一轮。默认 **false**。
159
+ *
160
+ * 打开方式(部署时二选一):profile 配置 `autoResume: true`,或环境变量
161
+ * `DSH_WORKPLAN_AUTO_RESUME=1`。默认关闭是刻意的:自动续跑会自己消耗
162
+ * 模型额度,必须先在小流量 profile 上验证过状态机与证据门禁再开。
163
+ */
164
+ autoResume?: boolean
165
+ /** 自动续跑轮次上限(0–4,默认 2);环境变量 `DSH_WORKPLAN_AUTO_RESUME_MAX`。 */
166
+ autoResumeMaxAttempts?: number
156
167
  }
157
168
 
158
169
  function createUpdateTool(runtime: any) {
@@ -586,6 +597,27 @@ function createDispatchTool(runtime: any) {
586
597
  * short of editing the source, so any machine with slower subagents hit the
587
598
  * wall on every plan. These knobs let operations tune it without a rebuild.
588
599
  */
600
+ /**
601
+ * [1.10.4] 布尔开关:配置项优先,其次环境变量。
602
+ *
603
+ * 与 `numericSetting` 不同,显式 `false` 必须能被表达,所以先判 boolean;
604
+ * 环境变量只接受 1/true/yes/on,大小写不敏感。未配置时返回 `false`。
605
+ *
606
+ * [1.10.6] 注意:`autoResume` 已改用 `autoResumeEnabledFrom`(默认开启,
607
+ * 且 `0/false/no/off` 可以显式关闭)。本函数保留给「默认关闭」语义的开关。
608
+ */
609
+ function booleanSetting(configValue: any, envName: string) {
610
+ if (typeof configValue === 'boolean') return configValue
611
+ const raw = typeof process !== 'undefined' ? process.env?.[envName] : undefined
612
+ if (raw === undefined || raw === '') return false
613
+ return /^(1|true|yes|on)$/i.test(String(raw).trim())
614
+ }
615
+
616
+ /** [1.10.6] 原样读取环境变量,供三态解析使用(未设置返回 undefined)。 */
617
+ function settingEnv(envName: string) {
618
+ return typeof process !== 'undefined' ? process.env?.[envName] : undefined
619
+ }
620
+
589
621
  function numericSetting(configValue: any, envName: string) {
590
622
  if (configValue !== undefined && configValue !== null && configValue !== '') {
591
623
  const numeric = Number(configValue)
@@ -636,6 +668,13 @@ export function apply(ctx: any, config: WorkplanConfig = {}) {
636
668
  idleTimeoutMs: numericSetting(config.idleTimeoutMs, 'DSH_WORKPLAN_IDLE_TIMEOUT_MS'),
637
669
  totalTimeoutMs: numericSetting(config.totalTimeoutMs, 'DSH_WORKPLAN_TOTAL_TIMEOUT_MS'),
638
670
  maxResumes: numericSetting(config.maxResumes, 'DSH_WORKPLAN_MAX_RESUMES'),
671
+ /*
672
+ * [1.10.6] 三态解析:显式配置 > 显式环境变量 > 默认开启。
673
+ * 旧实现用 `booleanSetting(..., false)`,未配置即等于关闭,于是「预算到点
674
+ * 自动续跑」这个能力在用户机器上从来没打开过(1h57m 空窗的直接原因)。
675
+ */
676
+ autoResume: autoResumeEnabledFrom(config.autoResume, settingEnv('DSH_WORKPLAN_AUTO_RESUME')),
677
+ autoResumeMaxAttempts: numericSetting(config.autoResumeMaxAttempts, 'DSH_WORKPLAN_AUTO_RESUME_MAX'),
639
678
  })
640
679
 
641
680
  ctx.effect(() =>
@@ -730,7 +769,7 @@ export function apply(ctx: any, config: WorkplanConfig = {}) {
730
769
 
731
770
  export const meta = {
732
771
  name,
733
- version: '1.9.1',
772
+ version: '1.10.6',
734
773
  promptOrder: PROMPT_ORDER,
735
774
  routes: ['/dsh-workplan/plans', '/dsh-workplan/vendor/chart.umd.js'],
736
775
  }