| 783 | } |
| 784 | }, |
| 785 | async stop() { |
| 786 | // Isolate per-adapter shutdown failures: one adapter's stop() rejecting |
| 787 | // must not prevent the others from being stopped. |
| 788 | const stopResults = await Promise.allSettled( |
| 789 | opts.adapters.map((a) => a.stop()), |
| 790 | ); |
| 791 | stopResults.forEach((r, i) => { |
| 792 | if (r.status === "rejected") { |
| 793 | console.error( |
| 794 | `[bot] adapter "${opts.adapters[i]!.platform}" failed to stop:`, |
| 795 | r.reason, |
| 796 | ); |
| 797 | } |
| 798 | }); |
| 799 | }, |
| 800 | }; |
| 801 | telemetry.capture("oss.bot.configured", { |
| 802 | platforms: opts.adapters.map((a) => normalizePlatform(a.platform)), |