@ai-setting/roy-agent-core 1.5.44 → 1.5.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/index.js +5 -5
- package/dist/env/agent/index.js +6 -6
- package/dist/env/commands/index.js +5 -5
- package/dist/env/context/index.js +4 -1
- package/dist/env/debug/index.js +5 -5
- package/dist/env/event-source/index.js +7 -7
- package/dist/env/hook/index.js +3 -3
- package/dist/env/index.js +24 -20
- package/dist/env/llm/index.js +5 -5
- package/dist/env/log-trace/index.js +5 -5
- package/dist/env/mcp/index.js +22 -6
- package/dist/env/mcp/npm-prefix/index.js +21 -0
- package/dist/env/memory/index.js +9 -9
- package/dist/env/plugin/index.js +5 -5
- package/dist/env/prompt/index.js +5 -5
- package/dist/env/session/index.js +11 -11
- package/dist/env/session/storage/index.js +1 -1
- package/dist/env/skill/index.js +5 -5
- package/dist/env/task/delegate/index.js +3 -3
- package/dist/env/task/index.js +9 -9
- package/dist/env/task/plugins/index.js +2 -2
- package/dist/env/tool/index.js +5 -5
- package/dist/env/workflow/engine/index.js +8 -3
- package/dist/env/workflow/index.js +24 -21
- package/dist/env/workflow/tools/index.js +14 -0
- package/dist/index.js +42 -38
- package/dist/shared/@ai-setting/{roy-agent-core-kajktp3d.js → roy-agent-core-20fm423j.js} +47 -26
- package/dist/shared/@ai-setting/{roy-agent-core-23gw9c4s.js → roy-agent-core-2vhsccvz.js} +52 -10
- package/dist/shared/@ai-setting/{roy-agent-core-r6rwsr54.js → roy-agent-core-3t82jyqb.js} +32 -12
- package/dist/shared/@ai-setting/{roy-agent-core-69jskqjg.js → roy-agent-core-44g4dhzg.js} +75 -7
- package/dist/shared/@ai-setting/{roy-agent-core-e9fdm13a.js → roy-agent-core-4gmxjdhn.js} +4 -2
- package/dist/shared/@ai-setting/{roy-agent-core-b4wd9tn6.js → roy-agent-core-4k9a823d.js} +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-68qy97r3.js +31 -0
- package/dist/shared/@ai-setting/roy-agent-core-6atd905e.js +42 -0
- package/dist/shared/@ai-setting/{roy-agent-core-4jqq077c.js → roy-agent-core-6e3wz81d.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-pwkk12p4.js → roy-agent-core-6mcb7nqa.js} +60 -0
- package/dist/shared/@ai-setting/{roy-agent-core-1zq3p19q.js → roy-agent-core-6z063hns.js} +11 -7
- package/dist/shared/@ai-setting/{roy-agent-core-9p43ap7h.js → roy-agent-core-8y804aat.js} +4 -2
- package/dist/shared/@ai-setting/{roy-agent-core-z1xf2fdk.js → roy-agent-core-a67e90d1.js} +6 -4
- package/dist/shared/@ai-setting/{roy-agent-core-38dkek2y.js → roy-agent-core-btvxttqf.js} +329 -118
- package/dist/shared/@ai-setting/roy-agent-core-dbxm76wf.js +190 -0
- package/dist/shared/@ai-setting/{roy-agent-core-nj8yerg9.js → roy-agent-core-eftqdsy5.js} +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-fnv3ev18.js +61 -0
- package/dist/shared/@ai-setting/{roy-agent-core-2ms7296b.js → roy-agent-core-frjr619w.js} +12 -5
- package/dist/shared/@ai-setting/{roy-agent-core-psvwzdhj.js → roy-agent-core-hdszq729.js} +9 -5
- package/dist/shared/@ai-setting/{roy-agent-core-dxbsc1zy.js → roy-agent-core-ja9qhg6d.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-cevpwnq7.js → roy-agent-core-mjbfgqen.js} +5 -3
- package/dist/shared/@ai-setting/roy-agent-core-nhfy3p8q.js +132 -0
- package/dist/shared/@ai-setting/{roy-agent-core-xkb264a8.js → roy-agent-core-pm73be85.js} +132 -24
- package/dist/shared/@ai-setting/{roy-agent-core-zrja5v78.js → roy-agent-core-pyv1vb7v.js} +13 -5
- package/dist/shared/@ai-setting/{roy-agent-core-ee6nnnqw.js → roy-agent-core-r9hq4cjx.js} +8 -1
- package/dist/shared/@ai-setting/{roy-agent-core-jqy2mdyq.js → roy-agent-core-rgj6hq15.js} +52 -41
- package/dist/shared/@ai-setting/{roy-agent-core-z33en0cz.js → roy-agent-core-rm3hay00.js} +15 -2
- package/dist/shared/@ai-setting/{roy-agent-core-ryw3ckfy.js → roy-agent-core-rx74rye7.js} +5 -3
- package/dist/shared/@ai-setting/{roy-agent-core-pxcrzyv9.js → roy-agent-core-sk535ft2.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-2dhd60aw.js → roy-agent-core-vdwvamre.js} +10 -0
- package/dist/shared/@ai-setting/roy-agent-core-ye0z728h.js +18 -0
- package/dist/shared/@ai-setting/{roy-agent-core-eg6nv09z.js → roy-agent-core-ztx5eh72.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-nqgrjja0.js → roy-agent-core-zwq6vhpj.js} +1 -1
- package/package.json +2 -2
- package/dist/shared/@ai-setting/roy-agent-core-dh9d7a3m.js +0 -11
|
@@ -6,13 +6,18 @@ 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-
|
|
9
|
+
} from "../../../shared/@ai-setting/roy-agent-core-btvxttqf.js";
|
|
10
|
+
import"../../../shared/@ai-setting/roy-agent-core-44g4dhzg.js";
|
|
11
|
+
import"../../../shared/@ai-setting/roy-agent-core-dbxm76wf.js";
|
|
12
|
+
import"../../../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
12
13
|
import"../../../shared/@ai-setting/roy-agent-core-v002ynpa.js";
|
|
14
|
+
import"../../../shared/@ai-setting/roy-agent-core-6vxg2gmr.js";
|
|
13
15
|
import"../../../shared/@ai-setting/roy-agent-core-qnrf2aw6.js";
|
|
16
|
+
import"../../../shared/@ai-setting/roy-agent-core-nhfy3p8q.js";
|
|
14
17
|
import"../../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
15
18
|
import"../../../shared/@ai-setting/roy-agent-core-q5qj0fes.js";
|
|
19
|
+
import"../../../shared/@ai-setting/roy-agent-core-rgj6hq15.js";
|
|
20
|
+
import"../../../shared/@ai-setting/roy-agent-core-rm3hay00.js";
|
|
16
21
|
import"../../../shared/@ai-setting/roy-agent-core-10n2jh7p.js";
|
|
17
22
|
import"../../../shared/@ai-setting/roy-agent-core-58k274fg.js";
|
|
18
23
|
import"../../../shared/@ai-setting/roy-agent-core-c6592r3c.js";
|
|
@@ -1,25 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WorkflowComponent
|
|
3
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
3
|
+
} from "../../shared/@ai-setting/roy-agent-core-frjr619w.js";
|
|
4
4
|
import"../../shared/@ai-setting/roy-agent-core-9bmtxmp6.js";
|
|
5
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
6
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
5
|
+
import"../../shared/@ai-setting/roy-agent-core-btvxttqf.js";
|
|
6
|
+
import"../../shared/@ai-setting/roy-agent-core-44g4dhzg.js";
|
|
7
|
+
import"../../shared/@ai-setting/roy-agent-core-dbxm76wf.js";
|
|
8
|
+
import"../../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
9
|
+
import"../../shared/@ai-setting/roy-agent-core-v002ynpa.js";
|
|
7
10
|
import"../../shared/@ai-setting/roy-agent-core-4t40mkpv.js";
|
|
8
11
|
import"../../shared/@ai-setting/roy-agent-core-6vxg2gmr.js";
|
|
9
|
-
import"../../shared/@ai-setting/roy-agent-core-0vbdz0x7.js";
|
|
10
|
-
import {
|
|
11
|
-
Edge,
|
|
12
|
-
NodeAs,
|
|
13
|
-
Workflow,
|
|
14
|
-
WorkflowConverter,
|
|
15
|
-
WorkflowEdges,
|
|
16
|
-
createWorkflowFromClass
|
|
17
|
-
} from "../../shared/@ai-setting/roy-agent-core-h0x19xgn.js";
|
|
18
|
-
import {
|
|
19
|
-
DecoratorNode,
|
|
20
|
-
init_decorator_node
|
|
21
|
-
} from "../../shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
22
|
-
import"../../shared/@ai-setting/roy-agent-core-v002ynpa.js";
|
|
23
12
|
import {
|
|
24
13
|
BaseEventSchema,
|
|
25
14
|
ControlPauseEventSchema,
|
|
@@ -71,16 +60,30 @@ import {
|
|
|
71
60
|
pathNotFound,
|
|
72
61
|
unresolvedVariable
|
|
73
62
|
} from "../../shared/@ai-setting/roy-agent-core-qnrf2aw6.js";
|
|
63
|
+
import"../../shared/@ai-setting/roy-agent-core-0vbdz0x7.js";
|
|
64
|
+
import"../../shared/@ai-setting/roy-agent-core-nhfy3p8q.js";
|
|
65
|
+
import {
|
|
66
|
+
Edge,
|
|
67
|
+
NodeAs,
|
|
68
|
+
Workflow,
|
|
69
|
+
WorkflowConverter,
|
|
70
|
+
WorkflowEdges,
|
|
71
|
+
createWorkflowFromClass
|
|
72
|
+
} from "../../shared/@ai-setting/roy-agent-core-h0x19xgn.js";
|
|
73
|
+
import {
|
|
74
|
+
DecoratorNode,
|
|
75
|
+
init_decorator_node
|
|
76
|
+
} from "../../shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
74
77
|
import {
|
|
75
78
|
AskUserError,
|
|
76
79
|
createNodeInterruptEvent,
|
|
77
80
|
createWorkflowAskUserEvent
|
|
78
81
|
} from "../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
79
82
|
import"../../shared/@ai-setting/roy-agent-core-q5qj0fes.js";
|
|
80
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
81
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
82
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
83
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
83
|
+
import"../../shared/@ai-setting/roy-agent-core-6e3wz81d.js";
|
|
84
|
+
import"../../shared/@ai-setting/roy-agent-core-vdwvamre.js";
|
|
85
|
+
import"../../shared/@ai-setting/roy-agent-core-rgj6hq15.js";
|
|
86
|
+
import"../../shared/@ai-setting/roy-agent-core-rm3hay00.js";
|
|
84
87
|
import"../../shared/@ai-setting/roy-agent-core-10n2jh7p.js";
|
|
85
88
|
import"../../shared/@ai-setting/roy-agent-core-58k274fg.js";
|
|
86
89
|
import"../../shared/@ai-setting/roy-agent-core-c6592r3c.js";
|
|
@@ -3,6 +3,13 @@ import {
|
|
|
3
3
|
askUserTool,
|
|
4
4
|
askUserToolInstance
|
|
5
5
|
} from "../../../shared/@ai-setting/roy-agent-core-0vbdz0x7.js";
|
|
6
|
+
import {
|
|
7
|
+
WORKFLOW_SUBMIT_OUTPUT_TOOL_NAME,
|
|
8
|
+
WorkflowJsonOutputMarker,
|
|
9
|
+
createSubmitJsonOutputTool,
|
|
10
|
+
init_submit_json_output_tool,
|
|
11
|
+
parseWorkflowJsonOutput
|
|
12
|
+
} from "../../../shared/@ai-setting/roy-agent-core-nhfy3p8q.js";
|
|
6
13
|
import"../../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
7
14
|
import {
|
|
8
15
|
createLogger,
|
|
@@ -147,13 +154,20 @@ function resetRunWorkflowTool() {
|
|
|
147
154
|
_runWorkflowTool = null;
|
|
148
155
|
_workflowService = null;
|
|
149
156
|
}
|
|
157
|
+
|
|
158
|
+
// src/env/workflow/tools/index.ts
|
|
159
|
+
init_submit_json_output_tool();
|
|
150
160
|
export {
|
|
151
161
|
resetRunWorkflowTool,
|
|
162
|
+
parseWorkflowJsonOutput,
|
|
152
163
|
initRunWorkflowTool,
|
|
153
164
|
getRunWorkflowTool,
|
|
165
|
+
createSubmitJsonOutputTool,
|
|
154
166
|
createRunWorkflowTool,
|
|
155
167
|
askUserToolInstance,
|
|
156
168
|
askUserTool,
|
|
169
|
+
WorkflowJsonOutputMarker,
|
|
170
|
+
WORKFLOW_SUBMIT_OUTPUT_TOOL_NAME,
|
|
157
171
|
RunWorkflowInputSchema,
|
|
158
172
|
AskUserInputSchema
|
|
159
173
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PromptComponent,
|
|
3
|
+
PromptStore,
|
|
4
|
+
getBuiltInPrompt,
|
|
5
|
+
getBuiltInPromptNames
|
|
6
|
+
} from "./shared/@ai-setting/roy-agent-core-a67e90d1.js";
|
|
1
7
|
import {
|
|
2
8
|
LLMComponent,
|
|
3
9
|
LLMConfigSchema,
|
|
@@ -9,18 +15,18 @@ import {
|
|
|
9
15
|
invoke,
|
|
10
16
|
invokeNonStream,
|
|
11
17
|
parseModelString
|
|
12
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
18
|
+
} from "./shared/@ai-setting/roy-agent-core-20fm423j.js";
|
|
13
19
|
import {
|
|
14
20
|
ConfigComponent
|
|
15
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
21
|
+
} from "./shared/@ai-setting/roy-agent-core-eftqdsy5.js";
|
|
16
22
|
import {
|
|
17
23
|
CommandsComponent
|
|
18
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
24
|
+
} from "./shared/@ai-setting/roy-agent-core-4k9a823d.js";
|
|
19
25
|
import {
|
|
20
26
|
ToolComponent,
|
|
21
27
|
ToolRegistry,
|
|
22
28
|
ToolValidator
|
|
23
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
29
|
+
} from "./shared/@ai-setting/roy-agent-core-rx74rye7.js";
|
|
24
30
|
import {
|
|
25
31
|
bashTool,
|
|
26
32
|
editFileTool,
|
|
@@ -31,27 +37,21 @@ import {
|
|
|
31
37
|
readFileTool,
|
|
32
38
|
writeFileTool
|
|
33
39
|
} from "./shared/@ai-setting/roy-agent-core-ysvh8er9.js";
|
|
34
|
-
import {
|
|
35
|
-
PromptComponent,
|
|
36
|
-
PromptStore,
|
|
37
|
-
getBuiltInPrompt,
|
|
38
|
-
getBuiltInPromptNames
|
|
39
|
-
} from "./shared/@ai-setting/roy-agent-core-z1xf2fdk.js";
|
|
40
40
|
import {
|
|
41
41
|
closeDatabase
|
|
42
42
|
} from "./shared/@ai-setting/roy-agent-core-9ffsvvcf.js";
|
|
43
43
|
import"./shared/@ai-setting/roy-agent-core-2grcjaad.js";
|
|
44
44
|
import {
|
|
45
45
|
MemoryComponent
|
|
46
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
46
|
+
} from "./shared/@ai-setting/roy-agent-core-ztx5eh72.js";
|
|
47
|
+
import"./shared/@ai-setting/roy-agent-core-g1s2h0e5.js";
|
|
47
48
|
import {
|
|
48
49
|
MemoryPlugin,
|
|
49
50
|
createMemoryPlugin
|
|
50
51
|
} from "./shared/@ai-setting/roy-agent-core-c3ct1346.js";
|
|
51
|
-
import"./shared/@ai-setting/roy-agent-core-g1s2h0e5.js";
|
|
52
52
|
import {
|
|
53
53
|
DebugComponent
|
|
54
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
54
|
+
} from "./shared/@ai-setting/roy-agent-core-zwq6vhpj.js";
|
|
55
55
|
import {
|
|
56
56
|
ReplFormatter,
|
|
57
57
|
TraceFormatter,
|
|
@@ -61,13 +61,13 @@ import {
|
|
|
61
61
|
BaseEnvironment,
|
|
62
62
|
generateDescendingId,
|
|
63
63
|
generateId
|
|
64
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
64
|
+
} from "./shared/@ai-setting/roy-agent-core-r9hq4cjx.js";
|
|
65
65
|
import {
|
|
66
66
|
EventSourceComponent,
|
|
67
67
|
builtInHandlers,
|
|
68
68
|
getBuiltInHandler,
|
|
69
69
|
larkCliHandler
|
|
70
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
70
|
+
} from "./shared/@ai-setting/roy-agent-core-hdszq729.js";
|
|
71
71
|
import {
|
|
72
72
|
BUILT_IN_EVENT_SOURCE_TYPES,
|
|
73
73
|
BUILT_IN_EVENT_SOURCE_TYPE_LIST,
|
|
@@ -80,28 +80,33 @@ import {
|
|
|
80
80
|
import {
|
|
81
81
|
LogTraceComponent,
|
|
82
82
|
LogTraceConfigSchema
|
|
83
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
83
|
+
} from "./shared/@ai-setting/roy-agent-core-ja9qhg6d.js";
|
|
84
84
|
import {
|
|
85
85
|
PluginComponent
|
|
86
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
86
|
+
} from "./shared/@ai-setting/roy-agent-core-mjbfgqen.js";
|
|
87
87
|
import {
|
|
88
88
|
TaskTagPlugin
|
|
89
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
89
|
+
} from "./shared/@ai-setting/roy-agent-core-4gmxjdhn.js";
|
|
90
90
|
import {
|
|
91
91
|
BasePlugin
|
|
92
92
|
} from "./shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
93
93
|
import {
|
|
94
94
|
WorkflowComponent
|
|
95
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
95
|
+
} from "./shared/@ai-setting/roy-agent-core-frjr619w.js";
|
|
96
96
|
import {
|
|
97
97
|
init_node_registry_helper,
|
|
98
98
|
registerDecoratorNodeType
|
|
99
99
|
} from "./shared/@ai-setting/roy-agent-core-9bmtxmp6.js";
|
|
100
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
101
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
100
|
+
import"./shared/@ai-setting/roy-agent-core-btvxttqf.js";
|
|
101
|
+
import"./shared/@ai-setting/roy-agent-core-44g4dhzg.js";
|
|
102
|
+
import"./shared/@ai-setting/roy-agent-core-dbxm76wf.js";
|
|
103
|
+
import"./shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
104
|
+
import"./shared/@ai-setting/roy-agent-core-v002ynpa.js";
|
|
102
105
|
import"./shared/@ai-setting/roy-agent-core-4t40mkpv.js";
|
|
103
106
|
import"./shared/@ai-setting/roy-agent-core-6vxg2gmr.js";
|
|
107
|
+
import"./shared/@ai-setting/roy-agent-core-qnrf2aw6.js";
|
|
104
108
|
import"./shared/@ai-setting/roy-agent-core-0vbdz0x7.js";
|
|
109
|
+
import"./shared/@ai-setting/roy-agent-core-nhfy3p8q.js";
|
|
105
110
|
import {
|
|
106
111
|
Edge,
|
|
107
112
|
NodeAs,
|
|
@@ -110,20 +115,19 @@ import {
|
|
|
110
115
|
createWorkflowFromClass
|
|
111
116
|
} from "./shared/@ai-setting/roy-agent-core-h0x19xgn.js";
|
|
112
117
|
import"./shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
113
|
-
import"./shared/@ai-setting/roy-agent-core-v002ynpa.js";
|
|
114
|
-
import"./shared/@ai-setting/roy-agent-core-qnrf2aw6.js";
|
|
115
118
|
import {
|
|
116
119
|
AgentComponent,
|
|
117
120
|
AgentComponentConfigSchema
|
|
118
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
121
|
+
} from "./shared/@ai-setting/roy-agent-core-3t82jyqb.js";
|
|
119
122
|
import {
|
|
120
123
|
AskUserError,
|
|
121
124
|
init_workflow_hil
|
|
122
125
|
} from "./shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
123
126
|
import {
|
|
124
127
|
TaskComponent
|
|
125
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
126
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
128
|
+
} from "./shared/@ai-setting/roy-agent-core-6z063hns.js";
|
|
129
|
+
import"./shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
130
|
+
import"./shared/@ai-setting/roy-agent-core-8y804aat.js";
|
|
127
131
|
import"./shared/@ai-setting/roy-agent-core-hsxn8m1j.js";
|
|
128
132
|
import {
|
|
129
133
|
AgentRegistry
|
|
@@ -138,14 +142,13 @@ import"./shared/@ai-setting/roy-agent-core-t94ktchq.js";
|
|
|
138
142
|
import {
|
|
139
143
|
TaskHookPoints
|
|
140
144
|
} from "./shared/@ai-setting/roy-agent-core-92z6t4he.js";
|
|
141
|
-
import"./shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
142
145
|
import {
|
|
143
146
|
SkillComponent
|
|
144
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
147
|
+
} from "./shared/@ai-setting/roy-agent-core-sk535ft2.js";
|
|
145
148
|
import"./shared/@ai-setting/roy-agent-core-psvxt4c9.js";
|
|
146
149
|
import {
|
|
147
150
|
McpComponent
|
|
148
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
151
|
+
} from "./shared/@ai-setting/roy-agent-core-pm73be85.js";
|
|
149
152
|
import {
|
|
150
153
|
AgentError,
|
|
151
154
|
ComponentError,
|
|
@@ -157,12 +160,17 @@ import {
|
|
|
157
160
|
getErrorCode,
|
|
158
161
|
isRoyError
|
|
159
162
|
} from "./shared/@ai-setting/roy-agent-core-ctdhjv68.js";
|
|
163
|
+
import"./shared/@ai-setting/roy-agent-core-fnv3ev18.js";
|
|
160
164
|
import"./shared/@ai-setting/roy-agent-core-1bfmxx89.js";
|
|
161
165
|
import {
|
|
162
166
|
SessionComponent
|
|
163
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
167
|
+
} from "./shared/@ai-setting/roy-agent-core-pyv1vb7v.js";
|
|
164
168
|
import"./shared/@ai-setting/roy-agent-core-rvxg1wps.js";
|
|
169
|
+
import {
|
|
170
|
+
MemorySessionStore
|
|
171
|
+
} from "./shared/@ai-setting/roy-agent-core-6mcb7nqa.js";
|
|
165
172
|
import"./shared/@ai-setting/roy-agent-core-kwhv9dcd.js";
|
|
173
|
+
import"./shared/@ai-setting/roy-agent-core-7b35emr7.js";
|
|
166
174
|
import {
|
|
167
175
|
Traced,
|
|
168
176
|
TracedAs,
|
|
@@ -172,16 +180,16 @@ import {
|
|
|
172
180
|
import"./shared/@ai-setting/roy-agent-core-qxhq8ven.js";
|
|
173
181
|
import {
|
|
174
182
|
BaseComponent
|
|
175
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
183
|
+
} from "./shared/@ai-setting/roy-agent-core-6e3wz81d.js";
|
|
176
184
|
import {
|
|
177
185
|
createHook,
|
|
178
186
|
createPriorityHook
|
|
179
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
187
|
+
} from "./shared/@ai-setting/roy-agent-core-vdwvamre.js";
|
|
180
188
|
import {
|
|
181
189
|
HookManager,
|
|
182
190
|
globalHookManager
|
|
183
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
184
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
191
|
+
} from "./shared/@ai-setting/roy-agent-core-rgj6hq15.js";
|
|
192
|
+
import"./shared/@ai-setting/roy-agent-core-rm3hay00.js";
|
|
185
193
|
import {
|
|
186
194
|
createLogger,
|
|
187
195
|
getLogDir,
|
|
@@ -203,10 +211,6 @@ import {
|
|
|
203
211
|
import {
|
|
204
212
|
SQLiteSpanStorage
|
|
205
213
|
} from "./shared/@ai-setting/roy-agent-core-c6592r3c.js";
|
|
206
|
-
import {
|
|
207
|
-
MemorySessionStore
|
|
208
|
-
} from "./shared/@ai-setting/roy-agent-core-pwkk12p4.js";
|
|
209
|
-
import"./shared/@ai-setting/roy-agent-core-7b35emr7.js";
|
|
210
214
|
import"./shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
211
215
|
// src/env/memory/tools/memory-agent-tools.ts
|
|
212
216
|
import { z } from "zod";
|
|
@@ -12,11 +12,12 @@ import {
|
|
|
12
12
|
} from "./roy-agent-core-qxhq8ven.js";
|
|
13
13
|
import {
|
|
14
14
|
BaseComponent
|
|
15
|
-
} from "./roy-agent-core-
|
|
15
|
+
} from "./roy-agent-core-6e3wz81d.js";
|
|
16
16
|
import {
|
|
17
17
|
LLMHookPoints,
|
|
18
|
-
globalHookManager
|
|
19
|
-
|
|
18
|
+
globalHookManager,
|
|
19
|
+
init_global_hook_manager
|
|
20
|
+
} from "./roy-agent-core-rgj6hq15.js";
|
|
20
21
|
import {
|
|
21
22
|
createLogger,
|
|
22
23
|
init_logger
|
|
@@ -513,6 +514,10 @@ function createEnvEventEmitter(env, context) {
|
|
|
513
514
|
}
|
|
514
515
|
};
|
|
515
516
|
}
|
|
517
|
+
function getStreamPartText(part) {
|
|
518
|
+
const value = part.text ?? part.delta ?? part.textDelta;
|
|
519
|
+
return typeof value === "string" ? value : "";
|
|
520
|
+
}
|
|
516
521
|
function processThinkingStream(textDelta, config, state) {
|
|
517
522
|
if (!config.enabled || !textDelta) {
|
|
518
523
|
return {
|
|
@@ -658,8 +663,10 @@ async function invoke(config, options, ctx) {
|
|
|
658
663
|
for await (const part of result.fullStream) {
|
|
659
664
|
const streamPart = part;
|
|
660
665
|
switch (streamPart.type) {
|
|
661
|
-
case "text-delta":
|
|
662
|
-
const textDelta = streamPart
|
|
666
|
+
case "text-delta": {
|
|
667
|
+
const textDelta = getStreamPartText(streamPart);
|
|
668
|
+
if (!textDelta)
|
|
669
|
+
break;
|
|
663
670
|
const thinkingConfig = config.options?.thinkingInText;
|
|
664
671
|
if (thinkingConfig?.enabled) {
|
|
665
672
|
const thinkingResult = processThinkingStream(textDelta, thinkingConfig, {
|
|
@@ -669,13 +676,14 @@ async function invoke(config, options, ctx) {
|
|
|
669
676
|
isThinkingTagOpen = thinkingResult.isThinkingTagOpen;
|
|
670
677
|
currentThinkingContent = thinkingResult.currentThinkingContent;
|
|
671
678
|
fullContent += thinkingResult.cleanedText;
|
|
672
|
-
for (const
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
679
|
+
for (const reasoningSnapshot of thinkingResult.reasoningEvents) {
|
|
680
|
+
const delta = reasoningSnapshot.slice(reasoningContent.length);
|
|
681
|
+
reasoningContent = reasoningSnapshot;
|
|
682
|
+
if (emitToEnv && delta) {
|
|
683
|
+
emitToEnv({ type: "reasoning", content: reasoningContent, delta });
|
|
676
684
|
}
|
|
677
685
|
}
|
|
678
|
-
if (emitToEnv) {
|
|
686
|
+
if (emitToEnv && thinkingResult.cleanedText) {
|
|
679
687
|
emitToEnv({ type: "text", content: fullContent, delta: thinkingResult.cleanedText });
|
|
680
688
|
}
|
|
681
689
|
} else {
|
|
@@ -685,33 +693,33 @@ async function invoke(config, options, ctx) {
|
|
|
685
693
|
}
|
|
686
694
|
}
|
|
687
695
|
break;
|
|
688
|
-
|
|
689
|
-
|
|
696
|
+
}
|
|
697
|
+
case "reasoning-delta": {
|
|
698
|
+
const reasoningDelta = getStreamPartText(streamPart);
|
|
699
|
+
if (!reasoningDelta)
|
|
700
|
+
break;
|
|
690
701
|
reasoningContent += reasoningDelta;
|
|
691
702
|
if (emitToEnv) {
|
|
692
|
-
emitToEnv({ type: "reasoning", content: reasoningContent });
|
|
703
|
+
emitToEnv({ type: "reasoning", content: reasoningContent, delta: reasoningDelta });
|
|
704
|
+
}
|
|
705
|
+
break;
|
|
706
|
+
}
|
|
707
|
+
case "reasoning-end":
|
|
708
|
+
if (emitToEnv) {
|
|
709
|
+
emitToEnv({ type: "reasoning", content: reasoningContent, phase: "end" });
|
|
693
710
|
}
|
|
694
711
|
break;
|
|
695
|
-
case "tool-call":
|
|
712
|
+
case "tool-call": {
|
|
696
713
|
const toolInput = streamPart.input;
|
|
697
|
-
const toolCallId = streamPart.toolCallId;
|
|
714
|
+
const toolCallId = streamPart.toolCallId ?? streamPart.id;
|
|
698
715
|
const toolName = streamPart.toolName;
|
|
699
716
|
toolCalls.push({
|
|
700
717
|
id: toolCallId,
|
|
701
718
|
name: toolName,
|
|
702
719
|
args: toolInput
|
|
703
720
|
});
|
|
704
|
-
if (emitToEnv) {
|
|
705
|
-
emitToEnv({
|
|
706
|
-
type: "tool_call",
|
|
707
|
-
toolCall: {
|
|
708
|
-
id: toolCallId,
|
|
709
|
-
name: toolName,
|
|
710
|
-
arguments: JSON.stringify(toolInput)
|
|
711
|
-
}
|
|
712
|
-
});
|
|
713
|
-
}
|
|
714
721
|
break;
|
|
722
|
+
}
|
|
715
723
|
case "finish-step":
|
|
716
724
|
const stepUsage = extractUsageInfo(streamPart.usage);
|
|
717
725
|
if (stepUsage) {
|
|
@@ -873,6 +881,8 @@ function createInvokeConfig(model, apiKey, baseURL) {
|
|
|
873
881
|
};
|
|
874
882
|
}
|
|
875
883
|
// src/env/llm/hooks.ts
|
|
884
|
+
init_global_hook_manager();
|
|
885
|
+
|
|
876
886
|
class LLMHookManager {
|
|
877
887
|
registrations = [];
|
|
878
888
|
register(type, handler, name) {
|
|
@@ -1180,13 +1190,24 @@ class LLMComponent extends BaseComponent {
|
|
|
1180
1190
|
toolCallId: msg.toolCallId,
|
|
1181
1191
|
toolCalls: msg.toolCalls
|
|
1182
1192
|
}));
|
|
1193
|
+
const provider = this.getProvider(providerId);
|
|
1194
|
+
const thinkingInText = provider?.capabilities?.thinkingInText;
|
|
1183
1195
|
return {
|
|
1184
1196
|
providerId,
|
|
1185
1197
|
model,
|
|
1186
1198
|
invokeConfig: {
|
|
1187
1199
|
model: `${providerId}/${model}`,
|
|
1188
1200
|
apiKey,
|
|
1189
|
-
baseURL:
|
|
1201
|
+
baseURL: provider?.baseURL,
|
|
1202
|
+
...thinkingInText?.enabled ? {
|
|
1203
|
+
options: {
|
|
1204
|
+
thinkingInText: {
|
|
1205
|
+
enabled: thinkingInText.enabled,
|
|
1206
|
+
tags: thinkingInText.tags,
|
|
1207
|
+
removeFromOutput: thinkingInText.removeFromOutput
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
} : {}
|
|
1190
1211
|
},
|
|
1191
1212
|
messages,
|
|
1192
1213
|
temperature: request.temperature ?? defaultTemperature,
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getWorkflowNodeIdFromMetadata,
|
|
3
|
+
init_workflow_message_metadata
|
|
4
|
+
} from "./roy-agent-core-6atd905e.js";
|
|
1
5
|
import {
|
|
2
6
|
__esm
|
|
3
7
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -13,25 +17,25 @@ function inferNextNode(messages, definition) {
|
|
|
13
17
|
case "workflow.node.start":
|
|
14
18
|
return {
|
|
15
19
|
type: "resume_node",
|
|
16
|
-
nodeId: metadata
|
|
20
|
+
nodeId: getWorkflowNodeIdFromMetadata(metadata),
|
|
17
21
|
agentSessionId: metadata.agentSessionId
|
|
18
22
|
};
|
|
19
23
|
case "workflow.node.interrupt":
|
|
20
24
|
return {
|
|
21
25
|
type: "ask_user",
|
|
22
|
-
nodeId: metadata
|
|
26
|
+
nodeId: getWorkflowNodeIdFromMetadata(metadata),
|
|
23
27
|
agentSessionId: metadata.agentSessionId
|
|
24
28
|
};
|
|
25
29
|
case "workflow.node.end":
|
|
26
30
|
case "workflow.node.result":
|
|
27
|
-
return getNextNodes(metadata
|
|
31
|
+
return getNextNodes(getWorkflowNodeIdFromMetadata(metadata), definition);
|
|
28
32
|
default:
|
|
29
33
|
const lastStart = findLastStartMessage(messages);
|
|
30
34
|
if (lastStart) {
|
|
31
35
|
const startMetadata = lastStart.metadata;
|
|
32
36
|
return {
|
|
33
37
|
type: "resume_node",
|
|
34
|
-
nodeId: startMetadata
|
|
38
|
+
nodeId: getWorkflowNodeIdFromMetadata(startMetadata),
|
|
35
39
|
agentSessionId: startMetadata.agentSessionId
|
|
36
40
|
};
|
|
37
41
|
}
|
|
@@ -40,7 +44,7 @@ function inferNextNode(messages, definition) {
|
|
|
40
44
|
const callMetadata = lastCall.metadata;
|
|
41
45
|
return {
|
|
42
46
|
type: "resume_node",
|
|
43
|
-
nodeId: callMetadata
|
|
47
|
+
nodeId: getWorkflowNodeIdFromMetadata(callMetadata),
|
|
44
48
|
agentSessionId: callMetadata.agentSessionId
|
|
45
49
|
};
|
|
46
50
|
}
|
|
@@ -88,7 +92,7 @@ function parseNodeOutputs(messages) {
|
|
|
88
92
|
const metadata = msg.metadata;
|
|
89
93
|
const msgType = metadata?.type;
|
|
90
94
|
if (msgType === "workflow.node.start" || msgType === "workflow.node.call") {
|
|
91
|
-
lastStartNodeId = metadata
|
|
95
|
+
lastStartNodeId = getWorkflowNodeIdFromMetadata(metadata) ?? null;
|
|
92
96
|
} else if ((msgType === "workflow.node.end" || msgType === "workflow.node.result") && lastStartNodeId) {
|
|
93
97
|
try {
|
|
94
98
|
outputs.set(lastStartNodeId, JSON.parse(msg.content));
|
|
@@ -114,6 +118,27 @@ function getAgentSessionIdFromInterrupt(messages) {
|
|
|
114
118
|
const metadata = lastInterrupt.metadata;
|
|
115
119
|
return metadata?.agentSessionId || null;
|
|
116
120
|
}
|
|
121
|
+
function resolveAgentSessionId(nodeId, agentSessionId, agentSessions) {
|
|
122
|
+
if (agentSessionId) {
|
|
123
|
+
return agentSessionId;
|
|
124
|
+
}
|
|
125
|
+
if (!nodeId || !agentSessions?.length) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
return agentSessions.find((ref) => ref.nodeId === nodeId)?.sessionId;
|
|
129
|
+
}
|
|
130
|
+
function enrichResumeInfoWithAgentSessions(resumeInfo, agentSessions) {
|
|
131
|
+
return {
|
|
132
|
+
...resumeInfo,
|
|
133
|
+
agentSessionId: resolveAgentSessionId(resumeInfo.pendingNodeId, resumeInfo.agentSessionId, agentSessions)
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
function enrichResumePointWithAgentSessions(resumePoint, agentSessions) {
|
|
137
|
+
return {
|
|
138
|
+
...resumePoint,
|
|
139
|
+
agentSessionId: resolveAgentSessionId(resumePoint.nodeId, resumePoint.agentSessionId, agentSessions)
|
|
140
|
+
};
|
|
141
|
+
}
|
|
117
142
|
function extractResumeInfo(messages) {
|
|
118
143
|
const nodeOutputs = parseNodeOutputs(messages);
|
|
119
144
|
let pendingNodeId;
|
|
@@ -123,7 +148,7 @@ function extractResumeInfo(messages) {
|
|
|
123
148
|
for (const msg of messages) {
|
|
124
149
|
const metadata = msg.metadata;
|
|
125
150
|
if (metadata?.type === "workflow.node.start" || metadata?.type === "workflow.node.call") {
|
|
126
|
-
pendingNodeId = metadata
|
|
151
|
+
pendingNodeId = getWorkflowNodeIdFromMetadata(metadata);
|
|
127
152
|
if (metadata?.agentSessionId && !agentSessionId) {
|
|
128
153
|
agentSessionId = metadata.agentSessionId;
|
|
129
154
|
}
|
|
@@ -131,7 +156,7 @@ function extractResumeInfo(messages) {
|
|
|
131
156
|
pendingNodeId = undefined;
|
|
132
157
|
agentSessionId = undefined;
|
|
133
158
|
} else if (metadata?.type === "workflow.node.interrupt") {
|
|
134
|
-
pendingNodeId = metadata
|
|
159
|
+
pendingNodeId = getWorkflowNodeIdFromMetadata(metadata);
|
|
135
160
|
agentSessionId = metadata.agentSessionId;
|
|
136
161
|
hasInterrupt = true;
|
|
137
162
|
lastInterruptQuery = msg.content;
|
|
@@ -145,10 +170,25 @@ function extractResumeInfo(messages) {
|
|
|
145
170
|
lastInterruptQuery
|
|
146
171
|
};
|
|
147
172
|
}
|
|
148
|
-
|
|
173
|
+
function stripEphemeralResumeInput(input) {
|
|
174
|
+
if (!input) {
|
|
175
|
+
return {};
|
|
176
|
+
}
|
|
177
|
+
const { userQuery, ...rest } = input;
|
|
178
|
+
const workflowInput = Object.keys(rest).length > 0 ? rest : undefined;
|
|
179
|
+
return {
|
|
180
|
+
workflowInput,
|
|
181
|
+
userQuery
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
var init_session_recovery = __esm(() => {
|
|
185
|
+
init_workflow_message_metadata();
|
|
186
|
+
});
|
|
149
187
|
init_session_recovery();
|
|
150
188
|
|
|
151
189
|
export {
|
|
190
|
+
stripEphemeralResumeInput,
|
|
191
|
+
resolveAgentSessionId,
|
|
152
192
|
parseNodeOutputs,
|
|
153
193
|
inferNextNode,
|
|
154
194
|
hasPendingAskUser,
|
|
@@ -156,5 +196,7 @@ export {
|
|
|
156
196
|
findLastStartMessage,
|
|
157
197
|
findLastInterruptMessage,
|
|
158
198
|
findLastCallMessage,
|
|
159
|
-
extractResumeInfo
|
|
199
|
+
extractResumeInfo,
|
|
200
|
+
enrichResumePointWithAgentSessions,
|
|
201
|
+
enrichResumeInfoWithAgentSessions
|
|
160
202
|
};
|