@ai-setting/roy-agent-core 1.6.20 → 1.6.22
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 +9 -9
- package/dist/env/agent/index.js +16 -15
- package/dist/env/commands/index.js +9 -9
- package/dist/env/context/index.js +5 -5
- package/dist/env/debug/index.js +9 -9
- package/dist/env/event-source/index.js +14 -13
- package/dist/env/hook/index.js +7 -7
- package/dist/env/index.js +40 -39
- package/dist/env/llm/index.js +11 -11
- package/dist/env/log-trace/index.js +9 -9
- package/dist/env/mcp/index.js +10 -10
- package/dist/env/mcp/tool/index.js +3 -3
- package/dist/env/memory/index.js +10 -10
- package/dist/env/memory/plugin/index.js +3 -3
- package/dist/env/plugin/index.js +9 -9
- package/dist/env/prompt/index.js +9 -9
- package/dist/env/session/index.js +12 -12
- package/dist/env/session/storage/index.js +5 -5
- package/dist/env/skill/index.js +9 -9
- package/dist/env/task/delegate/index.js +9 -9
- package/dist/env/task/index.js +14 -14
- package/dist/env/task/plugins/index.js +9 -8
- package/dist/env/task/storage/index.js +4 -4
- package/dist/env/task/tools/index.js +5 -5
- package/dist/env/tool/built-in/index.js +5 -5
- package/dist/env/tool/index.js +12 -12
- package/dist/env/workflow/engine/index.js +11 -11
- package/dist/env/workflow/index.js +22 -22
- package/dist/env/workflow/nodes/index.js +4 -4
- package/dist/env/workflow/service/index.js +4 -4
- package/dist/env/workflow/storage/index.js +5 -5
- package/dist/env/workflow/tools/index.js +16 -16
- package/dist/env/workflow/utils/index.js +6 -6
- package/dist/index.js +51 -50
- package/dist/shared/@ai-setting/{roy-agent-core-8n3je2r0.js → roy-agent-core-067w3nt1.js} +120 -28
- package/dist/shared/@ai-setting/{roy-agent-core-7kw06e4b.js → roy-agent-core-0qjw25e8.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-bq1gskrf.js → roy-agent-core-0v74marc.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-e0kaxcy1.js → roy-agent-core-12gac5zn.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-f1cjs6c4.js → roy-agent-core-16dqrewm.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-7r72622v.js → roy-agent-core-1k9j90s7.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-m00kamqp.js → roy-agent-core-1khp1m0r.js} +8 -1
- package/dist/shared/@ai-setting/{roy-agent-core-77wfej1h.js → roy-agent-core-3e0w0ekw.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-zdzkzx5g.js → roy-agent-core-3ep1dxf1.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-gc75v3px.js → roy-agent-core-3x3k7gfs.js} +5 -5
- package/dist/shared/@ai-setting/roy-agent-core-4k8tv5q5.js +11 -0
- package/dist/shared/@ai-setting/{roy-agent-core-02aw62bv.js → roy-agent-core-5ts23mx0.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-atpchjdz.js → roy-agent-core-6m2gh57e.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-ehpnd2be.js → roy-agent-core-6re7eg4w.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-ett06sn8.js → roy-agent-core-7cxdkcrz.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-416rpxkp.js → roy-agent-core-7wv7gh6t.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-fxembepv.js → roy-agent-core-90wp1rgb.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-zs4f0tcy.js → roy-agent-core-afb03wwp.js} +130 -3
- package/dist/shared/@ai-setting/{roy-agent-core-5pzegp1x.js → roy-agent-core-b64s2vk9.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-ataagh3a.js → roy-agent-core-br7dmedr.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-8n0e62y4.js → roy-agent-core-c1stgqnw.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-gmnex23m.js → roy-agent-core-cjraf54z.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-kkt2ndpf.js → roy-agent-core-dbwvfe0m.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-mdp8y7ky.js → roy-agent-core-dxfd6p1c.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-wsqnf2za.js → roy-agent-core-ef486rdm.js} +7 -7
- package/dist/shared/@ai-setting/{roy-agent-core-bqe4c9f2.js → roy-agent-core-f2nync7q.js} +12 -4
- package/dist/shared/@ai-setting/{roy-agent-core-dh9rajdh.js → roy-agent-core-g7nmwg63.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-96mj6gvc.js → roy-agent-core-gb7pm9c0.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-grajzyhd.js → roy-agent-core-gns3wa97.js} +14 -18
- package/dist/shared/@ai-setting/{roy-agent-core-ez91vxas.js → roy-agent-core-h1cb2jzh.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-eskgj8nc.js → roy-agent-core-h28gcd77.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-rdf8tqj7.js → roy-agent-core-h4sm7fyb.js} +8 -8
- package/dist/shared/@ai-setting/{roy-agent-core-sqt96sam.js → roy-agent-core-h7ak839w.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-c7e3htaq.js → roy-agent-core-hks28tys.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-vc7p80sd.js → roy-agent-core-j29yg06n.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-r15sn7ve.js → roy-agent-core-j9ybhwnq.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-nna4s0qs.js → roy-agent-core-kaq037np.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-e9jf4w3z.js → roy-agent-core-kv7frw13.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-44g3synv.js → roy-agent-core-mvs5sen6.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-zeztnvvb.js → roy-agent-core-mz69jdvv.js} +178 -78
- package/dist/shared/@ai-setting/{roy-agent-core-akb8mb9v.js → roy-agent-core-pde8hkq4.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-p4z6nxgz.js → roy-agent-core-pdnp5kj0.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-1qjgwjjs.js → roy-agent-core-pz2n121t.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-wr3pk3h3.js → roy-agent-core-qe3m3hec.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-v20nxrs1.js → roy-agent-core-qpt5fa8h.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-keb51jag.js → roy-agent-core-rs5tp44j.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-2b0mw2h3.js → roy-agent-core-s07nere5.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-ajp566yv.js → roy-agent-core-sfwt66pv.js} +2 -2
- package/dist/shared/@ai-setting/roy-agent-core-t3yqzgse.js +71 -0
- package/dist/shared/@ai-setting/{roy-agent-core-xzc53mnk.js → roy-agent-core-t9h4np6m.js} +4 -2
- package/dist/shared/@ai-setting/{roy-agent-core-1mrc9a1r.js → roy-agent-core-w8rv08d3.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-b9q2jfx4.js → roy-agent-core-watkmj7d.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-bwqjwa0d.js → roy-agent-core-wr1pgw0x.js} +8 -8
- package/dist/shared/@ai-setting/{roy-agent-core-fntxq0gf.js → roy-agent-core-x0yztmm6.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-dtkbj8fk.js → roy-agent-core-xrr7t0qc.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-mekk4as5.js → roy-agent-core-xwnpygva.js} +14 -14
- package/dist/shared/@ai-setting/{roy-agent-core-pr4jekyy.js → roy-agent-core-z2w7wtqd.js} +5 -5
- package/dist/utils/temp-file-manager/index.js +3 -3
- package/package.json +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-w6kj6nmj.js +0 -11
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PromptComponent,
|
|
3
3
|
PromptStore
|
|
4
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
4
|
+
} from "./shared/@ai-setting/roy-agent-core-7cxdkcrz.js";
|
|
5
5
|
import {
|
|
6
6
|
LLMComponent,
|
|
7
7
|
LLMConfigSchema,
|
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
ModelLimitsSchema,
|
|
10
10
|
ProviderCapabilitiesSchema,
|
|
11
11
|
ProviderConfigSchema
|
|
12
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
12
|
+
} from "./shared/@ai-setting/roy-agent-core-7wv7gh6t.js";
|
|
13
13
|
import {
|
|
14
14
|
ConfigComponent
|
|
15
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
15
|
+
} from "./shared/@ai-setting/roy-agent-core-g7nmwg63.js";
|
|
16
16
|
import"./shared/@ai-setting/roy-agent-core-y3g3ar7a.js";
|
|
17
17
|
import {
|
|
18
18
|
CommandsComponent
|
|
19
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
19
|
+
} from "./shared/@ai-setting/roy-agent-core-6re7eg4w.js";
|
|
20
20
|
import"./shared/@ai-setting/roy-agent-core-wjmwwc4a.js";
|
|
21
21
|
import {
|
|
22
22
|
bashTool,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
grepTool,
|
|
28
28
|
readFileTool,
|
|
29
29
|
writeFileTool
|
|
30
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
30
|
+
} from "./shared/@ai-setting/roy-agent-core-kv7frw13.js";
|
|
31
31
|
import {
|
|
32
32
|
ATTACH_FILE_MAX_BYTES,
|
|
33
33
|
getUnderstandImageLLMProvider,
|
|
@@ -40,20 +40,20 @@ import {
|
|
|
40
40
|
} from "./shared/@ai-setting/roy-agent-core-t7rw68q8.js";
|
|
41
41
|
import {
|
|
42
42
|
closeDatabase
|
|
43
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
44
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
43
|
+
} from "./shared/@ai-setting/roy-agent-core-sfwt66pv.js";
|
|
44
|
+
import"./shared/@ai-setting/roy-agent-core-6m2gh57e.js";
|
|
45
45
|
import"./shared/@ai-setting/roy-agent-core-k5hxvaf0.js";
|
|
46
46
|
import {
|
|
47
47
|
MemoryComponent
|
|
48
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
48
|
+
} from "./shared/@ai-setting/roy-agent-core-qpt5fa8h.js";
|
|
49
49
|
import"./shared/@ai-setting/roy-agent-core-g1s2h0e5.js";
|
|
50
50
|
import {
|
|
51
51
|
MemoryPlugin,
|
|
52
52
|
createMemoryPlugin
|
|
53
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
53
|
+
} from "./shared/@ai-setting/roy-agent-core-qe3m3hec.js";
|
|
54
54
|
import {
|
|
55
55
|
DebugComponent
|
|
56
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
56
|
+
} from "./shared/@ai-setting/roy-agent-core-rs5tp44j.js";
|
|
57
57
|
import {
|
|
58
58
|
ReplFormatter,
|
|
59
59
|
TraceFormatter,
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
BaseEnvironment,
|
|
64
64
|
generateDescendingId,
|
|
65
65
|
generateId
|
|
66
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
66
|
+
} from "./shared/@ai-setting/roy-agent-core-watkmj7d.js";
|
|
67
67
|
import {
|
|
68
68
|
BountyIMInstance,
|
|
69
69
|
EventSourceComponent,
|
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
larkCliHandler,
|
|
77
77
|
resolveBountyIMSystemPrompt,
|
|
78
78
|
timerHandler
|
|
79
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
79
|
+
} from "./shared/@ai-setting/roy-agent-core-wr1pgw0x.js";
|
|
80
80
|
import {
|
|
81
81
|
BUILT_IN_EVENT_SOURCE_TYPES,
|
|
82
82
|
BUILT_IN_EVENT_SOURCE_TYPE_LIST,
|
|
@@ -89,36 +89,36 @@ import {
|
|
|
89
89
|
import {
|
|
90
90
|
LogTraceComponent,
|
|
91
91
|
LogTraceConfigSchema
|
|
92
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
92
|
+
} from "./shared/@ai-setting/roy-agent-core-pz2n121t.js";
|
|
93
93
|
import {
|
|
94
94
|
PluginComponent
|
|
95
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
95
|
+
} from "./shared/@ai-setting/roy-agent-core-3x3k7gfs.js";
|
|
96
96
|
import {
|
|
97
97
|
TaskTagPlugin,
|
|
98
98
|
createAutoTaskPlugin
|
|
99
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
99
|
+
} from "./shared/@ai-setting/roy-agent-core-gns3wa97.js";
|
|
100
100
|
import {
|
|
101
101
|
BasePlugin
|
|
102
102
|
} from "./shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
103
103
|
import {
|
|
104
104
|
WorkflowComponent
|
|
105
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
105
|
+
} from "./shared/@ai-setting/roy-agent-core-xwnpygva.js";
|
|
106
106
|
import {
|
|
107
107
|
init_node_registry_helper,
|
|
108
108
|
registerDecoratorNodeType
|
|
109
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
110
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
109
|
+
} from "./shared/@ai-setting/roy-agent-core-3e0w0ekw.js";
|
|
110
|
+
import"./shared/@ai-setting/roy-agent-core-16dqrewm.js";
|
|
111
111
|
import"./shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
112
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
113
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
112
|
+
import"./shared/@ai-setting/roy-agent-core-cjraf54z.js";
|
|
113
|
+
import"./shared/@ai-setting/roy-agent-core-h1cb2jzh.js";
|
|
114
114
|
import"./shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
115
115
|
import"./shared/@ai-setting/roy-agent-core-hhrg314p.js";
|
|
116
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
117
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
116
|
+
import"./shared/@ai-setting/roy-agent-core-0qjw25e8.js";
|
|
117
|
+
import"./shared/@ai-setting/roy-agent-core-dbwvfe0m.js";
|
|
118
118
|
import"./shared/@ai-setting/roy-agent-core-1db4vpc6.js";
|
|
119
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
120
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
121
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
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
122
|
import"./shared/@ai-setting/roy-agent-core-jrj30vq3.js";
|
|
123
123
|
import {
|
|
124
124
|
Edge,
|
|
@@ -131,34 +131,35 @@ import"./shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
|
131
131
|
import {
|
|
132
132
|
AgentComponent,
|
|
133
133
|
AgentComponentConfigSchema
|
|
134
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
134
|
+
} from "./shared/@ai-setting/roy-agent-core-mz69jdvv.js";
|
|
135
135
|
import {
|
|
136
136
|
createInvokeConfig,
|
|
137
137
|
invoke,
|
|
138
138
|
invokeNonStream,
|
|
139
139
|
parseModelString
|
|
140
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
140
|
+
} from "./shared/@ai-setting/roy-agent-core-c1stgqnw.js";
|
|
141
141
|
import {
|
|
142
142
|
ToolComponent,
|
|
143
143
|
ToolRegistry,
|
|
144
144
|
ToolValidator
|
|
145
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
146
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
145
|
+
} from "./shared/@ai-setting/roy-agent-core-h28gcd77.js";
|
|
146
|
+
import"./shared/@ai-setting/roy-agent-core-br7dmedr.js";
|
|
147
|
+
import"./shared/@ai-setting/roy-agent-core-t3yqzgse.js";
|
|
147
148
|
import {
|
|
148
149
|
AskUserError,
|
|
149
150
|
init_workflow_hil
|
|
150
151
|
} from "./shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
151
152
|
import {
|
|
152
153
|
TaskComponent
|
|
153
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
154
|
+
} from "./shared/@ai-setting/roy-agent-core-h4sm7fyb.js";
|
|
154
155
|
import"./shared/@ai-setting/roy-agent-core-amkqnyzy.js";
|
|
155
156
|
import"./shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
156
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
157
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
157
|
+
import"./shared/@ai-setting/roy-agent-core-067w3nt1.js";
|
|
158
|
+
import"./shared/@ai-setting/roy-agent-core-mvs5sen6.js";
|
|
158
159
|
import {
|
|
159
160
|
SQLiteTaskStore,
|
|
160
161
|
getDefaultTaskDbPath
|
|
161
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
162
|
+
} from "./shared/@ai-setting/roy-agent-core-3ep1dxf1.js";
|
|
162
163
|
import {
|
|
163
164
|
getBuiltInPrompt,
|
|
164
165
|
getBuiltInPromptNames
|
|
@@ -166,24 +167,24 @@ import {
|
|
|
166
167
|
import"./shared/@ai-setting/roy-agent-core-c1v263jn.js";
|
|
167
168
|
import {
|
|
168
169
|
AgentRegistry
|
|
169
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
170
|
+
} from "./shared/@ai-setting/roy-agent-core-x0yztmm6.js";
|
|
170
171
|
import {
|
|
171
172
|
XDG_PATHS,
|
|
172
173
|
getXDGPath,
|
|
173
174
|
getXDGPaths
|
|
174
175
|
} from "./shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
175
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
176
|
+
import"./shared/@ai-setting/roy-agent-core-hks28tys.js";
|
|
176
177
|
import"./shared/@ai-setting/roy-agent-core-rn57psp0.js";
|
|
177
178
|
import {
|
|
178
179
|
TaskHookPoints
|
|
179
180
|
} from "./shared/@ai-setting/roy-agent-core-1pg0fepg.js";
|
|
180
181
|
import {
|
|
181
182
|
SkillComponent
|
|
182
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
183
|
+
} from "./shared/@ai-setting/roy-agent-core-b64s2vk9.js";
|
|
183
184
|
import"./shared/@ai-setting/roy-agent-core-psvxt4c9.js";
|
|
184
185
|
import {
|
|
185
186
|
McpComponent
|
|
186
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
187
|
+
} from "./shared/@ai-setting/roy-agent-core-s07nere5.js";
|
|
187
188
|
import {
|
|
188
189
|
AgentError,
|
|
189
190
|
ComponentError,
|
|
@@ -196,37 +197,37 @@ import {
|
|
|
196
197
|
isRoyError
|
|
197
198
|
} from "./shared/@ai-setting/roy-agent-core-ctdhjv68.js";
|
|
198
199
|
import"./shared/@ai-setting/roy-agent-core-fnv3ev18.js";
|
|
199
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
200
|
+
import"./shared/@ai-setting/roy-agent-core-dxfd6p1c.js";
|
|
200
201
|
import {
|
|
201
202
|
SessionComponent
|
|
202
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
203
|
+
} from "./shared/@ai-setting/roy-agent-core-f2nync7q.js";
|
|
203
204
|
import"./shared/@ai-setting/roy-agent-core-rvxg1wps.js";
|
|
204
205
|
import {
|
|
205
206
|
MemorySessionStore
|
|
206
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
207
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
208
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
207
|
+
} from "./shared/@ai-setting/roy-agent-core-afb03wwp.js";
|
|
208
|
+
import"./shared/@ai-setting/roy-agent-core-1k9j90s7.js";
|
|
209
|
+
import"./shared/@ai-setting/roy-agent-core-12gac5zn.js";
|
|
209
210
|
import"./shared/@ai-setting/roy-agent-core-7hh0brvs.js";
|
|
210
211
|
import {
|
|
211
212
|
BaseComponent
|
|
212
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
213
|
+
} from "./shared/@ai-setting/roy-agent-core-pde8hkq4.js";
|
|
213
214
|
import {
|
|
214
215
|
createHook,
|
|
215
216
|
createPriorityHook
|
|
216
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
217
|
+
} from "./shared/@ai-setting/roy-agent-core-5ts23mx0.js";
|
|
217
218
|
import {
|
|
218
219
|
HookManager,
|
|
219
220
|
globalHookManager
|
|
220
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
221
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
222
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
221
|
+
} from "./shared/@ai-setting/roy-agent-core-j29yg06n.js";
|
|
222
|
+
import"./shared/@ai-setting/roy-agent-core-h7ak839w.js";
|
|
223
|
+
import"./shared/@ai-setting/roy-agent-core-xrr7t0qc.js";
|
|
223
224
|
import {
|
|
224
225
|
Traced,
|
|
225
226
|
TracedAs,
|
|
226
227
|
TracedLightweight,
|
|
227
228
|
init_decorator,
|
|
228
229
|
wrapFunction
|
|
229
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
230
|
+
} from "./shared/@ai-setting/roy-agent-core-gb7pm9c0.js";
|
|
230
231
|
import {
|
|
231
232
|
createLogger,
|
|
232
233
|
getLogDir,
|
|
@@ -237,7 +238,7 @@ import {
|
|
|
237
238
|
setConfigComponent,
|
|
238
239
|
setLogDirOverride,
|
|
239
240
|
setQuietMode
|
|
240
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
241
|
+
} from "./shared/@ai-setting/roy-agent-core-kaq037np.js";
|
|
241
242
|
import {
|
|
242
243
|
OTelTracerProvider,
|
|
243
244
|
SpanKind,
|
|
@@ -245,7 +246,7 @@ import {
|
|
|
245
246
|
getTracerProvider,
|
|
246
247
|
propagation,
|
|
247
248
|
resetTracerProvider
|
|
248
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
249
|
+
} from "./shared/@ai-setting/roy-agent-core-1khp1m0r.js";
|
|
249
250
|
import {
|
|
250
251
|
SQLiteSpanStorage
|
|
251
252
|
} from "./shared/@ai-setting/roy-agent-core-4an1p9a1.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ProcessRegistry,
|
|
3
3
|
runWithProcessRegistryAsync
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-mvs5sen6.js";
|
|
5
5
|
import {
|
|
6
6
|
builtInPrompts
|
|
7
7
|
} from "./roy-agent-core-skqt40yy.js";
|
|
@@ -10,30 +10,30 @@ import {
|
|
|
10
10
|
} from "./roy-agent-core-c1v263jn.js";
|
|
11
11
|
import {
|
|
12
12
|
DEFAULT_SUBAGENT_PROMPT
|
|
13
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-x0yztmm6.js";
|
|
14
14
|
import {
|
|
15
15
|
TaskHookPoints
|
|
16
16
|
} from "./roy-agent-core-1pg0fepg.js";
|
|
17
17
|
import {
|
|
18
18
|
globalHookManager,
|
|
19
19
|
init_global_hook_manager
|
|
20
|
-
} from "./roy-agent-core-
|
|
20
|
+
} from "./roy-agent-core-j29yg06n.js";
|
|
21
21
|
import {
|
|
22
22
|
init_context
|
|
23
|
-
} from "./roy-agent-core-
|
|
23
|
+
} from "./roy-agent-core-h7ak839w.js";
|
|
24
24
|
import {
|
|
25
25
|
getCurrentTaskId,
|
|
26
26
|
getEnvContext
|
|
27
|
-
} from "./roy-agent-core-
|
|
27
|
+
} from "./roy-agent-core-xrr7t0qc.js";
|
|
28
28
|
import {
|
|
29
29
|
TracedAs,
|
|
30
30
|
init_decorator,
|
|
31
31
|
wrapFunction
|
|
32
|
-
} from "./roy-agent-core-
|
|
32
|
+
} from "./roy-agent-core-gb7pm9c0.js";
|
|
33
33
|
import {
|
|
34
34
|
createLogger,
|
|
35
35
|
init_logger
|
|
36
|
-
} from "./roy-agent-core-
|
|
36
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
37
37
|
import {
|
|
38
38
|
__legacyDecorateClassTS
|
|
39
39
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -896,7 +896,10 @@ var PROGRESS_INTERVAL = 1200000;
|
|
|
896
896
|
|
|
897
897
|
class BackgroundTaskManager {
|
|
898
898
|
env;
|
|
899
|
+
maxProcessRegistries = 1000;
|
|
900
|
+
maxTerminalTasks = 1000;
|
|
899
901
|
tasks = new Map;
|
|
902
|
+
terminalTasks = new Map;
|
|
900
903
|
abortControllers = new Map;
|
|
901
904
|
progressTimers = new Map;
|
|
902
905
|
processRegistries = new Map;
|
|
@@ -964,6 +967,52 @@ class BackgroundTaskManager {
|
|
|
964
967
|
set.clear();
|
|
965
968
|
return { runIds, stopResults };
|
|
966
969
|
}
|
|
970
|
+
finalizeTask(taskId, reason) {
|
|
971
|
+
if (!taskId)
|
|
972
|
+
return;
|
|
973
|
+
this.stopProgressReporter(taskId);
|
|
974
|
+
this.progressTimers.delete(taskId);
|
|
975
|
+
const task = this.tasks.get(taskId);
|
|
976
|
+
if (task) {
|
|
977
|
+
this.tasks.delete(taskId);
|
|
978
|
+
if (this.terminalTasks.size >= this.maxTerminalTasks) {
|
|
979
|
+
const oldestKey = this.terminalTasks.keys().next().value;
|
|
980
|
+
if (oldestKey !== undefined) {
|
|
981
|
+
this.terminalTasks.delete(oldestKey);
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
this.terminalTasks.set(taskId, task);
|
|
985
|
+
}
|
|
986
|
+
const abortCtl = this.abortControllers.get(taskId);
|
|
987
|
+
if (abortCtl) {
|
|
988
|
+
try {
|
|
989
|
+
abortCtl.abort();
|
|
990
|
+
} catch {}
|
|
991
|
+
}
|
|
992
|
+
this.abortControllers.delete(taskId);
|
|
993
|
+
this.workflowRunRegistries.delete(taskId);
|
|
994
|
+
const registry = this.processRegistries.get(taskId);
|
|
995
|
+
if (registry && registry.size() > 0) {
|
|
996
|
+
logger3.debug(`[BackgroundTaskManager] finalizeTask保留 processRegistry ${taskId} (residualPIDs=${registry.size()}, reason=${reason})`);
|
|
997
|
+
}
|
|
998
|
+
logger3.debug(`[BackgroundTaskManager] finalizeTask taskId=${taskId} reason=${reason}`);
|
|
999
|
+
}
|
|
1000
|
+
getProcessRegistrySize() {
|
|
1001
|
+
return this.processRegistries.size;
|
|
1002
|
+
}
|
|
1003
|
+
getMaxProcessRegistries() {
|
|
1004
|
+
return this.maxProcessRegistries;
|
|
1005
|
+
}
|
|
1006
|
+
cleanupEmptyProcessRegistries() {
|
|
1007
|
+
let cleaned = 0;
|
|
1008
|
+
for (const [taskId, registry] of this.processRegistries) {
|
|
1009
|
+
if (registry.size() === 0) {
|
|
1010
|
+
this.processRegistries.delete(taskId);
|
|
1011
|
+
cleaned++;
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
return cleaned;
|
|
1015
|
+
}
|
|
967
1016
|
static DEFAULT_WORKFLOW_ENTRY_AGENT = "workflow-runner";
|
|
968
1017
|
resolveEntryAgent(subagentType) {
|
|
969
1018
|
try {
|
|
@@ -1074,6 +1123,12 @@ class BackgroundTaskManager {
|
|
|
1074
1123
|
}
|
|
1075
1124
|
}
|
|
1076
1125
|
const abortController = new AbortController;
|
|
1126
|
+
if (this.processRegistries.size >= this.maxProcessRegistries) {
|
|
1127
|
+
this.cleanupEmptyProcessRegistries();
|
|
1128
|
+
if (this.processRegistries.size >= this.maxProcessRegistries) {
|
|
1129
|
+
throw new Error(`BackgroundTaskManager.processRegistries 达到上限 ${this.maxProcessRegistries}(含残留 PID),拒绝创建新 task(taskId=${taskIdGen})。请清理 / 重启 / 调高 maxProcessRegistries。`);
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1077
1132
|
const processRegistry = new ProcessRegistry;
|
|
1078
1133
|
this.processRegistries.set(taskIdGen, processRegistry);
|
|
1079
1134
|
const createdAt = Date.now();
|
|
@@ -1214,7 +1269,15 @@ class BackgroundTaskManager {
|
|
|
1214
1269
|
error: errorMessage
|
|
1215
1270
|
});
|
|
1216
1271
|
} finally {
|
|
1217
|
-
this.
|
|
1272
|
+
this.finalizeTask(taskId, task.status);
|
|
1273
|
+
const sessionComp = this.getSessionComponent();
|
|
1274
|
+
if (sessionComp?.endSessionCleanup && task?.subSessionId) {
|
|
1275
|
+
try {
|
|
1276
|
+
await sessionComp.endSessionCleanup(task.subSessionId);
|
|
1277
|
+
} catch (err) {
|
|
1278
|
+
logger3.warn(`[BackgroundTaskManager] endSessionCleanup failed for ${task.subSessionId}`, { error: err instanceof Error ? err.message : String(err) });
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1218
1281
|
}
|
|
1219
1282
|
}
|
|
1220
1283
|
startProgressReporter(taskId, parentSessionId) {
|
|
@@ -1426,10 +1489,17 @@ ${reuseSection.markdown}`;
|
|
|
1426
1489
|
});
|
|
1427
1490
|
}
|
|
1428
1491
|
async stopTask(taskId) {
|
|
1429
|
-
const task = this.tasks.get(taskId);
|
|
1492
|
+
const task = this.tasks.get(taskId) ?? this.terminalTasks.get(taskId);
|
|
1430
1493
|
if (!task) {
|
|
1431
1494
|
return { success: false, message: "Task not found" };
|
|
1432
1495
|
}
|
|
1496
|
+
if (this.terminalTasks.has(taskId)) {
|
|
1497
|
+
return {
|
|
1498
|
+
success: false,
|
|
1499
|
+
task,
|
|
1500
|
+
message: `Cannot stop task with status: ${task.status}`
|
|
1501
|
+
};
|
|
1502
|
+
}
|
|
1433
1503
|
if (task.status === "completed" || task.status === "failed" || task.status === "stopped" || task.status === "timeout") {
|
|
1434
1504
|
return {
|
|
1435
1505
|
success: false,
|
|
@@ -1462,6 +1532,7 @@ ${reuseSection.markdown}`;
|
|
|
1462
1532
|
associatedTaskId: task.associatedTaskId
|
|
1463
1533
|
};
|
|
1464
1534
|
this.publishBackgroundEvent(BackgroundTaskEventTypes.STOPPED, stoppedPayload, task.parentSessionId);
|
|
1535
|
+
this.finalizeTask(taskId, "stopped");
|
|
1465
1536
|
return {
|
|
1466
1537
|
success: true,
|
|
1467
1538
|
task,
|
|
@@ -1471,10 +1542,10 @@ ${reuseSection.markdown}`;
|
|
|
1471
1542
|
};
|
|
1472
1543
|
}
|
|
1473
1544
|
getTask(taskId) {
|
|
1474
|
-
return this.tasks.get(taskId);
|
|
1545
|
+
return this.tasks.get(taskId) ?? this.terminalTasks.get(taskId);
|
|
1475
1546
|
}
|
|
1476
1547
|
listTasks() {
|
|
1477
|
-
return Array.from(this.tasks.values());
|
|
1548
|
+
return Array.from(this.tasks.values()).concat(Array.from(this.terminalTasks.values()));
|
|
1478
1549
|
}
|
|
1479
1550
|
hasActiveTaskForParent(parentSessionId) {
|
|
1480
1551
|
if (!parentSessionId)
|
|
@@ -1506,7 +1577,18 @@ ${reuseSection.markdown}`;
|
|
|
1506
1577
|
return { stoppedTaskIds };
|
|
1507
1578
|
}
|
|
1508
1579
|
async forceStopAllAcrossParents() {
|
|
1509
|
-
|
|
1580
|
+
const seen = new Set;
|
|
1581
|
+
const allTaskIds = new Set([
|
|
1582
|
+
...this.tasks.keys(),
|
|
1583
|
+
...this.terminalTasks.keys(),
|
|
1584
|
+
...this.processRegistries.keys()
|
|
1585
|
+
]);
|
|
1586
|
+
for (const taskId of allTaskIds) {
|
|
1587
|
+
if (seen.has(taskId))
|
|
1588
|
+
continue;
|
|
1589
|
+
seen.add(taskId);
|
|
1590
|
+
const task = this.tasks.get(taskId) ?? this.terminalTasks.get(taskId);
|
|
1591
|
+
const taskSafe = task;
|
|
1510
1592
|
try {
|
|
1511
1593
|
await this.processRegistries.get(taskId)?.killAll();
|
|
1512
1594
|
} catch (err) {
|
|
@@ -1518,29 +1600,29 @@ ${reuseSection.markdown}`;
|
|
|
1518
1600
|
logger3.warn(`[BackgroundTaskManager] forceStopAllAcrossParents propagateStopToWorkflowRuns failed for ${taskId}: ${err instanceof Error ? err.message : String(err)}`);
|
|
1519
1601
|
}
|
|
1520
1602
|
let justMarkedStopped = false;
|
|
1521
|
-
if (
|
|
1603
|
+
if (taskSafe && (taskSafe.status === "running" || taskSafe.status === "pending")) {
|
|
1522
1604
|
try {
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1605
|
+
taskSafe.status = "stopped";
|
|
1606
|
+
taskSafe.completedAt = Date.now();
|
|
1607
|
+
taskSafe.lastUpdatedAt = taskSafe.completedAt;
|
|
1608
|
+
taskSafe.abortController?.abort();
|
|
1527
1609
|
justMarkedStopped = true;
|
|
1528
1610
|
} catch (err) {
|
|
1529
1611
|
logger3.warn(`[BackgroundTaskManager] forceStopAllAcrossParents mark stopped failed for ${taskId}: ${err instanceof Error ? err.message : String(err)}`);
|
|
1530
1612
|
}
|
|
1531
1613
|
}
|
|
1532
|
-
if (justMarkedStopped) {
|
|
1614
|
+
if (justMarkedStopped && taskSafe) {
|
|
1533
1615
|
const stoppedPayload = {
|
|
1534
|
-
backgroundTaskId:
|
|
1535
|
-
subSessionId:
|
|
1536
|
-
parentSessionId:
|
|
1616
|
+
backgroundTaskId: taskSafe.id,
|
|
1617
|
+
subSessionId: taskSafe.subSessionId,
|
|
1618
|
+
parentSessionId: taskSafe.parentSessionId,
|
|
1537
1619
|
status: "stopped",
|
|
1538
|
-
description:
|
|
1620
|
+
description: taskSafe.description,
|
|
1539
1621
|
error: "force stop all",
|
|
1540
|
-
executionTimeMs:
|
|
1541
|
-
associatedTaskId:
|
|
1622
|
+
executionTimeMs: taskSafe.startedAt && taskSafe.completedAt ? taskSafe.completedAt - taskSafe.startedAt : 0,
|
|
1623
|
+
associatedTaskId: taskSafe.associatedTaskId
|
|
1542
1624
|
};
|
|
1543
|
-
this.publishBackgroundEvent(BackgroundTaskEventTypes.STOPPED, stoppedPayload,
|
|
1625
|
+
this.publishBackgroundEvent(BackgroundTaskEventTypes.STOPPED, stoppedPayload, taskSafe.parentSessionId);
|
|
1544
1626
|
}
|
|
1545
1627
|
}
|
|
1546
1628
|
}
|
|
@@ -1548,9 +1630,16 @@ ${reuseSection.markdown}`;
|
|
|
1548
1630
|
return this.forceStopAllAcrossParents();
|
|
1549
1631
|
}
|
|
1550
1632
|
async dispose() {
|
|
1551
|
-
for (const [
|
|
1552
|
-
|
|
1553
|
-
|
|
1633
|
+
for (const [, timer] of this.progressTimers) {
|
|
1634
|
+
try {
|
|
1635
|
+
clearInterval(timer);
|
|
1636
|
+
} catch {}
|
|
1637
|
+
}
|
|
1638
|
+
this.progressTimers.clear();
|
|
1639
|
+
for (const [, controller] of this.abortControllers) {
|
|
1640
|
+
try {
|
|
1641
|
+
controller.abort();
|
|
1642
|
+
} catch {}
|
|
1554
1643
|
}
|
|
1555
1644
|
this.abortControllers.clear();
|
|
1556
1645
|
for (const [, registry] of this.processRegistries) {
|
|
@@ -1599,6 +1688,9 @@ __legacyDecorateClassTS([
|
|
|
1599
1688
|
log: true
|
|
1600
1689
|
})
|
|
1601
1690
|
], BackgroundTaskManager.prototype, "propagateStopToWorkflowRuns", null);
|
|
1691
|
+
__legacyDecorateClassTS([
|
|
1692
|
+
TracedAs("task.background.finalizeTask", { recordParams: true, recordResult: false, log: true })
|
|
1693
|
+
], BackgroundTaskManager.prototype, "finalizeTask", null);
|
|
1602
1694
|
__legacyDecorateClassTS([
|
|
1603
1695
|
TracedAs("task.background.resolveEntryAgent", { recordParams: true, recordResult: true })
|
|
1604
1696
|
], BackgroundTaskManager.prototype, "resolveEntryAgent", null);
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
AgentComponentAdapter,
|
|
9
9
|
init_agent_component_adapter
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-cjraf54z.js";
|
|
11
11
|
import {
|
|
12
12
|
TemplateResolver,
|
|
13
13
|
init_template_resolver
|
|
14
|
-
} from "./roy-agent-core-
|
|
14
|
+
} from "./roy-agent-core-h1cb2jzh.js";
|
|
15
15
|
import {
|
|
16
16
|
PythonCallNode,
|
|
17
17
|
SkillNode,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
init_skill_node,
|
|
22
22
|
init_tool_node,
|
|
23
23
|
init_workflow_node
|
|
24
|
-
} from "./roy-agent-core-
|
|
24
|
+
} from "./roy-agent-core-0qjw25e8.js";
|
|
25
25
|
import {
|
|
26
26
|
WORKFLOW_SUBMIT_OUTPUT_TOOL_NAME,
|
|
27
27
|
init_json_schema_to_zod,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
import {
|
|
34
34
|
DAGManager,
|
|
35
35
|
init_dag_manager
|
|
36
|
-
} from "./roy-agent-core-
|
|
36
|
+
} from "./roy-agent-core-0v74marc.js";
|
|
37
37
|
import {
|
|
38
38
|
WorkflowError,
|
|
39
39
|
createWorkflowEvent,
|
|
@@ -49,11 +49,11 @@ import {
|
|
|
49
49
|
import {
|
|
50
50
|
TracedAs,
|
|
51
51
|
init_decorator
|
|
52
|
-
} from "./roy-agent-core-
|
|
52
|
+
} from "./roy-agent-core-gb7pm9c0.js";
|
|
53
53
|
import {
|
|
54
54
|
createLogger,
|
|
55
55
|
init_logger
|
|
56
|
-
} from "./roy-agent-core-
|
|
56
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
57
57
|
import {
|
|
58
58
|
__esm,
|
|
59
59
|
__export,
|
|
@@ -91,6 +91,7 @@ var init_types = __esm(() => {
|
|
|
91
91
|
// src/env/log-trace/opentelemetry/tracer-provider.ts
|
|
92
92
|
var exports_tracer_provider = {};
|
|
93
93
|
__export(exports_tracer_provider, {
|
|
94
|
+
setTracerProvider: () => setTracerProvider,
|
|
94
95
|
resetTracerProvider: () => resetTracerProvider,
|
|
95
96
|
getTracerProvider: () => getTracerProvider,
|
|
96
97
|
OTelTracerProvider: () => OTelTracerProvider
|
|
@@ -437,6 +438,12 @@ function resetTracerProvider() {
|
|
|
437
438
|
providerInstance = null;
|
|
438
439
|
}
|
|
439
440
|
}
|
|
441
|
+
function setTracerProvider(provider) {
|
|
442
|
+
if (providerInstance) {
|
|
443
|
+
providerInstance.shutdown();
|
|
444
|
+
}
|
|
445
|
+
providerInstance = provider;
|
|
446
|
+
}
|
|
440
447
|
function getDefaultDbPath() {
|
|
441
448
|
const os = __require("os");
|
|
442
449
|
const path = __require("path");
|
|
@@ -451,4 +458,4 @@ var init_tracer_provider = __esm(() => {
|
|
|
451
458
|
init_types();
|
|
452
459
|
});
|
|
453
460
|
|
|
454
|
-
export { serialize, parse, propagation, init_propagation, SpanKind, SpanStatus, init_types, OTelTracerProvider, getTracerProvider, resetTracerProvider, exports_tracer_provider, init_tracer_provider };
|
|
461
|
+
export { serialize, parse, propagation, init_propagation, SpanKind, SpanStatus, init_types, OTelTracerProvider, getTracerProvider, resetTracerProvider, setTracerProvider, exports_tracer_provider, init_tracer_provider };
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
TracedAs,
|
|
11
11
|
init_decorator
|
|
12
|
-
} from "./roy-agent-core-
|
|
12
|
+
} from "./roy-agent-core-gb7pm9c0.js";
|
|
13
13
|
import {
|
|
14
14
|
createLogger,
|
|
15
15
|
init_logger
|
|
16
|
-
} from "./roy-agent-core-
|
|
16
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
17
17
|
import {
|
|
18
18
|
__esm,
|
|
19
19
|
__export,
|