Skip to main content
Defined in: coordination/types.ts:194 BotConfig.coordination: run this bot as one of N replicas. Omit it for a single process (the default; nothing below runs).

Properties

coordinator

Defined in: coordination/types.ts:196 The backend shared by the replicas (RedisCoordinator, or MemoryCoordinator for one process).

turnWaitMs?

Defined in: coordination/types.ts:202 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?

Defined in: coordination/types.ts:211 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?

Defined in: coordination/types.ts:217 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?

Defined in: coordination/types.ts:227 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'.

handover?

Defined in: coordination/types.ts:233 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.