agents-relay 2.0.259 → 2.0.260
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/task-transitions.js +6 -1
- package/package.json +1 -1
package/dist/task-transitions.js
CHANGED
|
@@ -7,8 +7,13 @@ export function completionGateSatisfied(job) {
|
|
|
7
7
|
const latest = [...(job.plans ?? [])].sort((a, b) => a.round - b.round).at(-1);
|
|
8
8
|
const planSatisfied = latest?.status === 'SUCCEEDED' && (job.reviewEnabled !== false || latest.objectiveStatus === 'satisfied');
|
|
9
9
|
const legacySatisfied = (job.plans?.length ?? 0) === 0 && job.tasks.some(task => task.kind === 'planner' && task.state === 'SUCCEEDED' && (job.reviewEnabled !== false || task.plannerResult?.objective_status === 'satisfied'));
|
|
10
|
+
// Plan-free Coordinator Graph Jobs have a durable Coordinator Task instead of a Planner.
|
|
11
|
+
// Do not let unrelated successful work or an incomplete Coordinator satisfy this gate.
|
|
12
|
+
const coordinatorSatisfied = (job.plans?.length ?? 0) === 0
|
|
13
|
+
&& job.tasks.some(task => task.id === 'coordinator' && task.state === 'SUCCEEDED');
|
|
10
14
|
const implementation = implementationTasks(job);
|
|
11
|
-
return (planSatisfied || legacySatisfied
|
|
15
|
+
return (planSatisfied || legacySatisfied || coordinatorSatisfied)
|
|
16
|
+
&& implementation.length > 0 && implementation.every(task => task.state === 'SUCCEEDED');
|
|
12
17
|
}
|
|
13
18
|
export function refreshTaskDependencies(job) {
|
|
14
19
|
if (job.pause)
|