@nuvin/nuvin-core 1.5.1 → 1.5.2
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/VERSION +2 -2
- package/dist/index.js +32 -23
- package/package.json +1 -1
package/dist/VERSION
CHANGED
package/dist/index.js
CHANGED
|
@@ -3048,7 +3048,7 @@ var AssignTool = class {
|
|
|
3048
3048
|
properties: {
|
|
3049
3049
|
description: {
|
|
3050
3050
|
type: "string",
|
|
3051
|
-
description:
|
|
3051
|
+
description: "A summary of the task to be performed by the delegated agent. Be specific about the desired outcome. From 5-10 words."
|
|
3052
3052
|
},
|
|
3053
3053
|
agent: {
|
|
3054
3054
|
type: "string",
|
|
@@ -3056,10 +3056,10 @@ var AssignTool = class {
|
|
|
3056
3056
|
},
|
|
3057
3057
|
task: {
|
|
3058
3058
|
type: "string",
|
|
3059
|
-
description: "
|
|
3059
|
+
description: "Detailed description of the task to be performed by the agent."
|
|
3060
3060
|
}
|
|
3061
3061
|
},
|
|
3062
|
-
required: ["agent", "task"]
|
|
3062
|
+
required: ["agent", "task", "description"]
|
|
3063
3063
|
};
|
|
3064
3064
|
/**
|
|
3065
3065
|
* Update the enabled agents configuration
|
|
@@ -3196,7 +3196,7 @@ var LLMResolver = class {
|
|
|
3196
3196
|
};
|
|
3197
3197
|
|
|
3198
3198
|
// src/agent-manager.ts
|
|
3199
|
-
var DEFAULT_TIMEOUT_MS =
|
|
3199
|
+
var DEFAULT_TIMEOUT_MS = 3e6;
|
|
3200
3200
|
var MAX_DELEGATION_DEPTH = 3;
|
|
3201
3201
|
var AgentManager = class {
|
|
3202
3202
|
constructor(delegatingConfig, delegatingTools, llmFactory, eventCallback, configResolver) {
|
|
@@ -3394,25 +3394,34 @@ var AgentManager = class {
|
|
|
3394
3394
|
* Execute agent task with timeout
|
|
3395
3395
|
*/
|
|
3396
3396
|
async executeWithTimeout(orchestrator, taskDescription, timeoutMs, signal) {
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3397
|
+
const timeoutController = new AbortController();
|
|
3398
|
+
const combinedSignal = signal ? AbortSignal.any([signal, timeoutController.signal]) : timeoutController.signal;
|
|
3399
|
+
let timer;
|
|
3400
|
+
try {
|
|
3401
|
+
return await Promise.race([
|
|
3402
|
+
orchestrator.send(taskDescription, {
|
|
3403
|
+
conversationId: "default",
|
|
3404
|
+
signal: combinedSignal
|
|
3405
|
+
}),
|
|
3406
|
+
new Promise((_, reject) => {
|
|
3407
|
+
if (signal?.aborted) {
|
|
3408
|
+
reject(new Error("Sub-agent execution aborted by user"));
|
|
3409
|
+
return;
|
|
3410
|
+
}
|
|
3411
|
+
signal?.addEventListener("abort", () => reject(new Error("Sub-agent execution aborted by user")), {
|
|
3412
|
+
once: true
|
|
3413
|
+
});
|
|
3414
|
+
}),
|
|
3415
|
+
new Promise((_, reject) => {
|
|
3416
|
+
timer = setTimeout(() => {
|
|
3417
|
+
timeoutController.abort();
|
|
3418
|
+
reject(new Error(`Task execution timeout after ${timeoutMs}ms`));
|
|
3419
|
+
}, timeoutMs);
|
|
3420
|
+
})
|
|
3421
|
+
]);
|
|
3422
|
+
} finally {
|
|
3423
|
+
if (timer) clearTimeout(timer);
|
|
3424
|
+
}
|
|
3416
3425
|
}
|
|
3417
3426
|
/**
|
|
3418
3427
|
* Get active specialist agent count
|