Skip to content

activity

Wire-format contract for the Teams conversation endpoint: the Bot Framework Activity a Teams-like client posts, and the activity (carrying Adaptive Card attachments) the agent answers with.

Why this shape rather than a bespoke { message } envelope: Teams does not speak a custom chat API. A channel delivers a bot a JSON Activity and reads back activities whose attachments carry application/vnd.microsoft.card.adaptive payloads. Modelling the real protocol here means the same endpoint that backs the in-repo preview chat is the one a Bot Framework channel could call - the analogue of how the Mastra plugin exposes MCP at a path rather than inventing a tool-call API.

Only the subset the conversation endpoint actually reads or writes is modelled. Activity is a large, evolving envelope, so unknown fields are PRESERVED rather than stripped (see activitySchema) - a channel sends far more than this, and dropping it would corrupt a round-trip.