@ai-setting/roy-agent-core 1.5.91 → 1.5.93
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/env/agent/index.js +4 -3
- package/dist/env/event-source/index.js +3 -3
- package/dist/env/index.js +12 -11
- package/dist/env/prompt/index.js +2 -2
- package/dist/env/task/delegate/index.js +2 -2
- package/dist/env/task/index.js +3 -3
- package/dist/env/task/plugins/index.js +2 -2
- package/dist/env/tool/built-in/index.js +11 -1
- package/dist/env/tool/index.js +14 -3
- package/dist/env/workflow/engine/index.js +2 -2
- package/dist/env/workflow/index.js +3 -3
- package/dist/index.js +29 -111
- package/dist/shared/@ai-setting/{roy-agent-core-spzb03na.js → roy-agent-core-09xaxtpf.js} +5 -2
- package/dist/shared/@ai-setting/{roy-agent-core-55br4t6v.js → roy-agent-core-27d4js2f.js} +34 -7
- package/dist/shared/@ai-setting/{roy-agent-core-9amq4epa.js → roy-agent-core-2pz9075g.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-w1s8yrm5.js → roy-agent-core-2vnw9wbx.js} +59 -18
- package/dist/shared/@ai-setting/roy-agent-core-5h49ct1a.js +135 -0
- package/dist/shared/@ai-setting/{roy-agent-core-5j649pb1.js → roy-agent-core-8f37pvct.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-snvsn60t.js → roy-agent-core-9z1mem2n.js} +44 -6
- package/dist/shared/@ai-setting/roy-agent-core-cy8azvpb.js +13 -0
- package/dist/shared/@ai-setting/{roy-agent-core-97tjdb2r.js → roy-agent-core-dj18eyyk.js} +29 -3
- package/dist/shared/@ai-setting/{roy-agent-core-q7ffkt1e.js → roy-agent-core-eqcbn89s.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-vady4w02.js → roy-agent-core-hfgqwf5w.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-jf865m5b.js → roy-agent-core-jhdv14ks.js} +11 -139
- package/dist/shared/@ai-setting/{roy-agent-core-7svhckhz.js → roy-agent-core-mwb6918x.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-svcr4gjw.js → roy-agent-core-mx9vq7b2.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-at05dk0z.js → roy-agent-core-ss92p0r6.js} +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-t7rw68q8.js +185 -0
- package/dist/shared/@ai-setting/{roy-agent-core-b1vkkcbr.js → roy-agent-core-x65fyjaw.js} +1 -1
- package/dist/utils/temp-file-manager/index.js +10 -0
- package/package.json +1 -1
- /package/dist/shared/@ai-setting/{roy-agent-core-pt7as39r.js → roy-agent-core-wjmwwc4a.js} +0 -0
package/dist/env/agent/index.js
CHANGED
|
@@ -2,12 +2,13 @@ import {
|
|
|
2
2
|
AgentComponent,
|
|
3
3
|
AgentComponentConfigSchema,
|
|
4
4
|
SummaryAgent
|
|
5
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
5
|
+
} from "../../shared/@ai-setting/roy-agent-core-27d4js2f.js";
|
|
6
6
|
import"../../shared/@ai-setting/roy-agent-core-j7jeqxhd.js";
|
|
7
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
7
|
+
import"../../shared/@ai-setting/roy-agent-core-jhdv14ks.js";
|
|
8
|
+
import"../../shared/@ai-setting/roy-agent-core-5h49ct1a.js";
|
|
8
9
|
import"../../shared/@ai-setting/roy-agent-core-bdajt9cs.js";
|
|
9
10
|
import"../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
10
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
11
|
+
import"../../shared/@ai-setting/roy-agent-core-hfgqwf5w.js";
|
|
11
12
|
import"../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
12
13
|
import"../../shared/@ai-setting/roy-agent-core-ctdhjv68.js";
|
|
13
14
|
import"../../shared/@ai-setting/roy-agent-core-yfhgxh5a.js";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
getBuiltInHandler,
|
|
9
9
|
larkCliHandler,
|
|
10
10
|
timerHandler
|
|
11
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
11
|
+
} from "../../shared/@ai-setting/roy-agent-core-8f37pvct.js";
|
|
12
12
|
import {
|
|
13
13
|
BUILT_IN_EVENT_SOURCE_TYPES,
|
|
14
14
|
BUILT_IN_EVENT_SOURCE_TYPE_LIST,
|
|
@@ -19,8 +19,8 @@ import {
|
|
|
19
19
|
validateEventSourceConfig
|
|
20
20
|
} from "../../shared/@ai-setting/roy-agent-core-ds5f75pg.js";
|
|
21
21
|
import"../../shared/@ai-setting/roy-agent-core-wmkx79b1.js";
|
|
22
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
23
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
22
|
+
import"../../shared/@ai-setting/roy-agent-core-mx9vq7b2.js";
|
|
23
|
+
import"../../shared/@ai-setting/roy-agent-core-dj18eyyk.js";
|
|
24
24
|
import"../../shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
25
25
|
import"../../shared/@ai-setting/roy-agent-core-8wd3qwx5.js";
|
|
26
26
|
import"../../shared/@ai-setting/roy-agent-core-4yq23m5g.js";
|
package/dist/env/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
EventSourceComponent,
|
|
6
6
|
builtInHandlers,
|
|
7
7
|
larkCliHandler
|
|
8
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
8
|
+
} from "../shared/@ai-setting/roy-agent-core-8f37pvct.js";
|
|
9
9
|
import {
|
|
10
10
|
EventSourceInitHooks,
|
|
11
11
|
getDefaultConfigForType,
|
|
@@ -17,16 +17,16 @@ import"../shared/@ai-setting/roy-agent-core-wmkx79b1.js";
|
|
|
17
17
|
import {
|
|
18
18
|
PluginComponent
|
|
19
19
|
} from "../shared/@ai-setting/roy-agent-core-ws76avbn.js";
|
|
20
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
21
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
20
|
+
import"../shared/@ai-setting/roy-agent-core-mx9vq7b2.js";
|
|
21
|
+
import"../shared/@ai-setting/roy-agent-core-dj18eyyk.js";
|
|
22
22
|
import"../shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
23
23
|
import {
|
|
24
24
|
WorkflowComponent
|
|
25
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
25
|
+
} from "../shared/@ai-setting/roy-agent-core-2pz9075g.js";
|
|
26
26
|
import"../shared/@ai-setting/roy-agent-core-xgnpr28w.js";
|
|
27
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
28
|
-
import"../shared/@ai-setting/roy-agent-core-w1s8yrm5.js";
|
|
27
|
+
import"../shared/@ai-setting/roy-agent-core-9z1mem2n.js";
|
|
29
28
|
import"../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
29
|
+
import"../shared/@ai-setting/roy-agent-core-2vnw9wbx.js";
|
|
30
30
|
import"../shared/@ai-setting/roy-agent-core-q88vxmx5.js";
|
|
31
31
|
import"../shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
32
32
|
import"../shared/@ai-setting/roy-agent-core-hhrg314p.js";
|
|
@@ -42,19 +42,20 @@ import"../shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
|
42
42
|
import {
|
|
43
43
|
AgentComponent,
|
|
44
44
|
AgentComponentConfigSchema
|
|
45
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
45
|
+
} from "../shared/@ai-setting/roy-agent-core-27d4js2f.js";
|
|
46
46
|
import"../shared/@ai-setting/roy-agent-core-j7jeqxhd.js";
|
|
47
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
47
|
+
import"../shared/@ai-setting/roy-agent-core-jhdv14ks.js";
|
|
48
|
+
import"../shared/@ai-setting/roy-agent-core-5h49ct1a.js";
|
|
48
49
|
import"../shared/@ai-setting/roy-agent-core-bdajt9cs.js";
|
|
49
50
|
import"../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
50
51
|
import {
|
|
51
52
|
TaskComponent
|
|
52
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
53
|
+
} from "../shared/@ai-setting/roy-agent-core-x65fyjaw.js";
|
|
53
54
|
import"../shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
54
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
55
|
+
import"../shared/@ai-setting/roy-agent-core-ss92p0r6.js";
|
|
55
56
|
import"../shared/@ai-setting/roy-agent-core-hvdfgvfz.js";
|
|
56
57
|
import"../shared/@ai-setting/roy-agent-core-9xby523m.js";
|
|
57
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
58
|
+
import"../shared/@ai-setting/roy-agent-core-hfgqwf5w.js";
|
|
58
59
|
import {
|
|
59
60
|
XDG_PATHS,
|
|
60
61
|
getXDGPath,
|
package/dist/env/prompt/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
PromptConfigSchema,
|
|
4
4
|
PromptPathSchema,
|
|
5
5
|
PromptRenderer
|
|
6
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
7
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
6
|
+
} from "../../shared/@ai-setting/roy-agent-core-mwb6918x.js";
|
|
7
|
+
import"../../shared/@ai-setting/roy-agent-core-dj18eyyk.js";
|
|
8
8
|
import"../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
9
9
|
import"../../shared/@ai-setting/roy-agent-core-qxhq8ven.js";
|
|
10
10
|
import"../../shared/@ai-setting/roy-agent-core-pf1c360e.js";
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
BackgroundTaskManager,
|
|
4
4
|
createDelegateTool,
|
|
5
5
|
createStopTool
|
|
6
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
6
|
+
} from "../../../shared/@ai-setting/roy-agent-core-ss92p0r6.js";
|
|
7
7
|
import"../../../shared/@ai-setting/roy-agent-core-hvdfgvfz.js";
|
|
8
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
8
|
+
import"../../../shared/@ai-setting/roy-agent-core-hfgqwf5w.js";
|
|
9
9
|
import"../../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
10
10
|
import"../../../shared/@ai-setting/roy-agent-core-92z6t4he.js";
|
|
11
11
|
import"../../../shared/@ai-setting/roy-agent-core-gp872e7m.js";
|
package/dist/env/task/index.js
CHANGED
|
@@ -5,17 +5,17 @@ import {
|
|
|
5
5
|
TaskPriorityEnum,
|
|
6
6
|
TaskStatusEnum,
|
|
7
7
|
TaskTypeEnum
|
|
8
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
8
|
+
} from "../../shared/@ai-setting/roy-agent-core-x65fyjaw.js";
|
|
9
9
|
import {
|
|
10
10
|
TaskEntityEventTypes
|
|
11
11
|
} from "../../shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
12
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
12
|
+
import"../../shared/@ai-setting/roy-agent-core-ss92p0r6.js";
|
|
13
13
|
import"../../shared/@ai-setting/roy-agent-core-hvdfgvfz.js";
|
|
14
14
|
import {
|
|
15
15
|
SQLiteTaskStore,
|
|
16
16
|
getDefaultTaskDbPath
|
|
17
17
|
} from "../../shared/@ai-setting/roy-agent-core-9xby523m.js";
|
|
18
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
18
|
+
import"../../shared/@ai-setting/roy-agent-core-hfgqwf5w.js";
|
|
19
19
|
import"../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
20
20
|
import"../../shared/@ai-setting/roy-agent-core-0ye4q2jj.js";
|
|
21
21
|
import"../../shared/@ai-setting/roy-agent-core-t94ktchq.js";
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
formatExtractorInput,
|
|
8
8
|
formatExtractorInputFromDescription,
|
|
9
9
|
parseExtractorOutput
|
|
10
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
11
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
10
|
+
} from "../../../shared/@ai-setting/roy-agent-core-mx9vq7b2.js";
|
|
11
|
+
import"../../../shared/@ai-setting/roy-agent-core-dj18eyyk.js";
|
|
12
12
|
import"../../../shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
13
13
|
import"../../../shared/@ai-setting/roy-agent-core-8wd3qwx5.js";
|
|
14
14
|
import"../../../shared/@ai-setting/roy-agent-core-4yq23m5g.js";
|
|
@@ -8,7 +8,13 @@ import {
|
|
|
8
8
|
grepTool,
|
|
9
9
|
readFileTool,
|
|
10
10
|
writeFileTool
|
|
11
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
11
|
+
} from "../../../shared/@ai-setting/roy-agent-core-09xaxtpf.js";
|
|
12
|
+
import {
|
|
13
|
+
getUnderstandImageLLMProvider,
|
|
14
|
+
resetUnderstandImageLLMProvider,
|
|
15
|
+
setUnderstandImageLLMProvider,
|
|
16
|
+
understandImageTool
|
|
17
|
+
} from "../../../shared/@ai-setting/roy-agent-core-t7rw68q8.js";
|
|
12
18
|
import"../../../shared/@ai-setting/roy-agent-core-hvdfgvfz.js";
|
|
13
19
|
import"../../../shared/@ai-setting/roy-agent-core-cg146hmg.js";
|
|
14
20
|
import"../../../shared/@ai-setting/roy-agent-core-vyygk314.js";
|
|
@@ -17,9 +23,13 @@ import"../../../shared/@ai-setting/roy-agent-core-c6592r3c.js";
|
|
|
17
23
|
import"../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
18
24
|
export {
|
|
19
25
|
writeFileTool,
|
|
26
|
+
understandImageTool,
|
|
27
|
+
setUnderstandImageLLMProvider,
|
|
28
|
+
resetUnderstandImageLLMProvider,
|
|
20
29
|
readFileTool,
|
|
21
30
|
grepTool,
|
|
22
31
|
globTool,
|
|
32
|
+
getUnderstandImageLLMProvider,
|
|
23
33
|
getBuiltInTool,
|
|
24
34
|
getAllBuiltInTools,
|
|
25
35
|
editFileTool,
|
package/dist/env/tool/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
1
|
+
import"../../shared/@ai-setting/roy-agent-core-wjmwwc4a.js";
|
|
2
2
|
import {
|
|
3
3
|
bashTool,
|
|
4
4
|
echoTool,
|
|
@@ -9,14 +9,21 @@ import {
|
|
|
9
9
|
grepTool,
|
|
10
10
|
readFileTool,
|
|
11
11
|
writeFileTool
|
|
12
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
12
|
+
} from "../../shared/@ai-setting/roy-agent-core-09xaxtpf.js";
|
|
13
|
+
import {
|
|
14
|
+
getUnderstandImageLLMProvider,
|
|
15
|
+
resetUnderstandImageLLMProvider,
|
|
16
|
+
setUnderstandImageLLMProvider,
|
|
17
|
+
understandImageTool
|
|
18
|
+
} from "../../shared/@ai-setting/roy-agent-core-t7rw68q8.js";
|
|
13
19
|
import {
|
|
14
20
|
ToolComponent,
|
|
15
21
|
ToolRegistry,
|
|
16
22
|
ToolValidator,
|
|
17
23
|
getMaxOutputSize,
|
|
18
24
|
setToolConfigComponent
|
|
19
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
25
|
+
} from "../../shared/@ai-setting/roy-agent-core-jhdv14ks.js";
|
|
26
|
+
import"../../shared/@ai-setting/roy-agent-core-5h49ct1a.js";
|
|
20
27
|
import"../../shared/@ai-setting/roy-agent-core-bdajt9cs.js";
|
|
21
28
|
import"../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
22
29
|
import"../../shared/@ai-setting/roy-agent-core-hvdfgvfz.js";
|
|
@@ -33,10 +40,14 @@ import"../../shared/@ai-setting/roy-agent-core-c6592r3c.js";
|
|
|
33
40
|
import"../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
34
41
|
export {
|
|
35
42
|
writeFileTool,
|
|
43
|
+
understandImageTool,
|
|
44
|
+
setUnderstandImageLLMProvider,
|
|
36
45
|
setToolConfigComponent,
|
|
46
|
+
resetUnderstandImageLLMProvider,
|
|
37
47
|
readFileTool,
|
|
38
48
|
grepTool,
|
|
39
49
|
globTool,
|
|
50
|
+
getUnderstandImageLLMProvider,
|
|
40
51
|
getMaxOutputSize,
|
|
41
52
|
getBuiltInTool,
|
|
42
53
|
getAllBuiltInTools,
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
Scheduler,
|
|
6
6
|
WorkflowEngine,
|
|
7
7
|
init_engine
|
|
8
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
9
|
-
import"../../../shared/@ai-setting/roy-agent-core-w1s8yrm5.js";
|
|
8
|
+
} from "../../../shared/@ai-setting/roy-agent-core-9z1mem2n.js";
|
|
10
9
|
import"../../../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
10
|
+
import"../../../shared/@ai-setting/roy-agent-core-2vnw9wbx.js";
|
|
11
11
|
import"../../../shared/@ai-setting/roy-agent-core-q88vxmx5.js";
|
|
12
12
|
import"../../../shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
13
13
|
import"../../../shared/@ai-setting/roy-agent-core-g2mth323.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WorkflowComponent
|
|
3
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
3
|
+
} from "../../shared/@ai-setting/roy-agent-core-2pz9075g.js";
|
|
4
4
|
import"../../shared/@ai-setting/roy-agent-core-xgnpr28w.js";
|
|
5
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
6
|
-
import"../../shared/@ai-setting/roy-agent-core-w1s8yrm5.js";
|
|
5
|
+
import"../../shared/@ai-setting/roy-agent-core-9z1mem2n.js";
|
|
7
6
|
import"../../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
7
|
+
import"../../shared/@ai-setting/roy-agent-core-2vnw9wbx.js";
|
|
8
8
|
import"../../shared/@ai-setting/roy-agent-core-q88vxmx5.js";
|
|
9
9
|
import"../../shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
10
10
|
import"../../shared/@ai-setting/roy-agent-core-hhrg314p.js";
|
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-mwb6918x.js";
|
|
5
5
|
import {
|
|
6
6
|
LLMComponent,
|
|
7
7
|
LLMConfigSchema,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
CommandsComponent
|
|
18
18
|
} from "./shared/@ai-setting/roy-agent-core-578qk38y.js";
|
|
19
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
19
|
+
import"./shared/@ai-setting/roy-agent-core-wjmwwc4a.js";
|
|
20
20
|
import {
|
|
21
21
|
bashTool,
|
|
22
22
|
editFileTool,
|
|
@@ -26,7 +26,17 @@ 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-09xaxtpf.js";
|
|
30
|
+
import {
|
|
31
|
+
ATTACH_FILE_MAX_BYTES,
|
|
32
|
+
getUnderstandImageLLMProvider,
|
|
33
|
+
isMediaType,
|
|
34
|
+
parseImageInput,
|
|
35
|
+
resetUnderstandImageLLMProvider,
|
|
36
|
+
setUnderstandImageLLMProvider,
|
|
37
|
+
sniffMimeType,
|
|
38
|
+
understandImageTool
|
|
39
|
+
} from "./shared/@ai-setting/roy-agent-core-t7rw68q8.js";
|
|
30
40
|
import {
|
|
31
41
|
closeDatabase
|
|
32
42
|
} from "./shared/@ai-setting/roy-agent-core-jexyz11d.js";
|
|
@@ -62,7 +72,7 @@ import {
|
|
|
62
72
|
getBuiltInHandler,
|
|
63
73
|
larkCliHandler,
|
|
64
74
|
timerHandler
|
|
65
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
75
|
+
} from "./shared/@ai-setting/roy-agent-core-8f37pvct.js";
|
|
66
76
|
import {
|
|
67
77
|
BUILT_IN_EVENT_SOURCE_TYPES,
|
|
68
78
|
BUILT_IN_EVENT_SOURCE_TYPE_LIST,
|
|
@@ -81,24 +91,24 @@ import {
|
|
|
81
91
|
} from "./shared/@ai-setting/roy-agent-core-ws76avbn.js";
|
|
82
92
|
import {
|
|
83
93
|
TaskTagPlugin
|
|
84
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
94
|
+
} from "./shared/@ai-setting/roy-agent-core-mx9vq7b2.js";
|
|
85
95
|
import {
|
|
86
96
|
getBuiltInPrompt,
|
|
87
97
|
getBuiltInPromptNames
|
|
88
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
98
|
+
} from "./shared/@ai-setting/roy-agent-core-dj18eyyk.js";
|
|
89
99
|
import {
|
|
90
100
|
BasePlugin
|
|
91
101
|
} from "./shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
92
102
|
import {
|
|
93
103
|
WorkflowComponent
|
|
94
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
104
|
+
} from "./shared/@ai-setting/roy-agent-core-2pz9075g.js";
|
|
95
105
|
import {
|
|
96
106
|
init_node_registry_helper,
|
|
97
107
|
registerDecoratorNodeType
|
|
98
108
|
} from "./shared/@ai-setting/roy-agent-core-xgnpr28w.js";
|
|
99
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
100
|
-
import"./shared/@ai-setting/roy-agent-core-w1s8yrm5.js";
|
|
109
|
+
import"./shared/@ai-setting/roy-agent-core-9z1mem2n.js";
|
|
101
110
|
import"./shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
111
|
+
import"./shared/@ai-setting/roy-agent-core-2vnw9wbx.js";
|
|
102
112
|
import"./shared/@ai-setting/roy-agent-core-q88vxmx5.js";
|
|
103
113
|
import"./shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
104
114
|
import"./shared/@ai-setting/roy-agent-core-hhrg314p.js";
|
|
@@ -120,7 +130,7 @@ import"./shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
|
120
130
|
import {
|
|
121
131
|
AgentComponent,
|
|
122
132
|
AgentComponentConfigSchema
|
|
123
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
133
|
+
} from "./shared/@ai-setting/roy-agent-core-27d4js2f.js";
|
|
124
134
|
import {
|
|
125
135
|
createInvokeConfig,
|
|
126
136
|
invoke,
|
|
@@ -131,7 +141,8 @@ import {
|
|
|
131
141
|
ToolComponent,
|
|
132
142
|
ToolRegistry,
|
|
133
143
|
ToolValidator
|
|
134
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
144
|
+
} from "./shared/@ai-setting/roy-agent-core-jhdv14ks.js";
|
|
145
|
+
import"./shared/@ai-setting/roy-agent-core-5h49ct1a.js";
|
|
135
146
|
import {
|
|
136
147
|
createAutoTaskPlugin
|
|
137
148
|
} from "./shared/@ai-setting/roy-agent-core-bdajt9cs.js";
|
|
@@ -141,9 +152,9 @@ import {
|
|
|
141
152
|
} from "./shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
142
153
|
import {
|
|
143
154
|
TaskComponent
|
|
144
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
155
|
+
} from "./shared/@ai-setting/roy-agent-core-x65fyjaw.js";
|
|
145
156
|
import"./shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
146
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
157
|
+
import"./shared/@ai-setting/roy-agent-core-ss92p0r6.js";
|
|
147
158
|
import"./shared/@ai-setting/roy-agent-core-hvdfgvfz.js";
|
|
148
159
|
import {
|
|
149
160
|
SQLiteTaskStore,
|
|
@@ -151,7 +162,7 @@ import {
|
|
|
151
162
|
} from "./shared/@ai-setting/roy-agent-core-9xby523m.js";
|
|
152
163
|
import {
|
|
153
164
|
AgentRegistry
|
|
154
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
165
|
+
} from "./shared/@ai-setting/roy-agent-core-hfgqwf5w.js";
|
|
155
166
|
import {
|
|
156
167
|
XDG_PATHS,
|
|
157
168
|
getXDGPath,
|
|
@@ -233,103 +244,6 @@ import {
|
|
|
233
244
|
SQLiteSpanStorage
|
|
234
245
|
} from "./shared/@ai-setting/roy-agent-core-c6592r3c.js";
|
|
235
246
|
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
|
-
}
|
|
333
247
|
// src/env/memory/tools/memory-agent-tools.ts
|
|
334
248
|
import { z } from "zod";
|
|
335
249
|
var SearchSessionsSchema = z.object({
|
|
@@ -454,11 +368,14 @@ export {
|
|
|
454
368
|
writeFileTool,
|
|
455
369
|
wrapFunction,
|
|
456
370
|
validateEventSourceConfig,
|
|
371
|
+
understandImageTool,
|
|
457
372
|
timerHandler,
|
|
458
373
|
sniffMimeType,
|
|
374
|
+
setUnderstandImageLLMProvider,
|
|
459
375
|
setQuietMode,
|
|
460
376
|
setConfigComponent as setLoggerConfigComponent,
|
|
461
377
|
setLogDirOverride,
|
|
378
|
+
resetUnderstandImageLLMProvider,
|
|
462
379
|
resetTracerProvider,
|
|
463
380
|
registerDecoratorNodeType,
|
|
464
381
|
readFileTool,
|
|
@@ -478,6 +395,7 @@ export {
|
|
|
478
395
|
globTool,
|
|
479
396
|
getXDGPaths,
|
|
480
397
|
getXDGPath,
|
|
398
|
+
getUnderstandImageLLMProvider,
|
|
481
399
|
getTracerProvider,
|
|
482
400
|
getLogLevels,
|
|
483
401
|
getLogLevel,
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
understandImageTool
|
|
3
|
+
} from "./roy-agent-core-t7rw68q8.js";
|
|
1
4
|
import {
|
|
2
5
|
getCurrentProcessRegistry,
|
|
3
6
|
killProcessTree
|
|
@@ -907,7 +910,6 @@ var grepTool = {
|
|
|
907
910
|
}
|
|
908
911
|
}
|
|
909
912
|
};
|
|
910
|
-
|
|
911
913
|
// src/env/tool/built-in/index.ts
|
|
912
914
|
function getAllBuiltInTools() {
|
|
913
915
|
return [
|
|
@@ -917,7 +919,8 @@ function getAllBuiltInTools() {
|
|
|
917
919
|
readFileTool,
|
|
918
920
|
writeFileTool,
|
|
919
921
|
editFileTool,
|
|
920
|
-
grepTool
|
|
922
|
+
grepTool,
|
|
923
|
+
understandImageTool
|
|
921
924
|
];
|
|
922
925
|
}
|
|
923
926
|
function getBuiltInTool(name) {
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "./roy-agent-core-j7jeqxhd.js";
|
|
4
4
|
import {
|
|
5
5
|
truncateOutputInline
|
|
6
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-jhdv14ks.js";
|
|
7
7
|
import {
|
|
8
8
|
AskUserError,
|
|
9
9
|
init_workflow_hil
|
|
10
10
|
} from "./roy-agent-core-e25xkv53.js";
|
|
11
11
|
import {
|
|
12
12
|
AgentRegistry
|
|
13
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-hfgqwf5w.js";
|
|
14
14
|
import {
|
|
15
15
|
ContextError
|
|
16
16
|
} from "./roy-agent-core-ctdhjv68.js";
|
|
@@ -47,7 +47,8 @@ import {
|
|
|
47
47
|
init_logger
|
|
48
48
|
} from "./roy-agent-core-vyygk314.js";
|
|
49
49
|
import {
|
|
50
|
-
__legacyDecorateClassTS
|
|
50
|
+
__legacyDecorateClassTS,
|
|
51
|
+
__require
|
|
51
52
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
52
53
|
|
|
53
54
|
// src/env/agent/agent-component.ts
|
|
@@ -416,12 +417,32 @@ class AgentComponent extends BaseComponent {
|
|
|
416
417
|
this.setStatus("stopped");
|
|
417
418
|
logger.info("[AgentComponent] Cleanup completed");
|
|
418
419
|
}
|
|
419
|
-
refreshDependencies() {
|
|
420
|
+
async refreshDependencies() {
|
|
420
421
|
if (this.env) {
|
|
421
422
|
const llm = this.env.getComponent("llm");
|
|
422
423
|
const tool = this.env.getComponent("tool");
|
|
423
424
|
this.llmComponent = llm ? llm : null;
|
|
424
425
|
this.toolComponent = tool ? tool : null;
|
|
426
|
+
if (this.llmComponent) {
|
|
427
|
+
try {
|
|
428
|
+
const mod = await import("./roy-agent-core-cy8azvpb.js");
|
|
429
|
+
mod.setUnderstandImageLLMProvider(async (messages) => {
|
|
430
|
+
const result = await this.llmComponent.invoke({
|
|
431
|
+
messages,
|
|
432
|
+
tools: [],
|
|
433
|
+
skipThresholdCheck: true,
|
|
434
|
+
context: {
|
|
435
|
+
sessionId: undefined,
|
|
436
|
+
messageId: `understand_image-${Date.now()}`
|
|
437
|
+
}
|
|
438
|
+
});
|
|
439
|
+
return result.output?.content ?? "";
|
|
440
|
+
});
|
|
441
|
+
logger.debug("[refreshDependencies] understand_image LLM provider injected");
|
|
442
|
+
} catch (err) {
|
|
443
|
+
logger.warn(`[refreshDependencies] failed to inject understand_image provider: ${err.message}`);
|
|
444
|
+
}
|
|
445
|
+
}
|
|
425
446
|
logger.debug("[refreshDependencies] AgentComponent refreshed", {
|
|
426
447
|
hasLLM: !!this.llmComponent,
|
|
427
448
|
hasTool: !!this.toolComponent
|
|
@@ -574,7 +595,7 @@ class AgentComponent extends BaseComponent {
|
|
|
574
595
|
this.notifyMessageAdded(message);
|
|
575
596
|
}
|
|
576
597
|
async _run(agentName, query, context) {
|
|
577
|
-
this.refreshDependencies();
|
|
598
|
+
await this.refreshDependencies();
|
|
578
599
|
const agent = this.getAgent(agentName);
|
|
579
600
|
if (!agent) {
|
|
580
601
|
throw new Error(`Agent not found: ${agentName}`);
|
|
@@ -633,7 +654,10 @@ class AgentComponent extends BaseComponent {
|
|
|
633
654
|
context: effectiveContext
|
|
634
655
|
};
|
|
635
656
|
let historyMessageCount = 0;
|
|
636
|
-
if (effectiveContext.
|
|
657
|
+
if (effectiveContext.messages && effectiveContext.messages.length > 0) {
|
|
658
|
+
hookCtx.messages = effectiveContext.messages;
|
|
659
|
+
historyMessageCount = hookCtx.messages.length;
|
|
660
|
+
} else if (effectiveContext.sessionId) {
|
|
637
661
|
try {
|
|
638
662
|
const sessionComponent = this.env.getComponent("session");
|
|
639
663
|
if (sessionComponent) {
|
|
@@ -1105,7 +1129,10 @@ ${additionInfo}`
|
|
|
1105
1129
|
messageId: ctx.context.messageId
|
|
1106
1130
|
},
|
|
1107
1131
|
abortSignal: ctx.context.abort,
|
|
1108
|
-
skipThresholdCheck: ctx.context.agentType === "sub"
|
|
1132
|
+
skipThresholdCheck: ctx.context.agentType === "sub",
|
|
1133
|
+
abortSignal: ctx.context.abort,
|
|
1134
|
+
skipThresholdCheck: ctx.context.agentType === "sub",
|
|
1135
|
+
...ctx.context.toolChoice ? { toolChoice: ctx.context.toolChoice } : {}
|
|
1109
1136
|
});
|
|
1110
1137
|
const result = await withTimeout(llmPromise, 300000, "LLM invocation timeout after 300s");
|
|
1111
1138
|
logger.debug("[invokeLLM] LLMComponent.invoke returned successfully");
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
WorkflowEngine,
|
|
7
7
|
exports_engine,
|
|
8
8
|
init_engine
|
|
9
|
-
} from "./roy-agent-core-
|
|
9
|
+
} from "./roy-agent-core-9z1mem2n.js";
|
|
10
10
|
import {
|
|
11
11
|
askUserTool,
|
|
12
12
|
createRunWorkflowTool,
|
|
@@ -141,7 +141,7 @@ class WorkflowComponent extends BaseComponent {
|
|
|
141
141
|
if (!agentRunner && this._workflowEnv) {
|
|
142
142
|
const agentComponent = this._workflowEnv.getComponent("agent");
|
|
143
143
|
if (agentComponent) {
|
|
144
|
-
const { AgentComponentAdapter } = await import("./roy-agent-core-
|
|
144
|
+
const { AgentComponentAdapter } = await import("./roy-agent-core-eqcbn89s.js");
|
|
145
145
|
agentRunner = new AgentComponentAdapter(agentComponent, {}, this.sessionComponent);
|
|
146
146
|
}
|
|
147
147
|
}
|