@ai-setting/roy-agent-core 1.6.13 → 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 +18 -14
- package/dist/env/hook/index.js +8 -8
- package/dist/env/index.js +41 -41
- 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 +11 -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 +13 -13
- package/dist/env/workflow/index.js +27 -25
- 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 +18 -17
- package/dist/env/workflow/types/index.js +3 -1
- package/dist/env/workflow/utils/index.js +8 -8
- package/dist/index.js +54 -52
- 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-deqpzcg7.js → roy-agent-core-1ecgh5ya.js} +81 -13
- package/dist/shared/@ai-setting/{roy-agent-core-wjve1qr5.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-8cbsjkkx.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-vcjq65nz.js → roy-agent-core-bq1gskrf.js} +23 -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-w22tzjj5.js → roy-agent-core-ez91vxas.js} +94 -15
- 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-qnrf2aw6.js → roy-agent-core-jrj30vq3.js} +33 -2
- 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-2b4078kz.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-v77pp20w.js → roy-agent-core-x36fsm47.js} +14 -14
- package/dist/shared/@ai-setting/{roy-agent-core-0pbmweh4.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-0crh2g0m.js → roy-agent-core-yr3fp8tv.js} +13 -13
- 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
|
@@ -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
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
exports_node_registry_helper,
|
|
3
3
|
init_node_registry_helper
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-77wfej1h.js";
|
|
5
5
|
import {
|
|
6
6
|
WorkflowEngine,
|
|
7
7
|
exports_engine,
|
|
8
8
|
init_engine
|
|
9
|
-
} from "./roy-agent-core-
|
|
9
|
+
} from "./roy-agent-core-yr3fp8tv.js";
|
|
10
10
|
import {
|
|
11
11
|
askUserTool,
|
|
12
12
|
createRunWorkflowTool,
|
|
@@ -18,17 +18,17 @@ import {
|
|
|
18
18
|
createWorkflowSearchTool,
|
|
19
19
|
createWorkflowTagListTool,
|
|
20
20
|
createWorkflowValidateTool
|
|
21
|
-
} from "./roy-agent-core-
|
|
21
|
+
} from "./roy-agent-core-4z7dzcgb.js";
|
|
22
22
|
import {
|
|
23
23
|
WorkflowService
|
|
24
|
-
} from "./roy-agent-core-
|
|
24
|
+
} from "./roy-agent-core-r15sn7ve.js";
|
|
25
25
|
import {
|
|
26
26
|
BaseComponent
|
|
27
|
-
} from "./roy-agent-core-
|
|
27
|
+
} from "./roy-agent-core-akb8mb9v.js";
|
|
28
28
|
import {
|
|
29
29
|
createLogger,
|
|
30
30
|
init_logger
|
|
31
|
-
} from "./roy-agent-core-
|
|
31
|
+
} from "./roy-agent-core-nna4s0qs.js";
|
|
32
32
|
import {
|
|
33
33
|
__require,
|
|
34
34
|
__toCommonJS
|
|
@@ -104,7 +104,7 @@ class WorkflowComponent extends BaseComponent {
|
|
|
104
104
|
return;
|
|
105
105
|
try {
|
|
106
106
|
const { NodeRegistry } = await import("../../env/workflow/engine/index.js");
|
|
107
|
-
const { registerDecoratorNodeType: registerDecoratorNodeType2 } = await import("./roy-agent-core-
|
|
107
|
+
const { registerDecoratorNodeType: registerDecoratorNodeType2 } = await import("./roy-agent-core-p4z6nxgz.js");
|
|
108
108
|
this.nodeRegistry = new NodeRegistry;
|
|
109
109
|
registerDecoratorNodeType2(this.nodeRegistry);
|
|
110
110
|
this.decoratorsRegistered = true;
|
|
@@ -134,14 +134,14 @@ class WorkflowComponent extends BaseComponent {
|
|
|
134
134
|
}
|
|
135
135
|
async runWorkflow(definition, input, options) {
|
|
136
136
|
const { NodeRegistry } = await import("../../env/workflow/engine/index.js");
|
|
137
|
-
const { registerDecoratorNodeType: registerDecoratorNodeType2 } = await import("./roy-agent-core-
|
|
137
|
+
const { registerDecoratorNodeType: registerDecoratorNodeType2 } = await import("./roy-agent-core-p4z6nxgz.js");
|
|
138
138
|
const toolComponent = this.toolComponent || this._workflowEnv?.getComponent("tool");
|
|
139
139
|
const skillComponent = this._workflowEnv?.getComponent("skill");
|
|
140
140
|
let agentRunner = this.agentRunner;
|
|
141
141
|
if (!agentRunner && this._workflowEnv) {
|
|
142
142
|
const agentComponent = this._workflowEnv.getComponent("agent");
|
|
143
143
|
if (agentComponent) {
|
|
144
|
-
const { AgentComponentAdapter } = await import("./roy-agent-core-
|
|
144
|
+
const { AgentComponentAdapter } = await import("./roy-agent-core-wsqnf2za.js");
|
|
145
145
|
agentRunner = new AgentComponentAdapter(agentComponent, {}, this.sessionComponent);
|
|
146
146
|
}
|
|
147
147
|
}
|
|
@@ -163,7 +163,7 @@ class WorkflowComponent extends BaseComponent {
|
|
|
163
163
|
if (this.workflowService) {
|
|
164
164
|
this.workflowService = null;
|
|
165
165
|
try {
|
|
166
|
-
const { closeDatabase } = await import("./roy-agent-core-
|
|
166
|
+
const { closeDatabase } = await import("./roy-agent-core-pr4jekyy.js");
|
|
167
167
|
closeDatabase();
|
|
168
168
|
componentLogger.info("[WorkflowComponent] SQLite database closed");
|
|
169
169
|
} catch (error) {
|
|
@@ -241,9 +241,9 @@ class WorkflowComponent extends BaseComponent {
|
|
|
241
241
|
}
|
|
242
242
|
async initSqliteService() {
|
|
243
243
|
try {
|
|
244
|
-
const { getDatabase, initializeTables } = await import("./roy-agent-core-
|
|
245
|
-
const { WorkflowRepository } = await import("./roy-agent-core-
|
|
246
|
-
const { TagRepository } = await import("./roy-agent-core-
|
|
244
|
+
const { getDatabase, initializeTables } = await import("./roy-agent-core-pr4jekyy.js");
|
|
245
|
+
const { WorkflowRepository } = await import("./roy-agent-core-fxembepv.js");
|
|
246
|
+
const { TagRepository } = await import("./roy-agent-core-w6kj6nmj.js");
|
|
247
247
|
const db = getDatabase();
|
|
248
248
|
initializeTables();
|
|
249
249
|
const workflowRepository = new WorkflowRepository(db);
|
|
@@ -309,7 +309,7 @@ class WorkflowComponent extends BaseComponent {
|
|
|
309
309
|
this.workflowService = null;
|
|
310
310
|
this.nodeRegistry = null;
|
|
311
311
|
try {
|
|
312
|
-
const { closeDatabase } = await import("./roy-agent-core-
|
|
312
|
+
const { closeDatabase } = await import("./roy-agent-core-pr4jekyy.js");
|
|
313
313
|
closeDatabase();
|
|
314
314
|
} catch {}
|
|
315
315
|
this._status = "stopped";
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAutoTaskPlugin
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-1ecgh5ya.js";
|
|
4
4
|
import {
|
|
5
5
|
ContextError,
|
|
6
6
|
ErrorCodes
|
|
7
7
|
} from "./roy-agent-core-ctdhjv68.js";
|
|
8
8
|
import {
|
|
9
9
|
BaseComponent
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-akb8mb9v.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
|
getEnvContext,
|
|
16
16
|
init_env_context,
|
|
17
17
|
runWithEnvContextAsync
|
|
18
|
-
} from "./roy-agent-core-
|
|
18
|
+
} from "./roy-agent-core-dtkbj8fk.js";
|
|
19
19
|
import {
|
|
20
20
|
TracedAs,
|
|
21
21
|
init_decorator
|
|
22
|
-
} from "./roy-agent-core-
|
|
22
|
+
} from "./roy-agent-core-96mj6gvc.js";
|
|
23
23
|
import {
|
|
24
24
|
createLogger,
|
|
25
25
|
init_logger
|
|
26
|
-
} from "./roy-agent-core-
|
|
26
|
+
} from "./roy-agent-core-nna4s0qs.js";
|
|
27
27
|
import {
|
|
28
28
|
__legacyDecorateClassTS
|
|
29
29
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
getTracerProvider,
|
|
4
4
|
init_tracer_provider,
|
|
5
5
|
resetTracerProvider
|
|
6
|
-
} from "./roy-agent-core-
|
|
7
|
-
import"./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-m00kamqp.js";
|
|
7
|
+
import"./roy-agent-core-4an1p9a1.js";
|
|
8
8
|
import"./roy-agent-core-fs0mn2jk.js";
|
|
9
9
|
init_tracer_provider();
|
|
10
10
|
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
AgentComponentAdapter,
|
|
9
9
|
init_agent_component_adapter
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-gmnex23m.js";
|
|
11
11
|
import {
|
|
12
12
|
TemplateResolver,
|
|
13
13
|
init_template_resolver
|
|
14
|
-
} from "./roy-agent-core-
|
|
14
|
+
} from "./roy-agent-core-ez91vxas.js";
|
|
15
15
|
import {
|
|
16
16
|
PythonCallNode,
|
|
17
17
|
SkillNode,
|
|
@@ -21,14 +21,7 @@ import {
|
|
|
21
21
|
init_skill_node,
|
|
22
22
|
init_tool_node,
|
|
23
23
|
init_workflow_node
|
|
24
|
-
} from "./roy-agent-core-
|
|
25
|
-
import {
|
|
26
|
-
WorkflowError,
|
|
27
|
-
createWorkflowEvent,
|
|
28
|
-
init_event,
|
|
29
|
-
init_types,
|
|
30
|
-
init_workflow_error
|
|
31
|
-
} from "./roy-agent-core-qnrf2aw6.js";
|
|
24
|
+
} from "./roy-agent-core-7kw06e4b.js";
|
|
32
25
|
import {
|
|
33
26
|
WORKFLOW_SUBMIT_OUTPUT_TOOL_NAME,
|
|
34
27
|
init_json_schema_to_zod,
|
|
@@ -40,7 +33,14 @@ import {
|
|
|
40
33
|
import {
|
|
41
34
|
DAGManager,
|
|
42
35
|
init_dag_manager
|
|
43
|
-
} from "./roy-agent-core-
|
|
36
|
+
} from "./roy-agent-core-bq1gskrf.js";
|
|
37
|
+
import {
|
|
38
|
+
WorkflowError,
|
|
39
|
+
createWorkflowEvent,
|
|
40
|
+
init_event,
|
|
41
|
+
init_types,
|
|
42
|
+
init_workflow_error
|
|
43
|
+
} from "./roy-agent-core-jrj30vq3.js";
|
|
44
44
|
import {
|
|
45
45
|
AskUserError,
|
|
46
46
|
createNodeInterruptEvent,
|
|
@@ -49,11 +49,11 @@ import {
|
|
|
49
49
|
import {
|
|
50
50
|
TracedAs,
|
|
51
51
|
init_decorator
|
|
52
|
-
} from "./roy-agent-core-
|
|
52
|
+
} from "./roy-agent-core-96mj6gvc.js";
|
|
53
53
|
import {
|
|
54
54
|
createLogger,
|
|
55
55
|
init_logger
|
|
56
|
-
} from "./roy-agent-core-
|
|
56
|
+
} from "./roy-agent-core-nna4s0qs.js";
|
|
57
57
|
import {
|
|
58
58
|
__esm,
|
|
59
59
|
__export,
|
|
@@ -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
|
__esm,
|
|
11
11
|
__export,
|