Upgrade Channels
Read this page if your agent uses a built-in channel such as Slack, Teams, or MCP, or defines its own channel. Channel events handlers also changed signature; see Channel events handlers.
This page is part of Upgrade to 1.0.
Slack
-
Cards. Call card builders with their data forms, use
CardTextfor labels, and usecardToFallbackTextfor whole cards. Remove imports ofModal*,TextInput*,ExternalSelect*,CardJSXElement,CardJSXProps,isCardElement,cardChildToFallbackText,ChatElement,ContainerProps, and the builder*Propstypes. Use native Slack view data for custom modals. See Slack cards. -
Renderers.
renderers.taskCardreceives aTaskCard; usecallStateandcallLabelfromeve/eventsto render calls.SlackTaskCardisSlackCardMessage. To restyle approval and question cards, userenderers.interactionCard. See Restyle approval and question cards. -
State.
SlackChannelState.pendingApprovalCardsisinteractionCards. Cards posted before the upgrade keep their buttons.SlackSessionTargetis a union that includes{ channelId, codeChannel: true }, so handle that variant before you readtarget.threadTs. -
Model context. The model sees sender, bot, and thread metadata in
<sender>,<bot>, and<thread>blocks. Update instructions that mentionsender_type,sender_id,bot_user_id, oris_mentioned. -
Proactive messages.
initialMessageaccepts{ text },{ markdown },{ blocks, text? }, or{ card }. See proactive sessions.
Identity, audience, and options
- Authored channel identity is
channel:<name>, including route-only channels and the defaultchannel:eve, which replaceshttp. Update visibility and authorization rules that match the old names. - Move visibility classification from
metadata().audiencetoaudience(input). Without it, the audience isunknown. - Channel context factories take
context(state, channel). Continuation aliases live onchannel.continuation. - Channel delivery hooks receive typed
ChannelDeliverypayloads and return replacements. Usechannel.statefor state changes. RemovekindHint. - Rename the CORS options
allowedHeaders,exposedHeaders, andpreflightStatustoallowHeaders,exposeHeaders, andpreflight.statusCode. - Sends, channels, and schedules accept
MessageContent; send images as file parts. In Chat SDK channels, renamemessageToUserContenttomessageContentOf.
See Custom channels.
Other channels
- Teams. Channel state uses
pendingAuthActivityIdsinstead ofpendingAuthActivityId. - MCP. An
input_requiredstatus can mean a sign-in as well as an approval or a question. Answer approvals and questions withresponses: [{ interactionId, optionId?, text? }]. A sign-in completes outside MCP. DirectinvokeToolcalls return the call's outcome instead of pausing the conversation. See MCP. - Vercel OIDC tool stubs.
vercelOidcfromeve/channels/authonly authenticates. If asubjectsentry setsallowToolStubs, switch toeveVercelOidcfromeve/channels/eve, which takes the same options. Type a custom callback that returnsallowToolStubsasEveAuthFnorEveAuthResult.
Keep custom data in your own state keys
The built-in channels' default handlers keep internal fields in channel state. Those fields aren't part of the public state types, so don't read or write them; store your own handler data under your own keys. The internal fields include:
- Slack
taskCardsandthreadStatus - Chat SDK streaming fields
pendingSignIns, posted prompt cards,shownPromptId, andundeliveredReplyErrorId- Discord
interactionToken,initialResponseSent, andhasMessageAnchor. Read the interaction token from the Discord handle instead.
TelegramHitlState isn't exported. Addressing, identity, and audience fields are unchanged.