Member Junction
    Preparing search index...

    Slack-specific adapter that implements all platform operations using the Slack Web API (@slack/web-api).

    • Per-agent identity: each agent's name and avatar appear on their messages
    • Thread-based conversation context via conversations.replies
    • Progressive streaming updates via chat.postMessage / chat.update
    • Rich Block Kit formatting with agent headers, artifact cards, and metadata
    • Multi-word agent name matching (e.g., @Research Agent)
    • User email lookup via users.info for MJ user mapping
    • Bot mention stripping for clean agent input

    Requires a Bot User OAuth Token (xoxb-...) with these scopes:

    • chat:write — Post and update messages
    • chat:write.customize — Post with custom username and icon
    • channels:history / groups:history / im:history — Read thread history
    • users:read / users:read.email — Look up user email addresses
    • app_mentions:read — Receive

    events

    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

    • Convert a raw Slack event payload into a normalized IncomingMessage.

      Called by SlackMessagingExtension when a webhook event is received. Uses multi-word agent name matching against the loaded agent list.

      Parameters

      • event: Record<string, unknown>

        Raw Slack event object from the Events API.

      Returns IncomingMessage

      Normalized incoming message.

    • 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.