@ai-setting/roy-agent-core 1.6.18 → 1.6.20
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 +2 -2
- package/dist/env/event-source/index.js +3 -3
- package/dist/env/index.js +10 -10
- package/dist/env/prompt/index.js +2 -2
- package/dist/env/task/delegate/index.js +3 -3
- package/dist/env/task/index.js +4 -4
- package/dist/env/task/plugins/index.js +2 -2
- package/dist/env/workflow/engine/index.js +1 -1
- package/dist/env/workflow/index.js +2 -2
- package/dist/index.js +11 -11
- package/dist/shared/@ai-setting/{roy-agent-core-n1fx2fx4.js → roy-agent-core-8n3je2r0.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-vc8e968b.js → roy-agent-core-b9q2jfx4.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-6mz26khm.js → roy-agent-core-bwqjwa0d.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-h07kk80k.js → roy-agent-core-ett06sn8.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-yr3fp8tv.js → roy-agent-core-f1cjs6c4.js} +28 -5
- package/dist/shared/@ai-setting/{roy-agent-core-tycbpm17.js → roy-agent-core-fntxq0gf.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-nreqmmtz.js → roy-agent-core-grajzyhd.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-f6x6ksz3.js → roy-agent-core-mekk4as5.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-mvmgy9t0.js → roy-agent-core-rdf8tqj7.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-65vpkh7x.js → roy-agent-core-skqt40yy.js} +121 -33
- package/dist/shared/@ai-setting/{roy-agent-core-qyb2z42s.js → roy-agent-core-zeztnvvb.js} +1 -1
- package/package.json +1 -1
package/dist/env/agent/index.js
CHANGED
|
@@ -2,12 +2,12 @@ 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-zeztnvvb.js";
|
|
6
6
|
import"../../shared/@ai-setting/roy-agent-core-8n0e62y4.js";
|
|
7
7
|
import"../../shared/@ai-setting/roy-agent-core-eskgj8nc.js";
|
|
8
8
|
import"../../shared/@ai-setting/roy-agent-core-ataagh3a.js";
|
|
9
9
|
import"../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
10
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
10
|
+
import"../../shared/@ai-setting/roy-agent-core-fntxq0gf.js";
|
|
11
11
|
import"../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
12
12
|
import"../../shared/@ai-setting/roy-agent-core-ctdhjv68.js";
|
|
13
13
|
import"../../shared/@ai-setting/roy-agent-core-7r72622v.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
larkCliHandler,
|
|
12
12
|
resolveBountyIMSystemPrompt,
|
|
13
13
|
timerHandler
|
|
14
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
14
|
+
} from "../../shared/@ai-setting/roy-agent-core-bwqjwa0d.js";
|
|
15
15
|
import {
|
|
16
16
|
BUILT_IN_EVENT_SOURCE_TYPES,
|
|
17
17
|
BUILT_IN_EVENT_SOURCE_TYPE_LIST,
|
|
@@ -22,13 +22,13 @@ import {
|
|
|
22
22
|
validateEventSourceConfig
|
|
23
23
|
} from "../../shared/@ai-setting/roy-agent-core-ds5f75pg.js";
|
|
24
24
|
import"../../shared/@ai-setting/roy-agent-core-1qjgwjjs.js";
|
|
25
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
25
|
+
import"../../shared/@ai-setting/roy-agent-core-grajzyhd.js";
|
|
26
26
|
import"../../shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
27
27
|
import"../../shared/@ai-setting/roy-agent-core-1mrc9a1r.js";
|
|
28
28
|
import"../../shared/@ai-setting/roy-agent-core-bq1gskrf.js";
|
|
29
29
|
import"../../shared/@ai-setting/roy-agent-core-jrj30vq3.js";
|
|
30
30
|
import"../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
31
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
31
|
+
import"../../shared/@ai-setting/roy-agent-core-skqt40yy.js";
|
|
32
32
|
import"../../shared/@ai-setting/roy-agent-core-1pg0fepg.js";
|
|
33
33
|
import"../../shared/@ai-setting/roy-agent-core-7hh0brvs.js";
|
|
34
34
|
import"../../shared/@ai-setting/roy-agent-core-akb8mb9v.js";
|
package/dist/env/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseEnvironment
|
|
3
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
3
|
+
} from "../shared/@ai-setting/roy-agent-core-b9q2jfx4.js";
|
|
4
4
|
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-bwqjwa0d.js";
|
|
9
9
|
import {
|
|
10
10
|
EventSourceInitHooks,
|
|
11
11
|
getDefaultConfigForType,
|
|
@@ -17,13 +17,13 @@ import"../shared/@ai-setting/roy-agent-core-1qjgwjjs.js";
|
|
|
17
17
|
import {
|
|
18
18
|
PluginComponent
|
|
19
19
|
} from "../shared/@ai-setting/roy-agent-core-gc75v3px.js";
|
|
20
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
20
|
+
import"../shared/@ai-setting/roy-agent-core-grajzyhd.js";
|
|
21
21
|
import"../shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
22
22
|
import {
|
|
23
23
|
WorkflowComponent
|
|
24
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
24
|
+
} from "../shared/@ai-setting/roy-agent-core-mekk4as5.js";
|
|
25
25
|
import"../shared/@ai-setting/roy-agent-core-77wfej1h.js";
|
|
26
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
26
|
+
import"../shared/@ai-setting/roy-agent-core-f1cjs6c4.js";
|
|
27
27
|
import"../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
28
28
|
import"../shared/@ai-setting/roy-agent-core-gmnex23m.js";
|
|
29
29
|
import"../shared/@ai-setting/roy-agent-core-ez91vxas.js";
|
|
@@ -41,22 +41,22 @@ import"../shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
|
41
41
|
import {
|
|
42
42
|
AgentComponent,
|
|
43
43
|
AgentComponentConfigSchema
|
|
44
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
44
|
+
} from "../shared/@ai-setting/roy-agent-core-zeztnvvb.js";
|
|
45
45
|
import"../shared/@ai-setting/roy-agent-core-8n0e62y4.js";
|
|
46
46
|
import"../shared/@ai-setting/roy-agent-core-eskgj8nc.js";
|
|
47
47
|
import"../shared/@ai-setting/roy-agent-core-ataagh3a.js";
|
|
48
48
|
import"../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
49
49
|
import {
|
|
50
50
|
TaskComponent
|
|
51
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
51
|
+
} from "../shared/@ai-setting/roy-agent-core-rdf8tqj7.js";
|
|
52
52
|
import"../shared/@ai-setting/roy-agent-core-amkqnyzy.js";
|
|
53
53
|
import"../shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
54
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
54
|
+
import"../shared/@ai-setting/roy-agent-core-8n3je2r0.js";
|
|
55
55
|
import"../shared/@ai-setting/roy-agent-core-44g3synv.js";
|
|
56
56
|
import"../shared/@ai-setting/roy-agent-core-zdzkzx5g.js";
|
|
57
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
57
|
+
import"../shared/@ai-setting/roy-agent-core-skqt40yy.js";
|
|
58
58
|
import"../shared/@ai-setting/roy-agent-core-c1v263jn.js";
|
|
59
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
59
|
+
import"../shared/@ai-setting/roy-agent-core-fntxq0gf.js";
|
|
60
60
|
import {
|
|
61
61
|
XDG_PATHS,
|
|
62
62
|
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-ett06sn8.js";
|
|
7
|
+
import"../../shared/@ai-setting/roy-agent-core-skqt40yy.js";
|
|
8
8
|
import"../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
9
9
|
import"../../shared/@ai-setting/roy-agent-core-7hh0brvs.js";
|
|
10
10
|
import"../../shared/@ai-setting/roy-agent-core-akb8mb9v.js";
|
|
@@ -3,11 +3,11 @@ 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-8n3je2r0.js";
|
|
7
7
|
import"../../../shared/@ai-setting/roy-agent-core-44g3synv.js";
|
|
8
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
8
|
+
import"../../../shared/@ai-setting/roy-agent-core-skqt40yy.js";
|
|
9
9
|
import"../../../shared/@ai-setting/roy-agent-core-c1v263jn.js";
|
|
10
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
10
|
+
import"../../../shared/@ai-setting/roy-agent-core-fntxq0gf.js";
|
|
11
11
|
import"../../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
12
12
|
import"../../../shared/@ai-setting/roy-agent-core-1pg0fepg.js";
|
|
13
13
|
import"../../../shared/@ai-setting/roy-agent-core-vc7p80sd.js";
|
package/dist/env/task/index.js
CHANGED
|
@@ -5,20 +5,20 @@ 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-rdf8tqj7.js";
|
|
9
9
|
import"../../shared/@ai-setting/roy-agent-core-amkqnyzy.js";
|
|
10
10
|
import {
|
|
11
11
|
TaskEntityEventTypes
|
|
12
12
|
} from "../../shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
13
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
13
|
+
import"../../shared/@ai-setting/roy-agent-core-8n3je2r0.js";
|
|
14
14
|
import"../../shared/@ai-setting/roy-agent-core-44g3synv.js";
|
|
15
15
|
import {
|
|
16
16
|
SQLiteTaskStore,
|
|
17
17
|
getDefaultTaskDbPath
|
|
18
18
|
} from "../../shared/@ai-setting/roy-agent-core-zdzkzx5g.js";
|
|
19
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
19
|
+
import"../../shared/@ai-setting/roy-agent-core-skqt40yy.js";
|
|
20
20
|
import"../../shared/@ai-setting/roy-agent-core-c1v263jn.js";
|
|
21
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
21
|
+
import"../../shared/@ai-setting/roy-agent-core-fntxq0gf.js";
|
|
22
22
|
import"../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
23
23
|
import"../../shared/@ai-setting/roy-agent-core-c7e3htaq.js";
|
|
24
24
|
import"../../shared/@ai-setting/roy-agent-core-rn57psp0.js";
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
formatExtractorInput,
|
|
9
9
|
formatExtractorInputFromDescription,
|
|
10
10
|
parseExtractorOutput
|
|
11
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
11
|
+
} from "../../../shared/@ai-setting/roy-agent-core-grajzyhd.js";
|
|
12
12
|
import"../../../shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
13
13
|
import"../../../shared/@ai-setting/roy-agent-core-1mrc9a1r.js";
|
|
14
14
|
import"../../../shared/@ai-setting/roy-agent-core-bq1gskrf.js";
|
|
15
15
|
import"../../../shared/@ai-setting/roy-agent-core-jrj30vq3.js";
|
|
16
16
|
import"../../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
17
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
17
|
+
import"../../../shared/@ai-setting/roy-agent-core-skqt40yy.js";
|
|
18
18
|
import"../../../shared/@ai-setting/roy-agent-core-1pg0fepg.js";
|
|
19
19
|
import"../../../shared/@ai-setting/roy-agent-core-sqt96sam.js";
|
|
20
20
|
import"../../../shared/@ai-setting/roy-agent-core-dtkbj8fk.js";
|
|
@@ -5,7 +5,7 @@ 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-f1cjs6c4.js";
|
|
9
9
|
import"../../../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
10
10
|
import"../../../shared/@ai-setting/roy-agent-core-gmnex23m.js";
|
|
11
11
|
import"../../../shared/@ai-setting/roy-agent-core-ez91vxas.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WorkflowComponent
|
|
3
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
3
|
+
} from "../../shared/@ai-setting/roy-agent-core-mekk4as5.js";
|
|
4
4
|
import"../../shared/@ai-setting/roy-agent-core-77wfej1h.js";
|
|
5
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
5
|
+
import"../../shared/@ai-setting/roy-agent-core-f1cjs6c4.js";
|
|
6
6
|
import"../../shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
7
7
|
import"../../shared/@ai-setting/roy-agent-core-gmnex23m.js";
|
|
8
8
|
import"../../shared/@ai-setting/roy-agent-core-ez91vxas.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-ett06sn8.js";
|
|
5
5
|
import {
|
|
6
6
|
LLMComponent,
|
|
7
7
|
LLMConfigSchema,
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
BaseEnvironment,
|
|
64
64
|
generateDescendingId,
|
|
65
65
|
generateId
|
|
66
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
66
|
+
} from "./shared/@ai-setting/roy-agent-core-b9q2jfx4.js";
|
|
67
67
|
import {
|
|
68
68
|
BountyIMInstance,
|
|
69
69
|
EventSourceComponent,
|
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
larkCliHandler,
|
|
77
77
|
resolveBountyIMSystemPrompt,
|
|
78
78
|
timerHandler
|
|
79
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
79
|
+
} from "./shared/@ai-setting/roy-agent-core-bwqjwa0d.js";
|
|
80
80
|
import {
|
|
81
81
|
BUILT_IN_EVENT_SOURCE_TYPES,
|
|
82
82
|
BUILT_IN_EVENT_SOURCE_TYPE_LIST,
|
|
@@ -96,18 +96,18 @@ import {
|
|
|
96
96
|
import {
|
|
97
97
|
TaskTagPlugin,
|
|
98
98
|
createAutoTaskPlugin
|
|
99
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
99
|
+
} from "./shared/@ai-setting/roy-agent-core-grajzyhd.js";
|
|
100
100
|
import {
|
|
101
101
|
BasePlugin
|
|
102
102
|
} from "./shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
103
103
|
import {
|
|
104
104
|
WorkflowComponent
|
|
105
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
105
|
+
} from "./shared/@ai-setting/roy-agent-core-mekk4as5.js";
|
|
106
106
|
import {
|
|
107
107
|
init_node_registry_helper,
|
|
108
108
|
registerDecoratorNodeType
|
|
109
109
|
} from "./shared/@ai-setting/roy-agent-core-77wfej1h.js";
|
|
110
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
110
|
+
import"./shared/@ai-setting/roy-agent-core-f1cjs6c4.js";
|
|
111
111
|
import"./shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
112
112
|
import"./shared/@ai-setting/roy-agent-core-gmnex23m.js";
|
|
113
113
|
import"./shared/@ai-setting/roy-agent-core-ez91vxas.js";
|
|
@@ -131,7 +131,7 @@ import"./shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
|
131
131
|
import {
|
|
132
132
|
AgentComponent,
|
|
133
133
|
AgentComponentConfigSchema
|
|
134
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
134
|
+
} from "./shared/@ai-setting/roy-agent-core-zeztnvvb.js";
|
|
135
135
|
import {
|
|
136
136
|
createInvokeConfig,
|
|
137
137
|
invoke,
|
|
@@ -150,10 +150,10 @@ import {
|
|
|
150
150
|
} from "./shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
151
151
|
import {
|
|
152
152
|
TaskComponent
|
|
153
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
153
|
+
} from "./shared/@ai-setting/roy-agent-core-rdf8tqj7.js";
|
|
154
154
|
import"./shared/@ai-setting/roy-agent-core-amkqnyzy.js";
|
|
155
155
|
import"./shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
156
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
156
|
+
import"./shared/@ai-setting/roy-agent-core-8n3je2r0.js";
|
|
157
157
|
import"./shared/@ai-setting/roy-agent-core-44g3synv.js";
|
|
158
158
|
import {
|
|
159
159
|
SQLiteTaskStore,
|
|
@@ -162,11 +162,11 @@ import {
|
|
|
162
162
|
import {
|
|
163
163
|
getBuiltInPrompt,
|
|
164
164
|
getBuiltInPromptNames
|
|
165
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
165
|
+
} from "./shared/@ai-setting/roy-agent-core-skqt40yy.js";
|
|
166
166
|
import"./shared/@ai-setting/roy-agent-core-c1v263jn.js";
|
|
167
167
|
import {
|
|
168
168
|
AgentRegistry
|
|
169
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
169
|
+
} from "./shared/@ai-setting/roy-agent-core-fntxq0gf.js";
|
|
170
170
|
import {
|
|
171
171
|
XDG_PATHS,
|
|
172
172
|
getXDGPath,
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
} from "./roy-agent-core-44g3synv.js";
|
|
5
5
|
import {
|
|
6
6
|
builtInPrompts
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-skqt40yy.js";
|
|
8
8
|
import {
|
|
9
9
|
runWithBgTaskIdAsync
|
|
10
10
|
} from "./roy-agent-core-c1v263jn.js";
|
|
11
11
|
import {
|
|
12
12
|
DEFAULT_SUBAGENT_PROMPT
|
|
13
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-fntxq0gf.js";
|
|
14
14
|
import {
|
|
15
15
|
TaskHookPoints
|
|
16
16
|
} from "./roy-agent-core-1pg0fepg.js";
|
|
@@ -2322,7 +2322,7 @@ var init_engine = __esm(() => {
|
|
|
2322
2322
|
scheduler.markFailed(nodeId);
|
|
2323
2323
|
}
|
|
2324
2324
|
}
|
|
2325
|
-
async checkLoopGuardWithSnapshot(sessionState, templateResolver, reEntryId,
|
|
2325
|
+
async checkLoopGuardWithSnapshot(sessionState, templateResolver, reEntryId, snapshotPreviousOutput) {
|
|
2326
2326
|
const guard = sessionState.dagManager.getLoopGuard(reEntryId);
|
|
2327
2327
|
if (!guard) {
|
|
2328
2328
|
return { trip: false, counterKey: "", nextCount: 0 };
|
|
@@ -2330,19 +2330,42 @@ var init_engine = __esm(() => {
|
|
|
2330
2330
|
const counterKey = `_loop_guard_consecutive_${reEntryId}`;
|
|
2331
2331
|
const previousCount = sessionState.loopGuardCounters.get(reEntryId) ?? 0;
|
|
2332
2332
|
const previousValue = templateResolver.resolveValue(guard.previous_signal);
|
|
2333
|
-
const
|
|
2333
|
+
const resolvedCwdRaw = templateResolver.resolveValue(guard.cwd);
|
|
2334
|
+
const resolvedCwd = typeof resolvedCwdRaw === "string" && resolvedCwdRaw.length > 0 ? resolvedCwdRaw : undefined;
|
|
2335
|
+
const resolvedCommandRaw = templateResolver.resolveValue(guard.current_signal_command);
|
|
2336
|
+
const resolvedCommand = typeof resolvedCommandRaw === "string" && resolvedCommandRaw.length > 0 ? resolvedCommandRaw : guard.current_signal_command;
|
|
2337
|
+
const cwd = resolvedCwd ?? sessionState.config.workflowInput?.project_path ?? process.cwd();
|
|
2334
2338
|
let currentValue;
|
|
2335
2339
|
try {
|
|
2336
|
-
const { stdout } = await execFileAsync("/bin/sh", ["-c",
|
|
2340
|
+
const { stdout } = await execFileAsync("/bin/sh", ["-c", resolvedCommand], {
|
|
2337
2341
|
cwd,
|
|
2338
2342
|
timeout: 1e4
|
|
2339
2343
|
});
|
|
2340
2344
|
currentValue = stdout.trim();
|
|
2341
2345
|
} catch (err) {
|
|
2342
|
-
|
|
2343
|
-
|
|
2346
|
+
const errMessage = err instanceof Error ? err.message : String(err);
|
|
2347
|
+
logger3.error(`[WorkflowEngine] loop_guard command failed for ${reEntryId}: ${errMessage}. Counting as no-progress.`);
|
|
2348
|
+
const nextCount2 = previousCount + 1;
|
|
2349
|
+
const maxAllowed2 = guard.max_consecutive_no_progress;
|
|
2350
|
+
if (nextCount2 >= maxAllowed2) {
|
|
2351
|
+
const failMessage = guard.fail_message ?? `loop_guard command failed for ${reEntryId} after ${nextCount2} consecutive re-entries: ${errMessage}`;
|
|
2352
|
+
return { trip: true, failMessage, counterKey, nextCount: nextCount2 };
|
|
2353
|
+
}
|
|
2354
|
+
sessionState.loopGuardCounters.set(reEntryId, nextCount2);
|
|
2355
|
+
return { trip: false, counterKey, nextCount: nextCount2 };
|
|
2344
2356
|
}
|
|
2345
2357
|
if (previousValue === undefined) {
|
|
2358
|
+
const snapshotHasContent = snapshotPreviousOutput !== undefined && snapshotPreviousOutput !== null && typeof snapshotPreviousOutput === "object" && Object.keys(snapshotPreviousOutput).length > 0;
|
|
2359
|
+
if (snapshotHasContent) {
|
|
2360
|
+
const nextCount2 = previousCount + 1;
|
|
2361
|
+
const maxAllowed2 = guard.max_consecutive_no_progress;
|
|
2362
|
+
if (nextCount2 >= maxAllowed2) {
|
|
2363
|
+
const failMessage = guard.fail_message ?? `loop_guard previous_signal path unresolved for ${reEntryId} after ${nextCount2} consecutive re-entries: ${guard.previous_signal}`;
|
|
2364
|
+
return { trip: true, failMessage, counterKey, nextCount: nextCount2 };
|
|
2365
|
+
}
|
|
2366
|
+
sessionState.loopGuardCounters.set(reEntryId, nextCount2);
|
|
2367
|
+
return { trip: false, counterKey, nextCount: nextCount2 };
|
|
2368
|
+
}
|
|
2346
2369
|
return { trip: false, counterKey, nextCount: 0 };
|
|
2347
2370
|
}
|
|
2348
2371
|
const isUnchanged = JSON.stringify(previousValue) === JSON.stringify(currentValue);
|
|
@@ -165,7 +165,7 @@ class AgentRegistry {
|
|
|
165
165
|
const agent = {
|
|
166
166
|
name,
|
|
167
167
|
type: "sub",
|
|
168
|
-
description: "Workflow runner —
|
|
168
|
+
description: "Workflow runner — 接受带 workflow_name(必填)的委托,或指示其按 search-first 流程自行选定(workflow_tag_list + workflow_search + workflow_list + workflow_get),然后通过 workflow_run 执行 workflow;支持 session resume 和 stop;失败接管由 prompt 推理触发 (Task #2251)。**调用方必须在 prompt 中明确指定 workflow 名,或指示 sub-agent 自行搜索选择;禁止盲猜/绕过/跳过 schema 验证** (Task #2486)。",
|
|
169
169
|
systemPromptRef: "workflow-runner",
|
|
170
170
|
deniedTools: ["delegate_task", "stop_task"],
|
|
171
171
|
maxIterations: 30
|
|
@@ -110,6 +110,10 @@ var builtInPrompts = {
|
|
|
110
110
|
|
|
111
111
|
## 子智能体选择策略
|
|
112
112
|
|
|
113
|
+
**核心铁律**:选了某个 subagent 后,必须**遵循该 subagent 的工作模式**——把任务用它的 prompt 模板、工具集和决策路径表达,**不能用自己的方式硬塞**。
|
|
114
|
+
|
|
115
|
+
> \uD83D\uDCA1 **典型例子**:选 \`workflow-runner\` 时,prompt 必须**明确指定 workflow 名**(让 sub-agent 直接 \`workflow_run\`)**或**让 sub-agent **先 \`workflow_search\` / \`workflow_list\` / \`workflow_get\` 自行选定**——不要让 sub-agent 替你做不属于它的决策(如 \`workflow_creat\`)。
|
|
116
|
+
|
|
113
117
|
你有多类子智能体。**默认首次委托使用 \`roy\`**。**调用 workflow 解决的任务,委托给 \`workflow-runner\`**(兼容语法:\`strict-task-agent\` / \`code-review\` / \`bench-agent-host\` / \`workspace-analyzer\` / \`test-workflow-agent\` 等旧名仍可用,会被自动重写)。
|
|
114
118
|
|
|
115
119
|
### \uD83E\uDD47 首选:\`roy\`(首次委托默认)
|
|
@@ -147,15 +151,34 @@ delegate_task(
|
|
|
147
151
|
- **安全关键型变更** — 验证不可妥协
|
|
148
152
|
- **代码审查/审计** — 需要系统性对照目标进行检查
|
|
149
153
|
|
|
150
|
-
|
|
154
|
+
#### 两种合法委托模式(**workflow_name 必传 / search-first 二选一**)
|
|
155
|
+
|
|
156
|
+
\`workflow-runner\` 的 \`<workflow_name>\` 是它的第一铁律(参见 \`workflow-runner\` prompt 的"## ⚠️ workflow_name 处理规则")。委托时必须在 prompt 里:
|
|
157
|
+
|
|
158
|
+
- **模式 A — 传具体 workflow_name**(首选):你已经知道该跑哪个 workflow,直接在 prompt 中指定名字,sub-agent 直接 \`workflow_get(name)\` → \`workflow_run\`。
|
|
159
|
+
- **模式 B — search-first 兜底**:你只知道任务目标但不确定 workflow 名,指示 sub-agent 自行 \`workflow_tag_list\` + \`workflow_search\` + \`workflow_list\` + \`workflow_get\` 选定再 \`workflow_run\`。
|
|
160
|
+
|
|
161
|
+
**禁止**:让 sub-agent 猜 workflow_name、绕过 workflow 自己完成任务、或跳过 schema 验证。
|
|
162
|
+
|
|
163
|
+
#### 模式 A 示例 — 传具体 workflow_name
|
|
164
|
+
|
|
151
165
|
\`\`\`
|
|
152
166
|
delegate_task(
|
|
153
|
-
description="
|
|
154
|
-
prompt="
|
|
167
|
+
description="执行 strict-task-agent workflow",
|
|
168
|
+
prompt="调用 workflow_run 执行 workflow strict-task-agent,任务是修复 roy-rd-with-trace 中的 X bug。",
|
|
169
|
+
subagent_type="workflow-runner",
|
|
170
|
+
similar_task_ids=[]
|
|
171
|
+
)
|
|
172
|
+
\`\`\`
|
|
155
173
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
174
|
+
#### 模式 B 示例 — search-first 兜底
|
|
175
|
+
|
|
176
|
+
\`\`\`
|
|
177
|
+
delegate_task(
|
|
178
|
+
description="寻找并执行合适的 workflow",
|
|
179
|
+
prompt="用户目标:批量跑 stock 筛选分析。请按 workflow-runner 的 search-first 流程:先 \`workflow_tag_list\` + \`workflow_search --keyword stock\` + \`workflow_list\` 找到匹配的 workflow,再 \`workflow_get <name>\` 验证 schema,最后 \`workflow_run <name>\` 执行。不要猜测 workflow 名。",
|
|
180
|
+
subagent_type="workflow-runner",
|
|
181
|
+
similar_task_ids=[]
|
|
159
182
|
)
|
|
160
183
|
\`\`\`
|
|
161
184
|
|
|
@@ -377,52 +400,84 @@ const status = await query_background_process({ bgProcessId: result.bgProcessId
|
|
|
377
400
|
|
|
378
401
|
## Workflow 操作指南
|
|
379
402
|
|
|
380
|
-
Workflow
|
|
403
|
+
Workflow 是预定义的自动化流程,可以高效解决常见类型的任务。**Default agent 自身不应直接 bash 跑 workflow**——所有 workflow 调用必须通过 \`delegate_task\` 委托给 \`workflow-runner\` 子智能体执行。
|
|
404
|
+
|
|
405
|
+
### ⚠️ 委托时 workflow_name 必传 / search-first 二选一(Task #2486)
|
|
406
|
+
|
|
407
|
+
\`workflow-runner\` 的 \`<workflow_name>\` 是它的**第一铁律**(详见 \`workflow-runner\` prompt "## ⚠️ workflow_name 处理规则")。**Default agent 在委托时必须**:
|
|
408
|
+
|
|
409
|
+
- **指定 workflow 名** — prompt 里明确写出 \`运行 workflow <workflow-name>\`,sub-agent 直接 \`workflow_get(name)\` → \`workflow_run\`。
|
|
410
|
+
- **或指示 sub-agent 自行搜索** — prompt 里说"按 search-first 流程:先 \`workflow_tag_list\` + \`workflow_search\` + \`workflow_list\` + \`workflow_get\` 选定再执行",让 sub-agent 自决。
|
|
411
|
+
|
|
412
|
+
**绝对禁止**:让 sub-agent 猜 workflow 名 / 绕过 workflow / 跳过 schema 验证。
|
|
413
|
+
|
|
414
|
+
### 如何通过 \`delegate_task\` 调用 workflow(标准路径)
|
|
381
415
|
|
|
382
|
-
### 如何用 workflow 辅助解决任务
|
|
383
416
|
1. **查 tag 发现可用 workflow**:\`workflow tag list\` — 查看 tag 池,找与任务领域匹配的 tag
|
|
384
417
|
2. **按 tag 搜索 workflow**:\`workflow list --tag <tag>\` — 找到相关的 workflow
|
|
385
418
|
3. **按关键词搜索**:\`workflow search --keyword <key>\` — 用关键词匹配
|
|
386
419
|
4. **查看详情**:\`workflow get <name>\` — 了解 workflow 的输入参数和节点流程
|
|
387
|
-
5.
|
|
420
|
+
5. **委托 \`workflow-runner\` 执行**:用下列模板派发(workflow_name 由 default agent 自己查好后填入,或改成"按 search-first 流程自行选定")
|
|
421
|
+
|
|
422
|
+
\`\`\`text
|
|
423
|
+
delegate_task(
|
|
424
|
+
subagent_type="workflow-runner",
|
|
425
|
+
prompt="调用 workflow_run 执行 workflow <workflow-name>,输入参数: {...}"
|
|
426
|
+
)
|
|
427
|
+
\`\`\`
|
|
428
|
+
|
|
429
|
+
**search-first 替代模板**(当你不确定 workflow 名时):
|
|
430
|
+
\`\`\`text
|
|
431
|
+
delegate_task(
|
|
432
|
+
subagent_type="workflow-runner",
|
|
433
|
+
prompt="按 search-first 流程执行:先 \`workflow_tag_list\` + \`workflow_search --keyword <key>\` + \`workflow_list\` 找到匹配 workflow,再 \`workflow_get <name>\` 验证 schema,最后 \`workflow_run <name>\` 执行。"
|
|
434
|
+
)
|
|
435
|
+
\`\`\`
|
|
388
436
|
|
|
389
437
|
> \uD83D\uDCA1 **什么时候该用 workflow?**
|
|
390
|
-
> - ✅ 你的任务与现有 workflow 的 tag 或描述高度匹配时 →
|
|
438
|
+
> - ✅ 你的任务与现有 workflow 的 tag 或描述高度匹配时 → 委托 \`workflow-runner\` 执行
|
|
391
439
|
> - ✅ 现有 workflow 可以作为参考模板 → 参考其设计自行实现
|
|
392
|
-
> - ❌ 找不到匹配的 workflow →
|
|
440
|
+
> - ❌ 找不到匹配的 workflow → **用传统方式解决**(委托 \`roy\` / \`general\` / \`explore\` / 直接编码)
|
|
441
|
+
|
|
442
|
+
### 可用命令速查(仅供 \`workflow-runner\` 子智能体使用,**default agent 不要直接调用**)
|
|
393
443
|
|
|
394
|
-
### 可用命令速查
|
|
395
444
|
- \`workflow tag list\` — 查看所有 tag
|
|
396
445
|
- \`workflow list --tag <tag>\` — 按 tag 搜索
|
|
397
|
-
- \`workflow search --keyword <
|
|
446
|
+
- \`workflow search --keyword <keyword>\` — 按关键词搜索
|
|
398
447
|
- \`workflow get <name>\` — 查看详情
|
|
399
|
-
- \`workflow
|
|
400
|
-
- \`workflow add --file <path> --tags "a,b,c"\` — 添加新 workflow
|
|
448
|
+
- \`workflow add --file <path> --tags "a,b,c"\` — 添加新 workflow(默认 1-3 个 tag)
|
|
401
449
|
- \`workflow validate --file <path>\` — 验证 workflow 定义
|
|
402
450
|
|
|
451
|
+
> ⚠️ \`workflow run <name>\` 是 workflow-runner 的内部触发命令——**default agent 不要直接 bash 调用**,必须通过 \`delegate_task(subagent_type="workflow-runner", ...)\` 委托子智能体执行。
|
|
452
|
+
|
|
403
453
|
### ⚠️ 重要原则
|
|
404
454
|
- **Workflow 是辅助手段,不是目的**。如果能找到现成 workflow 就使用它;如果找不到或效果不好,**用非 workflow 方式解决**也是完全正确的
|
|
405
455
|
- **不要为了用 workflow 而用**,强行创建一个不合适的 workflow 来套用任务不如直接用传统方式解决
|
|
406
|
-
-
|
|
456
|
+
- **Default agent 不直接调用 workflow**:所有 workflow 调用必须通过 \`delegate_task(subagent_type="workflow-runner", ...)\` 委托子智能体执行
|
|
407
457
|
|
|
408
|
-
### ⚡ Session 恢复(重要,耗时 workflow
|
|
458
|
+
### ⚡ Session 恢复(重要,耗时 workflow 必备 — default agent 视角)
|
|
409
459
|
|
|
410
|
-
|
|
460
|
+
workflow-runner 报告 workflow runId 后,对于耗时较长、易超时的 workflow(如 \`strict-task-agent\`),如遇超时/中断,**default agent 应重新派发 \`delegate_task\` 给 \`workflow-runner\`**,并附带 \`-s\` / \`--session\` 选项让 workflow-runner 从断点继续运行:
|
|
411
461
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
462
|
+
\`\`\`text
|
|
463
|
+
# 初次调用:直接派发 delegate_task(workflow-runner 内部用 workflow_run 启动)
|
|
464
|
+
delegate_task(
|
|
465
|
+
subagent_type="workflow-runner",
|
|
466
|
+
prompt="调用 workflow_run 执行 workflow <workflow-name>,输入参数: {...}"
|
|
467
|
+
)
|
|
417
468
|
|
|
418
|
-
|
|
419
|
-
|
|
469
|
+
# 拿到 runId 后(如 workflow_run_1783407282099_1_ah8pho),从中断处继续:
|
|
470
|
+
delegate_task(
|
|
471
|
+
subagent_type="workflow-runner",
|
|
472
|
+
prompt="调用 workflow_run 续跑 workflow <workflow-name>,-s workflow_run_1783407282099_1_ah8pho"
|
|
473
|
+
)
|
|
474
|
+
\`\`\`
|
|
420
475
|
|
|
421
|
-
>
|
|
476
|
+
> **关键规则**(Task #1837 — runId == sessionId):
|
|
422
477
|
> - Run ID / Session ID 形如 \`workflow_\${Date.now()}_\${counter}_\${random}\`,直接以 \`workflow_\` 开头
|
|
423
478
|
> - runId 和 sessionId 是同一个值(不再需要 \`workflow_\${runId}\` 派生)
|
|
424
|
-
> -
|
|
425
|
-
> - agentNode
|
|
479
|
+
> - 引擎从 last message 推断恢复点(\`workflow.node.start\` → 节点级 resume;\`workflow.node.end\` → 下一节点;\`workflow.node.interrupt\` → ask_user)
|
|
480
|
+
> - agentNode 恢复时自动 attach \`agentSessionId\`,agent 从中断的 sub-session 继续
|
|
426
481
|
> - 适合长时间 workflow(通过 \`workflow-runner\` 调度的任意 workflow)的超时重试
|
|
427
482
|
|
|
428
483
|
### {{memory}}`,
|
|
@@ -1096,6 +1151,36 @@ When reusing an existing task, you MUST follow these rules:
|
|
|
1096
1151
|
|
|
1097
1152
|
workflow 名必须从 \`<workflow_name>\` 标签读取,不得根据上下文猜测。
|
|
1098
1153
|
|
|
1154
|
+
## ⚠️ workflow_name 处理规则(关键 — Task #2486)
|
|
1155
|
+
|
|
1156
|
+
**这是 workflow-runner 的第一铁律。** 在调用任何 \`workflow_run\` 之前,**必须**确认 workflow 名是真实、确定的。
|
|
1157
|
+
|
|
1158
|
+
### 三种合法情况
|
|
1159
|
+
|
|
1160
|
+
| 情况 | 判定 | 第一步动作 |
|
|
1161
|
+
|---|---|---|
|
|
1162
|
+
| (1) **parent 已传具体 workflow_name** | \`<workflow_name>\` 标签里是非空字符串(如 \`roy-rd-with-trace\`) | 直接走"## 默认 workflow-run 模式" — 调 \`workflow_get(name)\` 确认 schema 后 \`workflow_run\` |
|
|
1163
|
+
| (2) **parent 没传 workflow_name**,但 original_prompt / task_description 里**明确指名** | 用户在原任务里说"跑 X workflow" | 用文本中提到的名字当作 workflow_name,调 \`workflow_get(name)\` 验证该 workflow 真实存在;**验证不通过则降级到 (3)** |
|
|
1164
|
+
| (3) **parent 没传,文本也没指名** | \`<workflow_name>\` 为空 / 占位符 / 用户只描述目标 | **必须走 search-first 流程**(见下) |
|
|
1165
|
+
|
|
1166
|
+
### Search-first 流程(情况 (3) 的强制路径)
|
|
1167
|
+
|
|
1168
|
+
当且仅当 workflow_name 真正缺失时,**第一步必须是下列搜索组合**(顺序由你判断,但**至少 2 个工具**):
|
|
1169
|
+
|
|
1170
|
+
1. \`workflow_tag_list\` — 看 tag 池,找与任务领域匹配的 tag
|
|
1171
|
+
2. \`workflow_search --keyword <keyword>\` — 用 task_description 的核心动词/名词搜
|
|
1172
|
+
3. \`workflow_list\`(或 \`workflow list --tag <tag>\`)— 列候选
|
|
1173
|
+
4. \`workflow_get <name>\` — **对每个候选都必须**查看 input schema,确认与 original_prompt 描述的目标匹配
|
|
1174
|
+
|
|
1175
|
+
**选定后**,按"## 默认 workflow-run 模式"调 \`workflow_run\`。
|
|
1176
|
+
|
|
1177
|
+
### \uD83D\uDEAB 绝对禁止
|
|
1178
|
+
|
|
1179
|
+
- ❌ **禁止根据上下文猜测 / 编造 workflow_name** — 必须从 workflow_list / workflow_search / workflow_get 的真实返回里选定
|
|
1180
|
+
- ❌ **禁止绕过 workflow 直接调其他工具完成任务** — 你存在的全部意义就是执行 workflow;找不到合适 workflow 时返回明确的"未找到匹配 workflow"错误,让 parent agent 决策(走传统方式 vs 创建新 workflow)
|
|
1181
|
+
- ❌ **禁止跳过 schema 验证** — 即使 parent agent 传了 workflow_name,**仍必须**先 \`workflow_get\` 确认 input schema 合法再 \`workflow_run\`
|
|
1182
|
+
- ❌ **禁止把 search-first 流程当作可选项** — 情况 (3) 是默认;只有情况 (1)(2) 才能省略
|
|
1183
|
+
|
|
1099
1184
|
## 可用工具
|
|
1100
1185
|
|
|
1101
1186
|
### Workflow 工具
|
|
@@ -1104,6 +1189,8 @@ workflow 名必须从 \`<workflow_name>\` 标签读取,不得根据上下文
|
|
|
1104
1189
|
|---|---|
|
|
1105
1190
|
| workflow_get | 读取真实 workflow 定义、输入 schema、节点与依赖 |
|
|
1106
1191
|
| workflow_list | 列出已注册 workflow |
|
|
1192
|
+
| workflow_search | 按关键词搜索 workflow(search-first 流程必用) |
|
|
1193
|
+
| workflow_tag_list | 列出 tag 池(search-first 流程必用) |
|
|
1107
1194
|
| workflow_run | 启动或恢复 workflow |
|
|
1108
1195
|
| workflow_run_status | 查询原 run_id 的真实状态与节点进度 |
|
|
1109
1196
|
| workflow_run_stop | 按要求停止 run |
|
|
@@ -1121,15 +1208,16 @@ workflow 名必须从 \`<workflow_name>\` 标签读取,不得根据上下文
|
|
|
1121
1208
|
|
|
1122
1209
|
## 默认 workflow-run 模式
|
|
1123
1210
|
|
|
1124
|
-
1.
|
|
1125
|
-
2.
|
|
1126
|
-
3.
|
|
1211
|
+
1. **再次确认 workflow_name 已通过 search-first 流程选定**(参见"## ⚠️ workflow_name 处理规则")。
|
|
1212
|
+
2. 调 \`workflow_get(name)\`,确认 input schema、节点描述和 DAG 依赖。
|
|
1213
|
+
3. 从 original_prompt 提取合法 input。
|
|
1214
|
+
4. 没有 existing_sub_session_id 时调用 fresh \`workflow_run\`;有该 ID 时先调
|
|
1127
1215
|
\`workflow_run_status(run_id)\`,再以同一 ID 作为 session 恢复。runId == sessionId。
|
|
1128
1216
|
|
|
1129
1217
|
Copy-paste CLI 示例:
|
|
1130
1218
|
\`roy-agent workflow run roy-rd-with-trace -s workflow_run_1783407282099_1_ah8pho\`
|
|
1131
|
-
|
|
1132
|
-
|
|
1219
|
+
5. 对 \`completed\` / \`paused\` 返回真实 output;对 \`running\` / \`stopped\` 按真实状态报告。
|
|
1220
|
+
6. 对每次 \`failed\` / \`timeout\`,扫描你自己最近的 workflow_run tool results,推理连续失败次数。
|
|
1133
1221
|
|
|
1134
1222
|
## 连续 2 次失败阈值(由 LLM 自行推理)
|
|
1135
1223
|
|