Member Junction
    Preparing search index...

    Microsoft Teams-specific adapter that implements all platform operations using the Bot Framework SDK (botbuilder).

    • Native typing indicators via ActivityTypes.Typing
    • Adaptive Card rich formatting for responses
    • Bot mention stripping (<at>BotName</at>) for clean agent input
    • User email extraction from Bot Framework activities

    Requires a Microsoft App ID and Password registered in Azure Bot Service. The Bot Framework SDK handles JWT token validation automatically.

    Teams thread history fetching via Microsoft Graph API is not yet implemented. This means conversations are currently single-turn. Multi-turn support requires Graph API access with ChannelMessage.Read.All permission.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    availableAgents: MJAIAgentEntityExtended[] = []

    All active agents, loaded at init for multi-word name matching. Sorted longest-name-first.

    defaultAgent: MJAIAgentEntityExtended | null = null

    Default agent loaded from config DefaultAgentName.

    fallbackContextUser: UserInfo | null = null

    Fallback context user (service account) loaded from config email.

    Extension settings from mj.config.cjs.

    Accessors

    • get PlatformName(): string

      Human-readable platform name (e.g., "Slack", "Teams") used in conversation names and log messages. Subclasses must return their platform identifier.

      Returns string

    Methods

    • Handle an Adaptive Card Action.Submit from a form rendered in Teams.

      Extracts field values from activity.value, builds the same @{_mode:"form",...} payload that Slack uses for modal submissions, and routes through HandleMessage() as a synthetic IncomingMessage.

      Does NOT send a bot acknowledgement message — the agent's own response serves as the acknowledgement, and a bot-authored echo of the form values would pollute the conversation history the agent sees.

      Parameters

      • turnContext: TurnContext

      Returns Promise<void>

    • Match agent names mentioned in the message text against known agents.

      Strips the bot's platform mention, then checks for known agent names preceded by @ (case-insensitive). Names are checked longest-first to avoid prefix collisions (e.g., "Research Agent" before "Research").

      Parameters

      • text: string

        The raw message text.

      Returns string[]

      Array of matched agent names.

    • Determine whether the bot should respond to this message.

      Responds to:

      • Direct messages (DMs)
      • Explicit

      Parameters

      Returns boolean

      (app_mention events)

      • Thread replies (any reply in a thread the bot is participating in)

      Thread replies are included because the bot only has threads it started (via slash commands or

      responses), so a reply in such a thread is implicitly directed at the bot.

      Subclasses can override for platform-specific logic.