agents-relay 1.0.140 → 1.0.141

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.
@@ -153,6 +153,15 @@ export class ReconcilerRuntimeBase {
153
153
  registerExecutionOwner(jobId, taskId, executionId) {
154
154
  activeExecutionOwners.set(executionEventSource(jobId, taskId, executionId), this);
155
155
  }
156
+ clearTerminalTimer(taskId, executionId) {
157
+ const live = this.live.get(taskId);
158
+ if (!live || live.executionId !== executionId)
159
+ return;
160
+ const timer = this.terminalTimers.get(taskId);
161
+ if (timer)
162
+ clearTimeout(timer);
163
+ this.terminalTimers.delete(taskId);
164
+ }
156
165
  clearExecution(taskId, executionId) {
157
166
  const live = this.live.get(taskId);
158
167
  if (!executionId || live?.executionId === executionId) {
@@ -243,6 +252,8 @@ export class ReconcilerRuntimeBase {
243
252
  const task = job.tasks.find(item => item.id === taskId);
244
253
  if (!task || task.executionId !== executionId)
245
254
  return;
255
+ if (task.adapter !== 'chatgpt')
256
+ this.clearTerminalTimer(taskId, executionId);
246
257
  await this.emit(eventFor(jobId, taskId, task.parentTaskId, task.adapter === 'chatgpt' ? 'task.process.async_exited' : 'task.process.exited', error ? 'failed' : 'succeeded', error ?? result?.summary ?? 'Worker runtime exited', 'orchestrator', { authoritative: false, waitingForTerminalEvent: true, processError: error }, { agent: 'relay', component: 'agents-relay' }));
247
258
  }
248
259
  async timeoutTask(jobId, taskId, executionId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agents-relay",
3
- "version": "1.0.140",
3
+ "version": "1.0.141",
4
4
  "description": "Durable async agent jobs coordinated through GitHub pull requests",
5
5
  "type": "module",
6
6
  "bin": {