@ai-setting/roy-agent-core 1.6.14 → 1.6.15
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 +10 -10
- package/dist/env/agent/index.js +16 -16
- package/dist/env/commands/index.js +10 -10
- package/dist/env/context/index.js +27 -7
- package/dist/env/debug/index.js +10 -10
- package/dist/env/event-source/index.js +16 -14
- package/dist/env/hook/index.js +8 -8
- package/dist/env/index.js +40 -40
- package/dist/env/llm/index.js +12 -12
- package/dist/env/log-trace/index.js +10 -10
- package/dist/env/mcp/index.js +11 -11
- package/dist/env/mcp/tool/index.js +4 -4
- package/dist/env/memory/index.js +11 -11
- package/dist/env/memory/plugin/index.js +4 -4
- package/dist/env/plugin/index.js +10 -10
- package/dist/env/prompt/index.js +10 -10
- package/dist/env/session/index.js +13 -13
- package/dist/env/session/storage/index.js +6 -6
- package/dist/env/skill/index.js +10 -10
- package/dist/env/task/delegate/index.js +10 -10
- package/dist/env/task/index.js +15 -15
- package/dist/env/task/plugins/index.js +9 -9
- package/dist/env/task/storage/index.js +5 -5
- package/dist/env/task/tools/index.js +6 -6
- package/dist/env/tool/built-in/index.js +6 -6
- package/dist/env/tool/index.js +13 -13
- package/dist/env/workflow/engine/index.js +12 -12
- package/dist/env/workflow/index.js +23 -23
- package/dist/env/workflow/nodes/index.js +5 -5
- package/dist/env/workflow/service/index.js +5 -5
- package/dist/env/workflow/storage/index.js +6 -6
- package/dist/env/workflow/tools/index.js +17 -17
- package/dist/env/workflow/utils/index.js +7 -7
- package/dist/index.js +53 -51
- package/dist/shared/@ai-setting/{roy-agent-core-r74v00c7.js → roy-agent-core-02aw62bv.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-6qbyfzsw.js → roy-agent-core-0rwymn7m.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-wpw37qqf.js → roy-agent-core-1380b0re.js} +29 -8
- package/dist/shared/@ai-setting/{roy-agent-core-m0cnmg7b.js → roy-agent-core-1ecgh5ya.js} +81 -13
- package/dist/shared/@ai-setting/{roy-agent-core-80e4a3g5.js → roy-agent-core-1mrc9a1r.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-xxgazz27.js → roy-agent-core-1qjgwjjs.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-rga3f0hm.js → roy-agent-core-2b0mw2h3.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-ck0m8754.js → roy-agent-core-416rpxkp.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-c6592r3c.js → roy-agent-core-4an1p9a1.js} +31 -2
- package/dist/shared/@ai-setting/{roy-agent-core-r53regz9.js → roy-agent-core-4z7dzcgb.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-txsswwhm.js → roy-agent-core-5pzegp1x.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-htjag2nr.js → roy-agent-core-77wfej1h.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-resnbd2j.js → roy-agent-core-7kw06e4b.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-yfhgxh5a.js → roy-agent-core-7r72622v.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-dcd1s7ct.js → roy-agent-core-8n0e62y4.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-fdm579b1.js → roy-agent-core-96mj6gvc.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-fwxqevpf.js → roy-agent-core-9jsfqc1m.js} +8 -8
- package/dist/shared/@ai-setting/{roy-agent-core-1mq9erp8.js → roy-agent-core-ajp566yv.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-j62bjagf.js → roy-agent-core-akb8mb9v.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-5h49ct1a.js → roy-agent-core-ataagh3a.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-606z25nw.js → roy-agent-core-atpchjdz.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-9nhwdq9r.js → roy-agent-core-b8wn8yhk.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-mmb9484f.js → roy-agent-core-bq1gskrf.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-nw39k111.js → roy-agent-core-bqe4c9f2.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-1gsnq4p2.js → roy-agent-core-dh9rajdh.js} +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-dtkbj8fk.js +206 -0
- package/dist/shared/@ai-setting/{roy-agent-core-8x4ngxcy.js → roy-agent-core-e0kaxcy1.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-nv4yfy3m.js → roy-agent-core-eaj0b1hm.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-3kbf53sh.js → roy-agent-core-ehpnd2be.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-psfkwe4g.js → roy-agent-core-ez91vxas.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-jw0hbacv.js → roy-agent-core-fxembepv.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-80bdhnwk.js → roy-agent-core-gc75v3px.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-24rmf17n.js → roy-agent-core-gmnex23m.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-atjd1tpt.js → roy-agent-core-keb51jag.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-7z9b1fm8.js → roy-agent-core-m00kamqp.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-4w6rgxs4.js → roy-agent-core-mdp8y7ky.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-v5nknfh0.js → roy-agent-core-mmnac1s6.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-vyygk314.js → roy-agent-core-nna4s0qs.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-f79ee0aw.js → roy-agent-core-p4z6nxgz.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-qbm5zy6s.js → roy-agent-core-pr4jekyy.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-rpq0mcvv.js → roy-agent-core-r0t34bbh.js} +79 -4
- package/dist/shared/@ai-setting/{roy-agent-core-ywtmc0bh.js → roy-agent-core-r15sn7ve.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-fvkyv5j6.js → roy-agent-core-rmesvpff.js} +12 -12
- package/dist/shared/@ai-setting/{roy-agent-core-9hqqhye6.js → roy-agent-core-sqt96sam.js} +4 -2
- package/dist/shared/@ai-setting/{roy-agent-core-2yavqjsh.js → roy-agent-core-v20nxrs1.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-dbkkjmqz.js → roy-agent-core-vc7p80sd.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-x7fgze6s.js → roy-agent-core-vkesx61c.js} +4 -4
- package/dist/shared/@ai-setting/roy-agent-core-w6kj6nmj.js +11 -0
- package/dist/shared/@ai-setting/{roy-agent-core-px8ghk4g.js → roy-agent-core-wq98qf5y.js} +28 -13
- package/dist/shared/@ai-setting/{roy-agent-core-wtbyj0q1.js → roy-agent-core-wr3pk3h3.js} +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-wsqnf2za.js +19 -0
- package/dist/shared/@ai-setting/{roy-agent-core-ra4y7e4p.js → roy-agent-core-x36fsm47.js} +14 -14
- package/dist/shared/@ai-setting/{roy-agent-core-st9y9z07.js → roy-agent-core-x7sc21ek.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-w6wagmhw.js → roy-agent-core-xzc53mnk.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-nhncpbzz.js → roy-agent-core-yr3fp8tv.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-m0wp34r4.js → roy-agent-core-z1hm09xp.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-9abv4ewh.js → roy-agent-core-zdzkzx5g.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-95bbd2jv.js → roy-agent-core-zs4f0tcy.js} +2 -2
- package/dist/utils/temp-file-manager/index.js +4 -4
- package/package.json +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-6jqpdjr4.js +0 -19
- package/dist/shared/@ai-setting/roy-agent-core-endah27g.js +0 -81
- package/dist/shared/@ai-setting/roy-agent-core-qfdj8872.js +0 -11
|
@@ -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-akb8mb9v.js";
|
|
8
8
|
import {
|
|
9
9
|
createLogger,
|
|
10
10
|
init_logger
|
|
11
|
-
} from "./roy-agent-core-
|
|
11
|
+
} from "./roy-agent-core-nna4s0qs.js";
|
|
12
12
|
|
|
13
13
|
// src/env/commands/commands-component.ts
|
|
14
14
|
import path2 from "path";
|
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
WorkflowRepository,
|
|
3
3
|
migrateEmptyTagsToDefault,
|
|
4
4
|
rowToWorkflow
|
|
5
|
-
} from "./roy-agent-core-
|
|
6
|
-
import"./roy-agent-core-
|
|
5
|
+
} from "./roy-agent-core-ajp566yv.js";
|
|
6
|
+
import"./roy-agent-core-atpchjdz.js";
|
|
7
7
|
import"./roy-agent-core-rvxg1wps.js";
|
|
8
|
-
import"./roy-agent-core-
|
|
9
|
-
import"./roy-agent-core-
|
|
10
|
-
import"./roy-agent-core-
|
|
11
|
-
import"./roy-agent-core-
|
|
8
|
+
import"./roy-agent-core-96mj6gvc.js";
|
|
9
|
+
import"./roy-agent-core-nna4s0qs.js";
|
|
10
|
+
import"./roy-agent-core-m00kamqp.js";
|
|
11
|
+
import"./roy-agent-core-4an1p9a1.js";
|
|
12
12
|
import"./roy-agent-core-fs0mn2jk.js";
|
|
13
13
|
export {
|
|
14
14
|
rowToWorkflow,
|
|
@@ -3,21 +3,21 @@ import {
|
|
|
3
3
|
} from "./roy-agent-core-az13yzmc.js";
|
|
4
4
|
import {
|
|
5
5
|
BaseComponent
|
|
6
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-akb8mb9v.js";
|
|
7
7
|
import {
|
|
8
8
|
globalHookManager,
|
|
9
9
|
init_global_hook_manager
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-vc7p80sd.js";
|
|
11
11
|
import {
|
|
12
12
|
init_context
|
|
13
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-sqt96sam.js";
|
|
14
14
|
import {
|
|
15
15
|
getEnvContextOrEmpty
|
|
16
|
-
} from "./roy-agent-core-
|
|
16
|
+
} from "./roy-agent-core-dtkbj8fk.js";
|
|
17
17
|
import {
|
|
18
18
|
createLogger,
|
|
19
19
|
init_logger
|
|
20
|
-
} from "./roy-agent-core-
|
|
20
|
+
} from "./roy-agent-core-nna4s0qs.js";
|
|
21
21
|
|
|
22
22
|
// src/env/plugin/event-bus-notification-channel.ts
|
|
23
23
|
init_logger();
|
|
@@ -9,16 +9,16 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
globalHookManager,
|
|
11
11
|
init_global_hook_manager
|
|
12
|
-
} from "./roy-agent-core-
|
|
12
|
+
} from "./roy-agent-core-vc7p80sd.js";
|
|
13
13
|
import {
|
|
14
14
|
TracedAs,
|
|
15
15
|
init_decorator,
|
|
16
16
|
wrapFunction
|
|
17
|
-
} from "./roy-agent-core-
|
|
17
|
+
} from "./roy-agent-core-96mj6gvc.js";
|
|
18
18
|
import {
|
|
19
19
|
createLogger,
|
|
20
20
|
init_logger
|
|
21
|
-
} from "./roy-agent-core-
|
|
21
|
+
} from "./roy-agent-core-nna4s0qs.js";
|
|
22
22
|
import {
|
|
23
23
|
__esm,
|
|
24
24
|
__legacyDecorateClassTS
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./roy-agent-core-rvv6ydff.js";
|
|
5
5
|
import {
|
|
6
6
|
BaseComponent
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-akb8mb9v.js";
|
|
8
8
|
import {
|
|
9
9
|
__require
|
|
10
10
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -141,7 +141,7 @@ class SpanDbReader {
|
|
|
141
141
|
}
|
|
142
142
|
async initSqliteStorage() {
|
|
143
143
|
try {
|
|
144
|
-
const { SQLiteSpanStorage } = await import("./roy-agent-core-
|
|
144
|
+
const { SQLiteSpanStorage } = await import("./roy-agent-core-z1hm09xp.js");
|
|
145
145
|
this.storage = new SQLiteSpanStorage(this.dbPath);
|
|
146
146
|
await this.storage.initialize();
|
|
147
147
|
} catch (error) {
|
|
@@ -590,7 +590,7 @@ class DebugComponent extends BaseComponent {
|
|
|
590
590
|
}
|
|
591
591
|
async getLiveTrace(traceId) {
|
|
592
592
|
try {
|
|
593
|
-
const { getTracerProvider } = await import("./roy-agent-core-
|
|
593
|
+
const { getTracerProvider } = await import("./roy-agent-core-xzc53mnk.js");
|
|
594
594
|
const provider = getTracerProvider();
|
|
595
595
|
if (!provider.isInitialized()) {
|
|
596
596
|
await provider.initialize();
|
|
@@ -635,7 +635,7 @@ class DebugComponent extends BaseComponent {
|
|
|
635
635
|
}
|
|
636
636
|
async listLiveTraces(limit = 20) {
|
|
637
637
|
try {
|
|
638
|
-
const { getTracerProvider } = await import("./roy-agent-core-
|
|
638
|
+
const { getTracerProvider } = await import("./roy-agent-core-xzc53mnk.js");
|
|
639
639
|
const provider = getTracerProvider();
|
|
640
640
|
if (!provider.isInitialized()) {
|
|
641
641
|
await provider.initialize();
|
|
@@ -653,7 +653,7 @@ class DebugComponent extends BaseComponent {
|
|
|
653
653
|
}
|
|
654
654
|
async formatLiveTrace(traceId) {
|
|
655
655
|
try {
|
|
656
|
-
const { getTracerProvider } = await import("./roy-agent-core-
|
|
656
|
+
const { getTracerProvider } = await import("./roy-agent-core-xzc53mnk.js");
|
|
657
657
|
const provider = getTracerProvider();
|
|
658
658
|
if (!provider.isInitialized()) {
|
|
659
659
|
await provider.initialize();
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
TracedAs,
|
|
6
6
|
init_decorator
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-96mj6gvc.js";
|
|
8
8
|
import {
|
|
9
9
|
createLogger,
|
|
10
10
|
init_logger
|
|
11
|
-
} from "./roy-agent-core-
|
|
11
|
+
} from "./roy-agent-core-nna4s0qs.js";
|
|
12
12
|
import {
|
|
13
13
|
__legacyDecorateClassTS
|
|
14
14
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
hasDecoratorNodes,
|
|
4
4
|
init_node_registry_helper,
|
|
5
5
|
registerDecoratorNodeType
|
|
6
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-77wfej1h.js";
|
|
7
7
|
import"./roy-agent-core-ddwa0n6h.js";
|
|
8
8
|
import"./roy-agent-core-1ce3fqrk.js";
|
|
9
|
-
import"./roy-agent-core-
|
|
10
|
-
import"./roy-agent-core-
|
|
11
|
-
import"./roy-agent-core-
|
|
12
|
-
import"./roy-agent-core-
|
|
9
|
+
import"./roy-agent-core-96mj6gvc.js";
|
|
10
|
+
import"./roy-agent-core-nna4s0qs.js";
|
|
11
|
+
import"./roy-agent-core-m00kamqp.js";
|
|
12
|
+
import"./roy-agent-core-4an1p9a1.js";
|
|
13
13
|
import"./roy-agent-core-fs0mn2jk.js";
|
|
14
14
|
init_node_registry_helper();
|
|
15
15
|
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
initDatabase,
|
|
6
6
|
initializeTables,
|
|
7
7
|
resetDatabase
|
|
8
|
-
} from "./roy-agent-core-
|
|
9
|
-
import"./roy-agent-core-
|
|
8
|
+
} from "./roy-agent-core-ajp566yv.js";
|
|
9
|
+
import"./roy-agent-core-atpchjdz.js";
|
|
10
10
|
import"./roy-agent-core-rvxg1wps.js";
|
|
11
|
-
import"./roy-agent-core-
|
|
12
|
-
import"./roy-agent-core-
|
|
13
|
-
import"./roy-agent-core-
|
|
14
|
-
import"./roy-agent-core-
|
|
11
|
+
import"./roy-agent-core-96mj6gvc.js";
|
|
12
|
+
import"./roy-agent-core-nna4s0qs.js";
|
|
13
|
+
import"./roy-agent-core-m00kamqp.js";
|
|
14
|
+
import"./roy-agent-core-4an1p9a1.js";
|
|
15
15
|
import"./roy-agent-core-fs0mn2jk.js";
|
|
16
16
|
export {
|
|
17
17
|
resetDatabase,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_env_context,
|
|
3
3
|
setCurrentTaskId
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-dtkbj8fk.js";
|
|
5
5
|
import {
|
|
6
6
|
createLogger,
|
|
7
7
|
init_logger
|
|
8
|
-
} from "./roy-agent-core-
|
|
8
|
+
} from "./roy-agent-core-nna4s0qs.js";
|
|
9
9
|
|
|
10
10
|
// src/env/task/tools/task-types.ts
|
|
11
11
|
import { z } from "zod";
|
|
@@ -91,7 +91,26 @@ var TreeTasksToolSchema = z.object({
|
|
|
91
91
|
// src/env/task/tools/create-tool.ts
|
|
92
92
|
init_env_context();
|
|
93
93
|
init_logger();
|
|
94
|
+
import { execSync } from "child_process";
|
|
94
95
|
var logger = createLogger("task:tools:create");
|
|
96
|
+
function detectWorktree() {
|
|
97
|
+
try {
|
|
98
|
+
const toplevel = execSync("git rev-parse --show-toplevel", {
|
|
99
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
100
|
+
}).toString().trim();
|
|
101
|
+
const cwd = process.cwd();
|
|
102
|
+
if (!toplevel)
|
|
103
|
+
return null;
|
|
104
|
+
if (cwd !== toplevel)
|
|
105
|
+
return cwd;
|
|
106
|
+
if (cwd.includes(".worktrees/") || cwd.includes(".worktree/")) {
|
|
107
|
+
return cwd;
|
|
108
|
+
}
|
|
109
|
+
return null;
|
|
110
|
+
} catch {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
95
114
|
function createTaskTool(taskComponent) {
|
|
96
115
|
return {
|
|
97
116
|
name: "task_create",
|
|
@@ -141,6 +160,42 @@ function createTaskTool(taskComponent) {
|
|
|
141
160
|
- Same-theme tasks cluster under one parent
|
|
142
161
|
- Long-tail/stranded tasks should be archived or merged
|
|
143
162
|
|
|
163
|
+
## ⚠️ Spatial + Temporal Context (Task #2325)
|
|
164
|
+
|
|
165
|
+
A task MUST carry spatio-temporal context so it survives task-handoff
|
|
166
|
+
across Agent sessions, worktrees and time. Two orthogonal axes:
|
|
167
|
+
|
|
168
|
+
- **Space (project_path + worktree_path)**:
|
|
169
|
+
- \`project_path\` (required): git repo root path (always the top-level repo)
|
|
170
|
+
- \`worktree_path\` (in context): current worktree path if in a worktree
|
|
171
|
+
- **Auto-detected by createTask** via \`git rev-parse --show-toplevel\`
|
|
172
|
+
— you don't need to fill it manually (see "worktree_path detection
|
|
173
|
+
logic" in the implementation).
|
|
174
|
+
- You may **override** by passing it in \`context.worktree_path\`.
|
|
175
|
+
|
|
176
|
+
- **Time (context field)**:
|
|
177
|
+
- \`created_at\` (in context): ISO 8601 timestamp **auto-injected**
|
|
178
|
+
at creation time. Manual override is preserved if provided.
|
|
179
|
+
- \`time_dimension\` (in context, optional): the task's "time anchor"
|
|
180
|
+
— e.g. a release tag, sprint window or iteration id.
|
|
181
|
+
- \`work_period\` (in context, optional): planned start/end dates
|
|
182
|
+
if known.
|
|
183
|
+
- \`prior_context\` (in context, optional): the previous task id
|
|
184
|
+
/ commit hash this work continues from. Helps the next Agent
|
|
185
|
+
pick up the trail via \`task_get\`.
|
|
186
|
+
|
|
187
|
+
Example context for code development task:
|
|
188
|
+
|
|
189
|
+
\`\`\`json
|
|
190
|
+
{"project_path": "<git-repo-root>",
|
|
191
|
+
"worktree_path": "<git-repo-root>/.worktrees/<branch-name>",
|
|
192
|
+
"branch": "feat/<branch-name>",
|
|
193
|
+
"type": "feature",
|
|
194
|
+
"parent_branch": "main",
|
|
195
|
+
"created_at": "<ISO-8601-timestamp>",
|
|
196
|
+
"prior_context": {"prev_task": "<task-id>", "commit": "<commit-hash>"}}
|
|
197
|
+
\`\`\`
|
|
198
|
+
|
|
144
199
|
## IMPORTANT: Task Continuity Fields
|
|
145
200
|
|
|
146
201
|
This tool creates persistent task records that can be picked up by a
|
|
@@ -158,11 +213,12 @@ function createTaskTool(taskComponent) {
|
|
|
158
213
|
**Required format**: Valid JSON string (parseable).
|
|
159
214
|
|
|
160
215
|
**Core fields**:
|
|
161
|
-
- worktree_path: Git worktree path (for code development)
|
|
216
|
+
- worktree_path: Git worktree path (for code development). Auto-detected.
|
|
162
217
|
- branch: Current branch name
|
|
163
218
|
- type: Work type classification (feature/bug/refactor/chore).
|
|
164
219
|
⚠️ NOTE: This is the **context.type** (work classification), NOT the
|
|
165
220
|
task's type field (normal/cycle/longterm). They are independent concepts.
|
|
221
|
+
- created_at: ISO 8601 timestamp. Auto-injected if missing.
|
|
166
222
|
|
|
167
223
|
**Example for coding tasks**:
|
|
168
224
|
{"worktree_path": "<worktree-path>", "branch": "<branch-name>", "type": "feature", "parent_branch": "main"}
|
|
@@ -175,11 +231,30 @@ function createTaskTool(taskComponent) {
|
|
|
175
231
|
|
|
176
232
|
**DO NOT leave this as plain text** - it must be valid JSON!
|
|
177
233
|
|
|
234
|
+
**Note**: malformed JSON (non-parseable) will be preserved as-is
|
|
235
|
+
rather than rejected, to preserve backward compatibility. The
|
|
236
|
+
auto-injection of \`created_at\` / \`worktree_path\` is best-effort.
|
|
237
|
+
|
|
178
238
|
`,
|
|
179
239
|
parameters: CreateTaskToolSchema,
|
|
180
240
|
execute: async (args, ctx) => {
|
|
181
241
|
const params = CreateTaskToolSchema.parse(args);
|
|
182
242
|
const sessionId = ctx.session_id || "unknown";
|
|
243
|
+
const detectedWorktree = detectWorktree();
|
|
244
|
+
let enrichedContext = params.context;
|
|
245
|
+
try {
|
|
246
|
+
const ctxObj = params.context ? JSON.parse(params.context) : {};
|
|
247
|
+
const obj = typeof ctxObj === "object" && ctxObj !== null && !Array.isArray(ctxObj) ? ctxObj : {};
|
|
248
|
+
if (!obj.created_at) {
|
|
249
|
+
obj.created_at = new Date().toISOString();
|
|
250
|
+
}
|
|
251
|
+
if (!obj.worktree_path && detectedWorktree) {
|
|
252
|
+
obj.worktree_path = detectedWorktree;
|
|
253
|
+
}
|
|
254
|
+
enrichedContext = JSON.stringify(obj);
|
|
255
|
+
} catch {
|
|
256
|
+
enrichedContext = params.context;
|
|
257
|
+
}
|
|
183
258
|
try {
|
|
184
259
|
const task = await taskComponent.createTask({
|
|
185
260
|
parent_task_id: params.parent_task_id,
|
|
@@ -192,7 +267,7 @@ function createTaskTool(taskComponent) {
|
|
|
192
267
|
tags: params.tags,
|
|
193
268
|
sessionId,
|
|
194
269
|
project_path: params.project_path,
|
|
195
|
-
context:
|
|
270
|
+
context: enrichedContext
|
|
196
271
|
});
|
|
197
272
|
setCurrentTaskId(task.id);
|
|
198
273
|
logger.info(`[createTask] Trace: Task #${task.id} created, currentTaskId=${task.id} set in EnvContext`);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TracedAs,
|
|
3
3
|
init_decorator
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-96mj6gvc.js";
|
|
5
5
|
import {
|
|
6
6
|
createLogger,
|
|
7
7
|
init_logger
|
|
8
|
-
} from "./roy-agent-core-
|
|
8
|
+
} from "./roy-agent-core-nna4s0qs.js";
|
|
9
9
|
import {
|
|
10
10
|
__legacyDecorateClassTS
|
|
11
11
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
import {
|
|
2
2
|
withTimeout
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-8n0e62y4.js";
|
|
4
4
|
import {
|
|
5
5
|
truncateOutputInline
|
|
6
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-b8wn8yhk.js";
|
|
7
7
|
import {
|
|
8
8
|
AskUserError,
|
|
9
9
|
init_workflow_hil
|
|
10
10
|
} from "./roy-agent-core-e25xkv53.js";
|
|
11
11
|
import {
|
|
12
12
|
AgentRegistry
|
|
13
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-mmnac1s6.js";
|
|
14
14
|
import {
|
|
15
15
|
ContextError
|
|
16
16
|
} from "./roy-agent-core-ctdhjv68.js";
|
|
17
17
|
import {
|
|
18
18
|
SessionMessageConverter
|
|
19
|
-
} from "./roy-agent-core-
|
|
19
|
+
} from "./roy-agent-core-7r72622v.js";
|
|
20
20
|
import {
|
|
21
21
|
safeParseToolArgs
|
|
22
|
-
} from "./roy-agent-core-
|
|
22
|
+
} from "./roy-agent-core-e0kaxcy1.js";
|
|
23
23
|
import {
|
|
24
24
|
envKeyToConfigKey
|
|
25
25
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
26
26
|
import {
|
|
27
27
|
BaseComponent
|
|
28
|
-
} from "./roy-agent-core-
|
|
28
|
+
} from "./roy-agent-core-akb8mb9v.js";
|
|
29
29
|
import {
|
|
30
30
|
globalHookManager,
|
|
31
31
|
init_global_hook_manager
|
|
32
|
-
} from "./roy-agent-core-
|
|
32
|
+
} from "./roy-agent-core-vc7p80sd.js";
|
|
33
33
|
import {
|
|
34
34
|
init_context
|
|
35
|
-
} from "./roy-agent-core-
|
|
35
|
+
} from "./roy-agent-core-sqt96sam.js";
|
|
36
36
|
import {
|
|
37
37
|
getCurrentTaskId,
|
|
38
38
|
getEnvContext,
|
|
39
39
|
runWithEnvContextAsync
|
|
40
|
-
} from "./roy-agent-core-
|
|
40
|
+
} from "./roy-agent-core-dtkbj8fk.js";
|
|
41
41
|
import {
|
|
42
42
|
TracedAs,
|
|
43
43
|
init_decorator
|
|
44
|
-
} from "./roy-agent-core-
|
|
44
|
+
} from "./roy-agent-core-96mj6gvc.js";
|
|
45
45
|
import {
|
|
46
46
|
createLogger,
|
|
47
47
|
init_logger
|
|
48
|
-
} from "./roy-agent-core-
|
|
48
|
+
} from "./roy-agent-core-nna4s0qs.js";
|
|
49
49
|
import {
|
|
50
50
|
__legacyDecorateClassTS,
|
|
51
51
|
__require
|
|
@@ -739,7 +739,7 @@ class AgentComponent extends BaseComponent {
|
|
|
739
739
|
traceId: effectiveContext.metadata?.traceId,
|
|
740
740
|
sessionId: effectiveContext.sessionId,
|
|
741
741
|
userId: parentEnvContext?.userId ?? (effectiveContext.metadata?.userId ?? ""),
|
|
742
|
-
messageId: effectiveContext.metadata?.messageId,
|
|
742
|
+
messageId: parentEnvContext?.messageId ?? effectiveContext.metadata?.messageId,
|
|
743
743
|
pluginEnabled: { ...parentEnvContext?.pluginEnabled ?? {}, ...effectiveContext.pluginEnabled ?? {} },
|
|
744
744
|
plugins: effectiveContext.plugins,
|
|
745
745
|
envEvent: effectiveContext.envEvent ?? parentEnvContext?.envEvent,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
init_env_context
|
|
3
|
-
|
|
2
|
+
init_env_context,
|
|
3
|
+
init_env_event
|
|
4
|
+
} from "./roy-agent-core-dtkbj8fk.js";
|
|
4
5
|
import {
|
|
5
6
|
__esm
|
|
6
7
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -8,6 +9,7 @@ import {
|
|
|
8
9
|
// src/env/context/index.ts
|
|
9
10
|
var init_context = __esm(() => {
|
|
10
11
|
init_env_context();
|
|
12
|
+
init_env_event();
|
|
11
13
|
});
|
|
12
14
|
|
|
13
15
|
export { init_context };
|
|
@@ -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-akb8mb9v.js";
|
|
10
10
|
import {
|
|
11
11
|
createLogger,
|
|
12
12
|
init_logger
|
|
13
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-nna4s0qs.js";
|
|
14
14
|
|
|
15
15
|
// src/env/memory/types.ts
|
|
16
16
|
import { z } from "zod";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_context
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-sqt96sam.js";
|
|
4
4
|
import {
|
|
5
5
|
getEnvContext
|
|
6
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-dtkbj8fk.js";
|
|
7
7
|
import {
|
|
8
8
|
__esm
|
|
9
9
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -7,21 +7,21 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
getCurrentProcessRegistry,
|
|
9
9
|
killProcessTree
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-eaj0b1hm.js";
|
|
11
11
|
import {
|
|
12
12
|
init_decorator,
|
|
13
13
|
wrapFunction
|
|
14
|
-
} from "./roy-agent-core-
|
|
14
|
+
} from "./roy-agent-core-96mj6gvc.js";
|
|
15
15
|
import {
|
|
16
16
|
createLogger,
|
|
17
17
|
init_logger
|
|
18
|
-
} from "./roy-agent-core-
|
|
18
|
+
} from "./roy-agent-core-nna4s0qs.js";
|
|
19
19
|
import {
|
|
20
20
|
exports_tracer_provider,
|
|
21
21
|
init_propagation,
|
|
22
22
|
init_tracer_provider,
|
|
23
23
|
propagation
|
|
24
|
-
} from "./roy-agent-core-
|
|
24
|
+
} from "./roy-agent-core-m00kamqp.js";
|
|
25
25
|
import {
|
|
26
26
|
__toCommonJS
|
|
27
27
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TagRepository
|
|
3
|
+
} from "./roy-agent-core-atpchjdz.js";
|
|
4
|
+
import"./roy-agent-core-96mj6gvc.js";
|
|
5
|
+
import"./roy-agent-core-nna4s0qs.js";
|
|
6
|
+
import"./roy-agent-core-m00kamqp.js";
|
|
7
|
+
import"./roy-agent-core-4an1p9a1.js";
|
|
8
|
+
import"./roy-agent-core-fs0mn2jk.js";
|
|
9
|
+
export {
|
|
10
|
+
TagRepository
|
|
11
|
+
};
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TaskTagPlugin,
|
|
3
3
|
createLarkCliTaskNotifyHook
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-1ecgh5ya.js";
|
|
5
5
|
import {
|
|
6
6
|
envKeyToConfigKey
|
|
7
7
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
8
8
|
import {
|
|
9
9
|
BaseComponent
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-akb8mb9v.js";
|
|
11
11
|
import {
|
|
12
12
|
globalHookManager,
|
|
13
13
|
init_global_hook_manager
|
|
14
|
-
} from "./roy-agent-core-
|
|
14
|
+
} from "./roy-agent-core-vc7p80sd.js";
|
|
15
15
|
import {
|
|
16
16
|
init_context
|
|
17
|
-
} from "./roy-agent-core-
|
|
17
|
+
} from "./roy-agent-core-sqt96sam.js";
|
|
18
18
|
import {
|
|
19
19
|
createEnvContext,
|
|
20
20
|
runWithEnvContext
|
|
21
|
-
} from "./roy-agent-core-
|
|
21
|
+
} from "./roy-agent-core-dtkbj8fk.js";
|
|
22
22
|
import {
|
|
23
23
|
TracedAs,
|
|
24
24
|
init_decorator
|
|
25
|
-
} from "./roy-agent-core-
|
|
25
|
+
} from "./roy-agent-core-96mj6gvc.js";
|
|
26
26
|
import {
|
|
27
27
|
createLogger,
|
|
28
28
|
init_logger
|
|
29
|
-
} from "./roy-agent-core-
|
|
29
|
+
} from "./roy-agent-core-nna4s0qs.js";
|
|
30
30
|
import {
|
|
31
31
|
getTracerProvider
|
|
32
|
-
} from "./roy-agent-core-
|
|
32
|
+
} from "./roy-agent-core-m00kamqp.js";
|
|
33
33
|
import {
|
|
34
34
|
__legacyDecorateClassTS,
|
|
35
35
|
__require
|
|
@@ -1021,10 +1021,25 @@ class LarkCliInstance {
|
|
|
1021
1021
|
};
|
|
1022
1022
|
const userId = this.extractUserId(rawEvent);
|
|
1023
1023
|
const envReplyChannel = this.buildReplyChannel(replyChannel);
|
|
1024
|
+
const larkMessageId = replyChannel?.messageId ?? metadata?.messageId;
|
|
1024
1025
|
const envContext = createEnvContext({
|
|
1025
1026
|
envEvent: evt,
|
|
1026
1027
|
sourceId: this.config.id,
|
|
1027
1028
|
userId,
|
|
1029
|
+
messageId: larkMessageId,
|
|
1030
|
+
event: larkMessageId ? {
|
|
1031
|
+
source: "lark",
|
|
1032
|
+
id: larkMessageId,
|
|
1033
|
+
receivedAt: new Date(timestamp).toISOString(),
|
|
1034
|
+
payload: rawEvent,
|
|
1035
|
+
metadata: {
|
|
1036
|
+
chatId: metadata?.chatId,
|
|
1037
|
+
userId,
|
|
1038
|
+
chatType: metadata?.chatType,
|
|
1039
|
+
profile: replyChannel?.profile,
|
|
1040
|
+
appId: metadata?.appId
|
|
1041
|
+
}
|
|
1042
|
+
} : undefined,
|
|
1028
1043
|
replyChannel: envReplyChannel,
|
|
1029
1044
|
pluginEnabled,
|
|
1030
1045
|
plugins
|
|
@@ -1103,13 +1118,13 @@ class LarkCliInstance {
|
|
|
1103
1118
|
return new Promise((resolve, reject) => {
|
|
1104
1119
|
const { chatId, userId, messageId, content, as: identity, format = "text", profile } = options;
|
|
1105
1120
|
const contentFlag = format === "markdown" ? "--markdown" : "--text";
|
|
1106
|
-
const args = ["im"
|
|
1121
|
+
const args = ["im"];
|
|
1107
1122
|
if (messageId) {
|
|
1108
|
-
args.push("+messages-reply", "--message-id", messageId, contentFlag, content);
|
|
1123
|
+
args.push("+messages-reply", "--message-id", messageId, "--as", identity, contentFlag, content);
|
|
1109
1124
|
} else if (chatId) {
|
|
1110
|
-
args.push("--chat-id", chatId, contentFlag, content);
|
|
1125
|
+
args.push("+messages-send", "--chat-id", chatId, "--as", identity, contentFlag, content);
|
|
1111
1126
|
} else if (userId) {
|
|
1112
|
-
args.push("--user-id", userId, contentFlag, content);
|
|
1127
|
+
args.push("+messages-send", "--user-id", userId, "--as", identity, contentFlag, content);
|
|
1113
1128
|
} else {
|
|
1114
1129
|
reject(new Error("No target specified for sending message"));
|
|
1115
1130
|
return;
|
|
@@ -1609,4 +1624,4 @@ __legacyDecorateClassTS([
|
|
|
1609
1624
|
TracedAs("event-source.update", { recordParams: false, log: false })
|
|
1610
1625
|
], EventSourceComponent.prototype, "update", null);
|
|
1611
1626
|
|
|
1612
|
-
export { TimerInstance, timerHandler, buildDefaultBountyIMSystemPrompt, resolveBountyIMSystemPrompt, BountyIMInstance, bountyIMHandler, larkCliHandler, builtInHandlers, getBuiltInHandler, EventSourceComponent };
|
|
1627
|
+
export { TimerInstance, timerHandler, buildDefaultBountyIMSystemPrompt, resolveBountyIMSystemPrompt, BountyIMInstance, bountyIMHandler, extractMetadata, larkCliHandler, builtInHandlers, getBuiltInHandler, EventSourceComponent };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AgentComponentAdapter,
|
|
3
|
+
init_agent_component_adapter
|
|
4
|
+
} from "./roy-agent-core-gmnex23m.js";
|
|
5
|
+
import"./roy-agent-core-1db4vpc6.js";
|
|
6
|
+
import"./roy-agent-core-e25xkv53.js";
|
|
7
|
+
import"./roy-agent-core-vc7p80sd.js";
|
|
8
|
+
import"./roy-agent-core-sqt96sam.js";
|
|
9
|
+
import"./roy-agent-core-dtkbj8fk.js";
|
|
10
|
+
import"./roy-agent-core-96mj6gvc.js";
|
|
11
|
+
import"./roy-agent-core-nna4s0qs.js";
|
|
12
|
+
import"./roy-agent-core-m00kamqp.js";
|
|
13
|
+
import"./roy-agent-core-4an1p9a1.js";
|
|
14
|
+
import"./roy-agent-core-fs0mn2jk.js";
|
|
15
|
+
init_agent_component_adapter();
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
AgentComponentAdapter
|
|
19
|
+
};
|