agents-relay 1.0.147 → 1.0.148

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.
@@ -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: 'review-fix', parentTaskId: task.id, dependencies: [task.id], capabilities: ['implementation'],
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: storySizeTimeoutMs('M'), createdAt: now, updatedAt: now
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' }));
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agents-relay",
3
- "version": "1.0.147",
3
+ "version": "1.0.148",
4
4
  "description": "Durable async agent jobs coordinated through GitHub pull requests",
5
5
  "type": "module",
6
6
  "bin": {