@linxin666/dsh-client-ui-task-board 0.4.16 → 0.4.17
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/README.i18n.yaml +2 -2
- package/README.md +16 -36
- package/README.zh.md +16 -36
- package/lib/client.js +101 -1348
- package/lib/client.js.map +1 -1
- package/lib/index.js +129 -2528
- package/lib/types/client/TaskBoardSettingsCard.d.ts +0 -20
- package/lib/types/client/board/status-key.d.ts +0 -15
- package/lib/types/client/locales.d.ts +1 -110
- package/lib/types/core/controller.d.ts +1 -1
- package/lib/types/core/extension.d.ts +4 -5
- package/lib/types/core/model-catalog.d.ts +58 -0
- package/lib/types/core/reasoning-effort.d.ts +1 -1
- package/lib/types/core/tasks.d.ts +0 -45
- package/lib/types/core/use-cases/task-update.d.ts +1 -1
- package/lib/types/host/llm-dispatch.d.ts +8 -10
- package/lib/types/host-ledger.d.ts +0 -28
- package/lib/types/host-runner.d.ts +6 -71
- package/lib/types/host-service.d.ts +17 -89
- package/lib/types/index.d.ts +0 -78
- package/lib/types/protocol.d.ts +6 -23
- package/package.json +26 -26
- package/src/client/TaskBoardSettingsCard.tsx +13 -200
- package/src/client/board/ExecutionLog.tsx +2 -5
- package/src/client/board/NewTaskModal.tsx +1 -42
- package/src/client/board/TaskCard.tsx +2 -7
- package/src/client/board/TaskDetail.tsx +2 -37
- package/src/client/board/status-key.ts +0 -30
- package/src/client/board-settings.module.css +3 -22
- package/src/client/board.module.css +1 -104
- package/src/client/index.ts +1 -1
- package/src/client/locales.ts +6 -224
- package/src/core/controller.ts +1 -3
- package/src/core/extension.ts +4 -5
- package/src/core/model-catalog.ts +114 -0
- package/src/core/reasoning-effort.ts +1 -1
- package/src/core/store.ts +22 -17
- package/src/core/tasks.ts +0 -53
- package/src/core/use-cases/task-update.ts +1 -8
- package/src/host/agent-tools.ts +1 -15
- package/src/host/llm-dispatch.ts +8 -10
- package/src/host-ledger.ts +1 -86
- package/src/host-routes.ts +4 -4
- package/src/host-runner.ts +12 -138
- package/src/host-service.ts +51 -266
- package/src/index.ts +9 -163
- package/src/protocol.ts +8 -43
- package/lib/types/client/board/VerificationReport.d.ts +0 -10
- package/lib/types/core/verification-budget.d.ts +0 -52
- package/lib/types/core/verification.d.ts +0 -753
- package/lib/types/host/verification-gate.d.ts +0 -95
- package/lib/types/host/verification-runner.d.ts +0 -139
- package/lib/types/host/workspace-evidence.d.ts +0 -53
- package/src/client/board/VerificationReport.tsx +0 -361
- package/src/core/verification-budget.ts +0 -115
- package/src/core/verification.ts +0 -1594
- package/src/host/verification-gate.ts +0 -487
- package/src/host/verification-runner.ts +0 -702
- package/src/host/workspace-evidence.ts +0 -176
|
@@ -1700,101 +1700,6 @@
|
|
|
1700
1700
|
transform: rotate(225deg);
|
|
1701
1701
|
}
|
|
1702
1702
|
|
|
1703
|
-
/* --- acceptance report -------------------------------------------------------
|
|
1704
|
-
* The row carries the verdict only. Everything the board decided on stays one
|
|
1705
|
-
* press away inside the fold: counts, judge route, per-criterion scores, the
|
|
1706
|
-
* findings, the evidence scope and the usage are all rendered there, unchanged.
|
|
1707
|
-
* --------------------------------------------------------------------------- */
|
|
1708
|
-
|
|
1709
|
-
.verifyReport {
|
|
1710
|
-
display: flex;
|
|
1711
|
-
flex-direction: column;
|
|
1712
|
-
gap: 8px;
|
|
1713
|
-
min-width: 0;
|
|
1714
|
-
}
|
|
1715
|
-
|
|
1716
|
-
.verifyBadge {
|
|
1717
|
-
position: relative;
|
|
1718
|
-
display: inline-flex;
|
|
1719
|
-
align-items: center;
|
|
1720
|
-
gap: 6px;
|
|
1721
|
-
align-self: flex-start;
|
|
1722
|
-
max-width: 100%;
|
|
1723
|
-
padding: 2px 10px;
|
|
1724
|
-
font-family: inherit;
|
|
1725
|
-
font-size: 12px;
|
|
1726
|
-
font-weight: 600;
|
|
1727
|
-
line-height: 18px;
|
|
1728
|
-
color: var(--dsw-alias-label-secondary);
|
|
1729
|
-
background: var(--dsw-alias-interactive-bg-hover);
|
|
1730
|
-
border: 1px solid var(--dsw-alias-border-l2);
|
|
1731
|
-
border-radius: 999px;
|
|
1732
|
-
cursor: pointer;
|
|
1733
|
-
}
|
|
1734
|
-
|
|
1735
|
-
.verifyBadge::after {
|
|
1736
|
-
content: '';
|
|
1737
|
-
position: absolute;
|
|
1738
|
-
left: 0;
|
|
1739
|
-
right: 0;
|
|
1740
|
-
top: 50%;
|
|
1741
|
-
height: var(--dsh-tb-hit-size);
|
|
1742
|
-
transform: translateY(-50%);
|
|
1743
|
-
}
|
|
1744
|
-
|
|
1745
|
-
.verifyBadge[data-tone='warn'] {
|
|
1746
|
-
color: var(--dsw-alias-state-warn-primary);
|
|
1747
|
-
background: var(--dsw-alias-state-warn-secondary);
|
|
1748
|
-
border-color: transparent;
|
|
1749
|
-
}
|
|
1750
|
-
|
|
1751
|
-
.verifyBadge[data-tone='success'] {
|
|
1752
|
-
color: var(--dsw-alias-state-success-primary);
|
|
1753
|
-
background: var(--dsw-alias-state-success-secondary);
|
|
1754
|
-
border-color: transparent;
|
|
1755
|
-
}
|
|
1756
|
-
|
|
1757
|
-
.verifyBadge[data-tone='error'] {
|
|
1758
|
-
color: var(--dsw-alias-state-error-primary);
|
|
1759
|
-
background: var(--dsw-alias-state-error-secondary);
|
|
1760
|
-
border-color: transparent;
|
|
1761
|
-
}
|
|
1762
|
-
|
|
1763
|
-
.verifyVerdict {
|
|
1764
|
-
font-weight: 700;
|
|
1765
|
-
overflow-wrap: anywhere;
|
|
1766
|
-
}
|
|
1767
|
-
|
|
1768
|
-
.verifyPanel {
|
|
1769
|
-
display: flex;
|
|
1770
|
-
flex-direction: column;
|
|
1771
|
-
gap: 8px;
|
|
1772
|
-
padding: 10px 12px;
|
|
1773
|
-
background: var(--dsw-alias-bg-layer-2);
|
|
1774
|
-
border: 1px solid var(--dsw-alias-border-l1);
|
|
1775
|
-
border-radius: 8px;
|
|
1776
|
-
min-width: 0;
|
|
1777
|
-
}
|
|
1778
|
-
|
|
1779
|
-
.attemptRow {
|
|
1780
|
-
display: flex;
|
|
1781
|
-
flex-direction: column;
|
|
1782
|
-
gap: 6px;
|
|
1783
|
-
padding: 8px 10px;
|
|
1784
|
-
background: var(--dsw-alias-bg-base);
|
|
1785
|
-
border: 1px solid var(--dsw-alias-border-l1);
|
|
1786
|
-
border-radius: 8px;
|
|
1787
|
-
min-width: 0;
|
|
1788
|
-
}
|
|
1789
|
-
|
|
1790
|
-
.attemptHead {
|
|
1791
|
-
display: flex;
|
|
1792
|
-
align-items: center;
|
|
1793
|
-
flex-wrap: wrap;
|
|
1794
|
-
gap: 8px;
|
|
1795
|
-
min-width: 0;
|
|
1796
|
-
}
|
|
1797
|
-
|
|
1798
1703
|
/* --- free-text references (handover bundle) --------------------------------- */
|
|
1799
1704
|
|
|
1800
1705
|
.referenceList {
|
|
@@ -1918,20 +1823,17 @@
|
|
|
1918
1823
|
}
|
|
1919
1824
|
|
|
1920
1825
|
/* --- disclosure motion -------------------------------------------------------
|
|
1921
|
-
* The folded regions of the panel (the rest of the history
|
|
1922
|
-
* detail) appear and leave as one reversed pair: the same 6px travel on the
|
|
1826
|
+
* The folded regions of the panel (the rest of the history) appear and leave as one reversed pair: the same 6px travel on the
|
|
1923
1827
|
* same curve, only opposite in direction. `usePresence` keeps the node mounted
|
|
1924
1828
|
* through the exit leg, so the close never snaps.
|
|
1925
1829
|
* --------------------------------------------------------------------------- */
|
|
1926
1830
|
|
|
1927
1831
|
.executionExtra,
|
|
1928
|
-
.verifyPanel,
|
|
1929
1832
|
.detailBody .formSectionBody {
|
|
1930
1833
|
animation: dshTbRowsIn var(--dsh-tb-motion-enter) var(--dsh-tb-ease) both;
|
|
1931
1834
|
}
|
|
1932
1835
|
|
|
1933
1836
|
.executionExtra[data-execution-fold='closing'],
|
|
1934
|
-
.verifyPanel[data-state='closing'],
|
|
1935
1837
|
.detailBody .formSectionBody[data-state='closing'] {
|
|
1936
1838
|
animation: dshTbRowsOut var(--dsh-tb-motion-close) var(--dsh-tb-ease) both;
|
|
1937
1839
|
}
|
|
@@ -1973,13 +1875,11 @@
|
|
|
1973
1875
|
unmounts on the close duration. */
|
|
1974
1876
|
@media (prefers-reduced-motion: reduce) {
|
|
1975
1877
|
.executionExtra,
|
|
1976
|
-
.verifyPanel,
|
|
1977
1878
|
.detailBody .formSectionBody {
|
|
1978
1879
|
animation: dshTbFadeIn var(--dsh-tb-motion-close) linear both;
|
|
1979
1880
|
}
|
|
1980
1881
|
|
|
1981
1882
|
.executionExtra[data-execution-fold='closing'],
|
|
1982
|
-
.verifyPanel[data-state='closing'],
|
|
1983
1883
|
.detailBody .formSectionBody[data-state='closing'] {
|
|
1984
1884
|
animation: dshTbFadeOut var(--dsh-tb-motion-close) linear both;
|
|
1985
1885
|
}
|
|
@@ -2284,7 +2184,6 @@
|
|
|
2284
2184
|
.iconButton:focus-visible,
|
|
2285
2185
|
.linkButton:focus-visible,
|
|
2286
2186
|
.menuItem:focus-visible,
|
|
2287
|
-
.verifyBadge:focus-visible,
|
|
2288
2187
|
.executionSession:focus-visible,
|
|
2289
2188
|
.search:focus-visible,
|
|
2290
2189
|
.input:focus-visible,
|
|
@@ -2303,7 +2202,6 @@
|
|
|
2303
2202
|
.iconButton,
|
|
2304
2203
|
.linkButton,
|
|
2305
2204
|
.menuItem,
|
|
2306
|
-
.verifyBadge,
|
|
2307
2205
|
.executionSession,
|
|
2308
2206
|
.search,
|
|
2309
2207
|
.input,
|
|
@@ -2368,7 +2266,6 @@
|
|
|
2368
2266
|
.iconButton,
|
|
2369
2267
|
.linkButton,
|
|
2370
2268
|
.menuItem,
|
|
2371
|
-
.verifyBadge,
|
|
2372
2269
|
.executionSession,
|
|
2373
2270
|
.disclosureChevron,
|
|
2374
2271
|
.menuChevron,
|
package/src/client/index.ts
CHANGED
|
@@ -479,7 +479,7 @@ export function bindSettingsForm(ctx: ClientContext): ConfigForm<TaskBoardSettin
|
|
|
479
479
|
* signature.
|
|
480
480
|
*
|
|
481
481
|
* Deliberately nothing but those four keys: the settings form also carries the
|
|
482
|
-
* board's own switches
|
|
482
|
+
* board's own switches, and an edit to one of
|
|
483
483
|
* those says nothing about the defaults the create dialog prefills from. Not a
|
|
484
484
|
* second normalization of Host state — the value never leaves this comparison.
|
|
485
485
|
* @param value - the settings form's effective section, if it has one.
|
package/src/client/locales.ts
CHANGED
|
@@ -71,8 +71,6 @@ export const zh = {
|
|
|
71
71
|
'new.summary.attachmentCount': '{count} 个附件',
|
|
72
72
|
'new.summary.filled': '已填写',
|
|
73
73
|
'new.summary.scheduleOff': '未启用',
|
|
74
|
-
'new.summary.multiRound': '多轮 /goal',
|
|
75
|
-
'new.summary.singleRound': '单轮',
|
|
76
74
|
'new.title': '标题',
|
|
77
75
|
'new.titlePlaceholder': '一句话描述要做什么',
|
|
78
76
|
'new.description': '描述',
|
|
@@ -293,24 +291,15 @@ export const zh = {
|
|
|
293
291
|
'exec.reuseSession': '在同一对话继续',
|
|
294
292
|
'exec.reuseSessionHint': '开启后,本任务的后续执行在上一次会话里继续(该会话空闲且仍存在时),不再每次新建对话;每次复用时都会重新应用上面钉住的权限与模型。',
|
|
295
293
|
'exec.reuseSessionHint.short': '后续执行复用上一次的空闲会话',
|
|
296
|
-
'exec.goalRun': '以 dsh 内置的 /goal 开始执行任务',
|
|
297
|
-
'exec.goalRunHint': '默认关闭:勾选后执行时把任务目标作为持久目标交给 dsh 内置的 /goal,会话会自动续跑多轮,直到 agent 标记目标完成;看板在该目标真正结束后才结算本次执行。不勾选则只执行一轮普通对话。',
|
|
298
|
-
'exec.goalRunHint.short': '多轮续跑,目标结束后才结算本次执行',
|
|
299
|
-
'exec.goalRunGlobalOff': '全局总开关已关闭,勾选暂不生效',
|
|
300
|
-
'exec.skipVerification': '跳过本任务的验收',
|
|
301
|
-
'exec.skipVerificationHint': '默认关闭:勾选后本任务以 goal 形式执行时不再拦截 update_goal 标记完成,也不要求通过验收;执行记录会标注「该卡片跳过验收」。仅对之后新开的执行生效,验收总开关关闭时本项无意义。',
|
|
302
|
-
'exec.skipVerificationHint.short': '本卡执行不做验收判定',
|
|
303
294
|
'detail.executionSettings': '执行设置',
|
|
304
|
-
'detail.settings.
|
|
305
|
-
'detail.settings.summary.none': '
|
|
295
|
+
'detail.settings.run': '运行方式',
|
|
296
|
+
'detail.settings.summary.none': '未开启',
|
|
306
297
|
'detail.settings.summary.reuseSession': '同一对话继续',
|
|
307
|
-
'detail.settings.summary.goal': '/goal 执行',
|
|
308
|
-
'detail.settings.summary.skipVerification': '跳过验收',
|
|
309
298
|
'exec.hint': '执行时生效:工作区决定执行会话落在哪个工作区;Agent 预设决定会话的组合(工具面与提示词段);权限经 /permission 命令应用到会话。留空则继承部署默认。',
|
|
310
299
|
'exec.hint.short': '留空继承部署默认,执行时生效',
|
|
311
300
|
// 插件设置卡片(settings.plugin.item 席位)。
|
|
312
301
|
'settings.title': '任务看板',
|
|
313
|
-
'settings.description': '
|
|
302
|
+
'settings.description': '任务编排与 agent 播报。',
|
|
314
303
|
'settings.enabled': '总开关',
|
|
315
304
|
'settings.enabledCardHint': '播报、睡眠保护与子任务层级。',
|
|
316
305
|
'settings.enabledHint': '关闭后隐藏侧边栏入口与看板视图,并注销 task_board_* agent 工具;开启时任何会话都可以通过这些工具读写看板、子任务与定时计划。',
|
|
@@ -355,39 +344,6 @@ export const zh = {
|
|
|
355
344
|
'settings.spendBudgetTokens': '每日 token 上限',
|
|
356
345
|
'settings.spendBudgetTokensHint': '默认 0,表示不设闸,行为与没有这项设置时完全一致(不读账本、不计数)。设为正整数后,今日已用 token 达到该值时:手动执行与重新执行被拒绝,调用方看到的拒绝文本就是原因;到点的定时执行把原因写进调度错误并跳过本次触发,不消耗计划次数,因此调高上限或跨过本地零点后下一次触发照常执行。计量单位是 token 而不是金额:使用账本只对 DeepSeek 官方路由计价,其他路由恒为 0。今日已用取自该账本按本地日期分桶的输入、缓存读写与输出之和,与「使用统计」面板的口径一致。',
|
|
357
346
|
'settings.spendBudgetTokensHintBrief': '今日用量到顶后,手动执行被拒绝,定时触发跳过。',
|
|
358
|
-
'settings.runBehaviorTitle': '运行行为',
|
|
359
|
-
'settings.runBehaviorCardHint': '全局原生 /goal 执行开关(总开关,默认关闭)。',
|
|
360
|
-
'settings.goalRunGlobal': '原生 /goal 执行',
|
|
361
|
-
'settings.goalRunGlobalHint': '默认关闭。关闭时所有任务都按普通单回合执行,不调用 dsh 内置的 /goal;只有这里开启、且任务级「以 /goal 开始执行」被勾选时,才执行原生 /goal。任务级勾选始终可操作、也不会被这里的开关改写,总开关只决定它是否生效。开关按执行启动时冻结,只影响之后新开的执行。',
|
|
362
|
-
'settings.goalRunGlobalHintBrief': '开启后执行才使用原生 /goal。',
|
|
363
|
-
'settings.goalRunGlobalDisabledTaskOption': '全局「原生 /goal 执行」总开关已关闭:任务级选项仍可随时勾选或取消,但暂不生效,你保存的偏好也不会被改写;开启总开关后即按该偏好执行。本次执行按普通单回合进行,未执行 goal 验收。',
|
|
364
|
-
'settings.goalVerificationTitle': '任务验收',
|
|
365
|
-
'settings.goalVerification': '任务验收',
|
|
366
|
-
'settings.goalVerificationCardHint': '验收开关、裁判模型与判据阈值。',
|
|
367
|
-
'settings.goalVerificationHint': '默认打开:以 goal 形式执行的任务在 update_goal 标记完成前必须先通过一次验收(三项 coding 判据(本分区面向工程任务)、阈值 0.65、每项两轮且交换 A/B 位置,实际工作须胜过空工作基线)。首次不通过会把总分、逐项分数与可定位问题反馈给 agent 修复,同一执行最多两次验收;第二次仍不通过则本次执行判失败。仅作用于本插件以 goal 形式执行的任务,不影响普通聊天,也不影响显式 goalRun:false 的单回合任务。每次验收都会真实调用裁判模型并消耗额度。',
|
|
368
|
-
'settings.goalVerificationHintBrief': '每项判据两轮,每次验收都会调用裁判模型。',
|
|
369
|
-
'settings.goalVerificationModel': '验收模型',
|
|
370
|
-
'settings.goalVerificationModelHint': '留空即继承宿主:使用宿主模型目录的默认路由,而不是任务卡钉住的执行模型。',
|
|
371
|
-
'settings.goalVerificationModelHintBrief': '留空继承宿主默认路由,不跟随卡片钉住的执行模型。',
|
|
372
|
-
'settings.goalVerificationModelInherit': '继承宿主({model})',
|
|
373
|
-
'settings.goalVerificationModelInheritUnknown': '继承宿主(宿主未提供模型目录)',
|
|
374
|
-
'settings.goalVerificationEffort': '推理强度',
|
|
375
|
-
'settings.goalVerificationEffortHint': '留空即继承宿主默认档位。目标模型不支持所选档位时不会盲传:验收改用该模型自己的默认档位,并在下方标注回退。',
|
|
376
|
-
'settings.goalVerificationEffortHintBrief': '留空继承宿主默认档位。目标模型不支持的档位会自动回退。',
|
|
377
|
-
'settings.goalVerificationEffortInherit': '继承宿主({effort})',
|
|
378
|
-
'settings.goalVerificationEffortInheritUnknown': '继承宿主(模型默认档位)',
|
|
379
|
-
'settings.goalVerificationResolved': '实际解析后的验收配置',
|
|
380
|
-
'settings.goalVerificationResolvedModel': '裁判模型:{model}',
|
|
381
|
-
'settings.goalVerificationResolvedEffort': '推理强度:{effort}',
|
|
382
|
-
'settings.goalVerificationResolvedNoEffort': '推理强度:不显式传参(用模型自身默认)',
|
|
383
|
-
'settings.goalVerificationResolvedSource': '来源:{source}',
|
|
384
|
-
'settings.goalVerificationSourceInherit': '继承宿主',
|
|
385
|
-
'settings.goalVerificationSourceExplicit': '显式配置',
|
|
386
|
-
'settings.goalVerificationResolvedPreset': '判据:coding(Specification Adherence / Output Match / Error Signal Detection),阈值 {threshold}',
|
|
387
|
-
'settings.goalVerificationRouteMissing': '宿主未提供模型目录,无法解析验收模型:开启后 goal 任务的完成声明会被拒绝并记录为验收异常。',
|
|
388
|
-
'settings.goalVerificationEffortFallback': '所选推理强度 {requested} 不被目标模型支持,已回退为 {resolved}。',
|
|
389
|
-
'settings.goalVerificationEffortFallbackNone': '所选推理强度 {requested} 不被目标模型支持,已回退为该模型默认档位(不显式传参)。',
|
|
390
|
-
'settings.goalVerificationModelInvalid': '配置的验收模型不是 provider/model 形式,已回退宿主默认。',
|
|
391
347
|
'settings.cardDefaultsTitle': '新建卡片默认值',
|
|
392
348
|
'settings.cardDefaultsCardHint': '新建对话框打开时预填的 Agent 预设、权限、模型与思考档位;留空即不设置,创建卡片的行为与未配置时完全一致。它们只是预填,不改变任何既有语义,新建的卡片仍可随时修改;思考档位默认值只在卡片最终钉住的模型就是这里的默认模型时才生效。',
|
|
393
349
|
'settings.cardDefaultsCardBrief': '新建卡片预填的预设、权限、模型与思考档位。',
|
|
@@ -397,71 +353,6 @@ export const zh = {
|
|
|
397
353
|
'settings.cardDefaultPermissionHintBrief': '留空为不设置。高于会话基线的默认值执行前仍需人工确认。',
|
|
398
354
|
'settings.cardDefaultModelHint': '留空为宿主默认(agent-default-model)。对话框里的显式选择优先于源卡/父卡已钉住的值,后者优先于这里的默认值;自己选了模型的调用方不借用任何默认档位。',
|
|
399
355
|
'settings.cardDefaultModelHintBrief': '留空即宿主默认模型,对话框里的显式选择始终优先。',
|
|
400
|
-
'running.executing': '执行中',
|
|
401
|
-
'running.verifying': '验收中',
|
|
402
|
-
'running.repairing': '验收未通过修复中',
|
|
403
|
-
'running.verificationPassed': '验收通过',
|
|
404
|
-
'running.verificationFailed': '验收未通过',
|
|
405
|
-
'running.verificationInvalid': '验收无效,等待处理',
|
|
406
|
-
'verify.title': '验收报告',
|
|
407
|
-
'verify.status.passed': '通过',
|
|
408
|
-
'verify.status.failed': '未通过',
|
|
409
|
-
'verify.status.exception': '异常',
|
|
410
|
-
'verify.status.verifying': '验收中',
|
|
411
|
-
'verify.status.pending': '待验收',
|
|
412
|
-
'verify.status.off': '本次执行未启用验收',
|
|
413
|
-
'verify.status.invalid': '验收无效',
|
|
414
|
-
'verify.status.invalidHeld': '验收无效,等待人工处理',
|
|
415
|
-
'verify.attemptInvalid': '第 {index} 次验收无效',
|
|
416
|
-
'verify.invalidReason.missing-finding': '未达标的判据没有对应的结构化问题反馈',
|
|
417
|
-
'verify.invalidReason.unlocatable-quote': '问题反馈引用的位置不存在于本次裁判所见的证据中',
|
|
418
|
-
'verify.invalidReason.baseline-finding': '问题反馈指向空工作基线,而不是本次执行的工作',
|
|
419
|
-
'verify.invalidReason.vacuous-finding': '问题反馈为空或空泛评价,没有说明实际观测与差异',
|
|
420
|
-
'verify.invalidReason.insufficient-evidence': '裁判看到的证据不足(例如轨迹被截断),无法支撑否决',
|
|
421
|
-
'verify.invalidReason.unknown': '未产生可用的质量判定',
|
|
422
|
-
'verify.invalidCounts': '有效质量判定 {quality}/{max} · 无效验收 {invalid}/{maxInvalid} · 验收异常 {exceptions}/{max}',
|
|
423
|
-
'verify.invalidDetail': '无效原因:{reason}',
|
|
424
|
-
'verify.criterionFindings': '结构化问题反馈(判据 · 引用位置 · 实际引用)',
|
|
425
|
-
'verify.criterionFinding': '{criterion} · {location}:“{quote}”',
|
|
426
|
-
'verify.criterionFindingFull': '{criterion} · {location}:“{quote}” 要求:{requirement} 观测:{observation} 差异:{gap}',
|
|
427
|
-
'verify.location.task': '任务要求',
|
|
428
|
-
'verify.location.trajectory': '执行轨迹',
|
|
429
|
-
'verify.location.workspace': '宿主记录的变更',
|
|
430
|
-
'verify.location.baseline': '空工作基线(不构成否决证据)',
|
|
431
|
-
'verify.location.unknown': '未标明位置',
|
|
432
|
-
'verify.detailRemoved': '本条验收的详细材料已在通过并成功结算后自动清理(不是裁判未举证)。',
|
|
433
|
-
'verify.cleanup.cleaned': '本次执行的验收专用详细材料已在通过并成功结算后自动清理;以下为保留的轻量审计凭据。',
|
|
434
|
-
'verify.cleanup.pending': '验收专用详细材料待清理(将通过并结算后启动)。',
|
|
435
|
-
'verify.cleanup.failed': '验收详细材料清理失败(已重试 {attempts} 次):{error};通过记录仍然有效,宿主重启后会补清。',
|
|
436
|
-
'verify.cleanup.audit': '保留凭据:第 {index} 次 · {stage} · 分数 {score} · 证据哈希 {hash}',
|
|
437
|
-
'verify.cleanup.stage.quality': '质量判定',
|
|
438
|
-
'verify.cleanup.stage.invalid': '无效验收',
|
|
439
|
-
'verify.cleanup.stage.exception': '验收异常',
|
|
440
|
-
'verify.cleanup.stage.budget': '时间预算耗尽',
|
|
441
|
-
'verify.summary': '总分 {score}(阈值 {threshold})· 空工作基线 {baseline}',
|
|
442
|
-
'verify.criteria': '逐项判据',
|
|
443
|
-
'verify.criterion': '{name}:{score}(阈值 {threshold})',
|
|
444
|
-
'verify.rounds': '每项 {rounds} 轮,交换 A/B 位置后取平均',
|
|
445
|
-
'verify.judge': '裁判模型 {model}(推理强度 {effort})',
|
|
446
|
-
'verify.judgeNoEffort': '裁判模型 {model}(推理强度:不显式传参)',
|
|
447
|
-
'verify.judgeInherited': '裁判模型 {model}(继承宿主)',
|
|
448
|
-
'verify.attempt': '第 {index} 次验收',
|
|
449
|
-
'verify.attemptException': '第 {index} 次验收异常',
|
|
450
|
-
'verify.counts': '质量验收 {quality}/{max} · 验收异常 {exceptions}/{max}',
|
|
451
|
-
'verify.findings': '问题反馈',
|
|
452
|
-
'verify.noFindings': '本次裁判没有报告可定位的问题',
|
|
453
|
-
'verify.evidence': '证据范围:{chars} 字符 · {entries} 条轨迹 · 截断 {omitted} 字符',
|
|
454
|
-
'verify.workspaceEvidence': '其中 {files} 个文件变更取自宿主自身观察',
|
|
455
|
-
'verify.usage': '用量:请求 {calls} 次 · 输入 {input} · 输出 {output} · 推理 {reasoning} tokens',
|
|
456
|
-
'verify.usageIncomplete': '(至少一次请求的用量未知,以上为下限)',
|
|
457
|
-
'verify.finalFailure': '判定依据:{reason}',
|
|
458
|
-
'verify.applicability.disabled': '本次执行启动时验收开关关闭,按原有回合判定结算。',
|
|
459
|
-
'verify.applicability.goalUnavailable': '本次执行未成为 goal 执行(卡片未勾选「以 /goal 开始执行任务」,或 /goal 被拒绝/不可用),验收未强制执行。',
|
|
460
|
-
'verify.applicability.skipped': '该任务卡勾选了「跳过验收」,本次执行未经验收判定。',
|
|
461
|
-
'verify.applicability.teamMember': '团队执行成员:由 Lead 的团队汇总证据统一验收。',
|
|
462
|
-
'verify.applicability.goalDisabled': '本次执行启动时全局「原生 /goal 执行」总开关关闭,按普通单回合执行:本次未执行 goal 验收,既不算已验收通过,也不因此判失败。',
|
|
463
|
-
'verify.effortFallback': '推理强度回退:{requested} → {resolved}',
|
|
464
|
-
'verify.thresholdValue': '{value}%',
|
|
465
356
|
// 子任务(父子关系、执行时由父卡派发、关联/解除关联)。
|
|
466
357
|
'detail.parent': '父任务',
|
|
467
358
|
'detail.parent.open': '打开父任务',
|
|
@@ -579,8 +470,6 @@ export const en: Record<keyof typeof zh, string> = {
|
|
|
579
470
|
'new.summary.attachmentCount': '{count} attachments',
|
|
580
471
|
'new.summary.filled': 'Filled',
|
|
581
472
|
'new.summary.scheduleOff': 'Off',
|
|
582
|
-
'new.summary.multiRound': 'multi-round /goal',
|
|
583
|
-
'new.summary.singleRound': 'single round',
|
|
584
473
|
'new.title': 'Title',
|
|
585
474
|
'new.titlePlaceholder': 'What should be done, in one line',
|
|
586
475
|
'new.description': 'Description',
|
|
@@ -801,24 +690,15 @@ export const en: Record<keyof typeof zh, string> = {
|
|
|
801
690
|
'exec.reuseSession': 'Continue in the same conversation',
|
|
802
691
|
'exec.reuseSessionHint': 'When on, later runs continue in the previous session (when that session is idle and still exists) instead of starting a new conversation each time; the pinned permission and model above are re-applied on every reuse.',
|
|
803
692
|
'exec.reuseSessionHint.short': 'Later runs reuse the previous idle session',
|
|
804
|
-
'exec.goalRun': "Start the run with dsh's built-in /goal",
|
|
805
|
-
'exec.goalRunHint': 'Off by default: when checked, the run arms dsh built-in /goal with the task objective, so the session keeps working automatic continuation rounds until the agent marks the goal complete, and the board settles the execution only when that goal really ends. Unchecked: one plain turn.',
|
|
806
|
-
'exec.goalRunHint.short': 'Automatic rounds; the execution settles when the goal ends',
|
|
807
|
-
'exec.goalRunGlobalOff': 'The global switch is off, so checking it has no effect yet',
|
|
808
|
-
'exec.skipVerification': 'Skip acceptance for this task',
|
|
809
|
-
'exec.skipVerificationHint': 'Off by default: when checked, a goal-form run of this task no longer gates update_goal on a passing acceptance, and the execution record is marked as skipped. It applies only to executions started afterwards, and means nothing while the board-wide acceptance switch is off.',
|
|
810
|
-
'exec.skipVerificationHint.short': 'This card runs without an acceptance verdict',
|
|
811
693
|
'detail.executionSettings': 'Execution Settings',
|
|
812
|
-
'detail.settings.
|
|
813
|
-
'detail.settings.summary.none': '
|
|
694
|
+
'detail.settings.run': 'Run Mode',
|
|
695
|
+
'detail.settings.summary.none': 'Not enabled',
|
|
814
696
|
'detail.settings.summary.reuseSession': 'Same conversation',
|
|
815
|
-
'detail.settings.summary.goal': '/goal run',
|
|
816
|
-
'detail.settings.summary.skipVerification': 'Acceptance skipped',
|
|
817
697
|
'exec.hint': 'Applied when the task runs: the workspace decides where the execution session lands; the agent preset composes the session (tool face and prompt sections); the permission is applied through the /permission command. Blank inherits the deployment default.',
|
|
818
698
|
'exec.hint.short': 'Blank inherits the deployment default; applied at run time',
|
|
819
699
|
// Plugin settings card (the `settings.plugin.item` seat).
|
|
820
700
|
'settings.title': 'Task Board',
|
|
821
|
-
'settings.description': 'Task orchestration
|
|
701
|
+
'settings.description': 'Task orchestration and agent announcement.',
|
|
822
702
|
'settings.enabled': 'Master switch',
|
|
823
703
|
'settings.enabledCardHint': 'Announcement, sleep protection and subtask depth.',
|
|
824
704
|
'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.',
|
|
@@ -863,38 +743,6 @@ export const en: Record<keyof typeof zh, string> = {
|
|
|
863
743
|
'settings.spendBudgetTokens': 'Daily token cap',
|
|
864
744
|
'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.',
|
|
865
745
|
'settings.spendBudgetTokensHintBrief': 'Past today\'s cap, manual runs are refused and due schedules skip.',
|
|
866
|
-
'settings.runBehaviorTitle': 'Run behavior',
|
|
867
|
-
'settings.runBehaviorCardHint': 'The global native /goal switch (master control, off by default).',
|
|
868
|
-
'settings.goalRunGlobal': 'Native /goal',
|
|
869
|
-
'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.',
|
|
870
|
-
'settings.goalRunGlobalHintBrief': 'A run uses native /goal only while this is on.',
|
|
871
|
-
'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.',
|
|
872
|
-
'settings.goalVerificationTitle': 'Task acceptance',
|
|
873
|
-
'settings.goalVerification': 'Task acceptance',
|
|
874
|
-
'settings.goalVerificationCardHint': 'The switch, the judge model and the criteria threshold.',
|
|
875
|
-
'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.',
|
|
876
|
-
'settings.goalVerificationHintBrief': 'Two rounds per criterion, and each acceptance calls the judge model.',
|
|
877
|
-
'settings.goalVerificationModel': 'Judge model',
|
|
878
|
-
'settings.goalVerificationModelHint': 'Blank inherits the host: the default route of the host model catalog, never the card pinned execution model.',
|
|
879
|
-
'settings.goalVerificationModelHintBrief': 'Blank inherits the host default route, never the model pinned on the card.',
|
|
880
|
-
'settings.goalVerificationModelInherit': 'Inherit host ({model})',
|
|
881
|
-
'settings.goalVerificationModelInheritUnknown': 'Inherit host (no model catalog)',
|
|
882
|
-
'settings.goalVerificationEffort': 'Reasoning effort',
|
|
883
|
-
'settings.goalVerificationEffortHint': 'Blank inherits the host default level. A level the target model does not declare is never sent blindly: the acceptance falls back to that model own default level, and the fallback is reported below.',
|
|
884
|
-
'settings.goalVerificationEffortHintBrief': 'Blank inherits the host default level. A level the model lacks falls back automatically.',
|
|
885
|
-
'settings.goalVerificationEffortInherit': 'Inherit host ({effort})',
|
|
886
|
-
'settings.goalVerificationEffortInheritUnknown': 'Inherit host (model default level)',
|
|
887
|
-
'settings.goalVerificationResolved': 'Resolved acceptance configuration',
|
|
888
|
-
'settings.goalVerificationResolvedModel': 'Judge model: {model}',
|
|
889
|
-
'settings.goalVerificationResolvedEffort': 'Reasoning effort: {effort}',
|
|
890
|
-
'settings.goalVerificationResolvedNoEffort': 'Reasoning effort: not sent explicitly (the model default)',
|
|
891
|
-
'settings.goalVerificationResolvedSource': 'Source: {source}',
|
|
892
|
-
'settings.goalVerificationSourceInherit': 'inherited from the host',
|
|
893
|
-
'settings.goalVerificationSourceExplicit': 'explicit configuration',
|
|
894
|
-
'settings.goalVerificationResolvedPreset': 'Rubric: coding (Specification Adherence / Output Match / Error Signal Detection), threshold {threshold}',
|
|
895
|
-
'settings.goalVerificationRouteMissing': 'The host serves no model catalog, so no judge route resolves: with acceptance on, a goal completion claim is refused and recorded as an acceptance anomaly.',
|
|
896
|
-
'settings.goalVerificationEffortFallback': 'The selected reasoning effort {requested} is not supported by the target model; it falls back to {resolved}.',
|
|
897
|
-
'settings.goalVerificationEffortFallbackNone': 'The selected reasoning effort {requested} is not supported by the target model; it falls back to that model default level (not sent explicitly).',
|
|
898
746
|
'settings.cardDefaultsTitle': 'New-card defaults',
|
|
899
747
|
'settings.cardDefaultsCardHint': 'What the new-task dialog opens with: agent preset, permission, model and reasoning effort. Blank sets nothing, so creating a card behaves exactly as it does unconfigured. They are only prefills and change no existing meaning, and every new card stays editable; the default reasoning effort applies only while a card ends up on the configured default model.',
|
|
900
748
|
'settings.cardDefaultsCardBrief': 'What a new card opens with: preset, permission, model and effort.',
|
|
@@ -904,72 +752,6 @@ export const en: Record<keyof typeof zh, string> = {
|
|
|
904
752
|
'settings.cardDefaultPermissionHintBrief': 'Blank sets nothing. A default above the session baseline still needs a human confirmation.',
|
|
905
753
|
'settings.cardDefaultModelHint': 'Blank is the host default (agent-default-model). An explicit choice in the dialog wins over the value carried over from the source card or parent, which wins over this default; a caller that pins a model of its own borrows no default reasoning level.',
|
|
906
754
|
'settings.cardDefaultModelHintBrief': 'Blank is the host default model, and an explicit dialog choice always wins over it.',
|
|
907
|
-
'settings.goalVerificationModelInvalid': 'The configured judge model is not a provider/model route; the host default is used instead.',
|
|
908
|
-
'running.executing': 'Executing',
|
|
909
|
-
'running.verifying': 'Verifying',
|
|
910
|
-
'running.repairing': 'Fixing a failed acceptance',
|
|
911
|
-
'running.verificationPassed': 'Acceptance passed',
|
|
912
|
-
'running.verificationFailed': 'Acceptance failed',
|
|
913
|
-
'running.verificationInvalid': 'Invalid acceptance, waiting for a human',
|
|
914
|
-
'verify.title': 'Acceptance report',
|
|
915
|
-
'verify.status.passed': 'Passed',
|
|
916
|
-
'verify.status.failed': 'Failed',
|
|
917
|
-
'verify.status.exception': 'Anomaly',
|
|
918
|
-
'verify.status.verifying': 'Verifying',
|
|
919
|
-
'verify.status.pending': 'Not yet verified',
|
|
920
|
-
'verify.status.off': 'Acceptance was off for this execution',
|
|
921
|
-
'verify.status.invalid': 'Invalid acceptance',
|
|
922
|
-
'verify.status.invalidHeld': 'Invalid acceptance, waiting for a human',
|
|
923
|
-
'verify.attemptInvalid': 'Invalid acceptance {index}',
|
|
924
|
-
'verify.invalidReason.missing-finding': 'A failing criterion carries no structured finding of its own',
|
|
925
|
-
'verify.invalidReason.unlocatable-quote': 'A finding cites a passage that is not in the evidence the judge saw',
|
|
926
|
-
'verify.invalidReason.baseline-finding': 'A finding points at the empty-work baseline instead of this execution\'s work',
|
|
927
|
-
'verify.invalidReason.vacuous-finding': 'A finding is empty or a generic evaluation with no observation or difference',
|
|
928
|
-
'verify.invalidReason.insufficient-evidence': 'The judge saw too little evidence (for example a truncated trace) to support a veto',
|
|
929
|
-
'verify.invalidReason.unknown': 'No usable quality verdict was produced',
|
|
930
|
-
'verify.invalidCounts': 'Valid quality verdicts {quality}/{max} · invalid acceptances {invalid}/{maxInvalid} · anomalies {exceptions}/{max}',
|
|
931
|
-
'verify.invalidDetail': 'Invalid because: {reason}',
|
|
932
|
-
'verify.criterionFindings': 'Structured findings (criterion · cited location · verbatim citation)',
|
|
933
|
-
'verify.criterionFinding': '{criterion} · {location}: "{quote}"',
|
|
934
|
-
'verify.criterionFindingFull': '{criterion} · {location}: "{quote}" requirement: {requirement} observed: {observation} gap: {gap}',
|
|
935
|
-
'verify.location.task': 'task statement',
|
|
936
|
-
'verify.location.trajectory': 'execution trajectory',
|
|
937
|
-
'verify.location.workspace': 'host-recorded changes',
|
|
938
|
-
'verify.location.baseline': 'empty-work baseline (not evidence against the work)',
|
|
939
|
-
'verify.location.unknown': 'location not named',
|
|
940
|
-
'verify.detailRemoved': 'This attempt detail was cleaned up automatically after the execution passed and settled (the judge did report evidence).',
|
|
941
|
-
'verify.cleanup.cleaned': 'The acceptance-only detail of this execution was cleaned up automatically after it passed and settled; what remains is the lightweight audit credential.',
|
|
942
|
-
'verify.cleanup.pending': 'The acceptance-only detail is pending cleanup (started once the execution passes and settles).',
|
|
943
|
-
'verify.cleanup.failed': 'Cleaning the acceptance detail failed after {attempts} attempts: {error}. The pass record is still valid and the host retries on its next start.',
|
|
944
|
-
'verify.cleanup.audit': 'Kept credential: attempt {index} · {stage} · score {score} · evidence hash {hash}',
|
|
945
|
-
'verify.cleanup.stage.quality': 'quality verdict',
|
|
946
|
-
'verify.cleanup.stage.invalid': 'invalid acceptance',
|
|
947
|
-
'verify.cleanup.stage.exception': 'acceptance anomaly',
|
|
948
|
-
'verify.cleanup.stage.budget': 'time budget exhausted',
|
|
949
|
-
'verify.summary': 'Total {score} (threshold {threshold}) · empty-work baseline {baseline}',
|
|
950
|
-
'verify.criteria': 'Per-criterion scores',
|
|
951
|
-
'verify.criterion': '{name}: {score} (threshold {threshold})',
|
|
952
|
-
'verify.rounds': '{rounds} rounds per criterion, A/B slots swapped, averaged',
|
|
953
|
-
'verify.judge': 'Judge {model} (reasoning effort {effort})',
|
|
954
|
-
'verify.judgeNoEffort': 'Judge {model} (reasoning effort: not sent explicitly)',
|
|
955
|
-
'verify.judgeInherited': 'Judge {model} (inherited from the host)',
|
|
956
|
-
'verify.attempt': 'Acceptance {index}',
|
|
957
|
-
'verify.attemptException': 'Acceptance anomaly {index}',
|
|
958
|
-
'verify.counts': 'Quality verdicts {quality}/{max} · anomalies {exceptions}/{max}',
|
|
959
|
-
'verify.findings': 'Findings',
|
|
960
|
-
'verify.noFindings': 'The judge reported no locatable finding',
|
|
961
|
-
'verify.evidence': 'Evidence: {chars} characters · {entries} trace entries · {omitted} characters truncated',
|
|
962
|
-
'verify.workspaceEvidence': '{files} changed file(s) observed by the host',
|
|
963
|
-
'verify.usage': 'Usage: {calls} requests · {input} input · {output} output · {reasoning} reasoning tokens',
|
|
964
|
-
'verify.usageIncomplete': ' (at least one request usage is unknown; these counts are a floor)',
|
|
965
|
-
'verify.finalFailure': 'Verdict basis: {reason}',
|
|
966
|
-
'verify.applicability.disabled': 'Acceptance was off when this execution started; it settles on the historical verdict.',
|
|
967
|
-
'verify.applicability.goalUnavailable': 'This execution never became a goal run (the card did not check Start with /goal, or /goal was refused or unavailable), so acceptance was not enforced.',
|
|
968
|
-
'verify.applicability.skipped': 'This card checked Skip acceptance, so the execution was never judged.',
|
|
969
|
-
'verify.applicability.teamMember': 'Team member: the Lead team-summary evidence is accepted as one execution.',
|
|
970
|
-
'verify.applicability.goalDisabled': 'The global native /goal switch was off when this execution started, so it ran one plain turn: no goal acceptance was performed, which neither counts as a pass nor fails the run.',
|
|
971
|
-
'verify.effortFallback': 'Reasoning effort fallback: {requested} → {resolved}',
|
|
972
|
-
'verify.thresholdValue': '{value}%',
|
|
973
755
|
// Subtasks (parent/child links, dispatched by the parent card at run time, link/detach).
|
|
974
756
|
'detail.parent': 'Parent task',
|
|
975
757
|
'detail.parent.open': 'Open parent task',
|
package/src/core/controller.ts
CHANGED
|
@@ -160,7 +160,7 @@ export interface ExecutionOptionsSnapshot {
|
|
|
160
160
|
* (revision/scheduler/power); a full snapshot also carries the deployment
|
|
161
161
|
* constants the UI reads (session default permission, subtask depth).
|
|
162
162
|
*/
|
|
163
|
-
export type HostMirror = Pick<TaskBoardSnapshot, 'revision' | 'scheduler' | 'power' | 'sessionDefaultPermission' | 'maxSubtaskDepth' | '
|
|
163
|
+
export type HostMirror = Pick<TaskBoardSnapshot, 'revision' | 'scheduler' | 'power' | 'sessionDefaultPermission' | 'maxSubtaskDepth' | 'cardDefaults' | 'extensions' | 'attachmentLimits'>
|
|
164
164
|
|
|
165
165
|
/** Immutable controller snapshot for UI subscriptions. */
|
|
166
166
|
export interface ControllerSnapshot {
|
|
@@ -884,7 +884,6 @@ export class BoardController {
|
|
|
884
884
|
private mirrorOf(snapshot: TaskBoardSnapshot): HostMirror {
|
|
885
885
|
const sessionDefaultPermission = snapshot.sessionDefaultPermission ?? this.hostState?.sessionDefaultPermission
|
|
886
886
|
const maxSubtaskDepth = snapshot.maxSubtaskDepth ?? this.hostState?.maxSubtaskDepth
|
|
887
|
-
const goalRunEnabled = snapshot.goalRunEnabled ?? this.hostState?.goalRunEnabled
|
|
888
887
|
// The new-card defaults are NOT carried over: the Host publishes a target
|
|
889
888
|
// nothing configures by omitting it (protocol.ts states that explicitly), so
|
|
890
889
|
// an absent key means "this deployment configures none". Carrying the last
|
|
@@ -901,7 +900,6 @@ export class BoardController {
|
|
|
901
900
|
power: snapshot.power,
|
|
902
901
|
...(sessionDefaultPermission === undefined ? {} : { sessionDefaultPermission }),
|
|
903
902
|
...(maxSubtaskDepth === undefined ? {} : { maxSubtaskDepth }),
|
|
904
|
-
...(goalRunEnabled === undefined ? {} : { goalRunEnabled }),
|
|
905
903
|
...(cardDefaults === undefined ? {} : { cardDefaults }),
|
|
906
904
|
...(extensions === undefined ? {} : { extensions }),
|
|
907
905
|
...(attachmentLimits === undefined ? {} : { attachmentLimits }),
|
package/src/core/extension.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* @module dsh-task-board/core/extension
|
|
13
13
|
*/
|
|
14
14
|
import type { ToolDefinition } from '@deepseek-ai/dsh-tools'
|
|
15
|
-
import type { TaskBoardAction,
|
|
15
|
+
import type { TaskBoardAction, TaskBoardModelCatalog, TaskBoardSnapshot } from '../protocol.ts'
|
|
16
16
|
import type { ExecutionOutcome, TaskRecord, TaskStatus } from './tasks.ts'
|
|
17
17
|
|
|
18
18
|
/** Cordis service name the host and browser halves each publish. */
|
|
@@ -453,11 +453,10 @@ export interface TaskBoardHostFace {
|
|
|
453
453
|
*/
|
|
454
454
|
subscribe(listener: () => void): () => void
|
|
455
455
|
/**
|
|
456
|
-
* The
|
|
457
|
-
*
|
|
458
|
-
* `/verification` route serves.
|
|
456
|
+
* The host model catalog the board's model and reasoning-level choices come
|
|
457
|
+
* from. The same document the board's own `/model-catalog` route serves.
|
|
459
458
|
*/
|
|
460
|
-
|
|
459
|
+
modelCatalogOptions(): Promise<TaskBoardModelCatalog>
|
|
461
460
|
}
|
|
462
461
|
|
|
463
462
|
declare module '@deepseek-ai/cordis' {
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host model catalog: the routes this deployment serves, the reasoning metadata
|
|
3
|
+
* their adapters expose, and the normalization the board reads them through.
|
|
4
|
+
*
|
|
5
|
+
* The board publishes the catalog (the settings card's model and level pickers
|
|
6
|
+
* read it) and resolves a card's pinned reasoning effort against it, so "this
|
|
7
|
+
* model declares that level" is answered from the host's own configuration
|
|
8
|
+
* instead of a guess. Framework-free (no cordis, no SDK imports) because both
|
|
9
|
+
* halves compile it.
|
|
10
|
+
*
|
|
11
|
+
* @module dsh-task-board/core/model-catalog
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/** One resolved `provider/model` route. */
|
|
15
|
+
export interface ModelRoute {
|
|
16
|
+
provider: string
|
|
17
|
+
model: string
|
|
18
|
+
/** Reasoning level the route is configured or resolved at; absent means inherit. */
|
|
19
|
+
reasoningEffort?: string
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** One reasoning-effort option an adapter exposes for an exact model route. */
|
|
23
|
+
export interface CatalogReasoningEffort {
|
|
24
|
+
id: string
|
|
25
|
+
name?: string
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** One adapter-discovered model of the host catalog. */
|
|
29
|
+
export interface CatalogModel {
|
|
30
|
+
id: string
|
|
31
|
+
name?: string
|
|
32
|
+
reasoning?: { efforts: CatalogReasoningEffort[]; defaultEffort?: string }
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** One provider route and its models. */
|
|
36
|
+
export interface CatalogGroup {
|
|
37
|
+
id: string
|
|
38
|
+
name?: string
|
|
39
|
+
models: CatalogModel[]
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** The host model catalog the board resolves routes and reasoning levels against. */
|
|
43
|
+
export interface ModelCatalogView {
|
|
44
|
+
/** The route an unconfigured session starts at: the host's own configuration. */
|
|
45
|
+
default?: ModelRoute
|
|
46
|
+
groups: CatalogGroup[]
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** Split a qualified `provider/model` route; undefined when it is not one. */
|
|
50
|
+
export function parseModelRoute(qualified: string | undefined): { provider: string; model: string } | undefined {
|
|
51
|
+
const raw = qualified?.trim() ?? ''
|
|
52
|
+
if (raw === '') return undefined
|
|
53
|
+
const slash = raw.indexOf('/')
|
|
54
|
+
if (slash <= 0 || slash === raw.length - 1) return undefined
|
|
55
|
+
const provider = raw.slice(0, slash).trim()
|
|
56
|
+
const model = raw.slice(slash + 1).trim()
|
|
57
|
+
if (provider === '' || model === '') return undefined
|
|
58
|
+
return { provider, model: model }
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Normalize the raw `session/modelCatalog` reply into the shape the board
|
|
63
|
+
* reads. Everything is optional in the wire value, so every level is checked:
|
|
64
|
+
* an unreadable catalog degrades to "unknown", never to a crash.
|
|
65
|
+
* @param value - the raw gateway reply.
|
|
66
|
+
* @returns the normalized catalog, or undefined when nothing usable arrived.
|
|
67
|
+
*/
|
|
68
|
+
export function normalizeCatalog(value: unknown): ModelCatalogView | undefined {
|
|
69
|
+
if (typeof value !== 'object' || value === null) return undefined
|
|
70
|
+
const row = value as Record<string, unknown>
|
|
71
|
+
let fallback: ModelRoute | undefined
|
|
72
|
+
const rawDefault = row.default
|
|
73
|
+
if (typeof rawDefault === 'object' && rawDefault !== null) {
|
|
74
|
+
const route = rawDefault as Record<string, unknown>
|
|
75
|
+
if (typeof route.provider === 'string' && route.provider !== '' && typeof route.model === 'string' && route.model !== '') {
|
|
76
|
+
fallback = {
|
|
77
|
+
provider: route.provider,
|
|
78
|
+
model: route.model,
|
|
79
|
+
...(typeof route.reasoningEffort === 'string' && route.reasoningEffort !== '' ? { reasoningEffort: route.reasoningEffort } : {}),
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
const groups: CatalogGroup[] = []
|
|
84
|
+
for (const entry of Array.isArray(row.groups) ? row.groups : []) {
|
|
85
|
+
if (typeof entry !== 'object' || entry === null) continue
|
|
86
|
+
const group = entry as Record<string, unknown>
|
|
87
|
+
if (typeof group.id !== 'string' || group.id === '') continue
|
|
88
|
+
const models: CatalogModel[] = []
|
|
89
|
+
for (const item of Array.isArray(group.models) ? group.models : []) {
|
|
90
|
+
if (typeof item !== 'object' || item === null) continue
|
|
91
|
+
const model = item as Record<string, unknown>
|
|
92
|
+
if (typeof model.id !== 'string' || model.id === '') continue
|
|
93
|
+
const reasoning = typeof model.reasoning === 'object' && model.reasoning !== null
|
|
94
|
+
? model.reasoning as Record<string, unknown>
|
|
95
|
+
: undefined
|
|
96
|
+
const efforts: CatalogReasoningEffort[] = []
|
|
97
|
+
for (const effort of Array.isArray(reasoning?.efforts) ? reasoning.efforts as unknown[] : []) {
|
|
98
|
+
if (typeof effort !== 'object' || effort === null) continue
|
|
99
|
+
const option = effort as Record<string, unknown>
|
|
100
|
+
if (typeof option.id !== 'string' || option.id === '') continue
|
|
101
|
+
efforts.push({ id: option.id, ...(typeof option.name === 'string' ? { name: option.name } : {}) })
|
|
102
|
+
}
|
|
103
|
+
const defaultEffort = typeof reasoning?.defaultEffort === 'string' && reasoning.defaultEffort !== '' ? reasoning.defaultEffort : undefined
|
|
104
|
+
models.push({
|
|
105
|
+
id: model.id,
|
|
106
|
+
...(typeof model.name === 'string' ? { name: model.name } : {}),
|
|
107
|
+
...(reasoning === undefined ? {} : { reasoning: { efforts, ...(defaultEffort === undefined ? {} : { defaultEffort }) } }),
|
|
108
|
+
})
|
|
109
|
+
}
|
|
110
|
+
groups.push({ id: group.id, ...(typeof group.name === 'string' ? { name: group.name } : {}), models })
|
|
111
|
+
}
|
|
112
|
+
if (fallback === undefined && groups.length === 0) return undefined
|
|
113
|
+
return { ...(fallback === undefined ? {} : { default: fallback }), groups }
|
|
114
|
+
}
|