agents-relay 1.0.112 → 1.0.113
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/cli.js +4 -1
- package/dist/reconciler.js +7 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -180,8 +180,11 @@ async function runTaskCommand(action, args) {
|
|
|
180
180
|
return;
|
|
181
181
|
}
|
|
182
182
|
if (action === 'retry' || action === 'cancel') {
|
|
183
|
-
if (action === 'retry')
|
|
183
|
+
if (action === 'retry') {
|
|
184
184
|
task.maxAttempts = extendRetryBudget(task);
|
|
185
|
+
if (task.kind === 'planner' && task.error)
|
|
186
|
+
task.plannerRetryFeedback = task.error;
|
|
187
|
+
}
|
|
185
188
|
await transitionTaskEvent(task, action === 'retry' ? 'retry' : task.state === 'RUNNING' ? 'task.cancelled' : 'cancel');
|
|
186
189
|
task.error = action === 'retry' ? null : 'Cancelled by user';
|
|
187
190
|
task.leaseOwner = null;
|
package/dist/reconciler.js
CHANGED
|
@@ -444,7 +444,10 @@ export class Reconciler extends ReconcilerReviewBase {
|
|
|
444
444
|
let promise;
|
|
445
445
|
try {
|
|
446
446
|
const executionContext = await this.resolvedContext(job, task, 'planner');
|
|
447
|
-
|
|
447
|
+
const context = { job, tasks: job.tasks, objective: job.objective ?? job.description ?? job.title, previousPlannerTaskId: task.parentTaskId, executionContext, retryFeedback: task.plannerRetryFeedback };
|
|
448
|
+
task.input = plannerInput(context);
|
|
449
|
+
await this.store.saveTask(task);
|
|
450
|
+
promise = planner.plan(context, controller.signal);
|
|
448
451
|
}
|
|
449
452
|
catch (error) {
|
|
450
453
|
await this.finishPlanner(job.id, task.id, executionId, error instanceof Error ? error : new Error(String(error)));
|
|
@@ -465,6 +468,7 @@ export class Reconciler extends ReconcilerReviewBase {
|
|
|
465
468
|
if (task.state === 'CANCELLED')
|
|
466
469
|
return;
|
|
467
470
|
if (error) {
|
|
471
|
+
task.plannerRetryFeedback = error.message;
|
|
468
472
|
task.error = error.message;
|
|
469
473
|
task.leaseOwner = null;
|
|
470
474
|
task.leaseExpiresAt = null;
|
|
@@ -490,6 +494,7 @@ export class Reconciler extends ReconcilerReviewBase {
|
|
|
490
494
|
task.plannerResult = result;
|
|
491
495
|
task.result = { summary: result.assessment, data: { objective_status: result.objective_status, next_tasks: result.next_tasks } };
|
|
492
496
|
task.error = null;
|
|
497
|
+
task.plannerRetryFeedback = undefined;
|
|
493
498
|
task.leaseOwner = null;
|
|
494
499
|
task.leaseExpiresAt = null;
|
|
495
500
|
task.executionId = null;
|
|
@@ -508,6 +513,7 @@ export class Reconciler extends ReconcilerReviewBase {
|
|
|
508
513
|
await this.emit(eventFor(job.id, task.id, task.parentTaskId, 'planner.children_failed', 'failed', `Planner ${task.id} child materialization failed: ${message}`, 'user'));
|
|
509
514
|
}
|
|
510
515
|
else {
|
|
516
|
+
task.plannerRetryFeedback = message;
|
|
511
517
|
task.error = message;
|
|
512
518
|
task.leaseOwner = null;
|
|
513
519
|
task.leaseExpiresAt = null;
|