Skip to main content

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 (throw LockError)
  • 'queue' — queue the message; when the current handler finishes, process only the latest queued message with context.skipped containing 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 with context.skipped containing earlier burst messages
  • 'concurrent' — no locking; all messages processed in parallel
  • ConcurrencyConfig — 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 (replaces transcripts + identity)
  • history.thread — per-thread message backfill (replaces threadHistory / 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)
When not set, falls back to the adapter’s lockScope property, then to 'thread'.
Logger | LogLevel
Type: LoggerLogLevelLogger instance or log level. Pass “silent” to disable all logging.
{ maxMessages: number; ttlMs: number }
"drop" | "force" | (threadId: string, message: Message) => "drop" | "force" | P…
Type: Message
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