@ai-setting/roy-agent-core 1.5.84 → 1.5.86
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 +8 -4
- package/dist/env/index.js +10 -11
- package/dist/env/prompt/index.js +1 -1
- package/dist/env/task/delegate/index.js +2 -2
- package/dist/env/task/index.js +3 -3
- package/dist/env/workflow/engine/index.js +3 -4
- package/dist/env/workflow/index.js +4 -5
- package/dist/env/workflow/tools/index.js +1 -1
- package/dist/index.js +17 -14
- package/dist/shared/@ai-setting/{roy-agent-core-whw7jap0.js → roy-agent-core-1db4vpc6.js} +3 -2
- package/dist/shared/@ai-setting/{roy-agent-core-m4qjnhz6.js → roy-agent-core-5kdw0p98.js} +114 -68
- package/dist/shared/@ai-setting/{roy-agent-core-ya1ayt1k.js → roy-agent-core-6mk0m4t3.js} +218 -4
- package/dist/shared/@ai-setting/{roy-agent-core-mbre4fxg.js → roy-agent-core-7z4xtrmw.js} +16 -0
- package/dist/shared/@ai-setting/{roy-agent-core-f6p7wwpd.js → roy-agent-core-bgw4dq11.js} +2 -7
- package/dist/shared/@ai-setting/{roy-agent-core-qjv8537d.js → roy-agent-core-bk5g94yd.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-bt7wezvg.js → roy-agent-core-dp73ghtz.js} +5 -16
- package/dist/shared/@ai-setting/{roy-agent-core-6b0r2e7j.js → roy-agent-core-gttz2jpm.js} +15 -52
- package/dist/shared/@ai-setting/{roy-agent-core-akepggsr.js → roy-agent-core-mmkyydw7.js} +26 -1
- package/dist/shared/@ai-setting/{roy-agent-core-xb4hvk1m.js → roy-agent-core-qhhxx2x2.js} +2 -1
- package/dist/shared/@ai-setting/{roy-agent-core-9mj7vzsm.js → roy-agent-core-vneyghpg.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-nc0n0bdc.js → roy-agent-core-xckhrs2p.js} +2 -3
- package/dist/shared/@ai-setting/{roy-agent-core-015vw11k.js → roy-agent-core-yx0vw1aw.js} +8 -6
- package/package.json +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-7z8fzxck.js +0 -265
- package/dist/shared/@ai-setting/roy-agent-core-qf9gvx02.js +0 -39
- /package/dist/shared/@ai-setting/{roy-agent-core-2grcjaad.js → roy-agent-core-4f3976cd.js} +0 -0
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-yx0vw1aw.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-7z4xtrmw.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 {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
1
|
+
import"../../shared/@ai-setting/roy-agent-core-4f3976cd.js";
|
|
2
2
|
import {
|
|
3
3
|
EventSourceComponent,
|
|
4
|
+
TimerInstance,
|
|
4
5
|
builtInHandlers,
|
|
5
6
|
getBuiltInHandler,
|
|
6
|
-
larkCliHandler
|
|
7
|
-
|
|
7
|
+
larkCliHandler,
|
|
8
|
+
timerHandler
|
|
9
|
+
} from "../../shared/@ai-setting/roy-agent-core-6mk0m4t3.js";
|
|
8
10
|
import {
|
|
9
11
|
BUILT_IN_EVENT_SOURCE_TYPES,
|
|
10
12
|
BUILT_IN_EVENT_SOURCE_TYPE_LIST,
|
|
@@ -13,7 +15,7 @@ import {
|
|
|
13
15
|
isBuiltInEventSourceType,
|
|
14
16
|
isValidEventSourceType,
|
|
15
17
|
validateEventSourceConfig
|
|
16
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
18
|
+
} from "../../shared/@ai-setting/roy-agent-core-qhhxx2x2.js";
|
|
17
19
|
import"../../shared/@ai-setting/roy-agent-core-v8xa6vs8.js";
|
|
18
20
|
import"../../shared/@ai-setting/roy-agent-core-7fdzfsm6.js";
|
|
19
21
|
import"../../shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
@@ -31,12 +33,14 @@ import"../../shared/@ai-setting/roy-agent-core-c6592r3c.js";
|
|
|
31
33
|
import"../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
32
34
|
export {
|
|
33
35
|
validateEventSourceConfig,
|
|
36
|
+
timerHandler,
|
|
34
37
|
larkCliHandler,
|
|
35
38
|
isValidEventSourceType,
|
|
36
39
|
isBuiltInEventSourceType,
|
|
37
40
|
getDefaultConfigForType,
|
|
38
41
|
getBuiltInHandler,
|
|
39
42
|
builtInHandlers,
|
|
43
|
+
TimerInstance,
|
|
40
44
|
EventSourceInitHooks,
|
|
41
45
|
EventSourceComponent,
|
|
42
46
|
BUILT_IN_EVENT_SOURCE_TYPE_LIST,
|
package/dist/env/index.js
CHANGED
|
@@ -5,14 +5,14 @@ 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-6mk0m4t3.js";
|
|
9
9
|
import {
|
|
10
10
|
EventSourceInitHooks,
|
|
11
11
|
getDefaultConfigForType,
|
|
12
12
|
isBuiltInEventSourceType,
|
|
13
13
|
isValidEventSourceType,
|
|
14
14
|
validateEventSourceConfig
|
|
15
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
15
|
+
} from "../shared/@ai-setting/roy-agent-core-qhhxx2x2.js";
|
|
16
16
|
import"../shared/@ai-setting/roy-agent-core-v8xa6vs8.js";
|
|
17
17
|
import {
|
|
18
18
|
PluginComponent
|
|
@@ -21,11 +21,10 @@ import"../shared/@ai-setting/roy-agent-core-7fdzfsm6.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-dp73ghtz.js";
|
|
25
25
|
import"../shared/@ai-setting/roy-agent-core-fjexv5nm.js";
|
|
26
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
27
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
28
|
-
import"../shared/@ai-setting/roy-agent-core-7z8fzxck.js";
|
|
26
|
+
import"../shared/@ai-setting/roy-agent-core-gttz2jpm.js";
|
|
27
|
+
import"../shared/@ai-setting/roy-agent-core-5kdw0p98.js";
|
|
29
28
|
import"../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
30
29
|
import"../shared/@ai-setting/roy-agent-core-gb9gbkc3.js";
|
|
31
30
|
import"../shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
@@ -33,23 +32,23 @@ import"../shared/@ai-setting/roy-agent-core-hhrg314p.js";
|
|
|
33
32
|
import"../shared/@ai-setting/roy-agent-core-j754zgb4.js";
|
|
34
33
|
import"../shared/@ai-setting/roy-agent-core-qnrf2aw6.js";
|
|
35
34
|
import"../shared/@ai-setting/roy-agent-core-r5axf0ad.js";
|
|
36
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
35
|
+
import"../shared/@ai-setting/roy-agent-core-1db4vpc6.js";
|
|
37
36
|
import"../shared/@ai-setting/roy-agent-core-tq9528d3.js";
|
|
38
37
|
import"../shared/@ai-setting/roy-agent-core-h0x19xgn.js";
|
|
39
38
|
import"../shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
40
39
|
import {
|
|
41
40
|
AgentComponent,
|
|
42
41
|
AgentComponentConfigSchema
|
|
43
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
42
|
+
} from "../shared/@ai-setting/roy-agent-core-yx0vw1aw.js";
|
|
44
43
|
import"../shared/@ai-setting/roy-agent-core-r0m0at3x.js";
|
|
45
44
|
import"../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
46
45
|
import {
|
|
47
46
|
TaskComponent
|
|
48
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
47
|
+
} from "../shared/@ai-setting/roy-agent-core-bk5g94yd.js";
|
|
49
48
|
import"../shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
50
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
49
|
+
import"../shared/@ai-setting/roy-agent-core-bgw4dq11.js";
|
|
51
50
|
import"../shared/@ai-setting/roy-agent-core-pcdzfwdv.js";
|
|
52
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
51
|
+
import"../shared/@ai-setting/roy-agent-core-7z4xtrmw.js";
|
|
53
52
|
import {
|
|
54
53
|
XDG_PATHS,
|
|
55
54
|
getXDGPath,
|
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-mmkyydw7.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-bgw4dq11.js";
|
|
7
|
+
import"../../../shared/@ai-setting/roy-agent-core-7z4xtrmw.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,16 +5,16 @@ 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-bk5g94yd.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-bgw4dq11.js";
|
|
13
13
|
import {
|
|
14
14
|
SQLiteTaskStore,
|
|
15
15
|
getDefaultTaskDbPath
|
|
16
16
|
} from "../../shared/@ai-setting/roy-agent-core-pcdzfwdv.js";
|
|
17
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
17
|
+
import"../../shared/@ai-setting/roy-agent-core-7z4xtrmw.js";
|
|
18
18
|
import"../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
19
19
|
import"../../shared/@ai-setting/roy-agent-core-7nh5h9fn.js";
|
|
20
20
|
import"../../shared/@ai-setting/roy-agent-core-t94ktchq.js";
|
|
@@ -6,15 +6,14 @@ import {
|
|
|
6
6
|
Scheduler,
|
|
7
7
|
WorkflowEngine,
|
|
8
8
|
init_engine
|
|
9
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
10
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
11
|
-
import"../../../shared/@ai-setting/roy-agent-core-7z8fzxck.js";
|
|
9
|
+
} from "../../../shared/@ai-setting/roy-agent-core-gttz2jpm.js";
|
|
10
|
+
import"../../../shared/@ai-setting/roy-agent-core-5kdw0p98.js";
|
|
12
11
|
import"../../../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
13
12
|
import"../../../shared/@ai-setting/roy-agent-core-gb9gbkc3.js";
|
|
14
13
|
import"../../../shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
15
14
|
import"../../../shared/@ai-setting/roy-agent-core-j754zgb4.js";
|
|
16
15
|
import"../../../shared/@ai-setting/roy-agent-core-qnrf2aw6.js";
|
|
17
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
16
|
+
import"../../../shared/@ai-setting/roy-agent-core-1db4vpc6.js";
|
|
18
17
|
import"../../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
19
18
|
import"../../../shared/@ai-setting/roy-agent-core-7tp56w6n.js";
|
|
20
19
|
import"../../../shared/@ai-setting/roy-agent-core-qg4rma4c.js";
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WorkflowComponent
|
|
3
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
3
|
+
} from "../../shared/@ai-setting/roy-agent-core-dp73ghtz.js";
|
|
4
4
|
import"../../shared/@ai-setting/roy-agent-core-fjexv5nm.js";
|
|
5
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
6
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
7
|
-
import"../../shared/@ai-setting/roy-agent-core-7z8fzxck.js";
|
|
5
|
+
import"../../shared/@ai-setting/roy-agent-core-gttz2jpm.js";
|
|
6
|
+
import"../../shared/@ai-setting/roy-agent-core-5kdw0p98.js";
|
|
8
7
|
import"../../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
9
8
|
import"../../shared/@ai-setting/roy-agent-core-gb9gbkc3.js";
|
|
10
9
|
import"../../shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
@@ -62,7 +61,7 @@ import {
|
|
|
62
61
|
unresolvedVariable
|
|
63
62
|
} from "../../shared/@ai-setting/roy-agent-core-qnrf2aw6.js";
|
|
64
63
|
import"../../shared/@ai-setting/roy-agent-core-r5axf0ad.js";
|
|
65
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
64
|
+
import"../../shared/@ai-setting/roy-agent-core-1db4vpc6.js";
|
|
66
65
|
import"../../shared/@ai-setting/roy-agent-core-tq9528d3.js";
|
|
67
66
|
import {
|
|
68
67
|
Edge,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
createSubmitJsonOutputTool,
|
|
30
30
|
init_submit_json_output_tool,
|
|
31
31
|
parseWorkflowJsonOutput
|
|
32
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
32
|
+
} from "../../../shared/@ai-setting/roy-agent-core-1db4vpc6.js";
|
|
33
33
|
import"../../../shared/@ai-setting/roy-agent-core-tq9528d3.js";
|
|
34
34
|
import"../../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
35
35
|
import"../../../shared/@ai-setting/roy-agent-core-k05v31rc.js";
|
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-mmkyydw7.js";
|
|
7
7
|
import {
|
|
8
8
|
LLMComponent,
|
|
9
9
|
LLMConfigSchema,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
closeDatabase
|
|
38
38
|
} from "./shared/@ai-setting/roy-agent-core-h4h55x4h.js";
|
|
39
39
|
import"./shared/@ai-setting/roy-agent-core-3sv590cv.js";
|
|
40
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
40
|
+
import"./shared/@ai-setting/roy-agent-core-4f3976cd.js";
|
|
41
41
|
import {
|
|
42
42
|
MemoryComponent
|
|
43
43
|
} from "./shared/@ai-setting/roy-agent-core-2h38rvyj.js";
|
|
@@ -61,10 +61,12 @@ import {
|
|
|
61
61
|
} from "./shared/@ai-setting/roy-agent-core-29fh9mxg.js";
|
|
62
62
|
import {
|
|
63
63
|
EventSourceComponent,
|
|
64
|
+
TimerInstance,
|
|
64
65
|
builtInHandlers,
|
|
65
66
|
getBuiltInHandler,
|
|
66
|
-
larkCliHandler
|
|
67
|
-
|
|
67
|
+
larkCliHandler,
|
|
68
|
+
timerHandler
|
|
69
|
+
} from "./shared/@ai-setting/roy-agent-core-6mk0m4t3.js";
|
|
68
70
|
import {
|
|
69
71
|
BUILT_IN_EVENT_SOURCE_TYPES,
|
|
70
72
|
BUILT_IN_EVENT_SOURCE_TYPE_LIST,
|
|
@@ -73,7 +75,7 @@ import {
|
|
|
73
75
|
isBuiltInEventSourceType,
|
|
74
76
|
isValidEventSourceType,
|
|
75
77
|
validateEventSourceConfig
|
|
76
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
78
|
+
} from "./shared/@ai-setting/roy-agent-core-qhhxx2x2.js";
|
|
77
79
|
import {
|
|
78
80
|
LogTraceComponent,
|
|
79
81
|
LogTraceConfigSchema
|
|
@@ -90,14 +92,13 @@ import {
|
|
|
90
92
|
} from "./shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
91
93
|
import {
|
|
92
94
|
WorkflowComponent
|
|
93
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
95
|
+
} from "./shared/@ai-setting/roy-agent-core-dp73ghtz.js";
|
|
94
96
|
import {
|
|
95
97
|
init_node_registry_helper,
|
|
96
98
|
registerDecoratorNodeType
|
|
97
99
|
} from "./shared/@ai-setting/roy-agent-core-fjexv5nm.js";
|
|
98
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
99
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
100
|
-
import"./shared/@ai-setting/roy-agent-core-7z8fzxck.js";
|
|
100
|
+
import"./shared/@ai-setting/roy-agent-core-gttz2jpm.js";
|
|
101
|
+
import"./shared/@ai-setting/roy-agent-core-5kdw0p98.js";
|
|
101
102
|
import"./shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
102
103
|
import"./shared/@ai-setting/roy-agent-core-gb9gbkc3.js";
|
|
103
104
|
import"./shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
@@ -105,7 +106,7 @@ import"./shared/@ai-setting/roy-agent-core-hhrg314p.js";
|
|
|
105
106
|
import"./shared/@ai-setting/roy-agent-core-j754zgb4.js";
|
|
106
107
|
import"./shared/@ai-setting/roy-agent-core-qnrf2aw6.js";
|
|
107
108
|
import"./shared/@ai-setting/roy-agent-core-r5axf0ad.js";
|
|
108
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
109
|
+
import"./shared/@ai-setting/roy-agent-core-1db4vpc6.js";
|
|
109
110
|
import"./shared/@ai-setting/roy-agent-core-tq9528d3.js";
|
|
110
111
|
import {
|
|
111
112
|
Edge,
|
|
@@ -118,7 +119,7 @@ import"./shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
|
118
119
|
import {
|
|
119
120
|
AgentComponent,
|
|
120
121
|
AgentComponentConfigSchema
|
|
121
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
122
|
+
} from "./shared/@ai-setting/roy-agent-core-yx0vw1aw.js";
|
|
122
123
|
import {
|
|
123
124
|
createInvokeConfig,
|
|
124
125
|
invoke,
|
|
@@ -131,16 +132,16 @@ import {
|
|
|
131
132
|
} from "./shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
132
133
|
import {
|
|
133
134
|
TaskComponent
|
|
134
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
135
|
+
} from "./shared/@ai-setting/roy-agent-core-bk5g94yd.js";
|
|
135
136
|
import"./shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
136
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
137
|
+
import"./shared/@ai-setting/roy-agent-core-bgw4dq11.js";
|
|
137
138
|
import {
|
|
138
139
|
SQLiteTaskStore,
|
|
139
140
|
getDefaultTaskDbPath
|
|
140
141
|
} from "./shared/@ai-setting/roy-agent-core-pcdzfwdv.js";
|
|
141
142
|
import {
|
|
142
143
|
AgentRegistry
|
|
143
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
144
|
+
} from "./shared/@ai-setting/roy-agent-core-7z4xtrmw.js";
|
|
144
145
|
import {
|
|
145
146
|
XDG_PATHS,
|
|
146
147
|
getXDGPath,
|
|
@@ -347,6 +348,7 @@ export {
|
|
|
347
348
|
writeFileTool,
|
|
348
349
|
wrapFunction,
|
|
349
350
|
validateEventSourceConfig,
|
|
351
|
+
timerHandler,
|
|
350
352
|
setQuietMode,
|
|
351
353
|
setConfigComponent as setLoggerConfigComponent,
|
|
352
354
|
setLogDirOverride,
|
|
@@ -406,6 +408,7 @@ export {
|
|
|
406
408
|
ToolRegistry,
|
|
407
409
|
ToolError,
|
|
408
410
|
ToolComponent,
|
|
411
|
+
TimerInstance,
|
|
409
412
|
TaskTagPlugin,
|
|
410
413
|
TaskHookPoints,
|
|
411
414
|
TaskComponent,
|
|
@@ -109,7 +109,7 @@ var init_json_schema_to_zod = __esm(() => {
|
|
|
109
109
|
});
|
|
110
110
|
|
|
111
111
|
// src/env/workflow/tools/submit-json-output-tool.ts
|
|
112
|
-
function createSubmitJsonOutputTool(schema) {
|
|
112
|
+
function createSubmitJsonOutputTool(schema, hookCtx) {
|
|
113
113
|
const parameters = jsonSchemaToZod(schema);
|
|
114
114
|
return {
|
|
115
115
|
name: WORKFLOW_SUBMIT_OUTPUT_TOOL_NAME,
|
|
@@ -117,6 +117,7 @@ function createSubmitJsonOutputTool(schema) {
|
|
|
117
117
|
parameters,
|
|
118
118
|
async execute(args) {
|
|
119
119
|
const parsed = parameters.parse(args);
|
|
120
|
+
hookCtx.structuredOutputExtracted = parsed;
|
|
120
121
|
return {
|
|
121
122
|
success: true,
|
|
122
123
|
output: `${WorkflowJsonOutputMarker}:${JSON.stringify(parsed)}`
|
|
@@ -125,7 +126,7 @@ function createSubmitJsonOutputTool(schema) {
|
|
|
125
126
|
metadata: {
|
|
126
127
|
category: "workflow",
|
|
127
128
|
tags: ["structured-output"],
|
|
128
|
-
version: "1.
|
|
129
|
+
version: "1.1.0"
|
|
129
130
|
}
|
|
130
131
|
};
|
|
131
132
|
}
|
|
@@ -1,59 +1,138 @@
|
|
|
1
|
-
import {
|
|
2
|
-
WORKFLOW_JSON_OUTPUT_PLUGIN_KEY,
|
|
3
|
-
init_workflow_json_output_plugin,
|
|
4
|
-
registerWorkflowJsonOutputPlugin,
|
|
5
|
-
tracedExtractStructuredJsonViaLlm
|
|
6
|
-
} from "./roy-agent-core-7z8fzxck.js";
|
|
7
1
|
import {
|
|
8
2
|
createSubmitJsonOutputTool,
|
|
9
3
|
init_submit_json_output_tool
|
|
10
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-1db4vpc6.js";
|
|
11
5
|
import {
|
|
12
6
|
AskUserError,
|
|
13
7
|
init_workflow_hil
|
|
14
8
|
} from "./roy-agent-core-e25xkv53.js";
|
|
9
|
+
import {
|
|
10
|
+
globalHookManager,
|
|
11
|
+
init_global_hook_manager
|
|
12
|
+
} from "./roy-agent-core-7tp56w6n.js";
|
|
15
13
|
import {
|
|
16
14
|
TracedAs,
|
|
17
|
-
init_decorator
|
|
15
|
+
init_decorator,
|
|
16
|
+
wrapFunction
|
|
18
17
|
} from "./roy-agent-core-k05v31rc.js";
|
|
18
|
+
import {
|
|
19
|
+
createLogger,
|
|
20
|
+
init_logger
|
|
21
|
+
} from "./roy-agent-core-shme7set.js";
|
|
19
22
|
import {
|
|
20
23
|
__esm,
|
|
21
24
|
__legacyDecorateClassTS
|
|
22
25
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
23
26
|
|
|
27
|
+
// src/env/workflow/plugins/workflow-json-output-plugin.ts
|
|
28
|
+
function registerWorkflowJsonOutputPlugin(options = undefined) {
|
|
29
|
+
if (registered) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (options?.agentComponent) {
|
|
33
|
+
agentComponentRef = options.agentComponent;
|
|
34
|
+
}
|
|
35
|
+
registered = true;
|
|
36
|
+
globalHookManager.register(HOOK_POINT, {
|
|
37
|
+
name: HOOK_NAME,
|
|
38
|
+
pluginName: WORKFLOW_JSON_OUTPUT_PLUGIN_NAME,
|
|
39
|
+
sourceId: WORKFLOW_JSON_OUTPUT_SOURCE_ID,
|
|
40
|
+
priority: 100,
|
|
41
|
+
description: "Extract structured JSON output by invoking the json-extract sub-agent on the main session history",
|
|
42
|
+
execute: async (wrapper) => {
|
|
43
|
+
const hookCtx = wrapper.data;
|
|
44
|
+
await tracedRunWorkflowJsonOutputExtraction(hookCtx);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
logger.info("Workflow JSON output plugin registered on agent:after.react");
|
|
48
|
+
}
|
|
49
|
+
async function runWorkflowJsonOutputExtraction(hookCtx) {
|
|
50
|
+
const schema = hookCtx.context.metadata?.outputSchema;
|
|
51
|
+
if (!schema) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (hookCtx.error instanceof AskUserError) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (hookCtx.structuredOutputExtracted) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (!agentComponentRef) {
|
|
61
|
+
logger.warn("Workflow JSON extraction: agentComponent not registered. " + "Plugin cannot invoke json-extract sub-agent. " + "Ensure registerWorkflowJsonOutputPlugin({ agentComponent }) was called.");
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const sessionId = hookCtx.context.sessionId;
|
|
65
|
+
if (!sessionId) {
|
|
66
|
+
logger.warn("Workflow JSON extraction: no sessionId in hookCtx.context. " + "Cannot reuse main session history for json-extract sub-agent.");
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
try {
|
|
70
|
+
const submitTool = createSubmitJsonOutputTool(schema, hookCtx);
|
|
71
|
+
const submitToolAsExtra = {
|
|
72
|
+
name: submitTool.name,
|
|
73
|
+
description: submitTool.description ?? "",
|
|
74
|
+
parameters: submitTool.parameters,
|
|
75
|
+
execute: submitTool.execute
|
|
76
|
+
};
|
|
77
|
+
const extractContext = {
|
|
78
|
+
sessionId,
|
|
79
|
+
extraTools: [submitToolAsExtra],
|
|
80
|
+
persistSession: false,
|
|
81
|
+
abort: hookCtx.context.abort
|
|
82
|
+
};
|
|
83
|
+
const result = await agentComponentRef.run("json-extract", "", extractContext);
|
|
84
|
+
if (result.error) {
|
|
85
|
+
logger.warn(`Workflow JSON extraction: json-extract sub-agent returned error: ${result.error}`);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
if (hookCtx.structuredOutputExtracted) {
|
|
89
|
+
logger.info("Workflow JSON output extracted via json-extract sub-agent " + `(iterations=${result.iterations}, toolCalls=${result.toolCalls?.length ?? 0})`);
|
|
90
|
+
} else {
|
|
91
|
+
logger.warn("Workflow JSON extraction: json-extract sub-agent did not call workflow_submit_output. " + "Check that the model supports tool calls.");
|
|
92
|
+
}
|
|
93
|
+
} catch (error) {
|
|
94
|
+
logger.error(`Workflow JSON extraction: json-extract sub-agent threw: ${error instanceof Error ? error.message : String(error)}`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
var logger, WORKFLOW_JSON_OUTPUT_SOURCE_ID = "workflow", WORKFLOW_JSON_OUTPUT_PLUGIN_NAME = "json-output", WORKFLOW_JSON_OUTPUT_PLUGIN_KEY, HOOK_POINT = "agent:after.react", HOOK_NAME, registered = false, agentComponentRef = null, tracedRunWorkflowJsonOutputExtraction;
|
|
98
|
+
var init_workflow_json_output_plugin = __esm(() => {
|
|
99
|
+
init_global_hook_manager();
|
|
100
|
+
init_workflow_hil();
|
|
101
|
+
init_submit_json_output_tool();
|
|
102
|
+
init_logger();
|
|
103
|
+
init_decorator();
|
|
104
|
+
logger = createLogger("WorkflowJsonOutputPlugin");
|
|
105
|
+
WORKFLOW_JSON_OUTPUT_PLUGIN_KEY = `${WORKFLOW_JSON_OUTPUT_SOURCE_ID}:${WORKFLOW_JSON_OUTPUT_PLUGIN_NAME}`;
|
|
106
|
+
HOOK_NAME = `${WORKFLOW_JSON_OUTPUT_PLUGIN_NAME}:${HOOK_POINT}`;
|
|
107
|
+
tracedRunWorkflowJsonOutputExtraction = wrapFunction(runWorkflowJsonOutputExtraction, "workflow.json_output.extraction", { recordParams: true, recordResult: true, log: true });
|
|
108
|
+
});
|
|
109
|
+
|
|
24
110
|
// src/env/workflow/nodes/agent-component-adapter.ts
|
|
25
111
|
var AgentComponentAdapter;
|
|
26
112
|
var init_agent_component_adapter = __esm(() => {
|
|
27
113
|
init_workflow_hil();
|
|
28
114
|
init_workflow_json_output_plugin();
|
|
29
115
|
init_decorator();
|
|
30
|
-
init_submit_json_output_tool();
|
|
31
116
|
AgentComponentAdapter = class AgentComponentAdapter {
|
|
32
117
|
agentComponent;
|
|
33
118
|
options;
|
|
34
119
|
_sessionComponent;
|
|
35
|
-
_llmComponent;
|
|
36
120
|
agentSessionPrefix = "agent";
|
|
37
121
|
_currentAgentSessionId;
|
|
38
122
|
pendingSessions = new Map;
|
|
39
123
|
runSessionToAgentSessions = new Map;
|
|
40
124
|
jsonOutputPluginRegistered = false;
|
|
41
|
-
constructor(agentComponent, options = {}, _sessionComponent
|
|
125
|
+
constructor(agentComponent, options = {}, _sessionComponent) {
|
|
42
126
|
this.agentComponent = agentComponent;
|
|
43
127
|
this.options = options;
|
|
44
128
|
this._sessionComponent = _sessionComponent;
|
|
45
|
-
this._llmComponent = _llmComponent;
|
|
46
|
-
this.ensureJsonOutputPluginRegistered();
|
|
47
|
-
}
|
|
48
|
-
setLLMComponent(llmComponent) {
|
|
49
|
-
this._llmComponent = llmComponent;
|
|
50
129
|
this.ensureJsonOutputPluginRegistered();
|
|
51
130
|
}
|
|
52
131
|
ensureJsonOutputPluginRegistered() {
|
|
53
|
-
if (this.jsonOutputPluginRegistered
|
|
132
|
+
if (this.jsonOutputPluginRegistered) {
|
|
54
133
|
return;
|
|
55
134
|
}
|
|
56
|
-
registerWorkflowJsonOutputPlugin(this.
|
|
135
|
+
registerWorkflowJsonOutputPlugin({ agentComponent: this.agentComponent });
|
|
57
136
|
this.jsonOutputPluginRegistered = true;
|
|
58
137
|
}
|
|
59
138
|
setSessionComponent(sessionComponent) {
|
|
@@ -84,19 +163,21 @@ var init_agent_component_adapter = __esm(() => {
|
|
|
84
163
|
const workflowSessionId = config.workflowSessionId;
|
|
85
164
|
const isResume = !!resumeOptions?.userQuery;
|
|
86
165
|
let agentSessionId = resumeOptions?.agentSessionId || config.agentSessionId || this._currentAgentSessionId;
|
|
87
|
-
if (!agentSessionId
|
|
166
|
+
if (!agentSessionId) {
|
|
88
167
|
agentSessionId = `${this.agentSessionPrefix}_${runId}_${nodeId}_${Date.now()}`;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
168
|
+
if (this._sessionComponent) {
|
|
169
|
+
try {
|
|
170
|
+
await this._sessionComponent.create({
|
|
171
|
+
title: `Agent Session: ${config.type} (${agentSessionId})`,
|
|
172
|
+
metadata: {
|
|
173
|
+
type: "agent",
|
|
174
|
+
workflowRunId: runId,
|
|
175
|
+
workflowNodeId: nodeId
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
} catch (error) {
|
|
179
|
+
console.warn(`Failed to create agent session ${agentSessionId}:`, error);
|
|
180
|
+
}
|
|
100
181
|
}
|
|
101
182
|
}
|
|
102
183
|
if (agentSessionId) {
|
|
@@ -126,9 +207,7 @@ var init_agent_component_adapter = __esm(() => {
|
|
|
126
207
|
if (config.options?.timeout) {
|
|
127
208
|
context.abort = new AbortController;
|
|
128
209
|
}
|
|
129
|
-
|
|
130
|
-
context.sessionId = agentSessionId;
|
|
131
|
-
}
|
|
210
|
+
context.sessionId = agentSessionId;
|
|
132
211
|
if (config.options?.allowedTools) {
|
|
133
212
|
context.allowedTools = config.options.allowedTools;
|
|
134
213
|
}
|
|
@@ -139,24 +218,13 @@ var init_agent_component_adapter = __esm(() => {
|
|
|
139
218
|
runId,
|
|
140
219
|
nodeId,
|
|
141
220
|
sessionId: agentSessionId,
|
|
142
|
-
outputSchema
|
|
143
|
-
workflowJsonOutputFallbackModel: config.options?.workflowJsonOutputFallbackModel
|
|
221
|
+
outputSchema
|
|
144
222
|
};
|
|
145
223
|
if (outputSchema) {
|
|
146
224
|
context.pluginEnabled = {
|
|
147
225
|
...context.pluginEnabled ?? {},
|
|
148
226
|
[WORKFLOW_JSON_OUTPUT_PLUGIN_KEY]: true
|
|
149
227
|
};
|
|
150
|
-
const submitTool = createSubmitJsonOutputTool(outputSchema);
|
|
151
|
-
context.extraTools = [
|
|
152
|
-
...context.extraTools ?? [],
|
|
153
|
-
{
|
|
154
|
-
name: submitTool.name,
|
|
155
|
-
description: submitTool.description ?? "",
|
|
156
|
-
parameters: submitTool.parameters,
|
|
157
|
-
execute: submitTool.execute
|
|
158
|
-
}
|
|
159
|
-
];
|
|
160
228
|
}
|
|
161
229
|
if (config.workflowHistory) {
|
|
162
230
|
context.workflowHistory = config.workflowHistory;
|
|
@@ -183,7 +251,7 @@ var init_agent_component_adapter = __esm(() => {
|
|
|
183
251
|
if (agentSessionId) {
|
|
184
252
|
this.pendingSessions.delete(agentSessionId);
|
|
185
253
|
}
|
|
186
|
-
const structuredOutput =
|
|
254
|
+
const structuredOutput = result.structuredOutput;
|
|
187
255
|
return {
|
|
188
256
|
output: structuredOutput ?? result.finalText ?? result.output,
|
|
189
257
|
structuredOutput,
|
|
@@ -256,28 +324,6 @@ var init_agent_component_adapter = __esm(() => {
|
|
|
256
324
|
getAgentComponent() {
|
|
257
325
|
return this.agentComponent;
|
|
258
326
|
}
|
|
259
|
-
async resolveStructuredOutput(fromPlugin, outputSchema, config, agentSessionId) {
|
|
260
|
-
if (fromPlugin) {
|
|
261
|
-
return fromPlugin;
|
|
262
|
-
}
|
|
263
|
-
if (!outputSchema || !this._llmComponent || !agentSessionId || !this._sessionComponent) {
|
|
264
|
-
return;
|
|
265
|
-
}
|
|
266
|
-
try {
|
|
267
|
-
const sessionMessages = await this._sessionComponent.getMessages(agentSessionId);
|
|
268
|
-
const history = sessionMessages.map((m) => ({
|
|
269
|
-
role: m.role,
|
|
270
|
-
content: m.content ?? ""
|
|
271
|
-
}));
|
|
272
|
-
return await tracedExtractStructuredJsonViaLlm(this._llmComponent, history, outputSchema, {
|
|
273
|
-
model: config.options?.model,
|
|
274
|
-
sessionId: agentSessionId
|
|
275
|
-
});
|
|
276
|
-
} catch (error) {
|
|
277
|
-
console.warn("Workflow JSON extraction fallback failed:", error);
|
|
278
|
-
return;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
327
|
agentSessionPrefixes = new Map;
|
|
282
328
|
};
|
|
283
329
|
__legacyDecorateClassTS([
|