@trigger.dev/sdk 4.8.5 → 4.8.7
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.d.ts +34 -8
- package/dist/commonjs/v3/ai.js +304 -168
- package/dist/commonjs/v3/ai.js.map +1 -1
- package/dist/commonjs/v3/auth.d.ts +4 -4
- package/dist/commonjs/v3/auth.js +21 -75
- package/dist/commonjs/v3/auth.js.map +1 -1
- package/dist/commonjs/v3/chat-client.d.ts +1 -1
- package/dist/commonjs/v3/chat.d.ts +1 -1
- package/dist/commonjs/v3/prompt.js +6 -8
- package/dist/commonjs/v3/prompt.js.map +1 -1
- package/dist/commonjs/v3/runs.d.ts +5 -1
- package/dist/commonjs/v3/runs.js.map +1 -1
- package/dist/commonjs/v3/sessions.js +10 -7
- package/dist/commonjs/v3/sessions.js.map +1 -1
- package/dist/commonjs/v3/shared.d.ts +2 -2
- package/dist/commonjs/v3/shared.js +16 -15
- package/dist/commonjs/v3/shared.js.map +1 -1
- package/dist/commonjs/v3/steeringContext.d.ts +35 -10
- package/dist/commonjs/v3/steeringContext.js +86 -14
- package/dist/commonjs/v3/steeringContext.js.map +1 -1
- package/dist/commonjs/v3/streams.js +10 -8
- package/dist/commonjs/v3/streams.js.map +1 -1
- package/dist/commonjs/v3/tasks.d.ts +2 -2
- package/dist/commonjs/v3/tasks.js.map +1 -1
- package/dist/commonjs/v3/test/mock-chat-agent.js +24 -13
- package/dist/commonjs/v3/test/mock-chat-agent.js.map +1 -1
- package/dist/commonjs/v3/toolOutputJson.d.ts +17 -0
- package/dist/commonjs/v3/toolOutputJson.js +241 -0
- package/dist/commonjs/v3/toolOutputJson.js.map +1 -0
- package/dist/commonjs/v3/webhooks.d.ts +8 -2
- package/dist/commonjs/v3/webhooks.js +20 -11
- package/dist/commonjs/v3/webhooks.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/esm/v3/ai.d.ts +34 -8
- package/dist/esm/v3/ai.js +306 -171
- package/dist/esm/v3/ai.js.map +1 -1
- package/dist/esm/v3/auth.d.ts +4 -4
- package/dist/esm/v3/auth.js +22 -76
- package/dist/esm/v3/auth.js.map +1 -1
- package/dist/esm/v3/chat-client.d.ts +1 -1
- package/dist/esm/v3/chat.d.ts +1 -1
- package/dist/esm/v3/prompt.js +6 -8
- package/dist/esm/v3/prompt.js.map +1 -1
- package/dist/esm/v3/runs.d.ts +5 -1
- package/dist/esm/v3/runs.js.map +1 -1
- package/dist/esm/v3/sessions.js +10 -7
- package/dist/esm/v3/sessions.js.map +1 -1
- package/dist/esm/v3/shared.d.ts +2 -2
- package/dist/esm/v3/shared.js +16 -15
- package/dist/esm/v3/shared.js.map +1 -1
- package/dist/esm/v3/steeringContext.d.ts +35 -10
- package/dist/esm/v3/steeringContext.js +85 -14
- package/dist/esm/v3/steeringContext.js.map +1 -1
- package/dist/esm/v3/streams.js +10 -8
- package/dist/esm/v3/streams.js.map +1 -1
- package/dist/esm/v3/tasks.d.ts +2 -2
- package/dist/esm/v3/tasks.js.map +1 -1
- package/dist/esm/v3/test/mock-chat-agent.js +25 -14
- package/dist/esm/v3/test/mock-chat-agent.js.map +1 -1
- package/dist/esm/v3/toolOutputJson.d.ts +17 -0
- package/dist/esm/v3/toolOutputJson.js +238 -0
- package/dist/esm/v3/toolOutputJson.js.map +1 -0
- package/dist/esm/v3/webhooks.d.ts +8 -2
- package/dist/esm/v3/webhooks.js +20 -11
- package/dist/esm/v3/webhooks.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/docs/ai/observability.mdx +25 -19
- package/docs/ai/prompts.mdx +25 -19
- package/docs/ai-chat/actions.mdx +1 -1
- package/docs/ai-chat/anatomy.mdx +1 -1
- package/docs/ai-chat/backend.mdx +24 -24
- package/docs/ai-chat/background-injection.mdx +5 -5
- package/docs/ai-chat/chat-local.mdx +2 -2
- package/docs/ai-chat/compaction.mdx +47 -18
- package/docs/ai-chat/custom-agents.mdx +4 -4
- package/docs/ai-chat/error-handling.mdx +4 -4
- package/docs/ai-chat/fast-starts.mdx +8 -7
- package/docs/ai-chat/frontend.mdx +6 -2
- package/docs/ai-chat/lifecycle-hooks.mdx +11 -11
- package/docs/ai-chat/migrating-from-a-route-handler.mdx +4 -4
- package/docs/ai-chat/migrating-from-hydrate-messages.mdx +1 -1
- package/docs/ai-chat/overview.mdx +1 -1
- package/docs/ai-chat/patterns/branching-conversations.mdx +1 -1
- package/docs/ai-chat/patterns/database-persistence.mdx +2 -2
- package/docs/ai-chat/patterns/human-in-the-loop.mdx +1 -1
- package/docs/ai-chat/patterns/native-compaction.mdx +29 -9
- package/docs/ai-chat/patterns/persistence-and-replay.mdx +1 -1
- package/docs/ai-chat/patterns/redacting-telemetry.mdx +2 -2
- package/docs/ai-chat/patterns/skills.mdx +2 -2
- package/docs/ai-chat/patterns/sub-agents.mdx +1 -1
- package/docs/ai-chat/patterns/tool-result-auditing.mdx +1 -1
- package/docs/ai-chat/patterns/trusted-edge-signals.mdx +2 -2
- package/docs/ai-chat/patterns/version-upgrades.mdx +2 -2
- package/docs/ai-chat/pending-messages.mdx +5 -5
- package/docs/ai-chat/prompt-caching.mdx +7 -7
- package/docs/ai-chat/quick-start.mdx +2 -2
- package/docs/ai-chat/testing.mdx +9 -9
- package/docs/ai-chat/tools.mdx +9 -5
- package/docs/ai-chat/transcript-storage.mdx +2 -2
- package/docs/ai-chat/types.mdx +10 -3
- package/docs/apikeys.mdx +2 -1
- package/docs/cli-login-commands.mdx +12 -0
- package/docs/concurrency.mdx +40 -0
- package/docs/database-connections.mdx +1 -1
- package/docs/deploy-environment-variables.mdx +84 -2
- package/docs/deployment/trusted-publishing.mdx +4 -0
- package/docs/errors-retrying.mdx +25 -18
- package/docs/github-actions.mdx +1 -1
- package/docs/github-integration.mdx +32 -1
- package/docs/how-it-works.mdx +4 -2
- package/docs/introduction.mdx +1 -1
- package/docs/mcp-introduction.mdx +7 -1
- package/docs/mcp-remote.mdx +90 -0
- package/docs/oidc/azure.mdx +81 -0
- package/docs/oidc/databricks.mdx +99 -0
- package/docs/oidc/doppler.mdx +60 -0
- package/docs/oidc/gcp.mdx +109 -0
- package/docs/oidc/hugging-face.mdx +90 -0
- package/docs/oidc/openrouter.mdx +91 -0
- package/docs/oidc/snowflake.mdx +91 -0
- package/docs/oidc/vault.mdx +71 -0
- package/docs/oidc.mdx +2 -0
- package/docs/runs/metadata.mdx +1 -1
- package/docs/self-hosting/docker.mdx +2 -0
- package/docs/self-hosting/env/webapp.mdx +4 -1
- package/docs/self-hosting/kubernetes.mdx +2 -0
- package/docs/tasks/schemaTask.mdx +26 -13
- package/docs/tasks/streams.mdx +2 -2
- package/docs/troubleshooting.mdx +7 -0
- package/docs/webhooks/channels.mdx +6 -6
- package/docs/webhooks/connect.mdx +9 -75
- package/docs/webhooks/custom-providers.mdx +87 -0
- package/docs/webhooks/deliveries.mdx +7 -7
- package/docs/webhooks/filters.mdx +2 -2
- package/docs/webhooks/how-it-works.mdx +58 -0
- package/docs/webhooks/human-in-the-loop.mdx +3 -3
- package/docs/webhooks/linear.mdx +5 -3
- package/docs/webhooks/overview.mdx +20 -71
- package/docs/webhooks/own-handler.mdx +62 -0
- package/docs/webhooks/pricing-and-limits.mdx +13 -0
- package/docs/webhooks/providers/attio.mdx +38 -0
- package/docs/webhooks/providers/autumn.mdx +40 -0
- package/docs/webhooks/providers/cal-com.mdx +41 -0
- package/docs/webhooks/providers/calendly.mdx +41 -0
- package/docs/webhooks/providers/clerk.mdx +40 -0
- package/docs/webhooks/providers/discord.mdx +45 -0
- package/docs/webhooks/providers/docusign.mdx +41 -0
- package/docs/webhooks/providers/elevenlabs.mdx +41 -0
- package/docs/webhooks/providers/firecrawl.mdx +54 -0
- package/docs/webhooks/providers/github.mdx +46 -0
- package/docs/webhooks/providers/gitlab.mdx +41 -0
- package/docs/webhooks/providers/granola.mdx +44 -0
- package/docs/webhooks/providers/hookdeck.mdx +98 -0
- package/docs/webhooks/providers/infisical.mdx +41 -0
- package/docs/webhooks/providers/jira.mdx +41 -0
- package/docs/webhooks/providers/langfuse.mdx +40 -0
- package/docs/webhooks/providers/linear.mdx +45 -0
- package/docs/webhooks/providers/loops.mdx +40 -0
- package/docs/webhooks/providers/metronome.mdx +42 -0
- package/docs/webhooks/providers/mux.mdx +40 -0
- package/docs/webhooks/providers/openai.mdx +40 -0
- package/docs/webhooks/providers/pagerduty.mdx +40 -0
- package/docs/webhooks/providers/plain.mdx +41 -0
- package/docs/webhooks/providers/planetscale.mdx +40 -0
- package/docs/webhooks/providers/recall-ai.mdx +54 -0
- package/docs/webhooks/providers/replicate.mdx +41 -0
- package/docs/webhooks/providers/resend.mdx +44 -0
- package/docs/webhooks/providers/retell.mdx +41 -0
- package/docs/webhooks/providers/sentry.mdx +41 -0
- package/docs/webhooks/providers/shopify.mdx +49 -0
- package/docs/webhooks/providers/slack.mdx +48 -0
- package/docs/webhooks/providers/square.mdx +40 -0
- package/docs/webhooks/providers/stripe.mdx +86 -0
- package/docs/webhooks/providers/supabase.mdx +41 -0
- package/docs/webhooks/providers/tailscale.mdx +43 -0
- package/docs/webhooks/providers/typeform.mdx +42 -0
- package/docs/webhooks/providers/vapi.mdx +47 -0
- package/docs/webhooks/providers/vercel.mdx +40 -0
- package/docs/webhooks/providers/whatsapp.mdx +45 -0
- package/docs/webhooks/providers/workos.mdx +41 -0
- package/docs/webhooks/providers/zendesk.mdx +41 -0
- package/docs/webhooks/providers.mdx +53 -0
- package/docs/webhooks/quick-start.mdx +131 -0
- package/docs/webhooks/session-routing.mdx +6 -6
- package/docs/webhooks/signing-secrets.mdx +80 -0
- package/docs/webhooks/slack.mdx +11 -2
- package/docs/webhooks/verification.mdx +139 -0
- package/docs/webhooks/waiters.mdx +2 -2
- package/docs/webhooks/webhook-tasks.mdx +46 -0
- package/package.json +4 -5
- package/docs/migrating-from-v3.mdx +0 -332
- package/docs/webhooks/public-beta.mdx +0 -70
- package/docs/webhooks/sources.mdx +0 -252
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Webhooks quick start"
|
|
3
|
+
sidebarTitle: "Quick start"
|
|
4
|
+
description: "Declare a hosted webhook endpoint, run it in dev, and see your first verified delivery start a task run in under 5 minutes."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Install the SDK, declare an endpoint with a subscriber, and send it a test event. By the end, a verified delivery starts a run of your task.
|
|
8
|
+
|
|
9
|
+
This guide uses the [GitHub provider](/webhooks/providers/github) because you generate its signing secret on Trigger.dev, so you don't need a GitHub account to finish it. The steps are the same for every [provider](/webhooks/providers).
|
|
10
|
+
|
|
11
|
+
<Steps>
|
|
12
|
+
|
|
13
|
+
<Step title="Add Trigger.dev to your project">
|
|
14
|
+
|
|
15
|
+
Skip this step if your project already uses Trigger.dev 4.8.1 or later.
|
|
16
|
+
|
|
17
|
+
<CodeGroup>
|
|
18
|
+
|
|
19
|
+
```bash npm
|
|
20
|
+
npx trigger.dev@latest init
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
```bash pnpm
|
|
24
|
+
pnpm dlx trigger.dev@latest init
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```bash bun
|
|
28
|
+
bunx trigger.dev@latest init
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
</CodeGroup>
|
|
32
|
+
|
|
33
|
+
To upgrade an existing project, install the SDK and CLI from `@latest`:
|
|
34
|
+
|
|
35
|
+
<CodeGroup>
|
|
36
|
+
|
|
37
|
+
```bash npm
|
|
38
|
+
npm i @trigger.dev/sdk@latest
|
|
39
|
+
npm i -D trigger.dev@latest
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
```bash pnpm
|
|
43
|
+
pnpm add @trigger.dev/sdk@latest
|
|
44
|
+
pnpm add -D trigger.dev@latest
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```bash bun
|
|
48
|
+
bun add @trigger.dev/sdk@latest
|
|
49
|
+
bun add -D trigger.dev@latest
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
</CodeGroup>
|
|
53
|
+
|
|
54
|
+
</Step>
|
|
55
|
+
|
|
56
|
+
<Step title="Declare the endpoint and a subscriber">
|
|
57
|
+
|
|
58
|
+
Create a file in your `/trigger` directory. The endpoint is the hosted URL; the subscriber is the task that runs for each event.
|
|
59
|
+
|
|
60
|
+
```ts /trigger/github.ts
|
|
61
|
+
import { webhook, webhooks } from "@trigger.dev/sdk";
|
|
62
|
+
|
|
63
|
+
export const github = webhooks.endpoint.define({
|
|
64
|
+
id: "github",
|
|
65
|
+
source: webhooks.github(),
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
export const githubEvents = webhook({
|
|
69
|
+
id: "github-events",
|
|
70
|
+
endpoint: github,
|
|
71
|
+
onEvent: async ({ event, headers }) => {
|
|
72
|
+
// GitHub sends the event name in a header
|
|
73
|
+
console.log("Received", headers.get("x-github-event"), event);
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
</Step>
|
|
79
|
+
|
|
80
|
+
<Step title="Run the dev server">
|
|
81
|
+
|
|
82
|
+
<CodeGroup>
|
|
83
|
+
|
|
84
|
+
```bash npm
|
|
85
|
+
npx trigger.dev@latest dev
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
```bash pnpm
|
|
89
|
+
pnpm dlx trigger.dev@latest dev
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
```bash bun
|
|
93
|
+
bunx trigger.dev@latest dev
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
</CodeGroup>
|
|
97
|
+
|
|
98
|
+
The CLI registers the `github` endpoint you declared in your **Development** environment.
|
|
99
|
+
|
|
100
|
+
</Step>
|
|
101
|
+
|
|
102
|
+
<Step title="Generate the signing secret">
|
|
103
|
+
|
|
104
|
+
In the [Trigger.dev dashboard](https://cloud.trigger.dev), open your project, make sure the **Development** environment is selected, and choose **Webhooks** in the side menu. The `github` endpoint is listed with its **Signing secret** column set to **Needs secret**. Every delivery is rejected until an endpoint has its secret.
|
|
105
|
+
|
|
106
|
+
Open the `github` endpoint, choose **Generate secret** and confirm. The secret is shown once: copy it if you'll connect GitHub later. Back on the **Webhooks** page, the column now says **Ready**.
|
|
107
|
+
|
|
108
|
+
</Step>
|
|
109
|
+
|
|
110
|
+
<Step title="Send a test event">
|
|
111
|
+
|
|
112
|
+
On the `github` endpoint's page, open the **Test** tab. It starts with a sample body. Under **Headers**, add `x-github-event` with a value such as `push` so the handler logs an event name, then choose **Send event**. The test is signed with the endpoint's secret and runs the full delivery pipeline. Sending the same body again is deduplicated to the first delivery, so change the body to send another.
|
|
113
|
+
|
|
114
|
+
The delivery appears on the **Deliveries** tab. Open it and check **Targets** to see that it reached the `github-events` subscriber, then follow the link to the run to see the logged event.
|
|
115
|
+
|
|
116
|
+
</Step>
|
|
117
|
+
|
|
118
|
+
</Steps>
|
|
119
|
+
|
|
120
|
+
## Connect the real provider
|
|
121
|
+
|
|
122
|
+
To receive real events, register the endpoint's **Webhook URL** and the same secret with the provider. Each [provider page](/webhooks/providers) lists where to add them.
|
|
123
|
+
|
|
124
|
+
<CardGroup cols={2}>
|
|
125
|
+
<Card title="Connect a provider" icon="plug" href="/webhooks/connect">
|
|
126
|
+
Register the URL and secret by hand or with an AI coding agent.
|
|
127
|
+
</Card>
|
|
128
|
+
<Card title="Filters" icon="filter" href="/webhooks/filters">
|
|
129
|
+
Run a subscriber only for the events it handles.
|
|
130
|
+
</Card>
|
|
131
|
+
</CardGroup>
|
|
@@ -4,7 +4,7 @@ description: "Route verified webhook deliveries to a durable per-key session ins
|
|
|
4
4
|
sidebarTitle: "Session routing"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
**Session routing sends deliveries that share a key (a customer, an installation, an issue) to one durable [session](/ai-chat/sessions), handled one at a time with state carried across them.** A plain [`webhook()`](/webhooks/overview) starts a fresh, stateless run for every delivery instead.
|
|
8
8
|
|
|
9
9
|
Instead of a handler, you declare a `chat.event` on an [endpoint](/webhooks/overview) and list it on an agent. The verified delivery is routed to a find-or-created session and arrives as an [action](/ai-chat/actions).
|
|
10
10
|
|
|
@@ -36,12 +36,12 @@ The endpoint's other subscribers, such as a `webhook()` task, still get the same
|
|
|
36
36
|
The `key` is what makes routing durable: two deliveries that resolve to the same key reach the same session; a different key gets its own. It is a template string, evaluated server-side at ingest, whose `{...}` placeholders read three namespaces:
|
|
37
37
|
|
|
38
38
|
- `{event.*}`: the parsed event body.
|
|
39
|
-
- `{webhook.*}`: endpoint metadata (`externalRef`, `tenantId`, `id`, `source`, `deliveryId`).
|
|
39
|
+
- `{webhook.*}`: endpoint metadata (`externalRef`, `tenantId`, `id`, `source`, `deliveryId`). Here `deliveryId` is the provider's event ID, not the `whd_` id.
|
|
40
40
|
- `{header.name}`: an inbound header.
|
|
41
41
|
|
|
42
42
|
These are the same namespaces [filter](/webhooks/filters) expressions use. Every placeholder names one: a bare `{customer}` is an error.
|
|
43
43
|
|
|
44
|
-
`{a || b}` falls back to `b` when `a` is missing or empty. Compose several placeholders into one key: `"{webhook.externalRef}-{event.issue.id}"`. Each placeholder is checked against the event type at build time, so a bad field is a
|
|
44
|
+
`{a || b}` falls back to `b` when `a` is missing or empty. Compose several placeholders into one key: `"{webhook.externalRef}-{event.issue.id}"`. Each placeholder is checked against the event type at build time, so a bad field is a type error at build time.
|
|
45
45
|
|
|
46
46
|
### The `type` label
|
|
47
47
|
|
|
@@ -74,7 +74,7 @@ export const orderAgent = chat.agent({
|
|
|
74
74
|
|
|
75
75
|
`action.type` is a closed union of the `type` labels of the events you listed, and each arm narrows `action.event` to that event's payload type. The full envelope is `{ type, event, source, headers, deliveryId, externalDeliveryId, endpoint }`. `deliveryId` is the delivery's `whd_` id, as in the dashboard and the [deliveries API](/webhooks/deliveries): a [replay](/webhooks/deliveries#replay) gets a new one. `externalDeliveryId` is the provider's id for the delivery (Stripe's `evt_` id, for example), the same across replays. `endpoint` is the endpoint the delivery arrived on.
|
|
76
76
|
|
|
77
|
-
Because it is an [action](/ai-chat/actions), the handler is not a turn by default: it can read the event, mutate session state with `chat.history`, and return nothing. To have the agent answer, return `chat.turn()`: the edit is saved, then a full turn runs on the session's history
|
|
77
|
+
Because it is an [action](/ai-chat/actions), the handler is not a turn by default: it can read the event, mutate session state with `chat.history`, and return nothing. To have the agent answer, return `chat.turn()`: the edit is saved, then a full turn runs on the session's history as a message turn does. Webhook actions bypass your `actionSchema` (their shape is fixed and already verified by the source), so `action.type` and `action.event` are typed from the descriptor, not the schema.
|
|
78
78
|
|
|
79
79
|
## Answering into a channel
|
|
80
80
|
|
|
@@ -107,7 +107,7 @@ export const orderAgent = chat.agent({
|
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
109
|
run: async ({ messages, streamText }) =>
|
|
110
|
-
streamText({ model: anthropic("claude-sonnet-
|
|
110
|
+
streamText({ model: anthropic("claude-sonnet-5-5"), messages }),
|
|
111
111
|
});
|
|
112
112
|
```
|
|
113
113
|
|
|
@@ -128,7 +128,7 @@ An exported `chat.event` that no agent lists routes nothing. `trigger dev` warns
|
|
|
128
128
|
|
|
129
129
|
## Filtering
|
|
130
130
|
|
|
131
|
-
A [`filter`](/webhooks/filters) works here
|
|
131
|
+
A [`filter`](/webhooks/filters) works here as on a `webhook()` task: a delivery that doesn't match never reaches the session, and the delivery records the reason.
|
|
132
132
|
|
|
133
133
|
```ts
|
|
134
134
|
export const orderEvents = chat.event({
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Webhook signing secrets"
|
|
3
|
+
sidebarTitle: "Signing secrets"
|
|
4
|
+
description: "Set, generate and rotate the credential an endpoint verifies deliveries with, from the dashboard, the CLI, the MCP server or the REST API."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**Each endpoint verifies deliveries with one credential: a signing secret, or a public key for providers that sign with a key pair.** Every delivery is rejected until the credential is set.
|
|
8
|
+
|
|
9
|
+
## Set the credential
|
|
10
|
+
|
|
11
|
+
| Action | Use it when |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| **Set signing secret** | The provider issues the secret, as Stripe and Svix do. |
|
|
14
|
+
| **Generate secret** | The provider accepts a secret you choose, as GitHub does. Trigger.dev shows it once. |
|
|
15
|
+
| **Set public key** | The provider signs with a key pair, as Discord does. |
|
|
16
|
+
|
|
17
|
+
Each [provider page](/webhooks/providers) says which one that provider needs.
|
|
18
|
+
|
|
19
|
+
## Rotate a credential
|
|
20
|
+
|
|
21
|
+
Choose **Rotate signing secret** to replace a provider-supplied secret. For a secret you generate, choose **Regenerate secret**, copy the new value, and update the provider's configuration. Use **Rotate public key** when replacing an asymmetric provider's key.
|
|
22
|
+
|
|
23
|
+
Both dialogs ask how long to keep accepting the old secret: **Stop immediately**, 1 hour, 24 hours (the default) or 7 days. Until then, deliveries signed with either secret verify, so you can update the provider without failing any. Choose **Stop immediately** if the old secret leaked.
|
|
24
|
+
|
|
25
|
+
Through the MCP tools or the REST API, pass `previousSecretTtlSeconds` (at most 604800, 7 days). The response's `previousSecretExpiresAt` says when the old secret stops working. Without it, the old secret stops working straight away:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
curl -X POST "https://api.trigger.dev/api/v1/webhooks/endpoints/github/rotate-secret" \
|
|
29
|
+
-H "Authorization: Bearer $TRIGGER_SECRET_KEY" \
|
|
30
|
+
-H "Content-Type: application/json" \
|
|
31
|
+
-d '{"previousSecretTtlSeconds": 3600}'
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
<Warning>
|
|
35
|
+
Trigger.dev stores credentials encrypted and doesn't display saved values. Copy a generated secret
|
|
36
|
+
before closing the dialog.
|
|
37
|
+
</Warning>
|
|
38
|
+
|
|
39
|
+
## Store secrets from the CLI
|
|
40
|
+
|
|
41
|
+
The [CLI webhooks commands](/cli-webhooks-commands) store a secret without printing it. Use them with AI agents that can run shell commands: a secret passed to `set_webhook_secret`, or returned by `generate_webhook_secret`, becomes part of the agent's conversation, and the MCP tool descriptions point agents to the CLI instead.
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Store a secret the provider issued, from an env file or a pipe
|
|
45
|
+
npx trigger.dev@latest webhooks set-secret stripe --env prod --from-env STRIPE_WEBHOOK_SECRET
|
|
46
|
+
|
|
47
|
+
# Generate one and save it to .env.local for the agent to pass to the provider by name
|
|
48
|
+
npx trigger.dev@latest webhooks generate-secret github --env prod --to-env GITHUB_WEBHOOK_SECRET
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## MCP tools
|
|
52
|
+
|
|
53
|
+
The Trigger.dev MCP server (`npx trigger.dev@latest install-mcp`) has these webhook tools:
|
|
54
|
+
|
|
55
|
+
| Tool | What it does |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| `list_webhook_endpoints` | Lists the environment's endpoints, with their URL and whether a secret is set. |
|
|
58
|
+
| `get_webhook_endpoint_details` | Reads one endpoint: URL, subscribers and their filters, secret state, and the setup prompt. |
|
|
59
|
+
| `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`). |
|
|
60
|
+
| `set_webhook_secret` | Stores a secret the provider issued. Optionally keeps accepting the old secret (`previousSecretTtlSeconds`). |
|
|
61
|
+
|
|
62
|
+
## REST API
|
|
63
|
+
|
|
64
|
+
The same operations are available on the REST API with the environment's secret key:
|
|
65
|
+
|
|
66
|
+
| Request | What it does |
|
|
67
|
+
| --- | --- |
|
|
68
|
+
| [`GET /api/v1/webhooks/endpoints`](/management/webhooks/list-endpoints) | Lists the environment's endpoints, with their URL and whether a secret is set. |
|
|
69
|
+
| [`GET /api/v1/webhooks/endpoints/{endpointId}`](/management/webhooks/retrieve-endpoint) | Reads the endpoint, including `subscribers` and `setupPrompt`. |
|
|
70
|
+
| [`POST /api/v1/webhooks/endpoints/{endpointId}/rotate-secret`](/management/webhooks/generate-secret) | Generates a secret and returns it once. |
|
|
71
|
+
| [`PUT /api/v1/webhooks/endpoints/{endpointId}/secret`](/management/webhooks/set-secret) | Stores a secret, sent as `{ "secret": "..." }`. |
|
|
72
|
+
|
|
73
|
+
`endpointId` is the endpoint's declared id (the `id` passed to `webhooks.endpoint.define`) or its `wh_` id, shown on its page and returned by `list_webhook_endpoints`:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
curl -X PUT "https://api.trigger.dev/api/v1/webhooks/endpoints/stripe/secret" \
|
|
77
|
+
-H "Authorization: Bearer $TRIGGER_SECRET_KEY" \
|
|
78
|
+
-H "Content-Type: application/json" \
|
|
79
|
+
-d '{"secret": "whsec_..."}'
|
|
80
|
+
```
|
package/docs/webhooks/slack.mdx
CHANGED
|
@@ -6,11 +6,14 @@ sidebarTitle: "Slack agents"
|
|
|
6
6
|
|
|
7
7
|
**`slack()` from `@trigger.dev/slack` turns a `chat.agent` into a native Slack agent.** Each Slack agent session (a conversation with the agent, or a thread in a channel) becomes a durable Trigger.dev [session](/ai-chat/sessions). A message runs as a turn, the session shows the agent working, the reply streams into the thread as the model writes it, and Slack's stop button stops the turn.
|
|
8
8
|
|
|
9
|
+
Slack is one of our deep integrations: as well as delivering [webhook events](/webhooks/providers/slack), the connector handles Slack's agent features for you.
|
|
10
|
+
|
|
9
11
|
```ts /trigger/support.ts
|
|
10
12
|
import { webhooks } from "@trigger.dev/sdk";
|
|
11
13
|
import { chat } from "@trigger.dev/sdk/ai";
|
|
12
14
|
import { appMentions, slack, webhookSource } from "@trigger.dev/slack";
|
|
13
15
|
import { anthropic } from "@ai-sdk/anthropic";
|
|
16
|
+
import { stepCountIs } from "ai";
|
|
14
17
|
|
|
15
18
|
const slackEvents = webhooks.endpoint.define({ id: "slack", source: webhookSource() });
|
|
16
19
|
|
|
@@ -26,7 +29,13 @@ export const support = chat.agent({
|
|
|
26
29
|
],
|
|
27
30
|
tools: { searchDocs, refundOrder },
|
|
28
31
|
run: async ({ messages, tools, signal, streamText }) =>
|
|
29
|
-
streamText({
|
|
32
|
+
streamText({
|
|
33
|
+
model: anthropic("claude-sonnet-5-5"),
|
|
34
|
+
messages,
|
|
35
|
+
tools,
|
|
36
|
+
abortSignal: signal,
|
|
37
|
+
stopWhen: stepCountIs(10),
|
|
38
|
+
}),
|
|
30
39
|
});
|
|
31
40
|
```
|
|
32
41
|
|
|
@@ -245,7 +254,7 @@ Only buttons built with `button()` or `slackButton()` reach the agent. Buttons y
|
|
|
245
254
|
|
|
246
255
|
## Stopping
|
|
247
256
|
|
|
248
|
-
Slack shows a stop button while the agent is working. It aborts the running turn through the run's `signal`,
|
|
257
|
+
Slack shows a stop button while the agent is working. It aborts the running turn through the run's `signal`, as a browser chat's stop does: the model call and any tool that honors the signal stop, the partial reply stays in the thread, and the status goes back to active. The next message continues the conversation.
|
|
249
258
|
|
|
250
259
|
- A stop pressed while nothing is running does nothing, and a repeated or delayed stop never stops a later turn.
|
|
251
260
|
- A stop that reaches a session waiting on an approval cancels it: the buttons are replaced with "Stopped", the pending tool call is recorded as stopped so the model sees that on the next turn, and a later click resumes nothing.
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Webhook verification"
|
|
3
|
+
description: "How an endpoint verifies each provider's requests, answers provider handshakes, and types the event its subscribers receive."
|
|
4
|
+
sidebarTitle: "Verification"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**An endpoint's `source` tells Trigger.dev how to verify a provider's requests and what type the event has.** Use a [built-in provider](/webhooks/providers), such as `webhooks.stripe()` or `webhooks.firecrawl()`, or describe the provider's scheme with [`webhooks.custom()`](/webhooks/custom-providers).
|
|
8
|
+
|
|
9
|
+
## Presets
|
|
10
|
+
|
|
11
|
+
Presets supply the verification configuration, and most also carry the provider's part of the endpoint's [setup prompt](/webhooks/connect#set-it-up-with-an-ai-agent). Set the endpoint's signing secret or public key as described in [Connect a provider](/webhooks/connect).
|
|
12
|
+
|
|
13
|
+
<CodeGroup>
|
|
14
|
+
|
|
15
|
+
```ts /trigger/stripe.ts
|
|
16
|
+
import { webhook, webhooks } from "@trigger.dev/sdk";
|
|
17
|
+
|
|
18
|
+
export const stripe = webhooks.endpoint.define({ id: "stripe", source: webhooks.stripe() });
|
|
19
|
+
|
|
20
|
+
export const stripeEvents = webhook({
|
|
21
|
+
id: "stripe-events",
|
|
22
|
+
endpoint: stripe,
|
|
23
|
+
onEvent: async ({ event }) => {
|
|
24
|
+
if (event.type === "payment_intent.succeeded") {
|
|
25
|
+
console.log(event.id);
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
```ts /trigger/github.ts
|
|
32
|
+
import { webhook, webhooks } from "@trigger.dev/sdk";
|
|
33
|
+
|
|
34
|
+
export const github = webhooks.endpoint.define({ id: "github", source: webhooks.github() });
|
|
35
|
+
|
|
36
|
+
export const githubEvents = webhook({
|
|
37
|
+
id: "github-events",
|
|
38
|
+
endpoint: github,
|
|
39
|
+
onEvent: async ({ headers }) => {
|
|
40
|
+
// GitHub puts the event type in a header
|
|
41
|
+
console.log(headers.get("x-github-event"));
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```ts /trigger/svix.ts
|
|
47
|
+
import { webhook, webhooks } from "@trigger.dev/sdk";
|
|
48
|
+
|
|
49
|
+
export const svix = webhooks.endpoint.define({ id: "svix", source: webhooks.svix() });
|
|
50
|
+
|
|
51
|
+
export const svixEvents = webhook({
|
|
52
|
+
id: "svix-events",
|
|
53
|
+
endpoint: svix,
|
|
54
|
+
onEvent: async ({ event }) => {
|
|
55
|
+
console.log(event);
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
```ts /trigger/my-provider.ts
|
|
61
|
+
import { webhook, webhooks } from "@trigger.dev/sdk";
|
|
62
|
+
|
|
63
|
+
export const myProvider = webhooks.endpoint.define({ id: "my-provider", source: webhooks.standardWebhooks() });
|
|
64
|
+
|
|
65
|
+
export const myProviderEvents = webhook({
|
|
66
|
+
id: "my-provider-events",
|
|
67
|
+
endpoint: myProvider,
|
|
68
|
+
onEvent: async ({ event }) => {
|
|
69
|
+
console.log(event);
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
</CodeGroup>
|
|
75
|
+
|
|
76
|
+
The available presets are `stripe()`, `github()`, `svix()`, `standardWebhooks()`, `square()`, and `discord()`.
|
|
77
|
+
|
|
78
|
+
### Svix and Standard Webhooks
|
|
79
|
+
|
|
80
|
+
`svix()` and `standardWebhooks()` use HMAC-SHA256 over `id.timestamp.body` with a base64-encoded `whsec_` secret. Their header names differ:
|
|
81
|
+
|
|
82
|
+
| Source | Headers |
|
|
83
|
+
| --- | --- |
|
|
84
|
+
| `svix()` | `svix-id`, `svix-timestamp`, `svix-signature` |
|
|
85
|
+
| `standardWebhooks()` | `webhook-id`, `webhook-timestamp`, `webhook-signature` |
|
|
86
|
+
|
|
87
|
+
Named sources such as `webhooks.clerk()` and `webhooks.openai()` select the corresponding configuration.
|
|
88
|
+
|
|
89
|
+
## Named providers
|
|
90
|
+
|
|
91
|
+
More than 40 named providers, such as `webhooks.firecrawl()`, `webhooks.linear()` and `webhooks.hookdeck()`, build on the same verifiers. [Providers](/webhooks/providers) lists every one, with where to register the URL and set the signing secret.
|
|
92
|
+
|
|
93
|
+
## Custom providers
|
|
94
|
+
|
|
95
|
+
For a provider without a built-in source, describe its signature scheme with `webhooks.custom()`. See [Custom providers](/webhooks/custom-providers) for the verification schemes and options.
|
|
96
|
+
|
|
97
|
+
## Endpoint validation
|
|
98
|
+
|
|
99
|
+
Some sources also define a response for the provider's endpoint-validation request. These requests don't create deliveries or task runs.
|
|
100
|
+
|
|
101
|
+
`discord()` answers a verified `{ type: 0 }` PING with HTTP `204` and no body. It also returns `204` for accepted events and `401` for invalid signatures. Set the Discord application's public key as the endpoint's verification credential.
|
|
102
|
+
|
|
103
|
+
Slack's `url_verification` challenge is handled the same way by `@trigger.dev/slack`.
|
|
104
|
+
|
|
105
|
+
`notion()` handles Notion's verification request, which is not signed: when you create a subscription, Notion sends a `verification_token` that it then uses to sign every later delivery. While the endpoint has no signing secret, the endpoint answers that request with `200` and stores the token as its signing secret. The endpoint page shows the token so you can paste it into Notion's Verify dialog. If the token doesn't arrive, select **Resend token** in that dialog. Deploy the endpoint and leave its signing secret unset before you create the subscription. Once a secret is set, a later verification request is rejected like any unsigned delivery. Before you re-create the subscription or resend its token, select **Clear signing secret** on the endpoint page so the endpoint stores the new token.
|
|
106
|
+
|
|
107
|
+
`whatsapp()` answers Meta's GET verification request when `hub.mode` is `subscribe` and `hub.verify_token` matches the endpoint's verify token. It returns `hub.challenge` as text. The verify token is separate from the App Secret used to verify event signatures; see [Verify a WhatsApp endpoint URL](/webhooks/providers/whatsapp#verify-the-callback-url). Endpoints without GET verification return `405` to GET requests.
|
|
108
|
+
|
|
109
|
+
## Typing the event
|
|
110
|
+
|
|
111
|
+
Stripe and GitHub sources provide default event shapes; other sources default to `unknown`. Pass an event type to the source function for typed handler parameters and autocomplete. This example uses `Stripe.Event` from the `stripe` package, which must be installed in your project:
|
|
112
|
+
|
|
113
|
+
```ts /trigger/stripe.ts
|
|
114
|
+
import type Stripe from "stripe";
|
|
115
|
+
import { webhook, webhooks } from "@trigger.dev/sdk";
|
|
116
|
+
|
|
117
|
+
export const stripe = webhooks.endpoint.define({ id: "stripe", source: webhooks.stripe<Stripe.Event>() });
|
|
118
|
+
|
|
119
|
+
export const stripeEvents = webhook({
|
|
120
|
+
id: "stripe-events",
|
|
121
|
+
endpoint: stripe,
|
|
122
|
+
onEvent: async ({ event }) => {
|
|
123
|
+
console.log(event.type, event.id);
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
For `webhooks.custom<T>()`, pass your own event type as `T`. The endpoint's event type flows to every subscriber: `webhook()` handlers, `chat.event` keys and filters, and [waiter](/webhooks/waiters) `match` paths are all checked against it.
|
|
129
|
+
|
|
130
|
+
<Note>
|
|
131
|
+
Event types are compile-time annotations. Signature verification doesn't validate the body against
|
|
132
|
+
a TypeScript type. Validate `event` inside `onEvent` if your handler needs runtime schema checks.
|
|
133
|
+
</Note>
|
|
134
|
+
|
|
135
|
+
## How verification works
|
|
136
|
+
|
|
137
|
+
Requests must pass verification before they reach any subscriber. Sources can check a signature or credential, enforce a timestamp tolerance, and derive an idempotency key for [deduplication](/webhooks/deliveries#deduplication). Verification failures return the source's rejected HTTP status (`400` by default).
|
|
138
|
+
|
|
139
|
+
To verify a provider that isn't built in, choose a scheme for a [custom provider](/webhooks/custom-providers#verification-schemes).
|
|
@@ -67,7 +67,7 @@ Match on values you control, such as your own order id in the provider object's
|
|
|
67
67
|
| --- | --- |
|
|
68
68
|
| `event.*` | The verified event body, for example `event.data.object.id`. |
|
|
69
69
|
| `header.*` | A request header, matched case-insensitively, for example `header.x-shop-domain`. |
|
|
70
|
-
| `webhook.*` | The endpoint: `id`, `source`, `externalRef`, `tenantId`, or `deliveryId
|
|
70
|
+
| `webhook.*` | The endpoint: `id`, `source`, `externalRef`, `tenantId`, or `deliveryId` (the provider's event ID, or a hash of the request when the provider sends none; not the `whd_` id). |
|
|
71
71
|
|
|
72
72
|
A waiter can match up to five paths, and each value is a string, number or boolean. Paths are checked against the endpoint's event type at build time: an unknown field on a typed event, a path to an object, or a path without a namespace is a type error. The API refuses the same paths at create time.
|
|
73
73
|
|
|
@@ -96,7 +96,7 @@ if (result.ok) {
|
|
|
96
96
|
| Output field | Value |
|
|
97
97
|
| --- | --- |
|
|
98
98
|
| `event` | The verified event body, typed by the endpoint's source. |
|
|
99
|
-
| `headers` | The request headers,
|
|
99
|
+
| `headers` | The request headers, without `authorization`, cookie or shared-secret headers. Headers your `match` uses are always kept; the rest are capped at 4 KB. |
|
|
100
100
|
| `deliveryId` | The delivery that resumed the run (`whd_...`). |
|
|
101
101
|
| `endpoint` | The endpoint the delivery arrived on. |
|
|
102
102
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Webhook tasks"
|
|
3
|
+
sidebarTitle: "Webhook tasks"
|
|
4
|
+
description: "What a webhook() handler receives, the task options it takes, how to group deliveries per customer, and the options an endpoint takes."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**A webhook task is a [task](/tasks/overview) with an endpoint attached: `webhook()` starts a task run for each delivery that passes its [filter](/webhooks/filters).** If an attempt fails, the run retries and calls `onEvent` again, so keep its side effects safe to repeat.
|
|
8
|
+
|
|
9
|
+
## Handler arguments
|
|
10
|
+
|
|
11
|
+
`onEvent` receives:
|
|
12
|
+
|
|
13
|
+
| Argument | Value |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| `event` | The verified request body, parsed as JSON. Its TypeScript type comes from the [source](/webhooks/verification#typing-the-event). |
|
|
16
|
+
| `headers` | Request headers as a Web `Headers` object, with case-insensitive `get()` and `has()` methods. `authorization`, `proxy-authorization`, `cookie`, `set-cookie` and shared-secret headers are removed; other headers, including signature headers such as `stripe-signature`, share a 4 KB budget, so a large set of headers can drop some. Headers a live waiter matches on are always kept. |
|
|
17
|
+
| `endpoint` | The endpoint the delivery arrived on: `id`, `declaredId`, `tenantId`, `externalRef`, and the `metadata` you declared. |
|
|
18
|
+
| `ctx` | The same [run context](/context) that regular tasks receive. |
|
|
19
|
+
|
|
20
|
+
## Task options
|
|
21
|
+
|
|
22
|
+
`webhook()` also takes the options a [task](/tasks/overview) does, such as `queue`, `concurrency`, `machine`, `retry`, `maxDuration` and the lifecycle hooks. For example, to handle one delivery at a time:
|
|
23
|
+
|
|
24
|
+
```ts /trigger/stripe-orders.ts
|
|
25
|
+
import { webhook, webhooks } from "@trigger.dev/sdk";
|
|
26
|
+
|
|
27
|
+
export const stripe = webhooks.endpoint.define({ id: "stripe", source: webhooks.stripe() });
|
|
28
|
+
|
|
29
|
+
export const orders = webhook({
|
|
30
|
+
id: "stripe-orders",
|
|
31
|
+
endpoint: stripe,
|
|
32
|
+
queue: { concurrencyLimit: 1 },
|
|
33
|
+
retry: { maxAttempts: 5 },
|
|
34
|
+
onEvent: async ({ event }) => {
|
|
35
|
+
// ...
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Group deliveries per customer
|
|
41
|
+
|
|
42
|
+
The limit covers every delivery the task handles. To group each customer's events while different customers run in parallel, route them to an agent with [session routing](/webhooks/session-routing): deliveries with the same key land in one session and are handled one at a time. A retried delivery can reach the session after a later one, so don't rely on arrival order.
|
|
43
|
+
|
|
44
|
+
## Endpoint options
|
|
45
|
+
|
|
46
|
+
`webhooks.endpoint.define` also takes a `description` and `metadata`. The metadata is passed to every subscriber as `endpoint.metadata`. The endpoint `id` can't start with `wh_`, which is reserved for the ids Trigger.dev generates.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trigger.dev/sdk",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.7",
|
|
4
4
|
"description": "trigger.dev Node.JS SDK",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"dependencies": {
|
|
78
78
|
"@opentelemetry/api": "1.9.1",
|
|
79
79
|
"@opentelemetry/semantic-conventions": "1.41.1",
|
|
80
|
-
"@trigger.dev/core": "4.8.
|
|
80
|
+
"@trigger.dev/core": "4.8.7",
|
|
81
81
|
"uncrypto": "^0.1.3"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"@opentelemetry/sdk-trace-base": "2.8.0",
|
|
88
88
|
"@types/react": "^19.2.14",
|
|
89
89
|
"ai": "^6.0.116",
|
|
90
|
-
"ai-v7": "npm:ai@7.0.
|
|
90
|
+
"ai-v7": "npm:ai@7.0.134",
|
|
91
91
|
"rimraf": "^6.0.1",
|
|
92
92
|
"stripe": "23.0.0",
|
|
93
93
|
"tshy": "^4.1.3",
|
|
@@ -240,8 +240,7 @@
|
|
|
240
240
|
"build": "tshy && pnpm run update-version && pnpm run bundle-docs",
|
|
241
241
|
"bundle-docs": "tsx ../../scripts/bundleSdkDocs.ts",
|
|
242
242
|
"dev": "tshy --watch",
|
|
243
|
-
"typecheck": "tsc --noEmit",
|
|
244
|
-
"typecheck:ai-v7": "tsc --noEmit -p tsconfig.ai-v7.json",
|
|
243
|
+
"typecheck": "tsc --noEmit && node scripts/typecheck-ai-majors.mjs",
|
|
245
244
|
"test": "vitest",
|
|
246
245
|
"update-version": "tsx ../../scripts/updateVersion.ts",
|
|
247
246
|
"check-exports": "attw --pack ."
|