@trigger.dev/sdk 4.5.0 → 4.5.2

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.
Files changed (130) hide show
  1. package/dist/commonjs/v3/ai.d.ts +7 -10
  2. package/dist/commonjs/v3/ai.js +77 -44
  3. package/dist/commonjs/v3/ai.js.map +1 -1
  4. package/dist/commonjs/v3/auth.d.ts +1 -1
  5. package/dist/commonjs/v3/auth.js +3 -4
  6. package/dist/commonjs/v3/auth.js.map +1 -1
  7. package/dist/commonjs/v3/batch.d.ts +1 -1
  8. package/dist/commonjs/v3/batch.js.map +1 -1
  9. package/dist/commonjs/v3/chat-react.d.ts +1 -0
  10. package/dist/commonjs/v3/chat-react.js +5 -2
  11. package/dist/commonjs/v3/chat-react.js.map +1 -1
  12. package/dist/commonjs/v3/chat.d.ts +100 -0
  13. package/dist/commonjs/v3/chat.js +203 -19
  14. package/dist/commonjs/v3/chat.js.map +1 -1
  15. package/dist/commonjs/v3/chat.test.js +3 -30
  16. package/dist/commonjs/v3/chat.test.js.map +1 -1
  17. package/dist/commonjs/v3/deployments.d.ts +2 -3
  18. package/dist/commonjs/v3/deployments.js.map +1 -1
  19. package/dist/commonjs/v3/envvars.js.map +1 -1
  20. package/dist/commonjs/v3/index.d.ts +1 -1
  21. package/dist/commonjs/v3/index.js.map +1 -1
  22. package/dist/commonjs/v3/metadata.d.ts +2 -2
  23. package/dist/commonjs/v3/query.js.map +1 -1
  24. package/dist/commonjs/v3/queues.d.ts +1 -1
  25. package/dist/commonjs/v3/queues.js.map +1 -1
  26. package/dist/commonjs/v3/retry.d.ts +1 -1
  27. package/dist/commonjs/v3/retry.js +1 -1
  28. package/dist/commonjs/v3/retry.js.map +1 -1
  29. package/dist/commonjs/v3/runs-bulk.test.d.ts +1 -0
  30. package/dist/commonjs/v3/runs-bulk.test.js +141 -0
  31. package/dist/commonjs/v3/runs-bulk.test.js.map +1 -0
  32. package/dist/commonjs/v3/runs.d.ts +20 -4
  33. package/dist/commonjs/v3/runs.js +87 -0
  34. package/dist/commonjs/v3/runs.js.map +1 -1
  35. package/dist/commonjs/v3/schedules/index.d.ts +3 -3
  36. package/dist/commonjs/v3/schedules/index.js.map +1 -1
  37. package/dist/commonjs/v3/sessions.d.ts +3 -4
  38. package/dist/commonjs/v3/sessions.js +6 -3
  39. package/dist/commonjs/v3/sessions.js.map +1 -1
  40. package/dist/commonjs/v3/shared.d.ts +5 -6
  41. package/dist/commonjs/v3/shared.js +79 -16
  42. package/dist/commonjs/v3/shared.js.map +1 -1
  43. package/dist/commonjs/v3/shared.test.js +37 -0
  44. package/dist/commonjs/v3/shared.test.js.map +1 -1
  45. package/dist/commonjs/v3/streams.d.ts +1 -1
  46. package/dist/commonjs/v3/streams.js +2 -2
  47. package/dist/commonjs/v3/streams.js.map +1 -1
  48. package/dist/commonjs/v3/streams.test.js +3 -3
  49. package/dist/commonjs/v3/streams.test.js.map +1 -1
  50. package/dist/commonjs/v3/test/test-session-handle.d.ts +2 -1
  51. package/dist/commonjs/v3/test/test-session-handle.js.map +1 -1
  52. package/dist/commonjs/v3/triggerClient.types.test.js.map +1 -1
  53. package/dist/commonjs/v3/wait.d.ts +2 -1
  54. package/dist/commonjs/v3/wait.js.map +1 -1
  55. package/dist/commonjs/v3/webhooks.js +1 -1
  56. package/dist/commonjs/v3/webhooks.js.map +1 -1
  57. package/dist/commonjs/version.js +1 -1
  58. package/dist/esm/v3/ai.d.ts +7 -10
  59. package/dist/esm/v3/ai.js +75 -32
  60. package/dist/esm/v3/ai.js.map +1 -1
  61. package/dist/esm/v3/auth.d.ts +1 -1
  62. package/dist/esm/v3/auth.js +1 -2
  63. package/dist/esm/v3/auth.js.map +1 -1
  64. package/dist/esm/v3/batch.d.ts +1 -1
  65. package/dist/esm/v3/batch.js +1 -1
  66. package/dist/esm/v3/batch.js.map +1 -1
  67. package/dist/esm/v3/chat-react.d.ts +1 -0
  68. package/dist/esm/v3/chat-react.js +5 -2
  69. package/dist/esm/v3/chat-react.js.map +1 -1
  70. package/dist/esm/v3/chat.d.ts +100 -0
  71. package/dist/esm/v3/chat.js +204 -20
  72. package/dist/esm/v3/chat.js.map +1 -1
  73. package/dist/esm/v3/chat.test.js +3 -30
  74. package/dist/esm/v3/chat.test.js.map +1 -1
  75. package/dist/esm/v3/deployments.d.ts +2 -3
  76. package/dist/esm/v3/deployments.js +1 -1
  77. package/dist/esm/v3/deployments.js.map +1 -1
  78. package/dist/esm/v3/envvars.js.map +1 -1
  79. package/dist/esm/v3/index.d.ts +1 -1
  80. package/dist/esm/v3/index.js.map +1 -1
  81. package/dist/esm/v3/metadata.d.ts +2 -2
  82. package/dist/esm/v3/query.js.map +1 -1
  83. package/dist/esm/v3/queues.d.ts +1 -1
  84. package/dist/esm/v3/queues.js.map +1 -1
  85. package/dist/esm/v3/retry.d.ts +1 -1
  86. package/dist/esm/v3/retry.js +1 -1
  87. package/dist/esm/v3/retry.js.map +1 -1
  88. package/dist/esm/v3/runs-bulk.test.d.ts +1 -0
  89. package/dist/esm/v3/runs-bulk.test.js +139 -0
  90. package/dist/esm/v3/runs-bulk.test.js.map +1 -0
  91. package/dist/esm/v3/runs.d.ts +19 -3
  92. package/dist/esm/v3/runs.js +87 -0
  93. package/dist/esm/v3/runs.js.map +1 -1
  94. package/dist/esm/v3/schedules/index.d.ts +3 -3
  95. package/dist/esm/v3/schedules/index.js.map +1 -1
  96. package/dist/esm/v3/sessions.d.ts +3 -4
  97. package/dist/esm/v3/sessions.js +6 -3
  98. package/dist/esm/v3/sessions.js.map +1 -1
  99. package/dist/esm/v3/shared.d.ts +5 -6
  100. package/dist/esm/v3/shared.js +79 -17
  101. package/dist/esm/v3/shared.js.map +1 -1
  102. package/dist/esm/v3/shared.test.js +38 -1
  103. package/dist/esm/v3/shared.test.js.map +1 -1
  104. package/dist/esm/v3/streams.d.ts +1 -1
  105. package/dist/esm/v3/streams.js +2 -2
  106. package/dist/esm/v3/streams.js.map +1 -1
  107. package/dist/esm/v3/streams.test.js +4 -4
  108. package/dist/esm/v3/streams.test.js.map +1 -1
  109. package/dist/esm/v3/test/test-session-handle.d.ts +2 -1
  110. package/dist/esm/v3/test/test-session-handle.js +1 -1
  111. package/dist/esm/v3/test/test-session-handle.js.map +1 -1
  112. package/dist/esm/v3/triggerClient.types.test.js.map +1 -1
  113. package/dist/esm/v3/wait.d.ts +2 -1
  114. package/dist/esm/v3/wait.js.map +1 -1
  115. package/dist/esm/v3/webhooks.js +1 -1
  116. package/dist/esm/v3/webhooks.js.map +1 -1
  117. package/dist/esm/version.js +1 -1
  118. package/docs/ai-chat/frontend.mdx +46 -0
  119. package/docs/ai-chat/pending-messages.mdx +3 -1
  120. package/docs/ai-chat/reference.mdx +20 -0
  121. package/docs/billing-limits.mdx +73 -0
  122. package/docs/how-to-reduce-your-spend.mdx +1 -14
  123. package/docs/limits.mdx +5 -0
  124. package/docs/self-hosting/docker.mdx +24 -1
  125. package/docs/self-hosting/env/webapp.mdx +6 -1
  126. package/docs/self-hosting/kubernetes.mdx +34 -8
  127. package/docs/self-hosting/overview.mdx +4 -1
  128. package/docs/self-hosting/security.mdx +50 -0
  129. package/docs/troubleshooting.mdx +4 -0
  130. package/package.json +2 -2
