@ai-setting/roy-agent-core 1.6.5 → 1.6.7
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 +3 -3
- package/dist/env/event-source/index.js +1 -1
- package/dist/env/index.js +12 -12
- package/dist/env/llm/index.js +2 -2
- package/dist/env/plugin/index.js +1 -1
- package/dist/env/task/index.js +2 -2
- package/dist/env/task/tools/index.js +1 -1
- package/dist/env/tool/built-in/index.js +1 -1
- package/dist/env/tool/index.js +2 -2
- package/dist/env/workflow/engine/index.js +3 -3
- package/dist/env/workflow/index.js +5 -5
- package/dist/env/workflow/nodes/index.js +6 -2
- package/dist/env/workflow/tools/index.js +1 -1
- package/dist/index.js +14 -14
- package/dist/shared/@ai-setting/{roy-agent-core-ba6243hr.js → roy-agent-core-0tfv18rf.js} +175 -1
- package/dist/shared/@ai-setting/{roy-agent-core-z7dxedn6.js → roy-agent-core-2r1rc0fe.js} +12 -2
- package/dist/shared/@ai-setting/{roy-agent-core-xxfkvqqh.js → roy-agent-core-34xt19yg.js} +8 -7
- package/dist/shared/@ai-setting/{roy-agent-core-fb3wyr3d.js → roy-agent-core-39rvx3fw.js} +41 -3
- package/dist/shared/@ai-setting/{roy-agent-core-y1m7c2v7.js → roy-agent-core-8jmkghjc.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-65qs21kf.js → roy-agent-core-dcd1s7ct.js} +4 -1
- package/dist/shared/@ai-setting/{roy-agent-core-bcd3y74k.js → roy-agent-core-gdkq55yg.js} +3 -2
- package/dist/shared/@ai-setting/{roy-agent-core-r3209bcd.js → roy-agent-core-gw43m8yd.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-hp1n198d.js → roy-agent-core-jzza6c2r.js} +166 -45
- package/dist/shared/@ai-setting/{roy-agent-core-5rjccr3c.js → roy-agent-core-ka4b12eg.js} +88 -47
- package/dist/shared/@ai-setting/{roy-agent-core-p8zgxdgy.js → roy-agent-core-kenhsgnf.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-155408xq.js → roy-agent-core-r08qk37k.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-ktbkp661.js → roy-agent-core-sxqy40cs.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-vf72n6qn.js → roy-agent-core-w7mhnc4c.js} +22 -4
- package/package.json +1 -1
- /package/dist/shared/@ai-setting/{roy-agent-core-6kygfd9x.js → roy-agent-core-02n40zbs.js} +0 -0
package/dist/env/agent/index.js
CHANGED
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
AgentComponent,
|
|
3
3
|
AgentComponentConfigSchema,
|
|
4
4
|
SummaryAgent
|
|
5
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
6
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
7
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
5
|
+
} from "../../shared/@ai-setting/roy-agent-core-34xt19yg.js";
|
|
6
|
+
import"../../shared/@ai-setting/roy-agent-core-dcd1s7ct.js";
|
|
7
|
+
import"../../shared/@ai-setting/roy-agent-core-02n40zbs.js";
|
|
8
8
|
import"../../shared/@ai-setting/roy-agent-core-5h49ct1a.js";
|
|
9
9
|
import"../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
10
10
|
import"../../shared/@ai-setting/roy-agent-core-as3phr7n.js";
|
|
@@ -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-jzza6c2r.js";
|
|
14
14
|
import {
|
|
15
15
|
BUILT_IN_EVENT_SOURCE_TYPES,
|
|
16
16
|
BUILT_IN_EVENT_SOURCE_TYPE_LIST,
|
package/dist/env/index.js
CHANGED
|
@@ -5,7 +5,7 @@ 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-jzza6c2r.js";
|
|
9
9
|
import {
|
|
10
10
|
EventSourceInitHooks,
|
|
11
11
|
getDefaultConfigForType,
|
|
@@ -16,22 +16,22 @@ import {
|
|
|
16
16
|
import"../shared/@ai-setting/roy-agent-core-wmkx79b1.js";
|
|
17
17
|
import {
|
|
18
18
|
PluginComponent
|
|
19
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
19
|
+
} from "../shared/@ai-setting/roy-agent-core-2r1rc0fe.js";
|
|
20
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-kenhsgnf.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-39rvx3fw.js";
|
|
27
27
|
import"../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
28
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
28
|
+
import"../shared/@ai-setting/roy-agent-core-w7mhnc4c.js";
|
|
29
29
|
import"../shared/@ai-setting/roy-agent-core-q88vxmx5.js";
|
|
30
30
|
import"../shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
31
31
|
import"../shared/@ai-setting/roy-agent-core-hhrg314p.js";
|
|
32
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
32
|
+
import"../shared/@ai-setting/roy-agent-core-0tfv18rf.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-ka4b12eg.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";
|
|
@@ -41,14 +41,14 @@ import"../shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
|
41
41
|
import {
|
|
42
42
|
AgentComponent,
|
|
43
43
|
AgentComponentConfigSchema
|
|
44
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
45
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
46
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
44
|
+
} from "../shared/@ai-setting/roy-agent-core-34xt19yg.js";
|
|
45
|
+
import"../shared/@ai-setting/roy-agent-core-dcd1s7ct.js";
|
|
46
|
+
import"../shared/@ai-setting/roy-agent-core-02n40zbs.js";
|
|
47
47
|
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-gdkq55yg.js";
|
|
52
52
|
import"../shared/@ai-setting/roy-agent-core-amkqnyzy.js";
|
|
53
53
|
import"../shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
54
54
|
import"../shared/@ai-setting/roy-agent-core-c94yan0b.js";
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
getXDGPath,
|
|
62
62
|
getXDGPaths
|
|
63
63
|
} from "../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
64
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
64
|
+
import"../shared/@ai-setting/roy-agent-core-sxqy40cs.js";
|
|
65
65
|
import"../shared/@ai-setting/roy-agent-core-t94ktchq.js";
|
|
66
66
|
import"../shared/@ai-setting/roy-agent-core-1pg0fepg.js";
|
|
67
67
|
import {
|
package/dist/env/llm/index.js
CHANGED
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
ProviderCapabilitiesSchema,
|
|
9
9
|
ProviderConfigSchema,
|
|
10
10
|
ProviderManager
|
|
11
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
11
|
+
} from "../../shared/@ai-setting/roy-agent-core-r08qk37k.js";
|
|
12
12
|
import {
|
|
13
13
|
convertToSDKMessages,
|
|
14
14
|
createInvokeConfig,
|
|
15
15
|
invoke,
|
|
16
16
|
invokeNonStream,
|
|
17
17
|
parseModelString
|
|
18
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
18
|
+
} from "../../shared/@ai-setting/roy-agent-core-dcd1s7ct.js";
|
|
19
19
|
import"../../shared/@ai-setting/roy-agent-core-ctdhjv68.js";
|
|
20
20
|
import"../../shared/@ai-setting/roy-agent-core-8x4ngxcy.js";
|
|
21
21
|
import"../../shared/@ai-setting/roy-agent-core-qxhq8ven.js";
|
package/dist/env/plugin/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EventBusNotificationChannel,
|
|
3
3
|
PluginComponent
|
|
4
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
4
|
+
} from "../../shared/@ai-setting/roy-agent-core-2r1rc0fe.js";
|
|
5
5
|
import {
|
|
6
6
|
BasePlugin
|
|
7
7
|
} from "../../shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
package/dist/env/task/index.js
CHANGED
|
@@ -5,7 +5,7 @@ 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-gdkq55yg.js";
|
|
9
9
|
import"../../shared/@ai-setting/roy-agent-core-amkqnyzy.js";
|
|
10
10
|
import {
|
|
11
11
|
TaskEntityEventTypes
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
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
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
22
|
+
import"../../shared/@ai-setting/roy-agent-core-sxqy40cs.js";
|
|
23
23
|
import"../../shared/@ai-setting/roy-agent-core-t94ktchq.js";
|
|
24
24
|
import"../../shared/@ai-setting/roy-agent-core-1pg0fepg.js";
|
|
25
25
|
import"../../shared/@ai-setting/roy-agent-core-qxhq8ven.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
searchTasksTool,
|
|
10
10
|
treeTasksTool,
|
|
11
11
|
updateTaskTool
|
|
12
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
12
|
+
} from "../../../shared/@ai-setting/roy-agent-core-sxqy40cs.js";
|
|
13
13
|
import"../../../shared/@ai-setting/roy-agent-core-scp0afxg.js";
|
|
14
14
|
import"../../../shared/@ai-setting/roy-agent-core-cg146hmg.js";
|
|
15
15
|
import"../../../shared/@ai-setting/roy-agent-core-vyygk314.js";
|
|
@@ -8,7 +8,7 @@ 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-gw43m8yd.js";
|
|
12
12
|
import {
|
|
13
13
|
getUnderstandImageLLMProvider,
|
|
14
14
|
resetUnderstandImageLLMProvider,
|
package/dist/env/tool/index.js
CHANGED
|
@@ -9,7 +9,7 @@ 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-gw43m8yd.js";
|
|
13
13
|
import {
|
|
14
14
|
getUnderstandImageLLMProvider,
|
|
15
15
|
resetUnderstandImageLLMProvider,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
ToolValidator,
|
|
23
23
|
getMaxOutputSize,
|
|
24
24
|
setToolConfigComponent
|
|
25
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
25
|
+
} from "../../shared/@ai-setting/roy-agent-core-02n40zbs.js";
|
|
26
26
|
import"../../shared/@ai-setting/roy-agent-core-5h49ct1a.js";
|
|
27
27
|
import"../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
28
28
|
import"../../shared/@ai-setting/roy-agent-core-amkqnyzy.js";
|
|
@@ -5,12 +5,12 @@ 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-39rvx3fw.js";
|
|
9
9
|
import"../../../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
10
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
10
|
+
import"../../../shared/@ai-setting/roy-agent-core-w7mhnc4c.js";
|
|
11
11
|
import"../../../shared/@ai-setting/roy-agent-core-q88vxmx5.js";
|
|
12
12
|
import"../../../shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
13
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
13
|
+
import"../../../shared/@ai-setting/roy-agent-core-0tfv18rf.js";
|
|
14
14
|
import"../../../shared/@ai-setting/roy-agent-core-qnrf2aw6.js";
|
|
15
15
|
import"../../../shared/@ai-setting/roy-agent-core-1db4vpc6.js";
|
|
16
16
|
import {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WorkflowComponent
|
|
3
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
3
|
+
} from "../../shared/@ai-setting/roy-agent-core-kenhsgnf.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-39rvx3fw.js";
|
|
6
6
|
import"../../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
7
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
7
|
+
import"../../shared/@ai-setting/roy-agent-core-w7mhnc4c.js";
|
|
8
8
|
import"../../shared/@ai-setting/roy-agent-core-q88vxmx5.js";
|
|
9
9
|
import"../../shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
10
10
|
import"../../shared/@ai-setting/roy-agent-core-hhrg314p.js";
|
|
11
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
11
|
+
import"../../shared/@ai-setting/roy-agent-core-0tfv18rf.js";
|
|
12
12
|
import {
|
|
13
13
|
BaseEventSchema,
|
|
14
14
|
ControlPauseEventSchema,
|
|
@@ -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-ka4b12eg.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";
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
+
PythonCallNode,
|
|
2
3
|
SkillNode,
|
|
3
4
|
ToolNode,
|
|
4
5
|
WorkflowNode,
|
|
6
|
+
init_python_call_node,
|
|
5
7
|
init_skill_node,
|
|
6
8
|
init_tool_node,
|
|
7
9
|
init_workflow_node
|
|
8
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
10
|
+
} from "../../../shared/@ai-setting/roy-agent-core-0tfv18rf.js";
|
|
9
11
|
import"../../../shared/@ai-setting/roy-agent-core-cg146hmg.js";
|
|
10
12
|
import"../../../shared/@ai-setting/roy-agent-core-vyygk314.js";
|
|
11
13
|
import"../../../shared/@ai-setting/roy-agent-core-7z9b1fm8.js";
|
|
@@ -16,8 +18,10 @@ import"../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
|
16
18
|
init_tool_node();
|
|
17
19
|
init_skill_node();
|
|
18
20
|
init_workflow_node();
|
|
21
|
+
init_python_call_node();
|
|
19
22
|
export {
|
|
20
23
|
WorkflowNode,
|
|
21
24
|
ToolNode,
|
|
22
|
-
SkillNode
|
|
25
|
+
SkillNode,
|
|
26
|
+
PythonCallNode
|
|
23
27
|
};
|
|
@@ -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-ka4b12eg.js";
|
|
28
28
|
import {
|
|
29
29
|
WORKFLOW_SUBMIT_OUTPUT_TOOL_NAME,
|
|
30
30
|
WorkflowJsonOutputMarker,
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
ModelLimitsSchema,
|
|
10
10
|
ProviderCapabilitiesSchema,
|
|
11
11
|
ProviderConfigSchema
|
|
12
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
12
|
+
} from "./shared/@ai-setting/roy-agent-core-r08qk37k.js";
|
|
13
13
|
import {
|
|
14
14
|
ConfigComponent
|
|
15
15
|
} from "./shared/@ai-setting/roy-agent-core-33rhv946.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
grepTool,
|
|
27
27
|
readFileTool,
|
|
28
28
|
writeFileTool
|
|
29
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
29
|
+
} from "./shared/@ai-setting/roy-agent-core-gw43m8yd.js";
|
|
30
30
|
import {
|
|
31
31
|
ATTACH_FILE_MAX_BYTES,
|
|
32
32
|
getUnderstandImageLLMProvider,
|
|
@@ -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-jzza6c2r.js";
|
|
78
78
|
import {
|
|
79
79
|
BUILT_IN_EVENT_SOURCE_TYPES,
|
|
80
80
|
BUILT_IN_EVENT_SOURCE_TYPE_LIST,
|
|
@@ -90,7 +90,7 @@ import {
|
|
|
90
90
|
} from "./shared/@ai-setting/roy-agent-core-wmkx79b1.js";
|
|
91
91
|
import {
|
|
92
92
|
PluginComponent
|
|
93
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
93
|
+
} from "./shared/@ai-setting/roy-agent-core-2r1rc0fe.js";
|
|
94
94
|
import {
|
|
95
95
|
TaskTagPlugin,
|
|
96
96
|
createAutoTaskPlugin
|
|
@@ -100,20 +100,20 @@ import {
|
|
|
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-kenhsgnf.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-39rvx3fw.js";
|
|
109
109
|
import"./shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
110
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
110
|
+
import"./shared/@ai-setting/roy-agent-core-w7mhnc4c.js";
|
|
111
111
|
import"./shared/@ai-setting/roy-agent-core-q88vxmx5.js";
|
|
112
112
|
import"./shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
113
113
|
import"./shared/@ai-setting/roy-agent-core-hhrg314p.js";
|
|
114
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
114
|
+
import"./shared/@ai-setting/roy-agent-core-0tfv18rf.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-ka4b12eg.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";
|
|
@@ -129,18 +129,18 @@ import"./shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
|
129
129
|
import {
|
|
130
130
|
AgentComponent,
|
|
131
131
|
AgentComponentConfigSchema
|
|
132
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
132
|
+
} from "./shared/@ai-setting/roy-agent-core-34xt19yg.js";
|
|
133
133
|
import {
|
|
134
134
|
createInvokeConfig,
|
|
135
135
|
invoke,
|
|
136
136
|
invokeNonStream,
|
|
137
137
|
parseModelString
|
|
138
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
138
|
+
} from "./shared/@ai-setting/roy-agent-core-dcd1s7ct.js";
|
|
139
139
|
import {
|
|
140
140
|
ToolComponent,
|
|
141
141
|
ToolRegistry,
|
|
142
142
|
ToolValidator
|
|
143
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
143
|
+
} from "./shared/@ai-setting/roy-agent-core-02n40zbs.js";
|
|
144
144
|
import"./shared/@ai-setting/roy-agent-core-5h49ct1a.js";
|
|
145
145
|
import {
|
|
146
146
|
AskUserError,
|
|
@@ -148,7 +148,7 @@ 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-gdkq55yg.js";
|
|
152
152
|
import"./shared/@ai-setting/roy-agent-core-amkqnyzy.js";
|
|
153
153
|
import"./shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
154
154
|
import"./shared/@ai-setting/roy-agent-core-c94yan0b.js";
|
|
@@ -169,7 +169,7 @@ import {
|
|
|
169
169
|
getXDGPath,
|
|
170
170
|
getXDGPaths
|
|
171
171
|
} from "./shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
172
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
172
|
+
import"./shared/@ai-setting/roy-agent-core-sxqy40cs.js";
|
|
173
173
|
import"./shared/@ai-setting/roy-agent-core-t94ktchq.js";
|
|
174
174
|
import {
|
|
175
175
|
TaskHookPoints
|
|
@@ -355,4 +355,178 @@ class WorkflowNode {
|
|
|
355
355
|
}
|
|
356
356
|
var init_workflow_node = () => {};
|
|
357
357
|
|
|
358
|
-
|
|
358
|
+
// src/env/workflow/nodes/python-call-node.ts
|
|
359
|
+
import { spawn } from "node:child_process";
|
|
360
|
+
function buildPythonSource(module, functionName) {
|
|
361
|
+
return [
|
|
362
|
+
"import sys, json, traceback",
|
|
363
|
+
`_args = json.loads(sys.stdin.read() or "{}")`,
|
|
364
|
+
`from ${module} import ${functionName} as _fn`,
|
|
365
|
+
`try:`,
|
|
366
|
+
` _result = _fn(**_args)`,
|
|
367
|
+
` sys.stdout.write(json.dumps(_result, ensure_ascii=False, default=str))`,
|
|
368
|
+
` sys.stdout.write("\\n")`,
|
|
369
|
+
` sys.exit(0)`,
|
|
370
|
+
`except Exception as _e:`,
|
|
371
|
+
` sys.stderr.write("".join(traceback.format_exception(type(_e), _e, _e.__traceback__)))`,
|
|
372
|
+
` sys.exit(1)`
|
|
373
|
+
].join(`
|
|
374
|
+
`);
|
|
375
|
+
}
|
|
376
|
+
var DEFAULT_TIMEOUT_MS = 60000, DEFAULT_PYTHON = "python3", DEFAULT_ALLOW_LIST, FUNCTION_NAME_REGEX, MODULE_NAME_REGEX, PythonCallNode;
|
|
377
|
+
var init_python_call_node = __esm(() => {
|
|
378
|
+
init_decorator();
|
|
379
|
+
DEFAULT_ALLOW_LIST = {
|
|
380
|
+
prefix: ["investment_strategy"]
|
|
381
|
+
};
|
|
382
|
+
FUNCTION_NAME_REGEX = /^[A-Za-z_]\w*$/;
|
|
383
|
+
MODULE_NAME_REGEX = /^[A-Za-z_]\w*(\.[A-Za-z_]\w*)*$/;
|
|
384
|
+
PythonCallNode = class PythonCallNode {
|
|
385
|
+
definition;
|
|
386
|
+
type = "python_call";
|
|
387
|
+
id;
|
|
388
|
+
allowList;
|
|
389
|
+
spawnFn;
|
|
390
|
+
constructor(definition, options = {}) {
|
|
391
|
+
this.definition = definition;
|
|
392
|
+
this.id = definition.id;
|
|
393
|
+
this.allowList = options.allowList ?? DEFAULT_ALLOW_LIST;
|
|
394
|
+
this.spawnFn = options.spawnFn ?? spawn;
|
|
395
|
+
}
|
|
396
|
+
checkAllowList(module) {
|
|
397
|
+
if (!Array.isArray(this.allowList.prefix) || this.allowList.prefix.length === 0) {
|
|
398
|
+
return null;
|
|
399
|
+
}
|
|
400
|
+
for (const prefix of this.allowList.prefix) {
|
|
401
|
+
if (module === prefix || module.startsWith(prefix + ".")) {
|
|
402
|
+
return null;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
return `Module "${module}" is not allowed by the python_call allow-list (allowed prefixes: ${this.allowList.prefix.join(", ")})`;
|
|
406
|
+
}
|
|
407
|
+
parseOutput(stdout) {
|
|
408
|
+
const trimmed = stdout.trim();
|
|
409
|
+
if (trimmed === "")
|
|
410
|
+
return "";
|
|
411
|
+
try {
|
|
412
|
+
return JSON.parse(trimmed);
|
|
413
|
+
} catch {
|
|
414
|
+
return stdout.replace(/\n+$/, "");
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
async execute(context) {
|
|
418
|
+
const startTime = Date.now();
|
|
419
|
+
const rawConfig = context.resolvedConfig ?? this.definition.config ?? {};
|
|
420
|
+
try {
|
|
421
|
+
const module = typeof rawConfig.module === "string" ? rawConfig.module.trim() : "";
|
|
422
|
+
const functionName = typeof rawConfig.function === "string" ? rawConfig.function.trim() : "";
|
|
423
|
+
const args = rawConfig.args && typeof rawConfig.args === "object" && !Array.isArray(rawConfig.args) ? rawConfig.args : {};
|
|
424
|
+
const cwd = typeof rawConfig.cwd === "string" && rawConfig.cwd ? rawConfig.cwd : undefined;
|
|
425
|
+
const pythonBin = typeof rawConfig.python === "string" && rawConfig.python ? rawConfig.python : DEFAULT_PYTHON;
|
|
426
|
+
const timeoutMs = typeof rawConfig.timeout === "number" && rawConfig.timeout > 0 ? rawConfig.timeout : DEFAULT_TIMEOUT_MS;
|
|
427
|
+
if (!module) {
|
|
428
|
+
throw new Error(`PythonCallNode "${this.id}": config.module is required`);
|
|
429
|
+
}
|
|
430
|
+
if (!functionName) {
|
|
431
|
+
throw new Error(`PythonCallNode "${this.id}": config.function is required`);
|
|
432
|
+
}
|
|
433
|
+
if (!MODULE_NAME_REGEX.test(module)) {
|
|
434
|
+
throw new Error(`PythonCallNode "${this.id}": config.module "${module}" is not a valid Python module path`);
|
|
435
|
+
}
|
|
436
|
+
if (!FUNCTION_NAME_REGEX.test(functionName)) {
|
|
437
|
+
throw new Error(`PythonCallNode "${this.id}": config.function "${functionName}" is invalid (must match ${FUNCTION_NAME_REGEX})`);
|
|
438
|
+
}
|
|
439
|
+
const allowErr = this.checkAllowList(module);
|
|
440
|
+
if (allowErr) {
|
|
441
|
+
throw new Error(allowErr);
|
|
442
|
+
}
|
|
443
|
+
const hasResolvedConfig = context.resolvedConfig !== undefined;
|
|
444
|
+
const resolvedArgs = hasResolvedConfig ? args : context.templateResolver ? context.templateResolver.resolveValue(args) : args;
|
|
445
|
+
const source = buildPythonSource(module, functionName);
|
|
446
|
+
const child = this.spawnFn(pythonBin, ["-c", source], {
|
|
447
|
+
cwd,
|
|
448
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
449
|
+
env: { ...process.env }
|
|
450
|
+
});
|
|
451
|
+
const payload = JSON.stringify(resolvedArgs);
|
|
452
|
+
child.stdin?.end(payload);
|
|
453
|
+
const stdoutChunks = [];
|
|
454
|
+
const stderrChunks = [];
|
|
455
|
+
child.stdout?.on("data", (chunk) => stdoutChunks.push(chunk));
|
|
456
|
+
child.stderr?.on("data", (chunk) => stderrChunks.push(chunk));
|
|
457
|
+
const result = await new Promise((resolve, reject) => {
|
|
458
|
+
let timedOut = false;
|
|
459
|
+
let timer = null;
|
|
460
|
+
const onClose = (code) => {
|
|
461
|
+
if (timer)
|
|
462
|
+
clearTimeout(timer);
|
|
463
|
+
resolve({
|
|
464
|
+
stdout: Buffer.concat(stdoutChunks).toString("utf8"),
|
|
465
|
+
stderr: Buffer.concat(stderrChunks).toString("utf8"),
|
|
466
|
+
exitCode: code,
|
|
467
|
+
timedOut
|
|
468
|
+
});
|
|
469
|
+
};
|
|
470
|
+
const onError = (err) => {
|
|
471
|
+
if (timer)
|
|
472
|
+
clearTimeout(timer);
|
|
473
|
+
reject(err);
|
|
474
|
+
};
|
|
475
|
+
child.once("close", onClose);
|
|
476
|
+
child.once("error", onError);
|
|
477
|
+
if (timeoutMs > 0) {
|
|
478
|
+
timer = setTimeout(() => {
|
|
479
|
+
timedOut = true;
|
|
480
|
+
try {
|
|
481
|
+
if (typeof child.pid === "number") {
|
|
482
|
+
try {
|
|
483
|
+
process.kill(-child.pid, "SIGTERM");
|
|
484
|
+
} catch {
|
|
485
|
+
child.kill("SIGTERM");
|
|
486
|
+
}
|
|
487
|
+
} else {
|
|
488
|
+
child.kill("SIGTERM");
|
|
489
|
+
}
|
|
490
|
+
} catch {}
|
|
491
|
+
setTimeout(() => {
|
|
492
|
+
if (!child.killed) {
|
|
493
|
+
try {
|
|
494
|
+
child.kill("SIGKILL");
|
|
495
|
+
} catch {}
|
|
496
|
+
}
|
|
497
|
+
}, 200);
|
|
498
|
+
reject(new Error(`PythonCallNode "${this.id}": execution timed out after ${Math.round(timeoutMs / 1000)}s`));
|
|
499
|
+
}, timeoutMs);
|
|
500
|
+
}
|
|
501
|
+
});
|
|
502
|
+
if (result.timedOut) {
|
|
503
|
+
throw new Error(`PythonCallNode "${this.id}": execution timed out after ${Math.round(timeoutMs / 1000)}s`);
|
|
504
|
+
}
|
|
505
|
+
if (result.exitCode !== 0) {
|
|
506
|
+
const stderrTail = result.stderr.split(`
|
|
507
|
+
`).filter((l) => l.trim().length > 0).slice(-20).join(`
|
|
508
|
+
`);
|
|
509
|
+
throw new Error(`PythonCallNode "${this.id}": python exit code ${result.exitCode} (module=${module}, fn=${functionName})
|
|
510
|
+
${stderrTail}`);
|
|
511
|
+
}
|
|
512
|
+
const output = this.parseOutput(result.stdout);
|
|
513
|
+
return {
|
|
514
|
+
output,
|
|
515
|
+
error: undefined,
|
|
516
|
+
durationMs: Date.now() - startTime
|
|
517
|
+
};
|
|
518
|
+
} catch (error) {
|
|
519
|
+
return {
|
|
520
|
+
output: undefined,
|
|
521
|
+
error: error instanceof Error ? error : new Error(String(error)),
|
|
522
|
+
durationMs: Date.now() - startTime
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
};
|
|
527
|
+
__legacyDecorateClassTS([
|
|
528
|
+
TracedAs("workflow.python_call.execute")
|
|
529
|
+
], PythonCallNode.prototype, "execute", null);
|
|
530
|
+
});
|
|
531
|
+
|
|
532
|
+
export { ToolNode, init_tool_node, SkillNode, init_skill_node, WorkflowNode, init_workflow_node, PythonCallNode, init_python_call_node };
|
|
@@ -234,6 +234,9 @@ class PluginComponent extends BaseComponent {
|
|
|
234
234
|
return this.registry.has(name);
|
|
235
235
|
}
|
|
236
236
|
getConfig(name) {
|
|
237
|
+
if (name === undefined) {
|
|
238
|
+
return super.getConfig();
|
|
239
|
+
}
|
|
237
240
|
return this.configComponent?.get(`plugin.${name}`);
|
|
238
241
|
}
|
|
239
242
|
async registerAll(plugins) {
|
|
@@ -299,7 +302,12 @@ class PluginComponent extends BaseComponent {
|
|
|
299
302
|
registerTool(tool) {
|
|
300
303
|
const toolComponent = self.env?.getComponent("tool");
|
|
301
304
|
if (toolComponent) {
|
|
302
|
-
toolComponent.register(
|
|
305
|
+
toolComponent.register({
|
|
306
|
+
name: tool.name,
|
|
307
|
+
description: tool.description,
|
|
308
|
+
parameters: tool.parameters,
|
|
309
|
+
execute: async (args) => tool.handler(args)
|
|
310
|
+
});
|
|
303
311
|
self.logger.debug(`Registered tool: ${tool.name} (for plugin: ${plugin.name})`);
|
|
304
312
|
} else {
|
|
305
313
|
self.logger.warn(`Cannot register tool ${tool.name}: ToolComponent not available`);
|
|
@@ -309,7 +317,9 @@ class PluginComponent extends BaseComponent {
|
|
|
309
317
|
globalHookManager.register(hook.point, {
|
|
310
318
|
name: `${plugin.name}:${hook.point}`,
|
|
311
319
|
priority: hook.priority ?? plugin.priority,
|
|
312
|
-
execute:
|
|
320
|
+
execute: async (ctx) => {
|
|
321
|
+
await hook.handler(ctx);
|
|
322
|
+
}
|
|
313
323
|
});
|
|
314
324
|
self.logger.debug(`Registered hook: ${hook.point} (for plugin: ${plugin.name})`);
|
|
315
325
|
},
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
withTimeout
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-dcd1s7ct.js";
|
|
4
4
|
import {
|
|
5
5
|
truncateOutputInline
|
|
6
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-02n40zbs.js";
|
|
7
7
|
import {
|
|
8
8
|
AskUserError,
|
|
9
9
|
init_workflow_hil
|
|
@@ -672,7 +672,7 @@ class AgentComponent extends BaseComponent {
|
|
|
672
672
|
agentType: agent.config.type,
|
|
673
673
|
model: context?.model ?? agent.config.model,
|
|
674
674
|
traceId: context?.metadata?.traceId ?? context?.traceId,
|
|
675
|
-
abort: abortController.signal
|
|
675
|
+
abort: context?.abort ? AbortSignal.any([abortController.signal, context.abort]) : abortController.signal
|
|
676
676
|
};
|
|
677
677
|
const result = {
|
|
678
678
|
iterations: 0,
|
|
@@ -1405,13 +1405,14 @@ ${additionInfo}`
|
|
|
1405
1405
|
if (!sessionId) {
|
|
1406
1406
|
return;
|
|
1407
1407
|
}
|
|
1408
|
+
let filtered;
|
|
1408
1409
|
try {
|
|
1409
1410
|
const sessionComponent = this.env.getComponent("session");
|
|
1410
1411
|
if (!sessionComponent) {
|
|
1411
1412
|
logger.warn("SessionComponent not found, skipping session recording");
|
|
1412
1413
|
return;
|
|
1413
1414
|
}
|
|
1414
|
-
|
|
1415
|
+
filtered = [];
|
|
1415
1416
|
for (const msg of allMessages) {
|
|
1416
1417
|
if (msg.role === "system") {
|
|
1417
1418
|
continue;
|
|
@@ -1424,12 +1425,12 @@ ${additionInfo}`
|
|
|
1424
1425
|
continue;
|
|
1425
1426
|
}
|
|
1426
1427
|
}
|
|
1427
|
-
|
|
1428
|
+
filtered.push(this.messageConverter.fromModelMessage(msg, { sessionID: sessionId }));
|
|
1428
1429
|
}
|
|
1429
|
-
if (
|
|
1430
|
+
if (filtered.length === 0) {
|
|
1430
1431
|
return;
|
|
1431
1432
|
}
|
|
1432
|
-
await sessionComponent.addMessages(sessionId,
|
|
1433
|
+
await sessionComponent.addMessages(sessionId, filtered);
|
|
1433
1434
|
} catch (err) {
|
|
1434
1435
|
const kind = err && typeof err === "object" && "kind" in err ? err.kind : undefined;
|
|
1435
1436
|
if (kind === "lock_exhausted") {
|