@ai-setting/roy-agent-core 1.6.4 → 1.6.5
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/event-source/index.js +3 -3
- package/dist/env/index.js +9 -9
- package/dist/env/prompt/index.js +2 -2
- package/dist/env/task/delegate/index.js +2 -2
- package/dist/env/task/index.js +3 -3
- package/dist/env/task/plugins/index.js +2 -2
- package/dist/env/workflow/engine/index.js +1 -1
- package/dist/env/workflow/index.js +3 -3
- package/dist/env/workflow/tools/index.js +1 -1
- package/dist/index.js +10 -10
- package/dist/shared/@ai-setting/{roy-agent-core-hd5xrr2q.js → roy-agent-core-12ttd2w1.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-z9m38ytb.js → roy-agent-core-4extx33r.js} +2 -3
- package/dist/shared/@ai-setting/{roy-agent-core-xnga0ksx.js → roy-agent-core-5rjccr3c.js} +19 -37
- package/dist/shared/@ai-setting/{roy-agent-core-g7hfkszj.js → roy-agent-core-971gwby7.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-tyqzn10b.js → roy-agent-core-bcd3y74k.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-7afcdb2m.js → roy-agent-core-c94yan0b.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-kf3mw79k.js → roy-agent-core-fb3wyr3d.js} +2 -5
- package/dist/shared/@ai-setting/{roy-agent-core-bferdaw6.js → roy-agent-core-hp1n198d.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-aa0tdfb2.js → roy-agent-core-jayzyg7h.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-2xpstxhz.js → roy-agent-core-p8zgxdgy.js} +2 -2
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
larkCliHandler,
|
|
11
11
|
resolveBountyIMSystemPrompt,
|
|
12
12
|
timerHandler
|
|
13
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
13
|
+
} from "../../shared/@ai-setting/roy-agent-core-hp1n198d.js";
|
|
14
14
|
import {
|
|
15
15
|
BUILT_IN_EVENT_SOURCE_TYPES,
|
|
16
16
|
BUILT_IN_EVENT_SOURCE_TYPE_LIST,
|
|
@@ -21,11 +21,11 @@ import {
|
|
|
21
21
|
validateEventSourceConfig
|
|
22
22
|
} from "../../shared/@ai-setting/roy-agent-core-ds5f75pg.js";
|
|
23
23
|
import"../../shared/@ai-setting/roy-agent-core-wmkx79b1.js";
|
|
24
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
24
|
+
import"../../shared/@ai-setting/roy-agent-core-jayzyg7h.js";
|
|
25
25
|
import"../../shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
26
26
|
import"../../shared/@ai-setting/roy-agent-core-8wd3qwx5.js";
|
|
27
27
|
import"../../shared/@ai-setting/roy-agent-core-4yq23m5g.js";
|
|
28
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
28
|
+
import"../../shared/@ai-setting/roy-agent-core-4extx33r.js";
|
|
29
29
|
import"../../shared/@ai-setting/roy-agent-core-1pg0fepg.js";
|
|
30
30
|
import"../../shared/@ai-setting/roy-agent-core-qxhq8ven.js";
|
|
31
31
|
import"../../shared/@ai-setting/roy-agent-core-pf1c360e.js";
|
package/dist/env/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseEnvironment
|
|
3
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
3
|
+
} from "../shared/@ai-setting/roy-agent-core-12ttd2w1.js";
|
|
4
4
|
import {
|
|
5
5
|
EventSourceComponent,
|
|
6
6
|
builtInHandlers,
|
|
7
7
|
larkCliHandler
|
|
8
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
8
|
+
} from "../shared/@ai-setting/roy-agent-core-hp1n198d.js";
|
|
9
9
|
import {
|
|
10
10
|
EventSourceInitHooks,
|
|
11
11
|
getDefaultConfigForType,
|
|
@@ -17,13 +17,13 @@ import"../shared/@ai-setting/roy-agent-core-wmkx79b1.js";
|
|
|
17
17
|
import {
|
|
18
18
|
PluginComponent
|
|
19
19
|
} from "../shared/@ai-setting/roy-agent-core-z7dxedn6.js";
|
|
20
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
20
|
+
import"../shared/@ai-setting/roy-agent-core-jayzyg7h.js";
|
|
21
21
|
import"../shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
22
22
|
import {
|
|
23
23
|
WorkflowComponent
|
|
24
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
24
|
+
} from "../shared/@ai-setting/roy-agent-core-p8zgxdgy.js";
|
|
25
25
|
import"../shared/@ai-setting/roy-agent-core-xgnpr28w.js";
|
|
26
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
26
|
+
import"../shared/@ai-setting/roy-agent-core-fb3wyr3d.js";
|
|
27
27
|
import"../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
28
28
|
import"../shared/@ai-setting/roy-agent-core-vf72n6qn.js";
|
|
29
29
|
import"../shared/@ai-setting/roy-agent-core-q88vxmx5.js";
|
|
@@ -31,7 +31,7 @@ import"../shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
|
31
31
|
import"../shared/@ai-setting/roy-agent-core-hhrg314p.js";
|
|
32
32
|
import"../shared/@ai-setting/roy-agent-core-ba6243hr.js";
|
|
33
33
|
import"../shared/@ai-setting/roy-agent-core-qnrf2aw6.js";
|
|
34
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
34
|
+
import"../shared/@ai-setting/roy-agent-core-5rjccr3c.js";
|
|
35
35
|
import"../shared/@ai-setting/roy-agent-core-1db4vpc6.js";
|
|
36
36
|
import"../shared/@ai-setting/roy-agent-core-b75jtybq.js";
|
|
37
37
|
import"../shared/@ai-setting/roy-agent-core-8wd3qwx5.js";
|
|
@@ -48,13 +48,13 @@ import"../shared/@ai-setting/roy-agent-core-5h49ct1a.js";
|
|
|
48
48
|
import"../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
49
49
|
import {
|
|
50
50
|
TaskComponent
|
|
51
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
51
|
+
} from "../shared/@ai-setting/roy-agent-core-bcd3y74k.js";
|
|
52
52
|
import"../shared/@ai-setting/roy-agent-core-amkqnyzy.js";
|
|
53
53
|
import"../shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
54
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
54
|
+
import"../shared/@ai-setting/roy-agent-core-c94yan0b.js";
|
|
55
55
|
import"../shared/@ai-setting/roy-agent-core-pzeexnhf.js";
|
|
56
56
|
import"../shared/@ai-setting/roy-agent-core-9xby523m.js";
|
|
57
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
57
|
+
import"../shared/@ai-setting/roy-agent-core-4extx33r.js";
|
|
58
58
|
import"../shared/@ai-setting/roy-agent-core-as3phr7n.js";
|
|
59
59
|
import {
|
|
60
60
|
XDG_PATHS,
|
package/dist/env/prompt/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
PromptConfigSchema,
|
|
4
4
|
PromptPathSchema,
|
|
5
5
|
PromptRenderer
|
|
6
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
7
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
6
|
+
} from "../../shared/@ai-setting/roy-agent-core-971gwby7.js";
|
|
7
|
+
import"../../shared/@ai-setting/roy-agent-core-4extx33r.js";
|
|
8
8
|
import"../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
9
9
|
import"../../shared/@ai-setting/roy-agent-core-qxhq8ven.js";
|
|
10
10
|
import"../../shared/@ai-setting/roy-agent-core-pf1c360e.js";
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
BackgroundTaskManager,
|
|
4
4
|
createDelegateTool,
|
|
5
5
|
createStopTool
|
|
6
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
6
|
+
} from "../../../shared/@ai-setting/roy-agent-core-c94yan0b.js";
|
|
7
7
|
import"../../../shared/@ai-setting/roy-agent-core-pzeexnhf.js";
|
|
8
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
8
|
+
import"../../../shared/@ai-setting/roy-agent-core-4extx33r.js";
|
|
9
9
|
import"../../../shared/@ai-setting/roy-agent-core-as3phr7n.js";
|
|
10
10
|
import"../../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
11
11
|
import"../../../shared/@ai-setting/roy-agent-core-1pg0fepg.js";
|
package/dist/env/task/index.js
CHANGED
|
@@ -5,18 +5,18 @@ import {
|
|
|
5
5
|
TaskPriorityEnum,
|
|
6
6
|
TaskStatusEnum,
|
|
7
7
|
TaskTypeEnum
|
|
8
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
8
|
+
} from "../../shared/@ai-setting/roy-agent-core-bcd3y74k.js";
|
|
9
9
|
import"../../shared/@ai-setting/roy-agent-core-amkqnyzy.js";
|
|
10
10
|
import {
|
|
11
11
|
TaskEntityEventTypes
|
|
12
12
|
} from "../../shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
13
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
13
|
+
import"../../shared/@ai-setting/roy-agent-core-c94yan0b.js";
|
|
14
14
|
import"../../shared/@ai-setting/roy-agent-core-pzeexnhf.js";
|
|
15
15
|
import {
|
|
16
16
|
SQLiteTaskStore,
|
|
17
17
|
getDefaultTaskDbPath
|
|
18
18
|
} from "../../shared/@ai-setting/roy-agent-core-9xby523m.js";
|
|
19
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
19
|
+
import"../../shared/@ai-setting/roy-agent-core-4extx33r.js";
|
|
20
20
|
import"../../shared/@ai-setting/roy-agent-core-as3phr7n.js";
|
|
21
21
|
import"../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
22
22
|
import"../../shared/@ai-setting/roy-agent-core-ktbkp661.js";
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
formatExtractorInput,
|
|
9
9
|
formatExtractorInputFromDescription,
|
|
10
10
|
parseExtractorOutput
|
|
11
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
11
|
+
} from "../../../shared/@ai-setting/roy-agent-core-jayzyg7h.js";
|
|
12
12
|
import"../../../shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
13
13
|
import"../../../shared/@ai-setting/roy-agent-core-8wd3qwx5.js";
|
|
14
14
|
import"../../../shared/@ai-setting/roy-agent-core-4yq23m5g.js";
|
|
15
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
15
|
+
import"../../../shared/@ai-setting/roy-agent-core-4extx33r.js";
|
|
16
16
|
import"../../../shared/@ai-setting/roy-agent-core-1pg0fepg.js";
|
|
17
17
|
import"../../../shared/@ai-setting/roy-agent-core-zttjq1h3.js";
|
|
18
18
|
import"../../../shared/@ai-setting/roy-agent-core-scp0afxg.js";
|
|
@@ -5,7 +5,7 @@ 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-fb3wyr3d.js";
|
|
9
9
|
import"../../../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
10
10
|
import"../../../shared/@ai-setting/roy-agent-core-vf72n6qn.js";
|
|
11
11
|
import"../../../shared/@ai-setting/roy-agent-core-q88vxmx5.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WorkflowComponent
|
|
3
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
3
|
+
} from "../../shared/@ai-setting/roy-agent-core-p8zgxdgy.js";
|
|
4
4
|
import"../../shared/@ai-setting/roy-agent-core-xgnpr28w.js";
|
|
5
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
5
|
+
import"../../shared/@ai-setting/roy-agent-core-fb3wyr3d.js";
|
|
6
6
|
import"../../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
7
7
|
import"../../shared/@ai-setting/roy-agent-core-vf72n6qn.js";
|
|
8
8
|
import"../../shared/@ai-setting/roy-agent-core-q88vxmx5.js";
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
pathNotFound,
|
|
61
61
|
unresolvedVariable
|
|
62
62
|
} from "../../shared/@ai-setting/roy-agent-core-qnrf2aw6.js";
|
|
63
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
63
|
+
import"../../shared/@ai-setting/roy-agent-core-5rjccr3c.js";
|
|
64
64
|
import"../../shared/@ai-setting/roy-agent-core-1db4vpc6.js";
|
|
65
65
|
import"../../shared/@ai-setting/roy-agent-core-b75jtybq.js";
|
|
66
66
|
import"../../shared/@ai-setting/roy-agent-core-8wd3qwx5.js";
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
getRunWorkflowTool,
|
|
25
25
|
initRunWorkflowTool,
|
|
26
26
|
resetRunWorkflowTool
|
|
27
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
27
|
+
} from "../../../shared/@ai-setting/roy-agent-core-5rjccr3c.js";
|
|
28
28
|
import {
|
|
29
29
|
WORKFLOW_SUBMIT_OUTPUT_TOOL_NAME,
|
|
30
30
|
WorkflowJsonOutputMarker,
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PromptComponent,
|
|
3
3
|
PromptStore
|
|
4
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
4
|
+
} from "./shared/@ai-setting/roy-agent-core-971gwby7.js";
|
|
5
5
|
import {
|
|
6
6
|
LLMComponent,
|
|
7
7
|
LLMConfigSchema,
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
BaseEnvironment,
|
|
63
63
|
generateDescendingId,
|
|
64
64
|
generateId
|
|
65
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
65
|
+
} from "./shared/@ai-setting/roy-agent-core-12ttd2w1.js";
|
|
66
66
|
import {
|
|
67
67
|
BountyIMInstance,
|
|
68
68
|
EventSourceComponent,
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
larkCliHandler,
|
|
75
75
|
resolveBountyIMSystemPrompt,
|
|
76
76
|
timerHandler
|
|
77
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
77
|
+
} from "./shared/@ai-setting/roy-agent-core-hp1n198d.js";
|
|
78
78
|
import {
|
|
79
79
|
BUILT_IN_EVENT_SOURCE_TYPES,
|
|
80
80
|
BUILT_IN_EVENT_SOURCE_TYPE_LIST,
|
|
@@ -94,18 +94,18 @@ import {
|
|
|
94
94
|
import {
|
|
95
95
|
TaskTagPlugin,
|
|
96
96
|
createAutoTaskPlugin
|
|
97
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
97
|
+
} from "./shared/@ai-setting/roy-agent-core-jayzyg7h.js";
|
|
98
98
|
import {
|
|
99
99
|
BasePlugin
|
|
100
100
|
} from "./shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
101
101
|
import {
|
|
102
102
|
WorkflowComponent
|
|
103
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
103
|
+
} from "./shared/@ai-setting/roy-agent-core-p8zgxdgy.js";
|
|
104
104
|
import {
|
|
105
105
|
init_node_registry_helper,
|
|
106
106
|
registerDecoratorNodeType
|
|
107
107
|
} from "./shared/@ai-setting/roy-agent-core-xgnpr28w.js";
|
|
108
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
108
|
+
import"./shared/@ai-setting/roy-agent-core-fb3wyr3d.js";
|
|
109
109
|
import"./shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
110
110
|
import"./shared/@ai-setting/roy-agent-core-vf72n6qn.js";
|
|
111
111
|
import"./shared/@ai-setting/roy-agent-core-q88vxmx5.js";
|
|
@@ -113,7 +113,7 @@ import"./shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
|
113
113
|
import"./shared/@ai-setting/roy-agent-core-hhrg314p.js";
|
|
114
114
|
import"./shared/@ai-setting/roy-agent-core-ba6243hr.js";
|
|
115
115
|
import"./shared/@ai-setting/roy-agent-core-qnrf2aw6.js";
|
|
116
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
116
|
+
import"./shared/@ai-setting/roy-agent-core-5rjccr3c.js";
|
|
117
117
|
import"./shared/@ai-setting/roy-agent-core-1db4vpc6.js";
|
|
118
118
|
import"./shared/@ai-setting/roy-agent-core-b75jtybq.js";
|
|
119
119
|
import"./shared/@ai-setting/roy-agent-core-8wd3qwx5.js";
|
|
@@ -148,10 +148,10 @@ import {
|
|
|
148
148
|
} from "./shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
149
149
|
import {
|
|
150
150
|
TaskComponent
|
|
151
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
151
|
+
} from "./shared/@ai-setting/roy-agent-core-bcd3y74k.js";
|
|
152
152
|
import"./shared/@ai-setting/roy-agent-core-amkqnyzy.js";
|
|
153
153
|
import"./shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
154
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
154
|
+
import"./shared/@ai-setting/roy-agent-core-c94yan0b.js";
|
|
155
155
|
import"./shared/@ai-setting/roy-agent-core-pzeexnhf.js";
|
|
156
156
|
import {
|
|
157
157
|
SQLiteTaskStore,
|
|
@@ -160,7 +160,7 @@ import {
|
|
|
160
160
|
import {
|
|
161
161
|
getBuiltInPrompt,
|
|
162
162
|
getBuiltInPromptNames
|
|
163
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
163
|
+
} from "./shared/@ai-setting/roy-agent-core-4extx33r.js";
|
|
164
164
|
import {
|
|
165
165
|
AgentRegistry
|
|
166
166
|
} from "./shared/@ai-setting/roy-agent-core-as3phr7n.js";
|
|
@@ -530,7 +530,7 @@ roy-agent workflow list|add|search|get|tag|validate|update|remove|run|pause|resu
|
|
|
530
530
|
| \`workflow get <name>\` | Get workflow definition details. |
|
|
531
531
|
| \`workflow tag list [--sort-by name/usage_count/created_at] [--order desc/asc]\` | List all available tags with usage_count. \`\`\` |
|
|
532
532
|
| \`workflow validate --file <path>\` | Validate a workflow YAML/JSON before adding. Always run this BEFORE \`workflow add\`. |
|
|
533
|
-
| \`workflow run <name> [--input JSON]
|
|
533
|
+
| \`workflow run <name> [--input JSON]\` | Run a workflow. |
|
|
534
534
|
| \`workflow status <run-id>\` | Check workflow run status. |
|
|
535
535
|
| \`workflow pause/resume/stop <run-id>\` | Control workflow execution. |
|
|
536
536
|
| \`workflow update <id> [--tags] [--description]\` | Update workflow metadata. |
|
|
@@ -1022,7 +1022,7 @@ When reusing an existing task, you MUST follow these rules:
|
|
|
1022
1022
|
- 返回值:workflow 定义(名称、版本、描述、入参 inputs schema、节点列表),或 run 的状态
|
|
1023
1023
|
|
|
1024
1024
|
3. **\`workflow_run\`** — 运行 workflow
|
|
1025
|
-
- 参数:\`workflow_name\`(必填),\`input\`(可选 JSON),\`
|
|
1025
|
+
- 参数:\`workflow_name\`(必填),\`input\`(可选 JSON),\`timeout\`(可选),\`session\`(resume 用,传 runId 即可),\`node_config\`(per-node 覆盖,Task #1974,JSON 对象 { "<nodeId>": { timeout: 5000 } })
|
|
1026
1026
|
- 返回值:run_id, status, output, error, duration_ms
|
|
1027
1027
|
|
|
1028
1028
|
4. **\`workflow_run_status\`** — 查询 run 状态
|
|
@@ -1170,7 +1170,6 @@ plan/execute/verify 三阶段已完成的会跳过,未完成的会接上。
|
|
|
1170
1170
|
| \`workflow_run\` 返回 \`status="failed"\` + error 含 "timeout" | stop → resume(同 session) |
|
|
1171
1171
|
| \`workflow_run\` 返回 \`status="failed"\` + error 是业务错误(如校验失败) | **不** resume,原样返回给上游 |
|
|
1172
1172
|
| \`workflow_run\` 返回 \`status="paused"\`(ask_user 中断) | 用 \`session\` resume + 用户 response |
|
|
1173
|
-
| \`workflow_run\` 返回 \`status="running"\` 但实际卡死很久 | 先 \`workflow_run_status\` 确认;仍是 running 则 stop → resume |
|
|
1174
1173
|
| \`workflow_run\` 抛异常(非 status=failed,是 throw) | stop → resume;resume 仍失败则开新 run |
|
|
1175
1174
|
|
|
1176
1175
|
记住:**stop + resume 是默认动作**,不是例外。
|
|
@@ -618,11 +618,10 @@ var logger7 = createLogger("run-workflow-tool");
|
|
|
618
618
|
var RunWorkflowInputSchema = z8.object({
|
|
619
619
|
workflow_name: z8.string().describe("Name of the workflow to run"),
|
|
620
620
|
input: z8.record(z8.any()).optional().describe("Input to pass to the workflow"),
|
|
621
|
-
sync: z8.boolean().default(true).describe("Wait for completion (default: true)"),
|
|
622
621
|
timeout: z8.number().positive().optional().describe("Timeout in milliseconds (default: 1800000 = 30 min)"),
|
|
623
622
|
node_config: z8.record(z8.string(), z8.record(z8.string(), z8.any())).optional().describe("Per-node runtime config overrides keyed by node id (Task #1974). " + "Shallow-merged into each node's effective config; input wins over nodeDef.config."),
|
|
624
623
|
session: z8.string().regex(/^workflow_/, { message: "session must start with 'workflow_'" }).optional().describe("Existing session ID (workflow_xxx) to resume from. Mutually exclusive with fresh `input` runs.")
|
|
625
|
-
});
|
|
624
|
+
}).strict();
|
|
626
625
|
function createRunWorkflowTool(workflowService) {
|
|
627
626
|
return {
|
|
628
627
|
name: "workflow_run",
|
|
@@ -642,10 +641,9 @@ function createRunWorkflowTool(workflowService) {
|
|
|
642
641
|
},
|
|
643
642
|
execute: async (args, ctx) => {
|
|
644
643
|
const startTime = Date.now();
|
|
645
|
-
const { workflow_name, input, session,
|
|
644
|
+
const { workflow_name, input, session, timeout = 1800000, node_config } = args;
|
|
646
645
|
logger7.info(`Running workflow: ${workflow_name}`, {
|
|
647
646
|
input,
|
|
648
|
-
sync,
|
|
649
647
|
timeout,
|
|
650
648
|
...session ? { resumeSession: session } : {}
|
|
651
649
|
});
|
|
@@ -664,7 +662,6 @@ function createRunWorkflowTool(workflowService) {
|
|
|
664
662
|
try {
|
|
665
663
|
let result;
|
|
666
664
|
const baseOptions = {
|
|
667
|
-
sync,
|
|
668
665
|
...parentSessionId ? { parentSessionId } : {},
|
|
669
666
|
onSessionCreated,
|
|
670
667
|
...node_config ? { nodeConfig: node_config } : {}
|
|
@@ -695,38 +692,23 @@ function createRunWorkflowTool(workflowService) {
|
|
|
695
692
|
}
|
|
696
693
|
durationMs = Date.now() - startTime;
|
|
697
694
|
const finalRunId = capturedRunId ?? result.runId ?? "";
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
};
|
|
716
|
-
} else {
|
|
717
|
-
return {
|
|
718
|
-
success: true,
|
|
719
|
-
output: {
|
|
720
|
-
run_id: finalRunId,
|
|
721
|
-
status: result.status,
|
|
722
|
-
duration_ms: durationMs
|
|
723
|
-
},
|
|
724
|
-
metadata: {
|
|
725
|
-
execution_time_ms: durationMs,
|
|
726
|
-
run_id: finalRunId
|
|
727
|
-
}
|
|
728
|
-
};
|
|
729
|
-
}
|
|
695
|
+
return {
|
|
696
|
+
success: result.status === "completed" || result.status === "paused",
|
|
697
|
+
output: {
|
|
698
|
+
run_id: finalRunId,
|
|
699
|
+
status: result.status,
|
|
700
|
+
output: result.output,
|
|
701
|
+
error: result.error,
|
|
702
|
+
duration_ms: result.durationMs || durationMs,
|
|
703
|
+
...result.pendingNodeId ? { pending_node_id: result.pendingNodeId } : {},
|
|
704
|
+
...result.query ? { query: result.query } : {},
|
|
705
|
+
...result.agentSessionId ? { agent_session_id: result.agentSessionId } : {}
|
|
706
|
+
},
|
|
707
|
+
metadata: {
|
|
708
|
+
execution_time_ms: durationMs,
|
|
709
|
+
run_id: finalRunId
|
|
710
|
+
}
|
|
711
|
+
};
|
|
730
712
|
} catch (error) {
|
|
731
713
|
if (timeoutHandle) {
|
|
732
714
|
clearTimeout(timeoutHandle);
|
|
@@ -1642,11 +1642,8 @@ var init_engine = __esm(() => {
|
|
|
1642
1642
|
logger3.error(`Workflow ${sessionId} scheduling error:`, error);
|
|
1643
1643
|
this.failWorkflow(sessionState, error);
|
|
1644
1644
|
});
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
return this.waitForCompletion(sessionId, wfTimeout);
|
|
1648
|
-
}
|
|
1649
|
-
return { runId, status: "running" };
|
|
1645
|
+
const wfTimeout = options?.timeout ?? sessionState.config.timeout ?? undefined;
|
|
1646
|
+
return this.waitForCompletion(sessionId, wfTimeout);
|
|
1650
1647
|
}
|
|
1651
1648
|
async runWorkflow(workflow, options) {
|
|
1652
1649
|
const definition = "definition" in workflow ? workflow.definition : workflow;
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
WorkflowEngine,
|
|
7
7
|
exports_engine,
|
|
8
8
|
init_engine
|
|
9
|
-
} from "./roy-agent-core-
|
|
9
|
+
} from "./roy-agent-core-fb3wyr3d.js";
|
|
10
10
|
import {
|
|
11
11
|
askUserTool,
|
|
12
12
|
createRunWorkflowTool,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
createWorkflowSearchTool,
|
|
19
19
|
createWorkflowTagListTool,
|
|
20
20
|
createWorkflowValidateTool
|
|
21
|
-
} from "./roy-agent-core-
|
|
21
|
+
} from "./roy-agent-core-5rjccr3c.js";
|
|
22
22
|
import {
|
|
23
23
|
WorkflowService
|
|
24
24
|
} from "./roy-agent-core-b75jtybq.js";
|