Skip to content

feat(slack): native live cards — chat.startStream reply streaming + opt-in plan/task-card tool progress - #85476

Merged
teknium1 merged 5 commits into
mainfrom
slack/native-live-cards
Aug 13, 2026
Merged

feat(slack): native live cards — chat.startStream reply streaming + opt-in plan/task-card tool progress#85476
teknium1 merged 5 commits into
mainfrom
slack/native-live-cards

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

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 via chat.startStream/appendStream/stopStream through the existing draft-streaming interface (supports_draft_streaming/send_draft); the stream IS the final message, sealed once via stopStream (no duplicate final post); feature-gate errors cached → clean fallback to edit-based streaming. Plus send_native_task_card_progress/stop_native_task_card_progress: workspace-scoped, lock-serialized plan/task-card streams (task_display_mode: plan, task_update chunks), sealed on disconnect.
  • gateway/run.py + gateway/turn_context.py: platforms.slack.extra.native_task_cards opt-in wiring on the TurnRunner seam — ID-bearing tool_start_callback/tool_complete_callback correlate 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.
  • Docs: native_task_cards config key + "Native Streaming" and "Native Task Cards" sections in the Slack guide; cli-config.yaml.example entry.

Attribution

Validation

Suite Result
tests/gateway/test_slack_native_streaming.py 18 passed
tests/gateway/test_slack.py + test_run_progress_topics.py + test_stream_consumer_draft.py 203 passed
Base freshness 0 commits behind origin/main at push

Infographic

Slack Live Cards infographic

ashah360 and others added 5 commits August 13, 2026 10:23
…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.
@alt-glitch alt-glitch added type/feature New feature or request comp/gateway Gateway runner, session dispatch, delivery comp/plugins Plugin system and bundled plugins platform/slack Slack app adapter area/streaming Streaming responses: gateway delivery, provider wire P3 Low — cosmetic, nice to have needs-decision Awaiting maintainer decision before any implementation sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades labels Aug 13, 2026
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on 742895b — docs(slack): document native streaming and native task cards

⚠️ Warnings

CI timings · View report · View job

Wall time 12m11s vs 9m25s (+29.4%). 14 job(s) slower, 10 faster, 1 unchanged.

  • Python tests / Run tests slice 3/12: +42.0s
  • Python tests / Run tests slice 5/12: +30.0s
  • Docs Site / docs-site-checks: +28.0s
  • Python tests / Run tests slice 9/12: -22.0s
  • Python tests / Run tests slice 10/12: +20.0s

OSV vulnerability scan · View job

5 known vulnerabilities found in pinned dependencies.

How to fix:

Review the findings in the Security tab. Update the affected dependencies if a patched version is available.

@teknium1
teknium1 merged commit 7e88373 into main Aug 13, 2026
48 checks passed
@teknium1
teknium1 deleted the slack/native-live-cards branch August 13, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/streaming Streaming responses: gateway delivery, provider wire comp/gateway Gateway runner, session dispatch, delivery comp/plugins Plugin system and bundled plugins needs-decision Awaiting maintainer decision before any implementation P3 Low — cosmetic, nice to have platform/slack Slack app adapter sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Render Slack progress drafts as plan cards

4 participants