@ai-setting/roy-agent-core 1.7.38 → 1.7.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/index.js +6 -6
- package/dist/env/agent/index.js +7 -7
- package/dist/env/commands/index.js +6 -6
- package/dist/env/context/index.js +6 -2
- package/dist/env/debug/index.js +6 -6
- package/dist/env/event-source/index.js +8 -8
- package/dist/env/hook/index.js +4 -4
- package/dist/env/index.js +22 -22
- package/dist/env/llm/index.js +6 -6
- package/dist/env/log-trace/index.js +6 -6
- package/dist/env/mcp/index.js +6 -6
- package/dist/env/memory/index.js +6 -6
- package/dist/env/plugin/index.js +6 -6
- package/dist/env/prompt/index.js +6 -6
- package/dist/env/session/index.js +6 -6
- package/dist/env/skill/index.js +6 -6
- package/dist/env/task/delegate/index.js +4 -4
- package/dist/env/task/index.js +9 -9
- package/dist/env/task/plugins/index.js +3 -3
- package/dist/env/task/storage/index.js +1 -1
- package/dist/env/task/tools/index.js +2 -2
- package/dist/env/tool/index.js +6 -6
- package/dist/env/workflow/engine/index.js +5 -5
- package/dist/env/workflow/index.js +10 -10
- package/dist/env/workflow/tools/index.js +7 -7
- package/dist/index.js +29 -29
- package/dist/shared/@ai-setting/{roy-agent-core-83j0v0hs.js → roy-agent-core-34je386q.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-p0c98phj.js → roy-agent-core-3h7ajma5.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-e5pnnzdm.js → roy-agent-core-47wrv4ex.js} +89 -27
- package/dist/shared/@ai-setting/{roy-agent-core-mzyzdf33.js → roy-agent-core-4cqcdk7k.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-vh10qamt.js → roy-agent-core-5exnp10h.js} +8 -5
- package/dist/shared/@ai-setting/{roy-agent-core-nz4n1w28.js → roy-agent-core-6mnwqcqf.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-vn6f4nxv.js → roy-agent-core-6vwf03cz.js} +9 -6
- package/dist/shared/@ai-setting/{roy-agent-core-970btnjh.js → roy-agent-core-754b0078.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-yv4anf1c.js → roy-agent-core-9t675te0.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-yjyvwxs4.js → roy-agent-core-a236mps6.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-gh6szaj5.js → roy-agent-core-asxe1nt4.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-gpf33hn9.js → roy-agent-core-cazvr63z.js} +60 -38
- package/dist/shared/@ai-setting/{roy-agent-core-y7atw1kw.js → roy-agent-core-cw89yj9d.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-9wsy4yfv.js → roy-agent-core-cysnmvcy.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-5gpf5j51.js → roy-agent-core-f18jk3cw.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-wb1b61f8.js → roy-agent-core-jadrj0bz.js} +7 -0
- package/dist/shared/@ai-setting/{roy-agent-core-p2ham63a.js → roy-agent-core-jawzpf5k.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-e02f0ywc.js → roy-agent-core-jg8cv1f7.js} +85 -31
- package/dist/shared/@ai-setting/{roy-agent-core-wfpzny0h.js → roy-agent-core-jjw7xcxv.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-dfnyvxr9.js → roy-agent-core-krppch0s.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-cd9h49ng.js → roy-agent-core-m3ffkexb.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-rhfywyz1.js → roy-agent-core-n1ceexfz.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-e8rxb9a6.js → roy-agent-core-pc8x07p0.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-wacnvjaq.js → roy-agent-core-qfktfbrr.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-q3vbxprp.js → roy-agent-core-rczz7e81.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-ym1hwrcm.js → roy-agent-core-s44egzrh.js} +34 -3
- package/dist/shared/@ai-setting/{roy-agent-core-hfmpmt0k.js → roy-agent-core-vsrfzaze.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-ff2ssff5.js → roy-agent-core-wn59p0zw.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-3m7j2wcb.js → roy-agent-core-wybj8emq.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-z4486eek.js → roy-agent-core-zbb3sk72.js} +16 -2
- package/package.json +1 -1
package/dist/env/tool/index.js
CHANGED
|
@@ -25,15 +25,15 @@ import {
|
|
|
25
25
|
ToolValidator,
|
|
26
26
|
getMaxOutputSize,
|
|
27
27
|
setToolConfigComponent
|
|
28
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
28
|
+
} from "../../shared/@ai-setting/roy-agent-core-jjw7xcxv.js";
|
|
29
29
|
import"../../shared/@ai-setting/roy-agent-core-kzg1jwt8.js";
|
|
30
30
|
import"../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
31
31
|
import"../../shared/@ai-setting/roy-agent-core-7hh0brvs.js";
|
|
32
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
33
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
34
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
35
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
36
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
32
|
+
import"../../shared/@ai-setting/roy-agent-core-9t675te0.js";
|
|
33
|
+
import"../../shared/@ai-setting/roy-agent-core-cw89yj9d.js";
|
|
34
|
+
import"../../shared/@ai-setting/roy-agent-core-a236mps6.js";
|
|
35
|
+
import"../../shared/@ai-setting/roy-agent-core-wn59p0zw.js";
|
|
36
|
+
import"../../shared/@ai-setting/roy-agent-core-zbb3sk72.js";
|
|
37
37
|
import"../../shared/@ai-setting/roy-agent-core-a9pbda78.js";
|
|
38
38
|
import"../../shared/@ai-setting/roy-agent-core-8seq65bp.js";
|
|
39
39
|
import"../../shared/@ai-setting/roy-agent-core-jnszp0jq.js";
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
Scheduler,
|
|
6
6
|
WorkflowEngine,
|
|
7
7
|
init_engine
|
|
8
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
8
|
+
} from "../../../shared/@ai-setting/roy-agent-core-rczz7e81.js";
|
|
9
9
|
import"../../../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
10
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
10
|
+
import"../../../shared/@ai-setting/roy-agent-core-3h7ajma5.js";
|
|
11
11
|
import"../../../shared/@ai-setting/roy-agent-core-yjjqm4ww.js";
|
|
12
12
|
import"../../../shared/@ai-setting/roy-agent-core-1db4vpc6.js";
|
|
13
13
|
import"../../../shared/@ai-setting/roy-agent-core-333apxaa.js";
|
|
@@ -17,9 +17,9 @@ import {
|
|
|
17
17
|
} from "../../../shared/@ai-setting/roy-agent-core-tm57tmds.js";
|
|
18
18
|
import"../../../shared/@ai-setting/roy-agent-core-jrj30vq3.js";
|
|
19
19
|
import"../../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
20
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
21
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
22
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
20
|
+
import"../../../shared/@ai-setting/roy-agent-core-a236mps6.js";
|
|
21
|
+
import"../../../shared/@ai-setting/roy-agent-core-wn59p0zw.js";
|
|
22
|
+
import"../../../shared/@ai-setting/roy-agent-core-zbb3sk72.js";
|
|
23
23
|
import"../../../shared/@ai-setting/roy-agent-core-a9pbda78.js";
|
|
24
24
|
import"../../../shared/@ai-setting/roy-agent-core-8seq65bp.js";
|
|
25
25
|
import"../../../shared/@ai-setting/roy-agent-core-jnszp0jq.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WorkflowComponent
|
|
3
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
3
|
+
} from "../../shared/@ai-setting/roy-agent-core-m3ffkexb.js";
|
|
4
4
|
import"../../shared/@ai-setting/roy-agent-core-hkj5v9xq.js";
|
|
5
5
|
import {
|
|
6
6
|
Edge,
|
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
DecoratorNode,
|
|
15
15
|
init_decorator_node
|
|
16
16
|
} from "../../shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
17
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
18
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
17
|
+
import"../../shared/@ai-setting/roy-agent-core-34je386q.js";
|
|
18
|
+
import"../../shared/@ai-setting/roy-agent-core-s44egzrh.js";
|
|
19
19
|
import"../../shared/@ai-setting/roy-agent-core-bdhcwf4x.js";
|
|
20
20
|
import"../../shared/@ai-setting/roy-agent-core-hhrg314p.js";
|
|
21
21
|
import"../../shared/@ai-setting/roy-agent-core-8nv07zgr.js";
|
|
22
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
22
|
+
import"../../shared/@ai-setting/roy-agent-core-rczz7e81.js";
|
|
23
23
|
import"../../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
24
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
24
|
+
import"../../shared/@ai-setting/roy-agent-core-3h7ajma5.js";
|
|
25
25
|
import"../../shared/@ai-setting/roy-agent-core-yjjqm4ww.js";
|
|
26
26
|
import"../../shared/@ai-setting/roy-agent-core-1db4vpc6.js";
|
|
27
27
|
import"../../shared/@ai-setting/roy-agent-core-7exqwax1.js";
|
|
@@ -91,11 +91,11 @@ import {
|
|
|
91
91
|
createWorkflowAskUserEvent
|
|
92
92
|
} from "../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
93
93
|
import"../../shared/@ai-setting/roy-agent-core-7hh0brvs.js";
|
|
94
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
95
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
96
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
97
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
98
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
94
|
+
import"../../shared/@ai-setting/roy-agent-core-9t675te0.js";
|
|
95
|
+
import"../../shared/@ai-setting/roy-agent-core-cw89yj9d.js";
|
|
96
|
+
import"../../shared/@ai-setting/roy-agent-core-a236mps6.js";
|
|
97
|
+
import"../../shared/@ai-setting/roy-agent-core-wn59p0zw.js";
|
|
98
|
+
import"../../shared/@ai-setting/roy-agent-core-zbb3sk72.js";
|
|
99
99
|
import"../../shared/@ai-setting/roy-agent-core-a9pbda78.js";
|
|
100
100
|
import"../../shared/@ai-setting/roy-agent-core-8seq65bp.js";
|
|
101
101
|
import"../../shared/@ai-setting/roy-agent-core-jnszp0jq.js";
|
|
@@ -24,8 +24,8 @@ import {
|
|
|
24
24
|
getRunWorkflowTool,
|
|
25
25
|
initRunWorkflowTool,
|
|
26
26
|
resetRunWorkflowTool
|
|
27
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
28
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
27
|
+
} from "../../../shared/@ai-setting/roy-agent-core-34je386q.js";
|
|
28
|
+
import"../../../shared/@ai-setting/roy-agent-core-s44egzrh.js";
|
|
29
29
|
import"../../../shared/@ai-setting/roy-agent-core-bdhcwf4x.js";
|
|
30
30
|
import"../../../shared/@ai-setting/roy-agent-core-8nv07zgr.js";
|
|
31
31
|
import {
|
|
@@ -45,11 +45,11 @@ import"../../../shared/@ai-setting/roy-agent-core-gzj1x5m7.js";
|
|
|
45
45
|
import"../../../shared/@ai-setting/roy-agent-core-c1v263jn.js";
|
|
46
46
|
import"../../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
47
47
|
import"../../../shared/@ai-setting/roy-agent-core-7hh0brvs.js";
|
|
48
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
49
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
50
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
51
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
52
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
48
|
+
import"../../../shared/@ai-setting/roy-agent-core-9t675te0.js";
|
|
49
|
+
import"../../../shared/@ai-setting/roy-agent-core-cw89yj9d.js";
|
|
50
|
+
import"../../../shared/@ai-setting/roy-agent-core-a236mps6.js";
|
|
51
|
+
import"../../../shared/@ai-setting/roy-agent-core-wn59p0zw.js";
|
|
52
|
+
import"../../../shared/@ai-setting/roy-agent-core-zbb3sk72.js";
|
|
53
53
|
import"../../../shared/@ai-setting/roy-agent-core-a9pbda78.js";
|
|
54
54
|
import"../../../shared/@ai-setting/roy-agent-core-8seq65bp.js";
|
|
55
55
|
import"../../../shared/@ai-setting/roy-agent-core-jnszp0jq.js";
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ConfigComponent
|
|
3
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
3
|
+
} from "./shared/@ai-setting/roy-agent-core-f18jk3cw.js";
|
|
4
4
|
import {
|
|
5
5
|
PromptComponent,
|
|
6
6
|
PromptStore
|
|
7
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
7
|
+
} from "./shared/@ai-setting/roy-agent-core-krppch0s.js";
|
|
8
8
|
import {
|
|
9
9
|
LLMComponent,
|
|
10
10
|
LLMConfigSchema,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
ModelLimitsSchema,
|
|
13
13
|
ProviderCapabilitiesSchema,
|
|
14
14
|
ProviderConfigSchema
|
|
15
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
15
|
+
} from "./shared/@ai-setting/roy-agent-core-4cqcdk7k.js";
|
|
16
16
|
import"./shared/@ai-setting/roy-agent-core-adg9ghbt.js";
|
|
17
17
|
import"./shared/@ai-setting/roy-agent-core-wjmwwc4a.js";
|
|
18
18
|
import {
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
} from "./shared/@ai-setting/roy-agent-core-zjdzk1gg.js";
|
|
40
40
|
import {
|
|
41
41
|
DebugComponent
|
|
42
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
42
|
+
} from "./shared/@ai-setting/roy-agent-core-cysnmvcy.js";
|
|
43
43
|
import {
|
|
44
44
|
ReplFormatter,
|
|
45
45
|
TraceFormatter,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
} from "./shared/@ai-setting/roy-agent-core-rvv6ydff.js";
|
|
48
48
|
import {
|
|
49
49
|
MemoryComponent
|
|
50
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
50
|
+
} from "./shared/@ai-setting/roy-agent-core-wybj8emq.js";
|
|
51
51
|
import {
|
|
52
52
|
MemoryPlugin,
|
|
53
53
|
createMemoryPlugin
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
import"./shared/@ai-setting/roy-agent-core-g1s2h0e5.js";
|
|
56
56
|
import {
|
|
57
57
|
SkillComponent
|
|
58
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
58
|
+
} from "./shared/@ai-setting/roy-agent-core-6mnwqcqf.js";
|
|
59
59
|
import"./shared/@ai-setting/roy-agent-core-psvxt4c9.js";
|
|
60
60
|
import"./shared/@ai-setting/roy-agent-core-3ztzc83c.js";
|
|
61
61
|
import {
|
|
@@ -66,20 +66,20 @@ import {
|
|
|
66
66
|
BaseEnvironment,
|
|
67
67
|
generateDescendingId,
|
|
68
68
|
generateId
|
|
69
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
69
|
+
} from "./shared/@ai-setting/roy-agent-core-754b0078.js";
|
|
70
70
|
import {
|
|
71
71
|
TaskComponent
|
|
72
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
73
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
72
|
+
} from "./shared/@ai-setting/roy-agent-core-6vwf03cz.js";
|
|
73
|
+
import"./shared/@ai-setting/roy-agent-core-vsrfzaze.js";
|
|
74
74
|
import"./shared/@ai-setting/roy-agent-core-rn57psp0.js";
|
|
75
75
|
import"./shared/@ai-setting/roy-agent-core-amkqnyzy.js";
|
|
76
76
|
import"./shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
77
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
77
|
+
import"./shared/@ai-setting/roy-agent-core-jg8cv1f7.js";
|
|
78
78
|
import"./shared/@ai-setting/roy-agent-core-tbrn9wdm.js";
|
|
79
79
|
import {
|
|
80
80
|
SQLiteTaskStore,
|
|
81
81
|
getDefaultTaskDbPath
|
|
82
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
82
|
+
} from "./shared/@ai-setting/roy-agent-core-jadrj0bz.js";
|
|
83
83
|
import {
|
|
84
84
|
BountyIMInstance,
|
|
85
85
|
EventSourceComponent,
|
|
@@ -92,11 +92,11 @@ import {
|
|
|
92
92
|
larkCliHandler,
|
|
93
93
|
resolveBountyIMSystemPrompt,
|
|
94
94
|
timerHandler
|
|
95
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
95
|
+
} from "./shared/@ai-setting/roy-agent-core-cazvr63z.js";
|
|
96
96
|
import {
|
|
97
97
|
LogTraceComponent,
|
|
98
98
|
LogTraceConfigSchema
|
|
99
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
99
|
+
} from "./shared/@ai-setting/roy-agent-core-jawzpf5k.js";
|
|
100
100
|
import {
|
|
101
101
|
BUILT_IN_EVENT_SOURCE_TYPES,
|
|
102
102
|
BUILT_IN_EVENT_SOURCE_TYPE_LIST,
|
|
@@ -115,7 +115,7 @@ import {
|
|
|
115
115
|
import {
|
|
116
116
|
TaskTagPlugin,
|
|
117
117
|
createAutoTaskPlugin
|
|
118
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
118
|
+
} from "./shared/@ai-setting/roy-agent-core-47wrv4ex.js";
|
|
119
119
|
import {
|
|
120
120
|
TaskHookPoints
|
|
121
121
|
} from "./shared/@ai-setting/roy-agent-core-1pg0fepg.js";
|
|
@@ -125,7 +125,7 @@ import {
|
|
|
125
125
|
} from "./shared/@ai-setting/roy-agent-core-skqt40yy.js";
|
|
126
126
|
import {
|
|
127
127
|
WorkflowComponent
|
|
128
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
128
|
+
} from "./shared/@ai-setting/roy-agent-core-m3ffkexb.js";
|
|
129
129
|
import {
|
|
130
130
|
init_node_registry_helper,
|
|
131
131
|
registerDecoratorNodeType
|
|
@@ -138,18 +138,18 @@ import {
|
|
|
138
138
|
createWorkflowFromClass
|
|
139
139
|
} from "./shared/@ai-setting/roy-agent-core-h0x19xgn.js";
|
|
140
140
|
import"./shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
141
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
141
|
+
import"./shared/@ai-setting/roy-agent-core-34je386q.js";
|
|
142
142
|
import {
|
|
143
143
|
SessionComponent
|
|
144
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
144
|
+
} from "./shared/@ai-setting/roy-agent-core-s44egzrh.js";
|
|
145
145
|
import {
|
|
146
146
|
MemorySessionStore
|
|
147
147
|
} from "./shared/@ai-setting/roy-agent-core-bdhcwf4x.js";
|
|
148
148
|
import"./shared/@ai-setting/roy-agent-core-hhrg314p.js";
|
|
149
149
|
import"./shared/@ai-setting/roy-agent-core-8nv07zgr.js";
|
|
150
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
150
|
+
import"./shared/@ai-setting/roy-agent-core-rczz7e81.js";
|
|
151
151
|
import"./shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
152
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
152
|
+
import"./shared/@ai-setting/roy-agent-core-3h7ajma5.js";
|
|
153
153
|
import"./shared/@ai-setting/roy-agent-core-yjjqm4ww.js";
|
|
154
154
|
import"./shared/@ai-setting/roy-agent-core-1db4vpc6.js";
|
|
155
155
|
import"./shared/@ai-setting/roy-agent-core-7exqwax1.js";
|
|
@@ -161,16 +161,16 @@ import"./shared/@ai-setting/roy-agent-core-jrj30vq3.js";
|
|
|
161
161
|
import"./shared/@ai-setting/roy-agent-core-rvxg1wps.js";
|
|
162
162
|
import {
|
|
163
163
|
CommandsComponent
|
|
164
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
164
|
+
} from "./shared/@ai-setting/roy-agent-core-n1ceexfz.js";
|
|
165
165
|
import {
|
|
166
166
|
AgentComponent,
|
|
167
167
|
AgentComponentConfigSchema
|
|
168
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
168
|
+
} from "./shared/@ai-setting/roy-agent-core-5exnp10h.js";
|
|
169
169
|
import {
|
|
170
170
|
ToolComponent,
|
|
171
171
|
ToolRegistry,
|
|
172
172
|
ToolValidator
|
|
173
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
173
|
+
} from "./shared/@ai-setting/roy-agent-core-jjw7xcxv.js";
|
|
174
174
|
import"./shared/@ai-setting/roy-agent-core-kzg1jwt8.js";
|
|
175
175
|
import {
|
|
176
176
|
AgentRegistry
|
|
@@ -195,13 +195,13 @@ import {
|
|
|
195
195
|
} from "./shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
196
196
|
import {
|
|
197
197
|
PluginComponent
|
|
198
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
198
|
+
} from "./shared/@ai-setting/roy-agent-core-qfktfbrr.js";
|
|
199
199
|
import {
|
|
200
200
|
BasePlugin
|
|
201
201
|
} from "./shared/@ai-setting/roy-agent-core-rmn29nrh.js";
|
|
202
202
|
import {
|
|
203
203
|
McpComponent
|
|
204
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
204
|
+
} from "./shared/@ai-setting/roy-agent-core-pc8x07p0.js";
|
|
205
205
|
import"./shared/@ai-setting/roy-agent-core-8t7wny6v.js";
|
|
206
206
|
import {
|
|
207
207
|
AgentError,
|
|
@@ -217,17 +217,17 @@ import {
|
|
|
217
217
|
import"./shared/@ai-setting/roy-agent-core-7hh0brvs.js";
|
|
218
218
|
import {
|
|
219
219
|
BaseComponent
|
|
220
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
220
|
+
} from "./shared/@ai-setting/roy-agent-core-9t675te0.js";
|
|
221
221
|
import {
|
|
222
222
|
createHook,
|
|
223
223
|
createPriorityHook
|
|
224
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
224
|
+
} from "./shared/@ai-setting/roy-agent-core-cw89yj9d.js";
|
|
225
225
|
import {
|
|
226
226
|
HookManager,
|
|
227
227
|
globalHookManager
|
|
228
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
229
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
230
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
228
|
+
} from "./shared/@ai-setting/roy-agent-core-a236mps6.js";
|
|
229
|
+
import"./shared/@ai-setting/roy-agent-core-wn59p0zw.js";
|
|
230
|
+
import"./shared/@ai-setting/roy-agent-core-zbb3sk72.js";
|
|
231
231
|
import {
|
|
232
232
|
Traced,
|
|
233
233
|
TracedAs,
|
|
@@ -16,13 +16,13 @@ import {
|
|
|
16
16
|
} from "./roy-agent-core-rmn29nrh.js";
|
|
17
17
|
import {
|
|
18
18
|
init_context
|
|
19
|
-
} from "./roy-agent-core-
|
|
19
|
+
} from "./roy-agent-core-wn59p0zw.js";
|
|
20
20
|
import {
|
|
21
21
|
getEnvContextOrEmpty,
|
|
22
22
|
getEventFromEnvContext,
|
|
23
23
|
getLarkMessageId,
|
|
24
24
|
isLarkEvent
|
|
25
|
-
} from "./roy-agent-core-
|
|
25
|
+
} from "./roy-agent-core-zbb3sk72.js";
|
|
26
26
|
import {
|
|
27
27
|
TracedAs,
|
|
28
28
|
init_decorator,
|
|
@@ -822,6 +822,7 @@ class PerTaskGroupChatPlugin {
|
|
|
822
822
|
config;
|
|
823
823
|
lastNotifyTimestamps = new Map;
|
|
824
824
|
taskUpdater;
|
|
825
|
+
taskGetter;
|
|
825
826
|
sessionComponent;
|
|
826
827
|
constructor(config = {}) {
|
|
827
828
|
this.config = {
|
|
@@ -853,6 +854,13 @@ class PerTaskGroupChatPlugin {
|
|
|
853
854
|
hasTaskUpdater() {
|
|
854
855
|
return this.taskUpdater !== undefined;
|
|
855
856
|
}
|
|
857
|
+
setTaskGetter(getter) {
|
|
858
|
+
this.taskGetter = getter;
|
|
859
|
+
logger4.debug(`TaskGetter injected for plugin ${this.name} (sourceId=${this.sourceId})`);
|
|
860
|
+
}
|
|
861
|
+
hasTaskGetter() {
|
|
862
|
+
return this.taskGetter !== undefined;
|
|
863
|
+
}
|
|
856
864
|
setSessionComponent(sessionComponent) {
|
|
857
865
|
this.sessionComponent = sessionComponent;
|
|
858
866
|
logger4.debug(`SessionComponent injected for plugin ${this.name} (sourceId=${this.sourceId})`);
|
|
@@ -923,29 +931,17 @@ class PerTaskGroupChatPlugin {
|
|
|
923
931
|
const botAppIds = this.resolveBotAppIds(replyChannel ?? {});
|
|
924
932
|
const userIds = this.resolveUserIds(replyChannel);
|
|
925
933
|
logger4.debug(`onAfterCreate[${this.pluginName}]: creating group chat for task #${task.id} ` + `name="${name}" profile="${profile}" botAppIds=${JSON.stringify(botAppIds)} ` + `userIds=${JSON.stringify(userIds)}`);
|
|
934
|
+
let chatId;
|
|
926
935
|
try {
|
|
927
|
-
|
|
936
|
+
chatId = await this.createGroupChat({
|
|
928
937
|
name,
|
|
929
938
|
description,
|
|
930
939
|
profile,
|
|
931
940
|
botAppIds,
|
|
932
941
|
userIds
|
|
933
942
|
});
|
|
943
|
+
await this.writeChatBinding(task, chatId, profile, "creating");
|
|
934
944
|
await this.attachChatIdToTask(task, chatId, profile);
|
|
935
|
-
if (this.sessionComponent) {
|
|
936
|
-
try {
|
|
937
|
-
await this.sessionComponent.upsertChatTaskBinding({
|
|
938
|
-
chatId,
|
|
939
|
-
taskId: task.id,
|
|
940
|
-
profile,
|
|
941
|
-
status: "ready"
|
|
942
|
-
});
|
|
943
|
-
} catch (bindErr) {
|
|
944
|
-
logger4.warn(`onAfterCreate[${this.pluginName}]: failed to write chat-task binding for ` + `chat ${chatId} / task #${task.id}: ${bindErr}. ` + `群消息 handler 将无法自动注入 parentTaskId。`);
|
|
945
|
-
}
|
|
946
|
-
} else if (isPluginDebugEnabled()) {
|
|
947
|
-
logger4.debug(`onAfterCreate[${this.pluginName}]: no sessionComponent injected, ` + `skip chat-task binding for chat ${chatId}`);
|
|
948
|
-
}
|
|
949
945
|
if (this.config.sendWelcomeMessage) {
|
|
950
946
|
try {
|
|
951
947
|
await this.sendToChat({
|
|
@@ -974,13 +970,36 @@ class PerTaskGroupChatPlugin {
|
|
|
974
970
|
} else {
|
|
975
971
|
logger4.debug(`onAfterCreate[${this.pluginName}]: skip "群聊已创建" main-chat notification ` + `(no replyChannel.chatId)`);
|
|
976
972
|
}
|
|
973
|
+
await this.writeChatBinding(task, chatId, profile, "ready");
|
|
977
974
|
logger4.info(`Created per-task group chat ${chatId} for task #${task.id}`);
|
|
978
975
|
} catch (error) {
|
|
979
976
|
logger4.error(`Failed to create per-task group chat for task #${task.id}: ${error}`);
|
|
977
|
+
if (chatId) {
|
|
978
|
+
await this.writeChatBinding(task, chatId, profile, "failed", String(error));
|
|
979
|
+
}
|
|
980
980
|
if (!this.config.fallbackToMain)
|
|
981
981
|
throw error;
|
|
982
982
|
}
|
|
983
983
|
}
|
|
984
|
+
async writeChatBinding(task, chatId, profile, status, errorMessage) {
|
|
985
|
+
if (!this.sessionComponent) {
|
|
986
|
+
if (isPluginDebugEnabled()) {
|
|
987
|
+
logger4.debug(`writeChatBinding[${this.pluginName}]: no sessionComponent injected, ` + `skip chat-task binding for chat ${chatId} (status=${status})`);
|
|
988
|
+
}
|
|
989
|
+
return;
|
|
990
|
+
}
|
|
991
|
+
try {
|
|
992
|
+
await this.sessionComponent.upsertChatTaskBinding({
|
|
993
|
+
chatId,
|
|
994
|
+
taskId: task.id,
|
|
995
|
+
profile,
|
|
996
|
+
status,
|
|
997
|
+
errorMessage: errorMessage ?? null
|
|
998
|
+
});
|
|
999
|
+
} catch (bindErr) {
|
|
1000
|
+
logger4.warn(`writeChatBinding[${this.pluginName}]: failed to write chat-task binding for ` + `chat ${chatId} / task #${task.id} (status=${status}): ${bindErr}. ` + `群消息 handler 将无法自动注入 parentTaskId。`);
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
984
1003
|
async onAfterUpdate(ctx) {
|
|
985
1004
|
const data = ctx.data;
|
|
986
1005
|
if (!data?.task) {
|
|
@@ -988,13 +1007,13 @@ class PerTaskGroupChatPlugin {
|
|
|
988
1007
|
return;
|
|
989
1008
|
}
|
|
990
1009
|
const { task, changes } = data;
|
|
991
|
-
const chatId = this.
|
|
1010
|
+
const { chatId, profile: inheritedProfile } = await this.resolveEffectiveChat(task);
|
|
992
1011
|
if (!chatId) {
|
|
993
1012
|
logger4.debug(`onAfterUpdate[${this.pluginName}]: task #${task.id} has no per-task chat_id, skip. ` + `诊断:检查 task.context JSON 是否含 larkPerTaskChatId 字段 ` + `(sqlite: SELECT context FROM task WHERE id=${task.id})`);
|
|
994
1013
|
return;
|
|
995
1014
|
}
|
|
996
1015
|
const replyChannel = this.getReplyChannelFromCtx(ctx);
|
|
997
|
-
const profile = replyChannel?.profile ??
|
|
1016
|
+
const profile = replyChannel?.profile ?? inheritedProfile ?? undefined;
|
|
998
1017
|
if (!this.hasMeaningfulChange(changes)) {
|
|
999
1018
|
logger4.debug(`onAfterUpdate[${this.pluginName}]: no meaningful change for task #${task.id}, skip`);
|
|
1000
1019
|
return;
|
|
@@ -1023,13 +1042,13 @@ class PerTaskGroupChatPlugin {
|
|
|
1023
1042
|
return;
|
|
1024
1043
|
}
|
|
1025
1044
|
const taskFromCtx = ctx.metadata?.task;
|
|
1026
|
-
const chatId = taskFromCtx ? this.
|
|
1045
|
+
const { chatId, profile: inheritedProfile } = taskFromCtx ? await this.resolveEffectiveChat(taskFromCtx) : {};
|
|
1027
1046
|
if (!chatId || !taskFromCtx) {
|
|
1028
1047
|
logger4.debug(`onAfterOperationCreate[${this.pluginName}]: no per-task chat_id for task #${taskId}, skip. ` + `诊断:ctx.metadata.task 是否包含完整 task 对象?task.context.larkPerTaskChatId 是否存在?`);
|
|
1029
1048
|
return;
|
|
1030
1049
|
}
|
|
1031
1050
|
const replyChannel = this.getReplyChannelFromCtx(ctx);
|
|
1032
|
-
const profile = replyChannel?.profile ??
|
|
1051
|
+
const profile = replyChannel?.profile ?? inheritedProfile ?? undefined;
|
|
1033
1052
|
logger4.debug(`onAfterOperationCreate[${this.pluginName}]: send operation #${operation.id} ` + `for task #${taskId} to chat_id=${chatId}`);
|
|
1034
1053
|
await this.sendToChat({
|
|
1035
1054
|
chatId,
|
|
@@ -1044,13 +1063,13 @@ class PerTaskGroupChatPlugin {
|
|
|
1044
1063
|
return;
|
|
1045
1064
|
}
|
|
1046
1065
|
const { task, terminalStatus } = data;
|
|
1047
|
-
const chatId = this.
|
|
1066
|
+
const { chatId, profile: inheritedProfile } = await this.resolveEffectiveChat(task);
|
|
1048
1067
|
if (!chatId) {
|
|
1049
1068
|
logger4.debug(`onAfterComplete[${this.pluginName}]: task #${task.id} has no per-task chat_id, skip`);
|
|
1050
1069
|
return;
|
|
1051
1070
|
}
|
|
1052
1071
|
const replyChannel = this.getReplyChannelFromCtx(ctx);
|
|
1053
|
-
const profile = replyChannel?.profile ??
|
|
1072
|
+
const profile = replyChannel?.profile ?? inheritedProfile ?? undefined;
|
|
1054
1073
|
const emoji = terminalStatus === "completed" ? "✅" : terminalStatus === "failed" ? "❌" : terminalStatus === "cancelled" ? "\uD83D\uDEAB" : terminalStatus === "timeout" ? "⏰" : "\uD83C\uDFC1";
|
|
1055
1074
|
logger4.debug(`onAfterComplete[${this.pluginName}]: send complete notification for task #${task.id} ` + `status=${terminalStatus} to chat_id=${chatId}`);
|
|
1056
1075
|
await this.sendToChat({
|
|
@@ -1244,8 +1263,7 @@ ${opts.content}`);
|
|
|
1244
1263
|
}
|
|
1245
1264
|
return;
|
|
1246
1265
|
}
|
|
1247
|
-
|
|
1248
|
-
const ctxStr = task.context;
|
|
1266
|
+
parseChatIdFromContext(ctxStr) {
|
|
1249
1267
|
if (!ctxStr)
|
|
1250
1268
|
return;
|
|
1251
1269
|
try {
|
|
@@ -1256,8 +1274,7 @@ ${opts.content}`);
|
|
|
1256
1274
|
return;
|
|
1257
1275
|
}
|
|
1258
1276
|
}
|
|
1259
|
-
|
|
1260
|
-
const ctxStr = task.context;
|
|
1277
|
+
parseProfileFromContext(ctxStr) {
|
|
1261
1278
|
if (!ctxStr)
|
|
1262
1279
|
return;
|
|
1263
1280
|
try {
|
|
@@ -1268,6 +1285,39 @@ ${opts.content}`);
|
|
|
1268
1285
|
return;
|
|
1269
1286
|
}
|
|
1270
1287
|
}
|
|
1288
|
+
getTaskChatId(task) {
|
|
1289
|
+
return this.parseChatIdFromContext(task.context);
|
|
1290
|
+
}
|
|
1291
|
+
getTaskChatProfile(task) {
|
|
1292
|
+
return this.parseProfileFromContext(task.context);
|
|
1293
|
+
}
|
|
1294
|
+
async resolveEffectiveChat(task) {
|
|
1295
|
+
const ownChatId = this.getTaskChatId(task);
|
|
1296
|
+
if (ownChatId) {
|
|
1297
|
+
return { chatId: ownChatId, profile: this.getTaskChatProfile(task) };
|
|
1298
|
+
}
|
|
1299
|
+
if (!this.taskGetter)
|
|
1300
|
+
return {};
|
|
1301
|
+
const seen = new Set;
|
|
1302
|
+
let id = task.parent_task_id;
|
|
1303
|
+
while (typeof id === "number" && id > 0 && !seen.has(id) && seen.size < 8) {
|
|
1304
|
+
seen.add(id);
|
|
1305
|
+
let parent;
|
|
1306
|
+
try {
|
|
1307
|
+
parent = await this.taskGetter(id);
|
|
1308
|
+
} catch {
|
|
1309
|
+
return {};
|
|
1310
|
+
}
|
|
1311
|
+
if (!parent)
|
|
1312
|
+
return {};
|
|
1313
|
+
const chatId = this.parseChatIdFromContext(parent.context);
|
|
1314
|
+
if (chatId) {
|
|
1315
|
+
return { chatId, profile: this.parseProfileFromContext(parent.context) };
|
|
1316
|
+
}
|
|
1317
|
+
id = parent.parent_task_id ?? undefined;
|
|
1318
|
+
}
|
|
1319
|
+
return {};
|
|
1320
|
+
}
|
|
1271
1321
|
resolveBotAppIds(replyChannel) {
|
|
1272
1322
|
if (this.config.botAppIds.length > 0) {
|
|
1273
1323
|
logger4.debug(`resolveBotAppIds[${this.pluginName}]: using config.botAppIds=${JSON.stringify(this.config.botAppIds)}`);
|
|
@@ -1455,6 +1505,18 @@ __legacyDecorateClassTS([
|
|
|
1455
1505
|
__legacyDecorateClassTS([
|
|
1456
1506
|
TracedAs("per-task-group-chat.onAfterCreate", { recordParams: false })
|
|
1457
1507
|
], PerTaskGroupChatPlugin.prototype, "onAfterCreate", null);
|
|
1508
|
+
__legacyDecorateClassTS([
|
|
1509
|
+
TracedAs("per-task-group-chat.writeChatBinding", {
|
|
1510
|
+
recordParams: true,
|
|
1511
|
+
recordResult: false,
|
|
1512
|
+
flattenParamFilter: true,
|
|
1513
|
+
paramFilter: (args) => ({
|
|
1514
|
+
taskId: args[0]?.id,
|
|
1515
|
+
chatId: args[1],
|
|
1516
|
+
status: args[3]
|
|
1517
|
+
})
|
|
1518
|
+
})
|
|
1519
|
+
], PerTaskGroupChatPlugin.prototype, "writeChatBinding", null);
|
|
1458
1520
|
__legacyDecorateClassTS([
|
|
1459
1521
|
TracedAs("per-task-group-chat.onAfterUpdate", { recordParams: false })
|
|
1460
1522
|
], PerTaskGroupChatPlugin.prototype, "onAfterUpdate", null);
|
|
@@ -19,12 +19,12 @@ import {
|
|
|
19
19
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
20
20
|
import {
|
|
21
21
|
BaseComponent
|
|
22
|
-
} from "./roy-agent-core-
|
|
22
|
+
} from "./roy-agent-core-9t675te0.js";
|
|
23
23
|
import {
|
|
24
24
|
LLMHookPoints,
|
|
25
25
|
globalHookManager,
|
|
26
26
|
init_global_hook_manager
|
|
27
|
-
} from "./roy-agent-core-
|
|
27
|
+
} from "./roy-agent-core-a236mps6.js";
|
|
28
28
|
import {
|
|
29
29
|
TracedAs,
|
|
30
30
|
init_decorator,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
truncateOutputInline
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-jjw7xcxv.js";
|
|
4
4
|
import {
|
|
5
5
|
AgentRegistry
|
|
6
6
|
} from "./roy-agent-core-za09t5g3.js";
|
|
@@ -29,19 +29,20 @@ import {
|
|
|
29
29
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
30
30
|
import {
|
|
31
31
|
BaseComponent
|
|
32
|
-
} from "./roy-agent-core-
|
|
32
|
+
} from "./roy-agent-core-9t675te0.js";
|
|
33
33
|
import {
|
|
34
34
|
globalHookManager,
|
|
35
35
|
init_global_hook_manager
|
|
36
|
-
} from "./roy-agent-core-
|
|
36
|
+
} from "./roy-agent-core-a236mps6.js";
|
|
37
37
|
import {
|
|
38
38
|
init_context
|
|
39
|
-
} from "./roy-agent-core-
|
|
39
|
+
} from "./roy-agent-core-wn59p0zw.js";
|
|
40
40
|
import {
|
|
41
41
|
getCurrentTaskId,
|
|
42
42
|
getEnvContext,
|
|
43
|
+
resolveEnvParentTaskId,
|
|
43
44
|
runWithEnvContextAsync
|
|
44
|
-
} from "./roy-agent-core-
|
|
45
|
+
} from "./roy-agent-core-zbb3sk72.js";
|
|
45
46
|
import {
|
|
46
47
|
TracedAs,
|
|
47
48
|
init_decorator
|
|
@@ -866,6 +867,7 @@ class AgentComponent extends BaseComponent {
|
|
|
866
867
|
}
|
|
867
868
|
}
|
|
868
869
|
const parentEnvContext = getEnvContext();
|
|
870
|
+
const envBoundParentTaskId = resolveEnvParentTaskId(effectiveContext.envEvent, parentEnvContext);
|
|
869
871
|
const envContext = {
|
|
870
872
|
...parentEnvContext,
|
|
871
873
|
agentContext: parentEnvContext?.agentContext ?? {},
|
|
@@ -879,6 +881,7 @@ class AgentComponent extends BaseComponent {
|
|
|
879
881
|
replyChannel: parentEnvContext?.replyChannel ?? effectiveContext.envEvent?.metadata?.replyChannel,
|
|
880
882
|
sourceId: parentEnvContext?.sourceId ?? effectiveContext.envEvent?.metadata?.sourceId,
|
|
881
883
|
sourceType: parentEnvContext?.sourceType ?? effectiveContext.envEvent?.metadata?.sourceType,
|
|
884
|
+
parentTaskId: envBoundParentTaskId,
|
|
882
885
|
metadata: { ...effectiveContext.metadata }
|
|
883
886
|
};
|
|
884
887
|
return await runWithEnvContextAsync(envContext, async () => {
|