Member Junction
    Preparing search index...

    The minimal Slack huddle SDK surface the import('./slack-bridge').SlackBridge depends on. Production binds this to a real Slack Web API + Events adapter plus the (gating-unknown) huddle media path; tests inject a FakeSlackHuddleSdk.

    🚨 See the REAL-API RISK at the top of this file: the media operations (join media half, sendAudioFrame, onAudioFrame) depend on a huddle bot-join-with-media path Slack does not publicly document — this seam is built ready for it, but production binding must verify/obtain it.

    interface ISlackHuddleSdk {
        getParticipants(): Promise<SlackParticipant[]>;
        join(args: SlackJoinArgs): Promise<SlackJoinResult>;
        leave(): Promise<void>;
        muteParticipant(participantId: string): Promise<void>;
        onAudioFrame(cb: (frame: SlackAudioFrame) => void): void;
        onHandRaise(cb: (participantId: string, raised: boolean) => void): void;
        onMeetingEnded(cb: () => void): void;
        onParticipantJoin(cb: (participant: SlackParticipant) => void): void;
        onParticipantLeave(cb: (participantId: string) => void): void;
        postChatMessage(text: string): Promise<void>;
        sendAudioFrame(pcm: ArrayBuffer): void;
    }

    Implemented by

    Index

    Methods

    • Joins the huddle and brings the bot online (signaling and media). Returns the bot's participant id + the huddle id.

      ⚠️ The media half of the join is the gating unknown (see the REAL-API RISK at the top of this file). Signaling/membership is on firm public-API ground; media may require a Chime-level path.

      Parameters

      • args: SlackJoinArgs

        Join parameters (channel id, huddle id, bot name, auth).

      Returns Promise<SlackJoinResult>

      The bot participant + huddle handles.

    • Mutes a participant in the huddle (subject to the bot holding the relevant authority).

      Parameters

      • participantId: string

        The participant to mute.

      Returns Promise<void>

    • Registers a callback for inbound raw per-participant audio frames (what the agent hears, carrying the speaker label for diarization). "Latest handler wins."

      ⚠️ Requires the huddle media path (Chime) — see the REAL-API RISK at the top of this file.

      Parameters

      • cb: (frame: SlackAudioFrame) => void

        Invoked with each inbound audio frame.

      Returns void

    • Registers a callback for native raised-hand signals. "Latest handler wins."

      ⚠️ Slack does not surface a first-class huddle raise-hand event to apps on every workspace/build; partial — the adapter wires it where available and the driver tolerates the signal never firing.

      Parameters

      • cb: (participantId: string, raised: boolean) => void

        Invoked with the participant id and whether the hand is now raised.

      Returns void

    • Registers a callback fired when the huddle ends (starter ended / all participants left). "Latest handler wins."

      Parameters

      • cb: () => void

        Invoked when the huddle has ended.

      Returns void

    • Registers a callback fired when a participant leaves the huddle. "Latest handler wins."

      Parameters

      • cb: (participantId: string) => void

        Invoked with the participant id that left.

      Returns void

    • Posts a message to the huddle's thread / channel (everyone), via chat.postMessage.

      Parameters

      • text: string

        The chat message text.

      Returns Promise<void>

    • Sends one raw PCM audio frame as the bot's outbound audio (the agent's voice into the huddle), over the huddle media pipeline.

      ⚠️ Requires the huddle media path (Chime) — see the REAL-API RISK at the top of this file.

      Parameters

      • pcm: ArrayBuffer

        The PCM audio bytes to send.

      Returns void