@ai-setting/roy-agent-core 1.5.50 → 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 +6 -6
- package/dist/env/agent/index.js +6 -6
- package/dist/env/commands/index.js +6 -6
- package/dist/env/context/index.js +2 -2
- package/dist/env/debug/index.js +6 -6
- package/dist/env/event-source/index.js +8 -8
- package/dist/env/hook/index.js +4 -4
- package/dist/env/index.js +19 -19
- package/dist/env/llm/index.js +6 -6
- package/dist/env/log-trace/index.js +6 -6
- package/dist/env/mcp/index.js +6 -6
- package/dist/env/memory/index.js +6 -6
- package/dist/env/plugin/index.js +6 -6
- package/dist/env/prompt/index.js +6 -6
- package/dist/env/session/index.js +6 -6
- package/dist/env/skill/index.js +6 -6
- package/dist/env/task/delegate/index.js +4 -4
- package/dist/env/task/index.js +8 -8
- package/dist/env/task/plugins/index.js +3 -3
- package/dist/env/task/tools/index.js +2 -2
- package/dist/env/tool/index.js +6 -6
- package/dist/env/workflow/engine/index.js +6 -6
- package/dist/env/workflow/index.js +9 -9
- package/dist/index.js +28 -28
- package/dist/shared/@ai-setting/{roy-agent-core-fpb999vd.js → roy-agent-core-0frwccap.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-ezfwx334.js → roy-agent-core-0x3g6snw.js} +8 -6
- package/dist/shared/@ai-setting/{roy-agent-core-c7cm1wjt.js → roy-agent-core-13vzexp2.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-9a2n122m.js → roy-agent-core-29867p67.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-y30njf6b.js → roy-agent-core-2g5j2nw6.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-pa9wz5q0.js → roy-agent-core-2k4r9grg.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-hd6kd06t.js → roy-agent-core-2xah3h0z.js} +8 -3
- package/dist/shared/@ai-setting/{roy-agent-core-5ng0awvn.js → roy-agent-core-3jk7ngmx.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-a8gvea2f.js → roy-agent-core-4hk6ey73.js} +17 -2
- package/dist/shared/@ai-setting/{roy-agent-core-8nd895aq.js → roy-agent-core-5k8watmp.js} +20 -5
- package/dist/shared/@ai-setting/{roy-agent-core-qfdgg56t.js → roy-agent-core-5t6cryce.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-9sarrbw9.js → roy-agent-core-6de35s2n.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-w65c5gac.js → roy-agent-core-88d3k0p0.js} +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-awmae5ax.js +258 -0
- package/dist/shared/@ai-setting/{roy-agent-core-rjf59e7k.js → roy-agent-core-cssnkkkg.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-pvswd18d.js → roy-agent-core-e68xspar.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-y85xsddt.js → roy-agent-core-f336bk4g.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-5qe84a90.js → roy-agent-core-h9tpga25.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-yq4fv8ce.js → roy-agent-core-hd9p5490.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-t32gmaqn.js → roy-agent-core-kjdpe2ey.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-d8v4n80n.js → roy-agent-core-mab4mzg3.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-vfk5mtbx.js → roy-agent-core-qjh1ec46.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-48v06q1b.js → roy-agent-core-qmr365f5.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-316v7cm4.js → roy-agent-core-rmndq0sb.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-mangq9x1.js → roy-agent-core-rz57pqpa.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-4b18eceq.js → roy-agent-core-smwwze1m.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-s7bgrtch.js → roy-agent-core-v7583cf9.js} +12 -2
- package/dist/shared/@ai-setting/{roy-agent-core-m5g2jx7f.js → roy-agent-core-vehgmfj1.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-wtnwxn8h.js → roy-agent-core-wbqmmavh.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-sxd8snnj.js → roy-agent-core-zmw5d68q.js} +1 -1
- package/package.json +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-fy1y1aqx.js +0 -248
|
@@ -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,11 +79,11 @@ 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-
|
|
83
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
84
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
85
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
86
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
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";
|
|
87
87
|
import"../../shared/@ai-setting/roy-agent-core-q5qj0fes.js";
|
|
88
88
|
import"../../shared/@ai-setting/roy-agent-core-10n2jh7p.js";
|
|
89
89
|
import"../../shared/@ai-setting/roy-agent-core-58k274fg.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,7 +167,7 @@ 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
|
|
@@ -177,17 +177,17 @@ import"./shared/@ai-setting/roy-agent-core-7b35emr7.js";
|
|
|
177
177
|
import"./shared/@ai-setting/roy-agent-core-qxhq8ven.js";
|
|
178
178
|
import {
|
|
179
179
|
BaseComponent
|
|
180
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
180
|
+
} from "./shared/@ai-setting/roy-agent-core-cssnkkkg.js";
|
|
181
181
|
import {
|
|
182
182
|
createHook,
|
|
183
183
|
createPriorityHook
|
|
184
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
184
|
+
} from "./shared/@ai-setting/roy-agent-core-hd9p5490.js";
|
|
185
185
|
import {
|
|
186
186
|
HookManager,
|
|
187
187
|
globalHookManager
|
|
188
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
189
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
190
|
-
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
191
|
import {
|
|
192
192
|
Traced,
|
|
193
193
|
TracedAs,
|
|
@@ -1,13 +1,13 @@
|
|
|
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-
|
|
9
|
-
import"./roy-agent-core-
|
|
10
|
-
import"./roy-agent-core-
|
|
8
|
+
import"./roy-agent-core-qmr365f5.js";
|
|
9
|
+
import"./roy-agent-core-13vzexp2.js";
|
|
10
|
+
import"./roy-agent-core-v7583cf9.js";
|
|
11
11
|
import"./roy-agent-core-q5qj0fes.js";
|
|
12
12
|
import"./roy-agent-core-10n2jh7p.js";
|
|
13
13
|
import"./roy-agent-core-58k274fg.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,
|
|
@@ -16,19 +16,19 @@ import {
|
|
|
16
16
|
} from "./roy-agent-core-qxhq8ven.js";
|
|
17
17
|
import {
|
|
18
18
|
BaseComponent
|
|
19
|
-
} from "./roy-agent-core-
|
|
19
|
+
} from "./roy-agent-core-cssnkkkg.js";
|
|
20
20
|
import {
|
|
21
21
|
globalHookManager,
|
|
22
22
|
init_global_hook_manager
|
|
23
|
-
} from "./roy-agent-core-
|
|
23
|
+
} from "./roy-agent-core-qmr365f5.js";
|
|
24
24
|
import {
|
|
25
25
|
init_context
|
|
26
|
-
} from "./roy-agent-core-
|
|
26
|
+
} from "./roy-agent-core-13vzexp2.js";
|
|
27
27
|
import {
|
|
28
28
|
getCurrentTaskId,
|
|
29
29
|
getEnvContext,
|
|
30
30
|
runWithEnvContextAsync
|
|
31
|
-
} from "./roy-agent-core-
|
|
31
|
+
} from "./roy-agent-core-v7583cf9.js";
|
|
32
32
|
import {
|
|
33
33
|
TracedAs,
|
|
34
34
|
init_decorator
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_env_context,
|
|
3
3
|
setCurrentTaskId
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-v7583cf9.js";
|
|
5
5
|
import {
|
|
6
6
|
createLogger,
|
|
7
7
|
init_logger
|
|
@@ -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",
|
|
@@ -352,7 +357,7 @@ function completeTaskTool(taskComponent) {
|
|
|
352
357
|
};
|
|
353
358
|
}
|
|
354
359
|
setCurrentTaskId(undefined);
|
|
355
|
-
|
|
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,12 +10,12 @@ 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-
|
|
17
|
-
import"./roy-agent-core-
|
|
18
|
-
import"./roy-agent-core-
|
|
16
|
+
import"./roy-agent-core-qmr365f5.js";
|
|
17
|
+
import"./roy-agent-core-13vzexp2.js";
|
|
18
|
+
import"./roy-agent-core-v7583cf9.js";
|
|
19
19
|
import"./roy-agent-core-q5qj0fes.js";
|
|
20
20
|
import"./roy-agent-core-10n2jh7p.js";
|
|
21
21
|
import"./roy-agent-core-58k274fg.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 });
|
|
@@ -4,10 +4,15 @@ import {
|
|
|
4
4
|
} from "./roy-agent-core-ctdhjv68.js";
|
|
5
5
|
import {
|
|
6
6
|
BaseComponent
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-cssnkkkg.js";
|
|
8
8
|
import {
|
|
9
9
|
init_context
|
|
10
|
-
} 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";
|
|
11
16
|
import {
|
|
12
17
|
TracedAs,
|
|
13
18
|
init_decorator
|
|
@@ -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",
|