@ai-setting/roy-agent-core 1.7.72 → 1.7.75
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/agent-component.js +6 -6
- package/dist/env/agent/agent-registry.d.ts +4 -1
- package/dist/env/agent/index.js +6 -6
- package/dist/env/error-reply.d.ts +46 -0
- package/dist/env/error-reply.js +3 -1
- package/dist/env/event-source/event-source-handlers.js +12 -12
- package/dist/env/event-source/index.js +13 -13
- package/dist/env/index.js +30 -30
- package/dist/env/llm/index.js +2 -2
- package/dist/env/llm/orphan-toolcall.d.ts +107 -0
- package/dist/env/plugin/index.js +3 -3
- package/dist/env/prompt/index.js +3 -3
- package/dist/env/prompt/prompts-index.d.ts +24 -2
- package/dist/env/session/index.js +4 -4
- package/dist/env/session/storage/index.js +3 -3
- package/dist/env/task/delegate/delegate-tool.d.ts +8 -0
- package/dist/env/task/delegate/delegate-tool.js +4 -4
- package/dist/env/task/delegate/index.js +4 -4
- package/dist/env/task/index.js +7 -7
- package/dist/env/task/mcp/index.js +2 -2
- package/dist/env/task/plugins/index.d.ts +3 -0
- package/dist/env/task/plugins/index.js +32 -9
- package/dist/env/task/plugins/lark-card-patch-notifier.d.ts +61 -0
- package/dist/env/task/plugins/lark-card-patch-notifier.js +6 -2
- package/dist/env/task/plugins/lark-cli-task-notify-plugin.d.ts +42 -0
- package/dist/env/task/prompt/index.js +1 -1
- package/dist/env/task/prompt/task-discipline.d.ts +9 -3
- package/dist/env/task/tools/cancel-tool.d.ts +28 -0
- package/dist/env/task/tools/index.d.ts +1 -0
- package/dist/env/task/tools/index.js +4 -2
- package/dist/env/task/tools/task-types.d.ts +22 -0
- package/dist/env/tool/built-in/compact-session-tool.d.ts +120 -0
- package/dist/env/tool/built-in/index.d.ts +2 -0
- package/dist/env/tool/built-in/index.js +6 -2
- package/dist/env/tool/index.js +4 -4
- package/dist/env/workflow/engine/index.js +6 -6
- package/dist/env/workflow/index.js +15 -13
- package/dist/env/workflow/plugins/index.js +2 -2
- package/dist/env/workflow/tools/ask-user-tool.d.ts +88 -0
- package/dist/env/workflow/tools/index.js +11 -9
- package/dist/env/workflow/tools/run-workflow.d.ts +2 -2
- package/dist/env/workflow/types/index.js +2 -2
- package/dist/env/workflow/types/workflow-hil.d.ts +25 -1
- package/dist/env/workflow/utils/index.js +5 -5
- package/dist/index.js +33 -33
- package/dist/shared/@ai-setting/{roy-agent-core-sm0sf6sb.js → roy-agent-core-0qyrk5k0.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-kmbct9yg.js → roy-agent-core-0snm5hc5.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-4jjwewvw.js → roy-agent-core-11shp00p.js} +31 -10
- package/dist/shared/@ai-setting/{roy-agent-core-yr1mryb8.js → roy-agent-core-1v4g0d4x.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-rxb00gjm.js → roy-agent-core-264qexac.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-34jz9mgh.js → roy-agent-core-29b6hc39.js} +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-2akfd64z.js +374 -0
- package/dist/shared/@ai-setting/{roy-agent-core-yhwxpj12.js → roy-agent-core-3e6gg17d.js} +90 -12
- package/dist/shared/@ai-setting/{roy-agent-core-skyc30qx.js → roy-agent-core-3fh1f7s7.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-2gzt2q8c.js → roy-agent-core-4gr3k7qg.js} +17 -4
- package/dist/shared/@ai-setting/{roy-agent-core-y12kyxwa.js → roy-agent-core-60jbrfye.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-add1zqsh.js → roy-agent-core-6cy43nss.js} +22 -1
- package/dist/shared/@ai-setting/{roy-agent-core-vah6g5yx.js → roy-agent-core-6rh8k6ba.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-kpg25s2q.js → roy-agent-core-8ez6mccb.js} +4 -2
- package/dist/shared/@ai-setting/{roy-agent-core-sjr1kmfz.js → roy-agent-core-acj8ag08.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-mds8tqd0.js → roy-agent-core-cgtq6427.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-pakhchy7.js → roy-agent-core-ddyk1rc0.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-jgb3bb42.js → roy-agent-core-djpq6yb0.js} +16 -7
- package/dist/shared/@ai-setting/{roy-agent-core-attpry6g.js → roy-agent-core-dqxec05w.js} +4 -3
- package/dist/shared/@ai-setting/{roy-agent-core-vm8h5zyj.js → roy-agent-core-ed233k5z.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-jrj30vq3.js → roy-agent-core-er070zjq.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-40rv283c.js → roy-agent-core-fghc2m8z.js} +152 -2
- package/dist/shared/@ai-setting/{roy-agent-core-7sj9xs9c.js → roy-agent-core-hnyk1by7.js} +110 -2
- package/dist/shared/@ai-setting/{roy-agent-core-7qvw65jt.js → roy-agent-core-jg65qnwa.js} +11 -8
- package/dist/shared/@ai-setting/{roy-agent-core-e25xkv53.js → roy-agent-core-mkc3zshb.js} +3 -1
- package/dist/shared/@ai-setting/{roy-agent-core-hfyfavp3.js → roy-agent-core-mww0mnd9.js} +231 -27
- package/dist/shared/@ai-setting/{roy-agent-core-wr7mv7k3.js → roy-agent-core-n9q1encx.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-46rv4d7d.js → roy-agent-core-nmx9934r.js} +92 -2
- package/dist/shared/@ai-setting/{roy-agent-core-1w9y7mxj.js → roy-agent-core-p3zv1mx5.js} +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-snvh4s2p.js +662 -0
- package/dist/shared/@ai-setting/{roy-agent-core-dt104qa1.js → roy-agent-core-v85n42ve.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-gr48c89p.js → roy-agent-core-v87njmq7.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-5gw0qa8m.js → roy-agent-core-y7x2qzwc.js} +553 -92
- package/package.json +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-1p6syv85.js +0 -1083
- package/dist/shared/@ai-setting/roy-agent-core-58804s3j.js +0 -155
|
@@ -24,10 +24,11 @@ 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-
|
|
29
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
27
|
+
} from "../../../shared/@ai-setting/roy-agent-core-mww0mnd9.js";
|
|
28
|
+
import"../../../shared/@ai-setting/roy-agent-core-ddyk1rc0.js";
|
|
29
|
+
import"../../../shared/@ai-setting/roy-agent-core-0qyrk5k0.js";
|
|
30
30
|
import"../../../shared/@ai-setting/roy-agent-core-12n08pg5.js";
|
|
31
|
+
import"../../../shared/@ai-setting/roy-agent-core-6cy43nss.js";
|
|
31
32
|
import {
|
|
32
33
|
WORKFLOW_SUBMIT_OUTPUT_TOOL_NAME,
|
|
33
34
|
WorkflowJsonOutputMarker,
|
|
@@ -36,16 +37,17 @@ import {
|
|
|
36
37
|
parseWorkflowJsonOutput
|
|
37
38
|
} from "../../../shared/@ai-setting/roy-agent-core-1db4vpc6.js";
|
|
38
39
|
import"../../../shared/@ai-setting/roy-agent-core-7exqwax1.js";
|
|
39
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
40
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
41
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
40
|
+
import"../../../shared/@ai-setting/roy-agent-core-1v4g0d4x.js";
|
|
41
|
+
import"../../../shared/@ai-setting/roy-agent-core-cgtq6427.js";
|
|
42
|
+
import"../../../shared/@ai-setting/roy-agent-core-er070zjq.js";
|
|
42
43
|
import"../../../shared/@ai-setting/roy-agent-core-rvxg1wps.js";
|
|
43
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
44
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
44
|
+
import"../../../shared/@ai-setting/roy-agent-core-0snm5hc5.js";
|
|
45
|
+
import"../../../shared/@ai-setting/roy-agent-core-fghc2m8z.js";
|
|
45
46
|
import"../../../shared/@ai-setting/roy-agent-core-zjdzk1gg.js";
|
|
46
47
|
import"../../../shared/@ai-setting/roy-agent-core-c1v263jn.js";
|
|
47
48
|
import"../../../shared/@ai-setting/roy-agent-core-ntn32q7j.js";
|
|
48
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
49
|
+
import"../../../shared/@ai-setting/roy-agent-core-mkc3zshb.js";
|
|
50
|
+
import"../../../shared/@ai-setting/roy-agent-core-m880qz3y.js";
|
|
49
51
|
import"../../../shared/@ai-setting/roy-agent-core-7hh0brvs.js";
|
|
50
52
|
import"../../../shared/@ai-setting/roy-agent-core-pgvcf91v.js";
|
|
51
53
|
import"../../../shared/@ai-setting/roy-agent-core-ax9e9szb.js";
|
|
@@ -72,14 +72,14 @@ export declare const RunWorkflowInputSchema: z.ZodObject<{
|
|
|
72
72
|
}, "strict", z.ZodTypeAny, {
|
|
73
73
|
workflow_name: string;
|
|
74
74
|
input?: Record<string, any> | undefined;
|
|
75
|
-
timeout?: number | undefined;
|
|
76
75
|
session?: string | undefined;
|
|
76
|
+
timeout?: number | undefined;
|
|
77
77
|
node_config?: Record<string, Record<string, any>> | undefined;
|
|
78
78
|
}, {
|
|
79
79
|
workflow_name: string;
|
|
80
80
|
input?: Record<string, any> | undefined;
|
|
81
|
-
timeout?: number | undefined;
|
|
82
81
|
session?: string | undefined;
|
|
82
|
+
timeout?: number | undefined;
|
|
83
83
|
node_config?: Record<string, Record<string, any>> | undefined;
|
|
84
84
|
}>;
|
|
85
85
|
export type RunWorkflowInput = z.infer<typeof RunWorkflowInputSchema>;
|
|
@@ -49,12 +49,12 @@ import {
|
|
|
49
49
|
parseWorkflowFileSync,
|
|
50
50
|
pathNotFound,
|
|
51
51
|
unresolvedVariable
|
|
52
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
52
|
+
} from "../../../shared/@ai-setting/roy-agent-core-er070zjq.js";
|
|
53
53
|
import {
|
|
54
54
|
AskUserError,
|
|
55
55
|
createNodeInterruptEvent,
|
|
56
56
|
createWorkflowAskUserEvent
|
|
57
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
57
|
+
} from "../../../shared/@ai-setting/roy-agent-core-mkc3zshb.js";
|
|
58
58
|
import"../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
59
59
|
init_types();
|
|
60
60
|
|
|
@@ -47,9 +47,33 @@ export declare class AskUserError extends Error {
|
|
|
47
47
|
readonly query: string;
|
|
48
48
|
readonly agentSessionId?: string | undefined;
|
|
49
49
|
readonly timestamp: number;
|
|
50
|
+
/**
|
|
51
|
+
* ★ Task #4983 — 问题**是否已经投递到用户渠道**。
|
|
52
|
+
*
|
|
53
|
+
* 语义:`true` = 工具层已经把问题正文发到 IM 渠道(用户已看到),
|
|
54
|
+
* `false` / 缺省 = **没投成** ⇒ CLI 层应当兜底补投。
|
|
55
|
+
*
|
|
56
|
+
* 为什么需要:core 的 ask_user 工具层是**主修**(抛错前投递),
|
|
57
|
+
* 但它依赖 EnvContext 里有 replyChannel —— 拿不到就投不了。
|
|
58
|
+
* CLI 层(query-executor)是**兜底**。两层靠这个标记**互斥**,
|
|
59
|
+
* 避免用户收到两条同样的问题。
|
|
60
|
+
*/
|
|
61
|
+
readonly delivered: boolean;
|
|
50
62
|
readonly type = "ask-user";
|
|
51
63
|
readonly name = "AskUserError";
|
|
52
|
-
constructor(runId: string, sessionId: string, nodeId: string, nodeType: string, query: string, agentSessionId?: string | undefined, timestamp?: number
|
|
64
|
+
constructor(runId: string, sessionId: string, nodeId: string, nodeType: string, query: string, agentSessionId?: string | undefined, timestamp?: number,
|
|
65
|
+
/**
|
|
66
|
+
* ★ Task #4983 — 问题**是否已经投递到用户渠道**。
|
|
67
|
+
*
|
|
68
|
+
* 语义:`true` = 工具层已经把问题正文发到 IM 渠道(用户已看到),
|
|
69
|
+
* `false` / 缺省 = **没投成** ⇒ CLI 层应当兜底补投。
|
|
70
|
+
*
|
|
71
|
+
* 为什么需要:core 的 ask_user 工具层是**主修**(抛错前投递),
|
|
72
|
+
* 但它依赖 EnvContext 里有 replyChannel —— 拿不到就投不了。
|
|
73
|
+
* CLI 层(query-executor)是**兜底**。两层靠这个标记**互斥**,
|
|
74
|
+
* 避免用户收到两条同样的问题。
|
|
75
|
+
*/
|
|
76
|
+
delivered?: boolean);
|
|
53
77
|
/**
|
|
54
78
|
* 转换为 WorkflowAskUserEvent
|
|
55
79
|
*/
|
|
@@ -14,20 +14,20 @@ import {
|
|
|
14
14
|
hasClosedOutputContract,
|
|
15
15
|
validateTemplateContracts,
|
|
16
16
|
validateWorkflowDefinition
|
|
17
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
17
|
+
} from "../../../shared/@ai-setting/roy-agent-core-1v4g0d4x.js";
|
|
18
18
|
import {
|
|
19
19
|
TemplateResolver,
|
|
20
20
|
init_template_resolver,
|
|
21
21
|
resolveTemplateString,
|
|
22
22
|
resolveTemplates
|
|
23
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
23
|
+
} from "../../../shared/@ai-setting/roy-agent-core-acj8ag08.js";
|
|
24
24
|
import {
|
|
25
25
|
getFromMapWithNormalization,
|
|
26
26
|
init_node_id_utils
|
|
27
27
|
} from "../../../shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
28
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
29
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
30
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
28
|
+
import"../../../shared/@ai-setting/roy-agent-core-cgtq6427.js";
|
|
29
|
+
import"../../../shared/@ai-setting/roy-agent-core-er070zjq.js";
|
|
30
|
+
import"../../../shared/@ai-setting/roy-agent-core-mkc3zshb.js";
|
|
31
31
|
import {
|
|
32
32
|
TracedAs,
|
|
33
33
|
init_decorator
|
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-29b6hc39.js";
|
|
5
5
|
import {
|
|
6
6
|
LLMComponent,
|
|
7
7
|
LLMConfigSchema,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
ModelLimitsSchema,
|
|
10
10
|
ProviderCapabilitiesSchema,
|
|
11
11
|
ProviderConfigSchema
|
|
12
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
12
|
+
} from "./shared/@ai-setting/roy-agent-core-264qexac.js";
|
|
13
13
|
import"./shared/@ai-setting/roy-agent-core-wjmwwc4a.js";
|
|
14
14
|
import"./shared/@ai-setting/roy-agent-core-pnj0zh25.js";
|
|
15
15
|
import {
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
grepTool,
|
|
22
22
|
readFileTool,
|
|
23
23
|
writeFileTool
|
|
24
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
24
|
+
} from "./shared/@ai-setting/roy-agent-core-8ez6mccb.js";
|
|
25
25
|
import {
|
|
26
26
|
getUnderstandImageLLMProvider,
|
|
27
27
|
resetUnderstandImageLLMProvider,
|
|
@@ -62,21 +62,21 @@ import {
|
|
|
62
62
|
BaseEnvironment,
|
|
63
63
|
generateDescendingId,
|
|
64
64
|
generateId
|
|
65
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
65
|
+
} from "./shared/@ai-setting/roy-agent-core-snvh4s2p.js";
|
|
66
66
|
import {
|
|
67
67
|
TaskComponent
|
|
68
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
69
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
68
|
+
} from "./shared/@ai-setting/roy-agent-core-4gr3k7qg.js";
|
|
69
|
+
import"./shared/@ai-setting/roy-agent-core-2akfd64z.js";
|
|
70
70
|
import"./shared/@ai-setting/roy-agent-core-jm136jzh.js";
|
|
71
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
71
|
+
import"./shared/@ai-setting/roy-agent-core-jg65qnwa.js";
|
|
72
72
|
import"./shared/@ai-setting/roy-agent-core-fttgm52a.js";
|
|
73
73
|
import"./shared/@ai-setting/roy-agent-core-ntq0gz7q.js";
|
|
74
74
|
import"./shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
75
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
75
|
+
import"./shared/@ai-setting/roy-agent-core-hnyk1by7.js";
|
|
76
76
|
import"./shared/@ai-setting/roy-agent-core-p5cz9m8v.js";
|
|
77
77
|
import {
|
|
78
78
|
EventSourceComponent
|
|
79
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
79
|
+
} from "./shared/@ai-setting/roy-agent-core-n9q1encx.js";
|
|
80
80
|
import {
|
|
81
81
|
BountyIMInstance,
|
|
82
82
|
COMMAND_PREFIX,
|
|
@@ -108,7 +108,7 @@ import {
|
|
|
108
108
|
timerHandler,
|
|
109
109
|
translateCardActionToCommand,
|
|
110
110
|
writeFallbackModelList
|
|
111
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
111
|
+
} from "./shared/@ai-setting/roy-agent-core-60jbrfye.js";
|
|
112
112
|
import {
|
|
113
113
|
BUILT_IN_EVENT_SOURCE_TYPES,
|
|
114
114
|
BUILT_IN_EVENT_SOURCE_TYPE_LIST,
|
|
@@ -118,7 +118,6 @@ import {
|
|
|
118
118
|
isValidEventSourceType,
|
|
119
119
|
validateEventSourceConfig
|
|
120
120
|
} from "./shared/@ai-setting/roy-agent-core-bxkjk7zx.js";
|
|
121
|
-
import"./shared/@ai-setting/roy-agent-core-add1zqsh.js";
|
|
122
121
|
import {
|
|
123
122
|
CLI_COMMAND_ES_TYPE,
|
|
124
123
|
CLI_SESSION_CHAT_ID_PREFIX,
|
|
@@ -133,7 +132,7 @@ import {
|
|
|
133
132
|
import {
|
|
134
133
|
TaskTagPlugin,
|
|
135
134
|
createAutoTaskPlugin
|
|
136
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
135
|
+
} from "./shared/@ai-setting/roy-agent-core-y7x2qzwc.js";
|
|
137
136
|
import {
|
|
138
137
|
EventStoreImpl,
|
|
139
138
|
getSharedEventStore,
|
|
@@ -143,7 +142,7 @@ import {
|
|
|
143
142
|
import {
|
|
144
143
|
getBuiltInPrompt,
|
|
145
144
|
getBuiltInPromptNames
|
|
146
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
145
|
+
} from "./shared/@ai-setting/roy-agent-core-3e6gg17d.js";
|
|
147
146
|
import {
|
|
148
147
|
SQLiteTaskStore,
|
|
149
148
|
getDefaultTaskDbPath
|
|
@@ -158,12 +157,12 @@ import {
|
|
|
158
157
|
TASK_DISCIPLINE_LIFECYCLE,
|
|
159
158
|
TASK_DISCIPLINE_OPERATION,
|
|
160
159
|
TASK_DISCIPLINE_PROMPT
|
|
161
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
162
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
163
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
160
|
+
} from "./shared/@ai-setting/roy-agent-core-11shp00p.js";
|
|
161
|
+
import"./shared/@ai-setting/roy-agent-core-p3zv1mx5.js";
|
|
162
|
+
import"./shared/@ai-setting/roy-agent-core-nmx9934r.js";
|
|
164
163
|
import {
|
|
165
164
|
WorkflowComponent
|
|
166
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
165
|
+
} from "./shared/@ai-setting/roy-agent-core-v87njmq7.js";
|
|
167
166
|
import {
|
|
168
167
|
init_node_registry_helper,
|
|
169
168
|
registerDecoratorNodeType
|
|
@@ -176,28 +175,29 @@ import {
|
|
|
176
175
|
createWorkflowFromClass
|
|
177
176
|
} from "./shared/@ai-setting/roy-agent-core-h0x19xgn.js";
|
|
178
177
|
import"./shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
179
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
178
|
+
import"./shared/@ai-setting/roy-agent-core-mww0mnd9.js";
|
|
180
179
|
import {
|
|
181
180
|
SessionComponent
|
|
182
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
181
|
+
} from "./shared/@ai-setting/roy-agent-core-ddyk1rc0.js";
|
|
183
182
|
import {
|
|
184
183
|
MemorySessionStore
|
|
185
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
184
|
+
} from "./shared/@ai-setting/roy-agent-core-0qyrk5k0.js";
|
|
186
185
|
import"./shared/@ai-setting/roy-agent-core-hhrg314p.js";
|
|
187
186
|
import"./shared/@ai-setting/roy-agent-core-12n08pg5.js";
|
|
188
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
187
|
+
import"./shared/@ai-setting/roy-agent-core-6cy43nss.js";
|
|
188
|
+
import"./shared/@ai-setting/roy-agent-core-6rh8k6ba.js";
|
|
189
189
|
import"./shared/@ai-setting/roy-agent-core-6atd905e.js";
|
|
190
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
190
|
+
import"./shared/@ai-setting/roy-agent-core-dqxec05w.js";
|
|
191
191
|
import"./shared/@ai-setting/roy-agent-core-efkjyh69.js";
|
|
192
192
|
import"./shared/@ai-setting/roy-agent-core-1db4vpc6.js";
|
|
193
193
|
import"./shared/@ai-setting/roy-agent-core-dvtg4sn0.js";
|
|
194
194
|
import"./shared/@ai-setting/roy-agent-core-c2gbt68e.js";
|
|
195
195
|
import"./shared/@ai-setting/roy-agent-core-7exqwax1.js";
|
|
196
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
197
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
196
|
+
import"./shared/@ai-setting/roy-agent-core-1v4g0d4x.js";
|
|
197
|
+
import"./shared/@ai-setting/roy-agent-core-acj8ag08.js";
|
|
198
198
|
import"./shared/@ai-setting/roy-agent-core-ddwa0n6h.js";
|
|
199
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
200
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
199
|
+
import"./shared/@ai-setting/roy-agent-core-cgtq6427.js";
|
|
200
|
+
import"./shared/@ai-setting/roy-agent-core-er070zjq.js";
|
|
201
201
|
import"./shared/@ai-setting/roy-agent-core-rvxg1wps.js";
|
|
202
202
|
import {
|
|
203
203
|
CommandsComponent
|
|
@@ -206,23 +206,23 @@ import"./shared/@ai-setting/roy-agent-core-jagkferh.js";
|
|
|
206
206
|
import {
|
|
207
207
|
AgentComponent,
|
|
208
208
|
AgentComponentConfigSchema
|
|
209
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
209
|
+
} from "./shared/@ai-setting/roy-agent-core-djpq6yb0.js";
|
|
210
210
|
import {
|
|
211
211
|
ToolComponent,
|
|
212
212
|
ToolRegistry,
|
|
213
213
|
ToolValidator
|
|
214
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
214
|
+
} from "./shared/@ai-setting/roy-agent-core-v85n42ve.js";
|
|
215
215
|
import"./shared/@ai-setting/roy-agent-core-jvv2h3d6.js";
|
|
216
216
|
import {
|
|
217
217
|
AgentRegistry
|
|
218
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
218
|
+
} from "./shared/@ai-setting/roy-agent-core-ed233k5z.js";
|
|
219
219
|
import {
|
|
220
220
|
XDG_PATHS,
|
|
221
221
|
getXDGPath,
|
|
222
222
|
getXDGPaths
|
|
223
223
|
} from "./shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
224
224
|
import"./shared/@ai-setting/roy-agent-core-f77k3gqt.js";
|
|
225
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
225
|
+
import"./shared/@ai-setting/roy-agent-core-0snm5hc5.js";
|
|
226
226
|
import {
|
|
227
227
|
buildOpencodeHeaders,
|
|
228
228
|
createInvokeConfig,
|
|
@@ -231,7 +231,7 @@ import {
|
|
|
231
231
|
isOpencodeEndpoint,
|
|
232
232
|
isOpencodeProvider,
|
|
233
233
|
parseModelString
|
|
234
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
234
|
+
} from "./shared/@ai-setting/roy-agent-core-fghc2m8z.js";
|
|
235
235
|
import {
|
|
236
236
|
ATTACH_FILE_MAX_BYTES,
|
|
237
237
|
isMediaType,
|
|
@@ -243,14 +243,14 @@ import"./shared/@ai-setting/roy-agent-core-ntn32q7j.js";
|
|
|
243
243
|
import {
|
|
244
244
|
AskUserError,
|
|
245
245
|
init_workflow_hil
|
|
246
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
246
|
+
} from "./shared/@ai-setting/roy-agent-core-mkc3zshb.js";
|
|
247
247
|
import {
|
|
248
248
|
PluginComponent
|
|
249
249
|
} from "./shared/@ai-setting/roy-agent-core-v6vr6za7.js";
|
|
250
|
-
import"./shared/@ai-setting/roy-agent-core-m880qz3y.js";
|
|
251
250
|
import {
|
|
252
251
|
BasePlugin
|
|
253
252
|
} from "./shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
253
|
+
import"./shared/@ai-setting/roy-agent-core-m880qz3y.js";
|
|
254
254
|
import {
|
|
255
255
|
McpComponent
|
|
256
256
|
} from "./shared/@ai-setting/roy-agent-core-6j02sbee.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SessionMessageConverter
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-0snm5hc5.js";
|
|
4
4
|
import {
|
|
5
5
|
canonicalizeParts
|
|
6
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-fghc2m8z.js";
|
|
7
7
|
import {
|
|
8
8
|
createLogger,
|
|
9
9
|
init_logger
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
var TASK_COMPLETE_ITEM_BY_ITEM = "按子项逐条验收";
|
|
3
3
|
var TASK_COMPLETION_HINT_ANCHOR = "TASK_COMPLETION_HINT";
|
|
4
4
|
var TASK_COMPLETE_VERIFY_DUTY = "核实义务";
|
|
5
|
+
var TASK_COMPLETE_ACCEPTANCE = {
|
|
6
|
+
itemByItem: TASK_COMPLETE_ITEM_BY_ITEM,
|
|
7
|
+
hintAnchor: TASK_COMPLETION_HINT_ANCHOR,
|
|
8
|
+
verifyDuty: TASK_COMPLETE_VERIFY_DUTY
|
|
9
|
+
};
|
|
5
10
|
|
|
6
11
|
// src/env/task/prompt/task-discipline.ts
|
|
7
12
|
var TASK_DISCIPLINE_LIFECYCLE = `### Task Lifecycle (7 steps, 0-6)
|
|
@@ -52,13 +57,18 @@ var TASK_DISCIPLINE_LIFECYCLE = `### Task Lifecycle (7 steps, 0-6)
|
|
|
52
57
|
|
|
53
58
|
4. TRACK
|
|
54
59
|
- Update progress (0-100%) as the work advances
|
|
55
|
-
- Update status: todo → active
|
|
60
|
+
- Update status: todo → active
|
|
56
61
|
- Record \`current_status\` with human-readable progress
|
|
62
|
+
- ⚠️ **不要**把 status 直接置为 \`completed\` —— 终态由验收方落(见步骤 6)
|
|
57
63
|
|
|
58
64
|
5. RECORD — operation records (see Operation Discipline below)
|
|
59
65
|
|
|
60
|
-
6. COMPLETE —
|
|
61
|
-
|
|
66
|
+
6. COMPLETE — 收尾分两种角色(Task #5007,验收权分离)
|
|
67
|
+
- **执行方(roy sub-agent)**:进度达到你判断的 100% ⇒ \`task_update(progress=100)\`
|
|
68
|
+
+ 最后一条 \`task_operation_create\` ⇒ **结束并返回结果**。
|
|
69
|
+
❌ **不要调用 \`task_complete\`**(你无此权限)。
|
|
70
|
+
- **验收方(default agent / 接待员)**:\`task_complete\` after item-by-item verification
|
|
71
|
+
(see Complete Discipline below)`.trim();
|
|
62
72
|
var TASK_DISCIPLINE_OPERATION = `### Operation Record — 双维度分工规范
|
|
63
73
|
|
|
64
74
|
**Record milestones as you work** — call \`task_operation_create\` the moment a
|
|
@@ -124,7 +134,11 @@ Reference the four atomic assertion forms (Task #4768
|
|
|
124
134
|
- 进程断言 (process assertion): command exit code / stdout match
|
|
125
135
|
- 测试断言 (test assertion): pass/fail counts, no NEW fail
|
|
126
136
|
- 状态断言 (state assertion): version number / HTTP 200 / status field`;
|
|
127
|
-
var TASK_DISCIPLINE_COMPLETE = `### Task Complete —
|
|
137
|
+
var TASK_DISCIPLINE_COMPLETE = `### Task Complete — 核实义务(**仅验收方适用**)
|
|
138
|
+
|
|
139
|
+
> ⚠️ **角色作用域(Task #5007)**:本节是**验收方**(default agent / 接待员)的动作。
|
|
140
|
+
> 若你是**执行方**(roy sub-agent),你没有 \`task_complete\` 权限 ——
|
|
141
|
+
> 你的收尾动作是「进度推到 100% + 记完操作记录 + 结束返回」,验收由主智能体负责。
|
|
128
142
|
|
|
129
143
|
Before calling \`task_complete\`, you MUST:
|
|
130
144
|
|
|
@@ -142,12 +156,19 @@ Before calling \`task_complete\`, you MUST:
|
|
|
142
156
|
\`[${TASK_COMPLETION_HINT_ANCHOR}]\`.
|
|
143
157
|
- **If you receive a [${TASK_COMPLETION_HINT_ANCHOR}]**, you MUST verify it
|
|
144
158
|
(${TASK_COMPLETE_VERIFY_DUTY}): re-read the task via \`task_get\`, then do exactly one of:
|
|
145
|
-
(a) 确认未完成 →
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
159
|
+
(a) 确认未完成 → **重新委托**(用你的委托工具 + 同一 sub-session 续跑,
|
|
160
|
+
在指令里写明"目标尚未达成,需要补 X/Y/Z"),由 sub-agent 用
|
|
161
|
+
\`task_update(status=active)\` 重开并继续推进;若你**自己就是执行方**
|
|
162
|
+
(有 \`task_update\` 权限),则直接 \`task_update(status=todo)\` 重开;或
|
|
163
|
+
(b) 确认已完成 → **用你手上有权限的写工具**落一条 \`decision\` 类操作记录
|
|
164
|
+
(\`task_operation_create\`,milestone_type=decision,milestone_title=<一行结论>)
|
|
165
|
+
说明子项实际已达成(说明理由)。若你没有该工具的权限(验收方场景),
|
|
166
|
+
就通过你的**委托工具**让 sub-agent 代写这条记录,或在 \`task_complete\`
|
|
167
|
+
的 \`deliverable_storage_path\` / 最终汇报里明确写出核实结论与证据。
|
|
150
168
|
Never ignore it (不允许无视).
|
|
169
|
+
⚠️ **核实义务的两条路径都依赖写权限**(\`task_update\` / \`task_operation_create\`)。
|
|
170
|
+
若这些工具对你**不可用**(如验收方不持有执行类工具),必须**改用委托**把动作
|
|
171
|
+
交回给有权限的 sub-agent 执行 —— 不要试图调用不可用的工具(会被拦掉并浪费一轮迭代)。
|
|
151
172
|
- If the goal and delivery mismatch **without** a hint, either:
|
|
152
173
|
(a) extend the task via \`task_update\`, or
|
|
153
174
|
(b) record the discrepancy via \`task_operation_create\`
|
|
@@ -179,4 +200,4 @@ var TASK_DISCIPLINE_PROMPT = [
|
|
|
179
200
|
|
|
180
201
|
`);
|
|
181
202
|
|
|
182
|
-
export { TASK_COMPLETE_ITEM_BY_ITEM, TASK_COMPLETION_HINT_ANCHOR, TASK_COMPLETE_VERIFY_DUTY, TASK_DISCIPLINE_LIFECYCLE, TASK_DISCIPLINE_OPERATION, TASK_DISCIPLINE_GOALS, TASK_DISCIPLINE_COMPLETE, TASK_DISCIPLINE_PROMPT };
|
|
203
|
+
export { TASK_COMPLETE_ITEM_BY_ITEM, TASK_COMPLETION_HINT_ANCHOR, TASK_COMPLETE_VERIFY_DUTY, TASK_COMPLETE_ACCEPTANCE, TASK_DISCIPLINE_LIFECYCLE, TASK_DISCIPLINE_OPERATION, TASK_DISCIPLINE_GOALS, TASK_DISCIPLINE_COMPLETE, TASK_DISCIPLINE_PROMPT };
|