@ai-setting/roy-agent-core 1.5.47 → 1.5.49
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 -5
- package/dist/env/agent/index.js +6 -5
- package/dist/env/commands/index.js +6 -5
- package/dist/env/context/index.js +9 -3
- package/dist/env/debug/index.js +6 -5
- package/dist/env/event-source/index.js +8 -7
- package/dist/env/hook/index.js +4 -3
- package/dist/env/index.js +20 -19
- package/dist/env/llm/index.js +6 -5
- package/dist/env/log-trace/index.js +6 -5
- package/dist/env/mcp/index.js +6 -5
- package/dist/env/memory/index.js +6 -5
- package/dist/env/plugin/index.js +6 -5
- package/dist/env/prompt/index.js +6 -5
- package/dist/env/session/index.js +6 -5
- package/dist/env/skill/index.js +6 -5
- package/dist/env/task/delegate/index.js +4 -3
- package/dist/env/task/index.js +15 -10
- package/dist/env/task/plugins/index.js +3 -2
- package/dist/env/task/storage/index.js +1 -1
- package/dist/env/task/tools/index.js +5 -1
- package/dist/env/tool/index.js +6 -5
- package/dist/env/workflow/engine/index.js +6 -5
- package/dist/env/workflow/index.js +9 -8
- package/dist/index.js +34 -28
- package/dist/shared/@ai-setting/{roy-agent-core-4gmxjdhn.js → roy-agent-core-14fna5qg.js} +4 -2
- package/dist/shared/@ai-setting/{roy-agent-core-2rtka82a.js → roy-agent-core-1a38hg1q.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-pm73be85.js → roy-agent-core-2m5qnhv9.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-1t5esk1r.js → roy-agent-core-3nw9vxp2.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-pyv1vb7v.js → roy-agent-core-476ewnwy.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-mjbfgqen.js → roy-agent-core-4zjdkqry.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-a23brrex.js → roy-agent-core-5dkewp2h.js} +60 -3
- package/dist/shared/@ai-setting/{roy-agent-core-hdszq729.js → roy-agent-core-607ktjxs.js} +7 -5
- package/dist/shared/@ai-setting/{roy-agent-core-wa1kzqky.js → roy-agent-core-7qj11qp8.js} +46 -2
- package/dist/shared/@ai-setting/roy-agent-core-8f8dq3kj.js +13 -0
- package/dist/shared/@ai-setting/{roy-agent-core-eftqdsy5.js → roy-agent-core-8whpa5yz.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-zwq6vhpj.js → roy-agent-core-bjphrqsm.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-a67e90d1.js → roy-agent-core-cv8kqab8.js} +175 -6
- package/dist/shared/@ai-setting/{roy-agent-core-1rzpnycm.js → roy-agent-core-d40gbvzj.js} +3 -2
- package/dist/shared/@ai-setting/{roy-agent-core-rm3hay00.js → roy-agent-core-dre9rcs0.js} +7 -6
- package/dist/shared/@ai-setting/{roy-agent-core-rx74rye7.js → roy-agent-core-dvrfs18y.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-hsxn8m1j.js → roy-agent-core-e8eefm0k.js} +109 -6
- package/dist/shared/@ai-setting/{roy-agent-core-jqq7c2rk.js → roy-agent-core-g3j3ftbw.js} +45 -22
- package/dist/shared/@ai-setting/{roy-agent-core-6e3wz81d.js → roy-agent-core-gfzqwb6v.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-twd8kzag.js → roy-agent-core-h6bqx4jj.js} +5 -4
- package/dist/shared/@ai-setting/{roy-agent-core-kzbj10gk.js → roy-agent-core-n1awj8ks.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-rgj6hq15.js → roy-agent-core-nxf64fn4.js} +4 -2
- package/dist/shared/@ai-setting/{roy-agent-core-ebap34m2.js → roy-agent-core-pxp9yq24.js} +4 -3
- package/dist/shared/@ai-setting/{roy-agent-core-ja9qhg6d.js → roy-agent-core-rrsn14cr.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-4k9a823d.js → roy-agent-core-rwt7b6dh.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-38sc085e.js → roy-agent-core-sj2yd6g4.js} +17 -6
- package/dist/shared/@ai-setting/{roy-agent-core-sk535ft2.js → roy-agent-core-wv9as4ds.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-20fm423j.js → roy-agent-core-xpw0mtfv.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-ztx5eh72.js → roy-agent-core-ym6qbh1e.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-t1ytby5n.js → roy-agent-core-yv7dppda.js} +11 -6
- package/dist/shared/@ai-setting/{roy-agent-core-vdwvamre.js → roy-agent-core-z3pq1nx9.js} +1 -1
- package/package.json +1 -1
|
@@ -20,15 +20,18 @@ import {
|
|
|
20
20
|
} from "./roy-agent-core-qxhq8ven.js";
|
|
21
21
|
import {
|
|
22
22
|
BaseComponent
|
|
23
|
-
} from "./roy-agent-core-
|
|
23
|
+
} from "./roy-agent-core-gfzqwb6v.js";
|
|
24
24
|
import {
|
|
25
25
|
globalHookManager,
|
|
26
26
|
init_global_hook_manager
|
|
27
|
-
} from "./roy-agent-core-
|
|
27
|
+
} from "./roy-agent-core-nxf64fn4.js";
|
|
28
28
|
import {
|
|
29
|
-
init_context
|
|
29
|
+
init_context
|
|
30
|
+
} from "./roy-agent-core-8f8dq3kj.js";
|
|
31
|
+
import {
|
|
32
|
+
getCurrentTaskId,
|
|
30
33
|
runWithEnvContextAsync
|
|
31
|
-
} from "./roy-agent-core-
|
|
34
|
+
} from "./roy-agent-core-dre9rcs0.js";
|
|
32
35
|
import {
|
|
33
36
|
createLogger,
|
|
34
37
|
init_logger
|
|
@@ -954,11 +957,19 @@ class AgentComponent extends BaseComponent {
|
|
|
954
957
|
content: ctx.systemPrompt
|
|
955
958
|
});
|
|
956
959
|
}
|
|
957
|
-
|
|
960
|
+
let additionInfo = ctx.context?.additionInfo || "";
|
|
961
|
+
const currentTaskId = getCurrentTaskId();
|
|
962
|
+
if (currentTaskId !== undefined) {
|
|
963
|
+
const taskInfo = `[当前 Task #${currentTaskId}] 提醒:当前正在处理 Task #${currentTaskId},可通过 task_get #${currentTaskId} 查看任务详情,通过 task_operation_list 查看操作记录。`;
|
|
964
|
+
additionInfo = additionInfo ? `${additionInfo}
|
|
965
|
+
|
|
966
|
+
${taskInfo}` : taskInfo;
|
|
967
|
+
}
|
|
968
|
+
if (additionInfo) {
|
|
958
969
|
messages.push({
|
|
959
970
|
role: "user",
|
|
960
971
|
content: `额外信息:
|
|
961
|
-
${
|
|
972
|
+
${additionInfo}`
|
|
962
973
|
});
|
|
963
974
|
}
|
|
964
975
|
messages.push(...ctx.messages);
|
|
@@ -12,12 +12,12 @@ import {
|
|
|
12
12
|
} from "./roy-agent-core-qxhq8ven.js";
|
|
13
13
|
import {
|
|
14
14
|
BaseComponent
|
|
15
|
-
} from "./roy-agent-core-
|
|
15
|
+
} from "./roy-agent-core-gfzqwb6v.js";
|
|
16
16
|
import {
|
|
17
17
|
LLMHookPoints,
|
|
18
18
|
globalHookManager,
|
|
19
19
|
init_global_hook_manager
|
|
20
|
-
} from "./roy-agent-core-
|
|
20
|
+
} from "./roy-agent-core-nxf64fn4.js";
|
|
21
21
|
import {
|
|
22
22
|
createLogger,
|
|
23
23
|
init_logger
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
BackgroundTaskManager,
|
|
6
6
|
createDelegateTool,
|
|
7
7
|
createStopTool
|
|
8
|
-
} from "./roy-agent-core-
|
|
8
|
+
} from "./roy-agent-core-g3j3ftbw.js";
|
|
9
9
|
import {
|
|
10
10
|
SQLiteTaskStore,
|
|
11
11
|
getDefaultTaskDbPath
|
|
12
|
-
} from "./roy-agent-core-
|
|
12
|
+
} from "./roy-agent-core-e8eefm0k.js";
|
|
13
13
|
import {
|
|
14
14
|
completeTaskTool,
|
|
15
15
|
createTaskTool,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
getTaskTool,
|
|
18
18
|
listTasksTool,
|
|
19
19
|
updateTaskTool
|
|
20
|
-
} from "./roy-agent-core-
|
|
20
|
+
} from "./roy-agent-core-7qj11qp8.js";
|
|
21
21
|
import {
|
|
22
22
|
createOperationTool,
|
|
23
23
|
deleteOperationTool,
|
|
@@ -37,11 +37,11 @@ import {
|
|
|
37
37
|
} from "./roy-agent-core-qxhq8ven.js";
|
|
38
38
|
import {
|
|
39
39
|
BaseComponent
|
|
40
|
-
} from "./roy-agent-core-
|
|
40
|
+
} from "./roy-agent-core-gfzqwb6v.js";
|
|
41
41
|
import {
|
|
42
42
|
globalHookManager,
|
|
43
43
|
init_global_hook_manager
|
|
44
|
-
} from "./roy-agent-core-
|
|
44
|
+
} from "./roy-agent-core-nxf64fn4.js";
|
|
45
45
|
import {
|
|
46
46
|
createLogger,
|
|
47
47
|
init_logger
|
|
@@ -422,6 +422,10 @@ class TaskComponent extends BaseComponent {
|
|
|
422
422
|
return this.store.listTasks(options);
|
|
423
423
|
}
|
|
424
424
|
async completeTask(id, sessionId) {
|
|
425
|
+
const existing = await this.store.getTask(id);
|
|
426
|
+
if (existing && existing.type === "cycle") {
|
|
427
|
+
throw new Error(`Cannot complete cycle task: #${id} - ${existing.title}. Cycle tasks are not meant to be completed.`);
|
|
428
|
+
}
|
|
425
429
|
const task = await this.updateTask(id, {
|
|
426
430
|
status: "completed",
|
|
427
431
|
progress: 100
|
|
@@ -500,6 +504,7 @@ __legacyDecorateClassTS([
|
|
|
500
504
|
import { z } from "zod";
|
|
501
505
|
var TaskStatusEnum = z.enum(["todo", "active", "completed", "paused", "cancelled"]);
|
|
502
506
|
var TaskPriorityEnum = z.enum(["low", "medium", "high"]);
|
|
507
|
+
var TaskTypeEnum = z.enum(["normal", "cycle", "longterm"]);
|
|
503
508
|
var ActionTypeEnum = z.enum([
|
|
504
509
|
"create",
|
|
505
510
|
"progress",
|
|
@@ -517,4 +522,4 @@ var TaskConfigSchema = z.object({
|
|
|
517
522
|
dbPath: z.string().optional()
|
|
518
523
|
}).default({})
|
|
519
524
|
}).default({});
|
|
520
|
-
export { TaskComponent, TaskStatusEnum, TaskPriorityEnum, ActionTypeEnum, TaskConfigSchema };
|
|
525
|
+
export { TaskComponent, TaskStatusEnum, TaskPriorityEnum, TaskTypeEnum, ActionTypeEnum, TaskConfigSchema };
|