You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gpt-pilot/src/slack
David Szarzynski bbcb3ac6e0
fix(slack): pass recipient_team_id to streaming API calls (#20988)
* fix(slack): pass recipient_team_id and recipient_user_id to streaming API calls

The Slack Agents & AI Apps streaming API (chat.startStream / chat.stopStream)
requires recipient_team_id and recipient_user_id parameters. Without them,
stopStream fails with 'missing_recipient_team_id' (all contexts) or
'missing_recipient_user_id' (DM contexts), causing streamed messages to
disappear after generation completes.

This passes:
- team_id (from auth.test at provider startup, stored in monitor context)
- user_id (from the incoming message sender, for DM recipient identification)

through to the ChatStreamer via recipient_team_id and recipient_user_id options.

Fixes #19839, #20847, #20299, #19791, #20337

AI-assisted: Written with Claude (Opus 4.6) via OpenClaw. Lightly tested
(unit tests pass, live workspace verification in progress).

* fix(slack): disable block streaming when native streaming is active

When Slack native streaming (`chat.startStream`/`stopStream`) is enabled,
`disableBlockStreaming` was set to `false`, which activated the app-level
block streaming pipeline. This pipeline intercepted agent output, sent it
via block replies, then dropped the final payloads that would have flowed
through `deliverWithStreaming` to the Slack streaming API — resulting in
zero replies delivered.

Set `disableBlockStreaming: true` when native streaming is active so the
final reply flows through the Slack streaming API path as intended.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
9 months ago
..
http chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 10 months ago
monitor fix(slack): pass recipient_team_id to streaming API calls (#20988) 9 months ago
accounts.ts style: align formatting with oxfmt 0.33 9 months ago
actions.blocks.test.ts test(slack): dedupe block and draft stream test fixtures 9 months ago
actions.read.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 10 months ago
actions.ts Slack: add media block fallback text handling 9 months ago
blocks-fallback.test.ts Slack: add media block fallback text handling 9 months ago
blocks-fallback.ts Slack: add media block fallback text handling 9 months ago
blocks-input.test.ts Slack: validate blocks input shape centrally 9 months ago
blocks-input.ts Slack: validate runtime blocks in send and edit paths 9 months ago
blocks.test-helpers.ts test(slack): dedupe block and draft stream test fixtures 9 months ago
channel-migration.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 10 months ago
channel-migration.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 10 months ago
client.test.ts fix: reduce Slack WebClient retries 10 months ago
client.ts fix: reduce Slack WebClient retries 10 months ago
directory-live.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 10 months ago
draft-stream.test.ts test(slack): type draft stream harness callbacks 9 months ago
draft-stream.ts refactor(channels): share draft stream loop across slack and telegram 9 months ago
format.test.ts fix(signal): outbound formatting and markdown IR rendering improvements (#9781) 9 months ago
format.ts refactor(slack): share markdown render options 9 months ago
index.ts feat: add slack multi-account routing 11 months ago
message-actions.ts style: align formatting with oxfmt 0.33 9 months ago
modal-metadata.test.ts Slack: add modal private metadata utilities 9 months ago
modal-metadata.ts Slack: add modal private metadata utilities 9 months ago
monitor.test-helpers.ts test: dedupe slack missing-thread tests and cover history failures 9 months ago
monitor.test.ts perf(test): fake abort timer and dedupe slack thread cases 9 months ago
monitor.threading.missing-thread-ts.test.ts test: dedupe slack missing-thread tests and cover history failures 9 months ago
monitor.tool-result.test.ts test(cli): dedupe repeated gateway node and slack pairing setup 9 months ago
monitor.ts refactor: prune room legacy 10 months ago
probe.ts refactor(probe): share withTimeout 9 months ago
resolve-channels.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 10 months ago
resolve-channels.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 10 months ago
resolve-users.ts refactor(slack): dedupe allowlist match selection 9 months ago
scopes.ts refactor: centralize isPlainObject, isRecord, isErrno, isLoopbackHost utilities (#12926) 10 months ago
send.blocks.test.ts test(slack): dedupe block and draft stream test fixtures 9 months ago
send.ts style: align formatting with oxfmt 0.33 9 months ago
stream-mode.test.ts feat(slack): add configurable stream modes 9 months ago
stream-mode.ts feat(slack): add configurable stream modes 9 months ago
streaming.ts fix(slack): pass recipient_team_id to streaming API calls (#20988) 9 months ago
targets.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 10 months ago
targets.ts refactor(channels): share prefixed target parsing 9 months ago
threading-tool-context.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 10 months ago
threading-tool-context.ts refactor: rename to openclaw 10 months ago
threading.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 10 months ago
threading.ts refactor: unify threading contexts 10 months ago
token.ts Slack: add some fixes and connect it all up 11 months ago
types.ts fix(slack): extract text and media from forwarded message attachments 9 months ago