feat(channels): add microsoft teams bot framework adapter

This commit is contained in:
William Valentin
2026-02-16 02:00:14 -08:00
parent c2bd8fa313
commit 8e35d2d674
15 changed files with 455 additions and 3 deletions
+13 -1
View File
@@ -1,6 +1,6 @@
import type { Config } from '../config/index.js';
import type { HookEngine } from '../hooks/index.js';
import { ChannelRegistry, TelegramAdapter, WebChatAdapter, DiscordAdapter, SlackAdapter, WhatsAppAdapter, MatrixAdapter, SignalAdapter, PairingManager } from '../channels/index.js';
import { ChannelRegistry, TelegramAdapter, WebChatAdapter, DiscordAdapter, SlackAdapter, WhatsAppAdapter, MatrixAdapter, SignalAdapter, TeamsAdapter, PairingManager } from '../channels/index.js';
import { CronScheduler, WebhookHandler, GmailWatcher } from '../automation/index.js';
import type { GatewayServer } from '../gateway/index.js';
@@ -101,6 +101,18 @@ export function registerChannels(deps: ChannelsDeps): ChannelsResult {
channelRegistry.register(signalAdapter);
}
// Register Microsoft Teams adapter (if configured)
if (config.teams) {
const teamsAdapter = new TeamsAdapter({
appId: config.teams.app_id,
appPassword: config.teams.app_password,
allowedConversationIds: config.teams.allowed_conversation_ids.length > 0 ? config.teams.allowed_conversation_ids : undefined,
requireMention: config.teams.require_mention,
});
channelRegistry.register(teamsAdapter);
gateway.setTeamsHandler(teamsAdapter);
}
// Register WebChat adapter (wraps the gateway)
const webChatAdapter = new WebChatAdapter({ gateway });
channelRegistry.register(webChatAdapter);