@ai-setting/roy-agent-core 1.7.75 → 1.7.77
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/dist/env/agent/agent-component.js +2 -2
- package/dist/env/agent/index.js +2 -2
- package/dist/env/event-source/event-source-handlers.js +9 -8
- package/dist/env/event-source/index.js +10 -9
- package/dist/env/index.js +16 -15
- package/dist/env/prompt/index.js +4 -3
- package/dist/env/prompt/prompts-index.d.ts +11 -9
- package/dist/env/task/backend/index.js +45 -1
- package/dist/env/task/backend/task-store-backend.d.ts +12 -0
- package/dist/env/task/backend/types.d.ts +19 -0
- package/dist/env/task/delegate/delegate-tool.js +4 -3
- package/dist/env/task/delegate/index.js +4 -3
- package/dist/env/task/hooks/contexts.d.ts +12 -1
- package/dist/env/task/hooks/task-hook-points.d.ts +8 -3
- package/dist/env/task/index.d.ts +1 -0
- package/dist/env/task/index.js +17 -7
- package/dist/env/task/mcp/index.js +6 -2
- package/dist/env/task/mcp/task-mcp-server.d.ts +1 -1
- package/dist/env/task/plugins/fake-user-message-helper.d.ts +10 -2
- package/dist/env/task/plugins/index.d.ts +1 -0
- package/dist/env/task/plugins/index.js +18 -6
- package/dist/env/task/plugins/lark-card-patch-notifier.js +1 -1
- package/dist/env/task/plugins/task-op-watermark-plugin.d.ts +112 -0
- package/dist/env/task/prompt/index.js +2 -1
- package/dist/env/task/prompt/task-discipline.d.ts +1 -1
- package/dist/env/task/storage/index.js +2 -2
- package/dist/env/task/storage/sqlite-task-store.d.ts +54 -0
- package/dist/env/task/task-component.d.ts +95 -0
- package/dist/env/task/tools/cancel-tool.d.ts +12 -4
- package/dist/env/task/tools/completion-copy.d.ts +92 -0
- package/dist/env/task/tools/index.d.ts +1 -0
- package/dist/env/task/tools/index.js +5 -2
- package/dist/env/task/tools/operation/operation-types.d.ts +13 -13
- package/dist/env/task/tools/pre-complete-tool.d.ts +32 -0
- package/dist/env/task/tools/task-types.d.ts +49 -17
- package/dist/env/task/types.d.ts +13 -1
- package/dist/env/workflow/plugins/index.js +2 -2
- package/dist/env/workflow/types/event.d.ts +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +26 -16
- package/dist/shared/@ai-setting/{roy-agent-core-n9q1encx.js → roy-agent-core-0v27y99n.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-60jbrfye.js → roy-agent-core-3gpygqcx.js} +30 -6
- package/dist/shared/@ai-setting/roy-agent-core-4rtg69cn.js +26 -0
- package/dist/shared/@ai-setting/{roy-agent-core-djpq6yb0.js → roy-agent-core-9vhq7fvv.js} +6 -2
- package/dist/shared/@ai-setting/{roy-agent-core-3e6gg17d.js → roy-agent-core-9vxh6f8h.js} +169 -30
- package/dist/shared/@ai-setting/{roy-agent-core-jg65qnwa.js → roy-agent-core-aa2j7bk9.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-29b6hc39.js → roy-agent-core-cmprygrp.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-snvh4s2p.js → roy-agent-core-ew6qb5yx.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-abqhkbn3.js → roy-agent-core-ezvpreqz.js} +23 -0
- package/dist/shared/@ai-setting/roy-agent-core-h21gngxf.js +247 -0
- package/dist/shared/@ai-setting/{roy-agent-core-p3zv1mx5.js → roy-agent-core-hd3n57zs.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-11shp00p.js → roy-agent-core-m46fe3x4.js} +21 -31
- package/dist/shared/@ai-setting/{roy-agent-core-ntq0gz7q.js → roy-agent-core-q813vafd.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-4gr3k7qg.js → roy-agent-core-rhtdspx6.js} +140 -29
- package/dist/shared/@ai-setting/{roy-agent-core-y7x2qzwc.js → roy-agent-core-rsn44n9y.js} +10 -6
- package/dist/shared/@ai-setting/{roy-agent-core-hnyk1by7.js → roy-agent-core-vffccgf6.js} +152 -33
- package/dist/shared/@ai-setting/{roy-agent-core-nmx9934r.js → roy-agent-core-w0qjeq2v.js} +1 -1
- package/package.json +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-f77k3gqt.js +0 -71
|
@@ -161,6 +161,14 @@ export declare class TaskComponent extends BaseComponent {
|
|
|
161
161
|
* 按 session_id 反查该 session 创建的第一个 task(sub-session → task 确定性映射)。
|
|
162
162
|
*/
|
|
163
163
|
getTaskIdBySessionId(sessionId: string): Promise<number | undefined>;
|
|
164
|
+
/**
|
|
165
|
+
* Task #5081 — 按 session_id 反查该 session 绑定的**全部** task。
|
|
166
|
+
*
|
|
167
|
+
* 为什么需要:一个 sub-session 可能创建/关联多个 task
|
|
168
|
+
* (getTaskIdBySessionId 只返回第一个,ORDER BY timestamp ASC)。
|
|
169
|
+
* TaskOpWatermarkPlugin 对全部 task 求并集水位(保守不漏报)。
|
|
170
|
+
*/
|
|
171
|
+
getTaskIdsBySessionId(sessionId: string): Promise<number[]>;
|
|
164
172
|
/**
|
|
165
173
|
* Get task with operations
|
|
166
174
|
*
|
|
@@ -213,6 +221,54 @@ export declare class TaskComponent extends BaseComponent {
|
|
|
213
221
|
operations: TaskOperation[];
|
|
214
222
|
task: Task;
|
|
215
223
|
}) | undefined>;
|
|
224
|
+
/**
|
|
225
|
+
* ★ Task #5063 — 终态 current_status 收口辅助(**唯一**措辞/规则来源)
|
|
226
|
+
*
|
|
227
|
+
* 规则(测试锁死,勿改):
|
|
228
|
+
* 1. **只在 status 迁移到终态时**补 current_status
|
|
229
|
+
* —— 非终态(todo/active/paused)原样返回,不碰 current_status。
|
|
230
|
+
* (否则会破坏 `task_update(current_status="推进中")` 这类合法用法。)
|
|
231
|
+
* 2. **调用方显式传了 current_status 就尊重调用方**,不覆盖
|
|
232
|
+
* —— completeTask / cancelTaskTool 已在自己的调用里写好了带
|
|
233
|
+
* deliverable / reason 的终态文案,不能被这里冲掉。
|
|
234
|
+
* 3. 只认**本次更新要落**的 status —— `status` 缺省时一律不动。
|
|
235
|
+
*
|
|
236
|
+
* 终态集合与措辞:
|
|
237
|
+
* - completed → TASK_COMPLETED_STATUS_WORD(但 completeTask 自己写了带
|
|
238
|
+
* deliverable 的版本,走的是规则 2「尊重调用方」,不受这里影响)
|
|
239
|
+
* - cancelled → TASK_CANCELLED_STATUS_WORD
|
|
240
|
+
* - archived → TASK_ARCHIVED_STATUS_WORD
|
|
241
|
+
*
|
|
242
|
+
* ⚠️ 与 TASK_COMPLETE_TERMINAL_STATUSES(hooks/contexts.ts)**故意不同**:
|
|
243
|
+
* 那个集合决定「要不要 fire AFTER_COMPLETE 钩子」(archived 不 fire);
|
|
244
|
+
* 这个集合决定「要不要刷新 current_status」(archived 要刷)。
|
|
245
|
+
* 两者语义正交,别合并。
|
|
246
|
+
*
|
|
247
|
+
* ★ Task #5067 — 新增**反向**收口(reopen:终态 → 非终态)
|
|
248
|
+
*
|
|
249
|
+
* #5063 只管「迁入终态」。反向路径没管 ⇒ 任务从终态被 reopen 回
|
|
250
|
+
* active/todo 时,current_status 仍停在终态文案("已归档"/"已取消"/"已完成"),
|
|
251
|
+
* 出现「status: active 但 current_status: 已归档」的自相矛盾状态。
|
|
252
|
+
*
|
|
253
|
+
* 规则 4(新增,测试锁死):
|
|
254
|
+
* **从终态迁出到非终态,且当前 current_status 是系统写的终态文案时,
|
|
255
|
+
* 把 current_status 换成 reopen 措辞。**
|
|
256
|
+
*
|
|
257
|
+
* 为什么这不违反规则 1:
|
|
258
|
+
* 规则 1 说的「非终态迁移不碰 current_status」指的是**普通进度更新**
|
|
259
|
+
* (如 `task_update(current_status="推进中")`)—— 那必须保留调用方
|
|
260
|
+
* 显式传的值。而 reopen 时 current_status 里留着的是**系统自己写的
|
|
261
|
+
* 终态文案**,不是调用方的意图 ⇒ 这种情况**应该**被刷新。
|
|
262
|
+
*
|
|
263
|
+
* 判定用「值比对 + 前态 status」双条件(修法 A 增强版):
|
|
264
|
+
* - 值比对:current_status 以某个终态锚点**开头**(TASK_TERMINAL_STATUS_WORDS)
|
|
265
|
+
* - 前态 status:任务**当前**确实处于终态(archived/cancelled/completed)
|
|
266
|
+
* 两个条件同时成立才替换。为什么要加「前态」条件:
|
|
267
|
+
* 只看值的话,active 任务上手写的「已完成的部分:A/B/C」会被误判
|
|
268
|
+
* 成陈旧终态文案而被冲掉。加上前态判定后,只有**真的从终态迁出**
|
|
269
|
+
* 时才动 —— 把误伤面压到极窄。
|
|
270
|
+
*/
|
|
271
|
+
private withTerminalCurrentStatus;
|
|
216
272
|
/**
|
|
217
273
|
* Update task
|
|
218
274
|
*/
|
|
@@ -278,6 +334,37 @@ export declare class TaskComponent extends BaseComponent {
|
|
|
278
334
|
* @returns 更新后的 Task,任务不存在时返回 undefined
|
|
279
335
|
*/
|
|
280
336
|
updateTaskContext(id: number, context: string): Promise<Task | undefined>;
|
|
337
|
+
/**
|
|
338
|
+
* ★ Task #5073 — 提交待验证(两阶段验收的第一阶段)
|
|
339
|
+
*
|
|
340
|
+
* 需求(用户 2026-11-06 飞书):sub-agent 觉得可以完成了,
|
|
341
|
+
* 传交付物等参数调 task_pre_complete → task 状态变为 to_validate;
|
|
342
|
+
* default agent 调 task_complete 校验之后状态正式 completed。
|
|
343
|
+
*
|
|
344
|
+
* 语义要点:
|
|
345
|
+
* - to_validate **不是终态**:
|
|
346
|
+
* - 不加入 isTerminalTaskStatus(reopen 反向收口不管它)
|
|
347
|
+
* - 卡片(lark 插件)保持 running 更新态(cardStatusOf 不识别
|
|
348
|
+
* to_validate → 走 sendCardUpdate 普通 patch,不 unpin)
|
|
349
|
+
* - ★ 设计调整②(38603):preCompleteTask 在 updateTask 后**显式
|
|
350
|
+
* fire 一次 AFTER_COMPLETE**(goal 检查自查关,terminalStatus=
|
|
351
|
+
* to_validate);updateTask 本体已**不再**触发 AFTER_COMPLETE
|
|
352
|
+
* (见 updateTask 注释),本钩子的触发点唯一 = preCompleteTask。
|
|
353
|
+
* - current_status 同步(#5060 收口模式):措辞同源锚点
|
|
354
|
+
* TASK_TO_VALIDATE_STATUS_WORD =「待验证」,调用方传了
|
|
355
|
+
* progressSummary 就带上(「待验证:<summary>」)
|
|
356
|
+
* - 交付物双写(#2778 v2 同模式):context.deliverable_storage_path
|
|
357
|
+
* + operation 的 Deliverable 行
|
|
358
|
+
* - 幂等:重复提交安全(后一次覆盖前一次的 current_status /
|
|
359
|
+
* deliverable,operation 各自留痕)
|
|
360
|
+
*
|
|
361
|
+
* @param id 任务 ID
|
|
362
|
+
* @param sessionId 当前 session ID
|
|
363
|
+
* @param deliverableStoragePath 可选,交付物寻址地址
|
|
364
|
+
* @param progressSummary 可选,本次交付的进展摘要(拼进 current_status)
|
|
365
|
+
* @returns 更新后的 Task 或 undefined
|
|
366
|
+
*/
|
|
367
|
+
preCompleteTask(id: number, sessionId: string, deliverableStoragePath?: string, progressSummary?: string): Promise<Task | undefined>;
|
|
281
368
|
/**
|
|
282
369
|
* Create operation record
|
|
283
370
|
*/
|
|
@@ -304,6 +391,14 @@ export declare class TaskComponent extends BaseComponent {
|
|
|
304
391
|
* List operations for a task
|
|
305
392
|
*/
|
|
306
393
|
listOperations(options: ListOperationsOptions): Promise<TaskOperation[]>;
|
|
394
|
+
/**
|
|
395
|
+
* Task #5081 — 绕过 operationsCache 的直读(optional 能力探测)。
|
|
396
|
+
*
|
|
397
|
+
* store 实现 `listOperationsFresh` 时直打 DB;否则降级
|
|
398
|
+
* `listOperations` + `invalidateOperationsCache`(若支持)。
|
|
399
|
+
* 语义等价,保证跨进程写入的记录可见。
|
|
400
|
+
*/
|
|
401
|
+
listOperationsFresh(options: ListOperationsOptions): Promise<TaskOperation[]>;
|
|
307
402
|
/**
|
|
308
403
|
* 获取 TagService
|
|
309
404
|
*/
|
|
@@ -7,7 +7,13 @@
|
|
|
7
7
|
* 且 sub-agent 超时 / 未更新状态时任务状态会长期不同步。
|
|
8
8
|
* 调整后 default agent 承担验收:
|
|
9
9
|
* - task_complete —— 核对产出后判定完成(触发 goal 检查 decision model)
|
|
10
|
-
* - task_cancel ——
|
|
10
|
+
* - task_cancel —— **仅在用户明令取消时**取消任务
|
|
11
|
+
*
|
|
12
|
+
* 语义边界(Task #5055,用户明令):
|
|
13
|
+
* task_cancel 是**用户明令**才能调的 —— 用户说"取消 / 停掉这个任务"。
|
|
14
|
+
* 失败 / 超时 ≠ 取消:正确的出路是找根因 → 提修复方案 → 重新委托
|
|
15
|
+
* (可用 sub_session_id 续跑)→ 实在推不动就如实告知用户、等用户决定,
|
|
16
|
+
* **不自行 cancel**。
|
|
11
17
|
*
|
|
12
18
|
* 本工具的职责边界:
|
|
13
19
|
* - **取消 Task 本身**(task.status = "cancelled")
|
|
@@ -15,9 +21,11 @@
|
|
|
15
21
|
* task_cancel 停 Task 记录)。两者正交,default agent 可能需要连用:
|
|
16
22
|
* 先 stop_task 掐掉还在跑的 sub-agent,再 task_cancel 取消任务记录。
|
|
17
23
|
*
|
|
18
|
-
* 终态 hook:`cancelled` 属于 TASK_COMPLETE_TERMINAL_STATUSES
|
|
19
|
-
*
|
|
20
|
-
*
|
|
24
|
+
* 终态 hook:`cancelled` 属于 TASK_COMPLETE_TERMINAL_STATUSES。
|
|
25
|
+
* ⚠️ Task #5073 设计调整②:updateTask **不再** fire
|
|
26
|
+
* AFTER_COMPLETE —— 终态通知走 task:after.update
|
|
27
|
+
* (lark-card 状态机 cardStatusOf 覆盖 completed/cancelled/
|
|
28
|
+
* archived 等),本工具无需额外接线。
|
|
21
29
|
*/
|
|
22
30
|
import type { Tool } from "../../tool/types";
|
|
23
31
|
import type { TaskComponent } from "../task-component";
|
|
@@ -25,3 +25,95 @@ export declare const TASK_COMPLETE_ACCEPTANCE: {
|
|
|
25
25
|
readonly hintAnchor: "TASK_COMPLETION_HINT";
|
|
26
26
|
readonly verifyDuty: "核实义务";
|
|
27
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* Task #5060 — 终态 current_status 文案同源锚点
|
|
30
|
+
*
|
|
31
|
+
* 背景:`task_complete` / `task_cancel` 原来只改 status/progress,
|
|
32
|
+
* **完全不碰 current_status** ⇒ 任务落终态后 current_status 仍留着
|
|
33
|
+
* 完成前的旧文案(如「按用户方案 X 决定暂停:未 commit」),出现
|
|
34
|
+
* 「status=completed 但描述说没做完」的自相矛盾状态。
|
|
35
|
+
*
|
|
36
|
+
* 修复:终态工具在同一次 updateTask 里把 current_status 一起写成终态语义。
|
|
37
|
+
* 下面的短语是「终态 current_status」的**唯一措辞来源** ——
|
|
38
|
+
* task-component(完成)/ cancel-tool(取消)都引用它,避免两处漂移。
|
|
39
|
+
*/
|
|
40
|
+
/** 完成态 current_status 的核心语义词 */
|
|
41
|
+
export declare const TASK_COMPLETED_STATUS_WORD = "\u5DF2\u5B8C\u6210";
|
|
42
|
+
/** 取消态 current_status 的核心语义词 */
|
|
43
|
+
export declare const TASK_CANCELLED_STATUS_WORD = "\u5DF2\u53D6\u6D88";
|
|
44
|
+
/** 交付物已记录的前缀(跟在终态词之后) */
|
|
45
|
+
export declare const TASK_DELIVERABLE_RECORDED = "\u4EA4\u4ED8\u7269\u5DF2\u8BB0\u5F55";
|
|
46
|
+
/**
|
|
47
|
+
* Task #5063 — 归档态 current_status 的核心语义词
|
|
48
|
+
*
|
|
49
|
+
* 背景(Task #5060 的 follow-up,DS review 留档 MINOR m2):
|
|
50
|
+
* `archived` 是「终态 current_status 不刷新」这个 bug 的**第四个出口**。
|
|
51
|
+
* #5060 只修了 completed / cancelled 两条路径,导致走归档路径
|
|
52
|
+
* (`tasks complete --archive`、批量归档工具、通用 task_update)
|
|
53
|
+
* 的任务完成后 current_status 仍留着归档前的旧文案。
|
|
54
|
+
*
|
|
55
|
+
* 本锚点与 TASK_COMPLETED_STATUS_WORD / TASK_CANCELLED_STATUS_WORD 并列,
|
|
56
|
+
* 是「归档态 current_status」的**唯一措辞来源**。
|
|
57
|
+
*/
|
|
58
|
+
export declare const TASK_ARCHIVED_STATUS_WORD = "\u5DF2\u5F52\u6863";
|
|
59
|
+
/**
|
|
60
|
+
* Task #5067 — reopen(终态 → 非终态)后 current_status 的核心语义词
|
|
61
|
+
*
|
|
62
|
+
* 背景(Task #5063 DS review 留档 MINOR m1):
|
|
63
|
+
* #5063 只收口了「**迁入**终态时刷新 current_status」,**反向**路径没管:
|
|
64
|
+
* 任务从终态被 reopen 回 active/todo 时,current_status 仍停在终态文案
|
|
65
|
+
* ("已归档" / "已取消" / "已完成")⇒ 出现
|
|
66
|
+
* status: active / current_status: "已归档" ← 说反了
|
|
67
|
+
*
|
|
68
|
+
* 为什么措辞是「已重新打开」而不是清空:
|
|
69
|
+
* 卡片渲染(lark-card-patch-notifier.ts)与 CLI(tasks get / tasks search)
|
|
70
|
+
* 都用 `if (current_status)` 守卫 —— **空串会让整行消失**,用户看到的是
|
|
71
|
+
* 一张没有「📶 当前状态」行的卡片,而不是「已重新打开」。
|
|
72
|
+
* 「已重新打开」非空、可渲染、语义明确(区别于「已完成」这类终态词)。
|
|
73
|
+
*/
|
|
74
|
+
export declare const TASK_REOPENED_STATUS_WORD = "\u5DF2\u91CD\u65B0\u6253\u5F00";
|
|
75
|
+
/**
|
|
76
|
+
* Task #5073 — 待验证(to_validate)current_status 的核心语义词
|
|
77
|
+
*
|
|
78
|
+
* 两阶段验收(#5007 的机制化落地):
|
|
79
|
+
* sub-agent 干完 → `task_pre_complete` → status=to_validate,
|
|
80
|
+
* current_status 刷成「待验证」;default agent `task_complete`
|
|
81
|
+
* 校验通过后才落 completed(措辞 TASK_COMPLETED_STATUS_WORD)。
|
|
82
|
+
*
|
|
83
|
+
* 与终态措辞(TASK_COMPLETED_STATUS_WORD 等)并列但**不入**
|
|
84
|
+
* TASK_TERMINAL_STATUS_WORDS —— to_validate 是**非终态**
|
|
85
|
+
* (reopen 反向收口管不着它:从 to_validate 迁出时 current_status
|
|
86
|
+
* 本来就该带「待验证」语义,由 withTerminalCurrentStatus 的
|
|
87
|
+
* 非终态分支按调用方意图处理)。
|
|
88
|
+
*/
|
|
89
|
+
export declare const TASK_TO_VALIDATE_STATUS_WORD = "\u5F85\u9A8C\u8BC1";
|
|
90
|
+
/**
|
|
91
|
+
* Task #5067 — 终态 current_status 措辞锚点集合(reopen 判定的**唯一**依据)
|
|
92
|
+
*
|
|
93
|
+
* 用途:`withTerminalCurrentStatus` 在「迁出终态」时,需要判断当前
|
|
94
|
+
* current_status 是不是**系统写的终态文案**(而不是调用方自己写的)。
|
|
95
|
+
* 判定方式 = current_status 以本集合中任一锚点**开头**。
|
|
96
|
+
*
|
|
97
|
+
* ⚠️ 为什么用 startsWith 而不是 includes:
|
|
98
|
+
* 终态文案可能带后缀(如「已归档:批量整理」「已完成(交付物已记录:/x.md)」),
|
|
99
|
+
* 但**开头**的锚点才是系统写的语义主体。反过来,包含判断会误伤
|
|
100
|
+
* 调用方自己写的「已完成的部分:A/B/C」这类正常文案。
|
|
101
|
+
*
|
|
102
|
+
* ⚠️ 边界取舍(已知且接受):
|
|
103
|
+
* 若调用方**恰好手动写了**以「已完成」/「已取消」/「已归档」开头的文案,
|
|
104
|
+
* 且任务当时正处于终态,reopen 时该文案会被系统措辞替换。
|
|
105
|
+
* 这是「值比对」方案的固有代价 —— 用「前态 status 是终态」这一额外条件
|
|
106
|
+
* 把它压到极窄(只在真的从终态迁出、且文案形状与系统措辞完全一致时触发)。
|
|
107
|
+
*/
|
|
108
|
+
export declare const TASK_TERMINAL_STATUS_WORDS: readonly ["已完成", "已取消", "已归档"];
|
|
109
|
+
/**
|
|
110
|
+
* ★ Task #5073(DS review r4 MINOR-3)— 终态护栏集合的同源锚点:
|
|
111
|
+
* 已终态(cancelled / archived)任务**不可**被「验收通过」翻转成
|
|
112
|
+
* completed。消费点:TaskComponent.completeTask(组件层护栏,
|
|
113
|
+
* 兜底 CLI / 直连通道)+ complete-tool.ts(tool 层友好报错)。
|
|
114
|
+
*
|
|
115
|
+
* ⚠️ to_validate / active / todo / paused **不在**集合里 ——
|
|
116
|
+
* 规范路径 to_validate → completed 与兜底路径 active →
|
|
117
|
+
* completed(#5054 补验收)都必须放行。
|
|
118
|
+
*/
|
|
119
|
+
export declare const TERMINAL_NON_ACCEPTABLE_STATUSES: readonly ["cancelled", "archived"];
|
|
@@ -11,4 +11,5 @@ export { updateTaskTool } from "./update-tool";
|
|
|
11
11
|
export { deleteTaskTool } from "./delete-tool";
|
|
12
12
|
export { completeTaskTool } from "./complete-tool";
|
|
13
13
|
export { cancelTaskTool } from "./cancel-tool";
|
|
14
|
+
export { preCompleteTaskTool } from "./pre-complete-tool";
|
|
14
15
|
export { treeTasksTool } from "./task-tree-tool";
|
|
@@ -7,12 +7,14 @@ import {
|
|
|
7
7
|
deleteTaskTool,
|
|
8
8
|
getTaskTool,
|
|
9
9
|
listTasksTool,
|
|
10
|
+
preCompleteTaskTool,
|
|
10
11
|
searchTasksTool,
|
|
11
12
|
treeTasksTool,
|
|
12
13
|
updateTaskTool
|
|
13
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
14
|
+
} from "../../../shared/@ai-setting/roy-agent-core-vffccgf6.js";
|
|
14
15
|
import"../../../shared/@ai-setting/roy-agent-core-tr3ep81v.js";
|
|
15
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
16
|
+
import"../../../shared/@ai-setting/roy-agent-core-m46fe3x4.js";
|
|
17
|
+
import"../../../shared/@ai-setting/roy-agent-core-4rtg69cn.js";
|
|
16
18
|
import"../../../shared/@ai-setting/roy-agent-core-7cbpmk4q.js";
|
|
17
19
|
import"../../../shared/@ai-setting/roy-agent-core-qq96p0tj.js";
|
|
18
20
|
import"../../../shared/@ai-setting/roy-agent-core-7f7t9wwp.js";
|
|
@@ -22,6 +24,7 @@ export {
|
|
|
22
24
|
updateTaskTool,
|
|
23
25
|
treeTasksTool,
|
|
24
26
|
searchTasksTool,
|
|
27
|
+
preCompleteTaskTool,
|
|
25
28
|
listTasksTool,
|
|
26
29
|
getTaskTool,
|
|
27
30
|
deleteTaskTool,
|
|
@@ -82,31 +82,31 @@ export declare const CreateOperationToolSchema: z.ZodEffects<z.ZodObject<{
|
|
|
82
82
|
md_path: z.ZodOptional<z.ZodString>;
|
|
83
83
|
}, "strip", z.ZodTypeAny, {
|
|
84
84
|
task_id: number;
|
|
85
|
-
milestone_type?: "
|
|
85
|
+
milestone_type?: "completed" | "create" | "progress" | "milestone" | "problem" | "solution" | "decision" | "review" | "workflow_extracted" | undefined;
|
|
86
86
|
milestone_title?: string | undefined;
|
|
87
87
|
milestone_description?: string | undefined;
|
|
88
88
|
process_description?: string | undefined;
|
|
89
|
-
action_type?: "
|
|
89
|
+
action_type?: "completed" | "create" | "progress" | "milestone" | "problem" | "solution" | "decision" | "review" | "workflow_extracted" | undefined;
|
|
90
90
|
action_title?: string | undefined;
|
|
91
91
|
action_description?: string | undefined;
|
|
92
92
|
md_path?: string | undefined;
|
|
93
93
|
}, {
|
|
94
94
|
task_id: number;
|
|
95
|
-
milestone_type?: "
|
|
95
|
+
milestone_type?: "completed" | "create" | "progress" | "milestone" | "problem" | "solution" | "decision" | "review" | "workflow_extracted" | undefined;
|
|
96
96
|
milestone_title?: string | undefined;
|
|
97
97
|
milestone_description?: string | undefined;
|
|
98
98
|
process_description?: string | undefined;
|
|
99
|
-
action_type?: "
|
|
99
|
+
action_type?: "completed" | "create" | "progress" | "milestone" | "problem" | "solution" | "decision" | "review" | "workflow_extracted" | undefined;
|
|
100
100
|
action_title?: string | undefined;
|
|
101
101
|
action_description?: string | undefined;
|
|
102
102
|
md_path?: string | undefined;
|
|
103
103
|
}>, CreateOperationToolParams, {
|
|
104
104
|
task_id: number;
|
|
105
|
-
milestone_type?: "
|
|
105
|
+
milestone_type?: "completed" | "create" | "progress" | "milestone" | "problem" | "solution" | "decision" | "review" | "workflow_extracted" | undefined;
|
|
106
106
|
milestone_title?: string | undefined;
|
|
107
107
|
milestone_description?: string | undefined;
|
|
108
108
|
process_description?: string | undefined;
|
|
109
|
-
action_type?: "
|
|
109
|
+
action_type?: "completed" | "create" | "progress" | "milestone" | "problem" | "solution" | "decision" | "review" | "workflow_extracted" | undefined;
|
|
110
110
|
action_title?: string | undefined;
|
|
111
111
|
action_description?: string | undefined;
|
|
112
112
|
md_path?: string | undefined;
|
|
@@ -144,17 +144,17 @@ export declare const ListOperationsToolSchema: z.ZodEffects<z.ZodObject<{
|
|
|
144
144
|
task_id: number;
|
|
145
145
|
limit: number;
|
|
146
146
|
offset: number;
|
|
147
|
-
milestone_type?: "
|
|
148
|
-
action_type?: "
|
|
147
|
+
milestone_type?: "completed" | "create" | "progress" | "milestone" | "problem" | "solution" | "decision" | "review" | "workflow_extracted" | undefined;
|
|
148
|
+
action_type?: "completed" | "create" | "progress" | "milestone" | "problem" | "solution" | "decision" | "review" | "workflow_extracted" | undefined;
|
|
149
149
|
}, {
|
|
150
150
|
task_id: number;
|
|
151
151
|
limit?: number | undefined;
|
|
152
152
|
offset?: number | undefined;
|
|
153
|
-
milestone_type?: "
|
|
154
|
-
action_type?: "
|
|
153
|
+
milestone_type?: "completed" | "create" | "progress" | "milestone" | "problem" | "solution" | "decision" | "review" | "workflow_extracted" | undefined;
|
|
154
|
+
action_type?: "completed" | "create" | "progress" | "milestone" | "problem" | "solution" | "decision" | "review" | "workflow_extracted" | undefined;
|
|
155
155
|
}>, {
|
|
156
156
|
task_id: number;
|
|
157
|
-
milestone_type: "
|
|
157
|
+
milestone_type: "completed" | "create" | "progress" | "milestone" | "problem" | "solution" | "decision" | "review" | "workflow_extracted" | undefined;
|
|
158
158
|
limit: number;
|
|
159
159
|
offset: number;
|
|
160
160
|
_deprecated_fields_used: string[];
|
|
@@ -162,8 +162,8 @@ export declare const ListOperationsToolSchema: z.ZodEffects<z.ZodObject<{
|
|
|
162
162
|
task_id: number;
|
|
163
163
|
limit?: number | undefined;
|
|
164
164
|
offset?: number | undefined;
|
|
165
|
-
milestone_type?: "
|
|
166
|
-
action_type?: "
|
|
165
|
+
milestone_type?: "completed" | "create" | "progress" | "milestone" | "problem" | "solution" | "decision" | "review" | "workflow_extracted" | undefined;
|
|
166
|
+
action_type?: "completed" | "create" | "progress" | "milestone" | "problem" | "solution" | "decision" | "review" | "workflow_extracted" | undefined;
|
|
167
167
|
}>;
|
|
168
168
|
export interface ListOperationsToolParams {
|
|
169
169
|
task_id: number;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Task Pre-Complete Tool (Task #5073 — 两阶段验收)
|
|
3
|
+
*
|
|
4
|
+
* 需求(用户 2026-11-06 飞书原话):
|
|
5
|
+
* 「给 subagent 添加一个跟 task_complete 类似的工具,比如
|
|
6
|
+
* task_pre_complete,sub agent 觉得可以完成了就传入交付物等参数,
|
|
7
|
+
* task 状态变为待验证(to_validate),default agent 调用
|
|
8
|
+
* task_complete 校验之后状态正式完成。」
|
|
9
|
+
*
|
|
10
|
+
* 职责边界(沿用 #5007「执行与验收分离」架构):
|
|
11
|
+
* - **执行方(roy sub-agent)**:干完活 → task_pre_complete 提交待验证
|
|
12
|
+
* (status → to_validate + 交付物落 context/operation)
|
|
13
|
+
* - **验收方(default agent)**:task_complete 逐条验收 → completed
|
|
14
|
+
*
|
|
15
|
+
* 与 task_complete 的关系:
|
|
16
|
+
* - 参数同构(deliverable_storage_path),调用体验一致
|
|
17
|
+
* - 语义不同:这里只是「提交待验证」,不是终态 —— 会 fire 一次
|
|
18
|
+
* AFTER_COMPLETE(terminalStatus="to_validate")作为 goal 检查
|
|
19
|
+
* 自查关(design v2 #38603),卡片保持 running 更新态
|
|
20
|
+
*
|
|
21
|
+
* current_status 同步:走 TaskComponent.preCompleteTask →
|
|
22
|
+
* updateTask(withTerminalCurrentStatus 收口模式之外的本层显式文案,
|
|
23
|
+
* 措辞同源锚点 TASK_TO_VALIDATE_STATUS_WORD = 「待验证」,
|
|
24
|
+
* 见 tools/completion-copy.ts —— 与 #5060 的 completed/cancelled 同模式)。
|
|
25
|
+
*/
|
|
26
|
+
import type { Tool } from "../../tool/types";
|
|
27
|
+
import type { TaskComponent } from "../task-component";
|
|
28
|
+
/**
|
|
29
|
+
* task_pre_complete 工具描述(导出便于单测和 reuse)
|
|
30
|
+
*/
|
|
31
|
+
export declare const TASK_PRE_COMPLETE_DESCRIPTION: string;
|
|
32
|
+
export declare function preCompleteTaskTool(taskComponent: TaskComponent): Tool;
|
|
@@ -87,7 +87,7 @@ export type GetTaskToolParams = z.infer<typeof GetTaskToolSchema>;
|
|
|
87
87
|
* task_list tool parameters
|
|
88
88
|
*/
|
|
89
89
|
export declare const ListTasksToolSchema: z.ZodObject<{
|
|
90
|
-
status: z.ZodOptional<z.ZodEnum<["todo", "active", "completed", "paused", "cancelled", "archived"]>>;
|
|
90
|
+
status: z.ZodOptional<z.ZodEnum<["todo", "active", "to_validate", "completed", "paused", "cancelled", "archived"]>>;
|
|
91
91
|
priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
|
|
92
92
|
type: z.ZodOptional<z.ZodEnum<["normal", "cycle", "longterm"]>>;
|
|
93
93
|
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -99,12 +99,12 @@ export declare const ListTasksToolSchema: z.ZodObject<{
|
|
|
99
99
|
offset: number;
|
|
100
100
|
include_archived: boolean;
|
|
101
101
|
type?: "normal" | "cycle" | "longterm" | undefined;
|
|
102
|
-
status?: "todo" | "active" | "completed" | "paused" | "cancelled" | "archived" | undefined;
|
|
102
|
+
status?: "todo" | "active" | "to_validate" | "completed" | "paused" | "cancelled" | "archived" | undefined;
|
|
103
103
|
priority?: "low" | "medium" | "high" | undefined;
|
|
104
104
|
depth?: number | undefined;
|
|
105
105
|
}, {
|
|
106
106
|
type?: "normal" | "cycle" | "longterm" | undefined;
|
|
107
|
-
status?: "todo" | "active" | "completed" | "paused" | "cancelled" | "archived" | undefined;
|
|
107
|
+
status?: "todo" | "active" | "to_validate" | "completed" | "paused" | "cancelled" | "archived" | undefined;
|
|
108
108
|
priority?: "low" | "medium" | "high" | undefined;
|
|
109
109
|
limit?: number | undefined;
|
|
110
110
|
offset?: number | undefined;
|
|
@@ -119,7 +119,7 @@ export declare const SearchTasksToolSchema: z.ZodObject<{
|
|
|
119
119
|
keywords: z.ZodArray<z.ZodString, "many">;
|
|
120
120
|
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
121
121
|
offset: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
122
|
-
status: z.ZodOptional<z.ZodEnum<["todo", "active", "completed", "paused", "cancelled", "archived"]>>;
|
|
122
|
+
status: z.ZodOptional<z.ZodEnum<["todo", "active", "to_validate", "completed", "paused", "cancelled", "archived"]>>;
|
|
123
123
|
priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
|
|
124
124
|
type: z.ZodOptional<z.ZodEnum<["normal", "cycle", "longterm"]>>;
|
|
125
125
|
exclude_task_id: z.ZodOptional<z.ZodNumber>;
|
|
@@ -131,14 +131,14 @@ export declare const SearchTasksToolSchema: z.ZodObject<{
|
|
|
131
131
|
include_archived: boolean;
|
|
132
132
|
keywords: string[];
|
|
133
133
|
type?: "normal" | "cycle" | "longterm" | undefined;
|
|
134
|
-
status?: "todo" | "active" | "completed" | "paused" | "cancelled" | "archived" | undefined;
|
|
134
|
+
status?: "todo" | "active" | "to_validate" | "completed" | "paused" | "cancelled" | "archived" | undefined;
|
|
135
135
|
priority?: "low" | "medium" | "high" | undefined;
|
|
136
136
|
depth?: number | undefined;
|
|
137
137
|
exclude_task_id?: number | undefined;
|
|
138
138
|
}, {
|
|
139
139
|
keywords: string[];
|
|
140
140
|
type?: "normal" | "cycle" | "longterm" | undefined;
|
|
141
|
-
status?: "todo" | "active" | "completed" | "paused" | "cancelled" | "archived" | undefined;
|
|
141
|
+
status?: "todo" | "active" | "to_validate" | "completed" | "paused" | "cancelled" | "archived" | undefined;
|
|
142
142
|
priority?: "low" | "medium" | "high" | undefined;
|
|
143
143
|
limit?: number | undefined;
|
|
144
144
|
offset?: number | undefined;
|
|
@@ -155,7 +155,7 @@ export declare const UpdateTaskToolSchema: z.ZodEffects<z.ZodObject<{
|
|
|
155
155
|
} & {
|
|
156
156
|
title: z.ZodOptional<z.ZodString>;
|
|
157
157
|
description: z.ZodOptional<z.ZodString>;
|
|
158
|
-
status: z.ZodOptional<z.ZodEnum<["todo", "active", "completed", "paused", "cancelled", "archived"]>>;
|
|
158
|
+
status: z.ZodOptional<z.ZodEnum<["todo", "active", "to_validate", "completed", "paused", "cancelled", "archived"]>>;
|
|
159
159
|
priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
|
|
160
160
|
type: z.ZodOptional<z.ZodEnum<["normal", "cycle", "longterm"]>>;
|
|
161
161
|
progress: z.ZodOptional<z.ZodNumber>;
|
|
@@ -169,7 +169,7 @@ export declare const UpdateTaskToolSchema: z.ZodEffects<z.ZodObject<{
|
|
|
169
169
|
}, "strip", z.ZodTypeAny, {
|
|
170
170
|
task_id: number;
|
|
171
171
|
type?: "normal" | "cycle" | "longterm" | undefined;
|
|
172
|
-
status?: "todo" | "active" | "completed" | "paused" | "cancelled" | "archived" | undefined;
|
|
172
|
+
status?: "todo" | "active" | "to_validate" | "completed" | "paused" | "cancelled" | "archived" | undefined;
|
|
173
173
|
tags?: string[] | undefined;
|
|
174
174
|
description?: string | undefined;
|
|
175
175
|
progress?: number | undefined;
|
|
@@ -184,7 +184,7 @@ export declare const UpdateTaskToolSchema: z.ZodEffects<z.ZodObject<{
|
|
|
184
184
|
}, {
|
|
185
185
|
task_id: number;
|
|
186
186
|
type?: "normal" | "cycle" | "longterm" | undefined;
|
|
187
|
-
status?: "todo" | "active" | "completed" | "paused" | "cancelled" | "archived" | undefined;
|
|
187
|
+
status?: "todo" | "active" | "to_validate" | "completed" | "paused" | "cancelled" | "archived" | undefined;
|
|
188
188
|
tags?: string[] | undefined;
|
|
189
189
|
description?: string | undefined;
|
|
190
190
|
progress?: number | undefined;
|
|
@@ -199,7 +199,7 @@ export declare const UpdateTaskToolSchema: z.ZodEffects<z.ZodObject<{
|
|
|
199
199
|
}>, {
|
|
200
200
|
task_id: number;
|
|
201
201
|
type?: "normal" | "cycle" | "longterm" | undefined;
|
|
202
|
-
status?: "todo" | "active" | "completed" | "paused" | "cancelled" | "archived" | undefined;
|
|
202
|
+
status?: "todo" | "active" | "to_validate" | "completed" | "paused" | "cancelled" | "archived" | undefined;
|
|
203
203
|
tags?: string[] | undefined;
|
|
204
204
|
description?: string | undefined;
|
|
205
205
|
progress?: number | undefined;
|
|
@@ -228,26 +228,58 @@ export type DeleteTaskToolParams = z.infer<typeof DeleteTaskToolSchema>;
|
|
|
228
228
|
* task_complete tool parameters
|
|
229
229
|
*
|
|
230
230
|
* Task #2778: 新增 deliverable_storage_path 参数。
|
|
231
|
-
*
|
|
231
|
+
* Task #5073 设计调整① — task_complete 精简为**纯验收动作**:
|
|
232
232
|
*
|
|
233
|
-
*
|
|
234
|
-
*
|
|
233
|
+
* deliverable_storage_path 入参已删除(用户 2026-11-06 明令)。
|
|
234
|
+
* 交付物在 pre_complete 阶段(task_pre_complete)提交落库
|
|
235
|
+
* (task.context.deliverable_storage_path + operation Deliverable 行),
|
|
236
|
+
* task_complete 只做状态修改验收:逐条核对 goals 子项后
|
|
237
|
+
* 把 to_validate → completed(TASK_COMPLETION_TERMINAL)。
|
|
238
|
+
*
|
|
239
|
+
* ⚠️ 交付物通道 = task_pre_complete,验收通道 = task_complete ——
|
|
240
|
+
* 两者职责分离后,交付物参数不该再出现在 complete 的 schema 里。
|
|
241
|
+
*
|
|
242
|
+
* 兼容性:unknown-key 被 zod 静默剥离(withLegacyTaskId 的 object
|
|
243
|
+
* 不含 additionalProperties:false)→ 老调用方传了 deliverable 也
|
|
244
|
+
* 不报错,只是不再被读取。CLI / TaskStoreBackend(MCP 通道)的
|
|
245
|
+
* completeTask(deliverable) 底层签名保留(#5060 修复链不破坏)。
|
|
235
246
|
*/
|
|
236
247
|
export declare const CompleteTaskToolSchema: z.ZodEffects<z.ZodObject<{
|
|
237
248
|
task_id: z.ZodNumber;
|
|
249
|
+
}, "strip", z.ZodTypeAny, {
|
|
250
|
+
task_id: number;
|
|
251
|
+
}, {
|
|
252
|
+
task_id: number;
|
|
253
|
+
}>, {
|
|
254
|
+
task_id: number;
|
|
255
|
+
}, unknown>;
|
|
256
|
+
export type CompleteTaskToolParams = z.infer<typeof CompleteTaskToolSchema>;
|
|
257
|
+
/**
|
|
258
|
+
* task_pre_complete tool parameters (Task #5073 — 两阶段验收)
|
|
259
|
+
*
|
|
260
|
+
* sub-agent 交付时调用:把任务置为 to_validate(待验证),
|
|
261
|
+
* 交付物参数与 task_complete 完全同构(deliverable_storage_path),
|
|
262
|
+
* 让执行方「提交待验证」的调用体验与验收方「落终态」一致。
|
|
263
|
+
*/
|
|
264
|
+
export declare const PreCompleteTaskToolSchema: z.ZodEffects<z.ZodObject<{
|
|
265
|
+
task_id: z.ZodNumber;
|
|
238
266
|
} & {
|
|
239
267
|
deliverable_storage_path: z.ZodOptional<z.ZodString>;
|
|
268
|
+
current_status: z.ZodOptional<z.ZodString>;
|
|
240
269
|
}, "strip", z.ZodTypeAny, {
|
|
241
270
|
task_id: number;
|
|
271
|
+
current_status?: string | undefined;
|
|
242
272
|
deliverable_storage_path?: string | undefined;
|
|
243
273
|
}, {
|
|
244
274
|
task_id: number;
|
|
275
|
+
current_status?: string | undefined;
|
|
245
276
|
deliverable_storage_path?: string | undefined;
|
|
246
277
|
}>, {
|
|
247
278
|
task_id: number;
|
|
279
|
+
current_status?: string | undefined;
|
|
248
280
|
deliverable_storage_path?: string | undefined;
|
|
249
281
|
}, unknown>;
|
|
250
|
-
export type
|
|
282
|
+
export type PreCompleteTaskToolParams = z.infer<typeof PreCompleteTaskToolSchema>;
|
|
251
283
|
/**
|
|
252
284
|
* task_cancel tool parameters (Task #5007)
|
|
253
285
|
*
|
|
@@ -304,7 +336,7 @@ export type BatchDeleteToolParams = z.infer<typeof BatchDeleteToolSchema>;
|
|
|
304
336
|
export declare const TreeTasksToolSchema: z.ZodObject<{
|
|
305
337
|
depth: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
306
338
|
parent_task_id: z.ZodOptional<z.ZodNumber>;
|
|
307
|
-
status: z.ZodOptional<z.ZodEnum<["todo", "active", "completed", "paused", "cancelled", "archived"]>>;
|
|
339
|
+
status: z.ZodOptional<z.ZodEnum<["todo", "active", "to_validate", "completed", "paused", "cancelled", "archived"]>>;
|
|
308
340
|
priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
|
|
309
341
|
type: z.ZodOptional<z.ZodEnum<["normal", "cycle", "longterm"]>>;
|
|
310
342
|
include_archived: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -312,12 +344,12 @@ export declare const TreeTasksToolSchema: z.ZodObject<{
|
|
|
312
344
|
depth: number;
|
|
313
345
|
include_archived: boolean;
|
|
314
346
|
type?: "normal" | "cycle" | "longterm" | undefined;
|
|
315
|
-
status?: "todo" | "active" | "completed" | "paused" | "cancelled" | "archived" | undefined;
|
|
347
|
+
status?: "todo" | "active" | "to_validate" | "completed" | "paused" | "cancelled" | "archived" | undefined;
|
|
316
348
|
priority?: "low" | "medium" | "high" | undefined;
|
|
317
349
|
parent_task_id?: number | undefined;
|
|
318
350
|
}, {
|
|
319
351
|
type?: "normal" | "cycle" | "longterm" | undefined;
|
|
320
|
-
status?: "todo" | "active" | "completed" | "paused" | "cancelled" | "archived" | undefined;
|
|
352
|
+
status?: "todo" | "active" | "to_validate" | "completed" | "paused" | "cancelled" | "archived" | undefined;
|
|
321
353
|
priority?: "low" | "medium" | "high" | undefined;
|
|
322
354
|
parent_task_id?: number | undefined;
|
|
323
355
|
depth?: number | undefined;
|
package/dist/env/task/types.d.ts
CHANGED
|
@@ -4,8 +4,20 @@
|
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
/**
|
|
6
6
|
* Task status enum
|
|
7
|
+
*
|
|
8
|
+
* ★ Task #5073 — 新增 `to_validate`(待验证)。
|
|
9
|
+
*
|
|
10
|
+
* 两阶段验收(#5007 的机制化落地):
|
|
11
|
+
* sub-agent 干完 → task_pre_complete → status=to_validate(待验证)
|
|
12
|
+
* default agent → task_complete → status=completed(正式完成)
|
|
13
|
+
*
|
|
14
|
+
* ⚠️ 其余 6 个旧状态(todo/active/completed/paused/cancelled/archived)
|
|
15
|
+
* **全部保留** —— 存量库有 paused/cancelled/archived 记录,
|
|
16
|
+
* 不做状态迁移、不删任何旧值(用户 2026-11-06 明令修正)。
|
|
17
|
+
* to_validate 是唯一的**新增**状态,是「非终态」(可被 task_complete
|
|
18
|
+
* 落成 completed,也可被 reopen 回 active)。
|
|
7
19
|
*/
|
|
8
|
-
export declare const TaskStatusEnum: z.ZodEnum<["todo", "active", "completed", "paused", "cancelled", "archived"]>;
|
|
20
|
+
export declare const TaskStatusEnum: z.ZodEnum<["todo", "active", "to_validate", "completed", "paused", "cancelled", "archived"]>;
|
|
9
21
|
export type TaskStatus = z.infer<typeof TaskStatusEnum>;
|
|
10
22
|
/**
|
|
11
23
|
* Task priority enum
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LarkCliWorkflowNotifyHook,
|
|
3
3
|
createLarkCliWorkflowNotifyHook
|
|
4
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
5
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
4
|
+
} from "../../../shared/@ai-setting/roy-agent-core-hd3n57zs.js";
|
|
5
|
+
import"../../../shared/@ai-setting/roy-agent-core-w0qjeq2v.js";
|
|
6
6
|
import"../../../shared/@ai-setting/roy-agent-core-c2gbt68e.js";
|
|
7
7
|
import"../../../shared/@ai-setting/roy-agent-core-ax9e9szb.js";
|
|
8
8
|
import"../../../shared/@ai-setting/roy-agent-core-cpcd24n2.js";
|
|
@@ -206,17 +206,17 @@ export declare const NodeProgressEventSchema: z.ZodObject<{
|
|
|
206
206
|
message: z.ZodOptional<z.ZodString>;
|
|
207
207
|
}, "strip", z.ZodTypeAny, {
|
|
208
208
|
type: "node.progress";
|
|
209
|
+
progress: number;
|
|
209
210
|
run_id: string;
|
|
210
211
|
timestamp: number;
|
|
211
212
|
node_id: string;
|
|
212
|
-
progress: number;
|
|
213
213
|
message?: string | undefined;
|
|
214
214
|
}, {
|
|
215
215
|
type: "node.progress";
|
|
216
|
+
progress: number;
|
|
216
217
|
run_id: string;
|
|
217
218
|
timestamp: number;
|
|
218
219
|
node_id: string;
|
|
219
|
-
progress: number;
|
|
220
220
|
message?: string | undefined;
|
|
221
221
|
}>;
|
|
222
222
|
export declare const NodeCompletedEventSchema: z.ZodObject<{
|
|
@@ -632,17 +632,17 @@ export declare const WorkflowEventSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
632
632
|
message: z.ZodOptional<z.ZodString>;
|
|
633
633
|
}, "strip", z.ZodTypeAny, {
|
|
634
634
|
type: "node.progress";
|
|
635
|
+
progress: number;
|
|
635
636
|
run_id: string;
|
|
636
637
|
timestamp: number;
|
|
637
638
|
node_id: string;
|
|
638
|
-
progress: number;
|
|
639
639
|
message?: string | undefined;
|
|
640
640
|
}, {
|
|
641
641
|
type: "node.progress";
|
|
642
|
+
progress: number;
|
|
642
643
|
run_id: string;
|
|
643
644
|
timestamp: number;
|
|
644
645
|
node_id: string;
|
|
645
|
-
progress: number;
|
|
646
646
|
message?: string | undefined;
|
|
647
647
|
}>, z.ZodObject<{
|
|
648
648
|
run_id: z.ZodString;
|