@ai-setting/roy-agent-core 1.7.63 → 1.7.65
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 +9 -9
- package/dist/env/agent/agent-component.js +15 -15
- package/dist/env/agent/index.js +15 -15
- package/dist/env/commands/index.js +9 -9
- package/dist/env/context/index.js +5 -5
- package/dist/env/debug/index.js +9 -9
- package/dist/env/environment.d.ts +27 -0
- package/dist/env/error-reply.js +3 -3
- package/dist/env/event-source/bounty-im-handler.d.ts +1 -1
- package/dist/env/event-source/cli-command-handler.js +3 -3
- package/dist/env/event-source/event-source-handlers.js +22 -21
- package/dist/env/event-source/event-store.js +4 -4
- package/dist/env/event-source/index.js +23 -22
- package/dist/env/hook/index.js +7 -7
- package/dist/env/index.js +49 -48
- package/dist/env/llm/index.js +10 -10
- package/dist/env/log-trace/index.js +9 -9
- package/dist/env/log-trace/logger.js +2 -2
- package/dist/env/mcp/index.js +10 -10
- package/dist/env/mcp/tool/index.js +3 -3
- package/dist/env/memory/index.js +10 -10
- package/dist/env/memory/plugin/index.js +3 -3
- package/dist/env/plugin/index.js +9 -9
- package/dist/env/prompt/index.js +9 -9
- package/dist/env/session/index.js +12 -12
- package/dist/env/session/storage/index.js +6 -6
- package/dist/env/skill/index.js +9 -9
- package/dist/env/task/delegate/delegate-tool.d.ts +2 -2
- package/dist/env/task/delegate/delegate-tool.js +10 -10
- package/dist/env/task/delegate/index.js +10 -10
- package/dist/env/task/hooks/contexts.d.ts +34 -0
- package/dist/env/task/hooks/verdict.d.ts +170 -0
- package/dist/env/task/index.js +17 -16
- package/dist/env/task/mcp/index.js +6 -5
- package/dist/env/task/plugins/__e2e__/laya-chain-validate.d.ts +15 -0
- package/dist/env/task/plugins/__e2e__/laya-decision-branches.d.ts +18 -0
- package/dist/env/task/plugins/__e2e__/laya-decision-e2e-live.d.ts +27 -0
- package/dist/env/task/plugins/__e2e__/laya-e2e-verify.d.ts +17 -0
- package/dist/env/task/plugins/decision-hint-plugin.d.ts +144 -0
- package/dist/env/task/plugins/decision-port.d.ts +119 -0
- package/dist/env/task/plugins/decision-renderers.d.ts +33 -0
- package/dist/env/task/plugins/index.d.ts +1 -0
- package/dist/env/task/plugins/index.js +19 -12
- package/dist/env/task/plugins/lark-card-patch-notifier.js +4 -4
- package/dist/env/task/plugins/laya-decision-plugin.d.ts +136 -0
- package/dist/env/task/plugins/laya-port.d.ts +143 -0
- package/dist/env/task/plugins/laya-render.d.ts +100 -0
- package/dist/env/task/storage/index.js +5 -5
- package/dist/env/task/tools/index.js +6 -5
- package/dist/env/tool/built-in/index.js +5 -5
- package/dist/env/tool/index.js +12 -12
- package/dist/env/workflow/engine/index.js +14 -14
- package/dist/env/workflow/hooks/index.js +9 -9
- package/dist/env/workflow/index.js +24 -24
- package/dist/env/workflow/nodes/index.js +4 -4
- package/dist/env/workflow/plugins/index.js +10 -10
- package/dist/env/workflow/service/index.js +4 -4
- package/dist/env/workflow/storage/index.js +5 -5
- package/dist/env/workflow/tools/index.js +16 -16
- package/dist/env/workflow/utils/index.js +6 -6
- package/dist/index.js +60 -59
- package/dist/shared/@ai-setting/{roy-agent-core-sj4y3wdm.js → roy-agent-core-002g6nfk.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-06jakebr.js → roy-agent-core-07fvy74y.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-60f7h284.js → roy-agent-core-0cb6w0k7.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-cxpgd415.js → roy-agent-core-0ys85x46.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-6wxww10t.js → roy-agent-core-12n08pg5.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-t6nx0rsz.js → roy-agent-core-18am1h07.js} +11 -11
- package/dist/shared/@ai-setting/{roy-agent-core-ebws32tv.js → roy-agent-core-37tj4y6a.js} +14 -14
- package/dist/shared/@ai-setting/{roy-agent-core-gjsvehfs.js → roy-agent-core-3wrveh5p.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-03k5drfp.js → roy-agent-core-40rv283c.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-kvq4a4p6.js → roy-agent-core-5pr4zp88.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-qmqe8ds3.js → roy-agent-core-6j02sbee.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-b4zdm2n4.js → roy-agent-core-6z412atw.js} +45 -8
- package/dist/shared/@ai-setting/{roy-agent-core-hfyxv2kx.js → roy-agent-core-7cbpmk4q.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-6awgfh3x.js → roy-agent-core-7f7t9wwp.js} +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-83bewqx8.js +10 -0
- package/dist/shared/@ai-setting/{roy-agent-core-jnszp0jq.js → roy-agent-core-85xyctnb.js} +7 -2
- package/dist/shared/@ai-setting/{roy-agent-core-2pma868e.js → roy-agent-core-87942bw4.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-ja4sr63d.js → roy-agent-core-8cx7cfdg.js} +7 -7
- package/dist/shared/@ai-setting/{roy-agent-core-th92f833.js → roy-agent-core-9bs6xrav.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-bm3gav5d.js → roy-agent-core-9bshyqjn.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-va4m04e8.js → roy-agent-core-add1zqsh.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-7tce05jt.js → roy-agent-core-ax9e9szb.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-8xv4qzx7.js → roy-agent-core-br9cdm8d.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-zjgckbdd.js → roy-agent-core-c2gbt68e.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-v7mwj8eq.js → roy-agent-core-cpcd24n2.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-hczj1ryh.js → roy-agent-core-dc9zq75z.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-zy8vkbnk.js → roy-agent-core-dvtg4sn0.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-g6pw4esq.js → roy-agent-core-e42v9bcq.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-hwkc0bg2.js → roy-agent-core-efkjyh69.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-dfqhc9ey.js → roy-agent-core-es203w7p.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-w2ev3z5q.js → roy-agent-core-es467wsz.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-ye4bfzqg.js → roy-agent-core-f6c0nadn.js} +969 -105
- package/dist/shared/@ai-setting/{roy-agent-core-p8rf4z89.js → roy-agent-core-f77k3gqt.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-jw63js86.js → roy-agent-core-fttgm52a.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-32ck9rqt.js → roy-agent-core-g8htfwxj.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-5mrynf9g.js → roy-agent-core-gxzxq1sf.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-gnt23yx0.js → roy-agent-core-hjejpcg5.js} +8 -8
- package/dist/shared/@ai-setting/{roy-agent-core-5hq4v41q.js → roy-agent-core-hmdcz3g9.js} +10 -9
- package/dist/shared/@ai-setting/{roy-agent-core-1dnsk6ht.js → roy-agent-core-hy3zn2q2.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-wzp4tbsn.js → roy-agent-core-jvv2h3d6.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-prnry2mw.js → roy-agent-core-jz8dsypm.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-rfhxj8v2.js → roy-agent-core-kmbct9yg.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-gc6wcd7z.js → roy-agent-core-mcy5apay.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-p6a4v4fq.js → roy-agent-core-mds8tqd0.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-bpvz1dqr.js → roy-agent-core-mw2cen6s.js} +8 -8
- package/dist/shared/@ai-setting/{roy-agent-core-a08dpf71.js → roy-agent-core-na18zwj0.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-2hkyp51n.js → roy-agent-core-nm4xbs1d.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-79gyka2q.js → roy-agent-core-nwbfepba.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-gtdtzbs7.js → roy-agent-core-pgvcf91v.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-084zthqx.js → roy-agent-core-q96qynhb.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-386wa4wy.js → roy-agent-core-qq96p0tj.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-33hn1beg.js → roy-agent-core-qqaak24r.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-vwzan9v0.js → roy-agent-core-r5wt1h3c.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-2cw72f16.js → roy-agent-core-rjzdj0xb.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-c57278kx.js → roy-agent-core-sjr1kmfz.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-as0dd70m.js → roy-agent-core-t0ktaevq.js} +50 -4
- package/dist/shared/@ai-setting/{roy-agent-core-anb53t3v.js → roy-agent-core-tm1mxttk.js} +4 -4
- package/dist/shared/@ai-setting/roy-agent-core-tr3ep81v.js +397 -0
- package/dist/shared/@ai-setting/{roy-agent-core-p37kh0kt.js → roy-agent-core-v0hf14bj.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-c4t4y18j.js → roy-agent-core-v6vr6za7.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-c8xvy6hj.js → roy-agent-core-w07ymg29.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-mbwaxqs0.js → roy-agent-core-xcp8vwax.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-g23yp3t1.js → roy-agent-core-xhrrgfdy.js} +29 -12
- package/dist/shared/@ai-setting/{roy-agent-core-mkpsz128.js → roy-agent-core-xvt7kf7p.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-kmvw6b4v.js → roy-agent-core-yr1mryb8.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-m3w3ytxt.js → roy-agent-core-zk2jg0v7.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-mrrv80jy.js → roy-agent-core-zxz5fkwj.js} +1 -1
- package/dist/utils/temp-file-manager/index.js +3 -3
- package/package.json +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-a6cz4d23.js +0 -10
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
5
5
|
import {
|
|
6
6
|
BaseComponent
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-pgvcf91v.js";
|
|
8
8
|
import {
|
|
9
9
|
createLogger,
|
|
10
10
|
init_logger
|
|
11
|
-
} from "./roy-agent-core-
|
|
11
|
+
} from "./roy-agent-core-7f7t9wwp.js";
|
|
12
12
|
|
|
13
13
|
// src/env/commands/commands-component.ts
|
|
14
14
|
import path2 from "path";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ProcessRegistry,
|
|
3
3
|
runWithProcessRegistryAsync
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-fttgm52a.js";
|
|
5
5
|
import {
|
|
6
6
|
getSharedEventStore
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-na18zwj0.js";
|
|
8
8
|
import {
|
|
9
9
|
TaskHookPoints
|
|
10
10
|
} from "./roy-agent-core-1pg0fepg.js";
|
|
@@ -13,30 +13,30 @@ import {
|
|
|
13
13
|
} from "./roy-agent-core-6masakz4.js";
|
|
14
14
|
import {
|
|
15
15
|
DEFAULT_SUBAGENT_PROMPT
|
|
16
|
-
} from "./roy-agent-core-
|
|
16
|
+
} from "./roy-agent-core-07fvy74y.js";
|
|
17
17
|
import {
|
|
18
18
|
runWithBgTaskIdAsync
|
|
19
19
|
} from "./roy-agent-core-c1v263jn.js";
|
|
20
20
|
import {
|
|
21
21
|
globalHookManager,
|
|
22
22
|
init_global_hook_manager
|
|
23
|
-
} from "./roy-agent-core-
|
|
23
|
+
} from "./roy-agent-core-cpcd24n2.js";
|
|
24
24
|
import {
|
|
25
25
|
init_context
|
|
26
|
-
} from "./roy-agent-core-
|
|
26
|
+
} from "./roy-agent-core-qqaak24r.js";
|
|
27
27
|
import {
|
|
28
28
|
getCurrentTaskId,
|
|
29
29
|
getEnvContext
|
|
30
|
-
} from "./roy-agent-core-
|
|
30
|
+
} from "./roy-agent-core-7cbpmk4q.js";
|
|
31
31
|
import {
|
|
32
32
|
TracedAs,
|
|
33
33
|
init_decorator,
|
|
34
34
|
wrapFunction
|
|
35
|
-
} from "./roy-agent-core-
|
|
35
|
+
} from "./roy-agent-core-qq96p0tj.js";
|
|
36
36
|
import {
|
|
37
37
|
createLogger,
|
|
38
38
|
init_logger
|
|
39
|
-
} from "./roy-agent-core-
|
|
39
|
+
} from "./roy-agent-core-7f7t9wwp.js";
|
|
40
40
|
import {
|
|
41
41
|
__legacyDecorateClassTS
|
|
42
42
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
BackgroundTaskManager,
|
|
9
9
|
createDelegateTool
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-hjejpcg5.js";
|
|
11
11
|
import {
|
|
12
12
|
TaskEntityEventTypes
|
|
13
13
|
} from "./roy-agent-core-8gxth0eh.js";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
searchTasksTool,
|
|
23
23
|
treeTasksTool,
|
|
24
24
|
updateTaskTool
|
|
25
|
-
} from "./roy-agent-core-
|
|
25
|
+
} from "./roy-agent-core-t0ktaevq.js";
|
|
26
26
|
import {
|
|
27
27
|
createOperationTool,
|
|
28
28
|
deleteOperationTool,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
import {
|
|
34
34
|
SQLiteTaskStore,
|
|
35
35
|
getDefaultTaskDbPath
|
|
36
|
-
} from "./roy-agent-core-
|
|
36
|
+
} from "./roy-agent-core-9bs6xrav.js";
|
|
37
37
|
import {
|
|
38
38
|
TaskHookPoints
|
|
39
39
|
} from "./roy-agent-core-1pg0fepg.js";
|
|
@@ -42,23 +42,23 @@ import {
|
|
|
42
42
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
43
43
|
import {
|
|
44
44
|
BaseComponent
|
|
45
|
-
} from "./roy-agent-core-
|
|
45
|
+
} from "./roy-agent-core-pgvcf91v.js";
|
|
46
46
|
import {
|
|
47
47
|
globalHookManager,
|
|
48
48
|
init_global_hook_manager
|
|
49
|
-
} from "./roy-agent-core-
|
|
49
|
+
} from "./roy-agent-core-cpcd24n2.js";
|
|
50
50
|
import {
|
|
51
51
|
getEnvContextOrEmpty,
|
|
52
52
|
init_env_context
|
|
53
|
-
} from "./roy-agent-core-
|
|
53
|
+
} from "./roy-agent-core-7cbpmk4q.js";
|
|
54
54
|
import {
|
|
55
55
|
TracedAs,
|
|
56
56
|
init_decorator
|
|
57
|
-
} from "./roy-agent-core-
|
|
57
|
+
} from "./roy-agent-core-qq96p0tj.js";
|
|
58
58
|
import {
|
|
59
59
|
createLogger,
|
|
60
60
|
init_logger
|
|
61
|
-
} from "./roy-agent-core-
|
|
61
|
+
} from "./roy-agent-core-7f7t9wwp.js";
|
|
62
62
|
import {
|
|
63
63
|
__legacyDecorateClassTS
|
|
64
64
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -410,7 +410,8 @@ class TaskComponent extends BaseComponent {
|
|
|
410
410
|
const createCtx = {
|
|
411
411
|
options: { ...options },
|
|
412
412
|
sessionId,
|
|
413
|
-
tagService: this.tagService
|
|
413
|
+
tagService: this.tagService,
|
|
414
|
+
taskComponent: this
|
|
414
415
|
};
|
|
415
416
|
await this.executeHook(TaskHookPoints.BEFORE_CREATE, createCtx);
|
|
416
417
|
const task = await this.store.createTask(createCtx.options);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SessionMessageConverter
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-kmbct9yg.js";
|
|
4
4
|
import {
|
|
5
5
|
canonicalizeParts
|
|
6
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-40rv283c.js";
|
|
7
7
|
import {
|
|
8
8
|
createLogger,
|
|
9
9
|
init_logger
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-7f7t9wwp.js";
|
|
11
11
|
import {
|
|
12
12
|
__require
|
|
13
13
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
getCurrentProcessRegistry,
|
|
9
9
|
killProcessTree
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-fttgm52a.js";
|
|
11
11
|
import {
|
|
12
12
|
init_decorator,
|
|
13
13
|
init_trace_filters,
|
|
14
14
|
toolExecResultFilter,
|
|
15
15
|
toolInvokeParamFilter,
|
|
16
16
|
wrapFunction
|
|
17
|
-
} from "./roy-agent-core-
|
|
17
|
+
} from "./roy-agent-core-qq96p0tj.js";
|
|
18
18
|
import {
|
|
19
19
|
createLogger,
|
|
20
20
|
exports_tracer_provider,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
init_propagation,
|
|
23
23
|
init_tracer_provider,
|
|
24
24
|
propagation
|
|
25
|
-
} from "./roy-agent-core-
|
|
25
|
+
} from "./roy-agent-core-7f7t9wwp.js";
|
|
26
26
|
import {
|
|
27
27
|
__toCommonJS
|
|
28
28
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
AgentComponentAdapter,
|
|
9
9
|
init_agent_component_adapter
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-002g6nfk.js";
|
|
11
11
|
import {
|
|
12
12
|
PythonCallNode,
|
|
13
13
|
SkillNode,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
init_skill_node,
|
|
18
18
|
init_tool_node,
|
|
19
19
|
init_workflow_node
|
|
20
|
-
} from "./roy-agent-core-
|
|
20
|
+
} from "./roy-agent-core-efkjyh69.js";
|
|
21
21
|
import {
|
|
22
22
|
WORKFLOW_SUBMIT_OUTPUT_TOOL_NAME,
|
|
23
23
|
init_json_schema_to_zod,
|
|
@@ -28,20 +28,20 @@ import {
|
|
|
28
28
|
} from "./roy-agent-core-1db4vpc6.js";
|
|
29
29
|
import {
|
|
30
30
|
init_hooks
|
|
31
|
-
} from "./roy-agent-core-
|
|
31
|
+
} from "./roy-agent-core-dvtg4sn0.js";
|
|
32
32
|
import {
|
|
33
33
|
WorkflowHookPoints,
|
|
34
34
|
emitWorkflowNodeHook,
|
|
35
35
|
emitWorkflowRunHook
|
|
36
|
-
} from "./roy-agent-core-
|
|
36
|
+
} from "./roy-agent-core-c2gbt68e.js";
|
|
37
37
|
import {
|
|
38
38
|
TemplateResolver,
|
|
39
39
|
init_template_resolver
|
|
40
|
-
} from "./roy-agent-core-
|
|
40
|
+
} from "./roy-agent-core-sjr1kmfz.js";
|
|
41
41
|
import {
|
|
42
42
|
DAGManager,
|
|
43
43
|
init_dag_manager
|
|
44
|
-
} from "./roy-agent-core-
|
|
44
|
+
} from "./roy-agent-core-mds8tqd0.js";
|
|
45
45
|
import {
|
|
46
46
|
WorkflowError,
|
|
47
47
|
createWorkflowEvent,
|
|
@@ -57,11 +57,11 @@ import {
|
|
|
57
57
|
import {
|
|
58
58
|
TracedAs,
|
|
59
59
|
init_decorator
|
|
60
|
-
} from "./roy-agent-core-
|
|
60
|
+
} from "./roy-agent-core-qq96p0tj.js";
|
|
61
61
|
import {
|
|
62
62
|
createLogger,
|
|
63
63
|
init_logger
|
|
64
|
-
} from "./roy-agent-core-
|
|
64
|
+
} from "./roy-agent-core-7f7t9wwp.js";
|
|
65
65
|
import {
|
|
66
66
|
__esm,
|
|
67
67
|
__export,
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
7
7
|
import {
|
|
8
8
|
BaseComponent
|
|
9
|
-
} from "./roy-agent-core-
|
|
9
|
+
} from "./roy-agent-core-pgvcf91v.js";
|
|
10
10
|
import {
|
|
11
11
|
createLogger,
|
|
12
12
|
init_logger
|
|
13
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-7f7t9wwp.js";
|
|
14
14
|
|
|
15
15
|
// src/env/memory/types.ts
|
|
16
16
|
import { z } from "zod";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createHook,
|
|
3
3
|
init_hook
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-ax9e9szb.js";
|
|
5
5
|
import {
|
|
6
6
|
HookManager
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-cpcd24n2.js";
|
|
8
8
|
|
|
9
9
|
// src/env/component.ts
|
|
10
10
|
init_hook();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TagRepository
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-mcy5apay.js";
|
|
4
4
|
import {
|
|
5
5
|
exports_search_query_parser,
|
|
6
6
|
init_search_query_parser
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
createLogger,
|
|
10
10
|
init_logger
|
|
11
|
-
} from "./roy-agent-core-
|
|
11
|
+
} from "./roy-agent-core-7f7t9wwp.js";
|
|
12
12
|
import {
|
|
13
13
|
__require,
|
|
14
14
|
__toCommonJS
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
PiAiAdapter,
|
|
7
7
|
invoke,
|
|
8
8
|
invokeNonStream
|
|
9
|
-
} from "./roy-agent-core-
|
|
9
|
+
} from "./roy-agent-core-40rv283c.js";
|
|
10
10
|
import {
|
|
11
11
|
ContextError,
|
|
12
12
|
ErrorCodes
|
|
@@ -17,12 +17,12 @@ import {
|
|
|
17
17
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
18
18
|
import {
|
|
19
19
|
BaseComponent
|
|
20
|
-
} from "./roy-agent-core-
|
|
20
|
+
} from "./roy-agent-core-pgvcf91v.js";
|
|
21
21
|
import {
|
|
22
22
|
LLMHookPoints,
|
|
23
23
|
globalHookManager,
|
|
24
24
|
init_global_hook_manager
|
|
25
|
-
} from "./roy-agent-core-
|
|
25
|
+
} from "./roy-agent-core-cpcd24n2.js";
|
|
26
26
|
import {
|
|
27
27
|
TracedAs,
|
|
28
28
|
embedParamFilter,
|
|
@@ -32,11 +32,11 @@ import {
|
|
|
32
32
|
llmInvokeParamFilter,
|
|
33
33
|
llmInvokeResultFilter,
|
|
34
34
|
wrapFunction
|
|
35
|
-
} from "./roy-agent-core-
|
|
35
|
+
} from "./roy-agent-core-qq96p0tj.js";
|
|
36
36
|
import {
|
|
37
37
|
createLogger,
|
|
38
38
|
init_logger
|
|
39
|
-
} from "./roy-agent-core-
|
|
39
|
+
} from "./roy-agent-core-7f7t9wwp.js";
|
|
40
40
|
import {
|
|
41
41
|
__legacyDecorateClassTS,
|
|
42
42
|
__require
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NEW_TASK_ID_HASH_PLACEHOLDER,
|
|
3
|
+
NEW_TASK_ID_PLACEHOLDER
|
|
4
|
+
} from "./roy-agent-core-tr3ep81v.js";
|
|
1
5
|
import {
|
|
2
6
|
getEnvContextOrEmpty,
|
|
3
7
|
init_env_context,
|
|
4
8
|
setCurrentTaskId
|
|
5
|
-
} from "./roy-agent-core-
|
|
9
|
+
} from "./roy-agent-core-7cbpmk4q.js";
|
|
6
10
|
import {
|
|
7
11
|
createLogger,
|
|
8
12
|
init_logger
|
|
9
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-7f7t9wwp.js";
|
|
10
14
|
|
|
11
15
|
// src/env/task/tools/task-types.ts
|
|
12
16
|
import { z } from "zod";
|
|
@@ -47,7 +51,7 @@ var CreateTaskToolSchema = z.object({
|
|
|
47
51
|
` + ` C. 新建根任务 → 省略 parent_task_id(让树根 ≤10)
|
|
48
52
|
` + `如何找到 parent_task_id:使用 task_tree(depth=2) 获取的树形结构,
|
|
49
53
|
` + "根据节点 id 选择合适的父任务 ID(来自 tree 输出,**不要硬编码**数字)。"),
|
|
50
|
-
context: z.string().default('{"type":"unknown"}').describe("JSON string with time-space positioning information for task continuity. " + "This field is crucial for Agent task handoff. " + "Core fields: worktree_path (git worktree path), branch (current branch), type (feature/bug/refactor/chore). " + 'Example for coding: {"worktree_path": "/path/worktree", "branch": "feature/xyz", "type": "feature"}. ' + 'Example for other: {"type": "general"}. ' + `If unknown, use '{}' or '{"type":"unknown"}'. ` + "IMPORTANT: Must be a valid JSON string!")
|
|
54
|
+
context: z.string().default('{"type":"unknown"}').describe("JSON string with time-space positioning information for task continuity. " + "This field is crucial for Agent task handoff. " + "Core fields: worktree_path (git worktree path), branch (current branch), type (feature/bug/refactor/chore). " + 'Example for coding: {"worktree_path": "/path/worktree", "branch": "feature/xyz", "type": "feature"}. ' + 'Example for other: {"type": "general"}. ' + `If unknown, use '{}' or '{"type":"unknown"}'. ` + "IMPORTANT: Must be a valid JSON string! " + "**Task #4467 — similar_task_ids (REQUIRED)**: array of existing task ids that " + "cover the same ground as this request, used by the task:before.create decision " + "check to suggest reusing/reopening instead of creating a duplicate. " + "Search first (task_search / task_get), then pass the ids. " + "It may be an empty array [] if you searched and found nothing related — " + "but the field itself must be present. " + 'Example: {"type":"feature", "similar_task_ids": [4433, 4445]}')
|
|
51
55
|
});
|
|
52
56
|
var GetTaskToolSchema = withLegacyTaskId({
|
|
53
57
|
include_operations: z.boolean().optional().default(true).describe("Include operation records (milestones / process log) with the task. " + "Defaults to true — the task's operation history is part of its detail. " + "Pass false for a lean task-only response.")
|
|
@@ -208,6 +212,19 @@ function inheritChildContext(args) {
|
|
|
208
212
|
|
|
209
213
|
// src/env/task/tools/create-tool.ts
|
|
210
214
|
var logger2 = createLogger("task:tools:create");
|
|
215
|
+
function extractDecisionHint(contextJson) {
|
|
216
|
+
if (!contextJson)
|
|
217
|
+
return;
|
|
218
|
+
try {
|
|
219
|
+
const parsed = JSON.parse(contextJson);
|
|
220
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
|
|
221
|
+
return;
|
|
222
|
+
const hint = parsed.decision_hint;
|
|
223
|
+
return typeof hint === "string" && hint.length > 0 ? hint : undefined;
|
|
224
|
+
} catch {
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
211
228
|
function detectWorktree() {
|
|
212
229
|
try {
|
|
213
230
|
const toplevel = execSync("git rev-parse --show-toplevel", {
|
|
@@ -247,6 +264,30 @@ function createTaskTool(taskComponent) {
|
|
|
247
264
|
step 2: read the tree, then decide per "Decision Tree" below
|
|
248
265
|
step 3: task_create({...})
|
|
249
266
|
|
|
267
|
+
## ⚠️ STEP 1 — FIND SIMILAR TASKS FIRST (Task #4467)
|
|
268
|
+
|
|
269
|
+
Before creating a task, you **MUST** first look for existing tasks
|
|
270
|
+
that cover the same ground, and record them in
|
|
271
|
+
\`context.similar_task_ids\`. This lets the decision model detect
|
|
272
|
+
duplicates and suggest reusing / reopening an existing task instead
|
|
273
|
+
of piling up another root.
|
|
274
|
+
|
|
275
|
+
Workflow:
|
|
276
|
+
step 1: task_search({keywords: [...]}) or task_get(...) to find
|
|
277
|
+
existing tasks related to this request
|
|
278
|
+
step 2: collect the relevant task ids (0 or more)
|
|
279
|
+
step 3: task_create({..., context: {..., similar_task_ids: [id1, id2]}})
|
|
280
|
+
|
|
281
|
+
\`context.similar_task_ids\` is **required** (may be an empty array \`[]\`
|
|
282
|
+
if you searched and found nothing related). It is an array of task ids.
|
|
283
|
+
|
|
284
|
+
The decision check runs on \`task:before.create\` and only **advises** —
|
|
285
|
+
the task is always created. If the output contains a
|
|
286
|
+
\`[TASK_CREATE_HINT]\` section, you **MUST** read and verify it:
|
|
287
|
+
verify with \`task_get\`, then either execute the suggested
|
|
288
|
+
\`task_update\` (reusing / reopening / re-parenting) or explicitly
|
|
289
|
+
state why it was not adopted. Never ignore it.
|
|
290
|
+
|
|
250
291
|
## Decision Tree — How to choose parent_task_id
|
|
251
292
|
|
|
252
293
|
Walk these paths in order:
|
|
@@ -454,9 +495,14 @@ function createTaskTool(taskComponent) {
|
|
|
454
495
|
});
|
|
455
496
|
setCurrentTaskId(task.id);
|
|
456
497
|
logger2.info(`[createTask] Trace: Task #${task.id} created, currentTaskId=${task.id} set in EnvContext`);
|
|
498
|
+
const decisionHint = extractDecisionHint(task.context);
|
|
499
|
+
const renderedHint = decisionHint ? decisionHint.replaceAll(NEW_TASK_ID_HASH_PLACEHOLDER, `#${task.id}`).replaceAll(NEW_TASK_ID_PLACEHOLDER, String(task.id)) : "";
|
|
500
|
+
const output = `Task created successfully: #${task.id} - ${task.title}` + (renderedHint ? `
|
|
501
|
+
|
|
502
|
+
${renderedHint}` : "");
|
|
457
503
|
return {
|
|
458
504
|
success: true,
|
|
459
|
-
output
|
|
505
|
+
output,
|
|
460
506
|
metadata: {
|
|
461
507
|
execution_time_ms: 0,
|
|
462
508
|
task_id: task.id,
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
4
4
|
import {
|
|
5
5
|
BaseComponent
|
|
6
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-pgvcf91v.js";
|
|
7
7
|
import {
|
|
8
8
|
init_decorator,
|
|
9
9
|
init_trace_filters
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-qq96p0tj.js";
|
|
11
11
|
import {
|
|
12
12
|
createLogger,
|
|
13
13
|
getTracerProvider,
|
|
@@ -18,11 +18,11 @@ import {
|
|
|
18
18
|
propagation,
|
|
19
19
|
setConfigComponent,
|
|
20
20
|
setQuietMode
|
|
21
|
-
} from "./roy-agent-core-
|
|
21
|
+
} from "./roy-agent-core-7f7t9wwp.js";
|
|
22
22
|
import {
|
|
23
23
|
SQLiteSpanStorage,
|
|
24
24
|
init_span_storage
|
|
25
|
-
} from "./roy-agent-core-
|
|
25
|
+
} from "./roy-agent-core-85xyctnb.js";
|
|
26
26
|
import {
|
|
27
27
|
__require
|
|
28
28
|
} from "./roy-agent-core-fs0mn2jk.js";
|