@ai-setting/roy-agent-core 1.5.49 → 1.5.51
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 +10 -6
- package/dist/env/agent/index.js +7 -7
- package/dist/env/commands/index.js +7 -6
- package/dist/env/context/index.js +6 -2
- package/dist/env/debug/index.js +10 -6
- package/dist/env/event-source/index.js +9 -9
- package/dist/env/hook/index.js +8 -4
- package/dist/env/index.js +20 -20
- package/dist/env/llm/index.js +7 -7
- package/dist/env/log-trace/index.js +7 -7
- package/dist/env/mcp/index.js +7 -6
- package/dist/env/memory/index.js +7 -6
- package/dist/env/plugin/index.js +7 -6
- package/dist/env/prompt/index.js +7 -6
- package/dist/env/session/index.js +7 -7
- package/dist/env/skill/index.js +7 -6
- package/dist/env/task/delegate/index.js +4 -4
- package/dist/env/task/index.js +9 -9
- package/dist/env/task/plugins/index.js +3 -3
- package/dist/env/task/tools/index.js +3 -2
- package/dist/env/tool/index.js +7 -6
- package/dist/env/workflow/engine/index.js +6 -6
- package/dist/env/workflow/index.js +9 -9
- package/dist/index.js +34 -34
- package/dist/shared/@ai-setting/{roy-agent-core-h6bqx4jj.js → roy-agent-core-0frwccap.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-607ktjxs.js → roy-agent-core-0x3g6snw.js} +8 -6
- package/dist/shared/@ai-setting/{roy-agent-core-8f8dq3kj.js → roy-agent-core-13vzexp2.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-n1awj8ks.js → roy-agent-core-29867p67.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-bjphrqsm.js → roy-agent-core-2g5j2nw6.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-sj2yd6g4.js → roy-agent-core-2k4r9grg.js} +27 -17
- package/dist/shared/@ai-setting/{roy-agent-core-7qj11qp8.js → roy-agent-core-2xah3h0z.js} +11 -6
- package/dist/shared/@ai-setting/{roy-agent-core-pxp9yq24.js → roy-agent-core-3jk7ngmx.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-dvrfs18y.js → roy-agent-core-4hk6ey73.js} +17 -2
- package/dist/shared/@ai-setting/{roy-agent-core-5dkewp2h.js → roy-agent-core-5k8watmp.js} +24 -9
- package/dist/shared/@ai-setting/{roy-agent-core-wv9as4ds.js → roy-agent-core-5t6cryce.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-476ewnwy.js → roy-agent-core-6de35s2n.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-rrsn14cr.js → roy-agent-core-88d3k0p0.js} +4 -4
- package/dist/shared/@ai-setting/roy-agent-core-awmae5ax.js +258 -0
- package/dist/shared/@ai-setting/{roy-agent-core-gfzqwb6v.js → roy-agent-core-cssnkkkg.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-8whpa5yz.js → roy-agent-core-e68xspar.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-14fna5qg.js → roy-agent-core-f336bk4g.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-cv8kqab8.js → roy-agent-core-h9tpga25.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-z3pq1nx9.js → roy-agent-core-hd9p5490.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-rwt7b6dh.js → roy-agent-core-kjdpe2ey.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-ym6qbh1e.js → roy-agent-core-mab4mzg3.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-xpw0mtfv.js → roy-agent-core-qjh1ec46.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-nxf64fn4.js → roy-agent-core-qmr365f5.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-d40gbvzj.js → roy-agent-core-rmndq0sb.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-4zjdkqry.js → roy-agent-core-rz57pqpa.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-3nw9vxp2.js → roy-agent-core-smwwze1m.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-dre9rcs0.js → roy-agent-core-v7583cf9.js} +28 -5
- package/dist/shared/@ai-setting/{roy-agent-core-g3j3ftbw.js → roy-agent-core-vehgmfj1.js} +9 -9
- package/dist/shared/@ai-setting/{roy-agent-core-yv7dppda.js → roy-agent-core-wbqmmavh.js} +8 -8
- package/dist/shared/@ai-setting/{roy-agent-core-2m5qnhv9.js → roy-agent-core-zmw5d68q.js} +1 -1
- package/package.json +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-1a38hg1q.js +0 -248
|
@@ -6,19 +6,19 @@ 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-rmndq0sb.js";
|
|
10
|
+
import"../../../shared/@ai-setting/roy-agent-core-awmae5ax.js";
|
|
11
|
+
import"../../../shared/@ai-setting/roy-agent-core-29867p67.js";
|
|
12
12
|
import"../../../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
13
13
|
import"../../../shared/@ai-setting/roy-agent-core-v002ynpa.js";
|
|
14
14
|
import"../../../shared/@ai-setting/roy-agent-core-6vxg2gmr.js";
|
|
15
15
|
import"../../../shared/@ai-setting/roy-agent-core-qnrf2aw6.js";
|
|
16
16
|
import"../../../shared/@ai-setting/roy-agent-core-nhfy3p8q.js";
|
|
17
17
|
import"../../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
18
|
+
import"../../../shared/@ai-setting/roy-agent-core-qmr365f5.js";
|
|
19
|
+
import"../../../shared/@ai-setting/roy-agent-core-13vzexp2.js";
|
|
20
|
+
import"../../../shared/@ai-setting/roy-agent-core-v7583cf9.js";
|
|
18
21
|
import"../../../shared/@ai-setting/roy-agent-core-q5qj0fes.js";
|
|
19
|
-
import"../../../shared/@ai-setting/roy-agent-core-nxf64fn4.js";
|
|
20
|
-
import"../../../shared/@ai-setting/roy-agent-core-8f8dq3kj.js";
|
|
21
|
-
import"../../../shared/@ai-setting/roy-agent-core-dre9rcs0.js";
|
|
22
22
|
import"../../../shared/@ai-setting/roy-agent-core-10n2jh7p.js";
|
|
23
23
|
import"../../../shared/@ai-setting/roy-agent-core-58k274fg.js";
|
|
24
24
|
import"../../../shared/@ai-setting/roy-agent-core-c6592r3c.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WorkflowComponent
|
|
3
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
3
|
+
} from "../../shared/@ai-setting/roy-agent-core-smwwze1m.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-
|
|
7
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
5
|
+
import"../../shared/@ai-setting/roy-agent-core-rmndq0sb.js";
|
|
6
|
+
import"../../shared/@ai-setting/roy-agent-core-awmae5ax.js";
|
|
7
|
+
import"../../shared/@ai-setting/roy-agent-core-29867p67.js";
|
|
8
8
|
import"../../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
9
9
|
import"../../shared/@ai-setting/roy-agent-core-v002ynpa.js";
|
|
10
10
|
import"../../shared/@ai-setting/roy-agent-core-4t40mkpv.js";
|
|
@@ -79,12 +79,12 @@ import {
|
|
|
79
79
|
createNodeInterruptEvent,
|
|
80
80
|
createWorkflowAskUserEvent
|
|
81
81
|
} from "../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
82
|
+
import"../../shared/@ai-setting/roy-agent-core-cssnkkkg.js";
|
|
83
|
+
import"../../shared/@ai-setting/roy-agent-core-hd9p5490.js";
|
|
84
|
+
import"../../shared/@ai-setting/roy-agent-core-qmr365f5.js";
|
|
85
|
+
import"../../shared/@ai-setting/roy-agent-core-13vzexp2.js";
|
|
86
|
+
import"../../shared/@ai-setting/roy-agent-core-v7583cf9.js";
|
|
82
87
|
import"../../shared/@ai-setting/roy-agent-core-q5qj0fes.js";
|
|
83
|
-
import"../../shared/@ai-setting/roy-agent-core-gfzqwb6v.js";
|
|
84
|
-
import"../../shared/@ai-setting/roy-agent-core-z3pq1nx9.js";
|
|
85
|
-
import"../../shared/@ai-setting/roy-agent-core-nxf64fn4.js";
|
|
86
|
-
import"../../shared/@ai-setting/roy-agent-core-8f8dq3kj.js";
|
|
87
|
-
import"../../shared/@ai-setting/roy-agent-core-dre9rcs0.js";
|
|
88
88
|
import"../../shared/@ai-setting/roy-agent-core-10n2jh7p.js";
|
|
89
89
|
import"../../shared/@ai-setting/roy-agent-core-58k274fg.js";
|
|
90
90
|
import"../../shared/@ai-setting/roy-agent-core-c6592r3c.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-h9tpga25.js";
|
|
7
7
|
import {
|
|
8
8
|
LLMComponent,
|
|
9
9
|
LLMConfigSchema,
|
|
@@ -15,18 +15,18 @@ import {
|
|
|
15
15
|
invoke,
|
|
16
16
|
invokeNonStream,
|
|
17
17
|
parseModelString
|
|
18
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
18
|
+
} from "./shared/@ai-setting/roy-agent-core-qjh1ec46.js";
|
|
19
19
|
import {
|
|
20
20
|
ConfigComponent
|
|
21
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
21
|
+
} from "./shared/@ai-setting/roy-agent-core-e68xspar.js";
|
|
22
22
|
import {
|
|
23
23
|
CommandsComponent
|
|
24
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
24
|
+
} from "./shared/@ai-setting/roy-agent-core-kjdpe2ey.js";
|
|
25
25
|
import {
|
|
26
26
|
ToolComponent,
|
|
27
27
|
ToolRegistry,
|
|
28
28
|
ToolValidator
|
|
29
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
29
|
+
} from "./shared/@ai-setting/roy-agent-core-4hk6ey73.js";
|
|
30
30
|
import {
|
|
31
31
|
bashTool,
|
|
32
32
|
editFileTool,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
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-mab4mzg3.js";
|
|
47
47
|
import"./shared/@ai-setting/roy-agent-core-g1s2h0e5.js";
|
|
48
48
|
import {
|
|
49
49
|
MemoryPlugin,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
} from "./shared/@ai-setting/roy-agent-core-c3ct1346.js";
|
|
52
52
|
import {
|
|
53
53
|
DebugComponent
|
|
54
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
54
|
+
} from "./shared/@ai-setting/roy-agent-core-2g5j2nw6.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-5k8watmp.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-0x3g6snw.js";
|
|
71
71
|
import {
|
|
72
72
|
BUILT_IN_EVENT_SOURCE_TYPES,
|
|
73
73
|
BUILT_IN_EVENT_SOURCE_TYPE_LIST,
|
|
@@ -80,26 +80,26 @@ 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-88d3k0p0.js";
|
|
84
84
|
import {
|
|
85
85
|
PluginComponent
|
|
86
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
86
|
+
} from "./shared/@ai-setting/roy-agent-core-rz57pqpa.js";
|
|
87
87
|
import {
|
|
88
88
|
TaskTagPlugin
|
|
89
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
89
|
+
} from "./shared/@ai-setting/roy-agent-core-f336bk4g.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-smwwze1m.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-
|
|
102
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
100
|
+
import"./shared/@ai-setting/roy-agent-core-rmndq0sb.js";
|
|
101
|
+
import"./shared/@ai-setting/roy-agent-core-awmae5ax.js";
|
|
102
|
+
import"./shared/@ai-setting/roy-agent-core-29867p67.js";
|
|
103
103
|
import"./shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
104
104
|
import"./shared/@ai-setting/roy-agent-core-v002ynpa.js";
|
|
105
105
|
import"./shared/@ai-setting/roy-agent-core-4t40mkpv.js";
|
|
@@ -118,16 +118,16 @@ import"./shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
|
118
118
|
import {
|
|
119
119
|
AgentComponent,
|
|
120
120
|
AgentComponentConfigSchema
|
|
121
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
121
|
+
} from "./shared/@ai-setting/roy-agent-core-2k4r9grg.js";
|
|
122
122
|
import {
|
|
123
123
|
AskUserError,
|
|
124
124
|
init_workflow_hil
|
|
125
125
|
} from "./shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
126
126
|
import {
|
|
127
127
|
TaskComponent
|
|
128
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
128
|
+
} from "./shared/@ai-setting/roy-agent-core-wbqmmavh.js";
|
|
129
129
|
import"./shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
130
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
130
|
+
import"./shared/@ai-setting/roy-agent-core-vehgmfj1.js";
|
|
131
131
|
import {
|
|
132
132
|
SQLiteTaskStore,
|
|
133
133
|
getDefaultTaskDbPath
|
|
@@ -140,18 +140,18 @@ import {
|
|
|
140
140
|
getXDGPath,
|
|
141
141
|
getXDGPaths
|
|
142
142
|
} from "./shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
143
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
143
|
+
import"./shared/@ai-setting/roy-agent-core-2xah3h0z.js";
|
|
144
144
|
import"./shared/@ai-setting/roy-agent-core-t94ktchq.js";
|
|
145
145
|
import {
|
|
146
146
|
TaskHookPoints
|
|
147
147
|
} from "./shared/@ai-setting/roy-agent-core-92z6t4he.js";
|
|
148
148
|
import {
|
|
149
149
|
SkillComponent
|
|
150
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
150
|
+
} from "./shared/@ai-setting/roy-agent-core-5t6cryce.js";
|
|
151
151
|
import"./shared/@ai-setting/roy-agent-core-psvxt4c9.js";
|
|
152
152
|
import {
|
|
153
153
|
McpComponent
|
|
154
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
154
|
+
} from "./shared/@ai-setting/roy-agent-core-zmw5d68q.js";
|
|
155
155
|
import {
|
|
156
156
|
AgentError,
|
|
157
157
|
ComponentError,
|
|
@@ -167,33 +167,33 @@ import"./shared/@ai-setting/roy-agent-core-fnv3ev18.js";
|
|
|
167
167
|
import"./shared/@ai-setting/roy-agent-core-1bfmxx89.js";
|
|
168
168
|
import {
|
|
169
169
|
SessionComponent
|
|
170
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
170
|
+
} from "./shared/@ai-setting/roy-agent-core-6de35s2n.js";
|
|
171
171
|
import"./shared/@ai-setting/roy-agent-core-rvxg1wps.js";
|
|
172
172
|
import {
|
|
173
173
|
MemorySessionStore
|
|
174
174
|
} from "./shared/@ai-setting/roy-agent-core-6mcb7nqa.js";
|
|
175
175
|
import"./shared/@ai-setting/roy-agent-core-kwhv9dcd.js";
|
|
176
176
|
import"./shared/@ai-setting/roy-agent-core-7b35emr7.js";
|
|
177
|
-
import {
|
|
178
|
-
Traced,
|
|
179
|
-
TracedAs,
|
|
180
|
-
TracedLightweight,
|
|
181
|
-
wrapFunction
|
|
182
|
-
} from "./shared/@ai-setting/roy-agent-core-q5qj0fes.js";
|
|
183
177
|
import"./shared/@ai-setting/roy-agent-core-qxhq8ven.js";
|
|
184
178
|
import {
|
|
185
179
|
BaseComponent
|
|
186
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
180
|
+
} from "./shared/@ai-setting/roy-agent-core-cssnkkkg.js";
|
|
187
181
|
import {
|
|
188
182
|
createHook,
|
|
189
183
|
createPriorityHook
|
|
190
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
184
|
+
} from "./shared/@ai-setting/roy-agent-core-hd9p5490.js";
|
|
191
185
|
import {
|
|
192
186
|
HookManager,
|
|
193
187
|
globalHookManager
|
|
194
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
195
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
196
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
188
|
+
} from "./shared/@ai-setting/roy-agent-core-qmr365f5.js";
|
|
189
|
+
import"./shared/@ai-setting/roy-agent-core-13vzexp2.js";
|
|
190
|
+
import"./shared/@ai-setting/roy-agent-core-v7583cf9.js";
|
|
191
|
+
import {
|
|
192
|
+
Traced,
|
|
193
|
+
TracedAs,
|
|
194
|
+
TracedLightweight,
|
|
195
|
+
wrapFunction
|
|
196
|
+
} from "./shared/@ai-setting/roy-agent-core-q5qj0fes.js";
|
|
197
197
|
import {
|
|
198
198
|
createLogger,
|
|
199
199
|
getLogDir,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentComponentAdapter,
|
|
3
3
|
init_agent_component_adapter
|
|
4
|
-
} from "./roy-agent-core-
|
|
5
|
-
import"./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-awmae5ax.js";
|
|
5
|
+
import"./roy-agent-core-29867p67.js";
|
|
6
6
|
import"./roy-agent-core-nhfy3p8q.js";
|
|
7
7
|
import"./roy-agent-core-e25xkv53.js";
|
|
8
|
+
import"./roy-agent-core-qmr365f5.js";
|
|
9
|
+
import"./roy-agent-core-13vzexp2.js";
|
|
10
|
+
import"./roy-agent-core-v7583cf9.js";
|
|
8
11
|
import"./roy-agent-core-q5qj0fes.js";
|
|
9
|
-
import"./roy-agent-core-nxf64fn4.js";
|
|
10
|
-
import"./roy-agent-core-8f8dq3kj.js";
|
|
11
|
-
import"./roy-agent-core-dre9rcs0.js";
|
|
12
12
|
import"./roy-agent-core-10n2jh7p.js";
|
|
13
13
|
import"./roy-agent-core-58k274fg.js";
|
|
14
14
|
import"./roy-agent-core-c6592r3c.js";
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TaskTagPlugin,
|
|
3
3
|
createLarkCliTaskNotifyHook
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-f336bk4g.js";
|
|
5
5
|
import {
|
|
6
6
|
envKeyToConfigKey
|
|
7
7
|
} from "./roy-agent-core-qxhq8ven.js";
|
|
8
8
|
import {
|
|
9
9
|
BaseComponent
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-cssnkkkg.js";
|
|
11
11
|
import {
|
|
12
12
|
globalHookManager,
|
|
13
13
|
init_global_hook_manager
|
|
14
|
-
} from "./roy-agent-core-
|
|
14
|
+
} from "./roy-agent-core-qmr365f5.js";
|
|
15
15
|
import {
|
|
16
16
|
init_context
|
|
17
|
-
} from "./roy-agent-core-
|
|
17
|
+
} from "./roy-agent-core-13vzexp2.js";
|
|
18
18
|
import {
|
|
19
19
|
createEnvContext,
|
|
20
20
|
runWithEnvContext
|
|
21
|
-
} from "./roy-agent-core-
|
|
21
|
+
} from "./roy-agent-core-v7583cf9.js";
|
|
22
22
|
import {
|
|
23
23
|
createLogger,
|
|
24
24
|
init_logger
|
|
@@ -375,6 +375,7 @@ class LarkCliInstance {
|
|
|
375
375
|
for (const pluginName of plugins) {
|
|
376
376
|
pluginEnabled[`${this.config.id}:${pluginName}`] = true;
|
|
377
377
|
}
|
|
378
|
+
const agent = this.config.handleRule?.agent;
|
|
378
379
|
const evt = {
|
|
379
380
|
id: `es-${this.config.id}-${timestamp}`,
|
|
380
381
|
type: "event-source.event.lark-cli",
|
|
@@ -385,7 +386,8 @@ class LarkCliInstance {
|
|
|
385
386
|
sourceMessageType: eventType,
|
|
386
387
|
plugins,
|
|
387
388
|
pluginEnabled,
|
|
388
|
-
replyChannel
|
|
389
|
+
replyChannel,
|
|
390
|
+
agent
|
|
389
391
|
},
|
|
390
392
|
payload: {
|
|
391
393
|
sourceId: this.config.id,
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
AskUserError,
|
|
9
9
|
init_workflow_hil
|
|
10
10
|
} from "./roy-agent-core-e25xkv53.js";
|
|
11
|
+
import {
|
|
12
|
+
globalHookManager,
|
|
13
|
+
init_global_hook_manager
|
|
14
|
+
} from "./roy-agent-core-qmr365f5.js";
|
|
11
15
|
import {
|
|
12
16
|
init_decorator,
|
|
13
17
|
wrapFunction
|
|
14
18
|
} from "./roy-agent-core-q5qj0fes.js";
|
|
15
|
-
import {
|
|
16
|
-
globalHookManager,
|
|
17
|
-
init_global_hook_manager
|
|
18
|
-
} from "./roy-agent-core-nxf64fn4.js";
|
|
19
19
|
import {
|
|
20
20
|
createLogger,
|
|
21
21
|
init_logger
|
|
@@ -11,27 +11,28 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
SessionMessageConverter
|
|
13
13
|
} from "./roy-agent-core-7b35emr7.js";
|
|
14
|
-
import {
|
|
15
|
-
TracedAs,
|
|
16
|
-
init_decorator
|
|
17
|
-
} from "./roy-agent-core-q5qj0fes.js";
|
|
18
14
|
import {
|
|
19
15
|
envKeyToConfigKey
|
|
20
16
|
} from "./roy-agent-core-qxhq8ven.js";
|
|
21
17
|
import {
|
|
22
18
|
BaseComponent
|
|
23
|
-
} from "./roy-agent-core-
|
|
19
|
+
} from "./roy-agent-core-cssnkkkg.js";
|
|
24
20
|
import {
|
|
25
21
|
globalHookManager,
|
|
26
22
|
init_global_hook_manager
|
|
27
|
-
} from "./roy-agent-core-
|
|
23
|
+
} from "./roy-agent-core-qmr365f5.js";
|
|
28
24
|
import {
|
|
29
25
|
init_context
|
|
30
|
-
} from "./roy-agent-core-
|
|
26
|
+
} from "./roy-agent-core-13vzexp2.js";
|
|
31
27
|
import {
|
|
32
28
|
getCurrentTaskId,
|
|
29
|
+
getEnvContext,
|
|
33
30
|
runWithEnvContextAsync
|
|
34
|
-
} from "./roy-agent-core-
|
|
31
|
+
} from "./roy-agent-core-v7583cf9.js";
|
|
32
|
+
import {
|
|
33
|
+
TracedAs,
|
|
34
|
+
init_decorator
|
|
35
|
+
} from "./roy-agent-core-q5qj0fes.js";
|
|
35
36
|
import {
|
|
36
37
|
createLogger,
|
|
37
38
|
init_logger
|
|
@@ -565,10 +566,12 @@ class AgentComponent extends BaseComponent {
|
|
|
565
566
|
logger.warn(`Failed to load session history: ${err}`);
|
|
566
567
|
}
|
|
567
568
|
}
|
|
569
|
+
const parentEnvContext = getEnvContext();
|
|
568
570
|
const envContext = {
|
|
571
|
+
...parentEnvContext,
|
|
569
572
|
traceId: effectiveContext.metadata?.traceId,
|
|
570
573
|
sessionId: effectiveContext.sessionId,
|
|
571
|
-
userId: effectiveContext.metadata?.userId,
|
|
574
|
+
userId: effectiveContext.metadata?.userId ?? "",
|
|
572
575
|
messageId: effectiveContext.metadata?.messageId,
|
|
573
576
|
pluginEnabled: effectiveContext.pluginEnabled,
|
|
574
577
|
plugins: effectiveContext.plugins,
|
|
@@ -949,14 +952,7 @@ class AgentComponent extends BaseComponent {
|
|
|
949
952
|
}
|
|
950
953
|
logger.info(`Agent aborted: ${agentName}`);
|
|
951
954
|
}
|
|
952
|
-
async
|
|
953
|
-
const messages = [];
|
|
954
|
-
if (ctx.systemPrompt) {
|
|
955
|
-
messages.push({
|
|
956
|
-
role: "system",
|
|
957
|
-
content: ctx.systemPrompt
|
|
958
|
-
});
|
|
959
|
-
}
|
|
955
|
+
async _buildAdditionInfo(ctx) {
|
|
960
956
|
let additionInfo = ctx.context?.additionInfo || "";
|
|
961
957
|
const currentTaskId = getCurrentTaskId();
|
|
962
958
|
if (currentTaskId !== undefined) {
|
|
@@ -965,6 +961,17 @@ class AgentComponent extends BaseComponent {
|
|
|
965
961
|
|
|
966
962
|
${taskInfo}` : taskInfo;
|
|
967
963
|
}
|
|
964
|
+
return additionInfo;
|
|
965
|
+
}
|
|
966
|
+
async buildMessages(ctx) {
|
|
967
|
+
const messages = [];
|
|
968
|
+
if (ctx.systemPrompt) {
|
|
969
|
+
messages.push({
|
|
970
|
+
role: "system",
|
|
971
|
+
content: ctx.systemPrompt
|
|
972
|
+
});
|
|
973
|
+
}
|
|
974
|
+
const additionInfo = await this._buildAdditionInfo(ctx);
|
|
968
975
|
if (additionInfo) {
|
|
969
976
|
messages.push({
|
|
970
977
|
role: "user",
|
|
@@ -1271,6 +1278,9 @@ __legacyDecorateClassTS([
|
|
|
1271
1278
|
__legacyDecorateClassTS([
|
|
1272
1279
|
TracedAs("agent.component.run", { recordParams: true, recordResult: true, log: true })
|
|
1273
1280
|
], AgentComponent.prototype, "_run", null);
|
|
1281
|
+
__legacyDecorateClassTS([
|
|
1282
|
+
TracedAs("agent.component.buildAdditionInfo", { recordParams: true, recordResult: true, log: true })
|
|
1283
|
+
], AgentComponent.prototype, "_buildAdditionInfo", null);
|
|
1274
1284
|
__legacyDecorateClassTS([
|
|
1275
1285
|
TracedAs("agent.component.invokeLLM", { recordParams: true, recordResult: true, log: true })
|
|
1276
1286
|
], AgentComponent.prototype, "invokeLLM", null);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_env_context,
|
|
3
|
-
|
|
4
|
-
} from "./roy-agent-core-
|
|
3
|
+
setCurrentTaskId
|
|
4
|
+
} from "./roy-agent-core-v7583cf9.js";
|
|
5
5
|
import {
|
|
6
6
|
createLogger,
|
|
7
7
|
init_logger
|
|
@@ -111,7 +111,7 @@ function createTaskTool(taskComponent) {
|
|
|
111
111
|
project_path: params.project_path,
|
|
112
112
|
context: params.context
|
|
113
113
|
});
|
|
114
|
-
|
|
114
|
+
setCurrentTaskId(task.id);
|
|
115
115
|
logger.info(`[createTask] Trace: Task #${task.id} created, currentTaskId=${task.id} set in EnvContext`);
|
|
116
116
|
return {
|
|
117
117
|
success: true,
|
|
@@ -218,6 +218,9 @@ function listTasksTool(taskComponent) {
|
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
220
|
// src/env/task/tools/update-tool.ts
|
|
221
|
+
init_env_context();
|
|
222
|
+
init_logger();
|
|
223
|
+
var logger2 = createLogger("tool:update-task");
|
|
221
224
|
function updateTaskTool(taskComponent) {
|
|
222
225
|
return {
|
|
223
226
|
name: "task_update",
|
|
@@ -262,6 +265,8 @@ function updateTaskTool(taskComponent) {
|
|
|
262
265
|
})
|
|
263
266
|
});
|
|
264
267
|
}
|
|
268
|
+
setCurrentTaskId(task.id);
|
|
269
|
+
logger2.info(`[updateTask] Trace: Task #${task.id} updated, currentTaskId=${task.id} set in EnvContext`);
|
|
265
270
|
return {
|
|
266
271
|
success: true,
|
|
267
272
|
output: `Task updated: #${task.id} - ${task.title}`,
|
|
@@ -315,7 +320,7 @@ function deleteTaskTool(taskComponent) {
|
|
|
315
320
|
// src/env/task/tools/complete-tool.ts
|
|
316
321
|
init_env_context();
|
|
317
322
|
init_logger();
|
|
318
|
-
var
|
|
323
|
+
var logger3 = createLogger("task:tools:complete");
|
|
319
324
|
function completeTaskTool(taskComponent) {
|
|
320
325
|
return {
|
|
321
326
|
name: "task_complete",
|
|
@@ -351,8 +356,8 @@ function completeTaskTool(taskComponent) {
|
|
|
351
356
|
metadata: { execution_time_ms: 0 }
|
|
352
357
|
};
|
|
353
358
|
}
|
|
354
|
-
|
|
355
|
-
|
|
359
|
+
setCurrentTaskId(undefined);
|
|
360
|
+
logger3.info(`[completeTask] Trace: Task #${params.task_id} completed, currentTaskId cleared from EnvContext`);
|
|
356
361
|
return {
|
|
357
362
|
success: true,
|
|
358
363
|
output: `Task completed: #${task.id} - ${task.title}`,
|
|
@@ -10,13 +10,13 @@ import {
|
|
|
10
10
|
tracedExtractStructuredJsonViaLlm,
|
|
11
11
|
tracedRunWorkflowJsonOutputExtraction,
|
|
12
12
|
unregisterWorkflowJsonOutputPlugin
|
|
13
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-29867p67.js";
|
|
14
14
|
import"./roy-agent-core-nhfy3p8q.js";
|
|
15
15
|
import"./roy-agent-core-e25xkv53.js";
|
|
16
|
+
import"./roy-agent-core-qmr365f5.js";
|
|
17
|
+
import"./roy-agent-core-13vzexp2.js";
|
|
18
|
+
import"./roy-agent-core-v7583cf9.js";
|
|
16
19
|
import"./roy-agent-core-q5qj0fes.js";
|
|
17
|
-
import"./roy-agent-core-nxf64fn4.js";
|
|
18
|
-
import"./roy-agent-core-8f8dq3kj.js";
|
|
19
|
-
import"./roy-agent-core-dre9rcs0.js";
|
|
20
20
|
import"./roy-agent-core-10n2jh7p.js";
|
|
21
21
|
import"./roy-agent-core-58k274fg.js";
|
|
22
22
|
import"./roy-agent-core-c6592r3c.js";
|
|
@@ -8,12 +8,16 @@ import {
|
|
|
8
8
|
} from "./roy-agent-core-qxhq8ven.js";
|
|
9
9
|
import {
|
|
10
10
|
BaseComponent
|
|
11
|
-
} from "./roy-agent-core-
|
|
11
|
+
} from "./roy-agent-core-cssnkkkg.js";
|
|
12
12
|
import {
|
|
13
13
|
ToolHookPoints,
|
|
14
14
|
globalHookManager,
|
|
15
15
|
init_global_hook_manager
|
|
16
|
-
} from "./roy-agent-core-
|
|
16
|
+
} from "./roy-agent-core-qmr365f5.js";
|
|
17
|
+
import {
|
|
18
|
+
getCurrentTaskId,
|
|
19
|
+
init_env_context
|
|
20
|
+
} from "./roy-agent-core-v7583cf9.js";
|
|
17
21
|
import {
|
|
18
22
|
createLogger,
|
|
19
23
|
init_logger
|
|
@@ -173,6 +177,7 @@ var TOOL_CONFIG_REGISTRATION = {
|
|
|
173
177
|
|
|
174
178
|
// src/env/tool/tool-component.ts
|
|
175
179
|
init_workflow_hil();
|
|
180
|
+
init_env_context();
|
|
176
181
|
var logger = createLogger("tool");
|
|
177
182
|
var configComponentInstance = null;
|
|
178
183
|
function setToolConfigComponent(component) {
|
|
@@ -425,6 +430,16 @@ class ToolComponent extends BaseComponent {
|
|
|
425
430
|
...truncationMeta
|
|
426
431
|
};
|
|
427
432
|
}
|
|
433
|
+
const currentTaskId = getCurrentTaskId();
|
|
434
|
+
if (currentTaskId !== undefined) {
|
|
435
|
+
result.output += `
|
|
436
|
+
|
|
437
|
+
[当前 Task #${currentTaskId}]`;
|
|
438
|
+
result.metadata = {
|
|
439
|
+
...result.metadata,
|
|
440
|
+
current_task_id: currentTaskId
|
|
441
|
+
};
|
|
442
|
+
}
|
|
428
443
|
}
|
|
429
444
|
if (!skipHooks) {
|
|
430
445
|
await globalHookManager.execute(ToolHookPoints.AFTER_EXECUTE, { tool, args, context, result }, { toolName: tool.name });
|
|
@@ -2,16 +2,21 @@ import {
|
|
|
2
2
|
ContextError,
|
|
3
3
|
ErrorCodes
|
|
4
4
|
} from "./roy-agent-core-ctdhjv68.js";
|
|
5
|
-
import {
|
|
6
|
-
TracedAs,
|
|
7
|
-
init_decorator
|
|
8
|
-
} from "./roy-agent-core-q5qj0fes.js";
|
|
9
5
|
import {
|
|
10
6
|
BaseComponent
|
|
11
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-cssnkkkg.js";
|
|
12
8
|
import {
|
|
13
9
|
init_context
|
|
14
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-13vzexp2.js";
|
|
11
|
+
import {
|
|
12
|
+
getEnvContext,
|
|
13
|
+
init_env_context,
|
|
14
|
+
runWithEnvContextAsync
|
|
15
|
+
} from "./roy-agent-core-v7583cf9.js";
|
|
16
|
+
import {
|
|
17
|
+
TracedAs,
|
|
18
|
+
init_decorator
|
|
19
|
+
} from "./roy-agent-core-q5qj0fes.js";
|
|
15
20
|
import {
|
|
16
21
|
createLogger,
|
|
17
22
|
init_logger
|
|
@@ -37,6 +42,7 @@ function generateDescendingId(prefix = "id") {
|
|
|
37
42
|
|
|
38
43
|
// src/env/environment.ts
|
|
39
44
|
init_decorator();
|
|
45
|
+
init_env_context();
|
|
40
46
|
import * as fsSync from "fs";
|
|
41
47
|
import * as path from "path";
|
|
42
48
|
var logger = createLogger("environment");
|
|
@@ -87,7 +93,16 @@ class BaseEnvironment extends BaseComponent {
|
|
|
87
93
|
if (registry) {
|
|
88
94
|
const agentDef = registry.get(agentName);
|
|
89
95
|
if (agentDef?.type === "workflow") {
|
|
90
|
-
|
|
96
|
+
const existingCtx = getEnvContext();
|
|
97
|
+
const workflowEnvContext = {
|
|
98
|
+
envEvent: context || { type: "workflow" },
|
|
99
|
+
sourceId: "workflow",
|
|
100
|
+
userId: context?.metadata?.userId || "",
|
|
101
|
+
agentContext: existingCtx?.agentContext ?? {}
|
|
102
|
+
};
|
|
103
|
+
return await runWithEnvContextAsync(workflowEnvContext, async () => {
|
|
104
|
+
return await this.handleWorkflowAgentQuery(agentName, query, agentComponent, context);
|
|
105
|
+
});
|
|
91
106
|
}
|
|
92
107
|
}
|
|
93
108
|
let systemPrompt = "You are a helpful assistant.";
|
|
@@ -219,7 +234,7 @@ class BaseEnvironment extends BaseComponent {
|
|
|
219
234
|
}
|
|
220
235
|
return result.finalText || "";
|
|
221
236
|
}
|
|
222
|
-
async handleWorkflowAgentQuery(agentName, query, agentComponent) {
|
|
237
|
+
async handleWorkflowAgentQuery(agentName, query, agentComponent, context) {
|
|
223
238
|
const registry = agentComponent.getRegistry?.();
|
|
224
239
|
if (!registry) {
|
|
225
240
|
return null;
|
|
@@ -244,7 +259,7 @@ class BaseEnvironment extends BaseComponent {
|
|
|
244
259
|
if (!workflow) {
|
|
245
260
|
throw new Error(`Workflow "${workflowName}" not found. ` + `Use 'roy-agent workflow add' to register it first.`);
|
|
246
261
|
}
|
|
247
|
-
const wfResult = await workflowComponent.runWorkflow(workflow.definition, { query }, {});
|
|
262
|
+
const wfResult = await workflowComponent.runWorkflow(workflow.definition, { query }, { context });
|
|
248
263
|
if (wfResult.status === "paused") {
|
|
249
264
|
return JSON.stringify({
|
|
250
265
|
status: "paused",
|
|
@@ -10,16 +10,16 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
SummaryAgent
|
|
12
12
|
} from "./roy-agent-core-kwhv9dcd.js";
|
|
13
|
-
import {
|
|
14
|
-
TracedAs,
|
|
15
|
-
init_decorator
|
|
16
|
-
} from "./roy-agent-core-q5qj0fes.js";
|
|
17
13
|
import {
|
|
18
14
|
envKeyToConfigKey
|
|
19
15
|
} from "./roy-agent-core-qxhq8ven.js";
|
|
20
16
|
import {
|
|
21
17
|
BaseComponent
|
|
22
|
-
} from "./roy-agent-core-
|
|
18
|
+
} from "./roy-agent-core-cssnkkkg.js";
|
|
19
|
+
import {
|
|
20
|
+
TracedAs,
|
|
21
|
+
init_decorator
|
|
22
|
+
} from "./roy-agent-core-q5qj0fes.js";
|
|
23
23
|
import {
|
|
24
24
|
createLogger,
|
|
25
25
|
init_logger
|