# Microsoft Teams Channel Adapter Checklist

Date: 2026-02-16
Status: completed

## Scope

- Add a first-class Microsoft Teams channel adapter using Bot Framework activity webhooks.
- Support inbound activity handling and outbound message replies through Bot Framework REST.

## Completed

- Added `TeamsAdapter` in `src/channels/teams/adapter.ts`:
  - inbound activity handling for `POST /teams/events`
  - mention-aware group message gating (`require_mention`)
  - optional conversation allowlist (`allowed_conversation_ids`)
  - outbound Bot Framework send using OAuth client credentials token flow
  - reply routing via encoded `metadata.replyPeerId`
- Registered channel exports:
  - `src/channels/teams/index.ts`
  - `src/channels/index.ts`
- Added config schema support in `src/config/schema.ts`:
  - `teams.app_id`
  - `teams.app_password`
  - `teams.allowed_conversation_ids`
  - `teams.require_mention`
- Wired daemon + gateway integration:
  - registration in `src/daemon/channels.ts`
  - gateway Teams route handling in `src/gateway/server.ts` (`POST /teams/events`)
- Updated service discovery + docs:
  - `src/gateway/handlers/services.ts`
  - `README.md`
  - `config/default.yaml`
  - secret redaction for `teams.app_password` in `src/cli/shared.ts`
- Added tests:
  - `src/channels/teams/adapter.test.ts`
  - `src/config/schema.test.ts` (teams schema coverage)
  - `src/gateway/handlers/services.test.ts` (teams service status)
  - `src/cli/shared.test.ts` (teams secret redaction)

## Verification

- `pnpm test:run src/channels/teams/adapter.test.ts src/config/schema.test.ts src/gateway/handlers/services.test.ts src/cli/shared.test.ts`
- `pnpm typecheck`
