agents-relay 2.0.131 → 2.0.132

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.
@@ -8,7 +8,7 @@ export async function fallbackFailedTroubleshooters(store, jobId) {
8
8
  const queued = [];
9
9
  for (const recovery of job.tasks.filter(task => task.agentName === 'troubleshooter' && task.state === 'FAILED' && task.attempt >= task.maxAttempts && !task.input.includes(MARKER))) {
10
10
  const original = job.tasks.find(task => task.id === recovery.parentTaskId);
11
- if (!original || original.state !== 'FAILED' || !RUNTIME_FAILURE.test(`${recovery.failureReason ?? ''} ${recovery.error ?? ''}`))
11
+ if (!original || original.state !== 'FAILED' || (original.resolution?.path === 'same_job_dependency' && ['waiting', 'active'].includes(original.resolution.state)) || !RUNTIME_FAILURE.test(`${recovery.failureReason ?? ''} ${recovery.error ?? ''}`))
12
12
  continue;
13
13
  const update = (task) => {
14
14
  if (task.state !== 'FAILED' || task.input.includes(MARKER))
@@ -48,7 +48,7 @@ export async function escalateExhaustedTroubleshooters(store, jobId) {
48
48
  const escalated = [];
49
49
  for (const recovery of job.tasks.filter(task => task.agentName === 'troubleshooter' && task.state === 'FAILED' && task.attempt >= task.maxAttempts && !task.escalation)) {
50
50
  const original = job.tasks.find(task => task.id === recovery.parentTaskId);
51
- if (!original || original.state !== 'FAILED')
51
+ if (!original || original.state !== 'FAILED' || (original.resolution?.path === 'same_job_dependency' && ['waiting', 'active'].includes(original.resolution.state)))
52
52
  continue;
53
53
  const context = `Automatic Troubleshooter ${recovery.id} could not produce a verified resolution after ${recovery.attempt} attempts. Last failure: ${recovery.error ?? recovery.failureReason ?? 'unknown'}. Original Task ${original.id}: ${original.error ?? original.failureReason ?? 'failed'}.`;
54
54
  const result = await requestTroubleshooterEscalation(store, jobId, recovery.id, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agents-relay",
3
- "version": "2.0.131",
3
+ "version": "2.0.132",
4
4
  "description": "Durable async agent jobs coordinated through GitHub pull requests",
5
5
  "repository": {
6
6
  "type": "git",