@@ -61,7 +61,7 @@ webapp:
61
61
  ```bash
62
62
  helm upgrade -n trigger --install trigger \
63
63
  oci://ghcr.io/triggerdotdev/charts/trigger \
64
- --version "~4.0.0" \
64
+ --version "^4.5.0" \
65
65
  --create-namespace
66
66
  ```
67
67
 
@@ -107,11 +107,11 @@ The following commands will display the default values:
107
107
  ```bash
108
108
  # Specific version
109
109
  helm show values oci://ghcr.io/triggerdotdev/charts/trigger \
110
- --version "4.0.5"
110
+ --version "4.5.0"
111
111
 
112
112
  # Latest v4
113
113
  helm show values oci://ghcr.io/triggerdotdev/charts/trigger \
114
- --version "~4.0.0"
114
+ --version "^4.5.0"
115
115
  ```
116
116
 
117
117
  ### Custom values
@@ -171,7 +171,7 @@ Deploy with your custom values:
171
171
  ```bash
172
172
  helm upgrade -n trigger --install trigger \
173
173
  oci://ghcr.io/triggerdotdev/charts/trigger \
174
- --version "~4.0.0" \
174
+ --version "^4.5.0" \
175
175
  --create-namespace \
176
176
  -f values-custom.yaml
177
177
  ```
