@ai-setting/roy-agent-core 1.6.4 → 1.6.6
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/env/agent/index.js +3 -3
- package/dist/env/event-source/index.js +3 -3
- package/dist/env/index.js +15 -15
- package/dist/env/llm/index.js +2 -2
- package/dist/env/plugin/index.js +1 -1
- package/dist/env/prompt/index.js +2 -2
- package/dist/env/task/delegate/index.js +2 -2
- package/dist/env/task/index.js +3 -3
- package/dist/env/task/plugins/index.js +2 -2
- package/dist/env/tool/built-in/index.js +1 -1
- package/dist/env/tool/index.js +2 -2
- package/dist/env/workflow/engine/index.js +3 -3
- package/dist/env/workflow/index.js +5 -5
- package/dist/env/workflow/nodes/index.js +6 -2
- package/dist/env/workflow/tools/index.js +1 -1
- package/dist/index.js +18 -18
- package/dist/shared/@ai-setting/{roy-agent-core-ba6243hr.js → roy-agent-core-0tfv18rf.js} +175 -1
- package/dist/shared/@ai-setting/{roy-agent-core-hd5xrr2q.js → roy-agent-core-12ttd2w1.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-z7dxedn6.js → roy-agent-core-2r1rc0fe.js} +12 -2
- package/dist/shared/@ai-setting/{roy-agent-core-xxfkvqqh.js → roy-agent-core-34xt19yg.js} +8 -7
- package/dist/shared/@ai-setting/{roy-agent-core-z9m38ytb.js → roy-agent-core-4extx33r.js} +2 -3
- package/dist/shared/@ai-setting/{roy-agent-core-kf3mw79k.js → roy-agent-core-4y3hdqw2.js} +20 -8
- package/dist/shared/@ai-setting/{roy-agent-core-y1m7c2v7.js → roy-agent-core-8jmkghjc.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-g7hfkszj.js → roy-agent-core-971gwby7.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-tyqzn10b.js → roy-agent-core-a5rde2ky.js} +3 -2
- package/dist/shared/@ai-setting/{roy-agent-core-2xpstxhz.js → roy-agent-core-b9bnm4mj.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-7afcdb2m.js → roy-agent-core-c94yan0b.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-65qs21kf.js → roy-agent-core-dcd1s7ct.js} +4 -1
- package/dist/shared/@ai-setting/{roy-agent-core-r3209bcd.js → roy-agent-core-gw43m8yd.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-aa0tdfb2.js → roy-agent-core-jayzyg7h.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-bferdaw6.js → roy-agent-core-mzhsk0jb.js} +58 -26
- package/dist/shared/@ai-setting/{roy-agent-core-155408xq.js → roy-agent-core-r08qk37k.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-xnga0ksx.js → roy-agent-core-smmr6wr3.js} +43 -40
- package/dist/shared/@ai-setting/{roy-agent-core-vf72n6qn.js → roy-agent-core-w7mhnc4c.js} +22 -4
- package/package.json +1 -1
- /package/dist/shared/@ai-setting/{roy-agent-core-6kygfd9x.js → roy-agent-core-02n40zbs.js} +0 -0
|
@@ -241,15 +241,30 @@ var init_agent_component_adapter = __esm(() => {
|
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
+
let timeoutHandle;
|
|
244
245
|
try {
|
|
245
246
|
const outputSchema = config.options?.outputSchema;
|
|
246
247
|
const context = {};
|
|
247
248
|
context.model = config.options?.model;
|
|
248
|
-
|
|
249
|
-
|
|
249
|
+
const configuredTimeout = config.options?.timeout;
|
|
250
|
+
const deadlineController = typeof configuredTimeout === "number" && configuredTimeout > 0 ? new AbortController : undefined;
|
|
251
|
+
if (deadlineController) {
|
|
252
|
+
const timeoutMsFinal = configuredTimeout;
|
|
253
|
+
timeoutHandle = setTimeout(() => {
|
|
254
|
+
if (process.env["DEBUG"]) {
|
|
255
|
+
console.warn(`[AgentComponentAdapter] agent '${config.type || "general"}' timeout ${timeoutMsFinal}ms elapsed, aborting THIS run only.`);
|
|
256
|
+
}
|
|
257
|
+
deadlineController.abort(new Error(`Agent ${config.type || "general"} timed out after ${timeoutMsFinal}ms`));
|
|
258
|
+
}, timeoutMsFinal);
|
|
259
|
+
if (typeof timeoutHandle.unref === "function") {
|
|
260
|
+
timeoutHandle.unref();
|
|
261
|
+
}
|
|
250
262
|
}
|
|
251
|
-
|
|
252
|
-
|
|
263
|
+
const signals = [signal, deadlineController?.signal].filter((value) => value !== undefined);
|
|
264
|
+
if (signals.length === 1) {
|
|
265
|
+
context.abort = signals[0];
|
|
266
|
+
} else if (signals.length > 1) {
|
|
267
|
+
context.abort = AbortSignal.any(signals);
|
|
253
268
|
}
|
|
254
269
|
context.sessionId = agentSessionId;
|
|
255
270
|
if (config.options?.allowedTools) {
|
|
@@ -326,6 +341,9 @@ var init_agent_component_adapter = __esm(() => {
|
|
|
326
341
|
}
|
|
327
342
|
};
|
|
328
343
|
} finally {
|
|
344
|
+
if (timeoutHandle) {
|
|
345
|
+
clearTimeout(timeoutHandle);
|
|
346
|
+
}
|
|
329
347
|
if (isResume) {
|
|
330
348
|
this._currentAgentSessionId = undefined;
|
|
331
349
|
}
|
package/package.json
CHANGED
|
File without changes
|