You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement delivery: "stream" for channel egress. Instead of one edit at turn complete ("final"), the framework tees the reply stream and debounce-edits the ack message as tokens arrive, so the reply grows live in the thread. Trailing-edge, one edit per interval (Slack chat.update is ~1/s); the turn-complete final edit remains the authoritative last write. Streaming needs an ack (a message ref to edit); without one it degrades to a single final edit. Best-effort: an edit failure is logged, not fatal.
SDK-only (the run loop's run() output pipe gains a channel tee, gated on delivery === "stream"); non-stream and non-channel turns pipe unchanged.
Unreleased feature, so no released-API impact.
Copy file name to clipboardExpand all lines: .changeset/webhook-channels.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
"trigger.dev": patch
6
6
---
7
7
8
-
Add channels: chat frontends for agents. A `chat.agent` can now take `channels: [...]` alongside `events: [...]`. A channel is a bidirectional chat surface (Slack, etc.): a verified inbound event is routed to a durable per-key session and run as a turn (via the connector's `inbound()` mapper), and the agent's reply is posted back to the surface (`outbound()` + `send()`), so a thread is a real conversation with the agent. Egress runs in-run; "final" mode posts an ack placeholder at turn start and edits it to the answer at turn complete.
8
+
Add channels: chat frontends for agents. A `chat.agent` can now take `channels: [...]` alongside `events: [...]`. A channel is a bidirectional chat surface (Slack, etc.): a verified inbound event is routed to a durable per-key session and run as a turn (via the connector's `inbound()` mapper), and the agent's reply is posted back to the surface (`outbound()` + `send()`), so a thread is a real conversation with the agent. Egress runs in-run with two delivery modes: "final" (default) posts an ack placeholder at turn start and edits it to the answer at turn complete; "stream" debounce-edits the message live as the reply streams.
9
9
10
10
`chat.channels.custom({ source, key, inbound, outbound, send, ack, filter, delivery })` is the generic connector (bring your own source and egress). The new `@trigger.dev/slack` package ships `slack({ token, ... })`: the Slack Events API verifier, the `url_verification` handshake, a per-thread session key (with a `thread_ts || ts` fallback for thread starts), the real `chat.postMessage`/`chat.update` egress, and a mandatory self-message filter so the bot never replies to its own posts.
0 commit comments