feat(slack): native live cards — chat.startStream reply streaming + opt-in plan/task-card tool progress - #85476
Merged
Merged
Conversation
…tream Slack's Agents & AI Apps feature ships a native streaming surface that renders a live-typing message instead of the edit-based progressive updates the adapter used until now. The adapter now implements the existing draft-streaming interface: - supports_draft_streaming() opts in whenever the app is connected and native streaming hasn't been detected as unavailable. - send_draft() starts a stream on the first frame (chat.startStream, anchored to the resolved thread_ts, with recipient_team_id/user_id for channel streams) and appends only the delta on subsequent frames (chat.appendStream is append-only). The consumer's trailing cursor glyph is stripped before delta computation. - Unlike Telegram drafts (ephemeral, replaced by a real sendMessage), a Slack stream IS the final message. send() therefore intercepts the turn-final delivery for a chat with an active stream whose streamed text is a prefix of the final content, and seals it via chat.stopStream with the remaining delta instead of posting a duplicate. Rich Block Kit (when enabled) is applied to the sealed message via chat_update, mirroring the finalize path in edit_message. - Feature-gate errors from chat.startStream (not_allowed, missing_scope, unknown_method, ...) are cached on the adapter so subsequent runs skip straight to edit-based streaming with a single warning naming the fix (enable Agents & AI Apps for the app); transient errors only disable drafts for the current run via the consumer's existing send_draft failure handling. - Segment breaks (new draft_id) and disconnect() seal any open stream so chats are never left with a dangling live-typing indicator. No consumer or config changes: streaming.transport auto/draft now lights up native streaming on Slack through the same interface Telegram drafts use, and the edit-based path remains the fallback.
Adds platforms.slack.extra.native_task_cards: when enabled, live tool calls render as Slack-native plan/task cards via chat.startStream / chat.appendStream (task_display_mode: plan, task_update chunks) instead of text/edit progress bubbles. ID-bearing tool_start/tool_complete callbacks correlate concurrent same-name tool calls correctly; any native API failure falls back to one continuously edited text update. The stream is stopped exactly once when the turn finalizes. Salvaged from PR #29496 onto current main (TurnRunner/TurnContext seam); closes #29483.
…ace scoping, fallback Ports the test coverage from PR #29496 onto the salvaged implementation: adapter-level serialization/workspace isolation/disconnect sealing, and gateway-level ID-correlated concurrent duplicate tools plus the editable text fallback when the native stream fails.
Contributor
૮ >ﻌ< ა ci reviewran on 742895b — docs(slack): document native streaming and native task cards
|
This was referenced Aug 13, 2026
13 tasks
13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Slack replies now stream as native live-typing messages, and (opt-in) tool progress renders as Slack-native plan/task cards — consolidating the open "Slack live cards" PR/issue cluster (#66542 + #29496; closes #29483, addresses #51363's thinking-steps surface).
Changes
plugins/platforms/slack/adapter.py: native streaming viachat.startStream/appendStream/stopStreamthrough the existing draft-streaming interface (supports_draft_streaming/send_draft); the stream IS the final message, sealed once viastopStream(no duplicate final post); feature-gate errors cached → clean fallback to edit-based streaming. Plussend_native_task_card_progress/stop_native_task_card_progress: workspace-scoped, lock-serialized plan/task-card streams (task_display_mode: plan,task_updatechunks), sealed on disconnect.gateway/run.py+gateway/turn_context.py:platforms.slack.extra.native_task_cardsopt-in wiring on the TurnRunner seam — ID-bearingtool_start_callback/tool_complete_callbackcorrelate concurrent same-name tool calls by real call ID; native consumer drains the progress queue; on native failure, one continuously edited text fallback keeps progress live; card stream stopped exactly once at turn end.native_task_cardsconfig key + "Native Streaming" and "Native Task Cards" sections in the Slack guide;cli-config.yaml.exampleentry.Attribution
Validation
Infographic