@@ -375,6 +375,32 @@ webapp:
375
375
 
376
376
  This only affects new runs; existing runs continue to read from wherever their events were originally stored.
377
377
 
378
+ ## Realtime streams
379
+
380
+ 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.
381
+
382
+ To fall back to the Redis-backed **v1** streams, set the default version to `v1`:
383
+
384
+ ```yaml
385
+ s2:
386
+ defaultStreamVersion: "v1"
387
+ ```
388
+
389
+ To use a hosted S2 at [s2.dev](https://s2.dev) instead of the bundled s2-lite, disable the bundled deployment and point at your basin. Supply the access token via an existing secret:
390
+
391
+ ```yaml
392
+ s2:
393
+ deploy: false
394
+ skipAccessTokens: false
395
+ external:
396
+ endpoint: "https://your-basin.b.aws.s2.dev/v1"
397
+ existingSecret: "s2-credentials"
398
+ existingSecretAccessTokenKey: "access-token"
399
+ basin: "your-basin"
400
+ ```
401
+
402
+ To disable realtime streams v2 entirely and use v1, set `s2.deploy: false` with no external endpoint. See `helm show values` for all `s2` options.
403
+
378
404
  ## Worker token
379
405
 
380
406
  When using the default bootstrap configuration, worker creation and authentication is handled automatically. The webapp generates a worker token and makes it available to the supervisor via a shared volume.
@@ -510,14 +536,14 @@ You can lock versions in two ways:
510
536
  # Pin to a specific version for production
511
537
  helm upgrade -n trigger --install trigger \
512
538
  oci://ghcr.io/triggerdotdev/charts/trigger \
513
- --version "4.0.5"
539
+ --version "4.5.0"
514
540
 
515
541
  # The app version will be different from the chart version
516
542
  # This is the version of the Trigger.dev webapp and supervisor
517
543
  # ..and should always match your Trigger.dev CLI version
518
544
  helm show chart \
519
545
  oci://ghcr.io/triggerdotdev/charts/trigger \
520
- --version "4.0.5" | grep appVersion
546
+ --version "4.5.0" | grep appVersion
521
547
  ```
522
548
 
523
549
  **Specific image tags:**
@@ -525,11 +551,11 @@ helm show chart \
525
551
  ```yaml
526
552
  webapp:
527
553
  image:
528
- tag: "v4.0.0"
554
+ tag: "v4.5.0"
529
555
 
530
556
  supervisor:
531
557
  image:
532
- tag: "v4.0.0"
558
+ tag: "v4.5.0"
533
559
  ```
534
560
 
535
561
  The chart version's `appVersion` field determines the default image tags. Newer image tags may be incompatible with older chart versions and vice versa.
@@ -6,7 +6,7 @@ description: "You can self-host Trigger.dev on your own infrastructure."
6
6
 
7
7
  Self-hosting Trigger.dev means you run and manage the platform on your own infrastructure, giving you full control over your environment, deployment process, and the URLs you expose the service on.
8
8
 
9
- You are responsible for provisioning resources, handling updates, and managing any security, scaling or reliability challenges that arise.
9
+ You are responsible for provisioning resources, handling updates, and managing any security, scaling or reliability challenges that arise. See [Security & vulnerability reporting](/self-hosting/security) for how to report issues and stay informed about security releases.
10
10
 
11
11
  We provide version-tagged releases for self-hosted deployments. It's highly advised to use these tags exclusively and keep them locked with your CLI version.
12
12
 
@@ -106,4 +106,7 @@ It's dangerous to go alone! Join the self-hosting channel on our [Discord server
106
106
  <Card title="Kubernetes" color="#326CE5" icon="dharmachakra" href="/self-hosting/kubernetes">
107
107
  Learn how to self-host Trigger.dev with Kubernetes.
108
108
  </Card>
109
+ <Card title="Security" icon="shield-halved" href="/self-hosting/security">
110
+ Report vulnerabilities and stay informed about security releases.
111
+ </Card>
109
112
  </CardGroup>
@@ -0,0 +1,50 @@
1
+ ---
2
+ title: "Security & vulnerability reporting"
3
+ description: "How to report security issues in Trigger.dev, our response targets, and how self-hosters receive security notices."
4
+ sidebarTitle: "Security"
5
+ ---
6
+
7
+ We take the security of Trigger.dev seriously, for both Cloud and self-hosted deployments. This page covers how to report a vulnerability, what to expect, and how to stay informed about security releases.
8
+
9
+ <Warning>
10
+ Do not report security vulnerabilities through public GitHub issues, pull requests, or Discord. Use one of the private channels below.
11
+ </Warning>
12
+
13
+ ## Reporting a vulnerability
14
+
15
+ <Steps>
16
+ <Step title="Choose a private channel">
17
+ - **GitHub (preferred):** open a private report from the repository's **Security** tab using **"Report a vulnerability"** ([direct link](https://github.com/triggerdotdev/trigger.dev/security/advisories/new)).
18
+ - **Email:** `security-advisories@trigger.dev`
19
+ </Step>
20
+ <Step title="Include the details">
21
+ A description and impact, steps to reproduce (a proof of concept helps), affected versions/components, and any suggested fix.
22
+ </Step>
23
+ <Step title="We track it privately">
24
+ Every report is tracked in a private GitHub Security Advisory. If you email us, we open the advisory on your behalf.
25
+ </Step>
26
+ </Steps>
27
+
28
+ ## What to expect
29
+
30
+ | Stage | Target |
31
+ | --- | --- |
32
+ | Acknowledgement | within 3 business days |
33
+ | Validation + CVSS 3.1 severity assessment | within 1 week |
34
+
35
+ We score issues with CVSS 3.1 and prioritise remediation by severity:
36
+
37
+ | Severity (CVSS 3.1) | Target time to resolve |
38
+ | --- | --- |
39
+ | Critical (9.0–10.0) | 7 days |
40
+ | High (7.0–8.9) | 30 days |
41
+ | Medium (4.0–6.9) | 90 days |
42
+ | Low (0.1–3.9) | As needed |
43
+
44
+ <Note>
45
+ These are best-effort targets measured from when we validate and accept a report, not guarantees. We follow coordinated disclosure with a default 90-day window, and publish a GitHub Security Advisory (requesting a CVE where applicable) once a fix ships.
46
+ </Note>
47
+
48
+ ## Supported versions
49
+
50
+ We patch the **latest released version line** only. Run the latest version-tagged release to receive security fixes — see [Self-hosting overview](/self-hosting/overview).
@@ -242,6 +242,10 @@ If runs are staying in the `QUEUED` state for extended periods, check your concu
242
242
  - **Review queue concurrency limits** - Check if individual queues have restrictive `concurrencyLimit` settings
243
243
  - **Check for stuck runs** - See if stalled runs are blocking new executions
244
244
 
245
+ ### Runs queued because a billing limit was reached
246
+
247
+ If your organization reaches a billing limit, billable environments (`production`, `staging`, and `preview`) pause: new runs still queue, but they won't start executing until you raise or remove the limit and choose whether to resume or cancel the queued runs. See [Billing limits and alerts](/billing-limits) for the full flow.
248
+
245
249
  ### `Crypto is not defined`
246
250
 
247
251
  This can happen in different situations, for example when using plain strings as idempotency keys. Support for `Crypto` without a special flag was added in Node `v19.0.0`. You will have to upgrade Node - we recommend even-numbered major releases, e.g. `v20` or `v22`. Alternatively, you can switch from plain strings to the `idempotencyKeys.create` SDK function. [Read the guide](/idempotency).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trigger.dev/sdk",
3
- "version": "4.5.0",
3
+ "version": "4.5.2",
4
4
  "description": "trigger.dev Node.JS SDK",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -66,7 +66,7 @@
66
66
  "dependencies": {
67
67
  "@opentelemetry/api": "1.9.1",
68
68
  "@opentelemetry/semantic-conventions": "1.41.1",
69
- "@trigger.dev/core": "4.5.0",
69
+ "@trigger.dev/core": "4.5.2",
70
70
  "chalk": "^5.2.0",
71
71
  "cronstrue": "^2.21.0",
72
72
  "debug": "^4.3.4",