agents-relay 1.0.147 → 1.0.149
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/reconciler-review.js +6 -5
- package/dist/reconciler.js +0 -2
- package/dist/scheduler.js +3 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { storySizeTimeoutMs, taskOverallTimeoutMs } from './types.js';
|
|
2
|
-
import { schedule, transitionTaskEvent, transitionJobEvent, tryTransitionTaskEvent } from './scheduler.js';
|
|
2
|
+
import { completionGateSatisfied, schedule, transitionTaskEvent, transitionJobEvent, tryTransitionTaskEvent } from './scheduler.js';
|
|
3
3
|
import { implementationComplete, implementationTasks } from './runtime-status.js';
|
|
4
4
|
import { eventFor } from './events.js';
|
|
5
5
|
import { routeWorker, workerCandidates } from './worker-routing.js';
|
|
@@ -25,6 +25,8 @@ export class ReconcilerReviewBase extends ReconcilerRuntimeBase {
|
|
|
25
25
|
async ensureFinalReview(job, prState, headSha) {
|
|
26
26
|
if (job.schedule || job.reviewEnabled === false || prState !== 'OPEN' || job.state !== 'ACTIVE' || !implementationComplete(job) || !headSha)
|
|
27
27
|
return;
|
|
28
|
+
if (job.executionMode === 'autonomous' && !completionGateSatisfied(job))
|
|
29
|
+
return;
|
|
28
30
|
const review = job.review;
|
|
29
31
|
if (review?.headSha === headSha && ['started', 'approved', 'changes_required', 'blocked'].includes(review.outcome))
|
|
30
32
|
return;
|
|
@@ -186,12 +188,11 @@ export class ReconcilerReviewBase extends ReconcilerRuntimeBase {
|
|
|
186
188
|
const input = `Address all reviewer findings for PR #${job.prNumber} at ${headSha}:\n\n${issues.map((issue, index) => `${index + 1}. ${issue}`).join('\n')}`;
|
|
187
189
|
const fixTask = {
|
|
188
190
|
jobId: job.id, id, kind: 'work', priority: job.priority, storySize: 'M', projectName: job.title,
|
|
189
|
-
agentName: '
|
|
190
|
-
adapter: 'codex', input, output: { kind: 'task_pr' },
|
|
191
|
-
routing: { provider: 'openai', model: 'gpt-5.6-luna', reasoning: 'medium', decidedBy: 'review-fix', decidedAt: now },
|
|
191
|
+
agentName: 'implementation', parentTaskId: task.id, dependencies: [task.id], capabilities: ['implementation'],
|
|
192
|
+
workerRequirements: { capabilities: [] }, adapter: 'codex', input, output: { kind: 'task_pr' },
|
|
192
193
|
continuation: null, continuationDeliveredAt: null, state: 'DRAFT', attempt: 0, maxAttempts: 3,
|
|
193
194
|
leaseOwner: null, leaseExpiresAt: null, executionId: null, threadId: null, result: null, plannerResult: null,
|
|
194
|
-
error: null, timeoutMs:
|
|
195
|
+
error: null, timeoutMs: 0, createdAt: now, updatedAt: now
|
|
195
196
|
};
|
|
196
197
|
await this.store.appendTask(fixTask);
|
|
197
198
|
await this.emit(eventFor(job.id, id, task.id, 'review.fix_task_created', 'queued', `Created one fix task ${id} for ${issues.length} reviewer finding(s)`, 'orchestrator', { headSha, issues }, { agent: 'relay', component: 'agents-relay' }));
|
package/dist/reconciler.js
CHANGED
|
@@ -281,8 +281,6 @@ export class Reconciler extends ReconcilerReviewBase {
|
|
|
281
281
|
const latest = planners.at(-1);
|
|
282
282
|
if (latest?.plannerResult?.objective_status === 'satisfied')
|
|
283
283
|
return job;
|
|
284
|
-
if (latest && !job.schedule && job.review && job.review.outcome !== 'approved')
|
|
285
|
-
return job;
|
|
286
284
|
const task = createPlannerRoundTask(job, { timeoutMs: this.options.plannerTimeoutMs ?? storySizeTimeoutMs('M') });
|
|
287
285
|
await this.store.appendTask(task);
|
|
288
286
|
await this.emit(eventFor(job.id, task.id, task.parentTaskId, 'planner.created', 'queued', `Planner task ${task.id} created`, 'orchestrator'));
|
package/dist/scheduler.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { implementationTasks } from './runtime-status.js';
|
|
1
2
|
import { decideJobLifecycle, decideTaskLifecycle } from './workflow/lifecycle.js';
|
|
2
3
|
import { reconcileTaskDependencies } from './workflow/task-reconcile.js';
|
|
3
4
|
export { dependencyReady, detectCycles } from './workflow/task-reconcile.js';
|
|
@@ -8,7 +9,8 @@ export function completionGateSatisfied(job) {
|
|
|
8
9
|
if (job.executionMode !== 'autonomous')
|
|
9
10
|
return true;
|
|
10
11
|
const planners = job.tasks.filter(task => task.kind === 'planner');
|
|
11
|
-
return planners.some(task => task.state === 'SUCCEEDED' && task.plannerResult?.objective_status === 'satisfied')
|
|
12
|
+
return planners.some(task => task.state === 'SUCCEEDED' && task.plannerResult?.objective_status === 'satisfied')
|
|
13
|
+
&& implementationTasks(job).every(task => task.state === 'SUCCEEDED');
|
|
12
14
|
}
|
|
13
15
|
export function schedule(job) {
|
|
14
16
|
reconcileTaskDependencies(job);
|