openclaw/src/msteams/probe.ts
Onur d9cbecac7f feat(msteams): add MS Teams provider skeleton
- Add Microsoft 365 Agents SDK packages (@microsoft/agents-hosting,
  @microsoft/agents-hosting-express, @microsoft/agents-hosting-extensions-teams)
- Add MSTeamsConfig type and zod schema
- Create src/msteams/ provider with monitor, token, send, probe
- Wire provider into gateway (server-providers.ts, server.ts)
- Add msteams to all provider type unions (hooks, queue, cron, etc.)
- Update implementation guide with new SDK and progress
2026-01-09 11:05:34 +01:00

24 lines
575 B
TypeScript

import type { MSTeamsConfig } from "../config/types.js";
import { resolveMSTeamsCredentials } from "./token.js";
export type ProbeMSTeamsResult = {
ok: boolean;
error?: string;
appId?: string;
};
export async function probeMSTeams(
cfg?: MSTeamsConfig,
): Promise<ProbeMSTeamsResult> {
const creds = resolveMSTeamsCredentials(cfg);
if (!creds) {
return {
ok: false,
error: "missing credentials (appId, appPassword, tenantId)",
};
}
// TODO: Validate credentials by attempting to get a token
return { ok: true, appId: creds.appId };
}