@ai-setting/roy-agent-core 1.6.21 → 1.6.23
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/index.js +17 -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/event-source/index.js +14 -13
- package/dist/env/hook/index.js +7 -7
- package/dist/env/index.js +41 -40
- package/dist/env/llm/index.js +11 -11
- package/dist/env/log-trace/index.js +9 -9
- 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 +5 -5
- package/dist/env/skill/index.js +9 -9
- 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 -8
- package/dist/env/task/storage/index.js +4 -4
- package/dist/env/task/tools/index.js +5 -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 +11 -11
- package/dist/env/workflow/index.js +22 -22
- package/dist/env/workflow/nodes/index.js +4 -4
- 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 +52 -51
- package/dist/shared/@ai-setting/{roy-agent-core-7kw06e4b.js → roy-agent-core-0qjw25e8.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-bq1gskrf.js → roy-agent-core-0v74marc.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-e0kaxcy1.js → roy-agent-core-12gac5zn.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-f1cjs6c4.js → roy-agent-core-16dqrewm.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-7r72622v.js → roy-agent-core-1k9j90s7.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-m00kamqp.js → roy-agent-core-1khp1m0r.js} +8 -1
- package/dist/shared/@ai-setting/{roy-agent-core-zeztnvvb.js → roy-agent-core-3c1b7xh5.js} +221 -79
- package/dist/shared/@ai-setting/{roy-agent-core-77wfej1h.js → roy-agent-core-3e0w0ekw.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-zdzkzx5g.js → roy-agent-core-3ep1dxf1.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-gc75v3px.js → roy-agent-core-3x3k7gfs.js} +5 -5
- package/dist/shared/@ai-setting/roy-agent-core-4k8tv5q5.js +11 -0
- package/dist/shared/@ai-setting/{roy-agent-core-zvwdfm79.js → roy-agent-core-50jdqb7r.js} +95 -32
- package/dist/shared/@ai-setting/{roy-agent-core-02aw62bv.js → roy-agent-core-5ts23mx0.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-atpchjdz.js → roy-agent-core-6m2gh57e.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-ehpnd2be.js → roy-agent-core-6re7eg4w.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-ett06sn8.js → roy-agent-core-7cxdkcrz.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-416rpxkp.js → roy-agent-core-7wv7gh6t.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-bb20se79.js → roy-agent-core-8s7qyr5y.js} +8 -8
- package/dist/shared/@ai-setting/{roy-agent-core-fxembepv.js → roy-agent-core-90wp1rgb.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-xjj88tpn.js → roy-agent-core-afb03wwp.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-5pzegp1x.js → roy-agent-core-b64s2vk9.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-ataagh3a.js → roy-agent-core-br7dmedr.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-8n0e62y4.js → roy-agent-core-c1stgqnw.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-gmnex23m.js → roy-agent-core-cjraf54z.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-j8t1tyhr.js → roy-agent-core-dbwvfe0m.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-mdp8y7ky.js → roy-agent-core-dxfd6p1c.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-wsqnf2za.js → roy-agent-core-ef486rdm.js} +7 -7
- package/dist/shared/@ai-setting/{roy-agent-core-kr58bgz0.js → roy-agent-core-f2nync7q.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-dh9rajdh.js → roy-agent-core-g7nmwg63.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-96mj6gvc.js → roy-agent-core-gb7pm9c0.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-grajzyhd.js → roy-agent-core-gns3wa97.js} +14 -18
- package/dist/shared/@ai-setting/{roy-agent-core-ez91vxas.js → roy-agent-core-h1cb2jzh.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-eskgj8nc.js → roy-agent-core-h28gcd77.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-sqt96sam.js → roy-agent-core-h7ak839w.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-c7e3htaq.js → roy-agent-core-hks28tys.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-vc7p80sd.js → roy-agent-core-j29yg06n.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-r15sn7ve.js → roy-agent-core-j9ybhwnq.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-nna4s0qs.js → roy-agent-core-kaq037np.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-e9jf4w3z.js → roy-agent-core-kv7frw13.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-44g3synv.js → roy-agent-core-mvs5sen6.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-akb8mb9v.js → roy-agent-core-pde8hkq4.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-p4z6nxgz.js → roy-agent-core-pdnp5kj0.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-1qjgwjjs.js → roy-agent-core-pz2n121t.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-wr3pk3h3.js → roy-agent-core-qe3m3hec.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-v20nxrs1.js → roy-agent-core-qpt5fa8h.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-keb51jag.js → roy-agent-core-rs5tp44j.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-2b0mw2h3.js → roy-agent-core-s07nere5.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-ajp566yv.js → roy-agent-core-sfwt66pv.js} +2 -2
- package/dist/shared/@ai-setting/roy-agent-core-t3yqzgse.js +71 -0
- package/dist/shared/@ai-setting/{roy-agent-core-xzc53mnk.js → roy-agent-core-t9h4np6m.js} +4 -2
- package/dist/shared/@ai-setting/{roy-agent-core-1mrc9a1r.js → roy-agent-core-w8rv08d3.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-b9q2jfx4.js → roy-agent-core-watkmj7d.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-bwqjwa0d.js → roy-agent-core-wr1pgw0x.js} +8 -8
- package/dist/shared/@ai-setting/{roy-agent-core-fntxq0gf.js → roy-agent-core-x0yztmm6.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-dtkbj8fk.js → roy-agent-core-xrr7t0qc.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-q06h6qf8.js → roy-agent-core-xwnpygva.js} +14 -14
- package/dist/shared/@ai-setting/{roy-agent-core-pr4jekyy.js → roy-agent-core-z2w7wtqd.js} +5 -5
- package/dist/utils/temp-file-manager/index.js +3 -3
- package/package.json +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-w6kj6nmj.js +0 -11
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
TracedAs,
|
|
11
11
|
init_decorator
|
|
12
|
-
} from "./roy-agent-core-
|
|
12
|
+
} from "./roy-agent-core-gb7pm9c0.js";
|
|
13
13
|
import {
|
|
14
14
|
createLogger,
|
|
15
15
|
init_logger
|
|
16
|
-
} from "./roy-agent-core-
|
|
16
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
17
17
|
import {
|
|
18
18
|
__esm,
|
|
19
19
|
__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-gb7pm9c0.js";
|
|
5
5
|
import {
|
|
6
6
|
createLogger,
|
|
7
7
|
init_logger
|
|
8
|
-
} from "./roy-agent-core-
|
|
8
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
9
9
|
import {
|
|
10
10
|
__esm,
|
|
11
11
|
__export,
|
|
@@ -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-pde8hkq4.js";
|
|
7
7
|
import {
|
|
8
8
|
globalHookManager,
|
|
9
9
|
init_global_hook_manager
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-j29yg06n.js";
|
|
11
11
|
import {
|
|
12
12
|
init_context
|
|
13
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-h7ak839w.js";
|
|
14
14
|
import {
|
|
15
15
|
getEnvContextOrEmpty
|
|
16
|
-
} from "./roy-agent-core-
|
|
16
|
+
} from "./roy-agent-core-xrr7t0qc.js";
|
|
17
17
|
import {
|
|
18
18
|
createLogger,
|
|
19
19
|
init_logger
|
|
20
|
-
} from "./roy-agent-core-
|
|
20
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
21
21
|
|
|
22
22
|
// src/env/plugin/event-bus-notification-channel.ts
|
|
23
23
|
init_logger();
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TagRepository
|
|
3
|
+
} from "./roy-agent-core-6m2gh57e.js";
|
|
4
|
+
import"./roy-agent-core-gb7pm9c0.js";
|
|
5
|
+
import"./roy-agent-core-kaq037np.js";
|
|
6
|
+
import"./roy-agent-core-1khp1m0r.js";
|
|
7
|
+
import"./roy-agent-core-4an1p9a1.js";
|
|
8
|
+
import"./roy-agent-core-fs0mn2jk.js";
|
|
9
|
+
export {
|
|
10
|
+
TagRepository
|
|
11
|
+
};
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ProcessRegistry,
|
|
3
3
|
runWithProcessRegistryAsync
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-mvs5sen6.js";
|
|
5
5
|
import {
|
|
6
6
|
builtInPrompts
|
|
7
7
|
} from "./roy-agent-core-skqt40yy.js";
|
|
8
|
+
import {
|
|
9
|
+
DEFAULT_SUBAGENT_PROMPT
|
|
10
|
+
} from "./roy-agent-core-x0yztmm6.js";
|
|
8
11
|
import {
|
|
9
12
|
runWithBgTaskIdAsync
|
|
10
13
|
} from "./roy-agent-core-c1v263jn.js";
|
|
11
|
-
import {
|
|
12
|
-
DEFAULT_SUBAGENT_PROMPT
|
|
13
|
-
} from "./roy-agent-core-fntxq0gf.js";
|
|
14
14
|
import {
|
|
15
15
|
TaskHookPoints
|
|
16
16
|
} from "./roy-agent-core-1pg0fepg.js";
|
|
17
17
|
import {
|
|
18
18
|
globalHookManager,
|
|
19
19
|
init_global_hook_manager
|
|
20
|
-
} from "./roy-agent-core-
|
|
20
|
+
} from "./roy-agent-core-j29yg06n.js";
|
|
21
21
|
import {
|
|
22
22
|
init_context
|
|
23
|
-
} from "./roy-agent-core-
|
|
23
|
+
} from "./roy-agent-core-h7ak839w.js";
|
|
24
24
|
import {
|
|
25
25
|
getCurrentTaskId,
|
|
26
26
|
getEnvContext
|
|
27
|
-
} from "./roy-agent-core-
|
|
27
|
+
} from "./roy-agent-core-xrr7t0qc.js";
|
|
28
28
|
import {
|
|
29
29
|
TracedAs,
|
|
30
30
|
init_decorator,
|
|
31
31
|
wrapFunction
|
|
32
|
-
} from "./roy-agent-core-
|
|
32
|
+
} from "./roy-agent-core-gb7pm9c0.js";
|
|
33
33
|
import {
|
|
34
34
|
createLogger,
|
|
35
35
|
init_logger
|
|
36
|
-
} from "./roy-agent-core-
|
|
36
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
37
37
|
import {
|
|
38
38
|
__legacyDecorateClassTS
|
|
39
39
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -984,10 +984,12 @@ class BackgroundTaskManager {
|
|
|
984
984
|
this.terminalTasks.set(taskId, task);
|
|
985
985
|
}
|
|
986
986
|
const abortCtl = this.abortControllers.get(taskId);
|
|
987
|
-
if (abortCtl) {
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
987
|
+
if (abortCtl && reason !== "completed") {
|
|
988
|
+
if (!abortCtl.signal.aborted) {
|
|
989
|
+
try {
|
|
990
|
+
abortCtl.abort();
|
|
991
|
+
} catch {}
|
|
992
|
+
}
|
|
991
993
|
}
|
|
992
994
|
this.abortControllers.delete(taskId);
|
|
993
995
|
this.workflowRunRegistries.delete(taskId);
|
|
@@ -1132,8 +1134,10 @@ class BackgroundTaskManager {
|
|
|
1132
1134
|
const processRegistry = new ProcessRegistry;
|
|
1133
1135
|
this.processRegistries.set(taskIdGen, processRegistry);
|
|
1134
1136
|
const createdAt = Date.now();
|
|
1137
|
+
const taskRunId = `${subagentType}:bg_${taskIdGen}`;
|
|
1135
1138
|
const task = {
|
|
1136
1139
|
id: taskIdGen,
|
|
1140
|
+
runId: taskRunId,
|
|
1137
1141
|
subSessionId: subSession.id,
|
|
1138
1142
|
parentSessionId,
|
|
1139
1143
|
description,
|
|
@@ -1182,7 +1186,7 @@ class BackgroundTaskManager {
|
|
|
1182
1186
|
throw new Error(`Sub session not found: ${task.subSessionId}`);
|
|
1183
1187
|
}
|
|
1184
1188
|
const taskRegistry = this.processRegistries.get(taskId);
|
|
1185
|
-
const result = await this.executeWithAbort(subSession, prompt, timeoutMs, taskId, abortController?.signal, task.similarTaskIds, taskRegistry);
|
|
1189
|
+
const result = await this.executeWithAbort(subSession, prompt, timeoutMs, taskId, abortController?.signal, task.similarTaskIds, taskRegistry, () => abortController?.abort());
|
|
1186
1190
|
if (abortController?.signal.aborted) {
|
|
1187
1191
|
logger3.info(`[BackgroundTaskManager] Task was aborted`, { taskId });
|
|
1188
1192
|
return;
|
|
@@ -1311,7 +1315,7 @@ class BackgroundTaskManager {
|
|
|
1311
1315
|
this.progressTimers.delete(taskId);
|
|
1312
1316
|
}
|
|
1313
1317
|
}
|
|
1314
|
-
async executeWithAbort(subSession, prompt, timeoutMs, bgTaskId, signal, similarTaskIds, processRegistry) {
|
|
1318
|
+
async executeWithAbort(subSession, prompt, timeoutMs, bgTaskId, signal, similarTaskIds, processRegistry, abortTask) {
|
|
1315
1319
|
const metadata = subSession.info?.metadata || {};
|
|
1316
1320
|
const taskId = metadata.task_id;
|
|
1317
1321
|
const taskDescription = metadata.task_description || "";
|
|
@@ -1453,37 +1457,84 @@ ${reuseSection.markdown}`;
|
|
|
1453
1457
|
});
|
|
1454
1458
|
}
|
|
1455
1459
|
};
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1460
|
+
let settled = false;
|
|
1461
|
+
let timer;
|
|
1462
|
+
let capturedRunId;
|
|
1463
|
+
const task = this.tasks.get(bgTaskId);
|
|
1464
|
+
if (task?.runId) {
|
|
1465
|
+
capturedRunId = task.runId;
|
|
1466
|
+
}
|
|
1467
|
+
const detachAbortListener = () => {
|
|
1468
|
+
if (signal && onAbort) {
|
|
1469
|
+
try {
|
|
1470
|
+
signal.removeEventListener("abort", onAbort);
|
|
1471
|
+
} catch {}
|
|
1472
|
+
}
|
|
1473
|
+
};
|
|
1474
|
+
let onAbort;
|
|
1475
|
+
onAbort = () => {
|
|
1476
|
+
if (settled)
|
|
1477
|
+
return;
|
|
1478
|
+
settled = true;
|
|
1479
|
+
if (timer)
|
|
1480
|
+
clearTimeout(timer);
|
|
1481
|
+
detachAbortListener();
|
|
1459
1482
|
try {
|
|
1460
|
-
|
|
1483
|
+
const agentComp = this.env?.getComponent?.("agent");
|
|
1484
|
+
if (agentComp?.abortRun && capturedRunId) {
|
|
1485
|
+
agentComp.abortRun(capturedRunId, "task_signal_abort");
|
|
1486
|
+
}
|
|
1487
|
+
} catch {}
|
|
1488
|
+
killProcessTreeSafely().catch(() => {}).then(() => {
|
|
1489
|
+
reject(new Error("Task execution stopped"));
|
|
1490
|
+
});
|
|
1491
|
+
};
|
|
1492
|
+
timer = setTimeout(() => {
|
|
1493
|
+
if (settled)
|
|
1494
|
+
return;
|
|
1495
|
+
settled = true;
|
|
1496
|
+
if (timer)
|
|
1497
|
+
clearTimeout(timer);
|
|
1498
|
+
detachAbortListener();
|
|
1499
|
+
try {
|
|
1500
|
+
abortTask?.();
|
|
1461
1501
|
} catch {}
|
|
1462
|
-
}, timeoutMs);
|
|
1463
|
-
signal?.addEventListener("abort", async () => {
|
|
1464
|
-
clearTimeout(timer);
|
|
1465
1502
|
try {
|
|
1466
|
-
const
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
agentComp.abort(subagentType);
|
|
1503
|
+
const agentComp = this.env?.getComponent?.("agent");
|
|
1504
|
+
if (agentComp?.abortRun && capturedRunId) {
|
|
1505
|
+
agentComp.abortRun(capturedRunId, "task_timeout");
|
|
1470
1506
|
}
|
|
1471
1507
|
} catch {}
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1508
|
+
killProcessTreeSafely().catch(() => {}).then(() => {
|
|
1509
|
+
reject(new Error(`Task execution timeout after ${timeoutMs}ms`));
|
|
1510
|
+
});
|
|
1511
|
+
}, timeoutMs);
|
|
1512
|
+
if (signal) {
|
|
1513
|
+
signal.addEventListener("abort", onAbort);
|
|
1514
|
+
}
|
|
1475
1515
|
const invokeHandleQuery = () => this.env.handle_query?.(delegateQuery, {
|
|
1476
1516
|
sessionId,
|
|
1477
1517
|
deniedTools: deniedTools.length > 0 ? deniedTools : undefined,
|
|
1478
1518
|
agentType: subagentType,
|
|
1479
|
-
abort: signal
|
|
1519
|
+
abort: signal,
|
|
1520
|
+
runId: capturedRunId
|
|
1480
1521
|
});
|
|
1481
1522
|
const wrappedPromise = processRegistry ? runWithProcessRegistryAsync(processRegistry, () => runWithBgTaskIdAsync(bgTaskId, () => invokeHandleQuery())) : runWithBgTaskIdAsync(bgTaskId, () => invokeHandleQuery());
|
|
1482
1523
|
wrappedPromise?.then((result) => {
|
|
1483
|
-
|
|
1524
|
+
if (settled)
|
|
1525
|
+
return;
|
|
1526
|
+
settled = true;
|
|
1527
|
+
if (timer)
|
|
1528
|
+
clearTimeout(timer);
|
|
1529
|
+
detachAbortListener();
|
|
1484
1530
|
resolve(result);
|
|
1485
1531
|
}).catch((error) => {
|
|
1486
|
-
|
|
1532
|
+
if (settled)
|
|
1533
|
+
return;
|
|
1534
|
+
settled = true;
|
|
1535
|
+
if (timer)
|
|
1536
|
+
clearTimeout(timer);
|
|
1537
|
+
detachAbortListener();
|
|
1487
1538
|
reject(error);
|
|
1488
1539
|
});
|
|
1489
1540
|
});
|
|
@@ -1510,6 +1561,18 @@ ${reuseSection.markdown}`;
|
|
|
1510
1561
|
const completedAt = Date.now();
|
|
1511
1562
|
task.status = "stopped";
|
|
1512
1563
|
task.abortController?.abort();
|
|
1564
|
+
if (task.runId) {
|
|
1565
|
+
try {
|
|
1566
|
+
const agentComp = this.env?.getComponent?.("agent");
|
|
1567
|
+
agentComp?.abortRun?.(task.runId, "stop_task");
|
|
1568
|
+
} catch (err) {
|
|
1569
|
+
logger3.warn(`[BackgroundTaskManager] abortRun failed during stopTask`, {
|
|
1570
|
+
taskId,
|
|
1571
|
+
runId: task.runId,
|
|
1572
|
+
error: err instanceof Error ? err.message : String(err)
|
|
1573
|
+
});
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1513
1576
|
task.completedAt = completedAt;
|
|
1514
1577
|
task.lastUpdatedAt = completedAt;
|
|
1515
1578
|
try {
|
|
@@ -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-pde8hkq4.js";
|
|
8
8
|
import {
|
|
9
9
|
createLogger,
|
|
10
10
|
init_logger
|
|
11
|
-
} from "./roy-agent-core-
|
|
11
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
12
12
|
|
|
13
13
|
// src/env/commands/commands-component.ts
|
|
14
14
|
import path2 from "path";
|
|
@@ -10,18 +10,18 @@ import {
|
|
|
10
10
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
11
11
|
import {
|
|
12
12
|
BaseComponent
|
|
13
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-pde8hkq4.js";
|
|
14
14
|
import {
|
|
15
15
|
createHook
|
|
16
|
-
} from "./roy-agent-core-
|
|
16
|
+
} from "./roy-agent-core-5ts23mx0.js";
|
|
17
17
|
import {
|
|
18
18
|
globalHookManager,
|
|
19
19
|
init_global_hook_manager
|
|
20
|
-
} from "./roy-agent-core-
|
|
20
|
+
} from "./roy-agent-core-j29yg06n.js";
|
|
21
21
|
import {
|
|
22
22
|
createLogger,
|
|
23
23
|
init_logger
|
|
24
|
-
} from "./roy-agent-core-
|
|
24
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
25
25
|
|
|
26
26
|
// src/env/prompt/types.ts
|
|
27
27
|
import { z } from "zod";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./roy-agent-core-y3g3ar7a.js";
|
|
4
4
|
import {
|
|
5
5
|
invoke
|
|
6
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-c1stgqnw.js";
|
|
7
7
|
import {
|
|
8
8
|
ContextError,
|
|
9
9
|
ErrorCodes
|
|
@@ -14,20 +14,20 @@ import {
|
|
|
14
14
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
15
15
|
import {
|
|
16
16
|
BaseComponent
|
|
17
|
-
} from "./roy-agent-core-
|
|
17
|
+
} from "./roy-agent-core-pde8hkq4.js";
|
|
18
18
|
import {
|
|
19
19
|
LLMHookPoints,
|
|
20
20
|
globalHookManager,
|
|
21
21
|
init_global_hook_manager
|
|
22
|
-
} from "./roy-agent-core-
|
|
22
|
+
} from "./roy-agent-core-j29yg06n.js";
|
|
23
23
|
import {
|
|
24
24
|
TracedAs,
|
|
25
25
|
init_decorator
|
|
26
|
-
} from "./roy-agent-core-
|
|
26
|
+
} from "./roy-agent-core-gb7pm9c0.js";
|
|
27
27
|
import {
|
|
28
28
|
createLogger,
|
|
29
29
|
init_logger
|
|
30
|
-
} from "./roy-agent-core-
|
|
30
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
31
31
|
import {
|
|
32
32
|
__legacyDecorateClassTS
|
|
33
33
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
BackgroundTaskManager,
|
|
9
9
|
createDelegateTool,
|
|
10
10
|
createStopTool
|
|
11
|
-
} from "./roy-agent-core-
|
|
11
|
+
} from "./roy-agent-core-50jdqb7r.js";
|
|
12
12
|
import {
|
|
13
13
|
SQLiteTaskStore,
|
|
14
14
|
getDefaultTaskDbPath
|
|
15
|
-
} from "./roy-agent-core-
|
|
15
|
+
} from "./roy-agent-core-3ep1dxf1.js";
|
|
16
16
|
import {
|
|
17
17
|
batchArchiveTaskTool,
|
|
18
18
|
batchDeleteTaskTool,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
searchTasksTool,
|
|
25
25
|
treeTasksTool,
|
|
26
26
|
updateTaskTool
|
|
27
|
-
} from "./roy-agent-core-
|
|
27
|
+
} from "./roy-agent-core-hks28tys.js";
|
|
28
28
|
import {
|
|
29
29
|
createOperationTool,
|
|
30
30
|
deleteOperationTool,
|
|
@@ -40,23 +40,23 @@ import {
|
|
|
40
40
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
41
41
|
import {
|
|
42
42
|
BaseComponent
|
|
43
|
-
} from "./roy-agent-core-
|
|
43
|
+
} from "./roy-agent-core-pde8hkq4.js";
|
|
44
44
|
import {
|
|
45
45
|
globalHookManager,
|
|
46
46
|
init_global_hook_manager
|
|
47
|
-
} from "./roy-agent-core-
|
|
47
|
+
} from "./roy-agent-core-j29yg06n.js";
|
|
48
48
|
import {
|
|
49
49
|
getEnvContextOrEmpty,
|
|
50
50
|
init_env_context
|
|
51
|
-
} from "./roy-agent-core-
|
|
51
|
+
} from "./roy-agent-core-xrr7t0qc.js";
|
|
52
52
|
import {
|
|
53
53
|
TracedAs,
|
|
54
54
|
init_decorator
|
|
55
|
-
} from "./roy-agent-core-
|
|
55
|
+
} from "./roy-agent-core-gb7pm9c0.js";
|
|
56
56
|
import {
|
|
57
57
|
createLogger,
|
|
58
58
|
init_logger
|
|
59
|
-
} from "./roy-agent-core-
|
|
59
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
60
60
|
import {
|
|
61
61
|
__legacyDecorateClassTS
|
|
62
62
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -2,12 +2,12 @@ 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-sfwt66pv.js";
|
|
6
|
+
import"./roy-agent-core-6m2gh57e.js";
|
|
7
7
|
import"./roy-agent-core-rvxg1wps.js";
|
|
8
|
-
import"./roy-agent-core-
|
|
9
|
-
import"./roy-agent-core-
|
|
10
|
-
import"./roy-agent-core-
|
|
8
|
+
import"./roy-agent-core-gb7pm9c0.js";
|
|
9
|
+
import"./roy-agent-core-kaq037np.js";
|
|
10
|
+
import"./roy-agent-core-1khp1m0r.js";
|
|
11
11
|
import"./roy-agent-core-4an1p9a1.js";
|
|
12
12
|
import"./roy-agent-core-fs0mn2jk.js";
|
|
13
13
|
export {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SessionMessageConverter
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-1k9j90s7.js";
|
|
4
4
|
import {
|
|
5
5
|
createLogger,
|
|
6
6
|
init_logger
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
8
8
|
import {
|
|
9
9
|
__require
|
|
10
10
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -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-pde8hkq4.js";
|
|
10
10
|
import {
|
|
11
11
|
createLogger,
|
|
12
12
|
init_logger
|
|
13
|
-
} from "./roy-agent-core-
|
|
13
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
14
14
|
|
|
15
15
|
// src/env/skill/skill-component.ts
|
|
16
16
|
init_logger();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
safeParseToolArgs
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-12gac5zn.js";
|
|
4
4
|
import {
|
|
5
5
|
createLogger,
|
|
6
6
|
init_logger
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
8
8
|
import {
|
|
9
9
|
__require
|
|
10
10
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -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-j29yg06n.js";
|
|
13
13
|
import {
|
|
14
14
|
TracedAs,
|
|
15
15
|
init_decorator,
|
|
16
16
|
wrapFunction
|
|
17
|
-
} from "./roy-agent-core-
|
|
17
|
+
} from "./roy-agent-core-gb7pm9c0.js";
|
|
18
18
|
import {
|
|
19
19
|
createLogger,
|
|
20
20
|
init_logger
|
|
21
|
-
} from "./roy-agent-core-
|
|
21
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
22
22
|
import {
|
|
23
23
|
__esm,
|
|
24
24
|
__legacyDecorateClassTS
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TAG_MAX_COUNT,
|
|
3
3
|
TAG_MIN_COUNT
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-j9ybhwnq.js";
|
|
5
5
|
import {
|
|
6
6
|
validateWorkflowDefinition
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-w8rv08d3.js";
|
|
8
8
|
import {
|
|
9
9
|
AskUserError,
|
|
10
10
|
init_workflow_hil
|
|
@@ -14,15 +14,15 @@ import {
|
|
|
14
14
|
} from "./roy-agent-core-c1v263jn.js";
|
|
15
15
|
import {
|
|
16
16
|
isValidSessionId
|
|
17
|
-
} from "./roy-agent-core-
|
|
17
|
+
} from "./roy-agent-core-f2nync7q.js";
|
|
18
18
|
import {
|
|
19
19
|
TracedAs,
|
|
20
20
|
init_decorator
|
|
21
|
-
} from "./roy-agent-core-
|
|
21
|
+
} from "./roy-agent-core-gb7pm9c0.js";
|
|
22
22
|
import {
|
|
23
23
|
createLogger,
|
|
24
24
|
init_logger
|
|
25
|
-
} from "./roy-agent-core-
|
|
25
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
26
26
|
import {
|
|
27
27
|
__legacyDecorateClassTS
|
|
28
28
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentComponentAdapter,
|
|
3
3
|
init_agent_component_adapter
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-cjraf54z.js";
|
|
5
5
|
import"./roy-agent-core-1db4vpc6.js";
|
|
6
6
|
import"./roy-agent-core-e25xkv53.js";
|
|
7
|
-
import"./roy-agent-core-
|
|
8
|
-
import"./roy-agent-core-
|
|
9
|
-
import"./roy-agent-core-
|
|
10
|
-
import"./roy-agent-core-
|
|
11
|
-
import"./roy-agent-core-
|
|
12
|
-
import"./roy-agent-core-
|
|
7
|
+
import"./roy-agent-core-j29yg06n.js";
|
|
8
|
+
import"./roy-agent-core-h7ak839w.js";
|
|
9
|
+
import"./roy-agent-core-xrr7t0qc.js";
|
|
10
|
+
import"./roy-agent-core-gb7pm9c0.js";
|
|
11
|
+
import"./roy-agent-core-kaq037np.js";
|
|
12
|
+
import"./roy-agent-core-1khp1m0r.js";
|
|
13
13
|
import"./roy-agent-core-4an1p9a1.js";
|
|
14
14
|
import"./roy-agent-core-fs0mn2jk.js";
|
|
15
15
|
init_agent_component_adapter();
|
|
@@ -6,21 +6,21 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
MemorySessionStore,
|
|
8
8
|
SQLiteSessionStore
|
|
9
|
-
} from "./roy-agent-core-
|
|
9
|
+
} from "./roy-agent-core-afb03wwp.js";
|
|
10
10
|
import {
|
|
11
11
|
envKeyToConfigKey
|
|
12
12
|
} from "./roy-agent-core-7hh0brvs.js";
|
|
13
13
|
import {
|
|
14
14
|
BaseComponent
|
|
15
|
-
} from "./roy-agent-core-
|
|
15
|
+
} from "./roy-agent-core-pde8hkq4.js";
|
|
16
16
|
import {
|
|
17
17
|
TracedAs,
|
|
18
18
|
init_decorator
|
|
19
|
-
} from "./roy-agent-core-
|
|
19
|
+
} from "./roy-agent-core-gb7pm9c0.js";
|
|
20
20
|
import {
|
|
21
21
|
createLogger,
|
|
22
22
|
init_logger
|
|
23
|
-
} from "./roy-agent-core-
|
|
23
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
24
24
|
import {
|
|
25
25
|
__legacyDecorateClassTS
|
|
26
26
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
getMaxOutput,
|
|
4
4
|
init_logger,
|
|
5
5
|
simplifyFilePath
|
|
6
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-kaq037np.js";
|
|
7
7
|
import {
|
|
8
8
|
getTracerProvider,
|
|
9
9
|
init_tracer_provider
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-1khp1m0r.js";
|
|
11
11
|
import {
|
|
12
12
|
__esm
|
|
13
13
|
} from "./roy-agent-core-fs0mn2jk.js";
|