Repository navigation
chat@4.42.0
Minor Changes
-
daaa0ac: Add
@chat-adapter/catalog, a zero-dependency catalog of every adapter on chat-sdk.dev. It lists official, vendor-official, and community adapters with their npm package, maintainer, README, and capability support, plus the factory export, peer dependencies, and environment variables for official and vendor-official adapters. New helpers includelistAdapters(),getCatalogEntry(), andgetFeatureSupport().The
chat/adapterssubpath is now deprecated. It re-exports the original API from@chat-adapter/catalog, so existing imports keep working. ItsADAPTERSkeeps alphabetical key order, and itsCatalogAdaptertype accepts objects without the newfeaturesandreadmefields. In@chat-adapter/catalog,ADAPTERSfollows chat-sdk.dev listing order andCatalogAdapterrequires both fields.create-chat-sdkreads adapter metadata from@chat-adapter/catalog.getAdapter()andlistEnvVars()now returnundefinedand[]for inherited object keys such as"toString", instead of returningObject.prototypemembers. -
fd291b8: feat(teams): let a card carry a text input
TextInput, which modals already use, is now also aCardChild, so a user can type a reply on the card instead of opening a dialog. Teams renders it as an Adaptive CardInput.Textwith the same mapping the modal converter uses, and the@chat-adapter/teams/cardssubpath emits the same element. Slack, Google Chat, Discord, GitHub, and Linear show its label as text. WhatsApp, Messenger, Twilio, and X omit it, so don't make an input the only content on a card that reaches them.ActionEventgainsvalues?: Record<string, string>, the card's own input values keyed by input ID. It has the same shape asModalSubmitEvent.values. The Teams adapter fills it from theAction.Submitpayload, and it is absent on platforms with no card inputs. A button'scallbackUrlPOST now carriesvaluestoo, so a webhook-driven flow with noonActionhandler still receives what was typed.An input is required unless
optionalis set, and Teams validates every input on the card before it lets a button through, so mark itoptionalunless the buttons beside it should be blocked until it is filled. That validation is client-side, so treatvaluesas user input and validate it in the handler. A Teams button withactionType: "modal"now renders withassociatedInputs: "none", so it opens its dialog without waiting on the card's inputs and doesn't send them.Teams merges card inputs into the button's own submit data, so a card
TextInputwith the IDactionId,value, ormsteamsthrows aValidationErrorwhen the card is rendered, and the@chat-adapter/teams/cardssubpath throws anError. Modal inputs can still useactionIdandvalue.CardChildgained a member, so an adapter outside this repo that exhausts the union with anevercheck needs atext_inputcase. Every in-repo converter reaches it through adefault:branch instead, so none needed changing. -
19c7aa2: Add a handler-only
onNewMessage(handler)overload for messages that reach pattern routing, including attachment-only messages without text. InvalidonNewMessagearguments now throw aChatErrorat registration. -
08081fa: Reject AI tool calls that have no conversation scope when they run inside a handler with no conversation, such as an action in App Home or inside a modal, an options-load handler, or a modal opened outside a thread or channel. Pass an explicit
scope, orscope: falsefor intentionally workspace-wide access. Calls outside any handler, such as in a cron job or script, still run workspace-wide and log a warning. An emptyscopeid now throws when the tools are created.The standalone tool factories exported from
chat/ai, such asfetchMessagesandpostMessage, now acceptscopeandstrictScopeand follow the same rules ascreateChatTools. Inside a handler they inherit the conversation being handled, so a call that targets another channel is now rejected. Outside a handler they log the same unscoped warning once per tool. Passing a guard function still works but is deprecated in favor ofscope. -
7b7d73c: Add a
visibleTooption toButtonandLinkButtonthat lists the user IDs allowed to see the button. The Slack adapter renders it asvisible_to_user_ids. Other adapters ignore it and show the button to everyone. It only hides the button, so action handlers still need to check who clicked. -
f8527b2: Add an optional
aiGeneratedfield toPostableRaw,PostableMarkdown,PostableAst,PostableCard,StreamingPlanOptions, andStreamOptions. When it'strue, adapters with a native AI label show it. The Teams adapter shows Teams' "AI generated" label on new, edited, channel, targeted, and streamed messages. An edit must set the flag again to keep the label. The built-in AI tools now setaiGenerated: trueon themarkdownandrawmessages they post or edit. -
9a83b22: Isolate Slack message concurrency and turn cancellation by installation to prevent cross-workspace bot token reuse. Adapters can now namespace dedupe, lock, queue, and turn keys with the optional
Adapter.getConcurrencyScope()hook. In multi-workspace mode, messages queued under the old keys aren't migrated, and old and new workers don't exclude each other, so upgradechatand@chat-adapter/slacktogether and restart all workers. -
f635dbe: Add a Twitch adapter. It reads channel chat through EventSub webhooks, replies with the Helix Chat API as a bot account, deletes messages as a moderator, and sends and receives whispers. The
chat/adapterscatalog andcreate-chat-sdknow include Twitch.
Patch Changes
- 2f1cfa2: Allow
SlackAdapterandTelegramAdapterto be assigned toAdapterwhenexactOptionalPropertyTypesis enabled. - 19c7aa2: Fix
onNewMessagepatterns with the global or sticky flag so they match on every message instead of skipping alternate ones. - 80e7bae: Stop describing the ioredis state adapter as supporting Redis Cluster. Its
clientoption accepts an ioredisRedisinstance, which aClusterdoesn't satisfy; Sentinel is still supported. - 08081fa: Keep modal context until the modal closes, so
relatedThreadandrelatedChannelare still available when a user resubmits after a submit handler returns validation errors, or after anupdateorpushresponse. - 8178fdb: Fix Workflow DevKit workflows failing to start with
ReferenceError: AbortController is not defined. The default thread signal is now created on first use, and threads revived inside the workflow VM get an inert signal that never aborts. - Updated dependencies [daaa0ac]
- @chat-adapter/catalog@4.42.0