@ai-setting/roy-agent-core 1.5.80 → 1.5.83
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/index.js +2 -2
- package/dist/env/event-source/index.js +2 -2
- package/dist/env/index.js +14 -14
- package/dist/env/prompt/index.js +1 -1
- package/dist/env/task/delegate/index.js +2 -2
- package/dist/env/task/index.js +5 -5
- package/dist/env/task/plugins/index.js +1 -1
- package/dist/env/task/storage/index.js +1 -1
- package/dist/env/task/tools/index.js +1 -1
- package/dist/env/workflow/engine/index.js +3 -3
- package/dist/env/workflow/index.js +5 -5
- package/dist/env/workflow/nodes/index.js +1 -1
- package/dist/env/workflow/tools/index.js +26 -142
- package/dist/env/workflow/utils/index.js +1 -1
- package/dist/index.js +15 -15
- package/dist/shared/@ai-setting/{roy-agent-core-4ws3w7cx.js → roy-agent-core-015vw11k.js} +32 -3
- package/dist/shared/@ai-setting/{roy-agent-core-7mw366pc.js → roy-agent-core-67yzhmg2.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-8x1gmqcv.js → roy-agent-core-68sef3es.js} +4 -6
- package/dist/shared/@ai-setting/{roy-agent-core-jazhr292.js → roy-agent-core-6b0r2e7j.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-n9tw52zb.js → roy-agent-core-78yzt2bq.js} +40 -128
- package/dist/shared/@ai-setting/{roy-agent-core-7t0jen73.js → roy-agent-core-7nh5h9fn.js} +37 -4
- package/dist/shared/@ai-setting/roy-agent-core-a6j7g1qe.js +428 -0
- package/dist/shared/@ai-setting/{roy-agent-core-0tgnq4nz.js → roy-agent-core-f6p7wwpd.js} +64 -5
- package/dist/shared/@ai-setting/{roy-agent-core-99j4w3fx.js → roy-agent-core-gb9gbkc3.js} +2 -0
- package/dist/shared/@ai-setting/{roy-agent-core-ajx32wzj.js → roy-agent-core-j754zgb4.js} +13 -0
- package/dist/shared/@ai-setting/{roy-agent-core-zf62vkc4.js → roy-agent-core-mbre4fxg.js} +32 -1
- package/dist/shared/@ai-setting/{roy-agent-core-r9y8ct0w.js → roy-agent-core-pcdzfwdv.js} +4 -0
- package/dist/shared/@ai-setting/{roy-agent-core-11dnsfwp.js → roy-agent-core-qjv8537d.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-s83ararq.js → roy-agent-core-v3t28k5n.js} +35 -3
- package/dist/shared/@ai-setting/{roy-agent-core-d32ecc9z.js → roy-agent-core-vcvgq9hy.js} +150 -1
- package/package.json +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-0vbdz0x7.js +0 -36
package/dist/env/agent/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentComponent,
|
|
3
3
|
AgentComponentConfigSchema
|
|
4
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
4
|
+
} from "../../shared/@ai-setting/roy-agent-core-015vw11k.js";
|
|
5
5
|
import"../../shared/@ai-setting/roy-agent-core-r0m0at3x.js";
|
|
6
6
|
import"../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
7
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
7
|
+
import"../../shared/@ai-setting/roy-agent-core-mbre4fxg.js";
|
|
8
8
|
import"../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
9
9
|
import"../../shared/@ai-setting/roy-agent-core-ctdhjv68.js";
|
|
10
10
|
import {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
builtInHandlers,
|
|
5
5
|
getBuiltInHandler,
|
|
6
6
|
larkCliHandler
|
|
7
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
7
|
+
} from "../../shared/@ai-setting/roy-agent-core-67yzhmg2.js";
|
|
8
8
|
import {
|
|
9
9
|
BUILT_IN_EVENT_SOURCE_TYPES,
|
|
10
10
|
BUILT_IN_EVENT_SOURCE_TYPE_LIST,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
validateEventSourceConfig
|
|
16
16
|
} from "../../shared/@ai-setting/roy-agent-core-xb4hvk1m.js";
|
|
17
17
|
import"../../shared/@ai-setting/roy-agent-core-v8xa6vs8.js";
|
|
18
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
18
|
+
import"../../shared/@ai-setting/roy-agent-core-78yzt2bq.js";
|
|
19
19
|
import"../../shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
20
20
|
import"../../shared/@ai-setting/roy-agent-core-92z6t4he.js";
|
|
21
21
|
import"../../shared/@ai-setting/roy-agent-core-qxhq8ven.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-68sef3es.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-67yzhmg2.js";
|
|
9
9
|
import {
|
|
10
10
|
EventSourceInitHooks,
|
|
11
11
|
getDefaultConfigForType,
|
|
@@ -17,44 +17,44 @@ import"../shared/@ai-setting/roy-agent-core-v8xa6vs8.js";
|
|
|
17
17
|
import {
|
|
18
18
|
PluginComponent
|
|
19
19
|
} from "../shared/@ai-setting/roy-agent-core-t1ef8hf2.js";
|
|
20
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
20
|
+
import"../shared/@ai-setting/roy-agent-core-78yzt2bq.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-v3t28k5n.js";
|
|
25
25
|
import"../shared/@ai-setting/roy-agent-core-fjexv5nm.js";
|
|
26
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
26
|
+
import"../shared/@ai-setting/roy-agent-core-6b0r2e7j.js";
|
|
27
27
|
import"../shared/@ai-setting/roy-agent-core-m4qjnhz6.js";
|
|
28
28
|
import"../shared/@ai-setting/roy-agent-core-7z8fzxck.js";
|
|
29
29
|
import"../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
30
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
30
|
+
import"../shared/@ai-setting/roy-agent-core-gb9gbkc3.js";
|
|
31
31
|
import"../shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
32
32
|
import"../shared/@ai-setting/roy-agent-core-4t40mkpv.js";
|
|
33
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
33
|
+
import"../shared/@ai-setting/roy-agent-core-j754zgb4.js";
|
|
34
34
|
import"../shared/@ai-setting/roy-agent-core-qnrf2aw6.js";
|
|
35
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
35
|
+
import"../shared/@ai-setting/roy-agent-core-a6j7g1qe.js";
|
|
36
36
|
import"../shared/@ai-setting/roy-agent-core-whw7jap0.js";
|
|
37
37
|
import"../shared/@ai-setting/roy-agent-core-h0x19xgn.js";
|
|
38
38
|
import"../shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
39
39
|
import {
|
|
40
40
|
AgentComponent,
|
|
41
41
|
AgentComponentConfigSchema
|
|
42
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
42
|
+
} from "../shared/@ai-setting/roy-agent-core-015vw11k.js";
|
|
43
43
|
import"../shared/@ai-setting/roy-agent-core-r0m0at3x.js";
|
|
44
44
|
import"../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
45
45
|
import {
|
|
46
46
|
TaskComponent
|
|
47
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
47
|
+
} from "../shared/@ai-setting/roy-agent-core-qjv8537d.js";
|
|
48
48
|
import"../shared/@ai-setting/roy-agent-core-8gxth0eh.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-
|
|
49
|
+
import"../shared/@ai-setting/roy-agent-core-f6p7wwpd.js";
|
|
50
|
+
import"../shared/@ai-setting/roy-agent-core-pcdzfwdv.js";
|
|
51
|
+
import"../shared/@ai-setting/roy-agent-core-mbre4fxg.js";
|
|
52
52
|
import {
|
|
53
53
|
XDG_PATHS,
|
|
54
54
|
getXDGPath,
|
|
55
55
|
getXDGPaths
|
|
56
56
|
} from "../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
57
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
57
|
+
import"../shared/@ai-setting/roy-agent-core-7nh5h9fn.js";
|
|
58
58
|
import"../shared/@ai-setting/roy-agent-core-t94ktchq.js";
|
|
59
59
|
import"../shared/@ai-setting/roy-agent-core-92z6t4he.js";
|
|
60
60
|
import {
|
package/dist/env/prompt/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
PromptConfigSchema,
|
|
4
4
|
PromptPathSchema,
|
|
5
5
|
PromptRenderer
|
|
6
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
6
|
+
} from "../../shared/@ai-setting/roy-agent-core-vcvgq9hy.js";
|
|
7
7
|
import"../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
8
8
|
import"../../shared/@ai-setting/roy-agent-core-qxhq8ven.js";
|
|
9
9
|
import"../../shared/@ai-setting/roy-agent-core-rgckng3p.js";
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
BackgroundTaskManager,
|
|
4
4
|
createDelegateTool,
|
|
5
5
|
createStopTool
|
|
6
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
7
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
6
|
+
} from "../../../shared/@ai-setting/roy-agent-core-f6p7wwpd.js";
|
|
7
|
+
import"../../../shared/@ai-setting/roy-agent-core-mbre4fxg.js";
|
|
8
8
|
import"../../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
9
9
|
import"../../../shared/@ai-setting/roy-agent-core-92z6t4he.js";
|
|
10
10
|
import"../../../shared/@ai-setting/roy-agent-core-7tp56w6n.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-qjv8537d.js";
|
|
9
9
|
import {
|
|
10
10
|
TaskEntityEventTypes
|
|
11
11
|
} from "../../shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
12
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
12
|
+
import"../../shared/@ai-setting/roy-agent-core-f6p7wwpd.js";
|
|
13
13
|
import {
|
|
14
14
|
SQLiteTaskStore,
|
|
15
15
|
getDefaultTaskDbPath
|
|
16
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
17
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
16
|
+
} from "../../shared/@ai-setting/roy-agent-core-pcdzfwdv.js";
|
|
17
|
+
import"../../shared/@ai-setting/roy-agent-core-mbre4fxg.js";
|
|
18
18
|
import"../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
19
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
19
|
+
import"../../shared/@ai-setting/roy-agent-core-7nh5h9fn.js";
|
|
20
20
|
import"../../shared/@ai-setting/roy-agent-core-t94ktchq.js";
|
|
21
21
|
import"../../shared/@ai-setting/roy-agent-core-92z6t4he.js";
|
|
22
22
|
import"../../shared/@ai-setting/roy-agent-core-qxhq8ven.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
formatExtractorInput,
|
|
10
10
|
formatExtractorInputFromDescription,
|
|
11
11
|
parseExtractorOutput
|
|
12
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
12
|
+
} from "../../../shared/@ai-setting/roy-agent-core-78yzt2bq.js";
|
|
13
13
|
import"../../../shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
14
14
|
import"../../../shared/@ai-setting/roy-agent-core-92z6t4he.js";
|
|
15
15
|
import"../../../shared/@ai-setting/roy-agent-core-qg4rma4c.js";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
SQLiteTaskStore,
|
|
3
3
|
getDefaultDataDir,
|
|
4
4
|
getDefaultTaskDbPath
|
|
5
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
5
|
+
} from "../../../shared/@ai-setting/roy-agent-core-pcdzfwdv.js";
|
|
6
6
|
import"../../../shared/@ai-setting/roy-agent-core-shme7set.js";
|
|
7
7
|
import"../../../shared/@ai-setting/roy-agent-core-7z9b1fm8.js";
|
|
8
8
|
import"../../../shared/@ai-setting/roy-agent-core-c6592r3c.js";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
listTasksTool,
|
|
9
9
|
searchTasksTool,
|
|
10
10
|
updateTaskTool
|
|
11
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
11
|
+
} from "../../../shared/@ai-setting/roy-agent-core-7nh5h9fn.js";
|
|
12
12
|
import"../../../shared/@ai-setting/roy-agent-core-y5d04fm3.js";
|
|
13
13
|
import"../../../shared/@ai-setting/roy-agent-core-k05v31rc.js";
|
|
14
14
|
import"../../../shared/@ai-setting/roy-agent-core-shme7set.js";
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
Scheduler,
|
|
7
7
|
WorkflowEngine,
|
|
8
8
|
init_engine
|
|
9
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
9
|
+
} from "../../../shared/@ai-setting/roy-agent-core-6b0r2e7j.js";
|
|
10
10
|
import"../../../shared/@ai-setting/roy-agent-core-m4qjnhz6.js";
|
|
11
11
|
import"../../../shared/@ai-setting/roy-agent-core-7z8fzxck.js";
|
|
12
12
|
import"../../../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
13
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
13
|
+
import"../../../shared/@ai-setting/roy-agent-core-gb9gbkc3.js";
|
|
14
14
|
import"../../../shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
15
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
15
|
+
import"../../../shared/@ai-setting/roy-agent-core-j754zgb4.js";
|
|
16
16
|
import"../../../shared/@ai-setting/roy-agent-core-qnrf2aw6.js";
|
|
17
17
|
import"../../../shared/@ai-setting/roy-agent-core-whw7jap0.js";
|
|
18
18
|
import"../../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WorkflowComponent
|
|
3
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
3
|
+
} from "../../shared/@ai-setting/roy-agent-core-v3t28k5n.js";
|
|
4
4
|
import"../../shared/@ai-setting/roy-agent-core-fjexv5nm.js";
|
|
5
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
5
|
+
import"../../shared/@ai-setting/roy-agent-core-6b0r2e7j.js";
|
|
6
6
|
import"../../shared/@ai-setting/roy-agent-core-m4qjnhz6.js";
|
|
7
7
|
import"../../shared/@ai-setting/roy-agent-core-7z8fzxck.js";
|
|
8
8
|
import"../../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
9
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
9
|
+
import"../../shared/@ai-setting/roy-agent-core-gb9gbkc3.js";
|
|
10
10
|
import"../../shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
11
11
|
import"../../shared/@ai-setting/roy-agent-core-4t40mkpv.js";
|
|
12
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
12
|
+
import"../../shared/@ai-setting/roy-agent-core-j754zgb4.js";
|
|
13
13
|
import {
|
|
14
14
|
BaseEventSchema,
|
|
15
15
|
ControlPauseEventSchema,
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
pathNotFound,
|
|
62
62
|
unresolvedVariable
|
|
63
63
|
} from "../../shared/@ai-setting/roy-agent-core-qnrf2aw6.js";
|
|
64
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
64
|
+
import"../../shared/@ai-setting/roy-agent-core-a6j7g1qe.js";
|
|
65
65
|
import"../../shared/@ai-setting/roy-agent-core-whw7jap0.js";
|
|
66
66
|
import {
|
|
67
67
|
Edge,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
init_skill_node,
|
|
6
6
|
init_tool_node,
|
|
7
7
|
init_workflow_node
|
|
8
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
8
|
+
} from "../../../shared/@ai-setting/roy-agent-core-j754zgb4.js";
|
|
9
9
|
import"../../../shared/@ai-setting/roy-agent-core-k05v31rc.js";
|
|
10
10
|
import"../../../shared/@ai-setting/roy-agent-core-shme7set.js";
|
|
11
11
|
import"../../../shared/@ai-setting/roy-agent-core-7z9b1fm8.js";
|
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AskUserInputSchema,
|
|
3
|
+
RunWorkflowInputSchema,
|
|
4
|
+
WorkflowGetInputSchema,
|
|
5
|
+
WorkflowListInputSchema,
|
|
6
|
+
WorkflowRunStatusInputSchema,
|
|
7
|
+
WorkflowRunStopInputSchema,
|
|
3
8
|
askUserTool,
|
|
4
|
-
askUserToolInstance
|
|
5
|
-
|
|
9
|
+
askUserToolInstance,
|
|
10
|
+
createLegacyRunWorkflowTool,
|
|
11
|
+
createRunWorkflowTool,
|
|
12
|
+
createWorkflowGetTool,
|
|
13
|
+
createWorkflowListTool,
|
|
14
|
+
createWorkflowRunStatusTool,
|
|
15
|
+
createWorkflowRunStopTool,
|
|
16
|
+
getRunWorkflowTool,
|
|
17
|
+
initRunWorkflowTool,
|
|
18
|
+
resetRunWorkflowTool
|
|
19
|
+
} from "../../../shared/@ai-setting/roy-agent-core-a6j7g1qe.js";
|
|
6
20
|
import {
|
|
7
21
|
WORKFLOW_SUBMIT_OUTPUT_TOOL_NAME,
|
|
8
22
|
WorkflowJsonOutputMarker,
|
|
@@ -11,150 +25,11 @@ import {
|
|
|
11
25
|
parseWorkflowJsonOutput
|
|
12
26
|
} from "../../../shared/@ai-setting/roy-agent-core-whw7jap0.js";
|
|
13
27
|
import"../../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
14
|
-
import
|
|
15
|
-
createLogger,
|
|
16
|
-
init_logger
|
|
17
|
-
} from "../../../shared/@ai-setting/roy-agent-core-shme7set.js";
|
|
28
|
+
import"../../../shared/@ai-setting/roy-agent-core-shme7set.js";
|
|
18
29
|
import"../../../shared/@ai-setting/roy-agent-core-7z9b1fm8.js";
|
|
19
30
|
import"../../../shared/@ai-setting/roy-agent-core-c6592r3c.js";
|
|
20
31
|
import"../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
21
32
|
|
|
22
|
-
// src/env/workflow/tools/run-workflow.ts
|
|
23
|
-
init_logger();
|
|
24
|
-
import { z } from "zod";
|
|
25
|
-
var logger = createLogger("run-workflow-tool");
|
|
26
|
-
var RunWorkflowInputSchema = z.object({
|
|
27
|
-
workflow_name: z.string().describe("Name of the workflow to run"),
|
|
28
|
-
input: z.record(z.any()).optional().describe("Input to pass to the workflow"),
|
|
29
|
-
sync: z.boolean().default(true).describe("Wait for completion (default: true)"),
|
|
30
|
-
timeout: z.number().positive().optional().describe("Timeout in milliseconds")
|
|
31
|
-
});
|
|
32
|
-
function createRunWorkflowTool(workflowService) {
|
|
33
|
-
return {
|
|
34
|
-
name: "run-workflow",
|
|
35
|
-
description: "Run a workflow by name with optional input. Returns run_id, status, output, error, and duration_ms.",
|
|
36
|
-
parameters: RunWorkflowInputSchema,
|
|
37
|
-
sandbox: {
|
|
38
|
-
enabled: false
|
|
39
|
-
},
|
|
40
|
-
permission: {
|
|
41
|
-
level: "safe"
|
|
42
|
-
},
|
|
43
|
-
metadata: {
|
|
44
|
-
category: "workflow",
|
|
45
|
-
tags: ["workflow", "execute", "run"],
|
|
46
|
-
version: "1.0.0",
|
|
47
|
-
experimental: false
|
|
48
|
-
},
|
|
49
|
-
execute: async (args, ctx) => {
|
|
50
|
-
const startTime = Date.now();
|
|
51
|
-
const { workflow_name, input, sync = true, timeout } = args;
|
|
52
|
-
logger.info(`Running workflow: ${workflow_name}`, { input, sync, timeout });
|
|
53
|
-
let timeoutHandle;
|
|
54
|
-
let durationMs;
|
|
55
|
-
try {
|
|
56
|
-
let result;
|
|
57
|
-
if (timeout) {
|
|
58
|
-
result = await Promise.race([
|
|
59
|
-
workflowService.runWorkflow(workflow_name, input, { sync }),
|
|
60
|
-
new Promise((_, reject) => {
|
|
61
|
-
timeoutHandle = setTimeout(() => {
|
|
62
|
-
reject(new Error("Workflow execution timed out"));
|
|
63
|
-
}, timeout);
|
|
64
|
-
})
|
|
65
|
-
]);
|
|
66
|
-
} else {
|
|
67
|
-
result = await workflowService.runWorkflow(workflow_name, input, { sync });
|
|
68
|
-
}
|
|
69
|
-
if (timeoutHandle) {
|
|
70
|
-
clearTimeout(timeoutHandle);
|
|
71
|
-
}
|
|
72
|
-
durationMs = Date.now() - startTime;
|
|
73
|
-
if (sync) {
|
|
74
|
-
return {
|
|
75
|
-
success: result.status === "completed",
|
|
76
|
-
output: {
|
|
77
|
-
run_id: result.runId,
|
|
78
|
-
status: result.status,
|
|
79
|
-
output: result.output,
|
|
80
|
-
error: result.error,
|
|
81
|
-
duration_ms: result.durationMs || durationMs
|
|
82
|
-
},
|
|
83
|
-
metadata: {
|
|
84
|
-
execution_time_ms: durationMs
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
} else {
|
|
88
|
-
return {
|
|
89
|
-
success: true,
|
|
90
|
-
output: {
|
|
91
|
-
run_id: result.runId,
|
|
92
|
-
status: result.status,
|
|
93
|
-
duration_ms: durationMs
|
|
94
|
-
},
|
|
95
|
-
metadata: {
|
|
96
|
-
execution_time_ms: durationMs
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
} catch (error) {
|
|
101
|
-
if (timeoutHandle) {
|
|
102
|
-
clearTimeout(timeoutHandle);
|
|
103
|
-
}
|
|
104
|
-
durationMs = Date.now() - startTime;
|
|
105
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
106
|
-
if (errorMessage.includes("Workflow not found")) {
|
|
107
|
-
return {
|
|
108
|
-
success: false,
|
|
109
|
-
output: "",
|
|
110
|
-
error: `Workflow not found: ${workflow_name}`,
|
|
111
|
-
metadata: {
|
|
112
|
-
execution_time_ms: durationMs
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
if (errorMessage.includes("abort") || errorMessage.includes("timed out")) {
|
|
117
|
-
return {
|
|
118
|
-
success: false,
|
|
119
|
-
output: "",
|
|
120
|
-
error: `Workflow execution timed out or was aborted: ${workflow_name}`,
|
|
121
|
-
metadata: {
|
|
122
|
-
execution_time_ms: durationMs
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
if (logger?.error) {
|
|
127
|
-
logger.error(`Failed to run workflow: ${workflow_name}`, { error: errorMessage });
|
|
128
|
-
}
|
|
129
|
-
return {
|
|
130
|
-
success: false,
|
|
131
|
-
output: "",
|
|
132
|
-
error: `Failed to run workflow ${workflow_name}: ${errorMessage}`,
|
|
133
|
-
metadata: {
|
|
134
|
-
execution_time_ms: durationMs
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
var _runWorkflowTool = null;
|
|
142
|
-
var _workflowService = null;
|
|
143
|
-
function initRunWorkflowTool(workflowService) {
|
|
144
|
-
_workflowService = workflowService;
|
|
145
|
-
_runWorkflowTool = createRunWorkflowTool(workflowService);
|
|
146
|
-
}
|
|
147
|
-
function getRunWorkflowTool() {
|
|
148
|
-
if (!_runWorkflowTool || !_workflowService) {
|
|
149
|
-
throw new Error("run-workflow tool not initialized. Call initRunWorkflowTool(workflowService) first.");
|
|
150
|
-
}
|
|
151
|
-
return _runWorkflowTool;
|
|
152
|
-
}
|
|
153
|
-
function resetRunWorkflowTool() {
|
|
154
|
-
_runWorkflowTool = null;
|
|
155
|
-
_workflowService = null;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
33
|
// src/env/workflow/tools/index.ts
|
|
159
34
|
init_submit_json_output_tool();
|
|
160
35
|
export {
|
|
@@ -162,11 +37,20 @@ export {
|
|
|
162
37
|
parseWorkflowJsonOutput,
|
|
163
38
|
initRunWorkflowTool,
|
|
164
39
|
getRunWorkflowTool,
|
|
40
|
+
createWorkflowRunStopTool,
|
|
41
|
+
createWorkflowRunStatusTool,
|
|
42
|
+
createWorkflowListTool,
|
|
43
|
+
createWorkflowGetTool,
|
|
165
44
|
createSubmitJsonOutputTool,
|
|
166
45
|
createRunWorkflowTool,
|
|
46
|
+
createLegacyRunWorkflowTool,
|
|
167
47
|
askUserToolInstance,
|
|
168
48
|
askUserTool,
|
|
49
|
+
WorkflowRunStopInputSchema,
|
|
50
|
+
WorkflowRunStatusInputSchema,
|
|
51
|
+
WorkflowListInputSchema,
|
|
169
52
|
WorkflowJsonOutputMarker,
|
|
53
|
+
WorkflowGetInputSchema,
|
|
170
54
|
WORKFLOW_SUBMIT_OUTPUT_TOOL_NAME,
|
|
171
55
|
RunWorkflowInputSchema,
|
|
172
56
|
AskUserInputSchema
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
init_template_resolver,
|
|
4
4
|
resolveTemplateString,
|
|
5
5
|
resolveTemplates
|
|
6
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
6
|
+
} from "../../../shared/@ai-setting/roy-agent-core-gb9gbkc3.js";
|
|
7
7
|
import {
|
|
8
8
|
getFromMapWithNormalization,
|
|
9
9
|
init_node_id_utils
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
PromptStore,
|
|
4
4
|
getBuiltInPrompt,
|
|
5
5
|
getBuiltInPromptNames
|
|
6
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
6
|
+
} from "./shared/@ai-setting/roy-agent-core-vcvgq9hy.js";
|
|
7
7
|
import {
|
|
8
8
|
LLMComponent,
|
|
9
9
|
LLMConfigSchema,
|
|
@@ -57,13 +57,13 @@ import {
|
|
|
57
57
|
BaseEnvironment,
|
|
58
58
|
generateDescendingId,
|
|
59
59
|
generateId
|
|
60
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
60
|
+
} from "./shared/@ai-setting/roy-agent-core-68sef3es.js";
|
|
61
61
|
import {
|
|
62
62
|
EventSourceComponent,
|
|
63
63
|
builtInHandlers,
|
|
64
64
|
getBuiltInHandler,
|
|
65
65
|
larkCliHandler
|
|
66
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
66
|
+
} from "./shared/@ai-setting/roy-agent-core-67yzhmg2.js";
|
|
67
67
|
import {
|
|
68
68
|
BUILT_IN_EVENT_SOURCE_TYPES,
|
|
69
69
|
BUILT_IN_EVENT_SOURCE_TYPE_LIST,
|
|
@@ -83,27 +83,27 @@ import {
|
|
|
83
83
|
import {
|
|
84
84
|
TaskTagPlugin,
|
|
85
85
|
createAutoTaskPlugin
|
|
86
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
86
|
+
} from "./shared/@ai-setting/roy-agent-core-78yzt2bq.js";
|
|
87
87
|
import {
|
|
88
88
|
BasePlugin
|
|
89
89
|
} from "./shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
90
90
|
import {
|
|
91
91
|
WorkflowComponent
|
|
92
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
92
|
+
} from "./shared/@ai-setting/roy-agent-core-v3t28k5n.js";
|
|
93
93
|
import {
|
|
94
94
|
init_node_registry_helper,
|
|
95
95
|
registerDecoratorNodeType
|
|
96
96
|
} from "./shared/@ai-setting/roy-agent-core-fjexv5nm.js";
|
|
97
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
97
|
+
import"./shared/@ai-setting/roy-agent-core-6b0r2e7j.js";
|
|
98
98
|
import"./shared/@ai-setting/roy-agent-core-m4qjnhz6.js";
|
|
99
99
|
import"./shared/@ai-setting/roy-agent-core-7z8fzxck.js";
|
|
100
100
|
import"./shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
101
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
101
|
+
import"./shared/@ai-setting/roy-agent-core-gb9gbkc3.js";
|
|
102
102
|
import"./shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
103
103
|
import"./shared/@ai-setting/roy-agent-core-4t40mkpv.js";
|
|
104
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
104
|
+
import"./shared/@ai-setting/roy-agent-core-j754zgb4.js";
|
|
105
105
|
import"./shared/@ai-setting/roy-agent-core-qnrf2aw6.js";
|
|
106
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
106
|
+
import"./shared/@ai-setting/roy-agent-core-a6j7g1qe.js";
|
|
107
107
|
import"./shared/@ai-setting/roy-agent-core-whw7jap0.js";
|
|
108
108
|
import {
|
|
109
109
|
Edge,
|
|
@@ -116,7 +116,7 @@ import"./shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
|
116
116
|
import {
|
|
117
117
|
AgentComponent,
|
|
118
118
|
AgentComponentConfigSchema
|
|
119
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
119
|
+
} from "./shared/@ai-setting/roy-agent-core-015vw11k.js";
|
|
120
120
|
import {
|
|
121
121
|
createInvokeConfig,
|
|
122
122
|
invoke,
|
|
@@ -129,22 +129,22 @@ import {
|
|
|
129
129
|
} from "./shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
130
130
|
import {
|
|
131
131
|
TaskComponent
|
|
132
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
132
|
+
} from "./shared/@ai-setting/roy-agent-core-qjv8537d.js";
|
|
133
133
|
import"./shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
134
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
134
|
+
import"./shared/@ai-setting/roy-agent-core-f6p7wwpd.js";
|
|
135
135
|
import {
|
|
136
136
|
SQLiteTaskStore,
|
|
137
137
|
getDefaultTaskDbPath
|
|
138
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
138
|
+
} from "./shared/@ai-setting/roy-agent-core-pcdzfwdv.js";
|
|
139
139
|
import {
|
|
140
140
|
AgentRegistry
|
|
141
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
141
|
+
} from "./shared/@ai-setting/roy-agent-core-mbre4fxg.js";
|
|
142
142
|
import {
|
|
143
143
|
XDG_PATHS,
|
|
144
144
|
getXDGPath,
|
|
145
145
|
getXDGPaths
|
|
146
146
|
} from "./shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
147
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
147
|
+
import"./shared/@ai-setting/roy-agent-core-7nh5h9fn.js";
|
|
148
148
|
import"./shared/@ai-setting/roy-agent-core-t94ktchq.js";
|
|
149
149
|
import {
|
|
150
150
|
TaskHookPoints
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./roy-agent-core-e25xkv53.js";
|
|
8
8
|
import {
|
|
9
9
|
AgentRegistry
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-mbre4fxg.js";
|
|
11
11
|
import {
|
|
12
12
|
ContextError
|
|
13
13
|
} from "./roy-agent-core-ctdhjv68.js";
|
|
@@ -299,6 +299,8 @@ class AgentComponent extends BaseComponent {
|
|
|
299
299
|
});
|
|
300
300
|
const loadedCount = await this.registry.load();
|
|
301
301
|
logger.info(`[AgentComponent] Loaded ${loadedCount} agents from config directory`);
|
|
302
|
+
this.registry.registerWorkflowAgent();
|
|
303
|
+
logger.info("[AgentComponent] Registered built-in workflow-agent");
|
|
302
304
|
for (const agentDef of this.registry.list()) {
|
|
303
305
|
if (!this.agents.has(agentDef.name)) {
|
|
304
306
|
const systemPrompt = await this.registry.getSystemPrompt(agentDef.name);
|
|
@@ -546,10 +548,32 @@ class AgentComponent extends BaseComponent {
|
|
|
546
548
|
this.doomLoopCaches.set(runId, new Map);
|
|
547
549
|
}
|
|
548
550
|
await this.resolveSystemPrompt(agent, agentName);
|
|
551
|
+
if (agent.config.systemPrompt) {
|
|
552
|
+
const sp = agent.config.systemPrompt;
|
|
553
|
+
if (sp.includes("{{workspace_dir}}")) {
|
|
554
|
+
const workspaceDir = this.env?.getComponent?.("config")?.get?.("workspace_dir") || process.cwd();
|
|
555
|
+
agent.config.systemPrompt = agent.config.systemPrompt.replaceAll("{{workspace_dir}}", String(workspaceDir));
|
|
556
|
+
}
|
|
557
|
+
if (sp.includes("{{memory}}")) {
|
|
558
|
+
try {
|
|
559
|
+
const memoryComponent = this.env?.getComponent?.("memory");
|
|
560
|
+
if (memoryComponent && typeof memoryComponent.recallMemory === "function") {
|
|
561
|
+
const memoryContent = await memoryComponent.recallMemory();
|
|
562
|
+
agent.config.systemPrompt = agent.config.systemPrompt.replace("{{memory}}", memoryContent || "(No memory)");
|
|
563
|
+
} else {
|
|
564
|
+
agent.config.systemPrompt = agent.config.systemPrompt.replace("{{memory}}", "(Memory component not available)");
|
|
565
|
+
}
|
|
566
|
+
} catch (err) {
|
|
567
|
+
logger.warn(`[AgentComponent._run] Failed to replace {{memory}}: ${err}`);
|
|
568
|
+
agent.config.systemPrompt = agent.config.systemPrompt.replace("{{memory}}", "(Failed to load memory)");
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}
|
|
549
572
|
const effectiveContext = {
|
|
550
573
|
...context,
|
|
551
574
|
agentType: agent.config.type,
|
|
552
575
|
model: context?.model ?? agent.config.model,
|
|
576
|
+
traceId: context?.metadata?.traceId ?? context?.traceId,
|
|
553
577
|
abort: abortController.signal
|
|
554
578
|
};
|
|
555
579
|
const result = {
|
|
@@ -634,6 +658,7 @@ class AgentComponent extends BaseComponent {
|
|
|
634
658
|
result.iterations = iteration;
|
|
635
659
|
logger.debug(`Iteration ${iteration} started`);
|
|
636
660
|
this.doomLoopCaches.set(runId, new Map);
|
|
661
|
+
hookCtx.currentToolCall = undefined;
|
|
637
662
|
hookCtx.maxIterations = agent.config.maxIterations;
|
|
638
663
|
try {
|
|
639
664
|
logger.debug(`[ReAct] Iteration ${iteration} buildMessages result: ${hookCtx.messages.length} messages`);
|
|
@@ -954,7 +979,11 @@ class AgentComponent extends BaseComponent {
|
|
|
954
979
|
historyMessageCount,
|
|
955
980
|
sessionId: effectiveContext.sessionId
|
|
956
981
|
});
|
|
957
|
-
|
|
982
|
+
if (effectiveContext.persistSession !== false) {
|
|
983
|
+
await this.recordSessionMessages(effectiveContext.sessionId, newMessages);
|
|
984
|
+
} else {
|
|
985
|
+
logger.debug(`Skipping session message recording (persistSession=false, sessionId=${effectiveContext.sessionId})`);
|
|
986
|
+
}
|
|
958
987
|
return this.finalizeResult(result, hookCtx);
|
|
959
988
|
});
|
|
960
989
|
}
|
|
@@ -1107,7 +1136,7 @@ ${additionInfo}`
|
|
|
1107
1136
|
context: toolContext
|
|
1108
1137
|
};
|
|
1109
1138
|
let result;
|
|
1110
|
-
const isLongRunningTool = toolName === "delegate_task" || toolName === "stop_task" || toolName === "bash";
|
|
1139
|
+
const isLongRunningTool = toolName === "delegate_task" || toolName === "stop_task" || toolName === "bash" || toolName === "workflow_run" || toolName === "run-workflow";
|
|
1111
1140
|
const isExtraTool = this.toolComponent?.getTool ? !this.toolComponent.getTool(toolName) : false;
|
|
1112
1141
|
if (isExtraTool) {
|
|
1113
1142
|
logger.debug(`[executeTool] Tool "${toolName}" is an extraTool, executing directly`);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAutoTaskPlugin
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-78yzt2bq.js";
|
|
4
4
|
import {
|
|
5
5
|
ContextError,
|
|
6
6
|
ErrorCodes
|
|
@@ -195,14 +195,12 @@ class BaseEnvironment extends BaseComponent {
|
|
|
195
195
|
});
|
|
196
196
|
logger.info(`[handle_query] Created default receptionist agent with deniedTools: ${defaultDeniedTools.length} tools denied`);
|
|
197
197
|
try {
|
|
198
|
-
const llmRef = this.getComponent("llm");
|
|
199
|
-
const toolRef = this.getComponent("tool");
|
|
200
198
|
const autoTaskPlugin = createAutoTaskPlugin({
|
|
201
|
-
|
|
202
|
-
|
|
199
|
+
threshold: 20,
|
|
200
|
+
agentComponent
|
|
203
201
|
});
|
|
204
202
|
agentComponent.registerPlugin("default", autoTaskPlugin);
|
|
205
|
-
logger.info("[handle_query] AutoTaskPlugin
|
|
203
|
+
logger.info("[handle_query] AutoTaskPlugin v4.4 registered on default agent (threshold=20)");
|
|
206
204
|
} catch (err) {
|
|
207
205
|
logger.warn(`[handle_query] Failed to register AutoTaskPlugin: ${err}`);
|
|
208
206
|
}
|