@ai-setting/roy-agent-core 1.5.90 → 1.5.92
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 +8 -8
- package/dist/env/agent/index.js +15 -14
- package/dist/env/commands/index.js +8 -8
- package/dist/env/context/index.js +4 -4
- package/dist/env/debug/index.js +8 -8
- package/dist/env/event-source/index.js +12 -12
- package/dist/env/hook/index.js +6 -6
- package/dist/env/index.js +35 -34
- package/dist/env/llm/index.js +10 -10
- package/dist/env/log-trace/index.js +8 -8
- package/dist/env/mcp/index.js +9 -9
- package/dist/env/mcp/tool/index.js +2 -2
- package/dist/env/memory/index.js +9 -9
- package/dist/env/memory/plugin/index.js +2 -2
- package/dist/env/plugin/index.js +8 -8
- package/dist/env/prompt/index.js +9 -9
- package/dist/env/session/index.js +11 -11
- package/dist/env/session/storage/index.js +4 -4
- package/dist/env/skill/index.js +8 -8
- package/dist/env/task/delegate/index.js +7 -7
- package/dist/env/task/index.js +12 -12
- package/dist/env/task/plugins/index.js +7 -7
- package/dist/env/task/storage/index.js +2 -2
- package/dist/env/task/tools/index.js +4 -4
- package/dist/env/tool/built-in/index.js +3 -3
- package/dist/env/tool/index.js +11 -10
- package/dist/env/workflow/engine/index.js +9 -9
- package/dist/env/workflow/index.js +15 -15
- package/dist/env/workflow/nodes/index.js +3 -3
- package/dist/env/workflow/service/index.js +3 -3
- package/dist/env/workflow/storage/index.js +4 -4
- package/dist/env/workflow/tools/index.js +4 -4
- package/dist/env/workflow/utils/index.js +3 -3
- package/dist/index.js +48 -47
- package/dist/shared/@ai-setting/{roy-agent-core-2c8eraxq.js → roy-agent-core-0ger6zdn.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-bwjpte58.js → roy-agent-core-0vsnecwa.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-h5867smx.js → roy-agent-core-0ye4q2jj.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-prdngx28.js → roy-agent-core-33rhv946.js} +43 -7
- package/dist/shared/@ai-setting/{roy-agent-core-djtkntar.js → roy-agent-core-4w6rgxs4.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-3952rkj0.js → roy-agent-core-578qk38y.js} +2 -2
- package/dist/shared/@ai-setting/roy-agent-core-5h49ct1a.js +135 -0
- package/dist/shared/@ai-setting/{roy-agent-core-m683wd1n.js → roy-agent-core-5j649pb1.js} +7 -7
- package/dist/shared/@ai-setting/{roy-agent-core-2h38rvyj.js → roy-agent-core-634ee5jb.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-w6bmrgap.js → roy-agent-core-7svhckhz.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-ce10b0ez.js → roy-agent-core-8x4ngxcy.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-83d035pp.js → roy-agent-core-97tjdb2r.js} +70 -1
- package/dist/shared/@ai-setting/{roy-agent-core-pcdzfwdv.js → roy-agent-core-9xby523m.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-mw4ty0ba.js → roy-agent-core-at05dk0z.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-ewr1nw7t.js → roy-agent-core-b1vkkcbr.js} +7 -7
- package/dist/shared/@ai-setting/{roy-agent-core-n19rm7tw.js → roy-agent-core-b2thb9xj.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-3sv590cv.js → roy-agent-core-b77yz0wt.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-yanpq5gb.js → roy-agent-core-bdajt9cs.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-3czy06aq.js → roy-agent-core-bqwj1dq0.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-k05v31rc.js → roy-agent-core-cg146hmg.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-07290s9n.js → roy-agent-core-cx67bv9d.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-taxvytzz.js → roy-agent-core-cx9p8b2t.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-d6597yp0.js → roy-agent-core-ddghwfmk.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-tq9528d3.js → roy-agent-core-e7t3rj0e.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-5ykms33a.js → roy-agent-core-fg5eaht3.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-zky9jse4.js → roy-agent-core-fx1fdzbz.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-z240ts1r.js → roy-agent-core-g2mth323.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-7tp56w6n.js → roy-agent-core-gp872e7m.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-c67wr8sp.js → roy-agent-core-hf8pqrvy.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-32m0nb9j.js → roy-agent-core-j3qb695p.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-0r4ndyn9.js → roy-agent-core-j7jeqxhd.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-h4h55x4h.js → roy-agent-core-jexyz11d.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-b8r4tfqq.js → roy-agent-core-ksx9a556.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-8zjntsbb.js → roy-agent-core-mw9a595w.js} +11 -11
- package/dist/shared/@ai-setting/{roy-agent-core-rgckng3p.js → roy-agent-core-pf1c360e.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-hxsbegfc.js → roy-agent-core-ptb4pkva.js} +16 -144
- package/dist/shared/@ai-setting/{roy-agent-core-xckhrs2p.js → roy-agent-core-q7ffkt1e.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-gb9gbkc3.js → roy-agent-core-q88vxmx5.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-y5d04fm3.js → roy-agent-core-scp0afxg.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-j0107ww1.js → roy-agent-core-snvsn60t.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-xnxyzaw4.js → roy-agent-core-spzb03na.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-86d4exyf.js → roy-agent-core-sssn8kt9.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-w0kb72ve.js → roy-agent-core-svcr4gjw.js} +7 -7
- package/dist/shared/@ai-setting/{roy-agent-core-nqzt9ne4.js → roy-agent-core-vady4w02.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-rkz8r2sx.js → roy-agent-core-vh8ncnzm.js} +14 -14
- package/dist/shared/@ai-setting/{roy-agent-core-shme7set.js → roy-agent-core-vyygk314.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-5kdw0p98.js → roy-agent-core-w1s8yrm5.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-v8xa6vs8.js → roy-agent-core-wmkx79b1.js} +14 -12
- package/dist/shared/@ai-setting/{roy-agent-core-t1ef8hf2.js → roy-agent-core-ws76avbn.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-xhcgg11h.js → roy-agent-core-wtbyj0q1.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-fjexv5nm.js → roy-agent-core-xgnpr28w.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-txwf64pd.js → roy-agent-core-yfhgxh5a.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-qg4rma4c.js → roy-agent-core-zttjq1h3.js} +1 -1
- package/dist/utils/temp-file-manager/index.js +10 -0
- package/package.json +1 -1
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TempFileManager
|
|
3
|
+
} from "./roy-agent-core-5h49ct1a.js";
|
|
1
4
|
import {
|
|
2
5
|
AUTO_TASK_METADATA_BEGIN,
|
|
3
6
|
AUTO_TASK_METADATA_END
|
|
4
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-bdajt9cs.js";
|
|
5
8
|
import {
|
|
6
9
|
AskUserError,
|
|
7
10
|
init_workflow_hil
|
|
@@ -12,20 +15,20 @@ import {
|
|
|
12
15
|
} from "./roy-agent-core-qxhq8ven.js";
|
|
13
16
|
import {
|
|
14
17
|
BaseComponent
|
|
15
|
-
} from "./roy-agent-core-
|
|
18
|
+
} from "./roy-agent-core-pf1c360e.js";
|
|
16
19
|
import {
|
|
17
20
|
ToolHookPoints,
|
|
18
21
|
globalHookManager,
|
|
19
22
|
init_global_hook_manager
|
|
20
|
-
} from "./roy-agent-core-
|
|
23
|
+
} from "./roy-agent-core-gp872e7m.js";
|
|
21
24
|
import {
|
|
22
25
|
getCurrentTaskId,
|
|
23
26
|
init_env_context
|
|
24
|
-
} from "./roy-agent-core-
|
|
27
|
+
} from "./roy-agent-core-scp0afxg.js";
|
|
25
28
|
import {
|
|
26
29
|
createLogger,
|
|
27
30
|
init_logger
|
|
28
|
-
} from "./roy-agent-core-
|
|
31
|
+
} from "./roy-agent-core-vyygk314.js";
|
|
29
32
|
import {
|
|
30
33
|
__require
|
|
31
34
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -181,138 +184,7 @@ var TOOL_CONFIG_REGISTRATION = {
|
|
|
181
184
|
// src/env/tool/tool-component.ts
|
|
182
185
|
init_workflow_hil();
|
|
183
186
|
init_env_context();
|
|
184
|
-
|
|
185
|
-
// src/utils/temp-file-manager.ts
|
|
186
|
-
init_logger();
|
|
187
|
-
import * as fs from "node:fs";
|
|
188
|
-
import * as path from "node:path";
|
|
189
|
-
import * as os from "node:os";
|
|
190
|
-
import * as crypto from "node:crypto";
|
|
191
|
-
var logger = createLogger("temp-file-manager");
|
|
192
|
-
|
|
193
|
-
class TempFileManager {
|
|
194
|
-
static _instance = null;
|
|
195
|
-
_files = new Set;
|
|
196
|
-
_hooksRegistered = false;
|
|
197
|
-
static FILE_PREFIX = "roy-agent-truncation";
|
|
198
|
-
static FILE_EXT = ".txt";
|
|
199
|
-
static LARGE_FILE_THRESHOLD = 10 * 1024 * 1024;
|
|
200
|
-
static STALE_FILE_AGE_MS = 24 * 60 * 60 * 1000;
|
|
201
|
-
constructor() {
|
|
202
|
-
this.sweepStaleFiles().catch((err) => {
|
|
203
|
-
logger.warn(`[TempFileManager] Stale file sweep failed: ${err}`);
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
static getInstance() {
|
|
207
|
-
if (!TempFileManager._instance) {
|
|
208
|
-
TempFileManager._instance = new TempFileManager;
|
|
209
|
-
}
|
|
210
|
-
return TempFileManager._instance;
|
|
211
|
-
}
|
|
212
|
-
static _resetForTesting() {
|
|
213
|
-
if (TempFileManager._instance) {
|
|
214
|
-
TempFileManager._instance.cleanupAll().catch(() => {});
|
|
215
|
-
}
|
|
216
|
-
TempFileManager._instance = null;
|
|
217
|
-
}
|
|
218
|
-
async writeTempFile(content, prefix = "default") {
|
|
219
|
-
this.ensureHooksRegistered();
|
|
220
|
-
if (content.length > TempFileManager.LARGE_FILE_THRESHOLD) {
|
|
221
|
-
logger.warn(`[TempFileManager] Writing large temp file: ${content.length} bytes (> ${TempFileManager.LARGE_FILE_THRESHOLD} bytes). Consider increasing maxOutputSize or filtering output.`);
|
|
222
|
-
}
|
|
223
|
-
const sanitizedPrefix = this.sanitizePrefix(prefix);
|
|
224
|
-
const uuid = crypto.randomUUID();
|
|
225
|
-
const filename = `${TempFileManager.FILE_PREFIX}-${process.pid}-${uuid}-${sanitizedPrefix}${TempFileManager.FILE_EXT}`;
|
|
226
|
-
const filePath = path.join(os.tmpdir(), filename);
|
|
227
|
-
await fs.promises.writeFile(filePath, content, "utf-8");
|
|
228
|
-
this._files.add(filePath);
|
|
229
|
-
logger.debug(`[TempFileManager] Created temp file: ${filePath} (${content.length} bytes)`);
|
|
230
|
-
return filePath;
|
|
231
|
-
}
|
|
232
|
-
async cleanupAll() {
|
|
233
|
-
const files = Array.from(this._files);
|
|
234
|
-
this._files.clear();
|
|
235
|
-
const results = await Promise.allSettled(files.map(async (filePath) => {
|
|
236
|
-
try {
|
|
237
|
-
await fs.promises.unlink(filePath);
|
|
238
|
-
} catch (err) {
|
|
239
|
-
if (err.code !== "ENOENT") {
|
|
240
|
-
logger.warn(`[TempFileManager] Failed to delete ${filePath}: ${err.message}`);
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}));
|
|
244
|
-
const succeeded = results.filter((r) => r.status === "fulfilled").length;
|
|
245
|
-
logger.debug(`[TempFileManager] Cleanup complete: ${succeeded}/${files.length} files deleted`);
|
|
246
|
-
}
|
|
247
|
-
getActiveFileCount() {
|
|
248
|
-
return this._files.size;
|
|
249
|
-
}
|
|
250
|
-
async sweepStaleFiles(maxAgeMs = TempFileManager.STALE_FILE_AGE_MS) {
|
|
251
|
-
const tmpDir = os.tmpdir();
|
|
252
|
-
const now = Date.now();
|
|
253
|
-
let deletedCount = 0;
|
|
254
|
-
let entries;
|
|
255
|
-
try {
|
|
256
|
-
entries = await fs.promises.readdir(tmpDir);
|
|
257
|
-
} catch (err) {
|
|
258
|
-
logger.warn(`[TempFileManager] Failed to read tmpdir ${tmpDir}: ${err.message}`);
|
|
259
|
-
return 0;
|
|
260
|
-
}
|
|
261
|
-
for (const entry of entries) {
|
|
262
|
-
if (!entry.startsWith(`${TempFileManager.FILE_PREFIX}-`))
|
|
263
|
-
continue;
|
|
264
|
-
const filePath = path.join(tmpDir, entry);
|
|
265
|
-
try {
|
|
266
|
-
const stat = await fs.promises.stat(filePath);
|
|
267
|
-
const age = now - stat.mtimeMs;
|
|
268
|
-
if (age > maxAgeMs) {
|
|
269
|
-
await fs.promises.unlink(filePath);
|
|
270
|
-
deletedCount++;
|
|
271
|
-
}
|
|
272
|
-
} catch (err) {
|
|
273
|
-
if (err.code !== "ENOENT") {
|
|
274
|
-
logger.warn(`[TempFileManager] Failed to sweep ${filePath}: ${err.message}`);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
if (deletedCount > 0) {
|
|
279
|
-
logger.info(`[TempFileManager] Swept ${deletedCount} stale files from ${tmpDir}`);
|
|
280
|
-
}
|
|
281
|
-
return deletedCount;
|
|
282
|
-
}
|
|
283
|
-
ensureHooksRegistered() {
|
|
284
|
-
if (this._hooksRegistered)
|
|
285
|
-
return;
|
|
286
|
-
if (typeof process === "undefined" || !process.on) {
|
|
287
|
-
return;
|
|
288
|
-
}
|
|
289
|
-
const cleanup = () => {
|
|
290
|
-
for (const filePath of this._files) {
|
|
291
|
-
try {
|
|
292
|
-
fs.unlinkSync(filePath);
|
|
293
|
-
} catch (err) {}
|
|
294
|
-
}
|
|
295
|
-
this._files.clear();
|
|
296
|
-
};
|
|
297
|
-
process.on("exit", cleanup);
|
|
298
|
-
process.on("SIGINT", () => {
|
|
299
|
-
cleanup();
|
|
300
|
-
process.exit(130);
|
|
301
|
-
});
|
|
302
|
-
process.on("SIGTERM", () => {
|
|
303
|
-
cleanup();
|
|
304
|
-
process.exit(143);
|
|
305
|
-
});
|
|
306
|
-
this._hooksRegistered = true;
|
|
307
|
-
logger.debug("[TempFileManager] Process exit hooks registered");
|
|
308
|
-
}
|
|
309
|
-
sanitizePrefix(prefix) {
|
|
310
|
-
return prefix.replace(/[\/\\<>:"|?*\x00-\x1f]/g, "-").replace(/\s+/g, "-").substring(0, 32) || "default";
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
// src/env/tool/tool-component.ts
|
|
315
|
-
var logger2 = createLogger("tool");
|
|
187
|
+
var logger = createLogger("tool");
|
|
316
188
|
var configComponentInstance = null;
|
|
317
189
|
function setToolConfigComponent(component) {
|
|
318
190
|
configComponentInstance = component;
|
|
@@ -438,7 +310,7 @@ class ToolComponent extends BaseComponent {
|
|
|
438
310
|
if (this.config?.builtInTools?.enabled !== false) {
|
|
439
311
|
await this.loadBuiltInTools();
|
|
440
312
|
}
|
|
441
|
-
|
|
313
|
+
logger.info(`ToolComponent initialized with ${this.getToolCount()} tools`);
|
|
442
314
|
}
|
|
443
315
|
async registerConfig(options) {
|
|
444
316
|
const configComponent = options.configComponent;
|
|
@@ -536,7 +408,7 @@ class ToolComponent extends BaseComponent {
|
|
|
536
408
|
});
|
|
537
409
|
}
|
|
538
410
|
onConfigChange(event) {
|
|
539
|
-
|
|
411
|
+
logger.info(`Tool config changed: ${event.key}`, {
|
|
540
412
|
oldValue: event.oldValue,
|
|
541
413
|
newValue: event.newValue
|
|
542
414
|
});
|
|
@@ -554,7 +426,7 @@ class ToolComponent extends BaseComponent {
|
|
|
554
426
|
source,
|
|
555
427
|
enabled: true
|
|
556
428
|
});
|
|
557
|
-
|
|
429
|
+
logger.debug(`Registered tool: ${tool.name}`);
|
|
558
430
|
globalHookManager.execute(ToolHookPoints.AFTER_REGISTER, { tool });
|
|
559
431
|
}
|
|
560
432
|
registerMany(tools, source = "dynamic") {
|
|
@@ -643,9 +515,9 @@ class ToolComponent extends BaseComponent {
|
|
|
643
515
|
⚠️ 输出被截断(原 ${truncationMeta.original_output_size} 字符,截断到 ${truncationMeta.truncated_output_size} 字符)
|
|
644
516
|
\uD83D\uDCC1 完整内容保存到: ${tempFilePath}
|
|
645
517
|
\uD83D\uDD0D 使用 read_file 工具按需读取`;
|
|
646
|
-
|
|
518
|
+
logger.debug(`[tool-component] Truncated output saved to temp file: ${tempFilePath} (${truncationMeta.original_output_size} bytes)`);
|
|
647
519
|
} catch (err) {
|
|
648
|
-
|
|
520
|
+
logger.warn(`[tool-component] Failed to write temp file for truncated output: ${err}`);
|
|
649
521
|
}
|
|
650
522
|
}
|
|
651
523
|
}
|
|
@@ -690,9 +562,9 @@ class ToolComponent extends BaseComponent {
|
|
|
690
562
|
const { getAllBuiltInTools } = await import("../../env/tool/built-in/index.js");
|
|
691
563
|
const tools = getAllBuiltInTools();
|
|
692
564
|
this.registerMany(tools, "built-in");
|
|
693
|
-
|
|
565
|
+
logger.info(`Loaded ${tools.length} built-in tools`);
|
|
694
566
|
} catch (err) {
|
|
695
|
-
|
|
567
|
+
logger.warn(`Failed to load built-in tools: ${err.message}`);
|
|
696
568
|
}
|
|
697
569
|
}
|
|
698
570
|
getHookPoints() {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentComponentAdapter,
|
|
3
3
|
init_agent_component_adapter
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-w1s8yrm5.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-
|
|
7
|
+
import"./roy-agent-core-gp872e7m.js";
|
|
8
|
+
import"./roy-agent-core-zttjq1h3.js";
|
|
9
|
+
import"./roy-agent-core-scp0afxg.js";
|
|
10
|
+
import"./roy-agent-core-cg146hmg.js";
|
|
11
|
+
import"./roy-agent-core-vyygk314.js";
|
|
12
12
|
import"./roy-agent-core-7z9b1fm8.js";
|
|
13
13
|
import"./roy-agent-core-c6592r3c.js";
|
|
14
14
|
import"./roy-agent-core-fs0mn2jk.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_decorator,
|
|
3
3
|
wrapFunction
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-cg146hmg.js";
|
|
5
5
|
import {
|
|
6
6
|
createLogger,
|
|
7
7
|
init_logger
|
|
8
|
-
} from "./roy-agent-core-
|
|
8
|
+
} from "./roy-agent-core-vyygk314.js";
|
|
9
9
|
import {
|
|
10
10
|
__esm
|
|
11
11
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentComponentAdapter,
|
|
3
3
|
init_agent_component_adapter
|
|
4
|
-
} from "./roy-agent-core-
|
|
4
|
+
} from "./roy-agent-core-w1s8yrm5.js";
|
|
5
5
|
import {
|
|
6
6
|
buildWorkflowNodeMetadata,
|
|
7
7
|
getWorkflowNodeIdFromMetadata,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
TemplateResolver,
|
|
13
13
|
init_template_resolver
|
|
14
|
-
} from "./roy-agent-core-
|
|
14
|
+
} from "./roy-agent-core-q88vxmx5.js";
|
|
15
15
|
import {
|
|
16
16
|
SkillNode,
|
|
17
17
|
ToolNode,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
init_skill_node,
|
|
20
20
|
init_tool_node,
|
|
21
21
|
init_workflow_node
|
|
22
|
-
} from "./roy-agent-core-
|
|
22
|
+
} from "./roy-agent-core-g2mth323.js";
|
|
23
23
|
import {
|
|
24
24
|
WorkflowError,
|
|
25
25
|
createWorkflowEvent,
|
|
@@ -47,11 +47,11 @@ import {
|
|
|
47
47
|
import {
|
|
48
48
|
TracedAs,
|
|
49
49
|
init_decorator
|
|
50
|
-
} from "./roy-agent-core-
|
|
50
|
+
} from "./roy-agent-core-cg146hmg.js";
|
|
51
51
|
import {
|
|
52
52
|
createLogger,
|
|
53
53
|
init_logger
|
|
54
|
-
} from "./roy-agent-core-
|
|
54
|
+
} from "./roy-agent-core-vyygk314.js";
|
|
55
55
|
import {
|
|
56
56
|
__esm,
|
|
57
57
|
__export,
|
|
@@ -2,11 +2,11 @@ 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-jexyz11d.js";
|
|
6
|
+
import"./roy-agent-core-b77yz0wt.js";
|
|
7
7
|
import"./roy-agent-core-rvxg1wps.js";
|
|
8
|
-
import"./roy-agent-core-
|
|
9
|
-
import"./roy-agent-core-
|
|
8
|
+
import"./roy-agent-core-cg146hmg.js";
|
|
9
|
+
import"./roy-agent-core-vyygk314.js";
|
|
10
10
|
import"./roy-agent-core-7z9b1fm8.js";
|
|
11
11
|
import"./roy-agent-core-c6592r3c.js";
|
|
12
12
|
import"./roy-agent-core-fs0mn2jk.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WORKFLOW_EXTRACT_PROMPT
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-97tjdb2r.js";
|
|
4
4
|
import {
|
|
5
5
|
BasePlugin
|
|
6
6
|
} from "./roy-agent-core-az13yzmc.js";
|
|
@@ -12,18 +12,18 @@ import {
|
|
|
12
12
|
} from "./roy-agent-core-92z6t4he.js";
|
|
13
13
|
import {
|
|
14
14
|
init_context
|
|
15
|
-
} from "./roy-agent-core-
|
|
15
|
+
} from "./roy-agent-core-zttjq1h3.js";
|
|
16
16
|
import {
|
|
17
17
|
getEnvContextOrEmpty
|
|
18
|
-
} from "./roy-agent-core-
|
|
18
|
+
} from "./roy-agent-core-scp0afxg.js";
|
|
19
19
|
import {
|
|
20
20
|
TracedAs,
|
|
21
21
|
init_decorator
|
|
22
|
-
} from "./roy-agent-core-
|
|
22
|
+
} from "./roy-agent-core-cg146hmg.js";
|
|
23
23
|
import {
|
|
24
24
|
createLogger,
|
|
25
25
|
init_logger
|
|
26
|
-
} from "./roy-agent-core-
|
|
26
|
+
} from "./roy-agent-core-vyygk314.js";
|
|
27
27
|
import {
|
|
28
28
|
__legacyDecorateClassTS,
|
|
29
29
|
__require
|
|
@@ -288,11 +288,11 @@ ${prompt}`;
|
|
|
288
288
|
}
|
|
289
289
|
if (!this._workflowRepo) {
|
|
290
290
|
try {
|
|
291
|
-
const sqlite = await import("./roy-agent-core-
|
|
291
|
+
const sqlite = await import("./roy-agent-core-cx9p8b2t.js");
|
|
292
292
|
this.ensureDataDir();
|
|
293
293
|
const db = sqlite.getDatabase();
|
|
294
294
|
sqlite.initializeTables();
|
|
295
|
-
const { WorkflowRepository } = await import("./roy-agent-core-
|
|
295
|
+
const { WorkflowRepository } = await import("./roy-agent-core-sssn8kt9.js");
|
|
296
296
|
this._workflowRepo = new WorkflowRepository(db);
|
|
297
297
|
return this._workflowRepo;
|
|
298
298
|
} catch {
|
|
@@ -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-cg146hmg.js";
|
|
8
8
|
import {
|
|
9
9
|
createLogger,
|
|
10
10
|
init_logger
|
|
11
|
-
} from "./roy-agent-core-
|
|
11
|
+
} from "./roy-agent-core-vyygk314.js";
|
|
12
12
|
import {
|
|
13
13
|
__legacyDecorateClassTS
|
|
14
14
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
@@ -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-xgnpr28w.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-snvsn60t.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-j3qb695p.js";
|
|
22
22
|
import {
|
|
23
23
|
WorkflowService
|
|
24
|
-
} from "./roy-agent-core-
|
|
24
|
+
} from "./roy-agent-core-e7t3rj0e.js";
|
|
25
25
|
import {
|
|
26
26
|
BaseComponent
|
|
27
|
-
} from "./roy-agent-core-
|
|
27
|
+
} from "./roy-agent-core-pf1c360e.js";
|
|
28
28
|
import {
|
|
29
29
|
createLogger,
|
|
30
30
|
init_logger
|
|
31
|
-
} from "./roy-agent-core-
|
|
31
|
+
} from "./roy-agent-core-vyygk314.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-ddghwfmk.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-ddghwfmk.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-q7ffkt1e.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-cx9p8b2t.js");
|
|
167
167
|
closeDatabase();
|
|
168
168
|
componentLogger.info("[WorkflowComponent] SQLite database closed");
|
|
169
169
|
} catch (error) {
|
|
@@ -231,9 +231,9 @@ class WorkflowComponent extends BaseComponent {
|
|
|
231
231
|
}
|
|
232
232
|
async initSqliteService() {
|
|
233
233
|
try {
|
|
234
|
-
const { getDatabase, initializeTables } = await import("./roy-agent-core-
|
|
235
|
-
const { WorkflowRepository } = await import("./roy-agent-core-
|
|
236
|
-
const { TagRepository } = await import("./roy-agent-core-
|
|
234
|
+
const { getDatabase, initializeTables } = await import("./roy-agent-core-cx9p8b2t.js");
|
|
235
|
+
const { WorkflowRepository } = await import("./roy-agent-core-sssn8kt9.js");
|
|
236
|
+
const { TagRepository } = await import("./roy-agent-core-hf8pqrvy.js");
|
|
237
237
|
const db = getDatabase();
|
|
238
238
|
initializeTables();
|
|
239
239
|
const workflowRepository = new WorkflowRepository(db);
|
|
@@ -299,7 +299,7 @@ class WorkflowComponent extends BaseComponent {
|
|
|
299
299
|
this.workflowService = null;
|
|
300
300
|
this.nodeRegistry = null;
|
|
301
301
|
try {
|
|
302
|
-
const { closeDatabase } = await import("./roy-agent-core-
|
|
302
|
+
const { closeDatabase } = await import("./roy-agent-core-cx9p8b2t.js");
|
|
303
303
|
closeDatabase();
|
|
304
304
|
} catch {}
|
|
305
305
|
this._status = "stopped";
|
|
@@ -113,7 +113,7 @@ function expandHomeDir(path) {
|
|
|
113
113
|
}
|
|
114
114
|
function getLogFile() {
|
|
115
115
|
if (configComponentInstance) {
|
|
116
|
-
const file = configComponentInstance.get("
|
|
116
|
+
const file = configComponentInstance.get("log-trace.logging.file");
|
|
117
117
|
if (file) {
|
|
118
118
|
return file;
|
|
119
119
|
}
|
|
@@ -122,7 +122,7 @@ function getLogFile() {
|
|
|
122
122
|
}
|
|
123
123
|
function getLogDir() {
|
|
124
124
|
if (configComponentInstance) {
|
|
125
|
-
const dir = configComponentInstance.get("
|
|
125
|
+
const dir = configComponentInstance.get("log-trace.logging.dir");
|
|
126
126
|
if (dir) {
|
|
127
127
|
return dir;
|
|
128
128
|
}
|
|
@@ -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-gp872e7m.js";
|
|
13
13
|
import {
|
|
14
14
|
TracedAs,
|
|
15
15
|
init_decorator,
|
|
16
16
|
wrapFunction
|
|
17
|
-
} from "./roy-agent-core-
|
|
17
|
+
} from "./roy-agent-core-cg146hmg.js";
|
|
18
18
|
import {
|
|
19
19
|
createLogger,
|
|
20
20
|
init_logger
|
|
21
|
-
} from "./roy-agent-core-
|
|
21
|
+
} from "./roy-agent-core-vyygk314.js";
|
|
22
22
|
import {
|
|
23
23
|
__esm,
|
|
24
24
|
__legacyDecorateClassTS
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
} from "./roy-agent-core-qxhq8ven.js";
|
|
4
4
|
import {
|
|
5
5
|
BaseComponent
|
|
6
|
-
} from "./roy-agent-core-
|
|
6
|
+
} from "./roy-agent-core-pf1c360e.js";
|
|
7
7
|
import {
|
|
8
8
|
init_decorator
|
|
9
|
-
} from "./roy-agent-core-
|
|
9
|
+
} from "./roy-agent-core-cg146hmg.js";
|
|
10
10
|
import {
|
|
11
11
|
createLogger,
|
|
12
12
|
init_logger,
|
|
13
13
|
setConfigComponent,
|
|
14
14
|
setQuietMode
|
|
15
|
-
} from "./roy-agent-core-
|
|
15
|
+
} from "./roy-agent-core-vyygk314.js";
|
|
16
16
|
import {
|
|
17
17
|
getTracerProvider,
|
|
18
18
|
init_propagation,
|
|
@@ -151,14 +151,14 @@ var LOG_TRACE_CONFIG_REGISTRATION = {
|
|
|
151
151
|
{ type: "env", envPrefix: "LOG_TRACE", priority: 20, watch: false }
|
|
152
152
|
],
|
|
153
153
|
keys: [
|
|
154
|
-
{ key: "log-trace.logging.enabled", sources: ["env", "file"] },
|
|
155
|
-
{ key: "log-trace.logging.level", sources: ["env", "file"] },
|
|
156
|
-
{ key: "log-trace.logging.quiet", sources: ["env", "file"] },
|
|
157
|
-
{ key: "log-trace.logging.dir", sources: ["env", "file"] },
|
|
158
|
-
{ key: "log-trace.logging.file", sources: ["env", "file"] },
|
|
159
|
-
{ key: "log-trace.logging.maxOutput", sources: ["env", "file"] },
|
|
160
|
-
{ key: "log-trace.tracing.enabled", sources: ["env", "file"] },
|
|
161
|
-
{ key: "log-trace.tracing.dbPath", sources: ["env", "file"] }
|
|
154
|
+
{ key: "log-trace.logging.enabled", sources: ["project", "env", "file"] },
|
|
155
|
+
{ key: "log-trace.logging.level", sources: ["project", "env", "file"] },
|
|
156
|
+
{ key: "log-trace.logging.quiet", sources: ["project", "env", "file"] },
|
|
157
|
+
{ key: "log-trace.logging.dir", sources: ["project", "env", "file"] },
|
|
158
|
+
{ key: "log-trace.logging.file", sources: ["project", "env", "file"] },
|
|
159
|
+
{ key: "log-trace.logging.maxOutput", sources: ["project", "env", "file"] },
|
|
160
|
+
{ key: "log-trace.tracing.enabled", sources: ["project", "env", "file"] },
|
|
161
|
+
{ key: "log-trace.tracing.dbPath", sources: ["project", "env", "file"] }
|
|
162
162
|
]
|
|
163
163
|
};
|
|
164
164
|
|
|
@@ -232,9 +232,11 @@ class LogTraceComponent extends BaseComponent {
|
|
|
232
232
|
const configComponent = options.configComponent;
|
|
233
233
|
if (!configComponent)
|
|
234
234
|
return;
|
|
235
|
-
const { configPath, envPrefix, config } = options;
|
|
235
|
+
const { configPath, envPrefix, cwd, config } = options;
|
|
236
236
|
const prefix = envPrefix !== undefined ? envPrefix : "LOG_TRACE";
|
|
237
|
+
const projectCwd = cwd ?? process.cwd();
|
|
237
238
|
configComponent.registerComponent(LOG_TRACE_CONFIG_REGISTRATION);
|
|
239
|
+
configComponent.registerProjectSource({ cwd: projectCwd });
|
|
238
240
|
if (configPath) {
|
|
239
241
|
configComponent.registerSource({
|
|
240
242
|
type: "file",
|
|
@@ -3,15 +3,15 @@ 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-pf1c360e.js";
|
|
7
7
|
import {
|
|
8
8
|
globalHookManager,
|
|
9
9
|
init_global_hook_manager
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-gp872e7m.js";
|
|
11
11
|
import {
|
|
12
12
|
createLogger,
|
|
13
13
|
init_logger
|
|
14
|
-
} from "./roy-agent-core-
|
|
14
|
+
} from "./roy-agent-core-vyygk314.js";
|
|
15
15
|
|
|
16
16
|
// src/env/plugin/plugin-component.ts
|
|
17
17
|
init_global_hook_manager();
|
|
@@ -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-cg146hmg.js";
|
|
13
13
|
import {
|
|
14
14
|
createLogger,
|
|
15
15
|
init_logger
|
|
16
|
-
} from "./roy-agent-core-
|
|
16
|
+
} from "./roy-agent-core-vyygk314.js";
|
|
17
17
|
import {
|
|
18
18
|
__esm,
|
|
19
19
|
__export,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TempFileManager
|
|
3
|
+
} from "../../shared/@ai-setting/roy-agent-core-5h49ct1a.js";
|
|
4
|
+
import"../../shared/@ai-setting/roy-agent-core-vyygk314.js";
|
|
5
|
+
import"../../shared/@ai-setting/roy-agent-core-7z9b1fm8.js";
|
|
6
|
+
import"../../shared/@ai-setting/roy-agent-core-c6592r3c.js";
|
|
7
|
+
import"../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
8
|
+
export {
|
|
9
|
+
TempFileManager
|
|
10
|
+
};
|