@ai-setting/roy-agent-core 1.7.3 → 1.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/index.js +5 -5
- package/dist/env/agent/index.js +6 -6
- package/dist/env/event-source/index.js +6 -6
- package/dist/env/index.js +43 -43
- package/dist/env/llm/index.js +4 -3
- package/dist/env/mcp/index.js +9 -9
- package/dist/env/memory/index.js +4 -4
- package/dist/env/session/index.js +2 -2
- package/dist/env/task/delegate/index.js +2 -2
- package/dist/env/task/index.js +5 -5
- package/dist/env/task/plugins/index.js +4 -4
- package/dist/env/tool/built-in/index.js +3 -2
- package/dist/env/tool/index.js +6 -5
- package/dist/env/workflow/engine/index.js +3 -3
- package/dist/env/workflow/index.js +27 -27
- package/dist/env/workflow/nodes/index.js +1 -1
- package/dist/env/workflow/tools/index.js +6 -6
- package/dist/env/workflow/utils/index.js +3 -3
- package/dist/index.js +100 -98
- package/dist/shared/@ai-setting/{roy-agent-core-qatz3q31.js → roy-agent-core-29ph0e2k.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-watkmj7d.js → roy-agent-core-32226m35.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-y9q3jdcx.js → roy-agent-core-4m4awz0m.js} +15 -15
- package/dist/shared/@ai-setting/{roy-agent-core-pdnp5kj0.js → roy-agent-core-62mvbqmj.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-xmacq00w.js → roy-agent-core-7bskb5j2.js} +9 -9
- package/dist/shared/@ai-setting/{roy-agent-core-y3g3ar7a.js → roy-agent-core-adg9ghbt.js} +109 -1
- package/dist/shared/@ai-setting/{roy-agent-core-s4r8f6se.js → roy-agent-core-cpfdvzqk.js} +63 -9
- package/dist/shared/@ai-setting/{roy-agent-core-yak43g6m.js → roy-agent-core-d11714ee.js} +56 -9
- package/dist/shared/@ai-setting/{roy-agent-core-0qjw25e8.js → roy-agent-core-hmqmznjc.js} +33 -1
- package/dist/shared/@ai-setting/{roy-agent-core-g7nmwg63.js → roy-agent-core-hncxk9d1.js} +5 -111
- package/dist/shared/@ai-setting/{roy-agent-core-cy8azvpb.js → roy-agent-core-krapd8x2.js} +2 -1
- package/dist/shared/@ai-setting/{roy-agent-core-kv7frw13.js → roy-agent-core-mgp3284f.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-3dwcwgn5.js → roy-agent-core-q6mq7gmc.js} +14 -14
- package/dist/shared/@ai-setting/{roy-agent-core-wr1pgw0x.js → roy-agent-core-w4dy6zzf.js} +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-xwm8zavb.js +89 -0
- package/dist/shared/@ai-setting/{roy-agent-core-t7rw68q8.js → roy-agent-core-zjdzk1gg.js} +34 -84
- package/package.json +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-50jdqb7r.js → roy-agent-core-2yt4jmzv.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-h28gcd77.js → roy-agent-core-71wde8ce.js} +0 -0
- package/dist/shared/@ai-setting/{roy-agent-core-3e0w0ekw.js → roy-agent-core-7xek618f.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-xvag5pd0.js → roy-agent-core-v13dq3nc.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-gns3wa97.js → roy-agent-core-zhv8efqh.js} +7 -7
- package/dist/shared/@ai-setting/{roy-agent-core-s07nere5.js → roy-agent-core-zqeq8m9z.js} +7 -7
package/dist/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ConfigComponent
|
|
3
|
+
} from "./shared/@ai-setting/roy-agent-core-hncxk9d1.js";
|
|
1
4
|
import {
|
|
2
5
|
PromptComponent,
|
|
3
6
|
PromptStore
|
|
@@ -9,14 +12,8 @@ import {
|
|
|
9
12
|
ModelLimitsSchema,
|
|
10
13
|
ProviderCapabilitiesSchema,
|
|
11
14
|
ProviderConfigSchema
|
|
12
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
13
|
-
import
|
|
14
|
-
ConfigComponent
|
|
15
|
-
} from "./shared/@ai-setting/roy-agent-core-g7nmwg63.js";
|
|
16
|
-
import"./shared/@ai-setting/roy-agent-core-y3g3ar7a.js";
|
|
17
|
-
import {
|
|
18
|
-
CommandsComponent
|
|
19
|
-
} from "./shared/@ai-setting/roy-agent-core-6re7eg4w.js";
|
|
15
|
+
} from "./shared/@ai-setting/roy-agent-core-d11714ee.js";
|
|
16
|
+
import"./shared/@ai-setting/roy-agent-core-adg9ghbt.js";
|
|
20
17
|
import"./shared/@ai-setting/roy-agent-core-wjmwwc4a.js";
|
|
21
18
|
import {
|
|
22
19
|
bashTool,
|
|
@@ -27,43 +24,62 @@ import {
|
|
|
27
24
|
grepTool,
|
|
28
25
|
readFileTool,
|
|
29
26
|
writeFileTool
|
|
30
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
27
|
+
} from "./shared/@ai-setting/roy-agent-core-mgp3284f.js";
|
|
31
28
|
import {
|
|
32
|
-
ATTACH_FILE_MAX_BYTES,
|
|
33
29
|
getUnderstandImageLLMProvider,
|
|
34
|
-
isMediaType,
|
|
35
|
-
parseImageInput,
|
|
36
30
|
resetUnderstandImageLLMProvider,
|
|
37
31
|
setUnderstandImageLLMProvider,
|
|
38
|
-
sniffMimeType,
|
|
39
32
|
understandImageTool
|
|
40
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
33
|
+
} from "./shared/@ai-setting/roy-agent-core-xwm8zavb.js";
|
|
41
34
|
import {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
35
|
+
ATTACH_FILE_MAX_BYTES,
|
|
36
|
+
isMediaType,
|
|
37
|
+
parseImageInput,
|
|
38
|
+
sniffMimeType
|
|
39
|
+
} from "./shared/@ai-setting/roy-agent-core-zjdzk1gg.js";
|
|
40
|
+
import {
|
|
41
|
+
DebugComponent
|
|
42
|
+
} from "./shared/@ai-setting/roy-agent-core-rs5tp44j.js";
|
|
43
|
+
import {
|
|
44
|
+
ReplFormatter,
|
|
45
|
+
TraceFormatter,
|
|
46
|
+
TreeFormatter
|
|
47
|
+
} from "./shared/@ai-setting/roy-agent-core-rvv6ydff.js";
|
|
46
48
|
import {
|
|
47
49
|
MemoryComponent
|
|
48
50
|
} from "./shared/@ai-setting/roy-agent-core-qpt5fa8h.js";
|
|
49
|
-
import"./shared/@ai-setting/roy-agent-core-g1s2h0e5.js";
|
|
50
51
|
import {
|
|
51
52
|
MemoryPlugin,
|
|
52
53
|
createMemoryPlugin
|
|
53
54
|
} from "./shared/@ai-setting/roy-agent-core-qe3m3hec.js";
|
|
55
|
+
import"./shared/@ai-setting/roy-agent-core-g1s2h0e5.js";
|
|
54
56
|
import {
|
|
55
|
-
|
|
56
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
57
|
+
SkillComponent
|
|
58
|
+
} from "./shared/@ai-setting/roy-agent-core-b64s2vk9.js";
|
|
59
|
+
import"./shared/@ai-setting/roy-agent-core-psvxt4c9.js";
|
|
60
|
+
import"./shared/@ai-setting/roy-agent-core-k5hxvaf0.js";
|
|
57
61
|
import {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
} from "./shared/@ai-setting/roy-agent-core-rvv6ydff.js";
|
|
62
|
+
closeDatabase
|
|
63
|
+
} from "./shared/@ai-setting/roy-agent-core-sfwt66pv.js";
|
|
64
|
+
import"./shared/@ai-setting/roy-agent-core-6m2gh57e.js";
|
|
62
65
|
import {
|
|
63
66
|
BaseEnvironment,
|
|
64
67
|
generateDescendingId,
|
|
65
68
|
generateId
|
|
66
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
69
|
+
} from "./shared/@ai-setting/roy-agent-core-32226m35.js";
|
|
70
|
+
import {
|
|
71
|
+
TaskComponent
|
|
72
|
+
} from "./shared/@ai-setting/roy-agent-core-4m4awz0m.js";
|
|
73
|
+
import"./shared/@ai-setting/roy-agent-core-k4byknt1.js";
|
|
74
|
+
import"./shared/@ai-setting/roy-agent-core-rn57psp0.js";
|
|
75
|
+
import"./shared/@ai-setting/roy-agent-core-amkqnyzy.js";
|
|
76
|
+
import"./shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
77
|
+
import"./shared/@ai-setting/roy-agent-core-2yt4jmzv.js";
|
|
78
|
+
import"./shared/@ai-setting/roy-agent-core-mvs5sen6.js";
|
|
79
|
+
import {
|
|
80
|
+
SQLiteTaskStore,
|
|
81
|
+
getDefaultTaskDbPath
|
|
82
|
+
} from "./shared/@ai-setting/roy-agent-core-3ep1dxf1.js";
|
|
67
83
|
import {
|
|
68
84
|
BountyIMInstance,
|
|
69
85
|
EventSourceComponent,
|
|
@@ -76,7 +92,11 @@ import {
|
|
|
76
92
|
larkCliHandler,
|
|
77
93
|
resolveBountyIMSystemPrompt,
|
|
78
94
|
timerHandler
|
|
79
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
95
|
+
} from "./shared/@ai-setting/roy-agent-core-w4dy6zzf.js";
|
|
96
|
+
import {
|
|
97
|
+
LogTraceComponent,
|
|
98
|
+
LogTraceConfigSchema
|
|
99
|
+
} from "./shared/@ai-setting/roy-agent-core-pz2n121t.js";
|
|
80
100
|
import {
|
|
81
101
|
BUILT_IN_EVENT_SOURCE_TYPES,
|
|
82
102
|
BUILT_IN_EVENT_SOURCE_TYPE_LIST,
|
|
@@ -86,40 +106,24 @@ import {
|
|
|
86
106
|
isValidEventSourceType,
|
|
87
107
|
validateEventSourceConfig
|
|
88
108
|
} from "./shared/@ai-setting/roy-agent-core-ds5f75pg.js";
|
|
89
|
-
import {
|
|
90
|
-
LogTraceComponent,
|
|
91
|
-
LogTraceConfigSchema
|
|
92
|
-
} from "./shared/@ai-setting/roy-agent-core-pz2n121t.js";
|
|
93
|
-
import {
|
|
94
|
-
PluginComponent
|
|
95
|
-
} from "./shared/@ai-setting/roy-agent-core-3x3k7gfs.js";
|
|
96
109
|
import {
|
|
97
110
|
TaskTagPlugin,
|
|
98
111
|
createAutoTaskPlugin
|
|
99
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
112
|
+
} from "./shared/@ai-setting/roy-agent-core-zhv8efqh.js";
|
|
100
113
|
import {
|
|
101
|
-
|
|
102
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
114
|
+
TaskHookPoints
|
|
115
|
+
} from "./shared/@ai-setting/roy-agent-core-1pg0fepg.js";
|
|
116
|
+
import {
|
|
117
|
+
getBuiltInPrompt,
|
|
118
|
+
getBuiltInPromptNames
|
|
119
|
+
} from "./shared/@ai-setting/roy-agent-core-skqt40yy.js";
|
|
103
120
|
import {
|
|
104
121
|
WorkflowComponent
|
|
105
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
122
|
+
} from "./shared/@ai-setting/roy-agent-core-7bskb5j2.js";
|
|
106
123
|
import {
|
|
107
124
|
init_node_registry_helper,
|
|
108
125
|
registerDecoratorNodeType
|
|
109
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
110
|
-
import"./shared/@ai-setting/roy-agent-core-s4r8f6se.js";
|
|
111
|
-
import"./shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
112
|
-
import"./shared/@ai-setting/roy-agent-core-ec4djnzd.js";
|
|
113
|
-
import"./shared/@ai-setting/roy-agent-core-h1cb2jzh.js";
|
|
114
|
-
import"./shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
115
|
-
import"./shared/@ai-setting/roy-agent-core-hhrg314p.js";
|
|
116
|
-
import"./shared/@ai-setting/roy-agent-core-0qjw25e8.js";
|
|
117
|
-
import"./shared/@ai-setting/roy-agent-core-qatz3q31.js";
|
|
118
|
-
import"./shared/@ai-setting/roy-agent-core-1db4vpc6.js";
|
|
119
|
-
import"./shared/@ai-setting/roy-agent-core-j9ybhwnq.js";
|
|
120
|
-
import"./shared/@ai-setting/roy-agent-core-w8rv08d3.js";
|
|
121
|
-
import"./shared/@ai-setting/roy-agent-core-0v74marc.js";
|
|
122
|
-
import"./shared/@ai-setting/roy-agent-core-jrj30vq3.js";
|
|
126
|
+
} from "./shared/@ai-setting/roy-agent-core-7xek618f.js";
|
|
123
127
|
import {
|
|
124
128
|
Edge,
|
|
125
129
|
NodeAs,
|
|
@@ -128,36 +132,39 @@ import {
|
|
|
128
132
|
createWorkflowFromClass
|
|
129
133
|
} from "./shared/@ai-setting/roy-agent-core-h0x19xgn.js";
|
|
130
134
|
import"./shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
135
|
+
import"./shared/@ai-setting/roy-agent-core-29ph0e2k.js";
|
|
136
|
+
import {
|
|
137
|
+
SessionComponent
|
|
138
|
+
} from "./shared/@ai-setting/roy-agent-core-v13dq3nc.js";
|
|
139
|
+
import {
|
|
140
|
+
MemorySessionStore
|
|
141
|
+
} from "./shared/@ai-setting/roy-agent-core-wgp3q62x.js";
|
|
142
|
+
import"./shared/@ai-setting/roy-agent-core-hhrg314p.js";
|
|
143
|
+
import"./shared/@ai-setting/roy-agent-core-j9ybhwnq.js";
|
|
144
|
+
import"./shared/@ai-setting/roy-agent-core-cpfdvzqk.js";
|
|
145
|
+
import"./shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
146
|
+
import"./shared/@ai-setting/roy-agent-core-ec4djnzd.js";
|
|
147
|
+
import"./shared/@ai-setting/roy-agent-core-hmqmznjc.js";
|
|
148
|
+
import"./shared/@ai-setting/roy-agent-core-1db4vpc6.js";
|
|
149
|
+
import"./shared/@ai-setting/roy-agent-core-w8rv08d3.js";
|
|
150
|
+
import"./shared/@ai-setting/roy-agent-core-h1cb2jzh.js";
|
|
151
|
+
import"./shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
152
|
+
import"./shared/@ai-setting/roy-agent-core-0v74marc.js";
|
|
153
|
+
import"./shared/@ai-setting/roy-agent-core-jrj30vq3.js";
|
|
154
|
+
import"./shared/@ai-setting/roy-agent-core-rvxg1wps.js";
|
|
155
|
+
import {
|
|
156
|
+
CommandsComponent
|
|
157
|
+
} from "./shared/@ai-setting/roy-agent-core-6re7eg4w.js";
|
|
131
158
|
import {
|
|
132
159
|
AgentComponent,
|
|
133
160
|
AgentComponentConfigSchema
|
|
134
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
161
|
+
} from "./shared/@ai-setting/roy-agent-core-q6mq7gmc.js";
|
|
135
162
|
import {
|
|
136
163
|
ToolComponent,
|
|
137
164
|
ToolRegistry,
|
|
138
165
|
ToolValidator
|
|
139
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
166
|
+
} from "./shared/@ai-setting/roy-agent-core-71wde8ce.js";
|
|
140
167
|
import"./shared/@ai-setting/roy-agent-core-br7dmedr.js";
|
|
141
|
-
import"./shared/@ai-setting/roy-agent-core-t3yqzgse.js";
|
|
142
|
-
import {
|
|
143
|
-
AskUserError,
|
|
144
|
-
init_workflow_hil
|
|
145
|
-
} from "./shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
146
|
-
import {
|
|
147
|
-
TaskComponent
|
|
148
|
-
} from "./shared/@ai-setting/roy-agent-core-y9q3jdcx.js";
|
|
149
|
-
import"./shared/@ai-setting/roy-agent-core-amkqnyzy.js";
|
|
150
|
-
import"./shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
151
|
-
import"./shared/@ai-setting/roy-agent-core-50jdqb7r.js";
|
|
152
|
-
import"./shared/@ai-setting/roy-agent-core-mvs5sen6.js";
|
|
153
|
-
import {
|
|
154
|
-
SQLiteTaskStore,
|
|
155
|
-
getDefaultTaskDbPath
|
|
156
|
-
} from "./shared/@ai-setting/roy-agent-core-3ep1dxf1.js";
|
|
157
|
-
import {
|
|
158
|
-
getBuiltInPrompt,
|
|
159
|
-
getBuiltInPromptNames
|
|
160
|
-
} from "./shared/@ai-setting/roy-agent-core-skqt40yy.js";
|
|
161
168
|
import {
|
|
162
169
|
AgentRegistry
|
|
163
170
|
} from "./shared/@ai-setting/roy-agent-core-x0yztmm6.js";
|
|
@@ -166,19 +173,29 @@ import {
|
|
|
166
173
|
getXDGPath,
|
|
167
174
|
getXDGPaths
|
|
168
175
|
} from "./shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
176
|
+
import"./shared/@ai-setting/roy-agent-core-t3yqzgse.js";
|
|
177
|
+
import"./shared/@ai-setting/roy-agent-core-zcx8nf4a.js";
|
|
178
|
+
import {
|
|
179
|
+
createInvokeConfig,
|
|
180
|
+
invoke,
|
|
181
|
+
invokeNonStream,
|
|
182
|
+
parseModelString
|
|
183
|
+
} from "./shared/@ai-setting/roy-agent-core-2xb3f3ye.js";
|
|
169
184
|
import"./shared/@ai-setting/roy-agent-core-c1v263jn.js";
|
|
170
|
-
import"./shared/@ai-setting/roy-agent-core-k4byknt1.js";
|
|
171
|
-
import"./shared/@ai-setting/roy-agent-core-rn57psp0.js";
|
|
172
185
|
import {
|
|
173
|
-
|
|
174
|
-
|
|
186
|
+
AskUserError,
|
|
187
|
+
init_workflow_hil
|
|
188
|
+
} from "./shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
175
189
|
import {
|
|
176
|
-
|
|
177
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
178
|
-
import
|
|
190
|
+
PluginComponent
|
|
191
|
+
} from "./shared/@ai-setting/roy-agent-core-3x3k7gfs.js";
|
|
192
|
+
import {
|
|
193
|
+
BasePlugin
|
|
194
|
+
} from "./shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
179
195
|
import {
|
|
180
196
|
McpComponent
|
|
181
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
197
|
+
} from "./shared/@ai-setting/roy-agent-core-zqeq8m9z.js";
|
|
198
|
+
import"./shared/@ai-setting/roy-agent-core-dxfd6p1c.js";
|
|
182
199
|
import {
|
|
183
200
|
AgentError,
|
|
184
201
|
ComponentError,
|
|
@@ -190,22 +207,6 @@ import {
|
|
|
190
207
|
getErrorCode,
|
|
191
208
|
isRoyError
|
|
192
209
|
} from "./shared/@ai-setting/roy-agent-core-ctdhjv68.js";
|
|
193
|
-
import"./shared/@ai-setting/roy-agent-core-fnv3ev18.js";
|
|
194
|
-
import"./shared/@ai-setting/roy-agent-core-dxfd6p1c.js";
|
|
195
|
-
import {
|
|
196
|
-
SessionComponent
|
|
197
|
-
} from "./shared/@ai-setting/roy-agent-core-xvag5pd0.js";
|
|
198
|
-
import"./shared/@ai-setting/roy-agent-core-rvxg1wps.js";
|
|
199
|
-
import {
|
|
200
|
-
MemorySessionStore
|
|
201
|
-
} from "./shared/@ai-setting/roy-agent-core-wgp3q62x.js";
|
|
202
|
-
import"./shared/@ai-setting/roy-agent-core-zcx8nf4a.js";
|
|
203
|
-
import {
|
|
204
|
-
createInvokeConfig,
|
|
205
|
-
invoke,
|
|
206
|
-
invokeNonStream,
|
|
207
|
-
parseModelString
|
|
208
|
-
} from "./shared/@ai-setting/roy-agent-core-2xb3f3ye.js";
|
|
209
210
|
import"./shared/@ai-setting/roy-agent-core-7hh0brvs.js";
|
|
210
211
|
import {
|
|
211
212
|
BaseComponent
|
|
@@ -249,6 +250,7 @@ import {
|
|
|
249
250
|
import {
|
|
250
251
|
SQLiteSpanStorage
|
|
251
252
|
} from "./shared/@ai-setting/roy-agent-core-4an1p9a1.js";
|
|
253
|
+
import"./shared/@ai-setting/roy-agent-core-fnv3ev18.js";
|
|
252
254
|
import"./shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
253
255
|
// src/env/session-tree-stopper.ts
|
|
254
256
|
init_decorator();
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isValidSessionId
|
|
3
|
+
} from "./roy-agent-core-v13dq3nc.js";
|
|
1
4
|
import {
|
|
2
5
|
TAG_MAX_COUNT,
|
|
3
6
|
TAG_MIN_COUNT
|
|
@@ -5,16 +8,13 @@ import {
|
|
|
5
8
|
import {
|
|
6
9
|
validateWorkflowDefinition
|
|
7
10
|
} from "./roy-agent-core-w8rv08d3.js";
|
|
8
|
-
import {
|
|
9
|
-
AskUserError,
|
|
10
|
-
init_workflow_hil
|
|
11
|
-
} from "./roy-agent-core-e25xkv53.js";
|
|
12
11
|
import {
|
|
13
12
|
getCurrentBgTaskId
|
|
14
13
|
} from "./roy-agent-core-c1v263jn.js";
|
|
15
14
|
import {
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
AskUserError,
|
|
16
|
+
init_workflow_hil
|
|
17
|
+
} from "./roy-agent-core-e25xkv53.js";
|
|
18
18
|
import {
|
|
19
19
|
TracedAs,
|
|
20
20
|
init_decorator
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createQueryBackgroundProcessTool
|
|
3
|
-
} from "./roy-agent-core-amkqnyzy.js";
|
|
4
|
-
import {
|
|
5
|
-
TaskEntityEventTypes
|
|
6
|
-
} from "./roy-agent-core-8gxth0eh.js";
|
|
7
|
-
import {
|
|
8
|
-
BackgroundTaskManager,
|
|
9
|
-
createDelegateTool,
|
|
10
|
-
createStopTool
|
|
11
|
-
} from "./roy-agent-core-50jdqb7r.js";
|
|
12
|
-
import {
|
|
13
|
-
SQLiteTaskStore,
|
|
14
|
-
getDefaultTaskDbPath
|
|
15
|
-
} from "./roy-agent-core-3ep1dxf1.js";
|
|
16
1
|
import {
|
|
17
2
|
batchArchiveTaskTool,
|
|
18
3
|
batchDeleteTaskTool,
|
|
@@ -32,6 +17,21 @@ import {
|
|
|
32
17
|
listOperationsTool,
|
|
33
18
|
updateOperationTool
|
|
34
19
|
} from "./roy-agent-core-rn57psp0.js";
|
|
20
|
+
import {
|
|
21
|
+
createQueryBackgroundProcessTool
|
|
22
|
+
} from "./roy-agent-core-amkqnyzy.js";
|
|
23
|
+
import {
|
|
24
|
+
TaskEntityEventTypes
|
|
25
|
+
} from "./roy-agent-core-8gxth0eh.js";
|
|
26
|
+
import {
|
|
27
|
+
BackgroundTaskManager,
|
|
28
|
+
createDelegateTool,
|
|
29
|
+
createStopTool
|
|
30
|
+
} from "./roy-agent-core-2yt4jmzv.js";
|
|
31
|
+
import {
|
|
32
|
+
SQLiteTaskStore,
|
|
33
|
+
getDefaultTaskDbPath
|
|
34
|
+
} from "./roy-agent-core-3ep1dxf1.js";
|
|
35
35
|
import {
|
|
36
36
|
TaskHookPoints
|
|
37
37
|
} from "./roy-agent-core-1pg0fepg.js";
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
hasDecoratorNodes,
|
|
4
4
|
init_node_registry_helper,
|
|
5
5
|
registerDecoratorNodeType
|
|
6
|
-
} from "./roy-agent-core-
|
|
7
|
-
import"./roy-agent-core-ddwa0n6h.js";
|
|
6
|
+
} from "./roy-agent-core-7xek618f.js";
|
|
8
7
|
import"./roy-agent-core-1ce3fqrk.js";
|
|
8
|
+
import"./roy-agent-core-ddwa0n6h.js";
|
|
9
9
|
import"./roy-agent-core-gb7pm9c0.js";
|
|
10
10
|
import"./roy-agent-core-kaq037np.js";
|
|
11
11
|
import"./roy-agent-core-1khp1m0r.js";
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
exports_node_registry_helper,
|
|
3
3
|
init_node_registry_helper
|
|
4
|
-
} from "./roy-agent-core-
|
|
5
|
-
import {
|
|
6
|
-
WorkflowEngine,
|
|
7
|
-
exports_engine,
|
|
8
|
-
init_engine
|
|
9
|
-
} from "./roy-agent-core-s4r8f6se.js";
|
|
4
|
+
} from "./roy-agent-core-7xek618f.js";
|
|
10
5
|
import {
|
|
11
6
|
askUserTool,
|
|
12
7
|
createRunWorkflowTool,
|
|
@@ -18,10 +13,15 @@ import {
|
|
|
18
13
|
createWorkflowSearchTool,
|
|
19
14
|
createWorkflowTagListTool,
|
|
20
15
|
createWorkflowValidateTool
|
|
21
|
-
} from "./roy-agent-core-
|
|
16
|
+
} from "./roy-agent-core-29ph0e2k.js";
|
|
22
17
|
import {
|
|
23
18
|
WorkflowService
|
|
24
19
|
} from "./roy-agent-core-j9ybhwnq.js";
|
|
20
|
+
import {
|
|
21
|
+
WorkflowEngine,
|
|
22
|
+
exports_engine,
|
|
23
|
+
init_engine
|
|
24
|
+
} from "./roy-agent-core-cpfdvzqk.js";
|
|
25
25
|
import {
|
|
26
26
|
BaseComponent
|
|
27
27
|
} from "./roy-agent-core-pde8hkq4.js";
|
|
@@ -104,7 +104,7 @@ class WorkflowComponent extends BaseComponent {
|
|
|
104
104
|
return;
|
|
105
105
|
try {
|
|
106
106
|
const { NodeRegistry } = await import("../../env/workflow/engine/index.js");
|
|
107
|
-
const { registerDecoratorNodeType: registerDecoratorNodeType2 } = await import("./roy-agent-core-
|
|
107
|
+
const { registerDecoratorNodeType: registerDecoratorNodeType2 } = await import("./roy-agent-core-62mvbqmj.js");
|
|
108
108
|
this.nodeRegistry = new NodeRegistry;
|
|
109
109
|
registerDecoratorNodeType2(this.nodeRegistry);
|
|
110
110
|
this.decoratorsRegistered = true;
|
|
@@ -134,7 +134,7 @@ class WorkflowComponent extends BaseComponent {
|
|
|
134
134
|
}
|
|
135
135
|
async runWorkflow(definition, input, options) {
|
|
136
136
|
const { NodeRegistry } = await import("../../env/workflow/engine/index.js");
|
|
137
|
-
const { registerDecoratorNodeType: registerDecoratorNodeType2 } = await import("./roy-agent-core-
|
|
137
|
+
const { registerDecoratorNodeType: registerDecoratorNodeType2 } = await import("./roy-agent-core-62mvbqmj.js");
|
|
138
138
|
const toolComponent = this.toolComponent || this._workflowEnv?.getComponent("tool");
|
|
139
139
|
const skillComponent = this._workflowEnv?.getComponent("skill");
|
|
140
140
|
let agentRunner = this.agentRunner;
|
|
@@ -4,6 +4,114 @@ import {
|
|
|
4
4
|
toEnvKey
|
|
5
5
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
6
6
|
|
|
7
|
+
// src/config/config-parser.ts
|
|
8
|
+
import { parse as parseJSONCInternal, ParseErrorCode } from "jsonc-parser";
|
|
9
|
+
function parseJSONC(content) {
|
|
10
|
+
const errors = [];
|
|
11
|
+
const result = parseJSONCInternal(content, errors, {
|
|
12
|
+
allowTrailingComma: true,
|
|
13
|
+
disallowComments: false
|
|
14
|
+
});
|
|
15
|
+
if (errors.length > 0) {
|
|
16
|
+
const hasOnlyValueExpected = result === undefined && errors.length === 1 && errors[0].error === ParseErrorCode.ValueExpected;
|
|
17
|
+
if (!hasOnlyValueExpected) {
|
|
18
|
+
const error = errors[0];
|
|
19
|
+
const offset = error.offset;
|
|
20
|
+
const lines = content.substring(0, offset).split(`
|
|
21
|
+
`);
|
|
22
|
+
const line = lines.length;
|
|
23
|
+
const col = lines[lines.length - 1].length + 1;
|
|
24
|
+
const errorMessages = {
|
|
25
|
+
[ParseErrorCode.UnexpectedEndOfString]: "Unexpected end of string",
|
|
26
|
+
[ParseErrorCode.InvalidCharacter]: "Invalid character",
|
|
27
|
+
[ParseErrorCode.PropertyNameExpected]: "Property name expected",
|
|
28
|
+
[ParseErrorCode.ValueExpected]: "Value expected",
|
|
29
|
+
[ParseErrorCode.ColonExpected]: "Colon expected",
|
|
30
|
+
[ParseErrorCode.CommaExpected]: "Comma expected",
|
|
31
|
+
[ParseErrorCode.CloseBraceExpected]: "Close brace expected",
|
|
32
|
+
[ParseErrorCode.CloseBracketExpected]: "Close bracket expected",
|
|
33
|
+
[ParseErrorCode.EndOfFileExpected]: "Unexpected end of input",
|
|
34
|
+
[ParseErrorCode.InvalidSymbol]: "Invalid symbol"
|
|
35
|
+
};
|
|
36
|
+
throw new Error(`JSONC parse error at line ${line}, col ${col}: ${errorMessages[error.error] || "Unknown error"}`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
if (result === undefined || result === null) {
|
|
40
|
+
return {};
|
|
41
|
+
}
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
function substituteEnvVars(value) {
|
|
45
|
+
if (typeof value === "string") {
|
|
46
|
+
return value.replace(/\$\{([^}]+)\}/g, (match, varExpr) => {
|
|
47
|
+
const [varName, defaultValue] = varExpr.split(":-");
|
|
48
|
+
const envValue = process.env[varName.trim()];
|
|
49
|
+
if (envValue !== undefined) {
|
|
50
|
+
return envValue;
|
|
51
|
+
}
|
|
52
|
+
if (defaultValue !== undefined) {
|
|
53
|
+
return defaultValue;
|
|
54
|
+
}
|
|
55
|
+
return "";
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
if (Array.isArray(value)) {
|
|
59
|
+
return value.map((item) => substituteEnvVars(item));
|
|
60
|
+
}
|
|
61
|
+
if (value !== null && typeof value === "object") {
|
|
62
|
+
const result = {};
|
|
63
|
+
for (const [key, val] of Object.entries(value)) {
|
|
64
|
+
result[key] = substituteEnvVars(val);
|
|
65
|
+
}
|
|
66
|
+
return result;
|
|
67
|
+
}
|
|
68
|
+
return value;
|
|
69
|
+
}
|
|
70
|
+
function parseJSONCWithEnv(content) {
|
|
71
|
+
const parsed = parseJSONC(content);
|
|
72
|
+
return substituteEnvVars(parsed);
|
|
73
|
+
}
|
|
74
|
+
var PROTOCOL_REF_PATTERN = /^\$\{([^:]+):\/\/[^}]+\}$/;
|
|
75
|
+
var PROTOCOL_REF_WITH_DEFAULT_PATTERN = /^\$\{([^:]+):\/\/([^:#]+)(?:#([^:-]+))?(?::-(.*))?\}$/;
|
|
76
|
+
function isProtocolRefString(value) {
|
|
77
|
+
return PROTOCOL_REF_PATTERN.test(value);
|
|
78
|
+
}
|
|
79
|
+
function extractDefaultValue(ref) {
|
|
80
|
+
const match = ref.match(PROTOCOL_REF_WITH_DEFAULT_PATTERN);
|
|
81
|
+
return match ? match[4] : undefined;
|
|
82
|
+
}
|
|
83
|
+
function substituteProtocolRefs(value, resolver) {
|
|
84
|
+
if (typeof value === "string") {
|
|
85
|
+
if (isProtocolRefString(value)) {
|
|
86
|
+
const result = resolver.resolve(value);
|
|
87
|
+
if (result !== null) {
|
|
88
|
+
return result.value;
|
|
89
|
+
}
|
|
90
|
+
const defaultValue = extractDefaultValue(value);
|
|
91
|
+
if (defaultValue !== undefined) {
|
|
92
|
+
return defaultValue;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return value;
|
|
96
|
+
}
|
|
97
|
+
if (Array.isArray(value)) {
|
|
98
|
+
return value.map((item) => substituteProtocolRefs(item, resolver));
|
|
99
|
+
}
|
|
100
|
+
if (value !== null && typeof value === "object") {
|
|
101
|
+
const result = {};
|
|
102
|
+
for (const [key, val] of Object.entries(value)) {
|
|
103
|
+
result[key] = substituteProtocolRefs(val, resolver);
|
|
104
|
+
}
|
|
105
|
+
return result;
|
|
106
|
+
}
|
|
107
|
+
return value;
|
|
108
|
+
}
|
|
109
|
+
function parseJSONCWithProtocols(content, resolver) {
|
|
110
|
+
const parsed = parseJSONC(content);
|
|
111
|
+
const withProtocols = substituteProtocolRefs(parsed, resolver);
|
|
112
|
+
return substituteEnvVars(withProtocols);
|
|
113
|
+
}
|
|
114
|
+
|
|
7
115
|
// src/config/env-source.ts
|
|
8
116
|
class EnvSource {
|
|
9
117
|
name = "env";
|
|
@@ -226,4 +334,4 @@ class EnvSource {
|
|
|
226
334
|
}
|
|
227
335
|
}
|
|
228
336
|
|
|
229
|
-
export { EnvSource };
|
|
337
|
+
export { parseJSONC, substituteEnvVars, parseJSONCWithEnv, substituteProtocolRefs, parseJSONCWithProtocols, EnvSource };
|
|
@@ -8,10 +8,6 @@ import {
|
|
|
8
8
|
AgentComponentAdapter,
|
|
9
9
|
init_agent_component_adapter
|
|
10
10
|
} from "./roy-agent-core-ec4djnzd.js";
|
|
11
|
-
import {
|
|
12
|
-
TemplateResolver,
|
|
13
|
-
init_template_resolver
|
|
14
|
-
} from "./roy-agent-core-h1cb2jzh.js";
|
|
15
11
|
import {
|
|
16
12
|
PythonCallNode,
|
|
17
13
|
SkillNode,
|
|
@@ -21,7 +17,7 @@ import {
|
|
|
21
17
|
init_skill_node,
|
|
22
18
|
init_tool_node,
|
|
23
19
|
init_workflow_node
|
|
24
|
-
} from "./roy-agent-core-
|
|
20
|
+
} from "./roy-agent-core-hmqmznjc.js";
|
|
25
21
|
import {
|
|
26
22
|
WORKFLOW_SUBMIT_OUTPUT_TOOL_NAME,
|
|
27
23
|
init_json_schema_to_zod,
|
|
@@ -30,6 +26,10 @@ import {
|
|
|
30
26
|
parseWorkflowJsonOutput,
|
|
31
27
|
validateJsonOutputSchema
|
|
32
28
|
} from "./roy-agent-core-1db4vpc6.js";
|
|
29
|
+
import {
|
|
30
|
+
TemplateResolver,
|
|
31
|
+
init_template_resolver
|
|
32
|
+
} from "./roy-agent-core-h1cb2jzh.js";
|
|
33
33
|
import {
|
|
34
34
|
DAGManager,
|
|
35
35
|
init_dag_manager
|
|
@@ -1423,6 +1423,57 @@ function mapNonTerminal(agentSessions, terminalStatus) {
|
|
|
1423
1423
|
}
|
|
1424
1424
|
var init_agent_session_metadata = () => {};
|
|
1425
1425
|
|
|
1426
|
+
// src/env/workflow/utils/sensitive-redact.ts
|
|
1427
|
+
function redactSensitiveFields(input) {
|
|
1428
|
+
if (input === undefined || input === null) {
|
|
1429
|
+
return;
|
|
1430
|
+
}
|
|
1431
|
+
if (typeof input !== "object") {
|
|
1432
|
+
return input;
|
|
1433
|
+
}
|
|
1434
|
+
return redactValue(input);
|
|
1435
|
+
}
|
|
1436
|
+
function redactValue(value) {
|
|
1437
|
+
if (value === null || value === undefined) {
|
|
1438
|
+
return value;
|
|
1439
|
+
}
|
|
1440
|
+
if (Array.isArray(value)) {
|
|
1441
|
+
return value.map((item) => redactValue(item));
|
|
1442
|
+
}
|
|
1443
|
+
if (typeof value !== "object") {
|
|
1444
|
+
return value;
|
|
1445
|
+
}
|
|
1446
|
+
const obj = value;
|
|
1447
|
+
const result = {};
|
|
1448
|
+
for (const [k, v] of Object.entries(obj)) {
|
|
1449
|
+
if (SENSITIVE_KEYS.has(k.toLowerCase())) {
|
|
1450
|
+
result[k] = REDACTED_SENTINEL;
|
|
1451
|
+
} else {
|
|
1452
|
+
result[k] = redactValue(v);
|
|
1453
|
+
}
|
|
1454
|
+
}
|
|
1455
|
+
return result;
|
|
1456
|
+
}
|
|
1457
|
+
var REDACTED_SENTINEL = "[REDACTED]", SENSITIVE_KEYS;
|
|
1458
|
+
var init_sensitive_redact = __esm(() => {
|
|
1459
|
+
SENSITIVE_KEYS = new Set([
|
|
1460
|
+
"password",
|
|
1461
|
+
"ldap_password",
|
|
1462
|
+
"apikey",
|
|
1463
|
+
"api_key",
|
|
1464
|
+
"token",
|
|
1465
|
+
"secret",
|
|
1466
|
+
"auth",
|
|
1467
|
+
"access_token",
|
|
1468
|
+
"refresh_token",
|
|
1469
|
+
"authorization",
|
|
1470
|
+
"cookie",
|
|
1471
|
+
"private_key",
|
|
1472
|
+
"session_token",
|
|
1473
|
+
"sid"
|
|
1474
|
+
]);
|
|
1475
|
+
});
|
|
1476
|
+
|
|
1426
1477
|
// src/env/workflow/runtime/runtime-cancellation-scope.ts
|
|
1427
1478
|
var RuntimeCancellationScope;
|
|
1428
1479
|
var init_runtime_cancellation_scope = __esm(() => {
|
|
@@ -1561,6 +1612,7 @@ var init_engine = __esm(() => {
|
|
|
1561
1612
|
init_decorator();
|
|
1562
1613
|
init_template_resolver();
|
|
1563
1614
|
init_workflow_error();
|
|
1615
|
+
init_sensitive_redact();
|
|
1564
1616
|
init_runtime_cancellation_scope();
|
|
1565
1617
|
execFileAsync = promisify(execFileCb);
|
|
1566
1618
|
logger3 = createLogger("workflow:engine");
|
|
@@ -1676,7 +1728,7 @@ var init_engine = __esm(() => {
|
|
|
1676
1728
|
workflowName,
|
|
1677
1729
|
workflowVersion: workflowDef.version,
|
|
1678
1730
|
status: "running",
|
|
1679
|
-
input: options?.input,
|
|
1731
|
+
input: redactSensitiveFields(options?.input),
|
|
1680
1732
|
agentSessions: []
|
|
1681
1733
|
};
|
|
1682
1734
|
await this.sessionComponent.create({
|
|
@@ -1706,14 +1758,16 @@ var init_engine = __esm(() => {
|
|
|
1706
1758
|
const hasNewInput = typeof options.input === "string" ? options.input !== undefined && options.input !== "" : Object.keys(options.input).length > 0;
|
|
1707
1759
|
if (hasNewInput) {
|
|
1708
1760
|
const existingInput = metadata.input || {};
|
|
1709
|
-
const
|
|
1761
|
+
const newInputRaw = typeof options.input === "string" ? { userQuery: options.input } : options.input;
|
|
1762
|
+
const newInput = redactSensitiveFields(newInputRaw);
|
|
1763
|
+
const mergedInput = { ...existingInput, ...newInput };
|
|
1710
1764
|
await this.sessionComponent.update(sessionId, {
|
|
1711
1765
|
metadata: {
|
|
1712
1766
|
...metadata,
|
|
1713
|
-
input:
|
|
1767
|
+
input: mergedInput
|
|
1714
1768
|
}
|
|
1715
1769
|
});
|
|
1716
|
-
metadata.input =
|
|
1770
|
+
metadata.input = mergedInput;
|
|
1717
1771
|
logger3.info(`[WorkflowEngine] Updated session ${sessionId} input with resume user input`);
|
|
1718
1772
|
}
|
|
1719
1773
|
}
|