feat: add WhatsApp channel adapter (Phase 3c)
This commit is contained in:
+10
-1
@@ -9,7 +9,7 @@ import { ToolRegistry, ToolExecutor, allBuiltinTools, createWebSearchTools, crea
|
||||
import { MemoryStore } from '../memory/index.js';
|
||||
import { createMemoryTools } from '../tools/builtin/index.js';
|
||||
import { GatewayServer } from '../gateway/index.js';
|
||||
import { ChannelRegistry, TelegramAdapter, WebChatAdapter, DiscordAdapter, SlackAdapter } from '../channels/index.js';
|
||||
import { ChannelRegistry, TelegramAdapter, WebChatAdapter, DiscordAdapter, SlackAdapter, WhatsAppAdapter } from '../channels/index.js';
|
||||
import { CronScheduler } from '../automation/index.js';
|
||||
import type { InboundMessage, OutboundMessage } from '../channels/index.js';
|
||||
import { McpManager } from '../mcp/index.js';
|
||||
@@ -401,6 +401,15 @@ export async function startDaemon(config: Config): Promise<DaemonContext> {
|
||||
channelRegistry.register(slackAdapter);
|
||||
}
|
||||
|
||||
// Register WhatsApp adapter (if configured)
|
||||
if (config.whatsapp) {
|
||||
const whatsappAdapter = new WhatsAppAdapter({
|
||||
allowedNumbers: config.whatsapp.allowed_numbers.length > 0 ? config.whatsapp.allowed_numbers : undefined,
|
||||
dataDir: config.whatsapp.data_dir,
|
||||
});
|
||||
channelRegistry.register(whatsappAdapter);
|
||||
}
|
||||
|
||||
// Register WebChat adapter (wraps the gateway)
|
||||
const webChatAdapter = new WebChatAdapter({ gateway });
|
||||
channelRegistry.register(webChatAdapter);
|
||||
|
||||
Reference in New Issue
Block a user