plugin
AppKit plugin (registered name: teams) that owns the Teams Adaptive Card
runtime - the resolved card version and the optional incoming-webhook URL the
teamsCardTool and the AppKit teams.createCard tool read. Registering
it resolves and logs the effective config (which card version is in force,
whether a webhook is wired up) so a misconfiguration is visible in the boot
logs rather than on the first card, and installs the plugin’s execute() as
the runtime’s executor so every build / post picks up AppKit’s cache / retry /
timeout / telemetry chain.
The plugin is also a ToolProvider, so an AppKit agent can reach a
teams.createCard tool directly; the teamsCardTool export is the same
capability for a Mastra agent. Both share the runtime primed here.
The plugin mounts four routes under its base path (/api/teams):
POST /messagesis the REAL Microsoft Teams messaging endpoint - the URL an Azure Bot registration points at. It validates the Bot Service JWT, acknowledges immediately, and delivers the agent’s card back over the Connector API. This is the route that makes a Teams channel able to chat with the app’s agents, the same way the Mastra plugin exposes MCP at a path.POST /activityruns the same turn SYNCHRONOUSLY, answering with the reply activities in the response body. It needs no bot registration, so it is what a local client (the in-repo preview chat), a test, or any non-Teams caller uses.POST /cardcompiles a card.CardSpec into an Adaptive Card document (the preview page posts here).POST /postpushes a compiled card to the configured Teams incoming webhook when one is set.
Mirrors the node-email add-on’s shape.