MS Teams: refactor provider + replyStyle + reliability

This commit is contained in:
Onur
2026-01-08 09:47:01 +03:00
committed by Peter Steinberger
parent 81f81be816
commit a2bab7d923
19 changed files with 1834 additions and 389 deletions

19
src/msteams/sdk-types.ts Normal file
View File

@@ -0,0 +1,19 @@
import type { TurnContext } from "@microsoft/agents-hosting";
/**
* Minimal public surface we depend on from the Microsoft SDK types.
*
* Note: we intentionally avoid coupling to SDK classes with private members
* (like TurnContext) in our own public signatures. The SDK's TS surface is also
* stricter than what the runtime accepts (e.g. it allows plain activity-like
* objects), so we model the minimal structural shape we rely on.
*/
export type MSTeamsActivity = TurnContext["activity"];
export type MSTeamsTurnContext = {
activity: MSTeamsActivity;
sendActivity: (textOrActivity: string | object) => Promise<unknown>;
sendActivities: (
activities: Array<{ type: string } & Record<string, unknown>>,
) => Promise<unknown>;
};