Properties
TAdapters
required
Map of adapter name to adapter instance
ConcurrencyStrategy | ConcurrencyConfig
Type:
ConcurrencyStrategyConcurrencyConfigHow to handle messages that arrive while a handler is already
processing on the same thread.'drop'(default) — discard the message (throwLockError)'queue'— queue the message; when the current handler finishes, process only the latest queued message withcontext.skippedcontaining all intermediate messages'debounce'— messages inside the debounce window replace the pending message; only the final message in that window is processed'burst'— wait once before the first handler, then process the latest message withcontext.skippedcontaining earlier burst messages'concurrent'— no locking; all messages processed in parallelConcurrencyConfig— fine-grained control over strategy and parameters
number
TTL for message deduplication entries in milliseconds.
Defaults to 300000 (5 minutes). Increase if your webhook cold starts
cause platform retries that arrive after the default TTL expires.
string | null
Placeholder text for fallback streaming (post + edit) adapters.
Defaults to
"...".Set to null to avoid posting an initial placeholder message and instead
wait until some real text has been streamed before creating the message.Unified history configuration. Supersedes the individual
transcripts, identity, threadHistory, and messageHistory fields.history.user— cross-platform per-user message persistence (replacestranscripts+identity)history.thread— per-thread message backfill (replacesthreadHistory/messageHistory)
LockScope | (context: LockScopeContext) => LockScope | Promise<LockScope>
Type:
LockScopeLockScopeContextLock scope determines which messages contend for the same lock.'thread': lock per threadId (default for most adapters)'channel': lock per channelId (default for WhatsApp, Telegram)- function: resolve scope dynamically per message (async supported)
lockScope property,
then to 'thread'.Logger | LogLevel
{ maxMessages: number; ttlMs: number }
required
State adapter for subscriptions and locking
number
Update interval for fallback streaming (post + edit) in milliseconds.
Defaults to 500ms. Lower values provide smoother updates but may hit rate limits.
{ maxMessages: number; ttlMs: number }
string
required
Default bot username across all adapters