@linxin666/dsh-client-ui-task-board 0.4.10 → 0.4.11

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.
@@ -0,0 +1,93 @@
1
+ // Generated by scripts/sync-shared.mjs from shared/client/settings/SegmentGroup.tsx. Do not edit this copy; edit the shared source and run "node scripts/sync-shared.mjs".
2
+ /**
3
+ * The family's segmented control: a quiet track whose options share one
4
+ * highlight that slides to the pressed option, instead of each option fading
5
+ * its own background out and the next one in. The settings fields' small
6
+ * choices and the Web Extensions TAB strip both render through it, so the two
7
+ * read as one control.
8
+ *
9
+ * The caller builds the option buttons and marks the pressed one with
10
+ * `data-active`; the group measures that button after every render and writes
11
+ * its box as four custom properties, and the stylesheet draws the highlight
12
+ * there (`.segmentGroup[data-pill]::before`). Attribute and first placement
13
+ * land in the same task, so the highlight appears in place and only later
14
+ * changes slide. A ResizeObserver re-measures when the group or an option
15
+ * changes size: a longer locale, a font arriving, a container growing, a
16
+ * strip wrapping onto a second line.
17
+ */
18
+
19
+ import { Children, useLayoutEffect, useRef, type HTMLAttributes, type ReactNode } from 'react'
20
+ import css from './settings-card.module.css'
21
+
22
+ /** The attribute marking a group whose highlight has been placed. */
23
+ const PILL_ATTR = 'data-pill'
24
+ /** The pressed option, relative to the group. */
25
+ const ACTIVE_SELECTOR = ':scope > [data-active]'
26
+ const PILL_PROPERTIES = ['--segment-pill-x', '--segment-pill-y', '--segment-pill-w', '--segment-pill-h'] as const
27
+
28
+ /** Props of {@link SegmentGroup}: the track's own attributes and the option buttons. */
29
+ export interface SegmentGroupProps extends HTMLAttributes<HTMLDivElement> {
30
+ /** The option buttons; the pressed one carries `data-active`. */
31
+ children: ReactNode
32
+ }
33
+
34
+ /**
35
+ * Write the highlight's box from the pressed option's box, or take the
36
+ * highlight off when nothing is pressed or the group has no layout yet.
37
+ * The two boxes are read in viewport pixels and turned back into the group's
38
+ * own CSS pixels, so a dialog that opens through a scale transform still
39
+ * lands the highlight on its option.
40
+ */
41
+ function placePill(group: HTMLElement): void {
42
+ const item = group.querySelector<HTMLElement>(ACTIVE_SELECTOR)
43
+ const box = group.getBoundingClientRect()
44
+ if (item === null || group.offsetWidth === 0 || box.width === 0) {
45
+ group.removeAttribute(PILL_ATTR)
46
+ for (const property of PILL_PROPERTIES) group.style.removeProperty(property)
47
+ return
48
+ }
49
+ const scale = box.width / group.offsetWidth
50
+ const itemBox = item.getBoundingClientRect()
51
+ const values = [
52
+ (itemBox.left - box.left) / scale - group.clientLeft,
53
+ (itemBox.top - box.top) / scale - group.clientTop,
54
+ itemBox.width / scale,
55
+ itemBox.height / scale,
56
+ ]
57
+ values.forEach((value, index) => {
58
+ group.style.setProperty(PILL_PROPERTIES[index], `${Math.round(value * 100) / 100}px`)
59
+ })
60
+ if (!group.hasAttribute(PILL_ATTR)) group.setAttribute(PILL_ATTR, '')
61
+ }
62
+
63
+ /**
64
+ * Render a segmented track around the caller's option buttons.
65
+ * @param props - the track's attributes (role, accessible name, key handler) and its options.
66
+ * @returns the track.
67
+ */
68
+ export function SegmentGroup(props: SegmentGroupProps): ReactNode {
69
+ const { children, className, ...rest } = props
70
+ const group = useRef<HTMLDivElement | null>(null)
71
+ const count = Children.count(children)
72
+
73
+ // Placed before the frame is painted, after every render: a press moves the
74
+ // pressed mark and the highlight follows it in the same frame.
75
+ useLayoutEffect(() => {
76
+ if (group.current !== null) placePill(group.current)
77
+ })
78
+
79
+ useLayoutEffect(() => {
80
+ const element = group.current
81
+ if (element === null || typeof ResizeObserver === 'undefined') return undefined
82
+ const observer = new ResizeObserver(() => { placePill(element) })
83
+ observer.observe(element)
84
+ for (const item of Array.from(element.children)) observer.observe(item)
85
+ return () => { observer.disconnect() }
86
+ }, [count])
87
+
88
+ return (
89
+ <div {...rest} ref={group} className={className === undefined ? css.segmentGroup : `${css.segmentGroup} ${className}`}>
90
+ {children}
91
+ </div>
92
+ )
93
+ }
@@ -55,6 +55,7 @@ const SUBTASK_DEPTH_CHOICES: readonly string[] = Array.from(
55
55
  function sessionPollField(): FieldSpec {
56
56
  return {
57
57
  field: 'sessionPollSeconds',
58
+ entry: 'type',
58
59
  format: value => typeof value === 'number' && Number.isInteger(value) ? String(value) : '',
59
60
  parse: (text) => {
60
61
  const trimmed = text.trim()
@@ -77,6 +78,7 @@ function sessionPollField(): FieldSpec {
77
78
  function subtaskDepthField(): FieldSpec {
78
79
  return {
79
80
  field: 'maxSubtaskDepth',
81
+ entry: 'pick',
80
82
  format: value => typeof value === 'number' && Number.isInteger(value) ? String(value) : '',
81
83
  parse: (text) => {
82
84
  const trimmed = text.trim()
@@ -95,6 +97,7 @@ function subtaskDepthField(): FieldSpec {
95
97
  function runLaunchWidthField(): FieldSpec {
96
98
  return {
97
99
  field: 'runLaunchWidth',
100
+ entry: 'type',
98
101
  format: value => typeof value === 'number' && Number.isInteger(value) ? String(value) : '',
99
102
  parse: (text) => {
100
103
  const trimmed = text.trim()
@@ -116,6 +119,7 @@ function runLaunchWidthField(): FieldSpec {
116
119
  function spendBudgetField(): FieldSpec {
117
120
  return {
118
121
  field: 'spendBudgetTokens',
122
+ entry: 'type',
119
123
  format: value => typeof value === 'number' && Number.isInteger(value) ? String(value) : '',
120
124
  parse: (text) => {
121
125
  const trimmed = text.trim()
@@ -136,6 +140,7 @@ function spendBudgetField(): FieldSpec {
136
140
  function modelRouteField(field: string): FieldSpec {
137
141
  return {
138
142
  field,
143
+ entry: 'pick',
139
144
  format: value => typeof value === 'string' ? value : '',
140
145
  parse: (text) => {
141
146
  const trimmed = text.trim()
@@ -274,14 +279,14 @@ export class TaskBoardSettingsCardController {
274
279
  booleanField('goalRunEnabled'),
275
280
  booleanField('goalVerification'),
276
281
  modelRouteField('goalVerificationModel'),
277
- textField('goalVerificationReasoningEffort'),
282
+ textField('goalVerificationReasoningEffort', 'pick'),
278
283
  // The new-card defaults: blank is a real value every one of them keeps
279
- // ("apply no default"), which is why they are staged like any other field
284
+ // ("apply no default"), which is why they are applied like any other field
280
285
  // and only their parse rules differ.
281
- textField('cardDefaultMode'),
286
+ textField('cardDefaultMode', 'pick'),
282
287
  choiceField('cardDefaultPermission', TASK_PERMISSIONS),
283
288
  modelRouteField('cardDefaultModel'),
284
- textField('cardDefaultReasoningEffort'),
289
+ textField('cardDefaultReasoningEffort', 'pick'),
285
290
  ])
286
291
  this.store = this.form.bind(() => this.projection())
287
292
  }
@@ -489,7 +494,7 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
489
494
  <PluginSettingsCard
490
495
  t={t}
491
496
  density="nested"
492
- titleKey="settings.enabled"
497
+ titleKey="settings.enabledTopic"
493
498
  descriptionKey="settings.enabledCardHint"
494
499
  defaultOpen={false}
495
500
  hideFooter
@@ -555,6 +560,7 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
555
560
  hint={t('settings.sessionPollSecondsHintBrief')}
556
561
  hintTitle={t('settings.sessionPollSecondsHint')}
557
562
  numeric
563
+ range={{ min: SESSION_POLL_MIN_SECONDS, max: SESSION_POLL_MAX_SECONDS, step: 1 }}
558
564
  {...fieldProps}
559
565
  {...state.sessionPollSeconds}
560
566
  onEdit={(text) => { props.edit('sessionPollSeconds', text) }}
@@ -581,6 +587,7 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
581
587
  hint={t('settings.runLaunchWidthHintBrief')}
582
588
  hintTitle={t('settings.runLaunchWidthHint')}
583
589
  numeric
590
+ range={{ min: RUN_LAUNCH_WIDTH_MIN, max: RUN_LAUNCH_WIDTH_MAX, step: 1 }}
584
591
  {...fieldProps}
585
592
  {...state.runLaunchWidth}
586
593
  onEdit={(text) => { props.edit('runLaunchWidth', text) }}
@@ -285,20 +285,20 @@ export const zh = {
285
285
  // 插件设置卡片(settings.plugin.item 席位)。
286
286
  'settings.title': '任务看板',
287
287
  'settings.description': '任务编排、agent 播报与目标验收。',
288
- 'settings.enabled': '启用任务看板',
289
- 'settings.enabledCardHint': '总开关、播报、睡眠保护与子任务层级。',
288
+ 'settings.enabled': '总开关',
289
+ 'settings.enabledCardHint': '播报、睡眠保护与子任务层级。',
290
290
  'settings.enabledHint': '关闭后隐藏侧边栏入口与看板视图,并注销 task_board_* agent 工具;开启时任何会话都可以通过这些工具读写看板、子任务与定时计划。',
291
- 'settings.enabledHintBrief': '默认开启。关闭后隐藏入口与看板视图,并注销 task_board_* 工具。',
292
- 'settings.announceToAgent': '向 agent 播报任务看板',
291
+ 'settings.enabledHintBrief': '关掉后隐藏入口与看板视图,并注销 task_board_* 工具。',
292
+ 'settings.announceToAgent': '播报给 agent',
293
293
  'settings.announceToAgentHint': '开启:每条 agent 系统提示都会包含本看板的说明;关闭:不播报,agent 仅在用户主动提及时了解看板。',
294
- 'settings.announceToAgentHintBrief': '默认关闭。开启后每条 agent 系统提示都会带上本看板说明。',
294
+ 'settings.announceToAgentHintBrief': '每条系统提示都带上本看板说明。',
295
295
  'settings.preventIdleSleep': '阻止系统空闲睡眠',
296
296
  'settings.preventIdleSleepHint': '默认关闭。开启后,只要存在运行中的 DSH 会话、已启用的定时任务或会话状态尚未确认,Host 就阻止整机因空闲睡眠;屏幕仍可自动关闭。',
297
- 'settings.preventIdleSleepHintBrief': '默认关闭。开启后只要有会话在跑或计划已启用,就阻止整机空闲睡眠。',
298
- 'settings.trustForwardedProxy': '信任自己反代或隧道转发的请求',
297
+ 'settings.preventIdleSleepHintBrief': '有会话在跑或计划已启用时,阻止整机空闲睡眠。',
298
+ 'settings.trustForwardedProxy': '信任反代转发的请求',
299
299
  'settings.trustForwardedProxyHint': '默认关闭。关闭时行为与没有这项设置完全一致:带 CF-Connecting-IP 或 X-Forwarded-For 的请求一律不当作本机请求。只有反代或隧道由你自己(运维)运行、并且它拨的是本机回环上游(127.0.0.1:<端口>)时才打开:此时这类请求仍必须带浏览器同源标记,显式跨站请求照旧拒绝。第三方托管的反向代理不要打开——它可以替你伪造这些标记。',
300
- 'settings.trustForwardedProxyHintBrief': '默认关闭。仅在自己的反代或隧道指向本机回环时才开启。',
301
- 'settings.powerBoundary': '这可能增加电池消耗。合盖、手动睡眠、休眠、关机、低电量或企业策略不在保证范围内,也不会唤醒已经睡眠的机器。',
300
+ 'settings.trustForwardedProxyHintBrief': '只在自己的反代指向本机回环时开启。',
301
+ 'settings.powerBoundary': '合盖、休眠、关机或低电量不在保证范围内。',
302
302
  'settings.powerError': '最近一次电源保护错误:{error}',
303
303
  'settings.powerPhase': '保护状态',
304
304
  'settings.powerPlatform': '平台',
@@ -308,42 +308,38 @@ export const zh = {
308
308
  'settings.inherit': '继承',
309
309
  'settings.on': '开',
310
310
  'settings.off': '关',
311
- 'settings.overridden': '已覆盖',
311
+ 'settings.overridden': '已修改',
312
312
  'settings.reset': '恢复默认',
313
- 'settings.notExposed': '当前 DSH 版本未向设置页暴露本插件的配置命名空间,表单不可用。可编辑 ~/.dsh/settings.yaml 直接配置,或将本命名空间加入 Host 设置白名单后重启。',
314
- 'settings.readOnly': '当前部署的设置只读。',
313
+ 'settings.notExposed': '这个版本的 DSH 没有开放任务看板的设置。',
314
+ 'settings.readOnly': '设置只读。',
315
315
  'settings.expand': '展开设置',
316
316
  'settings.collapse': '收起设置',
317
- 'settings.save': '保存',
318
- 'settings.saving': '保存中…',
319
- 'settings.discard': '放弃',
320
- 'settings.unsaved': '未保存',
321
- 'settings.saveFailed': '部署未接受这些值,已保留供你修改。',
322
- 'settings.invalidNumber': '请输入数字,留空则使用默认值。',
317
+ 'settings.saveFailed': '没有保存成功。',
318
+ 'settings.invalidNumber': '填一个数字,留空用默认值。',
323
319
  'settings.sessionPollSeconds': '会话轮询间隔(秒)',
324
320
  'settings.sessionPollSecondsHint': '默认 5 秒。仅在看板有需要核对的事情——运行中的卡片或未结算的执行——时才读取会话名册;两者都没有时不再轮询,Host 不会持续扫描持久化会话目录。取值 1–300 秒:间隔越短结算越快、Host 负载越高。',
325
- 'settings.sessionPollSecondsHintBrief': '默认 5 秒,可设 1 到 300:间隔越短结算越快,Host 负载越高。',
321
+ 'settings.sessionPollSecondsHintBrief': '多久核对一次会话,越短结算越快。',
326
322
  'settings.maxSubtaskDepth': '子任务深度上限',
327
323
  'settings.maxSubtaskDepthHint': '默认 1:一个任务只允许一层子任务,子任务不能再创建或关联子任务。最大 3。它只决定一张卡下面能挂多深的子任务:执行一张卡始终只开它自己的一个会话,子任务由它自己按依赖顺序派发,所以层级深浅不改变一次执行开几个会话。',
328
- 'settings.maxSubtaskDepthHintBrief': '默认 1 层,最多 3:只限制子任务能挂多深,不改变一次执行开几个会话。',
324
+ 'settings.maxSubtaskDepthHintBrief': '子任务最多挂几层。',
329
325
  'settings.maxSubtaskDepthOption': '{depth} 层',
330
326
  'settings.runLaunchWidth': '并发启动上限',
331
327
  'settings.runLaunchWidthHint': '默认 3。多张卡片同时要执行时(手动执行、重新执行与到点定时一样),同一刻最多有这么多个执行被准入、创建会话并入队 Prompt,其余排队等待;每张卡的一次执行只开它自己一个会话,所以这个值不改变单卡的执行形态。默认值取自本仓「重型实施子代理并发 ≤ 3」的实测纪律。取值 1–16:越大启动越快,Host 的内存与 swap 压力越高。执行中修改只影响尚未入列的启动。',
332
- 'settings.runLaunchWidthHintBrief': '默认 3,可设 1 到 16:多张卡同时要执行时,同一刻最多这么多个开始建会话,其余排队;单卡执行仍只开一个会话。',
328
+ 'settings.runLaunchWidthHintBrief': '同时最多几个执行开始建会话,其余排队。',
333
329
  'settings.spendBudgetTokens': '每日 token 上限',
334
330
  'settings.spendBudgetTokensHint': '默认 0,表示不设闸,行为与没有这项设置时完全一致(不读账本、不计数)。设为正整数后,今日已用 token 达到该值时:手动执行与重新执行被拒绝,调用方看到的拒绝文本就是原因;到点的定时执行把原因写进调度错误并跳过本次触发,不消耗计划次数,因此调高上限或跨过本地零点后下一次触发照常执行。计量单位是 token 而不是金额:使用账本只对 DeepSeek 官方路由计价,其他路由恒为 0。今日已用取自该账本按本地日期分桶的输入、缓存读写与输出之和,与「使用统计」面板的口径一致。',
335
- 'settings.spendBudgetTokensHintBrief': '默认 0 不设闸。设成正值后今日用量到顶,手动执行被拒绝,定时触发跳过。',
331
+ 'settings.spendBudgetTokensHintBrief': '今日用量到顶后,手动执行被拒绝,定时触发跳过。',
336
332
  'settings.runBehaviorTitle': '运行行为',
337
333
  'settings.runBehaviorCardHint': '全局原生 /goal 执行开关(总开关,默认关闭)。',
338
- 'settings.goalRunGlobal': '全局启用 DSH 原生 /goal 执行',
334
+ 'settings.goalRunGlobal': '原生 /goal 执行',
339
335
  'settings.goalRunGlobalHint': '默认关闭。关闭时所有任务都按普通单回合执行,不调用 dsh 内置的 /goal;只有这里开启、且任务级「以 /goal 开始执行」被勾选时,才执行原生 /goal。任务级勾选始终可操作、也不会被这里的开关改写,总开关只决定它是否生效。开关按执行启动时冻结,只影响之后新开的执行。',
340
- 'settings.goalRunGlobalHintBrief': '默认关闭。只有它与卡片级选项都开启,执行才使用原生 /goal。',
336
+ 'settings.goalRunGlobalHintBrief': '开启后执行才使用原生 /goal。',
341
337
  'settings.goalRunGlobalDisabledTaskOption': '全局「原生 /goal 执行」总开关已关闭:任务级选项仍可随时勾选或取消,但暂不生效,你保存的偏好也不会被改写;开启总开关后即按该偏好执行。本次执行按普通单回合进行,未执行 goal 验收。',
342
338
  'settings.goalVerificationTitle': '任务验收',
343
- 'settings.goalVerification': '启用任务验收',
339
+ 'settings.goalVerification': '任务验收',
344
340
  'settings.goalVerificationCardHint': '验收开关、裁判模型与判据阈值。',
345
341
  'settings.goalVerificationHint': '默认打开:以 goal 形式执行的任务在 update_goal 标记完成前必须先通过一次验收(三项 coding 判据(本分区面向工程任务)、阈值 0.65、每项两轮且交换 A/B 位置,实际工作须胜过空工作基线)。首次不通过会把总分、逐项分数与可定位问题反馈给 agent 修复,同一执行最多两次验收;第二次仍不通过则本次执行判失败。仅作用于本插件以 goal 形式执行的任务,不影响普通聊天,也不影响显式 goalRun:false 的单回合任务。每次验收都会真实调用裁判模型并消耗额度。',
346
- 'settings.goalVerificationHintBrief': '默认开启。每项判据两轮,阈值 0.65,每次验收都会调用裁判模型。',
342
+ 'settings.goalVerificationHintBrief': '每项判据两轮,每次验收都会调用裁判模型。',
347
343
  'settings.goalVerificationModel': '验收模型',
348
344
  'settings.goalVerificationModelHint': '留空即继承宿主:使用宿主模型目录的默认路由,而不是任务卡钉住的执行模型。',
349
345
  'settings.goalVerificationModelHintBrief': '留空继承宿主默认路由,不跟随卡片钉住的执行模型。',
@@ -487,6 +483,7 @@ export const zh = {
487
483
  'board.hideSubtasks': '隐藏子任务',
488
484
  'board.showSubtasks': '显示子任务',
489
485
  'board.subtaskFilterHint': '看板默认只显示父任务;搜索或按标签筛选时会自动展开子任务。',
486
+ 'settings.enabledTopic': '基础',
490
487
  } satisfies Record<string, string>
491
488
 
492
489
  /** en dictionary, complete against the zh key set. */
@@ -769,20 +766,20 @@ export const en: Record<keyof typeof zh, string> = {
769
766
  // Plugin settings card (the `settings.plugin.item` seat).
770
767
  'settings.title': 'Task Board',
771
768
  'settings.description': 'Task orchestration, agent announcement and goal acceptance.',
772
- 'settings.enabled': 'Enable the task board',
773
- 'settings.enabledCardHint': 'Master switch, announcement, sleep protection and subtask depth.',
769
+ 'settings.enabled': 'Master switch',
770
+ 'settings.enabledCardHint': 'Announcement, sleep protection and subtask depth.',
774
771
  'settings.enabledHint': 'When off, the sidebar entry and board view are hidden and the task_board_* agent tools are unregistered; while on, any session can read and drive the board, its subtasks and its schedules through those tools.',
775
- 'settings.enabledHintBrief': 'On by default. Off hides the entry and board view and unregisters the task_board_* tools.',
776
- 'settings.announceToAgent': 'Announce the task board to agents',
772
+ 'settings.enabledHintBrief': 'Off hides the entry and board view and unregisters the task_board_* tools.',
773
+ 'settings.announceToAgent': 'Announce to agents',
777
774
  'settings.announceToAgentHint': 'On: every agent system prompt includes a note about this board. Off: no announcement; agents learn about the board only when you mention it.',
778
- 'settings.announceToAgentHintBrief': 'Off by default. On adds a note about this board to every agent system prompt.',
775
+ 'settings.announceToAgentHintBrief': 'Every system prompt carries a note about this board.',
779
776
  'settings.preventIdleSleep': 'Prevent idle system sleep',
780
777
  'settings.preventIdleSleepHint': 'Off by default. When enabled, the Host prevents idle system sleep while any DSH session runs, any schedule is enabled, or session state is not yet known. The display may still turn off.',
781
- 'settings.preventIdleSleepHintBrief': 'Off by default. On blocks idle system sleep while a session runs or a schedule is enabled.',
782
- 'settings.trustForwardedProxy': 'Trust requests forwarded by my own proxy or tunnel',
778
+ 'settings.preventIdleSleepHintBrief': 'Blocks idle system sleep while a session runs or a schedule is enabled.',
779
+ 'settings.trustForwardedProxy': 'Trust forwarded requests',
783
780
  'settings.trustForwardedProxyHint': 'Off by default. While it is off the fence behaves exactly as if the setting did not exist: a request carrying CF-Connecting-IP or X-Forwarded-For is never treated as local. Turn it on only when the reverse proxy or tunnel is one you (the operator) run yourself and it dials this machine loopback upstream (127.0.0.1:<port>): even then such a request must still carry a browser same-origin marker, and an explicit cross-site request stays refused. Do not enable it for a reverse proxy hosted by a third party, which can forge those markers on your behalf.',
784
- 'settings.trustForwardedProxyHintBrief': 'Off by default. Turn on only for a proxy or tunnel you run that dials this machine loopback.',
785
- 'settings.powerBoundary': 'This may use more battery. Lid close, manual sleep, hibernation, shutdown, low-battery actions, and enterprise policy are outside the guarantee; an already sleeping computer is not woken.',
781
+ 'settings.trustForwardedProxyHintBrief': 'On only for a proxy of your own that dials this machine loopback.',
782
+ 'settings.powerBoundary': 'Closing the lid, hibernate, shutdown or a low battery is outside the guarantee.',
786
783
  'settings.powerError': 'Latest power-protection error: {error}',
787
784
  'settings.powerPhase': 'Protection',
788
785
  'settings.powerPlatform': 'Platform',
@@ -792,42 +789,38 @@ export const en: Record<keyof typeof zh, string> = {
792
789
  'settings.inherit': 'Inherit',
793
790
  'settings.on': 'On',
794
791
  'settings.off': 'Off',
795
- 'settings.overridden': 'Overridden',
792
+ 'settings.overridden': 'Changed',
796
793
  'settings.reset': 'Reset to default',
797
- 'settings.notExposed': 'This DSH version does not expose this plugin\'s settings namespace to the configuration page, so the form is unavailable. Edit ~/.dsh/settings.yaml directly, or add the namespace to the Host settings allowlist and restart.',
798
- 'settings.readOnly': 'This deployment stores settings read-only.',
794
+ 'settings.notExposed': 'This DSH version does not open the task board settings.',
795
+ 'settings.readOnly': 'Settings are read-only.',
799
796
  'settings.expand': 'Show settings',
800
797
  'settings.collapse': 'Hide settings',
801
- 'settings.save': 'Save',
802
- 'settings.saving': 'Saving…',
803
- 'settings.discard': 'Discard',
804
- 'settings.unsaved': 'Unsaved',
805
- 'settings.saveFailed': 'The deployment did not accept these values; they were left for you to correct.',
806
- 'settings.invalidNumber': 'Enter a number, or leave blank to use the default.',
798
+ 'settings.saveFailed': 'Not saved.',
799
+ 'settings.invalidNumber': 'Enter a number, or leave it empty for the default.',
807
800
  'settings.sessionPollSeconds': 'Session poll interval (seconds)',
808
801
  'settings.sessionPollSecondsHint': 'Default 5. The Host reads the DSH session roster only while the board has something to reconcile: a running card or an open execution. With neither it stops polling and never re-scans the persisted session directory. Range 1 to 300 seconds: a shorter interval settles runs sooner and costs the Host more.',
809
- 'settings.sessionPollSecondsHintBrief': 'Default 5 seconds, range 1 to 300: a shorter interval settles runs sooner and costs the Host more.',
802
+ 'settings.sessionPollSecondsHintBrief': 'How often sessions are checked; shorter settles sooner.',
810
803
  'settings.maxSubtaskDepth': 'Subtask depth limit',
811
804
  'settings.maxSubtaskDepthHint': 'Default 1: a task may carry one level of subtasks, and a subtask cannot create or link further subtasks. Maximum 3. The limit only decides how deep the tree under one card can go: a run still opens that card\'s own single session and dispatches its subtasks itself, so the depth never changes how many sessions a run opens.',
812
- 'settings.maxSubtaskDepthHintBrief': 'Default 1, maximum 3: it caps only how deep subtasks can go, not how many sessions a run opens.',
805
+ 'settings.maxSubtaskDepthHintBrief': 'How deep subtasks may go.',
813
806
  'settings.maxSubtaskDepthOption': '{depth} levels',
814
807
  'settings.runLaunchWidth': 'Concurrent run launches',
815
808
  'settings.runLaunchWidthHint': 'Default 3. When several cards want to run at the same time, a manual run, a re-run and a due schedule alike, only this many runs are admitted at once: each creates its session and queues its prompt, and the rest wait their turn. Running one card always opens just that card\'s own session, so this value never changes the shape of a single-card run. The default comes from this repository\'s measured guidance for heavy implementation subagents (at most three). Range 1 to 16: a larger width starts runs sooner and costs the Host more memory and swap. Edited during a run, it bounds the launches that have not been admitted yet.',
816
- 'settings.runLaunchWidthHintBrief': 'Default 3, range 1 to 16: when several cards want to run, this many are admitted at once and the rest wait; a single card still opens one session.',
809
+ 'settings.runLaunchWidthHintBrief': 'How many runs start at once; the rest wait.',
817
810
  'settings.spendBudgetTokens': 'Daily token cap',
818
811
  'settings.spendBudgetTokensHint': 'Default 0 means no gate: behavior is exactly what it was before this setting existed, with no ledger read and no counting. With a positive cap, once today\'s measured spend reaches it a manual run or re-run is refused and the caller sees that message as the refusal, while a due schedule writes the reason to the scheduler error and skips that occurrence without spending a planned run — raising the cap, or the local day rolling over, lets the next trigger run as usual. The unit is tokens rather than money: the usage ledger prices only DeepSeek\'s own routes and stays 0 on every other route. Today\'s spend is that ledger\'s local-date bucket summed over input, cache read/write and output, the same measure the usage panel shows.',
819
- 'settings.spendBudgetTokensHintBrief': 'Default 0 gates nothing. Past a positive cap, manual runs are refused and due schedules skip.',
812
+ 'settings.spendBudgetTokensHintBrief': 'Past today\'s cap, manual runs are refused and due schedules skip.',
820
813
  'settings.runBehaviorTitle': 'Run behavior',
821
814
  'settings.runBehaviorCardHint': 'The global native /goal switch (master control, off by default).',
822
- 'settings.goalRunGlobal': 'Global: run tasks with dsh native /goal',
815
+ 'settings.goalRunGlobal': 'Native /goal',
823
816
  'settings.goalRunGlobalHint': 'Off by default. While off, every task runs one plain turn and never calls dsh built-in /goal; a run uses native /goal only when this is on AND the task-level option is checked (see the task option below). The task-level checkbox always stays operable and this switch never rewrites it: the master switch only decides whether that choice takes effect. The switch is frozen when an execution starts, so it only affects runs opened afterwards.',
824
- 'settings.goalRunGlobalHintBrief': 'Off by default. A run uses native /goal only when this and the card option are both on.',
817
+ 'settings.goalRunGlobalHintBrief': 'A run uses native /goal only while this is on.',
825
818
  'settings.goalRunGlobalDisabledTaskOption': 'The global native /goal switch is off: the task-level option can still be checked or cleared, but it has no effect right now and the preference you save is never rewritten; turning the global switch back on applies it. This execution runs one plain turn and performs no goal acceptance.',
826
819
  'settings.goalVerificationTitle': 'Task acceptance',
827
- 'settings.goalVerification': 'Enable task acceptance',
820
+ 'settings.goalVerification': 'Task acceptance',
828
821
  'settings.goalVerificationCardHint': 'The switch, the judge model and the criteria threshold.',
829
822
  'settings.goalVerificationHint': 'On by default: a task executed in goal form must pass one acceptance before update_goal may mark it complete (the three coding criteria, aimed at engineering tasks, a 0.65 threshold, two rounds per criterion with the A/B slots swapped, and the work must beat the empty-work baseline). A first failure returns the total, the per-criterion scores and the located findings to the fixing agent, and one execution may accept at most twice; a second failure fails that execution. It affects only this board goal-form executions, never plain chat and never a task pinned to goalRun: false. Every acceptance really calls the judge model and spends quota.',
830
- 'settings.goalVerificationHintBrief': 'On by default. Two rounds per criterion at 0.65, and each acceptance calls the judge model.',
823
+ 'settings.goalVerificationHintBrief': 'Two rounds per criterion, and each acceptance calls the judge model.',
831
824
  'settings.goalVerificationModel': 'Judge model',
832
825
  'settings.goalVerificationModelHint': 'Blank inherits the host: the default route of the host model catalog, never the card pinned execution model.',
833
826
  'settings.goalVerificationModelHintBrief': 'Blank inherits the host default route, never the model pinned on the card.',
@@ -971,6 +964,7 @@ export const en: Record<keyof typeof zh, string> = {
971
964
  'board.hideSubtasks': 'Hide subtasks',
972
965
  'board.showSubtasks': 'Show subtasks',
973
966
  'board.subtaskFilterHint': 'The board shows parent tasks only; a text or label filter reveals the subtasks automatically.',
967
+ 'settings.enabledTopic': 'Basics',
974
968
  }
975
969
 
976
970
  /** The dictionary key union. */
@@ -52,6 +52,8 @@ export const FAMILY_GROUP_SERVICE = 'webUiSettings'
52
52
  export interface PluginCardSlots {
53
53
  /** Contribution of one card entry. */
54
54
  register(options: never, component: never): unknown
55
+ /** Declaration probe: a target seat may appear after this plugin applies. */
56
+ spec?(key: string): unknown
55
57
  }
56
58
 
57
59
  /** The slice of the client context a card contribution needs. */
@@ -154,6 +156,10 @@ export function installPluginCard(ctx: PluginCardContext, seat: PluginCardSeat):
154
156
  if (reconciling) return
155
157
  const target = familyGroupLoaded(ctx) ? FAMILY_PLUGIN_CARD_SEAT : OFFICIAL_PLUGIN_CARD_SEAT
156
158
  if (current === target) return
159
+ // The group's child seat can be declared after this card applies (the
160
+ // parent mounts its pages through the extension service). Wait for the
161
+ // declaration instead of logging a refused registration on every boot.
162
+ if (typeof slots.spec === 'function' && slots.spec(target) === undefined) return
157
163
  reconciling = true
158
164
  const previous = dispose
159
165
  dispose = undefined