mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 01:23:29 +00:00
MS Teams: refactor provider + replyStyle + reliability
This commit is contained in:
19
src/msteams/sdk-types.ts
Normal file
19
src/msteams/sdk-types.ts
Normal 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>;
|
||||
};
|
||||
Reference in New Issue
Block a user