agents-relay 2.0.189 → 2.0.190

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.
@@ -514,13 +514,17 @@ export class Reconciler extends ReconcilerReviewBase {
514
514
  return;
515
515
  await this.store.mutateJob?.(jobId, current => {
516
516
  const task = current.tasks.find(item => item.id === taskId);
517
- if (!task || task.executionId !== executionId)
517
+ const historical = task?.executionHistory?.some(item => item.id === executionId);
518
+ if (!task || (task.executionId !== executionId && !historical))
518
519
  return current;
519
- task.threadUrl = url;
520
+ // The terminal event may be accepted before WebHelm returns the durable thread receipt.
521
+ // Keep this execution's URL even after the execution lease has been cleared.
522
+ if (task.executionId === executionId || task.executionId === null)
523
+ task.threadUrl = url;
520
524
  if (!task.threadHistory?.some(item => item.executionId === executionId)) {
521
525
  task.threadHistory = [...(task.threadHistory ?? []), { executionId, threadUrl: url, attempt: task.attempt, at: new Date().toISOString() }].slice(-12);
522
526
  }
523
- if (typeof id === 'string')
527
+ if (typeof id === 'string' && (task.executionId === executionId || task.executionId === null))
524
528
  task.threadId = id;
525
529
  return current;
526
530
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agents-relay",
3
- "version": "2.0.189",
3
+ "version": "2.0.190",
4
4
  "description": "Durable async agent jobs coordinated through GitHub pull requests",
5
5
  "repository": {
6
6
  "type": "git",