@trigger.dev/sdk 4.8.1 → 4.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/v3/ai-shared.d.ts +6 -0
- package/dist/commonjs/v3/ai-shared.js +7 -1
- package/dist/commonjs/v3/ai-shared.js.map +1 -1
- package/dist/commonjs/v3/ai.d.ts +45 -0
- package/dist/commonjs/v3/ai.js +110 -69
- package/dist/commonjs/v3/ai.js.map +1 -1
- package/dist/commonjs/v3/auth.d.ts +12 -2
- package/dist/commonjs/v3/auth.js +26 -12
- package/dist/commonjs/v3/auth.js.map +1 -1
- package/dist/commonjs/v3/chat-client.d.ts +11 -2
- package/dist/commonjs/v3/chat-client.js +28 -10
- package/dist/commonjs/v3/chat-client.js.map +1 -1
- package/dist/commonjs/v3/chat-react.d.ts +21 -0
- package/dist/commonjs/v3/chat-react.js +86 -30
- package/dist/commonjs/v3/chat-react.js.map +1 -1
- package/dist/commonjs/v3/chat.d.ts +1 -0
- package/dist/commonjs/v3/chat.js +30 -7
- package/dist/commonjs/v3/chat.js.map +1 -1
- package/dist/commonjs/v3/index.d.ts +1 -1
- package/dist/commonjs/v3/index.js +2 -1
- package/dist/commonjs/v3/index.js.map +1 -1
- package/dist/commonjs/v3/managedChatResponse.d.ts +13 -5
- package/dist/commonjs/v3/managedChatResponse.js +36 -18
- package/dist/commonjs/v3/managedChatResponse.js.map +1 -1
- package/dist/commonjs/v3/oidc/aws.d.ts +22 -0
- package/dist/commonjs/v3/oidc/aws.js +43 -0
- package/dist/commonjs/v3/oidc/aws.js.map +1 -0
- package/dist/commonjs/v3/steeringContext.d.ts +11 -0
- package/dist/commonjs/v3/steeringContext.js +44 -3
- package/dist/commonjs/v3/steeringContext.js.map +1 -1
- package/dist/commonjs/v3/subAgentStream.d.ts +50 -0
- package/dist/commonjs/v3/subAgentStream.js +154 -0
- package/dist/commonjs/v3/subAgentStream.js.map +1 -0
- package/dist/commonjs/v3/transcriptStorage.js +3 -0
- package/dist/commonjs/v3/transcriptStorage.js.map +1 -1
- package/dist/commonjs/v3/uiMessageChunks.js +5 -1
- package/dist/commonjs/v3/uiMessageChunks.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/esm/v3/ai-shared.d.ts +6 -0
- package/dist/esm/v3/ai-shared.js +6 -0
- package/dist/esm/v3/ai-shared.js.map +1 -1
- package/dist/esm/v3/ai.d.ts +45 -0
- package/dist/esm/v3/ai.js +113 -72
- package/dist/esm/v3/ai.js.map +1 -1
- package/dist/esm/v3/auth.d.ts +12 -2
- package/dist/esm/v3/auth.js +27 -13
- package/dist/esm/v3/auth.js.map +1 -1
- package/dist/esm/v3/chat-client.d.ts +11 -2
- package/dist/esm/v3/chat-client.js +29 -11
- package/dist/esm/v3/chat-client.js.map +1 -1
- package/dist/esm/v3/chat-react.d.ts +21 -0
- package/dist/esm/v3/chat-react.js +81 -30
- package/dist/esm/v3/chat-react.js.map +1 -1
- package/dist/esm/v3/chat.d.ts +1 -0
- package/dist/esm/v3/chat.js +27 -6
- package/dist/esm/v3/chat.js.map +1 -1
- package/dist/esm/v3/index.d.ts +1 -1
- package/dist/esm/v3/index.js +1 -1
- package/dist/esm/v3/index.js.map +1 -1
- package/dist/esm/v3/managedChatResponse.d.ts +13 -5
- package/dist/esm/v3/managedChatResponse.js +36 -18
- package/dist/esm/v3/managedChatResponse.js.map +1 -1
- package/dist/esm/v3/oidc/aws.d.ts +22 -0
- package/dist/esm/v3/oidc/aws.js +40 -0
- package/dist/esm/v3/oidc/aws.js.map +1 -0
- package/dist/esm/v3/steeringContext.d.ts +11 -0
- package/dist/esm/v3/steeringContext.js +44 -4
- package/dist/esm/v3/steeringContext.js.map +1 -1
- package/dist/esm/v3/subAgentStream.d.ts +50 -0
- package/dist/esm/v3/subAgentStream.js +149 -0
- package/dist/esm/v3/subAgentStream.js.map +1 -0
- package/dist/esm/v3/transcriptStorage.js +3 -0
- package/dist/esm/v3/transcriptStorage.js.map +1 -1
- package/dist/esm/v3/uiMessageChunks.js +5 -1
- package/dist/esm/v3/uiMessageChunks.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/docs/ai-chat/background-injection.mdx +2 -0
- package/docs/ai-chat/client-protocol.mdx +1 -0
- package/docs/ai-chat/frontend.mdx +16 -1
- package/docs/ai-chat/overview.mdx +1 -1
- package/docs/ai-chat/patterns/sub-agents.mdx +81 -55
- package/docs/ai-chat/pending-messages.mdx +2 -0
- package/docs/ai-chat/quick-start.mdx +1 -1
- package/docs/ai-chat/reference.mdx +22 -0
- package/docs/ai-chat/server-chat.mdx +11 -7
- package/docs/apikeys.mdx +5 -0
- package/docs/cli-login-commands.mdx +7 -1
- package/docs/cli-webhooks-commands.mdx +115 -0
- package/docs/config/config-file.mdx +3 -3
- package/docs/github-integration.mdx +21 -0
- package/docs/how-to-reduce-your-spend.mdx +4 -0
- package/docs/limits.mdx +41 -0
- package/docs/observability/query.mdx +29 -0
- package/docs/oidc.mdx +262 -0
- package/docs/self-hosting/docker.mdx +62 -0
- package/docs/self-hosting/env/supervisor.mdx +3 -0
- package/docs/self-hosting/env/webapp.mdx +14 -0
- package/docs/self-hosting/kubernetes.mdx +2 -0
- package/docs/troubleshooting-alerts.mdx +39 -0
- package/docs/webhooks/connect.mdx +12 -0
- package/docs/webhooks/deliveries.mdx +4 -0
- package/docs/webhooks/overview.mdx +8 -0
- package/docs/webhooks/sources.mdx +3 -1
- package/docs/webhooks/waiters.mdx +3 -3
- package/package.json +22 -2
- package/skills/trigger-chat-agent-advanced/SKILL.md +17 -7
- package/skills/trigger-cost-savings/SKILL.md +1 -0
package/docs/limits.mdx
CHANGED
|
@@ -178,6 +178,47 @@ All of an environment's endpoints also share a per-environment limit, counted in
|
|
|
178
178
|
| Pro | 3,000 every 10 sec |
|
|
179
179
|
| Enterprise | Set per organization |
|
|
180
180
|
|
|
181
|
+
## Webhook waiters
|
|
182
|
+
|
|
183
|
+
A [waiter](/webhooks/waiters) is a run paused until a matching webhook arrives. The per-endpoint limit is also the most waiting runs one delivery can resume.
|
|
184
|
+
|
|
185
|
+
| Pricing tier | Live waiters per environment | Live waiters per endpoint |
|
|
186
|
+
| :----------- | :--------------------------- | :------------------------ |
|
|
187
|
+
| Free | 500 | 100 |
|
|
188
|
+
| Hobby | 2,000 | 1,000 |
|
|
189
|
+
| Pro | 25,000 | 10,000 |
|
|
190
|
+
| Enterprise | Set per organization | Set per organization |
|
|
191
|
+
|
|
192
|
+
A waiter can wait for up to 90 days.
|
|
193
|
+
|
|
194
|
+
## Webhook processing concurrency
|
|
195
|
+
|
|
196
|
+
This limit controls how many webhook deliveries and waiter resumes are processed at once per environment. Additional deliveries wait their turn. It is not a limit on the runs those deliveries start, which use your normal [concurrency limits](#concurrency-limits).
|
|
197
|
+
|
|
198
|
+
| Pricing tier | Limit |
|
|
199
|
+
| :----------- | :----------------------- |
|
|
200
|
+
| Free | 5 concurrent deliveries |
|
|
201
|
+
| Hobby | 10 concurrent deliveries |
|
|
202
|
+
| Pro | 50 concurrent deliveries |
|
|
203
|
+
| Enterprise | Set per organization |
|
|
204
|
+
|
|
205
|
+
## Webhook delivery retention
|
|
206
|
+
|
|
207
|
+
How long [deliveries](/webhooks/deliveries) stay visible in the dashboard and the API.
|
|
208
|
+
|
|
209
|
+
| Pricing tier | Limit |
|
|
210
|
+
| :----------- | :--------------------------- |
|
|
211
|
+
| Free | 3 days |
|
|
212
|
+
| Hobby | 7 days |
|
|
213
|
+
| Pro | 30 days |
|
|
214
|
+
| Enterprise | 90, 180 or 365 days |
|
|
215
|
+
|
|
216
|
+
By default, deliveries are stored for at least 30 days, so upgrading your plan shows older deliveries that are still stored. An organization can ask us to store deliveries only for its retention period instead. Deliveries past that period are then deleted and can't be shown again after an upgrade.
|
|
217
|
+
|
|
218
|
+
## Webhook subscribers
|
|
219
|
+
|
|
220
|
+
An endpoint can have up to 25 subscribers (tasks, agent sessions and channels) on every plan.
|
|
221
|
+
|
|
181
222
|
## Log retention
|
|
182
223
|
|
|
183
224
|
| Pricing tier | Limit |
|
|
@@ -57,6 +57,35 @@ ORDER BY minute
|
|
|
57
57
|
LIMIT 1000
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
+
#### Platform limit metrics
|
|
61
|
+
|
|
62
|
+
The `metrics` table also records how close your environment is to platform limits. These are the metrics behind [Limits alerts](/troubleshooting-alerts#limits-alerts):
|
|
63
|
+
|
|
64
|
+
| Metric | What it shows |
|
|
65
|
+
| ------------------------------- | ------------------------------------------------ |
|
|
66
|
+
| `queue.size.queued` | Runs currently queued in the environment |
|
|
67
|
+
| `queue.size.limit` | The environment's maximum queued runs |
|
|
68
|
+
| `webhook.processing.in_flight` | Webhooks being processed now |
|
|
69
|
+
| `webhook.processing.limit` | The webhook processing concurrency limit |
|
|
70
|
+
| `webhook.ingress.denied` | Incoming webhooks rejected by a rate limit |
|
|
71
|
+
| `webhook.ingress.remaining_min` | The lowest remaining rate limit allowance seen |
|
|
72
|
+
| `webhook.ingress.limit.tokens` | The rate limit's allowance per window |
|
|
73
|
+
| `webhook.waiters.live` | Runs currently waiting for a webhook |
|
|
74
|
+
| `webhook.waiters.limit.env` | The environment's maximum webhook waiters |
|
|
75
|
+
| `webhook.waiters.refused` | New webhook waiters that were refused |
|
|
76
|
+
|
|
77
|
+
```sql
|
|
78
|
+
SELECT
|
|
79
|
+
timeBucket(),
|
|
80
|
+
maxIf(metric_value, metric_name = 'queue.size.queued') AS queued,
|
|
81
|
+
maxIf(metric_value, metric_name = 'queue.size.limit') AS queue_limit
|
|
82
|
+
FROM metrics
|
|
83
|
+
WHERE metric_name LIKE 'queue.size.%'
|
|
84
|
+
GROUP BY timeBucket
|
|
85
|
+
ORDER BY timeBucket
|
|
86
|
+
LIMIT 1000
|
|
87
|
+
```
|
|
88
|
+
|
|
60
89
|
### `prettyFormat()`
|
|
61
90
|
|
|
62
91
|
Use `prettyFormat()` to format metric values for display:
|
package/docs/oidc.mdx
ADDED
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "OpenID Connect (OIDC)"
|
|
3
|
+
description: "Access AWS and other services from deployed tasks using short-lived credentials instead of stored cloud keys."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<Note>
|
|
7
|
+
OIDC is in private beta on Trigger.dev Cloud. [Contact us](https://trigger.dev/contact) to request
|
|
8
|
+
access.
|
|
9
|
+
</Note>
|
|
10
|
+
|
|
11
|
+
OIDC lets a deployed task on Trigger.dev Cloud prove its identity to an external service without storing a long-lived cloud key. Trigger.dev issues a short-lived identity token. The service validates that token and grants only the permissions you configured for that identity.
|
|
12
|
+
|
|
13
|
+
## Prerequisites
|
|
14
|
+
|
|
15
|
+
- Use `@trigger.dev/sdk` and the Trigger.dev CLI (`trigger.dev`) **4.8.3 or later**, including the CLI used by your CI or deployment integration.
|
|
16
|
+
- **Redeploy after upgrading the CLI**, then start a new run on the new deployment. Updating the SDK alone does not update the runner in an existing deployment. Replaying a run against an old deployment does not upgrade it.
|
|
17
|
+
- Request tokens inside the executing task attempt, in Production, Staging, or a Preview environment. Development runs do not receive internal run tokens.
|
|
18
|
+
|
|
19
|
+
## Set up AWS
|
|
20
|
+
|
|
21
|
+
<Steps>
|
|
22
|
+
<Step title="Select your deployed environment">
|
|
23
|
+
Open your project in the dashboard, select the Production, Staging, or Preview environment that
|
|
24
|
+
needs AWS access, then open [**OIDC**](https://cloud.trigger.dev/_/oidc) in the environment menu. Configure each environment separately.
|
|
25
|
+
</Step>
|
|
26
|
+
<Step title="Create an IAM OIDC identity provider">
|
|
27
|
+
In the AWS IAM console, open **Identity providers → Add provider → OpenID Connect**. Paste the
|
|
28
|
+
**Issuer URL** from the dashboard into **Provider URL** and use `sts.amazonaws.com` as the
|
|
29
|
+
**Audience**. You only need one provider per issuer in an AWS account; reuse it if it already exists.
|
|
30
|
+
|
|
31
|
+
Alternatively, use the AWS CLI with the exact issuer URL from the dashboard:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
aws iam create-open-id-connect-provider \
|
|
35
|
+
--url "https://oidc.trigger.dev" \
|
|
36
|
+
--client-id-list sts.amazonaws.com
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
For Terraform-managed infrastructure, see [Terraform setup](#terraform-setup) below.
|
|
40
|
+
</Step>
|
|
41
|
+
<Step title="Create an IAM role with the exact trust policy">
|
|
42
|
+
Enter your AWS account ID in the dashboard setup page, then copy its trust policy into an IAM
|
|
43
|
+
role's **Trust relationships**. The policy allows `sts:AssumeRoleWithWebIdentity` only when both
|
|
44
|
+
the audience and the complete environment subject match.
|
|
45
|
+
|
|
46
|
+
Exact matching is the default. Keep the organization ID, project reference, environment type,
|
|
47
|
+
and audience fixed. To share a role across all Preview branches in one project, keep the
|
|
48
|
+
audience under `StringEquals` and use `StringLike` for only the subject. Replace the trust
|
|
49
|
+
policy's `Condition` with:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"StringEquals": {
|
|
54
|
+
"oidc.trigger.dev:aud": "sts.amazonaws.com"
|
|
55
|
+
},
|
|
56
|
+
"StringLike": {
|
|
57
|
+
"oidc.trigger.dev:sub": "org:YOUR_ORG_ID:project:YOUR_PROJECT_REF:env:PREVIEW:*"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Replace the organization ID and project reference with the exact values from your dashboard
|
|
63
|
+
subject. This deliberately trusts all
|
|
64
|
+
current and future Preview branches in that project, including anyone allowed to deploy them.
|
|
65
|
+
Never wildcard the organization or project portions. Keep `PREVIEW` fixed so the role does not
|
|
66
|
+
also trust Production or Staging.
|
|
67
|
+
|
|
68
|
+
For a single Preview branch, use its persisted environment slug, not the parent environment's
|
|
69
|
+
identity or a branch display name. No session tags or `sts:TagSession` permission are required.
|
|
70
|
+
</Step>
|
|
71
|
+
<Step title="Attach a least-privilege permissions policy">
|
|
72
|
+
The trust policy controls who can assume the role. Attach a separate permissions policy that
|
|
73
|
+
controls what the role can do. For example, to read objects under one S3 prefix:
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"Version": "2012-10-17",
|
|
78
|
+
"Statement": [
|
|
79
|
+
{
|
|
80
|
+
"Effect": "Allow",
|
|
81
|
+
"Action": "s3:GetObject",
|
|
82
|
+
"Resource": "arn:aws:s3:::YOUR_BUCKET/trigger/*"
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
</Step>
|
|
88
|
+
<Step title="Install the SDK and AWS dependencies">
|
|
89
|
+
```bash
|
|
90
|
+
npm install @trigger.dev/sdk@latest @aws-sdk/client-sts @aws-sdk/client-s3
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
`@aws-sdk/client-sts` is an optional peer dependency of the Trigger.dev SDK. Install it explicitly
|
|
94
|
+
when using the AWS credential provider. Install the AWS service clients your task uses as well.
|
|
95
|
+
</Step>
|
|
96
|
+
<Step title="Use the credential provider and redeploy">
|
|
97
|
+
Replace the role ARN, AWS region, bucket, and object key below, or copy the personalized code
|
|
98
|
+
from the dashboard:
|
|
99
|
+
|
|
100
|
+
```typescript
|
|
101
|
+
import { task } from "@trigger.dev/sdk";
|
|
102
|
+
import { awsCredentialProvider } from "@trigger.dev/sdk/oidc/aws";
|
|
103
|
+
import { GetObjectCommand, S3Client } from "@aws-sdk/client-s3";
|
|
104
|
+
|
|
105
|
+
export const readFromS3 = task({
|
|
106
|
+
id: "read-from-s3",
|
|
107
|
+
run: async () => {
|
|
108
|
+
const s3 = new S3Client({
|
|
109
|
+
region: "us-east-1",
|
|
110
|
+
credentials: awsCredentialProvider({
|
|
111
|
+
roleArn: "arn:aws:iam::YOUR_AWS_ACCOUNT_ID:role/YOUR_ROLE_NAME",
|
|
112
|
+
region: "us-east-1",
|
|
113
|
+
}),
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
const result = await s3.send(
|
|
117
|
+
new GetObjectCommand({ Bucket: "YOUR_BUCKET", Key: "trigger/example.txt" })
|
|
118
|
+
);
|
|
119
|
+
return { contents: await result.Body?.transformToString() };
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
npx trigger.dev@latest deploy
|
|
126
|
+
```
|
|
127
|
+
</Step>
|
|
128
|
+
</Steps>
|
|
129
|
+
|
|
130
|
+
<Warning>
|
|
131
|
+
Create the AWS client inside `run` and reuse it only within that run. A module-scope client can
|
|
132
|
+
reuse a previous run's cached credentials and attribute AWS activity to that run.
|
|
133
|
+
</Warning>
|
|
134
|
+
|
|
135
|
+
The provider requires `roleArn` and `region`, and accepts optional `roleSessionName` and `durationSeconds`. The AWS service client's region does not configure the separate STS client. AWS sessions default to 3,600 seconds (one hour), subject to the role's allowed session duration. The default role session name is the current run ID, sanitized to AWS's allowed characters and limited to 64 characters, so AWS activity can be attributed to a run. A role session name is not a session tag.
|
|
136
|
+
|
|
137
|
+
## Terraform setup
|
|
138
|
+
|
|
139
|
+
Use these resources instead of creating the provider and role through the console. Copy the exact
|
|
140
|
+
issuer URL and subject from the environment's OIDC page into the input variables. This example uses
|
|
141
|
+
exact subject matching; attach a least-privilege permissions policy to the role separately, as in
|
|
142
|
+
the setup steps above.
|
|
143
|
+
|
|
144
|
+
```hcl
|
|
145
|
+
terraform {
|
|
146
|
+
required_providers {
|
|
147
|
+
aws = {
|
|
148
|
+
source = "hashicorp/aws"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
provider "aws" {
|
|
154
|
+
region = "us-east-1"
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
variable "trigger_oidc_issuer" {
|
|
158
|
+
type = string
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
variable "trigger_oidc_subject" {
|
|
162
|
+
type = string
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
locals {
|
|
166
|
+
issuer_host = trimsuffix(trimprefix(var.trigger_oidc_issuer, "https://"), "/")
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
resource "aws_iam_openid_connect_provider" "trigger" {
|
|
170
|
+
url = var.trigger_oidc_issuer
|
|
171
|
+
client_id_list = ["sts.amazonaws.com"]
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
resource "aws_iam_role" "trigger" {
|
|
175
|
+
name = "trigger-s3-reader"
|
|
176
|
+
|
|
177
|
+
assume_role_policy = jsonencode({
|
|
178
|
+
Version = "2012-10-17"
|
|
179
|
+
Statement = [{
|
|
180
|
+
Effect = "Allow"
|
|
181
|
+
Action = "sts:AssumeRoleWithWebIdentity"
|
|
182
|
+
Principal = {
|
|
183
|
+
Federated = aws_iam_openid_connect_provider.trigger.arn
|
|
184
|
+
}
|
|
185
|
+
Condition = {
|
|
186
|
+
StringEquals = {
|
|
187
|
+
"${local.issuer_host}:aud" = "sts.amazonaws.com"
|
|
188
|
+
"${local.issuer_host}:sub" = var.trigger_oidc_subject
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}]
|
|
192
|
+
})
|
|
193
|
+
}
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
If the IAM provider already exists, import it into Terraform state rather than creating a duplicate:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
terraform import aws_iam_openid_connect_provider.trigger \
|
|
200
|
+
arn:aws:iam::YOUR_AWS_ACCOUNT_ID:oidc-provider/oidc.trigger.dev
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## Other OIDC integrations
|
|
204
|
+
|
|
205
|
+
<Note>
|
|
206
|
+
More first-party OIDC integrations will be added soon.
|
|
207
|
+
</Note>
|
|
208
|
+
|
|
209
|
+
For a service that accepts OIDC, request a token with that service's expected audience inside your task:
|
|
210
|
+
|
|
211
|
+
```typescript
|
|
212
|
+
import { auth, task } from "@trigger.dev/sdk";
|
|
213
|
+
|
|
214
|
+
export const federatedTask = task({
|
|
215
|
+
id: "federated-task",
|
|
216
|
+
run: async () => {
|
|
217
|
+
const { token } = await auth.getOIDCToken({ audience: "https://service.example.com" });
|
|
218
|
+
// Exchange this token using your service's federation API. Never log the token.
|
|
219
|
+
const response = await fetch("https://service.example.com/federated-resource", {
|
|
220
|
+
headers: { Authorization: `Bearer ${token}` },
|
|
221
|
+
});
|
|
222
|
+
if (!response.ok) throw new Error(`Service request failed: ${response.status}`);
|
|
223
|
+
return response.json();
|
|
224
|
+
},
|
|
225
|
+
});
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
`auth.getOIDCToken({ audience })` returns `Promise<{ token: string; expiresAt: Date }>`. If you cache tokens, leave enough time before `expiresAt` to complete the exchange. Configure the external service to validate the issuer's signature, audience, expiry, and exact environment subject. Do not use an OIDC token to call Trigger.dev APIs.
|
|
229
|
+
|
|
230
|
+
Token-request failures throw `OIDCTokenError`, exported from `@trigger.dev/sdk`, for both local validation and API errors. It extends `ApiError` and preserves the error code, message, HTTP status and headers; API failures retain the original error as `cause`.
|
|
231
|
+
|
|
232
|
+
## Local development
|
|
233
|
+
|
|
234
|
+
`trigger dev` does not receive internal run tokens and cannot mint external OIDC tokens. Use your own development credentials, such as an AWS SSO profile. If the same task needs to work locally and deployed, explicitly choose local credentials for Development:
|
|
235
|
+
|
|
236
|
+
```typescript
|
|
237
|
+
import { task } from "@trigger.dev/sdk";
|
|
238
|
+
import { awsCredentialProvider } from "@trigger.dev/sdk/oidc/aws";
|
|
239
|
+
import { GetObjectCommand, S3Client } from "@aws-sdk/client-s3";
|
|
240
|
+
|
|
241
|
+
export const readFromS3 = task({
|
|
242
|
+
id: "read-from-s3",
|
|
243
|
+
run: async (_, { ctx }) => {
|
|
244
|
+
const s3 = new S3Client({
|
|
245
|
+
region: "us-east-1",
|
|
246
|
+
credentials:
|
|
247
|
+
ctx.environment.type === "DEVELOPMENT"
|
|
248
|
+
? undefined // Use your own local AWS credential chain, for example AWS_PROFILE.
|
|
249
|
+
: awsCredentialProvider({
|
|
250
|
+
roleArn: "arn:aws:iam::YOUR_AWS_ACCOUNT_ID:role/YOUR_ROLE_NAME",
|
|
251
|
+
region: "us-east-1",
|
|
252
|
+
}),
|
|
253
|
+
});
|
|
254
|
+
const result = await s3.send(
|
|
255
|
+
new GetObjectCommand({ Bucket: "YOUR_BUCKET", Key: "trigger/example.txt" })
|
|
256
|
+
);
|
|
257
|
+
return { contents: await result.Body?.transformToString() };
|
|
258
|
+
},
|
|
259
|
+
});
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
Authenticate locally with your AWS tooling before running the task. Do not catch OIDC errors and fall back to static credentials in deployed environments.
|
|
@@ -389,6 +389,68 @@ EVENT_REPOSITORY_DEFAULT_STORE=clickhouse_v2
|
|
|
389
389
|
|
|
390
390
|
This only affects new runs; existing runs continue to read from wherever their events were originally stored.
|
|
391
391
|
|
|
392
|
+
### Move from the legacy clickhouse store
|
|
393
|
+
|
|
394
|
+
The legacy `clickhouse` store (the `task_events_v1` table) is retired. If you set `EVENT_REPOSITORY_DEFAULT_STORE=clickhouse`, your webapp now writes and reads `clickhouse_v2` instead and logs a warning at startup. Events recorded in `task_events_v1` stay there but no longer show in the dashboard until you copy them over.
|
|
395
|
+
|
|
396
|
+
<Steps titleSize="h4">
|
|
397
|
+
<Step title="Switch to clickhouse_v2">
|
|
398
|
+
Switch the store in your `.env` and restart the webapp:
|
|
399
|
+
|
|
400
|
+
```bash .env
|
|
401
|
+
EVENT_REPOSITORY_DEFAULT_STORE=clickhouse_v2
|
|
402
|
+
```
|
|
403
|
+
</Step>
|
|
404
|
+
<Step title="List the days to copy">
|
|
405
|
+
List the days that hold legacy events. The bundled ClickHouse container already sets `CLICKHOUSE_USER` and `CLICKHOUSE_PASSWORD`, and `clickhouse-client` reads them, so no credentials are needed:
|
|
406
|
+
|
|
407
|
+
```bash
|
|
408
|
+
docker compose exec clickhouse clickhouse-client -q \
|
|
409
|
+
"SELECT toDate(start_time) AS day, count() FROM trigger_dev.task_events_v1 GROUP BY day ORDER BY day"
|
|
410
|
+
```
|
|
411
|
+
</Step>
|
|
412
|
+
<Step title="Save the copy query">
|
|
413
|
+
Save the copy query as `copy-task-events-v1.sql`. It copies one day and skips events already in `task_events_v2`, so it's safe to run again if it's interrupted:
|
|
414
|
+
|
|
415
|
+
```sql copy-task-events-v1.sql
|
|
416
|
+
INSERT INTO trigger_dev.task_events_v2
|
|
417
|
+
(environment_id, organization_id, project_id, task_identifier, run_id, start_time,
|
|
418
|
+
trace_id, span_id, parent_span_id, message, kind, status, attributes_text,
|
|
419
|
+
metadata, duration, expires_at, inserted_at)
|
|
420
|
+
SELECT
|
|
421
|
+
environment_id, organization_id, project_id, task_identifier, run_id, start_time,
|
|
422
|
+
trace_id, span_id, parent_span_id, message, kind, status, attributes_text,
|
|
423
|
+
metadata, duration, expires_at, toDateTime64(start_time, 3)
|
|
424
|
+
FROM trigger_dev.task_events_v1
|
|
425
|
+
WHERE toDate(start_time) = {day:Date}
|
|
426
|
+
AND (trace_id, span_id, start_time, kind, status) NOT IN (
|
|
427
|
+
SELECT trace_id, span_id, start_time, kind, status
|
|
428
|
+
FROM trigger_dev.task_events_v2
|
|
429
|
+
WHERE inserted_at >= {day:Date} AND inserted_at < {day:Date} + INTERVAL 8 DAY
|
|
430
|
+
AND toDate(start_time) = {day:Date}
|
|
431
|
+
);
|
|
432
|
+
```
|
|
433
|
+
</Step>
|
|
434
|
+
<Step title="Copy each day">
|
|
435
|
+
Run it once per day from step 2, oldest first:
|
|
436
|
+
|
|
437
|
+
```bash
|
|
438
|
+
docker compose exec -T clickhouse clickhouse-client --param_day=2026-08-01 \
|
|
439
|
+
--multiquery < copy-task-events-v1.sql
|
|
440
|
+
```
|
|
441
|
+
</Step>
|
|
442
|
+
<Step title="Check a copied run">
|
|
443
|
+
Open a run from one of the copied days and check its trace and logs show.
|
|
444
|
+
</Step>
|
|
445
|
+
</Steps>
|
|
446
|
+
|
|
447
|
+
Copying one day at a time keeps memory use bounded on large tables. A future release removes `task_events_v1`, so copy anything you want to keep before then.
|
|
448
|
+
|
|
449
|
+
<Note>
|
|
450
|
+
`EVENT_REPOSITORY_V1_REROUTE_ENABLED=0` keeps the legacy store while you migrate. It's
|
|
451
|
+
temporary and will be removed in a future release.
|
|
452
|
+
</Note>
|
|
453
|
+
|
|
392
454
|
## Realtime streams
|
|
393
455
|
|
|
394
456
|
Realtime streams power AI-agent token streaming and run streams. They default to **v2**, backed by the bundled `s2` service — [s2-lite](https://s2.dev), the open-source, self-hostable S2 server. It stores stream data in a persistent volume and is preconfigured in the webapp compose file, so no setup is required.
|
|
@@ -33,6 +33,9 @@ mode: "wide"
|
|
|
33
33
|
| `TRIGGER_DEQUEUE_INTERVAL_MS` | No | 250 | Dequeue interval (ms). |
|
|
34
34
|
| `TRIGGER_DEQUEUE_IDLE_INTERVAL_MS` | No | 1000 (1s) | Dequeue idle interval (ms). |
|
|
35
35
|
| `TRIGGER_DEQUEUE_MAX_CONSUMER_COUNT` | No | 1 | Max dequeue consumer count. |
|
|
36
|
+
| `RELEASE_UNSTARTED_RUNS_ENABLED` | No | false | Set to true to requeue a run straight away when its container or pod can't be created, rather than after the pending execution timeout. Limited by `RUN_RELEASES_PER_MINUTE`. |
|
|
37
|
+
| `RELEASE_FAILED_POD_RUNS_ENABLED` | No | false | Set to true to requeue a run straight away when its pod fails before the run starts, rather than after the pending execution timeout. Independent of `RELEASE_UNSTARTED_RUNS_ENABLED`; the two share `RUN_RELEASES_PER_MINUTE`. Needs `FAILED_POD_HANDLER_ENABLED`. |
|
|
38
|
+
| `RUN_RELEASES_PER_MINUTE` | No | 5 | Different runs released within a minute, by either release flag, past which every release waits for the timeout again until a slot frees, a run already released included. 0 withholds every release; blank means the default. |
|
|
36
39
|
| **Docker settings** | | | |
|
|
37
40
|
| `DOCKER_API_VERSION` | No | v1.41 | Docker API version. You should probably not touch this. |
|
|
38
41
|
| `DOCKER_STRIP_IMAGE_DIGEST` | No | true | Strip image digest in Docker. Turning off can cause issues. |
|
|
@@ -88,6 +88,11 @@ mode: "wide"
|
|
|
88
88
|
| `API_RATE_LIMIT_METRICS_MAX_ENTRIES` | No | 10000 | Cap on distinct (environment, bucket) entries held between flushes. |
|
|
89
89
|
| `API_RATE_LIMIT_METRICS_WAIT_FOR_ASYNC_INSERT` | No | 0 | Wait for ClickHouse to write each async insert of API rate limit metrics, surfacing write failures. |
|
|
90
90
|
| `API_RATE_LIMIT_METRICS_INSERT_BUSY_TIMEOUT_MS` | No | 10000 | How long ClickHouse buffers API rate limit metric inserts before writing a part. |
|
|
91
|
+
| `WEBHOOK_METRICS_FLUSH_INTERVAL_MS` | No | 10000 | How often aggregated webhook limit metrics are flushed to ClickHouse. |
|
|
92
|
+
| `WEBHOOK_METRICS_MAX_ENTRIES` | No | 10000 | Cap on distinct (environment, bucket) entries held between flushes. |
|
|
93
|
+
| `WEBHOOK_METRICS_MAX_ENDPOINTS` | No | 500 | Cap on endpoints with their own webhook metric rows per environment and bucket; environment totals still count all. |
|
|
94
|
+
| `QUEUE_SIZE_METRICS_INTERVAL_SEC` | No | 30 | Queue size sampling interval in seconds; must divide 60. |
|
|
95
|
+
| `QUEUE_SIZE_METRICS_MAX_ENVS` | No | 2000 | Most environments sampled per interval. |
|
|
91
96
|
| `DEPLOYMENT_RATE_LIMIT_REFILL_INTERVAL` | No | 10s | Deployment endpoints rate limit refill interval. |
|
|
92
97
|
| `DEPLOYMENT_RATE_LIMIT_MAX` | No | 1500 | Deployment endpoints rate limit max. |
|
|
93
98
|
| `DEPLOYMENT_RATE_LIMIT_REFILL_RATE` | No | 500 | Deployment endpoints rate limit refill rate. |
|
|
@@ -123,6 +128,14 @@ mode: "wide"
|
|
|
123
128
|
| `ARTIFACTS_OBJECT_STORE_ACCESS_KEY_ID` | No | — | Optional artifacts store access key. |
|
|
124
129
|
| `ARTIFACTS_OBJECT_STORE_SECRET_ACCESS_KEY` | No | — | Optional artifacts store secret key. |
|
|
125
130
|
| `ARTIFACTS_OBJECT_STORE_REGION` | No | — | Optional artifacts store region. |
|
|
131
|
+
| `DEPLOYMENT_INDEX_OBJECT_STORE_BASE_URL` | No | — | Optional separate store for deployment index snapshots. If not set, uses main object store. |
|
|
132
|
+
| `DEPLOYMENT_INDEX_OBJECT_STORE_BUCKET` | No | — | Deployment index store bucket. Required together with the base URL. |
|
|
133
|
+
| `DEPLOYMENT_INDEX_OBJECT_STORE_ACCESS_KEY_ID` | No | — | Deployment index store access key. |
|
|
134
|
+
| `DEPLOYMENT_INDEX_OBJECT_STORE_SECRET_ACCESS_KEY` | No | — | Deployment index store secret key. |
|
|
135
|
+
| `DEPLOYMENT_INDEX_OBJECT_STORE_REGION` | No | — | Deployment index store region. |
|
|
136
|
+
| `DEPLOYMENT_INDEX_OBJECT_STORE_SERVICE` | No | s3 | Deployment index store service. |
|
|
137
|
+
| `DEPLOYMENT_INDEX_UPLOAD_MAX_ATTEMPTS` | No | 4 | Attempts to store a deployment's index before the deploy fails. |
|
|
138
|
+
| `DEPLOYMENT_INDEX_CAPTURE_ENABLED` | No | false | Set to true to store each deployment's full index in object storage when it deploys. |
|
|
126
139
|
| **Alerts** | | | |
|
|
127
140
|
| `ORG_SLACK_INTEGRATION_CLIENT_ID` | No | — | Slack client ID. Required for Slack alerts. |
|
|
128
141
|
| `ORG_SLACK_INTEGRATION_CLIENT_SECRET` | No | — | Slack client secret. Required for Slack alerts. |
|
|
@@ -160,6 +173,7 @@ mode: "wide"
|
|
|
160
173
|
| `SERVER_OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT` | No | 8192 | OTel span attribute value length limit. |
|
|
161
174
|
| **Task events** | | | |
|
|
162
175
|
| `EVENT_REPOSITORY_DEFAULT_STORE` | No | postgres | Where to store task events. Set to `clickhouse_v2` to store in ClickHouse (recommended for production). |
|
|
176
|
+
| `EVENT_REPOSITORY_V1_REROUTE_ENABLED` | No | 1 | Routes the retired `clickhouse` store to `clickhouse_v2`, for new events and for reads. Set `EVENT_REPOSITORY_DEFAULT_STORE=clickhouse_v2` and [copy older events](/self-hosting/docker#move-from-the-legacy-clickhouse-store) to keep them. `0` keeps the legacy store temporarily and will be removed. |
|
|
163
177
|
| `EVENT_REPOSITORY_POSTGRES_WRITES_DISABLED` | No | 0 | Skip all PostgreSQL task-event writes (set to `1`). Only enable when `EVENT_REPOSITORY_DEFAULT_STORE` is `clickhouse_v2`, otherwise task events are lost. |
|
|
164
178
|
| **Realtime** | | | |
|
|
165
179
|
| `REALTIME_BACKEND_NATIVE_ENABLED` | No | 0 | Set to `1` to enable native realtime run subscriptions and change notifications. When `0`, subscriptions use Electric. The Helm chart sets this to `1`. |
|
|
@@ -679,6 +679,8 @@ webapp:
|
|
|
679
679
|
|
|
680
680
|
This only affects new runs; existing runs continue to read from wherever their events were originally stored.
|
|
681
681
|
|
|
682
|
+
If you set `EVENT_REPOSITORY_DEFAULT_STORE` to the legacy `clickhouse` store, switch it to `clickhouse_v2`. To keep events recorded before the switch, follow [Move from the legacy clickhouse store](/self-hosting/docker#move-from-the-legacy-clickhouse-store) and run the queries with `kubectl exec` against your ClickHouse pod.
|
|
683
|
+
|
|
682
684
|
### Realtime streams
|
|
683
685
|
|
|
684
686
|
Realtime streams power AI-agent token streaming and run streams. They default to **v2**, backed by the bundled `s2` deployment — [s2-lite](https://s2.dev), the open-source, self-hostable S2 server. The chart deploys it with a persistent volume, so no extra services are required.
|
|
@@ -3,6 +3,8 @@ title: "Alerts"
|
|
|
3
3
|
description: "Get alerted when runs or deployments fail, or when deployments succeed."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
import { PrivateBeta } from "/snippets/feature-status.jsx";
|
|
7
|
+
|
|
6
8
|
We support receiving alerts for the following events:
|
|
7
9
|
- Run fails
|
|
8
10
|
- Deployment fails
|
|
@@ -44,6 +46,43 @@ Click on the triple dot menu on the right side of the table row and select "Disa
|
|
|
44
46
|
</Steps>
|
|
45
47
|
|
|
46
48
|
|
|
49
|
+
## Limits alerts
|
|
50
|
+
|
|
51
|
+
<PrivateBeta flag="alertsEnabled" />
|
|
52
|
+
|
|
53
|
+
A **Limits** alert watches limits that can interrupt or degrade runtime flow. Pick one limit for a single alert, or several (or "Watch all limits") for one combined alert.
|
|
54
|
+
|
|
55
|
+
| Group | What you can watch |
|
|
56
|
+
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
57
|
+
| Platform | API rate limit running out, Environment concurrency filling up, Queue size nearing its limit |
|
|
58
|
+
| Webhooks | Webhook processing saturating, Webhook ingress getting rate-limited, Webhook endpoint getting rate-limited, Webhook waiters running out |
|
|
59
|
+
|
|
60
|
+
### Signals
|
|
61
|
+
|
|
62
|
+
Each limit has up to two signals. Choose one or both:
|
|
63
|
+
|
|
64
|
+
- **Limit reached**: the limit is already affecting traffic, for example requests are being rejected.
|
|
65
|
+
- **Approaching the limit**: usage has reached a share of the limit. The default is 80%, and you can change it.
|
|
66
|
+
|
|
67
|
+
Queue size only has the approaching signal.
|
|
68
|
+
|
|
69
|
+
### Any or all
|
|
70
|
+
|
|
71
|
+
When you watch more than one limit, choose when the alert raises:
|
|
72
|
+
|
|
73
|
+
- **Any**: raise when at least one selected limit is true.
|
|
74
|
+
- **All**: raise only when every selected limit is true at the same time.
|
|
75
|
+
|
|
76
|
+
### Queue metrics
|
|
77
|
+
|
|
78
|
+
Environment concurrency and queue size need queue metrics for your environment. If they aren't available, they aren't offered when you create the alert.
|
|
79
|
+
|
|
80
|
+
### No data
|
|
81
|
+
|
|
82
|
+
A limit shows "No data" until its metrics exist, for example before your environment has made any API requests or received any webhooks. You can query these metrics yourself, see [Platform limit metrics](/observability/query#platform-limit-metrics).
|
|
83
|
+
|
|
84
|
+
You can also create these alerts with the [API](/management/alerts/create).
|
|
85
|
+
|
|
47
86
|
## Error group alerts
|
|
48
87
|
|
|
49
88
|
Error group alerts are **issue-based**, not run-based. They are created from the **Errors** page in the dashboard (the "Configure alerts…" button), not from the New alert modal on the Alerts page. Once created they show up in the Alerts table alongside your other alerts, labelled "Error group".
|
|
@@ -21,6 +21,18 @@ The prompt tells the agent to use the Trigger.dev MCP server (`npx trigger.dev@l
|
|
|
21
21
|
| `generate_webhook_secret` | Generates a signing secret and returns it once, for providers where you choose the secret. Optionally keeps accepting the old secret (`previousSecretTtlSeconds`). |
|
|
22
22
|
| `set_webhook_secret` | Stores a secret the provider issued. Optionally keeps accepting the old secret (`previousSecretTtlSeconds`). |
|
|
23
23
|
|
|
24
|
+
### Keep the secret out of the agent's context
|
|
25
|
+
|
|
26
|
+
A secret passed to `set_webhook_secret`, or returned by `generate_webhook_secret`, becomes part of the agent's conversation. The [CLI webhooks commands](/cli-webhooks-commands) store the secret without printing it, and the MCP tool descriptions point agents that can run shell commands to them:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# Store a secret the provider issued, from an env file or a pipe
|
|
30
|
+
npx trigger.dev@latest webhooks set-secret stripe --env prod --from-env STRIPE_WEBHOOK_SECRET
|
|
31
|
+
|
|
32
|
+
# Generate one and save it to .env.local for the agent to pass to the provider by name
|
|
33
|
+
npx trigger.dev@latest webhooks generate-secret github --env prod --to-env GITHUB_WEBHOOK_SECRET
|
|
34
|
+
```
|
|
35
|
+
|
|
24
36
|
Without the MCP server, the same operations are available on the REST API with the environment's secret key:
|
|
25
37
|
|
|
26
38
|
| Request | What it does |
|
|
@@ -70,6 +70,10 @@ The [MCP server](/mcp-introduction) has `list_webhook_deliveries` (filter by end
|
|
|
70
70
|
| [`GET /api/v1/webhooks/deliveries/{deliveryId}`](/management/webhooks/retrieve-delivery) | Reads a delivery, with a `targets` entry per subscriber and one for waiting runs. |
|
|
71
71
|
| [`POST /api/v1/webhooks/deliveries/{deliveryId}/replay`](/management/webhooks/replay-delivery) | Replays it, as above. The key needs permission to trigger every task the replay starts, and to write sessions if it reaches an agent's subscriber. |
|
|
72
72
|
|
|
73
|
+
## Retention
|
|
74
|
+
|
|
75
|
+
Deliveries stay visible for 3 days on Free, 7 days on Hobby, 30 days on Pro, and 90, 180 or 365 days on Enterprise. See [Limits](/limits#webhook-delivery-retention).
|
|
76
|
+
|
|
73
77
|
## Deduplication
|
|
74
78
|
|
|
75
79
|
Trigger.dev uses the endpoint and idempotency key to deduplicate incoming events. Delivery records and task runs have separate deduplication windows:
|
|
@@ -83,6 +83,14 @@ The CLI finds your endpoints and subscribers during `trigger dev` and deployment
|
|
|
83
83
|
|
|
84
84
|
A request must pass verification before anything else happens. Provider handshakes are answered directly and create no delivery. A verified request is checked for duplicates, recorded, and then routed: each subscriber's filter is checked, matching subscribers run, and waiting runs whose match fits the event are resumed. The delivery records a result per subscriber.
|
|
85
85
|
|
|
86
|
+
## Pricing and limits
|
|
87
|
+
|
|
88
|
+
Webhooks have no separate charge on Trigger.dev Cloud. Receiving, verifying, filtering and recording deliveries is included in every plan. The runs a delivery starts or resumes are billed like any other run: a per-run invocation cost plus compute time. See [pricing](https://trigger.dev/pricing).
|
|
89
|
+
|
|
90
|
+
A delivery that no subscriber's filter matches starts no run for any subscriber, so it costs nothing. A run already waiting for that webhook still resumes. A run [waiting](/webhooks/waiters) for a webhook is suspended, so it uses no compute until the webhook arrives.
|
|
91
|
+
|
|
92
|
+
Each plan sets limits on the ingest rate, waiting runs, processing concurrency and how long deliveries are kept. See [Limits](/limits#webhook-ingest-rate-limits).
|
|
93
|
+
|
|
86
94
|
## Connect it
|
|
87
95
|
|
|
88
96
|
Every endpoint can produce a setup prompt for an AI coding agent. It holds the URL, the events your subscribers filter on, and the steps for registering the endpoint and its signing secret with the provider. Copy it from the endpoints list or the endpoint's page, or read it with the MCP server's `get_webhook_endpoint_details` tool. See [Connect a provider](/webhooks/connect).
|
|
@@ -106,6 +106,8 @@ Supabase database webhooks aren't signed, so `supabase()` checks a shared secret
|
|
|
106
106
|
|
|
107
107
|
Slack also ships as a chat channel in `@trigger.dev/slack`.
|
|
108
108
|
|
|
109
|
+
For a complete project built on `resend()`, see the [Resend email agent example](https://github.com/triggerdotdev/examples/tree/main/resend-slack-email-agent). It drafts replies to a Resend inbox and waits for your approval in Slack before sending them.
|
|
110
|
+
|
|
109
111
|
### Hookdeck
|
|
110
112
|
|
|
111
113
|
`hookdeck()` verifies requests that a [Hookdeck](https://hookdeck.com) connection forwards to the endpoint. Hookdeck forwards the original provider's body unchanged, so pass that provider's event type:
|
|
@@ -242,7 +244,7 @@ Custom sources support these schemes:
|
|
|
242
244
|
| `hmac` | Computes an HMAC over the raw body or a signing template and compares it with a request header. |
|
|
243
245
|
| `shared-secret` | Compares a static token supplied in a header, bearer token, basic authentication, or request body. |
|
|
244
246
|
| `url-secret` | Compares a token in a URL query parameter. Hosted endpoints don't support path placement. |
|
|
245
|
-
| `asymmetric` | Verifies an Ed25519, ECDSA, or RSA signature using the provider's public key. |
|
|
247
|
+
| `asymmetric` | Verifies an Ed25519, ECDSA (P-256 with SHA-256, P-384 with SHA-384), or RSA-SHA256 signature using the provider's public key. Set `prehash: "sha256"` when the provider signs a SHA-256 digest of the signing string instead of the string itself. |
|
|
246
248
|
|
|
247
249
|
<Warning>
|
|
248
250
|
Query parameters can appear in access logs, proxies, and traces. Prefer a header-based scheme when
|
|
@@ -178,13 +178,13 @@ if (!result.cancelled) {
|
|
|
178
178
|
|
|
179
179
|
| Limit | Default |
|
|
180
180
|
| --- | --- |
|
|
181
|
-
| Live waiters per endpoint | 10,000. This is also the most one delivery can resume. |
|
|
182
|
-
| Live waiters per environment | 1,000,000 on self-hosted installs. |
|
|
181
|
+
| Live waiters per endpoint | Depends on your plan on Trigger.dev Cloud, 10,000 on self-hosted installs. This is also the most one delivery can resume. |
|
|
182
|
+
| Live waiters per environment | Depends on your plan on Trigger.dev Cloud, 1,000,000 on self-hosted installs. |
|
|
183
183
|
| Distinct sets of `match` paths per endpoint | 25 |
|
|
184
184
|
| Paths per `match` | 5 |
|
|
185
185
|
| Tags per waiter | 10 |
|
|
186
186
|
| Timeout | 24 hours by default, 90 days at most |
|
|
187
187
|
|
|
188
|
-
On Trigger.dev Cloud the per-endpoint and per-environment limits depend on your plan. Self-hosted installs can change them with `WEBHOOK_WAITER_MAX_PER_ENDPOINT`, `WEBHOOK_WAITER_MAX_PER_ENVIRONMENT` and `WEBHOOK_WAITER_MAX_SHAPES`.
|
|
188
|
+
On Trigger.dev Cloud the per-endpoint and per-environment limits depend on your plan: see [Limits](/limits#webhook-waiters). Self-hosted installs can change them with `WEBHOOK_WAITER_MAX_PER_ENDPOINT`, `WEBHOOK_WAITER_MAX_PER_ENVIRONMENT` and `WEBHOOK_WAITER_MAX_SHAPES`.
|
|
189
189
|
|
|
190
190
|
A delivery that resumes waiters shows one **Waiting runs** row on its [delivery page](/webhooks/deliveries#where-a-delivery-went) with how many matched, resumed and failed. A delivery that arrives while runs are waiting but matches none of them, and no subscriber takes, is `UNMATCHED`.
|