Member Junction
    Preparing search index...

    Coordinates speaking discipline for multiple agents sharing one room. Construct one per process (the engine holds a single instance) and key everything on the room id — the shared external connection id (or ConversationID) that all co-located agent sessions belong to.

    The coordinator is additive: single-agent sessions never register here and are wholly unaffected. Only when 2+ agent sessions share a room does floor arbitration come into play.

    Index

    Constructors

    Accessors

    Methods

    • Asks whether an agent MAY take the floor (speak) now — the read-only arbitration check an agent runs before generating speech. Returns true only when no OTHER agent holds the floor, with the facilitator exception:

      • Floor free → granted (FloorFree).
      • The requester already holds it → granted (AlreadyHolder) — re-asserting is fine.
      • The requester is the facilitator → granted (FacilitatorOverride) even if another agent holds it, so the facilitator can cut in to arbitrate / call on a specific agent.
      • Another (non-facilitator) agent holds it → denied (HeldByOtherAgent).
      • The requester is not a member of the room → denied (NotInRoom).
      • The room is unknown → denied (UnknownRoom).

      This is purely advisory until TakeFloor actually claims the floor — keeping the check (read) and the claim (write) separate lets a caller test-then-act atomically within its own turn.

      Parameters

      • roomId: string

        The shared room id.

      • agentSessionId: string

        The agent asking to speak.

      Returns FloorDecision

      The floor decision (granted + reason).

    • Whether a given agent currently holds the floor in a room. An agent that was bumped by a facilitator override checks this to learn it should yield.

      Parameters

      • roomId: string

        The shared room id.

      • agentSessionId: string

        The agent to test.

      Returns boolean

      true when the agent is the current floor holder.

    • Whether a room currently has more than one agent session — i.e. floor arbitration is meaningful. Single-agent rooms can skip the floor dance entirely.

      Parameters

      • roomId: string

        The room to check.

      Returns boolean

      true when 2+ agents share the room.

    • Registers an agent session as a participant in a shared room, creating the room on first member. Idempotent — re-registering the same agent updates its facilitator flag without disturbing the floor. Designating an agent as the facilitator records it as the room's arbiter; only one facilitator is tracked (the latest designation wins, mirroring "one chair").

      Parameters

      • roomId: string

        The shared room id (external connection id / ConversationID) all agents key on.

      • agentSessionId: string

        The agent's MJ: AI Agent Sessions row id.

      • isFacilitator: boolean = false

        Whether this agent is the room's facilitator (may override the floor).

      Returns void

    • Releases the floor held by an agent (it finished speaking). A no-op when the agent is not the current holder, so a late/duplicate release can never steal the floor from another agent.

      Parameters

      • roomId: string

        The shared room id.

      • agentSessionId: string

        The agent releasing the floor.

      Returns boolean

      true when this call actually freed the floor (the agent was the holder).

    • Designates (or re-designates) a room's facilitator at runtime — e.g. when the agent running the Meeting Controls channel is determined after join. The agent must already be a room member.

      Parameters

      • roomId: string

        The shared room id.

      • agentSessionId: string

        The agent to make facilitator (must be a member).

      Returns boolean

      true when the facilitator was set; false when the room/agent is unknown.

    • Atomically attempts to claim the floor for an agent: runs CanTakeFloor and, when granted, records the agent as the floor holder (stamping the take time) and returns the decision. When a facilitator overrides a sitting holder, the holder is replaced — the facilitator now holds the floor (the prior holder should observe this via IsFloorHolder on its next check and yield).

      Parameters

      • roomId: string

        The shared room id.

      • agentSessionId: string

        The agent claiming the floor.

      Returns FloorDecision

      The decision; on Granted the agent now holds the floor.

    • Unregisters an agent session from a room (the agent left / its bridge stopped). If the leaving agent held the floor, the floor is released. If it was the facilitator, the facilitator slot is cleared. When the last member leaves, the room record is discarded.

      Parameters

      • roomId: string

        The room the agent is leaving.

      • agentSessionId: string

        The agent session leaving.

      Returns void