(adapterName: string, channelId: string, text: string)
| 260 | // Build the unified notify function for scheduler → IM push |
| 261 | const { isMessageSender } = await import("./adapters/types.js"); |
| 262 | const notifyFn = async (adapterName: string, channelId: string, text: string) => { |
| 263 | const adapter = adapterMap.get(adapterName); |
| 264 | if (!adapter || !isMessageSender(adapter)) { |
| 265 | console.warn( |
| 266 | `[Scheduler] Target adapter "${adapterName}" not found or doesn't support sendMessage`, |
| 267 | ); |
| 268 | return; |
| 269 | } |
| 270 | await adapter.sendMessage(channelId, text); |
| 271 | }; |
| 272 | |
| 273 | // Scheduler adapter (starts AFTER all IM adapters and loads job.json) |
| 274 | let schedulerAdapter: import("./adapters/scheduler.js").SchedulerAdapter | null = null; |
nothing calls this directly
no test coverage detected