dsh-taskbridge 1.3.2 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +17 -13
- package/bin/dsh-delegate-mcp.js +4 -0
- package/codex/dsh-taskbridge.toml +116 -24
- package/docs/INTRODUCTION.md +3 -1
- package/docs/INTRODUCTION.zh.md +4 -2
- package/docs/codex-integration.md +51 -20
- package/docs/plugin-market.md +1 -1
- package/docs/releases/1.4.0-token-benchmark.zh.md +40 -0
- package/docs/releases/1.4.0.zh.md +54 -0
- package/docs/runtime-compatibility.md +11 -9
- package/docs/silent-wait.md +73 -10
- package/docs/taskbridge-upgrade.md +1 -1
- package/lib/client.js +149 -47
- package/package.json +143 -140
- package/src/client/api.js +205 -46
- package/src/client/index.jsx +82 -27
- package/src/codex/installer.js +31 -6
- package/src/config/defaults.js +12 -0
- package/src/config/settings.js +12 -10
- package/src/config/validate.js +26 -11
- package/src/http/execution-plane.js +58 -4
- package/src/http/respond.js +179 -175
- package/src/index.d.ts +102 -2
- package/src/index.js +1 -1
- package/src/jobs/activity.js +1369 -1008
- package/src/jobs/diagnostics.js +15 -0
- package/src/jobs/engine.js +295 -10
- package/src/jobs/history.js +28 -0
- package/src/mcp/server.js +140 -14
- package/src/mcp/wait.js +49 -10
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Runtime compatibility
|
|
2
2
|
|
|
3
|
-
This document states which DSH runtimes this plugin build (`1.
|
|
4
|
-
`dsh-taskbridge-1.
|
|
3
|
+
This document states which DSH runtimes this plugin build (`1.4.0`, package
|
|
4
|
+
`dsh-taskbridge-1.4.0.tgz`) may be loaded into, what changed in the newest one, and what
|
|
5
5
|
has and has not been verified on it. It is a compatibility note, not an acceptance
|
|
6
6
|
report; the package is distributed through npm and the GitHub Release. See the
|
|
7
|
-
[1.
|
|
7
|
+
[1.4.0 release notes](releases/1.4.0.zh.md) for upgrade details and the
|
|
8
8
|
[1.3.1 release report](releases/1.3.1.zh.md) for historical distribution verification.
|
|
9
9
|
|
|
10
10
|
`1.1.0` added silent waiting: the global `monitoring` thresholds (self-check and attention
|
|
@@ -24,10 +24,12 @@ build.
|
|
|
24
24
|
|
|
25
25
|
**Historical 1.2.0 acceptance boundary, not a live installation inventory:** during
|
|
26
26
|
that release's checks, the operator's Desktop profile was on `1.1.0` and `1.2.0` had
|
|
27
|
-
not been installed into it. The
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
not been installed into it. The 1.4.0 checks use isolated package installations and
|
|
28
|
+
temporary Codex homes; they do not establish that the operator's production Desktop
|
|
29
|
+
profile has been upgraded. The waiting-channel token comparison is measured separately
|
|
30
|
+
and does not represent whole-task or billing savings. See the 1.4.0 Release notes and
|
|
31
|
+
the [measurement report](releases/1.4.0-token-benchmark.zh.md) for their exact boundaries.
|
|
32
|
+
An older production profile must
|
|
31
33
|
be upgraded to this build, and the
|
|
32
34
|
Codex companion refreshed from the settings page (or by the startup check, which now also
|
|
33
35
|
upgrades the installed MCP entry) and Codex reloaded before the new wait rules and the
|
|
@@ -197,10 +199,10 @@ What remains genuinely unverified:
|
|
|
197
199
|
|
|
198
200
|
## 5. Upgrading from an older plugin build
|
|
199
201
|
|
|
200
|
-
1. Download `dsh-taskbridge-1.
|
|
202
|
+
1. Download `dsh-taskbridge-1.4.0.tgz` from the GitHub Release, or build the package locally (`npm pack`).
|
|
201
203
|
2. Install it the way your surface requires: the Desktop **Plugins manager** for a
|
|
202
204
|
Desktop profile (npm/CLI operations on that profile are refused), or
|
|
203
|
-
`dsh plugin --profile <name> add ./dsh-taskbridge-1.
|
|
205
|
+
`dsh plugin --profile <name> add ./dsh-taskbridge-1.4.0.tgz` for a CLI profile you
|
|
204
206
|
start yourself.
|
|
205
207
|
3. The settings, the switch value and the task history are preserved
|
|
206
208
|
(`$DSH_HOME/data/dsh-delegate`); nothing is migrated destructively.
|
package/docs/silent-wait.md
CHANGED
|
@@ -17,12 +17,15 @@
|
|
|
17
17
|
| --- | --- | --- | --- |
|
|
18
18
|
| `monitoring.selfCheckSeconds` | 300 秒(5 分钟) | 30–3600 秒,整数 | 任务完全安静这么久之后,插件在本机做**一次**只读自检 |
|
|
19
19
|
| `monitoring.attentionSeconds` | 600 秒(10 分钟) | 31–7200 秒,整数,且必须大于自检间隔 | 仍然安静这么久之后,才把这件事报告给派工方 |
|
|
20
|
+
| `monitoring.repeatFailureThreshold` | 3 次 | 0–20,整数;`0` 表示关闭 | 同一工具、同一操作、同一失败**连续**这么多次时提醒**一次**(与上面两个间隔独立,见 4.3) |
|
|
20
21
|
|
|
21
22
|
保存在设置文档里的单位是**整秒**。设置页用"分钟"呈现,二者是同一个值
|
|
22
23
|
(5 分钟 = 300 秒)。一个不是整分钟的值(例如 90 秒)在页面上显示为 1.5 分钟,
|
|
23
|
-
|
|
24
|
+
不会被悄悄圆成别的设置。重复失败提醒是一个**次数**,不是时长。
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
这三个值都只能全局设置:项目覆盖和单任务覆盖都**不能**改动它们,且每个任务在提交时冻结
|
|
27
|
+
自己那份有效值——运行中修改只影响之后新提交的任务。没有这个字段的旧设置文档照常加载,
|
|
28
|
+
按默认 3 次处理。
|
|
26
29
|
|
|
27
30
|
## 2. 核心规则:安静 ≠ 失败
|
|
28
31
|
|
|
@@ -57,24 +60,75 @@
|
|
|
57
60
|
|
|
58
61
|
## 4. 一次等待只返回一个结论
|
|
59
62
|
|
|
60
|
-
派工方通过 `delegate_wait
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
**只收到 1
|
|
63
|
+
派工方通过 `delegate_wait({ taskId })` 等待同一个任务——**不传 `waitSeconds`**。一次调用的默认截止是
|
|
64
|
+
**3600 秒(60 分钟)**,内部由若干次**各自不超过 25 秒**的有界观察组成(执行面自己的上限也是 25 秒);
|
|
65
|
+
正常的任务在内部大约每 25 秒完成一次观察,安静的 20 分钟就是 48 次观察、47 次心跳,而派工方
|
|
66
|
+
**只收到 1 个答案**。
|
|
67
|
+
|
|
68
|
+
这个 25 秒的内部节奏**属于程序自身**,不是派工方模型的轮询频率:它不要求、也不暗示派工方每个
|
|
69
|
+
周期做任何事。正常等待期间派工方应当保持安静——不读中间代码或 diff、不做并行实现或调研、
|
|
70
|
+
不复述没有变化的快照;审查集中在交付时做(见第 6 节)。
|
|
71
|
+
|
|
72
|
+
答案里是一个原因:
|
|
64
73
|
|
|
65
74
|
| 原因 | 含义 | 派工方该做什么 |
|
|
66
75
|
| --- | --- | --- |
|
|
67
76
|
| `heartbeat` | 没什么要报告的(内部心跳) | 正常情况下看不到;看到了就继续等待同一任务 |
|
|
68
|
-
| `attention` |
|
|
77
|
+
| `attention` | 任务**整整**超过提醒间隔没有任何进展(默认 10 分钟);**不是**"等待结束"。也可能代表**重复失败**(见 4.3) | 读诊断,**默认继续等待**;不要在只是安静时取消或判失败 |
|
|
69
78
|
| `permission` | 有一次工具调用在等授权决定 | 审查这一次调用的完整操作,然后决定一次,再继续等待同一任务 |
|
|
70
79
|
| `ready` | 执行结束,等待宿主审查 | 读**一次**完整证据,自己审查;这不等于已接受 |
|
|
71
80
|
| `failed` / `cancelled` | 运行没有产出 | 读一次记录的原因后报告 |
|
|
72
81
|
| `interrupted` | **任务记录本身**已中断(例如进程重启留下),不会继续 | 读一次记录后报告;不要继续盲等同一任务 |
|
|
73
|
-
| `wait-limit` |
|
|
82
|
+
| `wait-limit` | 本轮等待预算用完,任务没有任何变化 | `actionable: false`、`terminal: false`:不需要任何业务判断,立刻用同一 `taskId` 再等(不传 `waitSeconds`) |
|
|
83
|
+
|
|
84
|
+
**`actionable` 的含义**:只有真正需要派工方处理的原因(`attention`、`permission`、`ready`、
|
|
85
|
+
`failed`、`cancelled`、`interrupted`)才是 `actionable: true`。`wait-limit` 是 `actionable: false`:
|
|
86
|
+
它只说明**这次调用**自己的预算用完了,不是任务事实,也不需要决定。这个标志描述的是答案本身,
|
|
87
|
+
**不承诺**派工方宿主不会因此唤醒它自己的模型——是否被唤醒由宿主管。
|
|
74
88
|
|
|
75
89
|
`attention` 提醒有冷却:同一次静默里,第一次到达提醒间隔时报告一次;之后要再经过一个
|
|
76
90
|
提醒间隔才会再报一次。真实推进会让计时重新开始。
|
|
77
91
|
|
|
92
|
+
### 4.0 外层续等:宿主提前交回调用时
|
|
93
|
+
|
|
94
|
+
插件拥有的是 **MCP 等待**;它**不拥有**派工方宿主的调度(例如 Codex 的 exec/tool 时限)。
|
|
95
|
+
插件默认等 3600 秒、托管条目的 `tool_timeout_sec` 是 3660 秒,这两件事都已存在,但宿主仍可能
|
|
96
|
+
用**自己的**限制提前把调用交回。这是**外层**事件,合同如下:
|
|
97
|
+
|
|
98
|
+
- 外层交回**不等于** MCP 等待结束,也不是 `wait-limit`:那两个只有答案自己的 `reason` 字段能报告。
|
|
99
|
+
- 它不说明任务停止,也不说明任务完成——执行可能完全照旧在进行。
|
|
100
|
+
- 已有 exec cell 还在跑,就**续接同一个 cell**;不要重开一次 `delegate_wait`、不要读
|
|
101
|
+
`delegate_result`、不要轮询 `delegate_status`、也不要提交重复任务。已经拿到的 `taskId` 就是
|
|
102
|
+
需要的全部状态。
|
|
103
|
+
- 选择**客户端实际支持的最长 yield**。客户端提供 yield/pragmas 参数时,正常等待应该请求**约
|
|
104
|
+
1200000 毫秒(20 分钟)**这个量级,而不是一分钟;按习惯 1 秒/几秒续等不是等待,而是换了外壳的
|
|
105
|
+
轮询。
|
|
106
|
+
- **一分钟不是固有限制**,那只是调用者的选择;不要把它写成客户端的上限,也不要声称每个客户端都
|
|
107
|
+
支持同样的长 yield——只说明这个客户端实际接受什么。
|
|
108
|
+
- 把控制权交回给操作者是 **UI 决定**,不是"委托观察已停止"的声明。插件自己的观察循环继续,
|
|
109
|
+
worker 继续运行。
|
|
110
|
+
- **能力边界(必须诚实说明)**:插件不能在你的宿主里创建后台等待进程、定时器或回调来"自动唤醒"
|
|
111
|
+
你。若可用的 yield 确实很短、又没有自动续接,那么一次长等待确实要占用"每个 yield 窗口一次恢复
|
|
112
|
+
回合"。这种情况应当**如实告诉操作者一次**;不要虚构后台唤醒,不要声称插件会在后台通知你,也不要
|
|
113
|
+
去改操作者的 Codex 配置绕过它。
|
|
114
|
+
|
|
115
|
+
### 4.3 重复失败提醒(与静默计时独立)
|
|
116
|
+
|
|
117
|
+
除了两个静默间隔,插件还会盯着**同一个工具、同一个操作、同一种失败连续出现的次数**。两者互相
|
|
118
|
+
独立:一个忙碌的任务可以一直在失败,永远碰不到 5/10 分钟阈值,而这正是这个提醒存在的场景。
|
|
119
|
+
|
|
120
|
+
- 默认连续 **3** 次时提醒**一次**;设置项 `monitoring.repeatFailureThreshold`,`0` 表示关闭。
|
|
121
|
+
- 只认**原生结构化失败标记**:`tool/result.message.isError === true`(`ToolResultMessage` 契约)。
|
|
122
|
+
输出里出现 "error" 字样、任务安静、只有思考、测试跑得久、或者没有改文件,都**不是**失败。
|
|
123
|
+
- 同一个 `callId` 的重复结果只算一次;工具、操作或失败码**不同**,或者中间出现一次成功,
|
|
124
|
+
都会结束/切换当前 episode。已经提醒过的 episode 不再重复提醒;之后新的 episode 可以再提醒。
|
|
125
|
+
- 它沿用 `attention` 这个 reason,并额外携带 **`failure`** 块:
|
|
126
|
+
`{ kind: "repeated-tool-failure", toolName, failureCode, consecutive, threshold, ... }`。
|
|
127
|
+
这是**有类型**的紧凑诊断,不是文本猜测。
|
|
128
|
+
- 它只提醒,**不自动**取消任务、更换模型或改变超时。授权请求和终态**优先**于它。
|
|
129
|
+
- 只保留散列与计数:操作的 sha256 前缀、失败码、次数、时间;不保留也不发送原始参数、思考、
|
|
130
|
+
输出或密钥。终态后释放,只留一段有界证据。
|
|
131
|
+
|
|
78
132
|
### 4.1 等待被中断 ≠ 执行被中断
|
|
79
133
|
|
|
80
134
|
引擎会在**观察者自己的这次请求结束**时报告 `interrupted`(调用方取消、连接断开、引擎在
|
|
@@ -143,6 +197,11 @@ node bin/dsh-delegate-control.js cancel <taskId> # 只停止这一个任务
|
|
|
143
197
|
`hostAcceptance` 由宿主自己记录。
|
|
144
198
|
- 大改动只挑相关的文件各看一次,不要反复重读同一份证据。
|
|
145
199
|
|
|
200
|
+
1.4.0 增加 `delegate_review({ taskId, decision, note })`。派工方实际审查后记录
|
|
201
|
+
`accepted`(审查通过)或 `changes-requested`(需要修正),并填写简短事实或修改意见。
|
|
202
|
+
必须确认写回成功,才向用户说已记录。该动作不放行工具、不合并代码,不改变执行状态或路由;
|
|
203
|
+
任务页依据单独的审查记录显示结论。旧记录不自动通过,修正通过原任务续接产生新一轮交付。
|
|
204
|
+
|
|
146
205
|
## 7. 续接(跟进任务)
|
|
147
206
|
|
|
148
207
|
同一个任务的修改、纠正或重试,用 `continueFromTaskId` 提交,并继续使用**同一个**
|
|
@@ -183,8 +242,12 @@ node bin/dsh-delegate-control.js cancel <taskId> # 只停止这一个任务
|
|
|
183
242
|
- 一次 `delegate_wait` 的默认等待是 3600 秒(上限也是 3600 秒),每次内部观察最多 25 秒;
|
|
184
243
|
前者由工具本身约束,与 `tool_timeout_sec` 的关系是:后者必须比前者略大,才能让一整轮
|
|
185
244
|
等待跑完。
|
|
186
|
-
-
|
|
187
|
-
|
|
245
|
+
- **客户端自己的工具超时不能证明任何事**:调用方宿主(例如 Codex 自己的工具时限)提前结束一次
|
|
246
|
+
等待时,既不能说明执行已停止,也不能说明它还活着。保留 `taskId`,需要时读一次紧凑事实
|
|
247
|
+
(`delegate_result`),然后继续等待同一任务;不要因为一次客户端超时就重复提交、重启或取消任务。
|
|
248
|
+
等待被中断(`interrupted`)与客户端超时都不改变执行本身。
|
|
249
|
+
- 等待被中断不等于执行被中断;`interrupted` / `wait-limit` 的 `actionable`、`terminal` 与 `state`
|
|
250
|
+
字段是判断依据,不要只看原因名字。
|
|
188
251
|
- 串行宿主下没有通用的“并发”承诺:插件传输支持并发,独立控制程序只提供 `status` 与
|
|
189
252
|
`cancel` 两个动作,也不能改变宿主的调度方式。
|
|
190
253
|
- 设置页的自动刷新只在"任务记录"标签页可见、且存在进行中的任务时运行;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
1. 等待当前任务结束,关闭旧插件的本机调用开关。
|
|
8
8
|
2. 在 DSH 插件管理中停用并卸载本项目旧 `dsh-delegate` 或 `dsh-taskdispatch` 包。**保留 `<DSH_HOME>/data/dsh-delegate` 数据目录**;DSH 若提供删除数据选项,不要勾选。新旧包不能同时启用。
|
|
9
|
-
3. 在“添加插件”中输入 **`dsh-taskbridge@1.
|
|
9
|
+
3. 在“添加插件”中输入 **`dsh-taskbridge@1.4.0`**。中国大陆镜像未同步时改选 npm 官方源。也可安装本项目 Release 的 `dsh-taskbridge-1.4.0.tgz`,或添加本项目固定 Git 提交的自定义索引。不要手动修改 Desktop 保留的 profile。
|
|
10
10
|
4. 打开 **DSH TaskBridge** 配置页,核对 API、模型、思考强度和总开关。数据目录与旧版相同;安装前关闭旧开关,避免恢复之前保存的开启状态。
|
|
11
11
|
5. 在 Codex 集成中点击“安装 / 更新 TaskBridge 智能体”,更新智能体及 MCP,然后重新加载 Codex。未修改的旧 `dsh-delegate.toml` 会迁移为 `dsh-taskbridge.toml`;修改过的文件保留。只需修复 MCP 时可使用“仅修复 MCP 配置”。启动自检不会接管其他安装目录。
|
|
12
12
|
6. 若添加过旧索引,改用 `https://ranranyya.github.io/dsh-taskbridge/index.json`。
|
package/lib/client.js
CHANGED
|
@@ -345,7 +345,17 @@ window.__ModuleLoader__.load({
|
|
|
345
345
|
const whole = (value, fallback) => Number.isFinite(value) ? Math.trunc(value) : fallback;
|
|
346
346
|
return {
|
|
347
347
|
selfCheckSeconds: whole(block.selfCheckSeconds, MONITORING_DEFAULTS.selfCheckSeconds),
|
|
348
|
-
attentionSeconds: whole(block.attentionSeconds, MONITORING_DEFAULTS.attentionSeconds)
|
|
348
|
+
attentionSeconds: whole(block.attentionSeconds, MONITORING_DEFAULTS.attentionSeconds),
|
|
349
|
+
repeatFailureThreshold: whole(block.repeatFailureThreshold, MONITORING_DEFAULTS.repeatFailureThreshold)
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
function monitoringDraftOf(source) {
|
|
353
|
+
const block = source?.monitoring;
|
|
354
|
+
if (block === null || typeof block !== "object" || Array.isArray(block)) return { ...MONITORING_DEFAULTS };
|
|
355
|
+
return {
|
|
356
|
+
selfCheckSeconds: block.selfCheckSeconds,
|
|
357
|
+
attentionSeconds: block.attentionSeconds,
|
|
358
|
+
repeatFailureThreshold: block.repeatFailureThreshold === void 0 ? MONITORING_DEFAULTS.repeatFailureThreshold : block.repeatFailureThreshold
|
|
349
359
|
};
|
|
350
360
|
}
|
|
351
361
|
function secondsToMinutes(seconds) {
|
|
@@ -443,11 +453,15 @@ window.__ModuleLoader__.load({
|
|
|
443
453
|
selfCheckSecondsMin: 30,
|
|
444
454
|
selfCheckSecondsMax: 3600,
|
|
445
455
|
attentionSecondsMin: 31,
|
|
446
|
-
attentionSecondsMax: 7200
|
|
456
|
+
attentionSecondsMax: 7200,
|
|
457
|
+
// Repeated-failure reminder: a COUNT of consecutive identical failures, 0 = off.
|
|
458
|
+
repeatFailureThresholdMin: 0,
|
|
459
|
+
repeatFailureThresholdMax: 20
|
|
447
460
|
});
|
|
448
461
|
var MONITORING_DEFAULTS = Object.freeze({
|
|
449
462
|
selfCheckSeconds: 300,
|
|
450
|
-
attentionSeconds: 600
|
|
463
|
+
attentionSeconds: 600,
|
|
464
|
+
repeatFailureThreshold: 3
|
|
451
465
|
});
|
|
452
466
|
var SELF_CHECK_LABELS = Object.freeze({
|
|
453
467
|
"executor-alive-silent": "执行器健在,这段时间没有新输出",
|
|
@@ -457,6 +471,15 @@ window.__ModuleLoader__.load({
|
|
|
457
471
|
"waiting-for-permission": "正在等待本次调用授权决定",
|
|
458
472
|
settled: "任务已经结束"
|
|
459
473
|
});
|
|
474
|
+
function repeatFailureLine(activity) {
|
|
475
|
+
const block = activity?.repeatFailure;
|
|
476
|
+
if (block === null || block === void 0) return "未采集到";
|
|
477
|
+
const reported = Array.isArray(block.reported) ? block.reported : [];
|
|
478
|
+
if (reported.length === 0) {
|
|
479
|
+
return block.threshold === 0 ? "已关闭" : `尚未触发(连续 ${block.threshold} 次才提醒)`;
|
|
480
|
+
}
|
|
481
|
+
return reported.map((entry) => `${entry.toolName ?? "工具"} · ${entry.failureCode ?? "error"} 连续 ${entry.consecutive} 次`).join(";");
|
|
482
|
+
}
|
|
460
483
|
var WAIT_REASON_LABELS = Object.freeze({
|
|
461
484
|
heartbeat: "没有需要处理的事(内部心跳)",
|
|
462
485
|
attention: "长时间没有任何新进展,需要你判断",
|
|
@@ -726,21 +749,7 @@ window.__ModuleLoader__.load({
|
|
|
726
749
|
if (!Number.isInteger(parallelism) || parallelism < LIMITS.maxParallelismMin || parallelism > LIMITS.maxParallelismMax) {
|
|
727
750
|
problems.push(`最大并发需为 ${LIMITS.maxParallelismMin}–${LIMITS.maxParallelismMax} 之间的整数`);
|
|
728
751
|
}
|
|
729
|
-
|
|
730
|
-
for (const [field, label] of [
|
|
731
|
-
["selfCheckSeconds", "程序自检间隔"],
|
|
732
|
-
["attentionSeconds", "提醒你的间隔"]
|
|
733
|
-
]) {
|
|
734
|
-
const value = monitoring[field];
|
|
735
|
-
const min = field === "selfCheckSeconds" ? LIMITS.selfCheckSecondsMin : LIMITS.attentionSecondsMin;
|
|
736
|
-
const max = field === "selfCheckSeconds" ? LIMITS.selfCheckSecondsMax : LIMITS.attentionSecondsMax;
|
|
737
|
-
if (!Number.isInteger(value) || value < min || value > max) {
|
|
738
|
-
problems.push(`${label}需为 ${min}–${max} 秒之间的整数`);
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
if (Number.isInteger(monitoring.selfCheckSeconds) && Number.isInteger(monitoring.attentionSeconds) && monitoring.attentionSeconds <= monitoring.selfCheckSeconds) {
|
|
742
|
-
problems.push("提醒你的间隔必须大于程序自检间隔");
|
|
743
|
-
}
|
|
752
|
+
problems.push(...precheckMonitoring(monitoringDraftOf(draft)));
|
|
744
753
|
return problems;
|
|
745
754
|
}
|
|
746
755
|
function taskStateLabel(state) {
|
|
@@ -833,7 +842,8 @@ window.__ModuleLoader__.load({
|
|
|
833
842
|
}
|
|
834
843
|
function taskProgress(task) {
|
|
835
844
|
const activity = taskActivity(task);
|
|
836
|
-
const
|
|
845
|
+
const outcome = taskOutcome(task);
|
|
846
|
+
const phase = outcome.label;
|
|
837
847
|
if (activity === null) {
|
|
838
848
|
return {
|
|
839
849
|
available: false,
|
|
@@ -894,6 +904,7 @@ window.__ModuleLoader__.load({
|
|
|
894
904
|
const problems = [];
|
|
895
905
|
const self = monitoring?.selfCheckSeconds;
|
|
896
906
|
const attention = monitoring?.attentionSeconds;
|
|
907
|
+
const repeat = monitoring?.repeatFailureThreshold === void 0 ? MONITORING_DEFAULTS.repeatFailureThreshold : monitoring.repeatFailureThreshold;
|
|
897
908
|
if (!Number.isInteger(self) || self < LIMITS.selfCheckSecondsMin || self > LIMITS.selfCheckSecondsMax) {
|
|
898
909
|
problems.push(`程序自检间隔需为 ${LIMITS.selfCheckSecondsMin}–${LIMITS.selfCheckSecondsMax} 秒之间的整数`);
|
|
899
910
|
}
|
|
@@ -903,14 +914,61 @@ window.__ModuleLoader__.load({
|
|
|
903
914
|
if (Number.isInteger(self) && Number.isInteger(attention) && attention <= self) {
|
|
904
915
|
problems.push("提醒你的间隔必须大于程序自检间隔");
|
|
905
916
|
}
|
|
917
|
+
if (!Number.isInteger(repeat) || repeat < LIMITS.repeatFailureThresholdMin || repeat > LIMITS.repeatFailureThresholdMax) {
|
|
918
|
+
problems.push(`重复失败提醒次数需为 ${LIMITS.repeatFailureThresholdMin}–${LIMITS.repeatFailureThresholdMax} 之间的整数(0 表示关闭)`);
|
|
919
|
+
}
|
|
906
920
|
return problems;
|
|
907
921
|
}
|
|
908
922
|
function taskOutcome(task) {
|
|
909
923
|
const state = String(task?.state ?? "");
|
|
910
|
-
const
|
|
911
|
-
const
|
|
912
|
-
const
|
|
913
|
-
|
|
924
|
+
const acceptance = task?.hostAcceptance;
|
|
925
|
+
const accepted = acceptance !== null && acceptance !== void 0 && acceptance.accepted === true;
|
|
926
|
+
const decided = acceptance !== null && acceptance !== void 0;
|
|
927
|
+
const executed = state === "awaiting-host-review" || decided;
|
|
928
|
+
let label;
|
|
929
|
+
let tone;
|
|
930
|
+
let note;
|
|
931
|
+
let phaseLabel;
|
|
932
|
+
if (accepted) {
|
|
933
|
+
label = "审查通过";
|
|
934
|
+
tone = "on";
|
|
935
|
+
note = "宿主已记录验收结论:审查通过。";
|
|
936
|
+
phaseLabel = null;
|
|
937
|
+
} else if (decided) {
|
|
938
|
+
label = "需要修正";
|
|
939
|
+
tone = "warn";
|
|
940
|
+
note = "宿主已记录验收结论:需要修正(本任务的执行结果未被接受)。";
|
|
941
|
+
phaseLabel = null;
|
|
942
|
+
} else if (state === "awaiting-host-review") {
|
|
943
|
+
label = "等待宿主审查";
|
|
944
|
+
tone = "warn";
|
|
945
|
+
note = "执行已完成,等待宿主(Codex)审查;插件不会自行验收。";
|
|
946
|
+
phaseLabel = null;
|
|
947
|
+
} else if (state === "failed") {
|
|
948
|
+
label = taskStateLabel(state);
|
|
949
|
+
tone = "warn";
|
|
950
|
+
note = "执行失败;错误详情见下方证据。";
|
|
951
|
+
phaseLabel = null;
|
|
952
|
+
} else if (state === "cancelled") {
|
|
953
|
+
label = taskStateLabel(state);
|
|
954
|
+
tone = "off";
|
|
955
|
+
note = "任务已取消,未产生验收结论。";
|
|
956
|
+
phaseLabel = null;
|
|
957
|
+
} else {
|
|
958
|
+
label = taskStateLabel(state);
|
|
959
|
+
tone = state === "running" ? "on" : "off";
|
|
960
|
+
note = "任务尚未产生结果。";
|
|
961
|
+
phaseLabel = taskPhaseLabel(task?.phase);
|
|
962
|
+
}
|
|
963
|
+
return { label, tone, executed, accepted, decided, phaseLabel, note };
|
|
964
|
+
}
|
|
965
|
+
function hostReviewLine(task, formatTime2) {
|
|
966
|
+
const acceptance = task?.hostAcceptance;
|
|
967
|
+
if (acceptance === null || acceptance === void 0) return "未记录(插件不会自行验收)";
|
|
968
|
+
const label = acceptance.accepted === true ? "审查通过" : "需要修正";
|
|
969
|
+
const at = typeof acceptance.acceptedAt === "number" ? `(${formatTime2(acceptance.acceptedAt)})` : "";
|
|
970
|
+
const note = typeof acceptance.note === "string" && acceptance.note !== "" ? `:${boundedText(acceptance.note, 200)}` : "";
|
|
971
|
+
return `${label}${at}${note}`;
|
|
914
972
|
}
|
|
915
973
|
function changedFiles(task) {
|
|
916
974
|
const candidates = [task?.diff?.files, task?.diff?.changedFiles, task?.changedFiles];
|
|
@@ -1633,22 +1691,26 @@ window.__ModuleLoader__.load({
|
|
|
1633
1691
|
});
|
|
1634
1692
|
},
|
|
1635
1693
|
/**
|
|
1636
|
-
* Replace
|
|
1694
|
+
* Replace the silence thresholds and the repeated-failure count.
|
|
1637
1695
|
*
|
|
1638
1696
|
* The narrow route exists so an operator adjusting a timer cannot rewrite a
|
|
1639
1697
|
* provider list. On success the committed document is adopted for `settings` and
|
|
1640
1698
|
* the draft's monitoring block, and OTHER unsaved draft edits are left alone —
|
|
1641
1699
|
* a timer save must never discard a half-finished provider edit.
|
|
1642
|
-
*
|
|
1700
|
+
*
|
|
1701
|
+
* Order matters: the RAW block is validated first and only then normalized for the
|
|
1702
|
+
* wire. Validating the normalized block would accept a cleared field, because
|
|
1703
|
+
* `monitoringOf` replaces it with the documented default.
|
|
1704
|
+
* @param {{ selfCheckSeconds: number, attentionSeconds: number, repeatFailureThreshold: number }} monitoring - the block as the operator typed it.
|
|
1643
1705
|
* @returns {Promise<{ ok: boolean, error?: unknown }>} outcome.
|
|
1644
1706
|
*/
|
|
1645
1707
|
async saveMonitoring(monitoring) {
|
|
1646
|
-
const
|
|
1647
|
-
const problems = precheckMonitoring(normalized);
|
|
1708
|
+
const problems = precheckMonitoring(monitoring);
|
|
1648
1709
|
if (problems.length > 0) {
|
|
1649
1710
|
notify("error", `未保存:${problems.join(";")}`);
|
|
1650
1711
|
return { ok: false, problems };
|
|
1651
1712
|
}
|
|
1713
|
+
const normalized = monitoringOf({ monitoring });
|
|
1652
1714
|
return await track("monitoring", async () => {
|
|
1653
1715
|
try {
|
|
1654
1716
|
const body = await api.putMonitoring(normalized);
|
|
@@ -2550,14 +2612,22 @@ window.__ModuleLoader__.load({
|
|
|
2550
2612
|
}
|
|
2551
2613
|
function MonitoringCard({ store, snapshot }) {
|
|
2552
2614
|
const draft = snapshot.draft;
|
|
2553
|
-
const
|
|
2615
|
+
const raw = monitoringDraftOf(draft);
|
|
2554
2616
|
const saved = monitoringOf(snapshot.settings);
|
|
2555
2617
|
const [saving, setSaving] = (0, import_react.useState)(false);
|
|
2556
|
-
const problems = precheckMonitoring(
|
|
2557
|
-
const dirty =
|
|
2558
|
-
const edit = (field,
|
|
2618
|
+
const problems = precheckMonitoring(raw);
|
|
2619
|
+
const dirty = raw.selfCheckSeconds !== saved.selfCheckSeconds || raw.attentionSeconds !== saved.attentionSeconds || raw.repeatFailureThreshold !== saved.repeatFailureThreshold;
|
|
2620
|
+
const edit = (field, rawMinutes) => {
|
|
2559
2621
|
store.editDraft((current) => {
|
|
2560
|
-
current.monitoring = { ...
|
|
2622
|
+
current.monitoring = { ...monitoringDraftOf(current), [field]: minutesToSeconds(rawMinutes) };
|
|
2623
|
+
});
|
|
2624
|
+
};
|
|
2625
|
+
const editFailureCount = (value) => {
|
|
2626
|
+
store.editDraft((current) => {
|
|
2627
|
+
current.monitoring = {
|
|
2628
|
+
...monitoringDraftOf(current),
|
|
2629
|
+
repeatFailureThreshold: value === "" ? "" : Number(value)
|
|
2630
|
+
};
|
|
2561
2631
|
});
|
|
2562
2632
|
};
|
|
2563
2633
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dshdg-card", "data-dshdg-monitoring": "", children: [
|
|
@@ -2572,7 +2642,7 @@ window.__ModuleLoader__.load({
|
|
|
2572
2642
|
{
|
|
2573
2643
|
label: "程序自检间隔(分钟)",
|
|
2574
2644
|
htmlFor: "dshdg-monitoring-selfcheck",
|
|
2575
|
-
hint: `${LIMITS.selfCheckSecondsMin / 60}–${LIMITS.selfCheckSecondsMax / 60} 分钟;存成整秒(当前 ${
|
|
2645
|
+
hint: `${LIMITS.selfCheckSecondsMin / 60}–${LIMITS.selfCheckSecondsMax / 60} 分钟;存成整秒(当前 ${raw.selfCheckSeconds === "" ? "未填" : `${raw.selfCheckSeconds} 秒`})`,
|
|
2576
2646
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2577
2647
|
"input",
|
|
2578
2648
|
{
|
|
@@ -2582,10 +2652,10 @@ window.__ModuleLoader__.load({
|
|
|
2582
2652
|
min: LIMITS.selfCheckSecondsMin / 60,
|
|
2583
2653
|
max: LIMITS.selfCheckSecondsMax / 60,
|
|
2584
2654
|
step: 0.5,
|
|
2585
|
-
value: String(Number.isFinite(secondsToMinutes(
|
|
2655
|
+
value: String(Number.isFinite(secondsToMinutes(raw.selfCheckSeconds)) ? secondsToMinutes(raw.selfCheckSeconds) : ""),
|
|
2586
2656
|
onChange: (event) => {
|
|
2587
|
-
const
|
|
2588
|
-
edit("selfCheckSeconds",
|
|
2657
|
+
const value = event.target.value;
|
|
2658
|
+
edit("selfCheckSeconds", value === "" ? "" : value);
|
|
2589
2659
|
}
|
|
2590
2660
|
}
|
|
2591
2661
|
)
|
|
@@ -2596,7 +2666,7 @@ window.__ModuleLoader__.load({
|
|
|
2596
2666
|
{
|
|
2597
2667
|
label: "提醒你的间隔(分钟)",
|
|
2598
2668
|
htmlFor: "dshdg-monitoring-attention",
|
|
2599
|
-
hint: `${LIMITS.attentionSecondsMin / 60}–${LIMITS.attentionSecondsMax / 60} 分钟,且必须大于自检间隔;存成整秒(当前 ${
|
|
2669
|
+
hint: `${LIMITS.attentionSecondsMin / 60}–${LIMITS.attentionSecondsMax / 60} 分钟,且必须大于自检间隔;存成整秒(当前 ${raw.attentionSeconds === "" ? "未填" : `${raw.attentionSeconds} 秒`})`,
|
|
2600
2670
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2601
2671
|
"input",
|
|
2602
2672
|
{
|
|
@@ -2606,10 +2676,33 @@ window.__ModuleLoader__.load({
|
|
|
2606
2676
|
min: LIMITS.attentionSecondsMin / 60,
|
|
2607
2677
|
max: LIMITS.attentionSecondsMax / 60,
|
|
2608
2678
|
step: 0.5,
|
|
2609
|
-
value: String(Number.isFinite(secondsToMinutes(
|
|
2679
|
+
value: String(Number.isFinite(secondsToMinutes(raw.attentionSeconds)) ? secondsToMinutes(raw.attentionSeconds) : ""),
|
|
2610
2680
|
onChange: (event) => {
|
|
2611
|
-
const
|
|
2612
|
-
edit("attentionSeconds",
|
|
2681
|
+
const value = event.target.value;
|
|
2682
|
+
edit("attentionSeconds", value === "" ? "" : value);
|
|
2683
|
+
}
|
|
2684
|
+
}
|
|
2685
|
+
)
|
|
2686
|
+
}
|
|
2687
|
+
),
|
|
2688
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2689
|
+
Field,
|
|
2690
|
+
{
|
|
2691
|
+
label: "重复失败提醒(次)",
|
|
2692
|
+
htmlFor: "dshdg-monitoring-repeat",
|
|
2693
|
+
hint: `同一工具、同一操作、同一失败连续这么多次时提醒一次;${LIMITS.repeatFailureThresholdMin} 表示关闭(当前 ${raw.repeatFailureThreshold === "" ? "未填" : `${raw.repeatFailureThreshold} 次`})`,
|
|
2694
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2695
|
+
"input",
|
|
2696
|
+
{
|
|
2697
|
+
id: "dshdg-monitoring-repeat",
|
|
2698
|
+
type: "number",
|
|
2699
|
+
inputMode: "numeric",
|
|
2700
|
+
min: LIMITS.repeatFailureThresholdMin,
|
|
2701
|
+
max: LIMITS.repeatFailureThresholdMax,
|
|
2702
|
+
step: 1,
|
|
2703
|
+
value: String(raw.repeatFailureThreshold),
|
|
2704
|
+
onChange: (event) => {
|
|
2705
|
+
editFailureCount(event.target.value);
|
|
2613
2706
|
}
|
|
2614
2707
|
}
|
|
2615
2708
|
)
|
|
@@ -2620,6 +2713,11 @@ window.__ModuleLoader__.load({
|
|
|
2620
2713
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("ul", { className: "dshdg-hint", children: [
|
|
2621
2714
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: "「没有新进展」本身不等于失败:插件不会因为安静、也不会因为单个工具跑得久就判定任务失败。" }),
|
|
2622
2715
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: "只有确实没有进展、并且超过「提醒你的间隔」之后,才会把这件事报告给派工方。" }),
|
|
2716
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", { children: [
|
|
2717
|
+
"重复失败提醒与上面两个间隔",
|
|
2718
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: "互相独立" }),
|
|
2719
|
+
":它数的是同一操作连续失败了几次,而不是安静了多久,所以正在忙碌地反复失败也会被提醒。它只提醒一次,不会自动取消任务、更换模型或改动超时。"
|
|
2720
|
+
] }),
|
|
2623
2721
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", { children: [
|
|
2624
2722
|
"修改只影响",
|
|
2625
2723
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: "之后新提交" }),
|
|
@@ -2636,7 +2734,7 @@ window.__ModuleLoader__.load({
|
|
|
2636
2734
|
onClick: async () => {
|
|
2637
2735
|
setSaving(true);
|
|
2638
2736
|
try {
|
|
2639
|
-
await store.saveMonitoring(
|
|
2737
|
+
await store.saveMonitoring(monitoringDraftOf(draft));
|
|
2640
2738
|
} finally {
|
|
2641
2739
|
setSaving(false);
|
|
2642
2740
|
}
|
|
@@ -2829,11 +2927,11 @@ window.__ModuleLoader__.load({
|
|
|
2829
2927
|
const permission = permissionSummary(task);
|
|
2830
2928
|
const pending = pendingPermission(task);
|
|
2831
2929
|
const evidence = Array.isArray(task.permission?.evidence) ? task.permission.evidence : [];
|
|
2832
|
-
const badgeTone = isAwaitingPermission(task) ? "warn" :
|
|
2930
|
+
const badgeTone = isAwaitingPermission(task) ? "warn" : outcome.tone;
|
|
2833
2931
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dshdg-item", children: [
|
|
2834
2932
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dshdg-item-head", children: [
|
|
2835
2933
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: task.title || task.taskId }),
|
|
2836
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Badge, { tone: badgeTone, children:
|
|
2934
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Badge, { tone: badgeTone, children: outcome.label }),
|
|
2837
2935
|
isAwaitingPermission(task) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Badge, { tone: "warn", children: PERMISSION_STATE_LABELS.pending }) : null,
|
|
2838
2936
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dshdg-spacer" }),
|
|
2839
2937
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -2869,7 +2967,7 @@ window.__ModuleLoader__.load({
|
|
|
2869
2967
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", { children: "对话" }),
|
|
2870
2968
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { children: execution?.conversation === null || execution?.conversation === void 0 ? task.continueFromTaskId === null || task.continueFromTaskId === void 0 ? "(未放置对话)" : `(未放置对话;本任务声明续接 ${task.continueFromTaskId})` : execution.conversation.reused === true ? `续接 ${execution.conversation.continuedFromTaskId ?? "上一任务"} · 工作区 ${execution.conversation.workspaceId ?? "—"}` : `新开 · 工作区 ${execution.conversation.workspaceId ?? "—"}` }),
|
|
2871
2969
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", { children: "阶段" }),
|
|
2872
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { children: taskPhaseLabel(task.phase) }),
|
|
2970
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { children: outcome.decided || task.state === "awaiting-host-review" ? "执行已结束" : taskPhaseLabel(task.phase) }),
|
|
2873
2971
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", { children: "最近进展" }),
|
|
2874
2972
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { children: activity === null || activity.lastActivityAt === null ? "未采集到" : `${formatTime(activity.lastActivityAt)}(距上次进展 ${formatDuration(activity.idleForMs)})` }),
|
|
2875
2973
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", { children: "当前工具" }),
|
|
@@ -2878,6 +2976,8 @@ window.__ModuleLoader__.load({
|
|
|
2878
2976
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { children: activity === null || activity.selfCheck === null || activity.selfCheck.verdict === null ? activity === null ? "未采集到" : "尚未触发程序自检(安静时间还没到自检间隔)" : `${SELF_CHECK_LABELS[activity.selfCheck.verdict] ?? activity.selfCheck.verdict}` + (activity.selfCheck.checkedAt === null ? "" : `(${formatTime(activity.selfCheck.checkedAt)})`) }),
|
|
2879
2977
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", { children: "监控间隔" }),
|
|
2880
2978
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { children: activity === null || activity.selfCheckSeconds === null ? "未采集到" : `自检 ${formatDuration(activity.selfCheckSeconds * 1e3)} · 提醒 ${formatDuration((activity.attentionSeconds ?? 0) * 1e3)}` }),
|
|
2979
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", { children: "重复失败提醒" }),
|
|
2980
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { children: repeatFailureLine(activity) }),
|
|
2881
2981
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", { children: "创建" }),
|
|
2882
2982
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { children: formatTime(task.createdAt) }),
|
|
2883
2983
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", { children: "结束" }),
|
|
@@ -2890,7 +2990,7 @@ window.__ModuleLoader__.load({
|
|
|
2890
2990
|
review?.verdict === null || review?.verdict === void 0 ? "" : ` · ${REVIEW_VERDICT_LABELS[review.verdict] ?? review.verdict}`
|
|
2891
2991
|
] }),
|
|
2892
2992
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", { children: "宿主验收" }),
|
|
2893
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { children: task
|
|
2993
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { children: hostReviewLine(task, formatTime) })
|
|
2894
2994
|
] }),
|
|
2895
2995
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { children: "改动文件" }),
|
|
2896
2996
|
files === null ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "dshdg-faint", children: "宿主未回报可识别的文件摘要,请以下方原始 diff 为准。" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", { className: "dshdg-mono", children: files.map((file) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: file }, file)) }),
|
|
@@ -2995,11 +3095,13 @@ window.__ModuleLoader__.load({
|
|
|
2995
3095
|
] }),
|
|
2996
3096
|
tasks.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "dshdg-faint", children: "还没有任务记录。" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dshdg-list", children: tasks.map((task) => {
|
|
2997
3097
|
const progress = taskProgress(task);
|
|
3098
|
+
const outcome = taskOutcome(task);
|
|
3099
|
+
const phase = outcome.phaseLabel;
|
|
2998
3100
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dshdg-item", children: [
|
|
2999
3101
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dshdg-item-head", children: [
|
|
3000
3102
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: task.title || task.taskId }),
|
|
3001
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Badge, { tone: isAwaitingPermission(task) ? "warn" :
|
|
3002
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Badge, { tone: progress.tone, children:
|
|
3103
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Badge, { tone: isAwaitingPermission(task) ? "warn" : outcome.tone, children: outcome.label }),
|
|
3104
|
+
phase === null ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Badge, { tone: progress.tone, children: phase }),
|
|
3003
3105
|
isAwaitingPermission(task) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Badge, { tone: "warn", children: PERMISSION_STATE_LABELS.pending }) : null,
|
|
3004
3106
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "dshdg-mono dshdg-faint", children: [
|
|
3005
3107
|
task.config?.worker?.model ?? task.effective?.worker?.model ?? "—",
|