@ai-setting/roy-agent-core 1.5.77 → 1.5.78
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentComponent,
|
|
3
3
|
AgentComponentConfigSchema
|
|
4
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
4
|
+
} from "../../shared/@ai-setting/roy-agent-core-w6j4zyps.js";
|
|
5
5
|
import"../../shared/@ai-setting/roy-agent-core-r0m0at3x.js";
|
|
6
6
|
import"../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
7
7
|
import"../../shared/@ai-setting/roy-agent-core-zf62vkc4.js";
|
package/dist/env/index.js
CHANGED
|
@@ -39,7 +39,7 @@ import"../shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
|
39
39
|
import {
|
|
40
40
|
AgentComponent,
|
|
41
41
|
AgentComponentConfigSchema
|
|
42
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
42
|
+
} from "../shared/@ai-setting/roy-agent-core-w6j4zyps.js";
|
|
43
43
|
import"../shared/@ai-setting/roy-agent-core-r0m0at3x.js";
|
|
44
44
|
import"../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
45
45
|
import {
|
package/dist/index.js
CHANGED
|
@@ -116,7 +116,7 @@ import"./shared/@ai-setting/roy-agent-core-1ce3fqrk.js";
|
|
|
116
116
|
import {
|
|
117
117
|
AgentComponent,
|
|
118
118
|
AgentComponentConfigSchema
|
|
119
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
119
|
+
} from "./shared/@ai-setting/roy-agent-core-w6j4zyps.js";
|
|
120
120
|
import {
|
|
121
121
|
createInvokeConfig,
|
|
122
122
|
invoke,
|
|
@@ -147,7 +147,6 @@ var DEFAULT_AGENT_CONFIG = {
|
|
|
147
147
|
maxIterations: 200,
|
|
148
148
|
maxErrorRetries: 3,
|
|
149
149
|
doomLoopThreshold: 5,
|
|
150
|
-
timeout: 300000,
|
|
151
150
|
toolTimeout: 60000,
|
|
152
151
|
toolRetries: 3,
|
|
153
152
|
filterHistory: false
|
|
@@ -162,7 +161,6 @@ var AgentInstanceSchema = z.object({
|
|
|
162
161
|
doomLoopThreshold: z.number().default(5),
|
|
163
162
|
allowedTools: z.array(z.string()).optional(),
|
|
164
163
|
deniedTools: z.array(z.string()).optional(),
|
|
165
|
-
timeout: z.number().default(300000),
|
|
166
164
|
toolTimeout: z.number().default(60000),
|
|
167
165
|
toolRetries: z.number().default(3),
|
|
168
166
|
filterHistory: z.boolean().default(false)
|
|
@@ -256,7 +254,6 @@ class AgentComponent extends BaseComponent {
|
|
|
256
254
|
maxIterations: constructorDefaultAgent?.maxIterations ?? configComponent.get("agent.defaultAgent.maxIterations") ?? 200,
|
|
257
255
|
maxErrorRetries: constructorDefaultAgent?.maxErrorRetries ?? configComponent.get("agent.defaultAgent.maxErrorRetries") ?? 3,
|
|
258
256
|
doomLoopThreshold: constructorDefaultAgent?.doomLoopThreshold ?? configComponent.get("agent.defaultAgent.doomLoopThreshold") ?? 5,
|
|
259
|
-
timeout: constructorDefaultAgent?.timeout ?? configComponent.get("agent.defaultAgent.timeout") ?? 300000,
|
|
260
257
|
toolTimeout: constructorDefaultAgent?.toolTimeout ?? configComponent.get("agent.defaultAgent.toolTimeout") ?? 60000,
|
|
261
258
|
toolRetries: constructorDefaultAgent?.toolRetries ?? configComponent.get("agent.defaultAgent.toolRetries") ?? 3,
|
|
262
259
|
filterHistory: constructorDefaultAgent?.filterHistory ?? configComponent.get("agent.defaultAgent.filterHistory") ?? false,
|
|
@@ -437,7 +434,6 @@ class AgentComponent extends BaseComponent {
|
|
|
437
434
|
maxIterations: config.maxIterations ?? this.config.defaultAgent.maxIterations,
|
|
438
435
|
maxErrorRetries: config.maxErrorRetries ?? this.config.defaultAgent.maxErrorRetries,
|
|
439
436
|
doomLoopThreshold: config.doomLoopThreshold ?? this.config.defaultAgent.doomLoopThreshold,
|
|
440
|
-
timeout: config.timeout ?? this.config.defaultAgent.timeout,
|
|
441
437
|
toolTimeout: config.toolTimeout ?? this.config.defaultAgent.toolTimeout,
|
|
442
438
|
toolRetries: config.toolRetries ?? this.config.defaultAgent.toolRetries,
|
|
443
439
|
systemPrompt: config.systemPrompt ?? (config.systemPromptRef ? undefined : this.config.defaultAgent.systemPrompt),
|
|
@@ -540,16 +536,6 @@ class AgentComponent extends BaseComponent {
|
|
|
540
536
|
this.aborted.set(runId, false);
|
|
541
537
|
const abortController = new AbortController;
|
|
542
538
|
this.abortControllers.set(runId, abortController);
|
|
543
|
-
let timeoutId;
|
|
544
|
-
if (agent.config.timeout && agent.config.timeout > 0) {
|
|
545
|
-
timeoutId = setTimeout(() => {
|
|
546
|
-
if (!this.aborted.get(runId)) {
|
|
547
|
-
logger.warn(`[runAgent] Agent "${agentName}" timed out after ${agent.config.timeout}ms (runId=${runId})`);
|
|
548
|
-
this.aborted.set(runId, true);
|
|
549
|
-
abortController.abort();
|
|
550
|
-
}
|
|
551
|
-
}, agent.config.timeout);
|
|
552
|
-
}
|
|
553
539
|
if (!this.doomLoopCaches.has(runId)) {
|
|
554
540
|
this.doomLoopCaches.set(runId, new Map);
|
|
555
541
|
}
|
|
@@ -936,10 +922,6 @@ class AgentComponent extends BaseComponent {
|
|
|
936
922
|
}
|
|
937
923
|
this.aborted.delete(runId);
|
|
938
924
|
this.abortControllers.delete(runId);
|
|
939
|
-
if (timeoutId !== undefined) {
|
|
940
|
-
clearTimeout(timeoutId);
|
|
941
|
-
timeoutId = undefined;
|
|
942
|
-
}
|
|
943
925
|
if (result.error) {
|
|
944
926
|
this.pushEnvEvent({
|
|
945
927
|
type: "agent.error",
|