feat: add WhatsApp channel adapter (Phase 3c)

This commit is contained in:
William Valentin
2026-02-06 14:42:07 -08:00
parent 7a35b22458
commit de68deb1b2
9 changed files with 1756 additions and 7 deletions
+10 -1
View File
@@ -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);