@ai-setting/roy-agent-core 1.7.53 → 1.7.56
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/config/index.js +7 -7
- package/dist/env/agent/agent-component.d.ts +30 -0
- package/dist/env/agent/index.js +13 -12
- package/dist/env/commands/index.js +7 -7
- package/dist/env/context/index.js +3 -3
- package/dist/env/debug/index.js +7 -7
- package/dist/env/environment.d.ts +7 -0
- package/dist/env/error-reply.d.ts +184 -0
- package/dist/env/event-source/event-source-handlers.d.ts +9 -23
- package/dist/env/event-source/index.js +17 -17
- package/dist/env/hook/index.js +5 -5
- package/dist/env/index.js +41 -40
- package/dist/env/llm/adapter-ai-sdk.d.ts +6 -0
- package/dist/env/llm/adapter-pi-ai.d.ts +152 -2
- package/dist/env/llm/adapter.d.ts +21 -1
- package/dist/env/llm/index.js +10 -10
- package/dist/env/llm/invoke.d.ts +74 -2
- package/dist/env/llm/llm.d.ts +38 -0
- package/dist/env/llm/outbound-defense.d.ts +140 -0
- package/dist/env/llm/reasoning-defense.d.ts +104 -0
- package/dist/env/llm/types.d.ts +26 -0
- package/dist/env/log-trace/decorator.d.ts +46 -3
- package/dist/env/log-trace/index.d.ts +1 -0
- package/dist/env/log-trace/index.js +33 -7
- package/dist/env/log-trace/trace-filters.d.ts +127 -0
- package/dist/env/mcp/index.js +7 -7
- package/dist/env/memory/index.js +7 -7
- package/dist/env/plugin/index.js +7 -7
- package/dist/env/prompt/index.js +8 -8
- package/dist/env/prompt/prompts-index.d.ts +1 -1
- package/dist/env/session/index.js +11 -10
- package/dist/env/session/session-component.d.ts +4 -0
- package/dist/env/session/storage/index.js +5 -3
- package/dist/env/skill/index.js +7 -7
- package/dist/env/task/backend/index.js +0 -2
- package/dist/env/task/backend/types.d.ts +0 -11
- package/dist/env/task/delegate/index.js +8 -8
- package/dist/env/task/index.js +13 -13
- package/dist/env/task/plugins/card-chat-routing.d.ts +42 -89
- package/dist/env/task/plugins/index.js +10 -10
- package/dist/env/task/plugins/lark-card-patch-notifier.d.ts +0 -51
- package/dist/env/task/plugins/lark-cli-task-notify-plugin.d.ts +14 -31
- package/dist/env/task/plugins/per-task-group-chat-plugin.d.ts +4 -4
- package/dist/env/task/storage/index.js +2 -2
- package/dist/env/task/tools/index.js +3 -3
- package/dist/env/tool/built-in/index.js +3 -3
- package/dist/env/tool/index.js +9 -9
- package/dist/env/workflow/engine/engine.d.ts +65 -0
- package/dist/env/workflow/engine/index.js +12 -12
- package/dist/env/workflow/hooks/index.js +7 -7
- package/dist/env/workflow/index.js +23 -22
- package/dist/env/workflow/nodes/index.js +2 -2
- package/dist/env/workflow/nodes/tool-node.d.ts +6 -0
- package/dist/env/workflow/plugins/index.js +8 -8
- package/dist/env/workflow/service/index.js +2 -2
- package/dist/env/workflow/storage/index.js +3 -3
- package/dist/env/workflow/tools/index.js +15 -14
- package/dist/env/workflow/tools/workflow-validate-tool.d.ts +11 -2
- package/dist/env/workflow/types/run.d.ts +19 -0
- package/dist/env/workflow/utils/agent-session-metadata.d.ts +13 -0
- package/dist/env/workflow/utils/index.js +5 -5
- package/dist/env/workflow/utils/redact-command-secrets.d.ts +70 -0
- package/dist/env/workflow/utils/shell-dialect-lint.d.ts +75 -0
- package/dist/env/workflow/utils/validate-workflow-definition.d.ts +22 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +82 -56
- package/dist/shared/@ai-setting/{roy-agent-core-k25gv86p.js → roy-agent-core-0b3fdnn3.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-vvxb9522.js → roy-agent-core-0bmk44ye.js} +71 -10
- package/dist/shared/@ai-setting/{roy-agent-core-k8b440n3.js → roy-agent-core-16t0zfbk.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-4z3rq5gw.js → roy-agent-core-1pnfkspm.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-na73mym1.js → roy-agent-core-202v00x4.js} +213 -2
- package/dist/shared/@ai-setting/{roy-agent-core-ph5qbqcx.js → roy-agent-core-2044fbsd.js} +471 -134
- package/dist/shared/@ai-setting/{roy-agent-core-fs36xgcs.js → roy-agent-core-3dkzqqsd.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-qm9jda8p.js → roy-agent-core-3kz6934b.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-tjg71zqp.js → roy-agent-core-3mc6vmvj.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-tdbv7ff4.js → roy-agent-core-40xzbjtm.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-athdr2m0.js → roy-agent-core-4zy2v3br.js} +10 -2
- package/dist/shared/@ai-setting/{roy-agent-core-t37wbysj.js → roy-agent-core-5gw6w424.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-978b6wfx.js → roy-agent-core-5psjwd08.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-7evvpfwc.js → roy-agent-core-5rxs0ra3.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-gdsqp6j8.js → roy-agent-core-6masakz4.js} +45 -0
- package/dist/shared/@ai-setting/{roy-agent-core-stnddvx9.js → roy-agent-core-6qgq7h1g.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-6167phd4.js → roy-agent-core-833t16n1.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-2k4xffaa.js → roy-agent-core-8cgtwytv.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-rx16h2m1.js → roy-agent-core-97eyghsp.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-fvs48d38.js → roy-agent-core-98aa9r0x.js} +12 -7
- package/dist/shared/@ai-setting/{roy-agent-core-3tv1q6f2.js → roy-agent-core-9nv586rw.js} +57 -19
- package/dist/shared/@ai-setting/roy-agent-core-b599jgyd.js +578 -0
- package/dist/shared/@ai-setting/{roy-agent-core-yd21n6c7.js → roy-agent-core-bwzy00t2.js} +12 -5
- package/dist/shared/@ai-setting/{roy-agent-core-dwx9hjwx.js → roy-agent-core-c6at31ra.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-1cv9j4dg.js → roy-agent-core-d14h726p.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-4sx6sdb2.js → roy-agent-core-d4jpn06f.js} +22 -9
- package/dist/shared/@ai-setting/{roy-agent-core-39xejr39.js → roy-agent-core-e0wbq0qq.js} +7 -7
- package/dist/shared/@ai-setting/{roy-agent-core-vrsxhw9e.js → roy-agent-core-e677am8e.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-hch2geta.js → roy-agent-core-ezsyyjxw.js} +21 -190
- package/dist/shared/@ai-setting/{roy-agent-core-ne2t1pay.js → roy-agent-core-f8sp1txg.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-ak4dc3kg.js → roy-agent-core-gn8f4rhs.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-qcspfszy.js → roy-agent-core-gngjkw3b.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-9jzysq50.js → roy-agent-core-heft3j4c.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-5apmk4qw.js → roy-agent-core-jszgaevt.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-nde5gzta.js → roy-agent-core-m8n0dffe.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-x8n1r7h4.js → roy-agent-core-n3b7ztms.js} +189 -8
- package/dist/shared/@ai-setting/{roy-agent-core-4vpk40ss.js → roy-agent-core-nhk0dsxr.js} +13 -13
- package/dist/shared/@ai-setting/{roy-agent-core-j8e92gj8.js → roy-agent-core-nntphgww.js} +1 -60
- package/dist/shared/@ai-setting/{roy-agent-core-8s9jd2qy.js → roy-agent-core-nra8vfrs.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-pk1b3kvf.js → roy-agent-core-ns3pbyz4.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-7g03zkkb.js → roy-agent-core-pemxr5n4.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-skzjs973.js → roy-agent-core-pjxa78mp.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-p8ak03s0.js → roy-agent-core-q7zksbw0.js} +117 -315
- package/dist/shared/@ai-setting/{roy-agent-core-zd3ddm4k.js → roy-agent-core-qjjf4tjb.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-qamktze3.js → roy-agent-core-qyqnmz8c.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-9csa89jx.js → roy-agent-core-r9qe0ghe.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-h93v6p6y.js → roy-agent-core-tc7gw38m.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-35s1w7tc.js → roy-agent-core-v2188rnk.js} +157 -85
- package/dist/shared/@ai-setting/{roy-agent-core-p2r27era.js → roy-agent-core-vmg30n5x.js} +8 -8
- package/dist/shared/@ai-setting/{roy-agent-core-rnwr39b0.js → roy-agent-core-w7hnjhvx.js} +5 -3
- package/dist/shared/@ai-setting/{roy-agent-core-dv714bqh.js → roy-agent-core-wafk25ff.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-brwzs8wf.js → roy-agent-core-xcq04fq0.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-2gay3sjt.js → roy-agent-core-yg247mk4.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-zy3hqfwg.js → roy-agent-core-yv9x4wmg.js} +631 -35
- package/dist/shared/@ai-setting/{roy-agent-core-yhsssn86.js → roy-agent-core-zmeka63k.js} +1 -1
- package/dist/test-utils/child-process-mock.d.ts +73 -0
- package/package.json +2 -2
- package/dist/shared/@ai-setting/roy-agent-core-dsevjbck.js +0 -245
|
@@ -23,10 +23,8 @@
|
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
25
|
import type { Hook, HookContext } from "../../hook/types";
|
|
26
|
-
import type { Task } from "../types";
|
|
27
26
|
import { getEnvContextOrEmpty } from "../../context";
|
|
28
27
|
import { LarkCardPatchNotifier } from "./lark-card-patch-notifier";
|
|
29
|
-
import { type ChatOwnership } from "./card-chat-routing";
|
|
30
28
|
/**
|
|
31
29
|
* 从 EnvContext 提取 lark 专属字段
|
|
32
30
|
*
|
|
@@ -82,16 +80,6 @@ export interface TaskNotifyConfig {
|
|
|
82
80
|
* 不传 → plugin 自己 new 一个(messageId 由 plugin 的 Map 跟踪)。
|
|
83
81
|
*/
|
|
84
82
|
cardNotifier?: LarkCardPatchNotifier;
|
|
85
|
-
/**
|
|
86
|
-
* ★ Task #4331:是否允许路由决策走"new-group"路径(建专属群)
|
|
87
|
-
*
|
|
88
|
-
* 默认 false:触发群是别人的群 + 本 task 无群时,**不**建专属群,退回触发群
|
|
89
|
-
* 适用:默认行为(用户新要求:默认不建群)
|
|
90
|
-
*
|
|
91
|
-
* 设为 true:保留 #4230 老行为(建专属群并改投)
|
|
92
|
-
* 适用:显式开启(向后兼容)
|
|
93
|
-
*/
|
|
94
|
-
allowNewGroup?: boolean;
|
|
95
83
|
}
|
|
96
84
|
/**
|
|
97
85
|
* 卡片路由端口(Task #4230 follow-up)
|
|
@@ -101,25 +89,16 @@ export interface TaskNotifyConfig {
|
|
|
101
89
|
*/
|
|
102
90
|
export interface CardRoutingPorts {
|
|
103
91
|
/**
|
|
104
|
-
*
|
|
92
|
+
* task 查询(lineage 上溯:无触发群时找本 task / 祖先的专属群兜底)
|
|
105
93
|
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
* -
|
|
109
|
-
* - 群名 "Task 3999" / "#3999"(DB 记录的群名,必要时实时查)
|
|
94
|
+
* ★ Task #4394:`lookupChatOwnership` / `ensureTaskGroupChat` 两个端口已删除
|
|
95
|
+
* —— 卡片不再做"触发群是不是别 task 专属群"的判定,也不再自动建群。
|
|
96
|
+
* 建群改由用户在卡片上点「为这个任务建群」按钮触发(见 lark-card-action-handler.ts)。
|
|
110
97
|
*/
|
|
111
|
-
lookupChatOwnership?: (chatId: string) => Promise<ChatOwnership | undefined>;
|
|
112
|
-
/** task 查询(lineage 上溯) */
|
|
113
98
|
getTask?: (id: number) => Promise<{
|
|
114
99
|
context?: string;
|
|
115
100
|
parent_task_id?: number | null;
|
|
116
101
|
} | undefined>;
|
|
117
|
-
/** 为 task 建/取专属群(lineage 无群且触发群是别人的群时用) */
|
|
118
|
-
ensureTaskGroupChat?: (task: Task) => Promise<{
|
|
119
|
-
chatId: string;
|
|
120
|
-
profile?: string;
|
|
121
|
-
name?: string;
|
|
122
|
-
} | undefined>;
|
|
123
102
|
}
|
|
124
103
|
export declare class LarkCliTaskNotifyHook implements Hook {
|
|
125
104
|
readonly name: string;
|
|
@@ -156,8 +135,8 @@ export declare class LarkCliTaskNotifyHook implements Hook {
|
|
|
156
135
|
*
|
|
157
136
|
* 根因:`sendCardStart` 里 `ensureTaskGroupChat` 会写 task.context → 同步触发
|
|
158
137
|
* `task:after.update` → 本 hook 重入 `sendCardUpdate`;此时首卡 messageId 还没写进
|
|
159
|
-
* `cardMessageIds` → 触发 fallback
|
|
160
|
-
*
|
|
138
|
+
* `cardMessageIds` → 触发 fallback 补一张重复卡(同一 task 多张卡)。
|
|
139
|
+
* (Task #4394 已删除"再发一张改投卡片"那条路径,哨兵仍用于防重复补卡。)
|
|
161
140
|
*
|
|
162
141
|
* 修法:进入 `sendCardStart` 前先占位;重入的 update 看到哨兵直接跳过。
|
|
163
142
|
*/
|
|
@@ -189,16 +168,20 @@ export declare class LarkCliTaskNotifyHook implements Hook {
|
|
|
189
168
|
/**
|
|
190
169
|
* 解析「卡片该发到哪个群」(Task #4230 follow-up)
|
|
191
170
|
*
|
|
192
|
-
* 规则见 card-chat-routing.ts
|
|
193
|
-
*
|
|
171
|
+
* 规则见 card-chat-routing.ts(Task #4394 简化版):
|
|
172
|
+
* - **有触发群 → 就用触发群**(无条件,不改投)
|
|
173
|
+
* - 没有触发群 → 用本 task(或祖先)已有的专属群兜底
|
|
174
|
+
* - 都没有 → none(caller skip)
|
|
175
|
+
*
|
|
176
|
+
* 已经不再"自动建群"——建群由用户在卡片上点按钮触发。
|
|
194
177
|
*
|
|
195
|
-
* @returns decision
|
|
178
|
+
* @returns decision(chatId / profile / source / reason)
|
|
196
179
|
*/
|
|
197
180
|
private resolveCardTarget;
|
|
198
181
|
/**
|
|
199
182
|
* 收集 task 的 lineage(自己 → 父 → 祖父…,最多 10 层)
|
|
200
183
|
*
|
|
201
|
-
*
|
|
184
|
+
* 用于:无触发群时找最近的专属群兜底(Task #4394:不再用于"是否别人的群"判定)。
|
|
202
185
|
*/
|
|
203
186
|
private collectLineage;
|
|
204
187
|
/** 发初始卡片(+ pin)并缓存 messageId */
|
|
@@ -193,10 +193,10 @@ export interface PerTaskGroupConfig {
|
|
|
193
193
|
* - 用户在卡片顶部点"为这个任务建群"按钮 → 走 ensureGroupChat 按需建群
|
|
194
194
|
* - 适用:减少群聊爆炸 / 集中讨论 / 减少噪音
|
|
195
195
|
*
|
|
196
|
-
* ★
|
|
197
|
-
* -
|
|
198
|
-
*
|
|
199
|
-
*
|
|
196
|
+
* ★ Task #4394:`LarkCliTaskNotifyPlugin.cardRoutingPorts.ensureTaskGroupChat`
|
|
197
|
+
* 及其 `new-group` / `fallback-to-trigger` 两条 source 已删除 —— 卡片路由
|
|
198
|
+
* **不再自动建群**,`ensureGroupChat` 现在只剩一个调用方:用户点卡片上
|
|
199
|
+
* 「为这个任务建群」按钮(见 lark-card-action-handler.ts)。
|
|
200
200
|
*/
|
|
201
201
|
autoCreateGroup?: boolean;
|
|
202
202
|
/**
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
SQLiteTaskStore,
|
|
3
3
|
getDefaultDataDir,
|
|
4
4
|
getDefaultTaskDbPath
|
|
5
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
6
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
5
|
+
} from "../../../shared/@ai-setting/roy-agent-core-3kz6934b.js";
|
|
6
|
+
import"../../../shared/@ai-setting/roy-agent-core-b599jgyd.js";
|
|
7
7
|
import"../../../shared/@ai-setting/roy-agent-core-8seq65bp.js";
|
|
8
8
|
import"../../../shared/@ai-setting/roy-agent-core-jnszp0jq.js";
|
|
9
9
|
import"../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
searchTasksTool,
|
|
10
10
|
treeTasksTool,
|
|
11
11
|
updateTaskTool
|
|
12
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
13
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
14
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
12
|
+
} from "../../../shared/@ai-setting/roy-agent-core-pemxr5n4.js";
|
|
13
|
+
import"../../../shared/@ai-setting/roy-agent-core-jszgaevt.js";
|
|
14
|
+
import"../../../shared/@ai-setting/roy-agent-core-b599jgyd.js";
|
|
15
15
|
import"../../../shared/@ai-setting/roy-agent-core-8seq65bp.js";
|
|
16
16
|
import"../../../shared/@ai-setting/roy-agent-core-jnszp0jq.js";
|
|
17
17
|
import"../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
@@ -8,20 +8,20 @@ import {
|
|
|
8
8
|
grepTool,
|
|
9
9
|
readFileTool,
|
|
10
10
|
writeFileTool
|
|
11
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
11
|
+
} from "../../../shared/@ai-setting/roy-agent-core-4zy2v3br.js";
|
|
12
12
|
import {
|
|
13
13
|
getUnderstandImageLLMProvider,
|
|
14
14
|
resetUnderstandImageLLMProvider,
|
|
15
15
|
setUnderstandImageLLMProvider,
|
|
16
16
|
understandImageTool
|
|
17
17
|
} from "../../../shared/@ai-setting/roy-agent-core-xwm8zavb.js";
|
|
18
|
-
import"../../../shared/@ai-setting/roy-agent-core-zjdzk1gg.js";
|
|
19
18
|
import {
|
|
20
19
|
createQueryBackgroundProcessTool,
|
|
21
20
|
queryBackgroundProcessTool
|
|
22
21
|
} from "../../../shared/@ai-setting/roy-agent-core-amkqnyzy.js";
|
|
23
22
|
import"../../../shared/@ai-setting/roy-agent-core-tbrn9wdm.js";
|
|
24
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
23
|
+
import"../../../shared/@ai-setting/roy-agent-core-zjdzk1gg.js";
|
|
24
|
+
import"../../../shared/@ai-setting/roy-agent-core-b599jgyd.js";
|
|
25
25
|
import"../../../shared/@ai-setting/roy-agent-core-8seq65bp.js";
|
|
26
26
|
import"../../../shared/@ai-setting/roy-agent-core-jnszp0jq.js";
|
|
27
27
|
import"../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
package/dist/env/tool/index.js
CHANGED
|
@@ -9,14 +9,13 @@ import {
|
|
|
9
9
|
grepTool,
|
|
10
10
|
readFileTool,
|
|
11
11
|
writeFileTool
|
|
12
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
12
|
+
} from "../../shared/@ai-setting/roy-agent-core-4zy2v3br.js";
|
|
13
13
|
import {
|
|
14
14
|
getUnderstandImageLLMProvider,
|
|
15
15
|
resetUnderstandImageLLMProvider,
|
|
16
16
|
setUnderstandImageLLMProvider,
|
|
17
17
|
understandImageTool
|
|
18
18
|
} from "../../shared/@ai-setting/roy-agent-core-xwm8zavb.js";
|
|
19
|
-
import"../../shared/@ai-setting/roy-agent-core-zjdzk1gg.js";
|
|
20
19
|
import"../../shared/@ai-setting/roy-agent-core-amkqnyzy.js";
|
|
21
20
|
import"../../shared/@ai-setting/roy-agent-core-tbrn9wdm.js";
|
|
22
21
|
import {
|
|
@@ -25,16 +24,17 @@ import {
|
|
|
25
24
|
ToolValidator,
|
|
26
25
|
getMaxOutputSize,
|
|
27
26
|
setToolConfigComponent
|
|
28
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
27
|
+
} from "../../shared/@ai-setting/roy-agent-core-98aa9r0x.js";
|
|
29
28
|
import"../../shared/@ai-setting/roy-agent-core-kzg1jwt8.js";
|
|
29
|
+
import"../../shared/@ai-setting/roy-agent-core-zjdzk1gg.js";
|
|
30
30
|
import"../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
31
31
|
import"../../shared/@ai-setting/roy-agent-core-7hh0brvs.js";
|
|
32
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
33
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
34
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
35
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
36
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
37
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
32
|
+
import"../../shared/@ai-setting/roy-agent-core-40xzbjtm.js";
|
|
33
|
+
import"../../shared/@ai-setting/roy-agent-core-gngjkw3b.js";
|
|
34
|
+
import"../../shared/@ai-setting/roy-agent-core-1pnfkspm.js";
|
|
35
|
+
import"../../shared/@ai-setting/roy-agent-core-16t0zfbk.js";
|
|
36
|
+
import"../../shared/@ai-setting/roy-agent-core-jszgaevt.js";
|
|
37
|
+
import"../../shared/@ai-setting/roy-agent-core-b599jgyd.js";
|
|
38
38
|
import"../../shared/@ai-setting/roy-agent-core-8seq65bp.js";
|
|
39
39
|
import"../../shared/@ai-setting/roy-agent-core-jnszp0jq.js";
|
|
40
40
|
import"../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
@@ -217,12 +217,61 @@ export declare class WorkflowEngine extends EventEmitter {
|
|
|
217
217
|
* Main scheduling loop
|
|
218
218
|
*/
|
|
219
219
|
private scheduleAndExecute;
|
|
220
|
+
/**
|
|
221
|
+
* Dispatch a node without waiting for it to finish (Task #4392 P0-1).
|
|
222
|
+
*
|
|
223
|
+
* Registers the node's promise in `sessionState.inFlight` **synchronously**
|
|
224
|
+
* so the scheduler loop can (a) join it and (b) never mistake "no tracked
|
|
225
|
+
* work" for "done". The returned promise is intentionally swallowed: node
|
|
226
|
+
* outcomes propagate through `scheduler.markFailed` and the `node.failed`
|
|
227
|
+
* event, exactly as they did when the dispatch path awaited them.
|
|
228
|
+
*
|
|
229
|
+
* ## Claim guard — why this is not just "call startNode"
|
|
230
|
+
*
|
|
231
|
+
* A node can be reachable from **two** dispatch paths:
|
|
232
|
+
* 1. `scheduleAvailableNodes()` → `scheduler.getReadyNodes()` (DAG readiness)
|
|
233
|
+
* 2. `processConditionalEdgesAfterCompletion()` → `edgeResult.toStart`
|
|
234
|
+
*
|
|
235
|
+
* Under the old serial loop this never mattered: path 2 awaited each target
|
|
236
|
+
* to completion, so path 1 always found them `completed` already. Once
|
|
237
|
+
* dispatch became concurrent the two paths race and the *same* node was
|
|
238
|
+
* executed twice (proven by `engine-parallel-scheduling.test.ts`:
|
|
239
|
+
* `parallelLimit=2` produced peak concurrency 3 with 4 of 6 leaves run twice).
|
|
240
|
+
*
|
|
241
|
+
* `scheduler.running` is the tie-breaker. `startNode` calls
|
|
242
|
+
* `scheduler.markStarted()` before its first `await`, so the claim is visible
|
|
243
|
+
* synchronously to the next dispatcher on the same tick — no interleaving
|
|
244
|
+
* window. Returns `true` only for the caller that actually won the claim.
|
|
245
|
+
*
|
|
246
|
+
* ⚠️ The guard deliberately keys off `scheduler.running` and **not** off
|
|
247
|
+
* `inFlight`, even though both look equivalent. A self-loop back-edge
|
|
248
|
+
* (`implement → implement`) re-dispatches the node *from inside its own
|
|
249
|
+
* completion handler*, i.e. while its own promise is still in `inFlight` but
|
|
250
|
+
* after `resetNodeForReEntry()` cleared `running`. Guarding on `inFlight`
|
|
251
|
+
* deadlocks exactly that case: the node waits for itself forever.
|
|
252
|
+
*/
|
|
253
|
+
private dispatchNode;
|
|
220
254
|
/**
|
|
221
255
|
* Wait for next node event
|
|
222
256
|
*
|
|
223
257
|
* Optimization: When there are running nodes, use pure event-driven waiting
|
|
224
258
|
* (no polling). When there are only pending nodes (dependencies not yet met),
|
|
225
259
|
* use a small timeout to re-check scheduling conditions.
|
|
260
|
+
*
|
|
261
|
+
* Task #4392 P0-1 — two additions that concurrent dispatch makes necessary:
|
|
262
|
+
*
|
|
263
|
+
* 1. **`inFlight` also arms the timeout.** `scheduler.running` is cleared by
|
|
264
|
+
* `markCompleted` inside `validateAndExecute`, but the node's promise is
|
|
265
|
+
* still settling (AFTER_NODE hook, conditional edges, `checkAndFinalize`).
|
|
266
|
+
* In that window `hasRunningNodes` is false while real work continues, so
|
|
267
|
+
* we must keep a wakeup source armed or the loop could park forever.
|
|
268
|
+
*
|
|
269
|
+
* 2. **`node.scheduled` resolves the wait.** Concurrent dispatch publishes
|
|
270
|
+
* `node.scheduled` for sibling nodes (and for loop re-entries) *after* this
|
|
271
|
+
* waiter subscribed — with `node.completed`/`node.failed` as the only
|
|
272
|
+
* trigger, a round whose completion event fired during the synchronous
|
|
273
|
+
* dispatch section would leave the loop blocked until the 100ms poll.
|
|
274
|
+
* Subscribing to `node.scheduled` closes that lost-wakeup window.
|
|
226
275
|
*/
|
|
227
276
|
private waitForNextNodeEvent;
|
|
228
277
|
/**
|
|
@@ -368,6 +417,22 @@ export declare class WorkflowEngine extends EventEmitter {
|
|
|
368
417
|
* Get session metadata
|
|
369
418
|
*/
|
|
370
419
|
private getSessionMetadata;
|
|
420
|
+
/**
|
|
421
|
+
* Serialized session-metadata read-modify-write (Task #4392 P0-1).
|
|
422
|
+
*
|
|
423
|
+
* Every `node.completed` / `node.failed` handler and every terminal-state
|
|
424
|
+
* transition mutates metadata via `get → spread → update`. That is safe only
|
|
425
|
+
* if mutations never interleave. Now that nodes are dispatched concurrently,
|
|
426
|
+
* two completions can both `await get()` the same snapshot and the later
|
|
427
|
+
* `update()` silently drops the other's `agentSessions` marker.
|
|
428
|
+
*
|
|
429
|
+
* `mutate` receives the freshly-read metadata and must return the next
|
|
430
|
+
* metadata object. Mutations are chained onto `sessionState.sessionMetadataQueue`
|
|
431
|
+
* so they apply in a strict total order, and the queue never rejects (a
|
|
432
|
+
* failed mutation is logged and skipped) so one bad update cannot poison
|
|
433
|
+
* every later write.
|
|
434
|
+
*/
|
|
435
|
+
private updateSessionMetadata;
|
|
371
436
|
/**
|
|
372
437
|
* Find workflow definition from repository
|
|
373
438
|
*/
|
|
@@ -5,26 +5,26 @@ import {
|
|
|
5
5
|
Scheduler,
|
|
6
6
|
WorkflowEngine,
|
|
7
7
|
init_engine
|
|
8
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
8
|
+
} from "../../../shared/@ai-setting/roy-agent-core-v2188rnk.js";
|
|
9
9
|
import"../../../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
10
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
11
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
10
|
+
import"../../../shared/@ai-setting/roy-agent-core-833t16n1.js";
|
|
11
|
+
import"../../../shared/@ai-setting/roy-agent-core-n3b7ztms.js";
|
|
12
12
|
import"../../../shared/@ai-setting/roy-agent-core-1db4vpc6.js";
|
|
13
13
|
import"../../../shared/@ai-setting/roy-agent-core-ze068vc9.js";
|
|
14
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
15
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
16
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
14
|
+
import"../../../shared/@ai-setting/roy-agent-core-3dkzqqsd.js";
|
|
15
|
+
import"../../../shared/@ai-setting/roy-agent-core-r9qe0ghe.js";
|
|
16
|
+
import"../../../shared/@ai-setting/roy-agent-core-3mc6vmvj.js";
|
|
17
17
|
import"../../../shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
18
18
|
import {
|
|
19
19
|
DAGManager
|
|
20
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
20
|
+
} from "../../../shared/@ai-setting/roy-agent-core-nra8vfrs.js";
|
|
21
21
|
import"../../../shared/@ai-setting/roy-agent-core-jrj30vq3.js";
|
|
22
22
|
import"../../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
23
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
24
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
25
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
26
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
27
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
23
|
+
import"../../../shared/@ai-setting/roy-agent-core-gngjkw3b.js";
|
|
24
|
+
import"../../../shared/@ai-setting/roy-agent-core-1pnfkspm.js";
|
|
25
|
+
import"../../../shared/@ai-setting/roy-agent-core-16t0zfbk.js";
|
|
26
|
+
import"../../../shared/@ai-setting/roy-agent-core-jszgaevt.js";
|
|
27
|
+
import"../../../shared/@ai-setting/roy-agent-core-b599jgyd.js";
|
|
28
28
|
import"../../../shared/@ai-setting/roy-agent-core-8seq65bp.js";
|
|
29
29
|
import"../../../shared/@ai-setting/roy-agent-core-jnszp0jq.js";
|
|
30
30
|
import"../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_hooks
|
|
3
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
3
|
+
} from "../../../shared/@ai-setting/roy-agent-core-3dkzqqsd.js";
|
|
4
4
|
import {
|
|
5
5
|
WorkflowHookPoints,
|
|
6
6
|
emitWorkflowNodeHook,
|
|
7
7
|
emitWorkflowRunHook,
|
|
8
8
|
getRegisteredWorkflowHookPoints
|
|
9
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
10
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
11
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
12
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
13
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
14
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
9
|
+
} from "../../../shared/@ai-setting/roy-agent-core-r9qe0ghe.js";
|
|
10
|
+
import"../../../shared/@ai-setting/roy-agent-core-gngjkw3b.js";
|
|
11
|
+
import"../../../shared/@ai-setting/roy-agent-core-1pnfkspm.js";
|
|
12
|
+
import"../../../shared/@ai-setting/roy-agent-core-16t0zfbk.js";
|
|
13
|
+
import"../../../shared/@ai-setting/roy-agent-core-jszgaevt.js";
|
|
14
|
+
import"../../../shared/@ai-setting/roy-agent-core-b599jgyd.js";
|
|
15
15
|
import"../../../shared/@ai-setting/roy-agent-core-8seq65bp.js";
|
|
16
16
|
import"../../../shared/@ai-setting/roy-agent-core-jnszp0jq.js";
|
|
17
17
|
import"../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WorkflowComponent
|
|
3
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
4
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
3
|
+
} from "../../shared/@ai-setting/roy-agent-core-nhk0dsxr.js";
|
|
4
|
+
import"../../shared/@ai-setting/roy-agent-core-e677am8e.js";
|
|
5
5
|
import {
|
|
6
6
|
Edge,
|
|
7
7
|
NodeAs,
|
|
@@ -14,24 +14,24 @@ import {
|
|
|
14
14
|
DecoratorNode,
|
|
15
15
|
init_decorator_node
|
|
16
16
|
} from "../../shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
17
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
18
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
19
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
17
|
+
import"../../shared/@ai-setting/roy-agent-core-0bmk44ye.js";
|
|
18
|
+
import"../../shared/@ai-setting/roy-agent-core-bwzy00t2.js";
|
|
19
|
+
import"../../shared/@ai-setting/roy-agent-core-tc7gw38m.js";
|
|
20
20
|
import"../../shared/@ai-setting/roy-agent-core-hhrg314p.js";
|
|
21
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
22
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
21
|
+
import"../../shared/@ai-setting/roy-agent-core-5rxs0ra3.js";
|
|
22
|
+
import"../../shared/@ai-setting/roy-agent-core-v2188rnk.js";
|
|
23
23
|
import"../../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
24
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
25
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
24
|
+
import"../../shared/@ai-setting/roy-agent-core-833t16n1.js";
|
|
25
|
+
import"../../shared/@ai-setting/roy-agent-core-n3b7ztms.js";
|
|
26
26
|
import"../../shared/@ai-setting/roy-agent-core-1db4vpc6.js";
|
|
27
27
|
import"../../shared/@ai-setting/roy-agent-core-ze068vc9.js";
|
|
28
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
29
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
28
|
+
import"../../shared/@ai-setting/roy-agent-core-3dkzqqsd.js";
|
|
29
|
+
import"../../shared/@ai-setting/roy-agent-core-r9qe0ghe.js";
|
|
30
30
|
import"../../shared/@ai-setting/roy-agent-core-7exqwax1.js";
|
|
31
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
32
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
31
|
+
import"../../shared/@ai-setting/roy-agent-core-202v00x4.js";
|
|
32
|
+
import"../../shared/@ai-setting/roy-agent-core-3mc6vmvj.js";
|
|
33
33
|
import"../../shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
34
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
34
|
+
import"../../shared/@ai-setting/roy-agent-core-nra8vfrs.js";
|
|
35
35
|
import {
|
|
36
36
|
BaseEventSchema,
|
|
37
37
|
ControlPauseEventSchema,
|
|
@@ -85,8 +85,9 @@ import {
|
|
|
85
85
|
unresolvedVariable
|
|
86
86
|
} from "../../shared/@ai-setting/roy-agent-core-jrj30vq3.js";
|
|
87
87
|
import"../../shared/@ai-setting/roy-agent-core-rvxg1wps.js";
|
|
88
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
89
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
88
|
+
import"../../shared/@ai-setting/roy-agent-core-ns3pbyz4.js";
|
|
89
|
+
import"../../shared/@ai-setting/roy-agent-core-yv9x4wmg.js";
|
|
90
|
+
import"../../shared/@ai-setting/roy-agent-core-zjdzk1gg.js";
|
|
90
91
|
import"../../shared/@ai-setting/roy-agent-core-c1v263jn.js";
|
|
91
92
|
import {
|
|
92
93
|
AskUserError,
|
|
@@ -94,12 +95,12 @@ import {
|
|
|
94
95
|
createWorkflowAskUserEvent
|
|
95
96
|
} from "../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
96
97
|
import"../../shared/@ai-setting/roy-agent-core-7hh0brvs.js";
|
|
97
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
98
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
99
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
100
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
101
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
102
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
98
|
+
import"../../shared/@ai-setting/roy-agent-core-40xzbjtm.js";
|
|
99
|
+
import"../../shared/@ai-setting/roy-agent-core-gngjkw3b.js";
|
|
100
|
+
import"../../shared/@ai-setting/roy-agent-core-1pnfkspm.js";
|
|
101
|
+
import"../../shared/@ai-setting/roy-agent-core-16t0zfbk.js";
|
|
102
|
+
import"../../shared/@ai-setting/roy-agent-core-jszgaevt.js";
|
|
103
|
+
import"../../shared/@ai-setting/roy-agent-core-b599jgyd.js";
|
|
103
104
|
import"../../shared/@ai-setting/roy-agent-core-8seq65bp.js";
|
|
104
105
|
import"../../shared/@ai-setting/roy-agent-core-jnszp0jq.js";
|
|
105
106
|
import"../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
init_skill_node,
|
|
8
8
|
init_tool_node,
|
|
9
9
|
init_workflow_node
|
|
10
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
11
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
10
|
+
} from "../../../shared/@ai-setting/roy-agent-core-n3b7ztms.js";
|
|
11
|
+
import"../../../shared/@ai-setting/roy-agent-core-b599jgyd.js";
|
|
12
12
|
import"../../../shared/@ai-setting/roy-agent-core-8seq65bp.js";
|
|
13
13
|
import"../../../shared/@ai-setting/roy-agent-core-jnszp0jq.js";
|
|
14
14
|
import"../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
@@ -52,6 +52,12 @@ export declare class ToolNode implements Node {
|
|
|
52
52
|
* - value is not an object
|
|
53
53
|
* - success === true (or success field is missing)
|
|
54
54
|
* - wrapper has no error string
|
|
55
|
+
*
|
|
56
|
+
* Task #4392 P0-2: when the wrapper signals a non-zero `exit_code` but carries
|
|
57
|
+
* no stderr, the bare `Tool exited with code N` message is useless on its own
|
|
58
|
+
* (#4385 measured 27 such `exit 2` occurrences in the creator sessions, and
|
|
59
|
+
* 291 failed runs whose `session.metadata.error` was null). We therefore append
|
|
60
|
+
* the (redacted, single-line, truncated) command plus a stdout tail.
|
|
55
61
|
*/
|
|
56
62
|
private extractErrorFromWrapper;
|
|
57
63
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
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-
|
|
6
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
7
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
8
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
9
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
10
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
11
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
4
|
+
} from "../../../shared/@ai-setting/roy-agent-core-xcq04fq0.js";
|
|
5
|
+
import"../../../shared/@ai-setting/roy-agent-core-nntphgww.js";
|
|
6
|
+
import"../../../shared/@ai-setting/roy-agent-core-r9qe0ghe.js";
|
|
7
|
+
import"../../../shared/@ai-setting/roy-agent-core-gngjkw3b.js";
|
|
8
|
+
import"../../../shared/@ai-setting/roy-agent-core-1pnfkspm.js";
|
|
9
|
+
import"../../../shared/@ai-setting/roy-agent-core-16t0zfbk.js";
|
|
10
|
+
import"../../../shared/@ai-setting/roy-agent-core-jszgaevt.js";
|
|
11
|
+
import"../../../shared/@ai-setting/roy-agent-core-b599jgyd.js";
|
|
12
12
|
import"../../../shared/@ai-setting/roy-agent-core-8seq65bp.js";
|
|
13
13
|
import"../../../shared/@ai-setting/roy-agent-core-jnszp0jq.js";
|
|
14
14
|
import"../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
} from "../../../shared/@ai-setting/roy-agent-core-hhrg314p.js";
|
|
6
6
|
import {
|
|
7
7
|
WorkflowService
|
|
8
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
8
|
+
} from "../../../shared/@ai-setting/roy-agent-core-5rxs0ra3.js";
|
|
9
9
|
import"../../../shared/@ai-setting/roy-agent-core-7exqwax1.js";
|
|
10
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
10
|
+
import"../../../shared/@ai-setting/roy-agent-core-b599jgyd.js";
|
|
11
11
|
import"../../../shared/@ai-setting/roy-agent-core-8seq65bp.js";
|
|
12
12
|
import"../../../shared/@ai-setting/roy-agent-core-jnszp0jq.js";
|
|
13
13
|
import"../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
migrateEmptyTagsToDefault,
|
|
9
9
|
resetDatabase,
|
|
10
10
|
rowToWorkflow
|
|
11
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
11
|
+
} from "../../../shared/@ai-setting/roy-agent-core-5psjwd08.js";
|
|
12
12
|
import {
|
|
13
13
|
TagRepository
|
|
14
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
14
|
+
} from "../../../shared/@ai-setting/roy-agent-core-m8n0dffe.js";
|
|
15
15
|
import"../../../shared/@ai-setting/roy-agent-core-rvxg1wps.js";
|
|
16
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
16
|
+
import"../../../shared/@ai-setting/roy-agent-core-b599jgyd.js";
|
|
17
17
|
import"../../../shared/@ai-setting/roy-agent-core-8seq65bp.js";
|
|
18
18
|
import"../../../shared/@ai-setting/roy-agent-core-jnszp0jq.js";
|
|
19
19
|
import"../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
@@ -24,10 +24,10 @@ import {
|
|
|
24
24
|
getRunWorkflowTool,
|
|
25
25
|
initRunWorkflowTool,
|
|
26
26
|
resetRunWorkflowTool
|
|
27
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
28
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
29
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
30
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
27
|
+
} from "../../../shared/@ai-setting/roy-agent-core-0bmk44ye.js";
|
|
28
|
+
import"../../../shared/@ai-setting/roy-agent-core-bwzy00t2.js";
|
|
29
|
+
import"../../../shared/@ai-setting/roy-agent-core-tc7gw38m.js";
|
|
30
|
+
import"../../../shared/@ai-setting/roy-agent-core-5rxs0ra3.js";
|
|
31
31
|
import {
|
|
32
32
|
WORKFLOW_SUBMIT_OUTPUT_TOOL_NAME,
|
|
33
33
|
WorkflowJsonOutputMarker,
|
|
@@ -37,21 +37,22 @@ import {
|
|
|
37
37
|
} from "../../../shared/@ai-setting/roy-agent-core-1db4vpc6.js";
|
|
38
38
|
import"../../../shared/@ai-setting/roy-agent-core-ze068vc9.js";
|
|
39
39
|
import"../../../shared/@ai-setting/roy-agent-core-7exqwax1.js";
|
|
40
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
41
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
40
|
+
import"../../../shared/@ai-setting/roy-agent-core-202v00x4.js";
|
|
41
|
+
import"../../../shared/@ai-setting/roy-agent-core-nra8vfrs.js";
|
|
42
42
|
import"../../../shared/@ai-setting/roy-agent-core-jrj30vq3.js";
|
|
43
43
|
import"../../../shared/@ai-setting/roy-agent-core-rvxg1wps.js";
|
|
44
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
45
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
44
|
+
import"../../../shared/@ai-setting/roy-agent-core-ns3pbyz4.js";
|
|
45
|
+
import"../../../shared/@ai-setting/roy-agent-core-yv9x4wmg.js";
|
|
46
|
+
import"../../../shared/@ai-setting/roy-agent-core-zjdzk1gg.js";
|
|
46
47
|
import"../../../shared/@ai-setting/roy-agent-core-c1v263jn.js";
|
|
47
48
|
import"../../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
48
49
|
import"../../../shared/@ai-setting/roy-agent-core-7hh0brvs.js";
|
|
49
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
50
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
51
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
52
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
53
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
54
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
50
|
+
import"../../../shared/@ai-setting/roy-agent-core-40xzbjtm.js";
|
|
51
|
+
import"../../../shared/@ai-setting/roy-agent-core-gngjkw3b.js";
|
|
52
|
+
import"../../../shared/@ai-setting/roy-agent-core-1pnfkspm.js";
|
|
53
|
+
import"../../../shared/@ai-setting/roy-agent-core-16t0zfbk.js";
|
|
54
|
+
import"../../../shared/@ai-setting/roy-agent-core-jszgaevt.js";
|
|
55
|
+
import"../../../shared/@ai-setting/roy-agent-core-b599jgyd.js";
|
|
55
56
|
import"../../../shared/@ai-setting/roy-agent-core-8seq65bp.js";
|
|
56
57
|
import"../../../shared/@ai-setting/roy-agent-core-jnszp0jq.js";
|
|
57
58
|
import"../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
@@ -34,18 +34,27 @@ import type { WorkflowService } from "../service/workflow-service";
|
|
|
34
34
|
/**
|
|
35
35
|
* Input schema for workflow_validate tool.
|
|
36
36
|
*
|
|
37
|
-
* Accepts
|
|
38
|
-
*
|
|
37
|
+
* Accepts `file` (path), `yaml`/`definition_yaml` (string) or `definition`
|
|
38
|
+
* (object). Precedence: `definition` > `file` > `yaml` / `definition_yaml`.
|
|
39
|
+
*
|
|
40
|
+
* Task #4392 P0-4: `file` was added because the tool performs **no shell
|
|
41
|
+
* expansion**, yet LLMs kept passing `yaml: "$(cat /tmp/x.yaml)"`. That string
|
|
42
|
+
* is literal, YAML.parse returns a *string*, and the tool replied
|
|
43
|
+
* `Parsed definition is not an object` — 30 of the 31 measured validate
|
|
44
|
+
* failures in #4385 §2 C2.
|
|
39
45
|
*/
|
|
40
46
|
export declare const WorkflowValidateInputSchema: z.ZodObject<{
|
|
41
47
|
definition: z.ZodOptional<z.ZodAny>;
|
|
42
48
|
definition_yaml: z.ZodOptional<z.ZodString>;
|
|
43
49
|
yaml: z.ZodOptional<z.ZodString>;
|
|
50
|
+
file: z.ZodOptional<z.ZodString>;
|
|
44
51
|
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
file?: string | undefined;
|
|
45
53
|
definition?: any;
|
|
46
54
|
definition_yaml?: string | undefined;
|
|
47
55
|
yaml?: string | undefined;
|
|
48
56
|
}, {
|
|
57
|
+
file?: string | undefined;
|
|
49
58
|
definition?: any;
|
|
50
59
|
definition_yaml?: string | undefined;
|
|
51
60
|
yaml?: string | undefined;
|
|
@@ -186,6 +186,25 @@ export interface NodeExecutionContext {
|
|
|
186
186
|
askUser(query: string): never;
|
|
187
187
|
/** Patch agent sub-session id onto latest workflow.node.start (agent nodes) */
|
|
188
188
|
attachAgentSessionToLastStart?(nodeId: string, agentSessionId: string): Promise<void>;
|
|
189
|
+
/**
|
|
190
|
+
* Register (or refresh) an agent sub-session entry in the parent workflow
|
|
191
|
+
* session's `metadata.agentSessions` (Task #4412 C1).
|
|
192
|
+
*
|
|
193
|
+
* AgentNode must use this instead of doing its own
|
|
194
|
+
* `get → push → update` on the parent metadata. That read-modify-write is
|
|
195
|
+
* unsafe once dispatch is concurrent: N sibling agent nodes all read the
|
|
196
|
+
* same parent snapshot and each writes back its own array-with-one-extra
|
|
197
|
+
* entry, so the last writer wins and every sibling's marker is silently
|
|
198
|
+
* dropped (measured: 4 concurrent agents → only 2 markers survive).
|
|
199
|
+
*
|
|
200
|
+
* The engine implements this by routing the mutation through the same
|
|
201
|
+
* per-session serialization queue it uses for its own metadata writes, so
|
|
202
|
+
* the whole class of lost updates is closed by construction.
|
|
203
|
+
*
|
|
204
|
+
* Optional for backward compatibility with hand-built contexts in tests;
|
|
205
|
+
* AgentNode falls back to the legacy inline RMW when it is absent.
|
|
206
|
+
*/
|
|
207
|
+
registerAgentSubSession?(nodeId: string, agentSessionId: string): Promise<void>;
|
|
189
208
|
/**
|
|
190
209
|
* Abort signal for this node's execution (Task #1976).
|
|
191
210
|
*
|