Skip to content

Commit 65e81fc

Browse files
committed
feat(webhooks): hosted webhook ingress, chat.agent channels, and human-in-the-loop
1 parent c746621 commit 65e81fc

191 files changed

Lines changed: 48551 additions & 484 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
---
22
"@trigger.dev/core": patch
33
"@trigger.dev/sdk": patch
4+
"@trigger.dev/slack": patch
45
"trigger.dev": patch
56
---
67

7-
Add `webhook()` for declaring hosted webhook endpoints that route a verified, typed provider event to a task. Declare a source with `webhooks.custom<T>(config)` or a preset (`webhooks.stripe()`, `webhooks.github()`) that pins the event type and prefills signature verification, then handle it with a single `onEvent` callback. Declared webhooks are discovered like tasks and synced to a hosted ingress endpoint on deploy.
8+
Add hosted webhooks: receive and verify provider webhooks as a task, with no ingress or verification code of your own.
9+
10+
- `webhook()` declares an endpoint that routes a verified, typed event to an `onEvent` handler. Choose a source with a preset (`webhooks.stripe()`, `webhooks.github()`, and others) or `webhooks.custom<T>(config)`. Declared webhooks are discovered like tasks and synced to a hosted URL on deploy.
11+
- `filter` gates which deliveries run, using a type-safe expression checked against the event at author time (`event.`/`header.`/`webhook.` paths, `&&`/`||`, comparison and `in`/`contains` operators, field-to-field comparison, and array quantifiers). A non-matching delivery is still recorded, not routed.
12+
- `chat.event({ source, key, type })` routes deliveries that share a `key` to one durable session (per customer, installation, or issue) and delivers them to an agent's `onAction` as a typed envelope.
13+
- Channels turn a chat surface into an agent frontend: `chat.channels.custom({ source, key, inbound, send })`, or the new `@trigger.dev/slack` package's `slack()` (Slack Events API verification, per-thread sessions, `chat.postMessage`/`chat.update` egress, `mentions()`, `startOn`, lifecycle reactions). Inbound messages run as turns and the reply posts back. Human-in-the-loop is built in: a tool with no `execute` pauses the turn, the connector posts controls (Slack ships Approve / Deny buttons), and a verified click resolves the tool and resumes the run.
14+
- HTTP API for listing webhook endpoints and deliveries, plus rotate-secret, enable/disable, and replay.

.changeset/webhook-channel-reactions.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

.changeset/webhook-channels.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

.changeset/webhook-delivery-filters.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

.changeset/webhook-session-routing.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.changeset/webhooks-http-api.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.server-changes/webhook-deliveries-list-backend.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

.server-changes/webhook-ingress-edge.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

.server-changes/webhook-task-kind-ui.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

apps/webapp/app/components/run/RunTimeline.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ import { getHelpTextForEvent, TimelineSpanEvent } from "~/utils/timelineSpanEven
1616
// Types for the RunTimeline component
1717
export type TimelineEventState = "complete" | "error" | "inprogress" | "delayed";
1818

19-
type TimelineLineVariant = "light" | "normal";
19+
export type TimelineLineVariant = "light" | "normal";
2020

2121
type TimelineStyle = "normal" | "diminished";
2222

23-
type TimelineEventVariant =
23+
export type TimelineEventVariant =
2424
| "start-cap"
2525
| "dot-hollow"
2626
| "dot-solid"
@@ -326,7 +326,7 @@ function buildTimelineItems(run: TimelineSpanRun): TimelineItem[] {
326326
export type RunTimelineEventProps = {
327327
title: ReactNode;
328328
subtitle?: ReactNode;
329-
state?: "complete" | "error" | "inprogress";
329+
state?: TimelineEventState;
330330
variant?: TimelineEventVariant;
331331
helpText?: string;
332332
style?: TimelineStyle;

0 commit comments

Comments
 (0)