@ai-setting/roy-agent-core 1.5.89 → 1.5.91
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 +8 -8
- package/dist/env/agent/index.js +14 -14
- package/dist/env/commands/index.js +8 -8
- package/dist/env/context/index.js +4 -4
- package/dist/env/debug/index.js +8 -8
- package/dist/env/event-source/index.js +18 -14
- package/dist/env/hook/index.js +6 -6
- package/dist/env/index.js +35 -35
- package/dist/env/llm/index.js +12 -10
- package/dist/env/log-trace/index.js +8 -8
- package/dist/env/mcp/index.js +9 -9
- package/dist/env/mcp/tool/index.js +2 -2
- package/dist/env/memory/index.js +9 -9
- package/dist/env/memory/plugin/index.js +2 -2
- package/dist/env/plugin/index.js +8 -8
- package/dist/env/prompt/index.js +9 -9
- package/dist/env/session/index.js +11 -11
- package/dist/env/session/storage/index.js +4 -4
- package/dist/env/skill/index.js +8 -8
- package/dist/env/task/delegate/index.js +7 -7
- package/dist/env/task/index.js +12 -12
- package/dist/env/task/plugins/index.js +7 -7
- package/dist/env/task/storage/index.js +2 -2
- package/dist/env/task/tools/index.js +4 -4
- package/dist/env/tool/built-in/index.js +3 -3
- package/dist/env/tool/index.js +10 -10
- package/dist/env/workflow/engine/index.js +9 -9
- package/dist/env/workflow/index.js +15 -15
- package/dist/env/workflow/nodes/index.js +3 -3
- package/dist/env/workflow/service/index.js +3 -3
- package/dist/env/workflow/storage/index.js +4 -4
- package/dist/env/workflow/tools/index.js +4 -4
- package/dist/env/workflow/utils/index.js +3 -3
- package/dist/index.js +155 -50
- package/dist/shared/@ai-setting/{roy-agent-core-fvfc7f6v.js → roy-agent-core-0ger6zdn.js} +65 -11
- package/dist/shared/@ai-setting/{roy-agent-core-bwjpte58.js → roy-agent-core-0vsnecwa.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-h5867smx.js → roy-agent-core-0ye4q2jj.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-prdngx28.js → roy-agent-core-33rhv946.js} +43 -7
- package/dist/shared/@ai-setting/{roy-agent-core-djtkntar.js → roy-agent-core-4w6rgxs4.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-fgpnv7dt.js → roy-agent-core-55br4t6v.js} +80 -37
- package/dist/shared/@ai-setting/{roy-agent-core-3952rkj0.js → roy-agent-core-578qk38y.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-2q7cshpm.js → roy-agent-core-5j649pb1.js} +289 -21
- package/dist/shared/@ai-setting/{roy-agent-core-2h38rvyj.js → roy-agent-core-634ee5jb.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-w6bmrgap.js → roy-agent-core-7svhckhz.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-ce10b0ez.js → roy-agent-core-8x4ngxcy.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-83d035pp.js → roy-agent-core-97tjdb2r.js} +70 -1
- package/dist/shared/@ai-setting/{roy-agent-core-qbq3jgrn.js → roy-agent-core-9amq4epa.js} +14 -14
- package/dist/shared/@ai-setting/{roy-agent-core-pcdzfwdv.js → roy-agent-core-9xby523m.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-mw4ty0ba.js → roy-agent-core-at05dk0z.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-ewr1nw7t.js → roy-agent-core-b1vkkcbr.js} +7 -7
- package/dist/shared/@ai-setting/{roy-agent-core-n19rm7tw.js → roy-agent-core-b2thb9xj.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-3sv590cv.js → roy-agent-core-b77yz0wt.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-yanpq5gb.js → roy-agent-core-bdajt9cs.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-3czy06aq.js → roy-agent-core-bqwj1dq0.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-k05v31rc.js → roy-agent-core-cg146hmg.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-07290s9n.js → roy-agent-core-cx67bv9d.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-taxvytzz.js → roy-agent-core-cx9p8b2t.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-d6597yp0.js → roy-agent-core-ddghwfmk.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-vneyghpg.js → roy-agent-core-ddq5hcp5.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-qhhxx2x2.js → roy-agent-core-ds5f75pg.js} +2 -1
- package/dist/shared/@ai-setting/{roy-agent-core-tq9528d3.js → roy-agent-core-e7t3rj0e.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-h2d1s8yd.js → roy-agent-core-fg5eaht3.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-q7sqeax6.js → roy-agent-core-fx1fdzbz.js} +163 -3
- package/dist/shared/@ai-setting/{roy-agent-core-hc20420t.js → roy-agent-core-g2mth323.js} +28 -4
- package/dist/shared/@ai-setting/{roy-agent-core-7tp56w6n.js → roy-agent-core-gp872e7m.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-c67wr8sp.js → roy-agent-core-hf8pqrvy.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-32m0nb9j.js → roy-agent-core-j3qb695p.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-r0m0at3x.js → roy-agent-core-j7jeqxhd.js} +121 -9
- package/dist/shared/@ai-setting/{roy-agent-core-h4h55x4h.js → roy-agent-core-jexyz11d.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-hxsbegfc.js → roy-agent-core-jf865m5b.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-b8r4tfqq.js → roy-agent-core-ksx9a556.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-rgckng3p.js → roy-agent-core-pf1c360e.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-xckhrs2p.js → roy-agent-core-q7ffkt1e.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-gb9gbkc3.js → roy-agent-core-q88vxmx5.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-y5d04fm3.js → roy-agent-core-scp0afxg.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-3f6k060j.js → roy-agent-core-snvsn60t.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-xnxyzaw4.js → roy-agent-core-spzb03na.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-86d4exyf.js → roy-agent-core-sssn8kt9.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-m3dkyprg.js → roy-agent-core-svcr4gjw.js} +14 -9
- package/dist/shared/@ai-setting/{roy-agent-core-nqzt9ne4.js → roy-agent-core-vady4w02.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-shme7set.js → roy-agent-core-vyygk314.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-5kdw0p98.js → roy-agent-core-w1s8yrm5.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-v8xa6vs8.js → roy-agent-core-wmkx79b1.js} +14 -12
- package/dist/shared/@ai-setting/{roy-agent-core-t1ef8hf2.js → roy-agent-core-ws76avbn.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-xhcgg11h.js → roy-agent-core-wtbyj0q1.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-fjexv5nm.js → roy-agent-core-xgnpr28w.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-c1j7ev4e.js → roy-agent-core-yfhgxh5a.js} +71 -1
- package/dist/shared/@ai-setting/{roy-agent-core-qg4rma4c.js → roy-agent-core-zttjq1h3.js} +1 -1
- package/package.json +1 -1
- /package/dist/shared/@ai-setting/{roy-agent-core-4f3976cd.js → roy-agent-core-k5hxvaf0.js} +0 -0
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-7svhckhz.js";
|
|
5
5
|
import {
|
|
6
6
|
LLMComponent,
|
|
7
7
|
LLMConfigSchema,
|
|
@@ -9,13 +9,13 @@ 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-fg5eaht3.js";
|
|
13
13
|
import {
|
|
14
14
|
ConfigComponent
|
|
15
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
15
|
+
} from "./shared/@ai-setting/roy-agent-core-33rhv946.js";
|
|
16
16
|
import {
|
|
17
17
|
CommandsComponent
|
|
18
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
18
|
+
} from "./shared/@ai-setting/roy-agent-core-578qk38y.js";
|
|
19
19
|
import"./shared/@ai-setting/roy-agent-core-pt7as39r.js";
|
|
20
20
|
import {
|
|
21
21
|
bashTool,
|
|
@@ -26,23 +26,23 @@ import {
|
|
|
26
26
|
grepTool,
|
|
27
27
|
readFileTool,
|
|
28
28
|
writeFileTool
|
|
29
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
29
|
+
} from "./shared/@ai-setting/roy-agent-core-spzb03na.js";
|
|
30
30
|
import {
|
|
31
31
|
closeDatabase
|
|
32
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
33
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
34
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
32
|
+
} from "./shared/@ai-setting/roy-agent-core-jexyz11d.js";
|
|
33
|
+
import"./shared/@ai-setting/roy-agent-core-b77yz0wt.js";
|
|
34
|
+
import"./shared/@ai-setting/roy-agent-core-k5hxvaf0.js";
|
|
35
35
|
import {
|
|
36
36
|
MemoryComponent
|
|
37
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
37
|
+
} from "./shared/@ai-setting/roy-agent-core-634ee5jb.js";
|
|
38
38
|
import"./shared/@ai-setting/roy-agent-core-g1s2h0e5.js";
|
|
39
39
|
import {
|
|
40
40
|
MemoryPlugin,
|
|
41
41
|
createMemoryPlugin
|
|
42
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
42
|
+
} from "./shared/@ai-setting/roy-agent-core-wtbyj0q1.js";
|
|
43
43
|
import {
|
|
44
44
|
DebugComponent
|
|
45
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
45
|
+
} from "./shared/@ai-setting/roy-agent-core-b2thb9xj.js";
|
|
46
46
|
import {
|
|
47
47
|
ReplFormatter,
|
|
48
48
|
TraceFormatter,
|
|
@@ -52,15 +52,17 @@ import {
|
|
|
52
52
|
BaseEnvironment,
|
|
53
53
|
generateDescendingId,
|
|
54
54
|
generateId
|
|
55
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
55
|
+
} from "./shared/@ai-setting/roy-agent-core-0vsnecwa.js";
|
|
56
56
|
import {
|
|
57
|
+
BountyIMInstance,
|
|
57
58
|
EventSourceComponent,
|
|
58
59
|
TimerInstance,
|
|
60
|
+
bountyIMHandler,
|
|
59
61
|
builtInHandlers,
|
|
60
62
|
getBuiltInHandler,
|
|
61
63
|
larkCliHandler,
|
|
62
64
|
timerHandler
|
|
63
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
65
|
+
} from "./shared/@ai-setting/roy-agent-core-5j649pb1.js";
|
|
64
66
|
import {
|
|
65
67
|
BUILT_IN_EVENT_SOURCE_TYPES,
|
|
66
68
|
BUILT_IN_EVENT_SOURCE_TYPE_LIST,
|
|
@@ -69,42 +71,42 @@ import {
|
|
|
69
71
|
isBuiltInEventSourceType,
|
|
70
72
|
isValidEventSourceType,
|
|
71
73
|
validateEventSourceConfig
|
|
72
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
74
|
+
} from "./shared/@ai-setting/roy-agent-core-ds5f75pg.js";
|
|
73
75
|
import {
|
|
74
76
|
LogTraceComponent,
|
|
75
77
|
LogTraceConfigSchema
|
|
76
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
78
|
+
} from "./shared/@ai-setting/roy-agent-core-wmkx79b1.js";
|
|
77
79
|
import {
|
|
78
80
|
PluginComponent
|
|
79
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
81
|
+
} from "./shared/@ai-setting/roy-agent-core-ws76avbn.js";
|
|
80
82
|
import {
|
|
81
83
|
TaskTagPlugin
|
|
82
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
84
|
+
} from "./shared/@ai-setting/roy-agent-core-svcr4gjw.js";
|
|
83
85
|
import {
|
|
84
86
|
getBuiltInPrompt,
|
|
85
87
|
getBuiltInPromptNames
|
|
86
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
88
|
+
} from "./shared/@ai-setting/roy-agent-core-97tjdb2r.js";
|
|
87
89
|
import {
|
|
88
90
|
BasePlugin
|
|
89
91
|
} from "./shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
90
92
|
import {
|
|
91
93
|
WorkflowComponent
|
|
92
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
94
|
+
} from "./shared/@ai-setting/roy-agent-core-9amq4epa.js";
|
|
93
95
|
import {
|
|
94
96
|
init_node_registry_helper,
|
|
95
97
|
registerDecoratorNodeType
|
|
96
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
97
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
98
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
98
|
+
} from "./shared/@ai-setting/roy-agent-core-xgnpr28w.js";
|
|
99
|
+
import"./shared/@ai-setting/roy-agent-core-snvsn60t.js";
|
|
100
|
+
import"./shared/@ai-setting/roy-agent-core-w1s8yrm5.js";
|
|
99
101
|
import"./shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
100
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
102
|
+
import"./shared/@ai-setting/roy-agent-core-q88vxmx5.js";
|
|
101
103
|
import"./shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
102
104
|
import"./shared/@ai-setting/roy-agent-core-hhrg314p.js";
|
|
103
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
105
|
+
import"./shared/@ai-setting/roy-agent-core-g2mth323.js";
|
|
104
106
|
import"./shared/@ai-setting/roy-agent-core-qnrf2aw6.js";
|
|
105
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
107
|
+
import"./shared/@ai-setting/roy-agent-core-j3qb695p.js";
|
|
106
108
|
import"./shared/@ai-setting/roy-agent-core-1db4vpc6.js";
|
|
107
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
109
|
+
import"./shared/@ai-setting/roy-agent-core-e7t3rj0e.js";
|
|
108
110
|
import"./shared/@ai-setting/roy-agent-core-8wd3qwx5.js";
|
|
109
111
|
import"./shared/@ai-setting/roy-agent-core-4yq23m5g.js";
|
|
110
112
|
import {
|
|
@@ -118,55 +120,55 @@ import"./shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
|
118
120
|
import {
|
|
119
121
|
AgentComponent,
|
|
120
122
|
AgentComponentConfigSchema
|
|
121
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
123
|
+
} from "./shared/@ai-setting/roy-agent-core-55br4t6v.js";
|
|
122
124
|
import {
|
|
123
125
|
createInvokeConfig,
|
|
124
126
|
invoke,
|
|
125
127
|
invokeNonStream,
|
|
126
128
|
parseModelString
|
|
127
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
129
|
+
} from "./shared/@ai-setting/roy-agent-core-j7jeqxhd.js";
|
|
128
130
|
import {
|
|
129
131
|
ToolComponent,
|
|
130
132
|
ToolRegistry,
|
|
131
133
|
ToolValidator
|
|
132
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
134
|
+
} from "./shared/@ai-setting/roy-agent-core-jf865m5b.js";
|
|
133
135
|
import {
|
|
134
136
|
createAutoTaskPlugin
|
|
135
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
137
|
+
} from "./shared/@ai-setting/roy-agent-core-bdajt9cs.js";
|
|
136
138
|
import {
|
|
137
139
|
AskUserError,
|
|
138
140
|
init_workflow_hil
|
|
139
141
|
} from "./shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
140
142
|
import {
|
|
141
143
|
TaskComponent
|
|
142
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
144
|
+
} from "./shared/@ai-setting/roy-agent-core-b1vkkcbr.js";
|
|
143
145
|
import"./shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
144
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
146
|
+
import"./shared/@ai-setting/roy-agent-core-at05dk0z.js";
|
|
145
147
|
import"./shared/@ai-setting/roy-agent-core-hvdfgvfz.js";
|
|
146
148
|
import {
|
|
147
149
|
SQLiteTaskStore,
|
|
148
150
|
getDefaultTaskDbPath
|
|
149
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
151
|
+
} from "./shared/@ai-setting/roy-agent-core-9xby523m.js";
|
|
150
152
|
import {
|
|
151
153
|
AgentRegistry
|
|
152
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
154
|
+
} from "./shared/@ai-setting/roy-agent-core-vady4w02.js";
|
|
153
155
|
import {
|
|
154
156
|
XDG_PATHS,
|
|
155
157
|
getXDGPath,
|
|
156
158
|
getXDGPaths
|
|
157
159
|
} from "./shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
158
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
160
|
+
import"./shared/@ai-setting/roy-agent-core-0ye4q2jj.js";
|
|
159
161
|
import"./shared/@ai-setting/roy-agent-core-t94ktchq.js";
|
|
160
162
|
import {
|
|
161
163
|
TaskHookPoints
|
|
162
164
|
} from "./shared/@ai-setting/roy-agent-core-92z6t4he.js";
|
|
163
165
|
import {
|
|
164
166
|
SkillComponent
|
|
165
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
167
|
+
} from "./shared/@ai-setting/roy-agent-core-cx67bv9d.js";
|
|
166
168
|
import"./shared/@ai-setting/roy-agent-core-psvxt4c9.js";
|
|
167
169
|
import {
|
|
168
170
|
McpComponent
|
|
169
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
171
|
+
} from "./shared/@ai-setting/roy-agent-core-bqwj1dq0.js";
|
|
170
172
|
import {
|
|
171
173
|
AgentError,
|
|
172
174
|
ComponentError,
|
|
@@ -179,36 +181,36 @@ import {
|
|
|
179
181
|
isRoyError
|
|
180
182
|
} from "./shared/@ai-setting/roy-agent-core-ctdhjv68.js";
|
|
181
183
|
import"./shared/@ai-setting/roy-agent-core-fnv3ev18.js";
|
|
182
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
184
|
+
import"./shared/@ai-setting/roy-agent-core-4w6rgxs4.js";
|
|
183
185
|
import {
|
|
184
186
|
SessionComponent
|
|
185
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
187
|
+
} from "./shared/@ai-setting/roy-agent-core-0ger6zdn.js";
|
|
186
188
|
import"./shared/@ai-setting/roy-agent-core-rvxg1wps.js";
|
|
187
189
|
import {
|
|
188
190
|
MemorySessionStore
|
|
189
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
190
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
191
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
191
|
+
} from "./shared/@ai-setting/roy-agent-core-fx1fdzbz.js";
|
|
192
|
+
import"./shared/@ai-setting/roy-agent-core-yfhgxh5a.js";
|
|
193
|
+
import"./shared/@ai-setting/roy-agent-core-8x4ngxcy.js";
|
|
192
194
|
import"./shared/@ai-setting/roy-agent-core-qxhq8ven.js";
|
|
193
195
|
import {
|
|
194
196
|
BaseComponent
|
|
195
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
197
|
+
} from "./shared/@ai-setting/roy-agent-core-pf1c360e.js";
|
|
196
198
|
import {
|
|
197
199
|
createHook,
|
|
198
200
|
createPriorityHook
|
|
199
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
201
|
+
} from "./shared/@ai-setting/roy-agent-core-ksx9a556.js";
|
|
200
202
|
import {
|
|
201
203
|
HookManager,
|
|
202
204
|
globalHookManager
|
|
203
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
204
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
205
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
205
|
+
} from "./shared/@ai-setting/roy-agent-core-gp872e7m.js";
|
|
206
|
+
import"./shared/@ai-setting/roy-agent-core-zttjq1h3.js";
|
|
207
|
+
import"./shared/@ai-setting/roy-agent-core-scp0afxg.js";
|
|
206
208
|
import {
|
|
207
209
|
Traced,
|
|
208
210
|
TracedAs,
|
|
209
211
|
TracedLightweight,
|
|
210
212
|
wrapFunction
|
|
211
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
213
|
+
} from "./shared/@ai-setting/roy-agent-core-cg146hmg.js";
|
|
212
214
|
import {
|
|
213
215
|
createLogger,
|
|
214
216
|
getLogDir,
|
|
@@ -218,7 +220,7 @@ import {
|
|
|
218
220
|
setConfigComponent,
|
|
219
221
|
setLogDirOverride,
|
|
220
222
|
setQuietMode
|
|
221
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
223
|
+
} from "./shared/@ai-setting/roy-agent-core-vyygk314.js";
|
|
222
224
|
import {
|
|
223
225
|
OTelTracerProvider,
|
|
224
226
|
SpanKind,
|
|
@@ -231,6 +233,103 @@ import {
|
|
|
231
233
|
SQLiteSpanStorage
|
|
232
234
|
} from "./shared/@ai-setting/roy-agent-core-c6592r3c.js";
|
|
233
235
|
import"./shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
236
|
+
// src/utils/media.ts
|
|
237
|
+
import * as fs from "node:fs/promises";
|
|
238
|
+
import * as path from "node:path";
|
|
239
|
+
var ATTACH_FILE_MAX_BYTES = 10 * 1024 * 1024;
|
|
240
|
+
function startsWith(buf, sig) {
|
|
241
|
+
if (buf.length < sig.length)
|
|
242
|
+
return false;
|
|
243
|
+
for (let i = 0;i < sig.length; i++) {
|
|
244
|
+
if (buf[i] !== sig[i])
|
|
245
|
+
return false;
|
|
246
|
+
}
|
|
247
|
+
return true;
|
|
248
|
+
}
|
|
249
|
+
function sniffMimeType(buffer, fallbackName) {
|
|
250
|
+
if (startsWith(buffer, [137, 80, 78, 71, 13, 10, 26, 10])) {
|
|
251
|
+
return "image/png";
|
|
252
|
+
}
|
|
253
|
+
if (startsWith(buffer, [255, 216, 255])) {
|
|
254
|
+
return "image/jpeg";
|
|
255
|
+
}
|
|
256
|
+
if (startsWith(buffer, [71, 73, 70, 56])) {
|
|
257
|
+
return "image/gif";
|
|
258
|
+
}
|
|
259
|
+
if (startsWith(buffer, [66, 77])) {
|
|
260
|
+
return "image/bmp";
|
|
261
|
+
}
|
|
262
|
+
if (startsWith(buffer, [37, 80, 68, 70, 45])) {
|
|
263
|
+
return "application/pdf";
|
|
264
|
+
}
|
|
265
|
+
if (startsWith(buffer, [82, 73, 70, 70]) && startsWith(buffer.subarray(8), [87, 69, 66, 80])) {
|
|
266
|
+
return "image/webp";
|
|
267
|
+
}
|
|
268
|
+
if (fallbackName) {
|
|
269
|
+
const ext = path.extname(fallbackName).toLowerCase();
|
|
270
|
+
const extMap = {
|
|
271
|
+
".png": "image/png",
|
|
272
|
+
".jpg": "image/jpeg",
|
|
273
|
+
".jpeg": "image/jpeg",
|
|
274
|
+
".gif": "image/gif",
|
|
275
|
+
".webp": "image/webp",
|
|
276
|
+
".bmp": "image/bmp",
|
|
277
|
+
".pdf": "application/pdf",
|
|
278
|
+
".mp3": "audio/mpeg",
|
|
279
|
+
".wav": "audio/wav",
|
|
280
|
+
".ogg": "audio/ogg",
|
|
281
|
+
".m4a": "audio/mp4",
|
|
282
|
+
".mp4": "video/mp4",
|
|
283
|
+
".mov": "video/quicktime",
|
|
284
|
+
".webm": "video/webm"
|
|
285
|
+
};
|
|
286
|
+
const mapped = extMap[ext];
|
|
287
|
+
if (mapped)
|
|
288
|
+
return mapped;
|
|
289
|
+
}
|
|
290
|
+
return "application/octet-stream";
|
|
291
|
+
}
|
|
292
|
+
function isMediaType(mime) {
|
|
293
|
+
if (typeof mime !== "string")
|
|
294
|
+
return false;
|
|
295
|
+
const m = mime.toLowerCase();
|
|
296
|
+
return m.startsWith("image/") || m.startsWith("audio/") || m.startsWith("video/") || m === "application/pdf";
|
|
297
|
+
}
|
|
298
|
+
var HTTP_URL_RE = /^https?:\/\//i;
|
|
299
|
+
var DATA_URL_RE = /^data:([^;,]+)(;base64)?,(.*)$/s;
|
|
300
|
+
async function parseImageInput(input) {
|
|
301
|
+
if (!input || typeof input !== "string" || input.trim().length === 0) {
|
|
302
|
+
throw new Error("parseImageInput: input is empty");
|
|
303
|
+
}
|
|
304
|
+
const trimmed = input.trim();
|
|
305
|
+
if (HTTP_URL_RE.test(trimmed)) {
|
|
306
|
+
return { type: "image", image: trimmed };
|
|
307
|
+
}
|
|
308
|
+
if (DATA_URL_RE.test(trimmed)) {
|
|
309
|
+
return { type: "image", image: trimmed };
|
|
310
|
+
}
|
|
311
|
+
return await parseLocalImagePath(trimmed);
|
|
312
|
+
}
|
|
313
|
+
async function parseLocalImagePath(filePath) {
|
|
314
|
+
let stat2;
|
|
315
|
+
try {
|
|
316
|
+
stat2 = await fs.stat(filePath);
|
|
317
|
+
} catch (err) {
|
|
318
|
+
throw new Error(`parseImageInput: cannot stat file '${filePath}': ${err.message}`);
|
|
319
|
+
}
|
|
320
|
+
if (!stat2.isFile()) {
|
|
321
|
+
throw new Error(`parseImageInput: not a regular file: ${filePath}`);
|
|
322
|
+
}
|
|
323
|
+
if (stat2.size > ATTACH_FILE_MAX_BYTES) {
|
|
324
|
+
throw new Error(`parseImageInput: file '${filePath}' exceeds 10 MiB limit ` + `(${stat2.size} bytes > ${ATTACH_FILE_MAX_BYTES} bytes)`);
|
|
325
|
+
}
|
|
326
|
+
const buffer = await fs.readFile(filePath);
|
|
327
|
+
const mime = sniffMimeType(buffer, filePath);
|
|
328
|
+
if (!mime.startsWith("image/")) {
|
|
329
|
+
throw new Error(`parseImageInput: file '${filePath}' is not an image (detected ${mime}). ` + `Use ContentPart type 'file' for non-image attachments.`);
|
|
330
|
+
}
|
|
331
|
+
return { type: "image", image: buffer };
|
|
332
|
+
}
|
|
234
333
|
// src/env/memory/tools/memory-agent-tools.ts
|
|
235
334
|
import { z } from "zod";
|
|
236
335
|
var SearchSessionsSchema = z.object({
|
|
@@ -356,6 +455,7 @@ export {
|
|
|
356
455
|
wrapFunction,
|
|
357
456
|
validateEventSourceConfig,
|
|
358
457
|
timerHandler,
|
|
458
|
+
sniffMimeType,
|
|
359
459
|
setQuietMode,
|
|
360
460
|
setConfigComponent as setLoggerConfigComponent,
|
|
361
461
|
setLogDirOverride,
|
|
@@ -364,10 +464,12 @@ export {
|
|
|
364
464
|
readFileTool,
|
|
365
465
|
propagation,
|
|
366
466
|
parseModelString,
|
|
467
|
+
parseImageInput,
|
|
367
468
|
larkCliHandler,
|
|
368
469
|
isValidEventSourceType,
|
|
369
470
|
isRoyError,
|
|
370
471
|
isQuietMode,
|
|
472
|
+
isMediaType,
|
|
371
473
|
isBuiltInEventSourceType,
|
|
372
474
|
invokeNonStream,
|
|
373
475
|
invoke,
|
|
@@ -401,6 +503,7 @@ export {
|
|
|
401
503
|
createAutoTaskPlugin,
|
|
402
504
|
closeDatabase,
|
|
403
505
|
builtInHandlers,
|
|
506
|
+
bountyIMHandler,
|
|
404
507
|
bashTool,
|
|
405
508
|
XDG_PATHS,
|
|
406
509
|
WorkflowEdges,
|
|
@@ -455,6 +558,7 @@ export {
|
|
|
455
558
|
ConfigComponent,
|
|
456
559
|
ComponentError,
|
|
457
560
|
CommandsComponent,
|
|
561
|
+
BountyIMInstance,
|
|
458
562
|
BasePlugin,
|
|
459
563
|
BaseEnvironment,
|
|
460
564
|
BaseComponent,
|
|
@@ -464,5 +568,6 @@ export {
|
|
|
464
568
|
AgentRegistry,
|
|
465
569
|
AgentError,
|
|
466
570
|
AgentComponentConfigSchema,
|
|
467
|
-
AgentComponent
|
|
571
|
+
AgentComponent,
|
|
572
|
+
ATTACH_FILE_MAX_BYTES
|
|
468
573
|
};
|
|
@@ -6,21 +6,21 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
MemorySessionStore,
|
|
8
8
|
SQLiteSessionStore
|
|
9
|
-
} from "./roy-agent-core-
|
|
9
|
+
} from "./roy-agent-core-fx1fdzbz.js";
|
|
10
10
|
import {
|
|
11
11
|
envKeyToConfigKey
|
|
12
12
|
} from "./roy-agent-core-qxhq8ven.js";
|
|
13
13
|
import {
|
|
14
14
|
BaseComponent
|
|
15
|
-
} from "./roy-agent-core-
|
|
15
|
+
} from "./roy-agent-core-pf1c360e.js";
|
|
16
16
|
import {
|
|
17
17
|
TracedAs,
|
|
18
18
|
init_decorator
|
|
19
|
-
} from "./roy-agent-core-
|
|
19
|
+
} from "./roy-agent-core-cg146hmg.js";
|
|
20
20
|
import {
|
|
21
21
|
createLogger,
|
|
22
22
|
init_logger
|
|
23
|
-
} from "./roy-agent-core-
|
|
23
|
+
} from "./roy-agent-core-vyygk314.js";
|
|
24
24
|
import {
|
|
25
25
|
__legacyDecorateClassTS
|
|
26
26
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -66,8 +66,38 @@ init_search_query_parser();
|
|
|
66
66
|
import path from "path";
|
|
67
67
|
import { z } from "zod";
|
|
68
68
|
var logger = createLogger("session");
|
|
69
|
+
function sleep(ms) {
|
|
70
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
71
|
+
}
|
|
72
|
+
function isBusyError(err) {
|
|
73
|
+
if (err == null)
|
|
74
|
+
return false;
|
|
75
|
+
const e = err;
|
|
76
|
+
if (typeof e.code === "string") {
|
|
77
|
+
if (/^SQLITE_(BUSY|LOCKED)$/i.test(e.code))
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
if (typeof e.errno === "number" && (e.errno === 5 || e.errno === 6)) {
|
|
81
|
+
return true;
|
|
82
|
+
}
|
|
83
|
+
const msg = e.message ?? "";
|
|
84
|
+
return /SQLiteError:\s+(database is locked|database table is locked)/i.test(msg);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
class AddMessageLockExhaustedError extends Error {
|
|
88
|
+
kind = "lock_exhausted";
|
|
89
|
+
attempts;
|
|
90
|
+
cause;
|
|
91
|
+
constructor(attempts, cause) {
|
|
92
|
+
super(`Failed to add message after ${attempts} attempts: ${String(cause)}`);
|
|
93
|
+
this.name = "AddMessageLockExhaustedError";
|
|
94
|
+
this.attempts = attempts;
|
|
95
|
+
this.cause = cause;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
69
98
|
|
|
70
99
|
class SessionComponent extends BaseComponent {
|
|
100
|
+
static BACKOFFS_MS = [50, 100, 200];
|
|
71
101
|
name = "session";
|
|
72
102
|
version = "1.1.0";
|
|
73
103
|
config;
|
|
@@ -323,14 +353,38 @@ class SessionComponent extends BaseComponent {
|
|
|
323
353
|
async addMessage(sessionId, message) {
|
|
324
354
|
const contentPreview = typeof message.content === "string" ? message.content.substring(0, 100) : JSON.stringify(message.content).substring(0, 100);
|
|
325
355
|
logger.info(`[SessionComponent.addMessage] sessionId=${sessionId}, role=${message.role}, content="${contentPreview}"`);
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
356
|
+
return this.addMessageWithRetry(sessionId, message);
|
|
357
|
+
}
|
|
358
|
+
async addMessageWithRetry(sessionId, message) {
|
|
359
|
+
const MAX_ATTEMPTS = SessionComponent.BACKOFFS_MS.length;
|
|
360
|
+
for (let attempt = 0;attempt < MAX_ATTEMPTS; attempt++) {
|
|
361
|
+
try {
|
|
362
|
+
const messageId = await this.store?.addMessage(sessionId, message);
|
|
363
|
+
if (attempt > 0) {
|
|
364
|
+
logger.info(`[SessionComponent.addMessage] Recovered after ${attempt + 1} attempts: messageId=${messageId}`);
|
|
365
|
+
} else {
|
|
366
|
+
logger.info(`[SessionComponent.addMessage] Success: messageId=${messageId}`);
|
|
367
|
+
}
|
|
368
|
+
return messageId;
|
|
369
|
+
} catch (error) {
|
|
370
|
+
if (!isBusyError(error)) {
|
|
371
|
+
logger.error(`[SessionComponent] Failed to add message (non-busy): ${error}`);
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
const isLastAttempt = attempt === MAX_ATTEMPTS - 1;
|
|
375
|
+
if (isLastAttempt) {
|
|
376
|
+
logger.error(`[SessionComponent] Failed to add message after ${MAX_ATTEMPTS} attempts (busy): ${error}`);
|
|
377
|
+
throw new AddMessageLockExhaustedError(MAX_ATTEMPTS, error);
|
|
378
|
+
}
|
|
379
|
+
const backoffMs = SessionComponent.BACKOFFS_MS[attempt];
|
|
380
|
+
logger.warn(`[SessionComponent] SQLITE_BUSY on attempt ${attempt + 1}/${MAX_ATTEMPTS}, retrying in ${backoffMs}ms: ${error}`);
|
|
381
|
+
await sleep(backoffMs);
|
|
382
|
+
}
|
|
333
383
|
}
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
async addMessages(sessionId, messages) {
|
|
387
|
+
return this.store?.addMessages(sessionId, messages) ?? [];
|
|
334
388
|
}
|
|
335
389
|
async getMessages(sessionId, options) {
|
|
336
390
|
const messages = await this.store?.getMessages(sessionId, options?.offset, options?.limit);
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAutoTaskPlugin
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-bdajt9cs.js";
|
|
4
4
|
import {
|
|
5
5
|
ContextError,
|
|
6
6
|
ErrorCodes
|
|
7
7
|
} from "./roy-agent-core-ctdhjv68.js";
|
|
8
8
|
import {
|
|
9
9
|
BaseComponent
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-pf1c360e.js";
|
|
11
11
|
import {
|
|
12
12
|
init_context
|
|
13
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-zttjq1h3.js";
|
|
14
14
|
import {
|
|
15
15
|
getEnvContext,
|
|
16
16
|
init_env_context,
|
|
17
17
|
runWithEnvContextAsync
|
|
18
|
-
} from "./roy-agent-core-
|
|
18
|
+
} from "./roy-agent-core-scp0afxg.js";
|
|
19
19
|
import {
|
|
20
20
|
TracedAs,
|
|
21
21
|
init_decorator
|
|
22
|
-
} from "./roy-agent-core-
|
|
22
|
+
} from "./roy-agent-core-cg146hmg.js";
|
|
23
23
|
import {
|
|
24
24
|
createLogger,
|
|
25
25
|
init_logger
|
|
26
|
-
} from "./roy-agent-core-
|
|
26
|
+
} from "./roy-agent-core-vyygk314.js";
|
|
27
27
|
import {
|
|
28
28
|
__legacyDecorateClassTS
|
|
29
29
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_env_context,
|
|
3
3
|
setCurrentTaskId
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-scp0afxg.js";
|
|
5
5
|
import {
|
|
6
6
|
createLogger,
|
|
7
7
|
init_logger
|
|
8
|
-
} from "./roy-agent-core-
|
|
8
|
+
} from "./roy-agent-core-vyygk314.js";
|
|
9
9
|
|
|
10
10
|
// src/env/task/tools/task-types.ts
|
|
11
11
|
import { z } from "zod";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./roy-agent-core-qxhq8ven.js";
|
|
8
8
|
import {
|
|
9
9
|
BaseComponent
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-pf1c360e.js";
|
|
11
11
|
import {
|
|
12
12
|
__require
|
|
13
13
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -125,8 +125,8 @@ import * as fsSync from "fs";
|
|
|
125
125
|
import * as fsPromises from "fs/promises";
|
|
126
126
|
import path from "path";
|
|
127
127
|
class FileSource {
|
|
128
|
-
name
|
|
129
|
-
priority
|
|
128
|
+
name;
|
|
129
|
+
priority;
|
|
130
130
|
filePath;
|
|
131
131
|
data = {};
|
|
132
132
|
watchers = new Set;
|
|
@@ -143,12 +143,16 @@ class FileSource {
|
|
|
143
143
|
this.debounceMs = 100;
|
|
144
144
|
this.resolver = resolver;
|
|
145
145
|
this.optional = true;
|
|
146
|
+
this.priority = 10;
|
|
147
|
+
this.name = "file";
|
|
146
148
|
} else {
|
|
147
149
|
this.filePath = options.filePath;
|
|
148
150
|
this.debounceMs = options.debounceMs ?? 100;
|
|
149
151
|
this.resolver = options.resolver ?? resolver;
|
|
150
152
|
this.optional = options.optional ?? true;
|
|
151
153
|
this.watchEnabled = options.watch ?? true;
|
|
154
|
+
this.priority = options.priority ?? 10;
|
|
155
|
+
this.name = options.name ?? "file";
|
|
152
156
|
}
|
|
153
157
|
this.initSync();
|
|
154
158
|
}
|
|
@@ -1084,16 +1088,35 @@ class ConfigComponent extends BaseComponent {
|
|
|
1084
1088
|
console.log(`[ConfigComponent] Persisting ${entries.length} entries to ${this.persistFile}`);
|
|
1085
1089
|
}
|
|
1086
1090
|
registerSource(registration) {
|
|
1087
|
-
const { type, relativePath, envPrefix } = registration;
|
|
1088
|
-
|
|
1091
|
+
const { type, relativePath, envPrefix, cwd } = registration;
|
|
1092
|
+
let sourceKey;
|
|
1093
|
+
if (type === "file" && relativePath) {
|
|
1094
|
+
sourceKey = `file:${relativePath}`;
|
|
1095
|
+
} else if (type === "project") {
|
|
1096
|
+
const projectCwd = cwd ?? process.cwd();
|
|
1097
|
+
const projectPath = path2.join(projectCwd, ".roy", "config.jsonc");
|
|
1098
|
+
sourceKey = `project:${projectPath}`;
|
|
1099
|
+
} else {
|
|
1100
|
+
sourceKey = `${type}:${envPrefix ?? ""}`;
|
|
1101
|
+
}
|
|
1089
1102
|
if (this.sourceKeys.has(sourceKey)) {
|
|
1090
1103
|
return;
|
|
1091
1104
|
}
|
|
1092
1105
|
this.pendingSources.push(registration);
|
|
1093
1106
|
this.sourceKeys.set(sourceKey, true);
|
|
1094
1107
|
}
|
|
1108
|
+
registerProjectSource(options) {
|
|
1109
|
+
const cwd = options?.cwd ?? process.cwd();
|
|
1110
|
+
this.registerSource({
|
|
1111
|
+
type: "project",
|
|
1112
|
+
cwd,
|
|
1113
|
+
priority: options?.priority ?? 25,
|
|
1114
|
+
optional: true,
|
|
1115
|
+
watch: false
|
|
1116
|
+
});
|
|
1117
|
+
}
|
|
1095
1118
|
createSource(registration) {
|
|
1096
|
-
const { type, relativePath, envPrefix, priority, optional, watch: watch2 } = registration;
|
|
1119
|
+
const { type, relativePath, envPrefix, cwd, priority, optional, watch: watch2 } = registration;
|
|
1097
1120
|
switch (type) {
|
|
1098
1121
|
case "memory": {
|
|
1099
1122
|
return this.memorySource;
|
|
@@ -1116,7 +1139,20 @@ class ConfigComponent extends BaseComponent {
|
|
|
1116
1139
|
filePath,
|
|
1117
1140
|
optional: optional ?? false,
|
|
1118
1141
|
resolver: this.protocolResolver,
|
|
1119
|
-
watch: watch2
|
|
1142
|
+
watch: watch2,
|
|
1143
|
+
priority: priority ?? 10
|
|
1144
|
+
});
|
|
1145
|
+
}
|
|
1146
|
+
case "project": {
|
|
1147
|
+
const projectCwd = cwd ?? process.cwd();
|
|
1148
|
+
const filePath = path2.join(projectCwd, ".roy", "config.jsonc");
|
|
1149
|
+
return new FileSource({
|
|
1150
|
+
filePath,
|
|
1151
|
+
optional: true,
|
|
1152
|
+
resolver: this.protocolResolver,
|
|
1153
|
+
watch: watch2 ?? false,
|
|
1154
|
+
priority: priority ?? 25,
|
|
1155
|
+
name: "project"
|
|
1120
1156
|
});
|
|
1121
1157
|
}
|
|
1122
1158
|
case "env": {
|