feat(msteams): wire agent integration for Teams messages

- Integrate dispatchReplyFromConfig() for full agent routing
- Add msteams to TextChunkProvider and OriginatingChannelType
- Add msteams case to route-reply (proactive not yet supported)
- Strip @mention HTML tags from Teams messages
- Fix session key to exclude messageid suffix
- Add typing indicator support
- Add proper logging for debugging
This commit is contained in:
Onur
2026-01-07 23:00:59 +03:00
committed by Peter Steinberger
parent 951789e9fa
commit 1c73d45106
5 changed files with 328 additions and 34 deletions

View File

@@ -17,7 +17,8 @@ export type TextChunkProvider =
| "slack"
| "signal"
| "imessage"
| "webchat";
| "webchat"
| "msteams";
const DEFAULT_CHUNK_LIMIT_BY_PROVIDER: Record<TextChunkProvider, number> = {
whatsapp: 4000,
@@ -27,6 +28,7 @@ const DEFAULT_CHUNK_LIMIT_BY_PROVIDER: Record<TextChunkProvider, number> = {
signal: 4000,
imessage: 4000,
webchat: 4000,
msteams: 4000,
};
export function resolveTextChunkLimit(

View File

@@ -145,6 +145,14 @@ export async function routeReply(
};
}
case "msteams": {
// TODO: Implement proactive messaging for MS Teams
return {
ok: false,
error: `MS Teams routing not yet supported for queued replies`,
};
}
default: {
const _exhaustive: never = channel;
return { ok: false, error: `Unknown channel: ${String(_exhaustive)}` };

View File

@@ -6,7 +6,8 @@ export type OriginatingChannelType =
| "signal"
| "imessage"
| "whatsapp"
| "webchat";
| "webchat"
| "msteams";
export type MsgContext = {
Body?: string;