()
| 78 | }; |
| 79 | |
| 80 | const abortForTimeout = (): void => { |
| 81 | timer = undefined; |
| 82 | startedAt = undefined; |
| 83 | // oxlint-disable-next-line executor/no-error-constructor -- boundary: AbortSignal consumers need a stable timeout reason |
| 84 | controller.abort(new Error("MCP tool invocation exceeded its active-work deadline")); |
| 85 | }; |
| 86 | |
| 87 | const startTimer = (): void => { |
| 88 | if (controller.signal.aborted || pendingElicitations > 0) return; |