@botmesh/core - v2.0.0-alpha.2
    Preparing search index...

    Interface CoordinationConfig

    BotConfig.coordination: run this bot as one of N replicas. Omit it for a single process (the default; nothing below runs).

    interface CoordinationConfig {
        coordinator: Coordinator;
        turnWaitMs?: string | number;
        settleMs?: string | number;
        providerDownMs?: string | number;
        providerSession?: "leader" | "shared" | "auto";
        handover?: ConversationHandoverConfig;
    }
    Index
    coordinator: Coordinator

    The backend shared by the replicas (RedisCoordinator, or MemoryCoordinator for one process).

    turnWaitMs?: string | number

    Longest a message waits for its chat's turn: a duration ('2m') or ms. When it runs out the message is dropped and reported as a CoordinationUnavailableError ('timeout'). Default '2m'.

    settleMs?: string | number

    Longest the chat's turn stays held after the handler returned, waiting for a conversation step it fed (an answered c.ask, a c.goto() target) to reach its next wait or end, so no other replica processes the chat meanwhile. A step still running then (a slow .do(), a long c.sleep or delay) is stopped, keeping its checkpoint, before the turn is released: a persistent flow re-runs that step on the chat's next message. Set it above your longest step. Default '1m'.

    providerDownMs?: string | number

    With providerSession: 'leader': how long the leader's transport may stay 'closed' (logged out, session taken over, reconnect given up) before the replica steps down so a standby connects instead. Default '1m'.

    providerSession?: "leader" | "shared" | "auto"

    Who connects the transport:

    • 'leader' — only the replica holding the provider:<id> leadership starts the provider; the others stand by and take over when it is lost;
    • 'shared' — every replica starts it (webhook transports, each replica receives part of the traffic);
    • 'auto' (default) — 'leader' when provider.capabilities.exclusiveSession, else 'shared'.

    What happens to a chat's live conversation when another replica takes the chat (the replica holding it crashed, was stopped for a deploy, or lost its turn). Default { flows: 'drop', fallback: 'drop' }: only .persistent() flows continue there.