diff --git a/.changeset/batch-trigger-by-task-handle-type.md b/.changeset/batch-trigger-by-task-handle-type.md deleted file mode 100644 index 1e25ca83f12..00000000000 --- a/.changeset/batch-trigger-by-task-handle-type.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@trigger.dev/core": patch -"@trigger.dev/sdk": patch ---- - -Fix the type of the handle returned by `batch.triggerByTask()`. It promised `runs`, `isCached` and `idempotencyKey`, which were never returned, so code like `results.runs[0]` compiled but threw at runtime. The handle is now typed as what it returns: `batchId`, `runCount` and `publicAccessToken`; use `batch.retrieve(batchId)` to get the run IDs, or `batch.triggerByTaskAndWait()` for typed results. diff --git a/.changeset/buffered-run-retrieve-window.md b/.changeset/buffered-run-retrieve-window.md deleted file mode 100644 index 1be88580c01..00000000000 --- a/.changeset/buffered-run-retrieve-window.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@trigger.dev/core": patch ---- - -`runs.retrieve()` returns a `buffer` field on a buffered task's run: its buffer key, how many items it collected, and when and why its window closed. diff --git a/.changeset/buffered-tasks-preview.md b/.changeset/buffered-tasks-preview.md deleted file mode 100644 index ed8c929badc..00000000000 --- a/.changeset/buffered-tasks-preview.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -"@trigger.dev/sdk": patch -"@trigger.dev/core": patch ---- - -Add buffered tasks to `@trigger.dev/sdk/preview`: a task that collects triggers over a time or count window and runs once with the array of payloads. They're in preview and need to be enabled for your organization. Run tokens can buffer items too. - -```ts -import { buffer } from "@trigger.dev/sdk/preview"; -import { z } from "zod"; - -export const embedItems = buffer.task({ - id: "embed-items", - schema: z.object({ id: z.string() }), - buffer: { maxItems: 100, maxDelay: "10s" }, - run: async (items) => { - // one run per window, with every item it collected - }, -}); - -await embedItems.trigger({ id: "item_1" }); -``` diff --git a/.changeset/chat-agent-cursorless-session-out.md b/.changeset/chat-agent-cursorless-session-out.md deleted file mode 100644 index cdb530c5b8b..00000000000 --- a/.changeset/chat-agent-cursorless-session-out.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@trigger.dev/sdk": patch -"@trigger.dev/core": patch ---- - -Fix `AgentChat` returning another turn's reply, or several replies joined together, instead of the answer to the message you sent: for example when continuing a chat without a saved `lastEventId`, sending two messages in a row, or when a run answers earlier messages first. Agents now mark where each turn starts and where steered messages join one on the output stream, so redeploy them on this version; with an older agent, a reply `AgentChat` can't match to your message is delivered when its turn completes instead of streamed. Custom readers of the session output stream must skip control records they don't recognise. A send aborted before its stream starts now asks the agent to stop. diff --git a/.changeset/chat-agent-head-start-tool-approval.md b/.changeset/chat-agent-head-start-tool-approval.md deleted file mode 100644 index 8a67c8aa29f..00000000000 --- a/.changeset/chat-agent-head-start-tool-approval.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@trigger.dev/sdk": patch ---- - -On a Head Start first turn, `chat.agent` now asks the user before running a tool that needs approval, instead of running it as soon as the agent takes over. Redeploy the agent to get the fix; the route needs no change. If `run` calls `streamText` again with the handed-over messages and a tool that needs approval, that call now throws: pass the first call's response messages instead. diff --git a/.changeset/chat-agent-renew-tokens-through-access-token.md b/.changeset/chat-agent-renew-tokens-through-access-token.md deleted file mode 100644 index 55803c4e445..00000000000 --- a/.changeset/chat-agent-renew-tokens-through-access-token.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@trigger.dev/sdk": patch -"@trigger.dev/core": patch ---- - -`TriggerChatTransport` now renews its session token only through your `accessToken` callback, so make it return a freshly minted token from your server. The `publicAccessToken` option of `chat.writeTurnComplete` is deprecated and ignored. diff --git a/.changeset/chat-agent-skills-sonnet-5-5.md b/.changeset/chat-agent-skills-sonnet-5-5.md deleted file mode 100644 index 0689ba0861a..00000000000 --- a/.changeset/chat-agent-skills-sonnet-5-5.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@trigger.dev/sdk": patch ---- - -The bundled chat agent skills now use `claude-sonnet-5-5` in their examples. They used `claude-sonnet-4-5`, which Anthropic retires on November 30, 2026, so agents following the skills would have generated code that stops working. diff --git a/.changeset/chat-agent-turn-handover.md b/.changeset/chat-agent-turn-handover.md deleted file mode 100644 index 88f2cf87845..00000000000 --- a/.changeset/chat-agent-turn-handover.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@trigger.dev/sdk": minor -"@trigger.dev/core": minor ---- - -Add `versionSkew: "follow-mid-turn"` to `chat.agent` and `chat.createSession`. It does everything `"follow"` does, and also moves a turn that is still running when its version is below the skew protection threshold: the turn finishes the step it is on, and a run on the current deployment continues the same reply from the next step, so no step runs twice and the person chatting sees one reply. `chat.handOverAtStep(step)` does the same from your own `prepareStep`. `chat.requestUpgrade()` called during a turn now moves the turn at the next step boundary instead of waiting for the turn to end. A turn is handed over only when the agent in the current deployment was built with this release or later; otherwise the turn finishes on its own version. If the API can't be reached during a handover, the old run keeps trying to start the next run for about three minutes, and a run that continues a chat while the API can't be reached waits for it rather than answer a message again. diff --git a/.changeset/chat-channel-reply-last-text.md b/.changeset/chat-channel-reply-last-text.md deleted file mode 100644 index e1eb8c97c19..00000000000 --- a/.changeset/chat-channel-reply-last-text.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@trigger.dev/sdk": patch ---- - -A `chat.agent` channel's final reply is now the turn's last non-empty run of text (tool calls split the text into runs), instead of every step's text joined together. Notes the model wrote before its tool calls no longer end up in the posted reply, unless nothing follows the last tool call, in which case the text just before it is posted. `reply.message` still has every part. diff --git a/.changeset/chat-custom-agent-head-start-tool-approval.md b/.changeset/chat-custom-agent-head-start-tool-approval.md deleted file mode 100644 index b489ae50e8e..00000000000 --- a/.changeset/chat-custom-agent-head-start-tool-approval.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@trigger.dev/sdk": patch ---- - -`chat.customAgent` and `chat.createSession` loops can now hold Head Start tool calls that need approval: pass the `tools` (and AI SDK 7's `toolApproval`) you give your `streamText` to `consumeHandover`, `chat.createSession` or `applyHandover`. `chat.createSession` now also continues the same assistant message when the client answers a tool call, as `chat.agent` does, so save replies by message id. diff --git a/.changeset/chat-transport-cursorless-replay.md b/.changeset/chat-transport-cursorless-replay.md deleted file mode 100644 index 2fa448b7798..00000000000 --- a/.changeset/chat-transport-cursorless-replay.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@trigger.dev/sdk": patch ---- - -`TriggerChatTransport` no longer replays the previous answer when a chat is sent to or reconnected without a saved `lastEventId`, for example after a page reload that doesn't restore it. Only the current turn's answer reaches the UI, and a reload mid-answer resumes it live. With older agents that write no turn markers, the answer can arrive when its turn completes rather than streaming, and with the oldest, which record no input cursor, a send made while the agent is idle can still get the previous answer. diff --git a/.changeset/chat-transport-rejoin-after-remount.md b/.changeset/chat-transport-rejoin-after-remount.md deleted file mode 100644 index 5885fb053c1..00000000000 --- a/.changeset/chat-transport-rejoin-after-remount.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@trigger.dev/sdk": patch ---- - -With AI SDK 7's `useChat({ resume: true })`, a chat that remounts while a reply is still streaming (for example under React StrictMode in development) now rejoins the reply from its start instead of showing nothing until the next message. diff --git a/.changeset/chat-transport-send-after-unfinished-reply.md b/.changeset/chat-transport-send-after-unfinished-reply.md deleted file mode 100644 index 6507e645adf..00000000000 --- a/.changeset/chat-transport-send-after-unfinished-reply.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@trigger.dev/sdk": patch ---- - -A chat message sent while an earlier reply is still running, for example after Stop on a reply resumed after a reload, now gets only its own answer instead of the rest of that reply and an error. diff --git a/.changeset/cli-zod-4-6-7.md b/.changeset/cli-zod-4-6-7.md deleted file mode 100644 index 0628a60072e..00000000000 --- a/.changeset/cli-zod-4-6-7.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"trigger.dev": patch ---- - -Upgrade the CLI's `zod` dependency to 4.6.7. diff --git a/.changeset/fix-bun-worker-node-env.md b/.changeset/fix-bun-worker-node-env.md deleted file mode 100644 index 9747cd0e3df..00000000000 --- a/.changeset/fix-bun-worker-node-env.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"trigger.dev": patch ---- - -Deployed Bun 1.4 tasks now see `NODE_ENV=production` when bytecode compilation is enabled. diff --git a/.changeset/mcp-cli-tool-usage.md b/.changeset/mcp-cli-tool-usage.md deleted file mode 100644 index ca59dd208fb..00000000000 --- a/.changeset/mcp-cli-tool-usage.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"trigger.dev": patch ---- - -When you use Trigger.dev Cloud, the CLI and its MCP server now report usage analytics tied to your logged-in account: which commands run and which MCP tools are called, never the arguments you pass. Nothing is reported for self-hosted or local instances. Turn it off with `--skip-telemetry` or the `TRIGGER_TELEMETRY_DISABLED` environment variable. diff --git a/.changeset/mcp-list-runs-before.md b/.changeset/mcp-list-runs-before.md deleted file mode 100644 index d524321f505..00000000000 --- a/.changeset/mcp-list-runs-before.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"trigger.dev": patch ---- - -The MCP server's `list_runs` tool now accepts `before` to list the page before a given cursor, using the previous cursor it shows. diff --git a/.changeset/mcp-profile-flag-precedence.md b/.changeset/mcp-profile-flag-precedence.md deleted file mode 100644 index 104cddb6f1d..00000000000 --- a/.changeset/mcp-profile-flag-precedence.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"trigger.dev": patch ---- - -`trigger mcp --profile ` now takes precedence over the profile saved in the project's `.trigger/mcp.json`. Run traces are kept in memory and are no longer written to disk. `--log-file` now gets stricter ownership and file-type checks; if the file fails them or cannot be written, logging is skipped and the server keeps running. diff --git a/.changeset/mcp-trigger-task-options.md b/.changeset/mcp-trigger-task-options.md deleted file mode 100644 index 235da09bd50..00000000000 --- a/.changeset/mcp-trigger-task-options.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"trigger.dev": patch ---- - -The MCP server's `trigger_task` tool now accepts `metadata`, `idempotencyKeyTTL`, `concurrencyKey`, `concurrency`, `debounce`, `lockToVersion` and `priority`, matching the options you can pass when triggering from the SDK or the dashboard. Calls without them behave as before. - -`trigger_task` no longer sets a 10 minute ttl on its own when you pass any option, including existing ones such as `tags`. A run now gets the ttl you pass, otherwise the task's ttl, otherwise 10 minutes in dev and the server's maximum ttl elsewhere (14 days on Trigger.dev Cloud; no expiry on a self-hosted server without one), and a ttl longer than the server's maximum is capped at it. Pass `ttl: "10m"` to keep the old behaviour. diff --git a/.changeset/metadata-flush-in-flight.md b/.changeset/metadata-flush-in-flight.md deleted file mode 100644 index 17f739a1168..00000000000 --- a/.changeset/metadata-flush-in-flight.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@trigger.dev/core": patch ---- - -Fix run metadata changes sometimes reaching the API only when the run finished, so realtime subscribers and parent runs didn't see progress while the task was still running. This also fixes a metadata `append` or `increment` occasionally being applied twice at the end of a run, and a new run that reused the previous run's process sometimes seeing that run's metadata values. diff --git a/.changeset/named-machine-warm-starts.md b/.changeset/named-machine-warm-starts.md deleted file mode 100644 index 6afa0a87c3f..00000000000 --- a/.changeset/named-machine-warm-starts.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@trigger.dev/core": patch -"trigger.dev": patch ---- - -Runs on a named machine (`machine()`) can warm start again. A runner on a machine's image now only takes runs for that same machine, so warm starts no longer have to be turned off for those runs. diff --git a/.changeset/named-machines.md b/.changeset/named-machines.md deleted file mode 100644 index c0c37df150d..00000000000 --- a/.changeset/named-machines.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@trigger.dev/sdk": patch -"@trigger.dev/core": patch -"trigger.dev": patch ---- - -Use `machine()` from `@trigger.dev/sdk/preview` to give tasks their own image and default preset. Add apt packages or Containerfile instructions to customize the project image. Pass the result as the task's `machine` option to build its image at deploy time. Available only to early testers. diff --git a/.changeset/pin-jwt-algorithm.md b/.changeset/pin-jwt-algorithm.md deleted file mode 100644 index 97806656715..00000000000 --- a/.changeset/pin-jwt-algorithm.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@trigger.dev/core": patch ---- - -JWT validation now accepts only HS256, the algorithm Trigger.dev tokens are signed with. diff --git a/.changeset/restore-resume-without-poll.md b/.changeset/restore-resume-without-poll.md deleted file mode 100644 index c97432aaccf..00000000000 --- a/.changeset/restore-resume-without-poll.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"trigger.dev": patch -"@trigger.dev/core": patch ---- - -Resume a deployed task as soon as its run is restored after a wait. A run that was suspended during a wait (`wait.for`, `triggerAndWait`, a waitpoint token or session input) could take up to 5 seconds longer than needed to continue, and the waits it finished after that, or a cancellation, could reach the task with the same delay. diff --git a/.changeset/sandbox-network.md b/.changeset/sandbox-network.md deleted file mode 100644 index 0e97f1d8f64..00000000000 --- a/.changeset/sandbox-network.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@trigger.dev/sdk": patch -"@trigger.dev/core": patch ---- - -Sandbox tasks restrict outbound network access by default. `sandbox.network` accepts `"restricted"` (Trigger.dev's services and the allowed domains of granted Vault variables only), `{ allow: ["api.example.com", "*.example.com"] }` to also allow HTTPS to those hosts, or `"unrestricted"`. Restricted sandboxes can only make outbound connections on port 443; a blocked HTTPS request gets a `403` with an `x-trigger-network-denied` header. diff --git a/.changeset/sdk-preview-entry.md b/.changeset/sdk-preview-entry.md deleted file mode 100644 index 493175f2ff2..00000000000 --- a/.changeset/sdk-preview-entry.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@trigger.dev/sdk": minor -"@trigger.dev/core": patch ---- - -Add `@trigger.dev/sdk/preview` for features in preview. Adds sandboxed task runs and multiple machine configs as preview features, available only to early testers. diff --git a/.changeset/task-sandbox-options.md b/.changeset/task-sandbox-options.md deleted file mode 100644 index 2d04f382069..00000000000 --- a/.changeset/task-sandbox-options.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@trigger.dev/sdk": patch -"@trigger.dev/core": patch ---- - -Use `sandbox: true` to run a deployed task with access limited to its own payload and output. Configure `sandbox.envVars` and `sandbox.scopes` to grant environment variables or additional permissions, including the `basic` and `oidc` presets. `basic` lets a sandbox inspect and manage its own run (including metadata and tags), and exchange messages with its attached Session, including waiting for input. Upgrade the SDK, CLI, and (when self-hosting) server before adopting this option. `trigger dev` still runs locally with development credentials and is not an isolation boundary. diff --git a/.changeset/unstable-signals.md b/.changeset/unstable-signals.md deleted file mode 100644 index 60911362434..00000000000 --- a/.changeset/unstable-signals.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@trigger.dev/sdk": patch -"@trigger.dev/core": patch -"trigger.dev": patch ---- - -Add `unstable_signals`: send a small message to every executing run in an environment that listens for its name, with `unstable_signals.send(name, payload)`, listen inside a task with `unstable_signals.on(name, handler)`, read the current latest once with `unstable_signals.latest(name)`, and forget the latest with `unstable_signals.clear(name)`. A run that starts listening receives the latest signal of that name first. Unstable: names and behavior may change. diff --git a/.server-changes/admins-can-invite-members.md b/.server-changes/admins-can-invite-members.md deleted file mode 100644 index 6d2e3f2d77b..00000000000 --- a/.server-changes/admins-can-invite-members.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: improvement ---- - -Admins can now invite team members, revoke pending invites and resend the ones they sent, but can't invite Owners. Only Owners can remove members or change roles. diff --git a/.server-changes/api-key-task-picker-keeps-search.md b/.server-changes/api-key-task-picker-keeps-search.md deleted file mode 100644 index a41bd78a56f..00000000000 --- a/.server-changes/api-key-task-picker-keeps-search.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -Picking tasks for an API key no longer clears your search after each pick, so you can select several matching tasks in a row. diff --git a/.server-changes/api-run-empty-string-payload.md b/.server-changes/api-run-empty-string-payload.md deleted file mode 100644 index d70613476c1..00000000000 --- a/.server-changes/api-run-empty-string-payload.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -Retrieving a run whose payload or output is an empty string now returns that empty string instead of omitting the field. diff --git a/.server-changes/ask-trigger-copy-message.md b/.server-changes/ask-trigger-copy-message.md deleted file mode 100644 index 7f6119e2ef7..00000000000 --- a/.server-changes/ask-trigger-copy-message.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: feature ---- - -Copy the agent's replies in the Ask Trigger chat and the AI reply on the Query page with a copy icon. diff --git a/.server-changes/ask-trigger-log-search.md b/.server-changes/ask-trigger-log-search.md deleted file mode 100644 index 11fa01c85ed..00000000000 --- a/.server-changes/ask-trigger-log-search.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: feature ---- - -Ask Trigger can now search your environment's logs by message, level, task, run, or time range when the Logs page is available. diff --git a/.server-changes/audit-log-inspector-panel.md b/.server-changes/audit-log-inspector-panel.md deleted file mode 100644 index 9a0a7af14e1..00000000000 --- a/.server-changes/audit-log-inspector-panel.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: improvement ---- - -The audit log event panel now uses the same inspector layout as the run page. diff --git a/.server-changes/dev-branch-env-inheritance.md b/.server-changes/dev-branch-env-inheritance.md deleted file mode 100644 index f914dd90410..00000000000 --- a/.server-changes/dev-branch-env-inheritance.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -Dev branch runs inherit environment variables from their parent Development environment unless the branch overrides them. diff --git a/.server-changes/dev-finished-run-after-sleep.md b/.server-changes/dev-finished-run-after-sleep.md deleted file mode 100644 index 9acac84e68c..00000000000 --- a/.server-changes/dev-finished-run-after-sleep.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -Fix `trigger dev` keeping a run's task process alive and retrying forever when the run finished while your computer was asleep for a long time. The CLI now sees the run has finished and stops it. diff --git a/.server-changes/docs-project-ref.md b/.server-changes/docs-project-ref.md deleted file mode 100644 index b2d29633def..00000000000 --- a/.server-changes/docs-project-ref.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: improvement ---- - -The project menu in the side bar shows the project ref and copies it on click, and the Agents card on the Tasks overview links to the AI agents docs. diff --git a/.server-changes/env-var-secret-by-default.md b/.server-changes/env-var-secret-by-default.md deleted file mode 100644 index 9a291fe3d43..00000000000 --- a/.server-changes/env-var-secret-by-default.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: improvement ---- - -The New environment variable dialog now starts with "Secret value" on. Turn it off to create a variable whose value stays viewable; replacing existing values keeps each one's setting unless you change the switch. diff --git a/.server-changes/faster-session-start.md b/.server-changes/faster-session-start.md deleted file mode 100644 index 5be414682bf..00000000000 --- a/.server-changes/faster-session-start.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -Starting a new chat session is faster again. diff --git a/.server-changes/github-app-key-escaped-newlines.md b/.server-changes/github-app-key-escaped-newlines.md deleted file mode 100644 index ba2c48a7c93..00000000000 --- a/.server-changes/github-app-key-escaped-newlines.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: improvement ---- - -Accept `GITHUB_APP_PRIVATE_KEY` with escaped `\n` line breaks, so the key can be set as a single-line environment variable. diff --git a/.server-changes/long-env-var-key-overflow.md b/.server-changes/long-env-var-key-overflow.md deleted file mode 100644 index bbb748a9748..00000000000 --- a/.server-changes/long-env-var-key-overflow.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -New environment variable names created through the dashboard or API are limited to 256 characters. diff --git a/.server-changes/mcp-agent-chat-binding-reserved.md b/.server-changes/mcp-agent-chat-binding-reserved.md deleted file mode 100644 index f3283fceeda..00000000000 --- a/.server-changes/mcp-agent-chat-binding-reserved.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -Session metadata updates now keep the `mcpBinding` key that MCP agent chats use. Creating or updating a session with metadata that sets or changes that key returns a 422 error. diff --git a/.server-changes/mcp-alert-current-reading.md b/.server-changes/mcp-alert-current-reading.md deleted file mode 100644 index 2370337d69f..00000000000 --- a/.server-changes/mcp-alert-current-reading.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: improvement ---- - -The remote MCP server's alert details now show the alert's current value next to its threshold, and its alert channel list shows each channel's latest monitoring alert delivery. diff --git a/.server-changes/mcp-batch-trigger-tool.md b/.server-changes/mcp-batch-trigger-tool.md deleted file mode 100644 index 0a7e1218e6c..00000000000 --- a/.server-changes/mcp-batch-trigger-tool.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: feature ---- - -The MCP server can now trigger a batch of up to 20 runs in one call, after you approve every item. diff --git a/.server-changes/mcp-batch-waitpoint-tools.md b/.server-changes/mcp-batch-waitpoint-tools.md deleted file mode 100644 index 9598bef0b58..00000000000 --- a/.server-changes/mcp-batch-waitpoint-tools.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: feature ---- - -The remote MCP server can now list batches and show a batch with the runs recorded on it (each run's status and error need run read access), list waitpoint tokens and show one with the runs that waited on it, and, after you confirm, complete a token with output, time it out, or skip a wait. diff --git a/.server-changes/mcp-confirm-page-labels-preview-branches.md b/.server-changes/mcp-confirm-page-labels-preview-branches.md deleted file mode 100644 index e80d37b312e..00000000000 --- a/.server-changes/mcp-confirm-page-labels-preview-branches.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -The MCP write-confirmation page now shows the environment type and labels preview branches, so a branch named "prod" can't pass for production. diff --git a/.server-changes/mcp-confirm-preview-invisible-characters.md b/.server-changes/mcp-confirm-preview-invisible-characters.md deleted file mode 100644 index b9262b3f011..00000000000 --- a/.server-changes/mcp-confirm-preview-invisible-characters.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -MCP approval pages now show invisible characters and text-reordering control characters as visible escapes. A confirmation requested before this release keeps its original preview until it expires, at most 10 minutes later. diff --git a/.server-changes/mcp-dashboard-query-tools.md b/.server-changes/mcp-dashboard-query-tools.md deleted file mode 100644 index efffd7d0b2b..00000000000 --- a/.server-changes/mcp-dashboard-query-tools.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: feature ---- - -The remote MCP server can now read a custom dashboard in full, edit one of its widgets, rename it or change its description, and delete it. It can also list the Query page's recent queries, browse the model catalogue and your model usage, show a prompt with the version a label resolves to, and list a prompt's generations. diff --git a/.server-changes/mcp-deployment-branch-refusals.md b/.server-changes/mcp-deployment-branch-refusals.md deleted file mode 100644 index bbe1ee4ab50..00000000000 --- a/.server-changes/mcp-deployment-branch-refusals.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -The MCP promote and rollback deployment tools now say when a preview branch is archived or unknown instead of answering "Not authorized". The cancel deployment tool can still cancel an in-flight deployment of an archived preview branch, like the dashboard. diff --git a/.server-changes/mcp-deployment-tools.md b/.server-changes/mcp-deployment-tools.md deleted file mode 100644 index b66b41ee6f1..00000000000 --- a/.server-changes/mcp-deployment-tools.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -area: webapp -type: feature ---- - -The remote MCP server can now show one deployment's details and one agent's details and activity, and its `trigger_task` tool accepts metadata, a concurrency key, named concurrency limits, debounce, a version to run on, priority and an idempotency key lifetime. - -Triggering a task through the API or SDK with a very long idempotency key lifetime no longer fails; the key gets the default lifetime instead. diff --git a/.server-changes/mcp-environment-tools.md b/.server-changes/mcp-environment-tools.md deleted file mode 100644 index affddfebce6..00000000000 --- a/.server-changes/mcp-environment-tools.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: feature ---- - -The remote MCP server can now list a project's environments, branches and regions, promote, roll back or cancel a deployment, create or archive a branch, set automatic archiving of preview branches, and change the project's default region. diff --git a/.server-changes/mcp-envvar-names-tool.md b/.server-changes/mcp-envvar-names-tool.md deleted file mode 100644 index e042449b4f2..00000000000 --- a/.server-changes/mcp-envvar-names-tool.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: feature ---- - -AI agents connected to the MCP server can now see which environment variables are set in each environment, and which are missing, without ever seeing their values. diff --git a/.server-changes/mcp-error-tools.md b/.server-changes/mcp-error-tools.md deleted file mode 100644 index 80653e70e96..00000000000 --- a/.server-changes/mcp-error-tools.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: feature ---- - -The remote MCP server can now list error groups, show one error group with its recent failed runs, and resolve, ignore or unresolve an error group after you confirm. diff --git a/.server-changes/mcp-fence-customer-text.md b/.server-changes/mcp-fence-customer-text.md deleted file mode 100644 index 1adc3c32826..00000000000 --- a/.server-changes/mcp-fence-customer-text.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -MCP tools now mark more of your project's own text, such as task names, query errors and webhook setup steps, as data for the AI client, and tell the client not to follow instructions found in it. Run details show at most 16,000 characters of a payload or output inline and say how much was cut. diff --git a/.server-changes/mcp-limits-regions-environments-scope.md b/.server-changes/mcp-limits-regions-environments-scope.md deleted file mode 100644 index 993786f902e..00000000000 --- a/.server-changes/mcp-limits-regions-environments-scope.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -The MCP `get_limits` and `list_regions` tools now require the `read:environments` scope instead of `read:projects`. Connections with the default scopes need no action; if yours lacks it, reconnect the client and request `read:environments`. diff --git a/.server-changes/mcp-oauth-redirect-allow-list.md b/.server-changes/mcp-oauth-redirect-allow-list.md deleted file mode 100644 index 24a357bdee9..00000000000 --- a/.server-changes/mcp-oauth-redirect-allow-list.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: improvement ---- - -MCP clients signing in from claude.ai or claude.com must use Claude's standard sign-in callback, and the consent page shows hidden characters in an app's name as visible escapes instead of applying them. diff --git a/.server-changes/mcp-plain-text-errors.md b/.server-changes/mcp-plain-text-errors.md deleted file mode 100644 index c2fb40d28ec..00000000000 --- a/.server-changes/mcp-plain-text-errors.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: improvement ---- - -MCP tool errors are now plain text that names what went wrong and what to do next, instead of a raw JSON body. diff --git a/.server-changes/mcp-playground-conversation-delete.md b/.server-changes/mcp-playground-conversation-delete.md deleted file mode 100644 index c29c4764ccf..00000000000 --- a/.server-changes/mcp-playground-conversation-delete.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: feature ---- - -The remote MCP server can now delete one of your playground conversations after you confirm it. diff --git a/.server-changes/mcp-project-delete-schema.md b/.server-changes/mcp-project-delete-schema.md deleted file mode 100644 index f271463f96f..00000000000 --- a/.server-changes/mcp-project-delete-schema.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -Deleting a project through the remote MCP server no longer fails on installations whose database uses a non-default schema. diff --git a/.server-changes/mcp-project-rename-delete.md b/.server-changes/mcp-project-rename-delete.md deleted file mode 100644 index 8fa3947ce73..00000000000 --- a/.server-changes/mcp-project-rename-delete.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: feature ---- - -The remote MCP server can now rename and delete a project after you confirm. The delete confirmation shows what the project still has, such as environments, schedules and queued runs, and a deleted project cannot be restored. diff --git a/.server-changes/mcp-prompt-render.md b/.server-changes/mcp-prompt-render.md deleted file mode 100644 index 0fc7984da63..00000000000 --- a/.server-changes/mcp-prompt-render.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: feature ---- - -The remote MCP server's `get_prompt` tool can now render a prompt version with variables, the same way resolving the prompt through the API does. diff --git a/.server-changes/mcp-queue-tools.md b/.server-changes/mcp-queue-tools.md deleted file mode 100644 index 7f4c5c6e74a..00000000000 --- a/.server-changes/mcp-queue-tools.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: feature ---- - -The remote MCP server can now list queues with their delays and backlog, show a queue's concurrency keys, report an environment's concurrency and its limits, pause, resume, override or reset a queue's concurrency, archive or unarchive a queue, and pause or resume a whole environment. diff --git a/.server-changes/mcp-redeploy-deployment.md b/.server-changes/mcp-redeploy-deployment.md deleted file mode 100644 index c3447b2e5aa..00000000000 --- a/.server-changes/mcp-redeploy-deployment.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: feature ---- - -The remote MCP server can now, after you confirm, redeploy a finished deployment (like Redeploy on the Deployments page) and deploy the branch tracked for an environment from the connected GitHub repository (like Deploy now). diff --git a/.server-changes/mcp-replay-run-to-environment.md b/.server-changes/mcp-replay-run-to-environment.md deleted file mode 100644 index 4ebef15bacd..00000000000 --- a/.server-changes/mcp-replay-run-to-environment.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: feature ---- - -The remote MCP server can now, after you confirm, replay a run into another environment of the same project, like the replay dialog in the dashboard. diff --git a/.server-changes/mcp-resolve-alert-environment-scope.md b/.server-changes/mcp-resolve-alert-environment-scope.md deleted file mode 100644 index 0ac11a6f3ac..00000000000 --- a/.server-changes/mcp-resolve-alert-environment-scope.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -Resolving a monitoring alert through the remote MCP server now only affects alerts in the environment you chose. diff --git a/.server-changes/mcp-run-details-empty-payload-status.md b/.server-changes/mcp-run-details-empty-payload-status.md deleted file mode 100644 index c70fb1f2535..00000000000 --- a/.server-changes/mcp-run-details-empty-payload-status.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -The remote MCP server now shows a run's empty-string payload or output instead of hiding it, and shows a batch's runs with the same status names as run details. diff --git a/.server-changes/mcp-run-log-download.md b/.server-changes/mcp-run-log-download.md deleted file mode 100644 index 502af5cb6d8..00000000000 --- a/.server-changes/mcp-run-log-download.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: feature ---- - -Agents connected to the remote MCP server can download a run's full log as a file, through a link that works for one minute. diff --git a/.server-changes/mcp-schedule-tools.md b/.server-changes/mcp-schedule-tools.md deleted file mode 100644 index 8b6a5783238..00000000000 --- a/.server-changes/mcp-schedule-tools.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: feature ---- - -The remote MCP server can now list an environment's tasks with their recent activity, list and show schedules, and create, update, activate, deactivate or delete a schedule after you confirm it. diff --git a/.server-changes/mcp-session-tools.md b/.server-changes/mcp-session-tools.md deleted file mode 100644 index f80d1472ee2..00000000000 --- a/.server-changes/mcp-session-tools.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: feature ---- - -The remote MCP server can now list sessions with the Sessions page filters, show a session with its runs and channels, read a session's saved conversation, and list your playground conversations with an agent. diff --git a/.server-changes/mcp-session-write-tools.md b/.server-changes/mcp-session-write-tools.md deleted file mode 100644 index 4c19e576d83..00000000000 --- a/.server-changes/mcp-session-write-tools.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: feature ---- - -The remote MCP server can now change a session's tags and metadata, and close a session, after you confirm it. diff --git a/.server-changes/mcp-strict-tool-arguments.md b/.server-changes/mcp-strict-tool-arguments.md deleted file mode 100644 index 3e5511e433c..00000000000 --- a/.server-changes/mcp-strict-tool-arguments.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: improvement ---- - -MCP tools now refuse arguments they don't know instead of ignoring them, and name the field the agent most likely meant. diff --git a/.server-changes/mcp-tool-extensions.md b/.server-changes/mcp-tool-extensions.md deleted file mode 100644 index 02c8d627954..00000000000 --- a/.server-changes/mcp-tool-extensions.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: feature ---- - -The remote MCP server's `list_runs` tool can now page backwards through runs. diff --git a/.server-changes/mcp-webhook-secret-preview-mask.md b/.server-changes/mcp-webhook-secret-preview-mask.md deleted file mode 100644 index 3f71183f5b8..00000000000 --- a/.server-changes/mcp-webhook-secret-preview-mask.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -When an AI assistant sets a webhook signing secret, the approval page now shows enough of it to check against your provider: the last characters and length of a secret, or the whole public key. diff --git a/.server-changes/member-role-on-rejoin.md b/.server-changes/member-role-on-rejoin.md deleted file mode 100644 index 3e4cadbc006..00000000000 --- a/.server-changes/member-role-on-rejoin.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -A removed member who rejoins no longer gets their old role back. Accepting an invite whose role is no longer available, for example after a plan change, now asks for a new invite instead of joining. diff --git a/.server-changes/org-access-mcp-confirmation.md b/.server-changes/org-access-mcp-confirmation.md deleted file mode 100644 index eedfbdee9d8..00000000000 --- a/.server-changes/org-access-mcp-confirmation.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: feature ---- - -Add an Access page to organization settings where owners and admins choose which MCP tools ask for confirmation before they change anything. diff --git a/.server-changes/org-access-page-remote-mcp-only.md b/.server-changes/org-access-page-remote-mcp-only.md deleted file mode 100644 index f1572255336..00000000000 --- a/.server-changes/org-access-page-remote-mcp-only.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -Show the organization Access page only when the remote MCP server is enabled; otherwise the menu item is hidden and the page redirects to the organization. diff --git a/.server-changes/project-delete-queue-cleanup-error.md b/.server-changes/project-delete-queue-cleanup-error.md deleted file mode 100644 index 25f17a7d739..00000000000 --- a/.server-changes/project-delete-queue-cleanup-error.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -Project and organization deletions now return a retryable error instead of hanging if queue cleanup fails. diff --git a/.server-changes/query-and-or-grouping.md b/.server-changes/query-and-or-grouping.md deleted file mode 100644 index 48a3f7831d5..00000000000 --- a/.server-changes/query-and-or-grouping.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -Fix queries, dashboards and alerts that combine AND and OR, which ignored brackets and operator precedence and could return the wrong rows. diff --git a/.server-changes/query-period-limit-per-table.md b/.server-changes/query-period-limit-per-table.md deleted file mode 100644 index 103a76d62d8..00000000000 --- a/.server-changes/query-period-limit-per-table.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -Queries now apply your plan's query period limit to every table of your data they read, and queries without a table, such as `SELECT 1`, now run. diff --git a/.server-changes/queue-concurrency-reset-retry.md b/.server-changes/queue-concurrency-reset-retry.md deleted file mode 100644 index 1030073e551..00000000000 --- a/.server-changes/queue-concurrency-reset-retry.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -If resetting a queue's concurrency override fails, the override now stays in place so you can retry the reset. diff --git a/.server-changes/quote-database-schema-name.md b/.server-changes/quote-database-schema-name.md deleted file mode 100644 index 6a3fa9b8aaf..00000000000 --- a/.server-changes/quote-database-schema-name.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -Self-hosted instances whose database schema name has capital letters or a hyphen no longer fail on some dashboard pages. diff --git a/.server-changes/redis-outage-fail-fast.md b/.server-changes/redis-outage-fail-fast.md deleted file mode 100644 index deec8b12252..00000000000 --- a/.server-changes/redis-outage-fail-fast.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: improvement ---- - -API requests no longer stall while the webapp's Redis is unavailable, and login attempts are refused rather than unlimited during that time. diff --git a/.server-changes/remote-mcp-per-organization.md b/.server-changes/remote-mcp-per-organization.md deleted file mode 100644 index 1d0da8724eb..00000000000 --- a/.server-changes/remote-mcp-per-organization.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: feature ---- - -Remote MCP can now be turned on for selected organizations, and self-hosted installs turn it on with the `hasRemoteMcp` feature flag. Organizations without it get a clear message from MCP tools and don't see the Access settings page. If you already run remote MCP with `MCP_SERVER_ENABLED`, turn on `hasRemoteMcp` globally or per organization after upgrading, or MCP tools will refuse organization calls. diff --git a/.server-changes/replay-large-payload-other-environment.md b/.server-changes/replay-large-payload-other-environment.md deleted file mode 100644 index 3f39b4d6eb9..00000000000 --- a/.server-changes/replay-large-payload-other-environment.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -Replaying a run with a large payload into a different environment now works. The new run used to fail because it couldn't find its payload. diff --git a/.server-changes/run-inspector-task-link.md b/.server-changes/run-inspector-task-link.md deleted file mode 100644 index f05572baa48..00000000000 --- a/.server-changes/run-inspector-task-link.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: improvement ---- - -The task name in the run inspector now opens the task's page instead of the runs list. diff --git a/.server-changes/scoped-public-token-packets.md b/.server-changes/scoped-public-token-packets.md deleted file mode 100644 index 4322fa4af67..00000000000 --- a/.server-changes/scoped-public-token-packets.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -Creating public tokens from scoped task credentials now requires permission to read stored payloads. diff --git a/.server-changes/session-out-turn-header.md b/.server-changes/session-out-turn-header.md deleted file mode 100644 index cb061b03340..00000000000 --- a/.server-changes/session-out-turn-header.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -Chat session streams no longer include a turn refresh token; clients renew session tokens through their own server, so a viewer given a fixed token stops when it expires. diff --git a/.server-changes/session-run-end-check-trim-tail.md b/.server-changes/session-run-end-check-trim-tail.md deleted file mode 100644 index 6591a2005c0..00000000000 --- a/.server-changes/session-run-end-check-trim-tail.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -Fix a chat message sent just as an agent run was ending occasionally going unanswered until the next message arrived. diff --git a/.server-changes/session-trace-tab.md b/.server-changes/session-trace-tab.md deleted file mode 100644 index a3d418e1ebf..00000000000 --- a/.server-changes/session-trace-tab.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: feature ---- - -Session pages have a Trace tab that shows every run of a session on one timeline, with zoom, live runs and search across runs. diff --git a/.server-changes/session-view-live-run-button.md b/.server-changes/session-view-live-run-button.md deleted file mode 100644 index 5d12aade650..00000000000 --- a/.server-changes/session-view-live-run-button.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: fix ---- - -The session Trace tab's "View live run" button now only shows when a run is running and the timeline isn't already zoomed to it. diff --git a/.server-changes/skew-protection-threshold.md b/.server-changes/skew-protection-threshold.md deleted file mode 100644 index dc30d8b33c2..00000000000 --- a/.server-changes/skew-protection-threshold.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: feature ---- - -Set a skew protection threshold from the new Session upgrades page, from an agent's page, or through the API, to move sessions on an older version to the current deployment the next time they're used. It can cover every session in the environment or one task's. It's a one-time cutoff: later deploys move nothing until you set it again, and rolling back below it clears it. diff --git a/.server-changes/span-properties-pretty-view.md b/.server-changes/span-properties-pretty-view.md deleted file mode 100644 index f71d1986498..00000000000 --- a/.server-changes/span-properties-pretty-view.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: improvement ---- - -Span properties now have a Pretty view. JSON stored as text, like webhook bodies, is unpacked into a tree you can open and close. Switch to Raw to see the original. diff --git a/.server-changes/test-page-payload-links.md b/.server-changes/test-page-payload-links.md deleted file mode 100644 index ecd32adf62f..00000000000 --- a/.server-changes/test-page-payload-links.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: feature ---- - -Links from the docs can open a task's Test page with an example payload already in the editor. If the task isn't in that environment yet, the Test page now says so and shows the command to run or deploy it. diff --git a/hosting/k8s/helm/Chart.yaml b/hosting/k8s/helm/Chart.yaml index f9e25726688..93b0ed7b129 100644 --- a/hosting/k8s/helm/Chart.yaml +++ b/hosting/k8s/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: trigger description: The official Trigger.dev Helm chart type: application -version: 4.8.10 -appVersion: v4.8.10 +version: 4.9.0 +appVersion: v4.9.0 home: https://trigger.dev sources: - https://github.com/triggerdotdev/trigger.dev diff --git a/packages/build/CHANGELOG.md b/packages/build/CHANGELOG.md index d940af4f104..9d1788a7bf7 100644 --- a/packages/build/CHANGELOG.md +++ b/packages/build/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/build +## 4.9.0 + +### Patch Changes + +- Updated dependencies: + - `@trigger.dev/core@4.9.0` + ## 4.8.10 ### Patch Changes diff --git a/packages/build/package.json b/packages/build/package.json index caf0d8f6d9f..5244ec98be2 100644 --- a/packages/build/package.json +++ b/packages/build/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/build", - "version": "4.8.10", + "version": "4.9.0", "description": "trigger.dev build extensions", "license": "MIT", "publishConfig": { @@ -82,7 +82,7 @@ }, "dependencies": { "@prisma/config": "^6.10.0", - "@trigger.dev/core": "workspace:4.8.10", + "@trigger.dev/core": "workspace:4.9.0", "mlly": "^1.7.1", "pkg-types": "^1.1.3", "tinyglobby": "^0.2.2", diff --git a/packages/cli-v3/CHANGELOG.md b/packages/cli-v3/CHANGELOG.md index a37d195d6f1..3c48099abbe 100644 --- a/packages/cli-v3/CHANGELOG.md +++ b/packages/cli-v3/CHANGELOG.md @@ -1,5 +1,26 @@ # trigger.dev +## 4.9.0 + +### Patch Changes + +- Upgrade the CLI's `zod` dependency to 4.6.7. ([`a093664ec1c4f07b2430b497eca1445630f33405`](https://github.com/triggerdotdev/trigger.dev/commit/a093664ec1c4f07b2430b497eca1445630f33405)) +- Deployed Bun 1.4 tasks now see `NODE_ENV=production` when bytecode compilation is enabled. ([#5164](https://github.com/triggerdotdev/trigger.dev/pull/5164)) +- When you use Trigger.dev Cloud, the CLI and its MCP server now report usage analytics tied to your logged-in account: which commands run and which MCP tools are called, never the arguments you pass. Nothing is reported for self-hosted or local instances. Turn it off with `--skip-telemetry` or the `TRIGGER_TELEMETRY_DISABLED` environment variable. ([`9cc017fff59ca645e313c69addfa6264715b38eb`](https://github.com/triggerdotdev/trigger.dev/commit/9cc017fff59ca645e313c69addfa6264715b38eb)) +- The MCP server's `list_runs` tool now accepts `before` to list the page before a given cursor, using the previous cursor it shows. ([`37efe87e254c2d2abba6674ecb201d71cb8943a2`](https://github.com/triggerdotdev/trigger.dev/commit/37efe87e254c2d2abba6674ecb201d71cb8943a2)) +- `trigger mcp --profile ` now takes precedence over the profile saved in the project's `.trigger/mcp.json`. Run traces are kept in memory and are no longer written to disk. `--log-file` now gets stricter ownership and file-type checks; if the file fails them or cannot be written, logging is skipped and the server keeps running. ([`5ef5b690b56ac17c7aab3edd63662a0eccc4febb`](https://github.com/triggerdotdev/trigger.dev/commit/5ef5b690b56ac17c7aab3edd63662a0eccc4febb)) +- The MCP server's `trigger_task` tool now accepts `metadata`, `idempotencyKeyTTL`, `concurrencyKey`, `concurrency`, `debounce`, `lockToVersion` and `priority`, matching the options you can pass when triggering from the SDK or the dashboard. Calls without them behave as before. ([`ea9405ed624126adb741eb3667c8f9a7b1219cb8`](https://github.com/triggerdotdev/trigger.dev/commit/ea9405ed624126adb741eb3667c8f9a7b1219cb8)) + + `trigger_task` no longer sets a 10 minute ttl on its own when you pass any option, including existing ones such as `tags`. A run now gets the ttl you pass, otherwise the task's ttl, otherwise 10 minutes in dev and the server's maximum ttl elsewhere (14 days on Trigger.dev Cloud; no expiry on a self-hosted server without one), and a ttl longer than the server's maximum is capped at it. Pass `ttl: "10m"` to keep the old behaviour. +- Runs on a named machine (`machine()`) can warm start again. A runner on a machine's image now only takes runs for that same machine, so warm starts no longer have to be turned off for those runs. ([`d719264aa33c44799deebcf678009a69f6cab0ff`](https://github.com/triggerdotdev/trigger.dev/commit/d719264aa33c44799deebcf678009a69f6cab0ff)) +- Use `machine()` from `@trigger.dev/sdk/preview` to give tasks their own image and default preset. Add apt packages or Containerfile instructions to customize the project image. Pass the result as the task's `machine` option to build its image at deploy time. Available only to early testers. ([`cef33425c683fbd21992996739bea36fdc4040b5`](https://github.com/triggerdotdev/trigger.dev/commit/cef33425c683fbd21992996739bea36fdc4040b5)) +- Resume a deployed task as soon as its run is restored after a wait. A run that was suspended during a wait (`wait.for`, `triggerAndWait`, a waitpoint token or session input) could take up to 5 seconds longer than needed to continue, and the waits it finished after that, or a cancellation, could reach the task with the same delay. ([`27b8200f5d977f9d3a3a78822772c0afdbe2d5a9`](https://github.com/triggerdotdev/trigger.dev/commit/27b8200f5d977f9d3a3a78822772c0afdbe2d5a9)) +- Add `unstable_signals`: send a small message to every executing run in an environment that listens for its name, with `unstable_signals.send(name, payload)`, listen inside a task with `unstable_signals.on(name, handler)`, read the current latest once with `unstable_signals.latest(name)`, and forget the latest with `unstable_signals.clear(name)`. A run that starts listening receives the latest signal of that name first. Unstable: names and behavior may change. ([`7662a2f83274a47f070ac1970b44f6f633e3d177`](https://github.com/triggerdotdev/trigger.dev/commit/7662a2f83274a47f070ac1970b44f6f633e3d177)) +- Updated dependencies: + - `@trigger.dev/core@4.9.0` + - `@trigger.dev/build@4.9.0` + - `@trigger.dev/schema-to-json@4.9.0` + ## 4.8.10 ### Patch Changes diff --git a/packages/cli-v3/package.json b/packages/cli-v3/package.json index 93448c146b9..edaf20bd969 100644 --- a/packages/cli-v3/package.json +++ b/packages/cli-v3/package.json @@ -1,6 +1,6 @@ { "name": "trigger.dev", - "version": "4.8.10", + "version": "4.9.0", "description": "A Command-Line Interface for Trigger.dev projects", "type": "module", "license": "MIT", @@ -84,9 +84,9 @@ "@opentelemetry/api-logs": "0.219.0", "@opentelemetry/instrumentation": "0.219.0", "@s2-dev/streamstore": "^0.25.0", - "@trigger.dev/build": "workspace:4.8.10", - "@trigger.dev/core": "workspace:4.8.10", - "@trigger.dev/schema-to-json": "workspace:4.8.10", + "@trigger.dev/build": "workspace:4.9.0", + "@trigger.dev/core": "workspace:4.9.0", + "@trigger.dev/schema-to-json": "workspace:4.9.0", "ansi-escapes": "^7.0.0", "braces": "^3.0.3", "c12": "^1.11.1", diff --git a/packages/convex/CHANGELOG.md b/packages/convex/CHANGELOG.md index c42f97675f2..1d455e2d36c 100644 --- a/packages/convex/CHANGELOG.md +++ b/packages/convex/CHANGELOG.md @@ -1,5 +1,9 @@ # @trigger.dev/convex +## 4.9.0 + +No changes in this release. + ## 4.8.10 ## 4.8.9 diff --git a/packages/convex/package.json b/packages/convex/package.json index 93b7138ecee..5ac0d2e42af 100644 --- a/packages/convex/package.json +++ b/packages/convex/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/convex", - "version": "4.8.10", + "version": "4.9.0", "description": "Run Trigger.dev tasks from Convex mutations and query their results reactively", "license": "Apache-2.0", "type": "module", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 62de284302c..f44b412a7e6 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,44 @@ # internal-platform +## 4.9.0 + +### Minor Changes + +- Add `versionSkew: "follow-mid-turn"` to `chat.agent` and `chat.createSession`. It does everything `"follow"` does, and also moves a turn that is still running when its version is below the skew protection threshold: the turn finishes the step it is on, and a run on the current deployment continues the same reply from the next step, so no step runs twice and the person chatting sees one reply. `chat.handOverAtStep(step)` does the same from your own `prepareStep`. `chat.requestUpgrade()` called during a turn now moves the turn at the next step boundary instead of waiting for the turn to end. A turn is handed over only when the agent in the current deployment was built with this release or later; otherwise the turn finishes on its own version. If the API can't be reached during a handover, the old run keeps trying to start the next run for about three minutes, and a run that continues a chat while the API can't be reached waits for it rather than answer a message again. ([`7662a2f83274a47f070ac1970b44f6f633e3d177`](https://github.com/triggerdotdev/trigger.dev/commit/7662a2f83274a47f070ac1970b44f6f633e3d177)) + +### Patch Changes + +- Fix the type of the handle returned by `batch.triggerByTask()`. It promised `runs`, `isCached` and `idempotencyKey`, which were never returned, so code like `results.runs[0]` compiled but threw at runtime. The handle is now typed as what it returns: `batchId`, `runCount` and `publicAccessToken`; use `batch.retrieve(batchId)` to get the run IDs, or `batch.triggerByTaskAndWait()` for typed results. ([`80fc05e8a7a647509b26a22e65dc198b94eccdc9`](https://github.com/triggerdotdev/trigger.dev/commit/80fc05e8a7a647509b26a22e65dc198b94eccdc9)) +- `runs.retrieve()` returns a `buffer` field on a buffered task's run: its buffer key, how many items it collected, and when and why its window closed. ([`87f77acdfc7c61f07e6958d5d28807d3d26ba510`](https://github.com/triggerdotdev/trigger.dev/commit/87f77acdfc7c61f07e6958d5d28807d3d26ba510)) +- Add buffered tasks to `@trigger.dev/sdk/preview`: a task that collects triggers over a time or count window and runs once with the array of payloads. They're in preview and need to be enabled for your organization. Run tokens can buffer items too. ([`7c1789a12b7860a7363c0119932689c0cd7969bd`](https://github.com/triggerdotdev/trigger.dev/commit/7c1789a12b7860a7363c0119932689c0cd7969bd)) + + ```ts + import { buffer } from "@trigger.dev/sdk/preview"; + import { z } from "zod"; + + export const embedItems = buffer.task({ + id: "embed-items", + schema: z.object({ id: z.string() }), + buffer: { maxItems: 100, maxDelay: "10s" }, + run: async (items) => { + // one run per window, with every item it collected + }, + }); + + await embedItems.trigger({ id: "item_1" }); + ``` +- Fix `AgentChat` returning another turn's reply, or several replies joined together, instead of the answer to the message you sent: for example when continuing a chat without a saved `lastEventId`, sending two messages in a row, or when a run answers earlier messages first. Agents now mark where each turn starts and where steered messages join one on the output stream, so redeploy them on this version; with an older agent, a reply `AgentChat` can't match to your message is delivered when its turn completes instead of streamed. Custom readers of the session output stream must skip control records they don't recognise. A send aborted before its stream starts now asks the agent to stop. ([`77fb02dd6cb08134bb5a6c911e59161e55c2b0b3`](https://github.com/triggerdotdev/trigger.dev/commit/77fb02dd6cb08134bb5a6c911e59161e55c2b0b3)) +- `TriggerChatTransport` now renews its session token only through your `accessToken` callback, so make it return a freshly minted token from your server. The `publicAccessToken` option of `chat.writeTurnComplete` is deprecated and ignored. ([`a070a403729838caf3a32906d4cd1b747c7ad703`](https://github.com/triggerdotdev/trigger.dev/commit/a070a403729838caf3a32906d4cd1b747c7ad703)) +- Fix run metadata changes sometimes reaching the API only when the run finished, so realtime subscribers and parent runs didn't see progress while the task was still running. This also fixes a metadata `append` or `increment` occasionally being applied twice at the end of a run, and a new run that reused the previous run's process sometimes seeing that run's metadata values. ([`eea6b174096ae9ec3706734f61f13e48f3ff8b8d`](https://github.com/triggerdotdev/trigger.dev/commit/eea6b174096ae9ec3706734f61f13e48f3ff8b8d)) +- Runs on a named machine (`machine()`) can warm start again. A runner on a machine's image now only takes runs for that same machine, so warm starts no longer have to be turned off for those runs. ([`d719264aa33c44799deebcf678009a69f6cab0ff`](https://github.com/triggerdotdev/trigger.dev/commit/d719264aa33c44799deebcf678009a69f6cab0ff)) +- Use `machine()` from `@trigger.dev/sdk/preview` to give tasks their own image and default preset. Add apt packages or Containerfile instructions to customize the project image. Pass the result as the task's `machine` option to build its image at deploy time. Available only to early testers. ([`cef33425c683fbd21992996739bea36fdc4040b5`](https://github.com/triggerdotdev/trigger.dev/commit/cef33425c683fbd21992996739bea36fdc4040b5)) +- JWT validation now accepts only HS256, the algorithm Trigger.dev tokens are signed with. ([`2f650bd1a702c402ca1c12c2060b375b1d6ddcfd`](https://github.com/triggerdotdev/trigger.dev/commit/2f650bd1a702c402ca1c12c2060b375b1d6ddcfd)) +- Resume a deployed task as soon as its run is restored after a wait. A run that was suspended during a wait (`wait.for`, `triggerAndWait`, a waitpoint token or session input) could take up to 5 seconds longer than needed to continue, and the waits it finished after that, or a cancellation, could reach the task with the same delay. ([`27b8200f5d977f9d3a3a78822772c0afdbe2d5a9`](https://github.com/triggerdotdev/trigger.dev/commit/27b8200f5d977f9d3a3a78822772c0afdbe2d5a9)) +- Sandbox tasks restrict outbound network access by default. `sandbox.network` accepts `"restricted"` (Trigger.dev's services and the allowed domains of granted Vault variables only), `{ allow: ["api.example.com", "*.example.com"] }` to also allow HTTPS to those hosts, or `"unrestricted"`. Restricted sandboxes can only make outbound connections on port 443; a blocked HTTPS request gets a `403` with an `x-trigger-network-denied` header. ([`5d4d12e5cdbee930468868e72ce36c678a3f8e16`](https://github.com/triggerdotdev/trigger.dev/commit/5d4d12e5cdbee930468868e72ce36c678a3f8e16)) +- Add `@trigger.dev/sdk/preview` for features in preview. Adds sandboxed task runs and multiple machine configs as preview features, available only to early testers. ([`3e98abe3be9466968c162ea7d04547134a824a30`](https://github.com/triggerdotdev/trigger.dev/commit/3e98abe3be9466968c162ea7d04547134a824a30)) +- Use `sandbox: true` to run a deployed task with access limited to its own payload and output. Configure `sandbox.envVars` and `sandbox.scopes` to grant environment variables or additional permissions, including the `basic` and `oidc` presets. `basic` lets a sandbox inspect and manage its own run (including metadata and tags), and exchange messages with its attached Session, including waiting for input. Upgrade the SDK, CLI, and (when self-hosting) server before adopting this option. `trigger dev` still runs locally with development credentials and is not an isolation boundary. ([`024c5999a53fef9c2042c0d715f1d1cf2cf1b569`](https://github.com/triggerdotdev/trigger.dev/commit/024c5999a53fef9c2042c0d715f1d1cf2cf1b569)) +- Add `unstable_signals`: send a small message to every executing run in an environment that listens for its name, with `unstable_signals.send(name, payload)`, listen inside a task with `unstable_signals.on(name, handler)`, read the current latest once with `unstable_signals.latest(name)`, and forget the latest with `unstable_signals.clear(name)`. A run that starts listening receives the latest signal of that name first. Unstable: names and behavior may change. ([`7662a2f83274a47f070ac1970b44f6f633e3d177`](https://github.com/triggerdotdev/trigger.dev/commit/7662a2f83274a47f070ac1970b44f6f633e3d177)) + ## 4.8.10 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index 055b9c41343..91bf24fc942 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/core", - "version": "4.8.10", + "version": "4.9.0", "description": "Core code used across the Trigger.dev SDK and platform", "license": "MIT", "publishConfig": { diff --git a/packages/linear/CHANGELOG.md b/packages/linear/CHANGELOG.md index 94e9ae797b6..a2ccc92515f 100644 --- a/packages/linear/CHANGELOG.md +++ b/packages/linear/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/linear +## 4.9.0 + +### Patch Changes + +- Updated dependencies: + - `@trigger.dev/core@4.9.0` + ## 4.8.10 ### Patch Changes diff --git a/packages/linear/package.json b/packages/linear/package.json index c8eecb16dac..595caa6daf0 100644 --- a/packages/linear/package.json +++ b/packages/linear/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/linear", - "version": "4.8.10", + "version": "4.9.0", "description": "Linear agent sessions as a chat frontend (channel) for trigger.dev agents", "license": "MIT", "publishConfig": { @@ -41,7 +41,7 @@ "check-exports": "attw --pack ." }, "dependencies": { - "@trigger.dev/core": "workspace:4.8.10" + "@trigger.dev/core": "workspace:4.9.0" }, "peerDependencies": { "@trigger.dev/sdk": "workspace:^4.8.10", @@ -49,7 +49,7 @@ }, "devDependencies": { "@arethetypeswrong/cli": "^0.18.5", - "@trigger.dev/sdk": "workspace:4.8.10", + "@trigger.dev/sdk": "workspace:4.9.0", "@types/node": "^24.13.3", "rimraf": "6.0.1", "tshy": "^3.0.2", diff --git a/packages/python/CHANGELOG.md b/packages/python/CHANGELOG.md index bf44a3f4051..154e1f1c8fd 100644 --- a/packages/python/CHANGELOG.md +++ b/packages/python/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/python +## 4.9.0 + +### Patch Changes + +- Updated dependencies: + - `@trigger.dev/core@4.9.0` + ## 4.8.10 ### Patch Changes diff --git a/packages/python/package.json b/packages/python/package.json index 21993b7d51d..d1fa210ed1c 100644 --- a/packages/python/package.json +++ b/packages/python/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/python", - "version": "4.8.10", + "version": "4.9.0", "description": "Python runtime and build extension for Trigger.dev", "license": "MIT", "publishConfig": { @@ -45,7 +45,7 @@ "check-exports": "attw --pack ." }, "dependencies": { - "@trigger.dev/core": "workspace:4.8.10", + "@trigger.dev/core": "workspace:4.9.0", "tinyexec": "^0.3.2" }, "devDependencies": { @@ -55,8 +55,8 @@ "typescript": "catalog:", "tsx": "4.17.0", "@arethetypeswrong/cli": "^0.18.5", - "@trigger.dev/build": "workspace:4.8.10", - "@trigger.dev/sdk": "workspace:4.8.10" + "@trigger.dev/build": "workspace:4.9.0", + "@trigger.dev/sdk": "workspace:4.9.0" }, "peerDependencies": { "@trigger.dev/sdk": "workspace:^4.8.10", diff --git a/packages/react-hooks/CHANGELOG.md b/packages/react-hooks/CHANGELOG.md index 345d7ecaded..ef321b20ad9 100644 --- a/packages/react-hooks/CHANGELOG.md +++ b/packages/react-hooks/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/react-hooks +## 4.9.0 + +### Patch Changes + +- Updated dependencies: + - `@trigger.dev/core@4.9.0` + ## 4.8.10 ### Patch Changes diff --git a/packages/react-hooks/package.json b/packages/react-hooks/package.json index bd20de85b93..286f5c21cba 100644 --- a/packages/react-hooks/package.json +++ b/packages/react-hooks/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/react-hooks", - "version": "4.8.10", + "version": "4.9.0", "description": "trigger.dev react hooks", "license": "MIT", "publishConfig": { @@ -37,7 +37,7 @@ "check-exports": "attw --pack ." }, "dependencies": { - "@trigger.dev/core": "workspace:^4.8.10", + "@trigger.dev/core": "workspace:^4.9.0", "swr": "^2.2.5" }, "devDependencies": { diff --git a/packages/redis-worker/CHANGELOG.md b/packages/redis-worker/CHANGELOG.md index f75e171afdd..077c7b8fba7 100644 --- a/packages/redis-worker/CHANGELOG.md +++ b/packages/redis-worker/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/redis-worker +## 4.9.0 + +### Patch Changes + +- Updated dependencies: + - `@trigger.dev/core@4.9.0` + ## 4.8.10 ### Patch Changes diff --git a/packages/redis-worker/package.json b/packages/redis-worker/package.json index 314b24284fc..a82992ca252 100644 --- a/packages/redis-worker/package.json +++ b/packages/redis-worker/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/redis-worker", - "version": "4.8.10", + "version": "4.9.0", "description": "Redis worker for trigger.dev", "license": "MIT", "publishConfig": { @@ -23,7 +23,7 @@ "test": "vitest --sequence.concurrent=false --no-file-parallelism" }, "dependencies": { - "@trigger.dev/core": "workspace:4.8.10", + "@trigger.dev/core": "workspace:4.9.0", "nanoid": "^5.1.16", "p-limit": "^6.2.0", "seedrandom": "^3.0.5", diff --git a/packages/rsc/CHANGELOG.md b/packages/rsc/CHANGELOG.md index 25a40ac46aa..79543fa29d9 100644 --- a/packages/rsc/CHANGELOG.md +++ b/packages/rsc/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/rsc +## 4.9.0 + +### Patch Changes + +- Updated dependencies: + - `@trigger.dev/core@4.9.0` + ## 4.8.10 ### Patch Changes diff --git a/packages/rsc/package.json b/packages/rsc/package.json index ed0622db43f..dbe5fc02f19 100644 --- a/packages/rsc/package.json +++ b/packages/rsc/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/rsc", - "version": "4.8.10", + "version": "4.9.0", "description": "trigger.dev rsc", "license": "MIT", "publishConfig": { @@ -37,7 +37,7 @@ "check-exports": "attw --pack ." }, "dependencies": { - "@trigger.dev/core": "workspace:^4.8.10", + "@trigger.dev/core": "workspace:^4.9.0", "mlly": "^1.7.1", "react": "19.0.0-rc.1", "react-dom": "19.0.0-rc.1" diff --git a/packages/schema-to-json/CHANGELOG.md b/packages/schema-to-json/CHANGELOG.md index 5dc74e26ad3..f01ea39978b 100644 --- a/packages/schema-to-json/CHANGELOG.md +++ b/packages/schema-to-json/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/schema-to-json +## 4.9.0 + +### Patch Changes + +- Updated dependencies: + - `@trigger.dev/core@4.9.0` + ## 4.8.10 ### Patch Changes diff --git a/packages/schema-to-json/package.json b/packages/schema-to-json/package.json index 08d0cf87f80..5a8611fc7f6 100644 --- a/packages/schema-to-json/package.json +++ b/packages/schema-to-json/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/schema-to-json", - "version": "4.8.10", + "version": "4.9.0", "description": "Convert various schema validation libraries to JSON Schema", "license": "MIT", "publishConfig": { diff --git a/packages/slack/CHANGELOG.md b/packages/slack/CHANGELOG.md index 58981274848..7e4554459bc 100644 --- a/packages/slack/CHANGELOG.md +++ b/packages/slack/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/slack +## 4.9.0 + +### Patch Changes + +- Updated dependencies: + - `@trigger.dev/core@4.9.0` + ## 4.8.10 ### Patch Changes diff --git a/packages/slack/package.json b/packages/slack/package.json index 54b9a9aa5ab..fec1d685a84 100644 --- a/packages/slack/package.json +++ b/packages/slack/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/slack", - "version": "4.8.10", + "version": "4.9.0", "description": "Slack chat frontend (channel) for trigger.dev agents", "license": "MIT", "publishConfig": { @@ -41,14 +41,14 @@ "check-exports": "attw --pack ." }, "dependencies": { - "@trigger.dev/core": "workspace:4.8.10" + "@trigger.dev/core": "workspace:4.9.0" }, "peerDependencies": { "@trigger.dev/sdk": "workspace:^4.8.10" }, "devDependencies": { "@arethetypeswrong/cli": "^0.18.5", - "@trigger.dev/sdk": "workspace:4.8.10", + "@trigger.dev/sdk": "workspace:4.9.0", "@types/node": "^24.13.3", "rimraf": "6.0.1", "tshy": "^3.0.2", diff --git a/packages/trigger-sdk/CHANGELOG.md b/packages/trigger-sdk/CHANGELOG.md index a85163331f3..c0dbfde4a22 100644 --- a/packages/trigger-sdk/CHANGELOG.md +++ b/packages/trigger-sdk/CHANGELOG.md @@ -1,5 +1,48 @@ # @trigger.dev/sdk +## 4.9.0 + +### Minor Changes + +- Add `versionSkew: "follow-mid-turn"` to `chat.agent` and `chat.createSession`. It does everything `"follow"` does, and also moves a turn that is still running when its version is below the skew protection threshold: the turn finishes the step it is on, and a run on the current deployment continues the same reply from the next step, so no step runs twice and the person chatting sees one reply. `chat.handOverAtStep(step)` does the same from your own `prepareStep`. `chat.requestUpgrade()` called during a turn now moves the turn at the next step boundary instead of waiting for the turn to end. A turn is handed over only when the agent in the current deployment was built with this release or later; otherwise the turn finishes on its own version. If the API can't be reached during a handover, the old run keeps trying to start the next run for about three minutes, and a run that continues a chat while the API can't be reached waits for it rather than answer a message again. ([`7662a2f83274a47f070ac1970b44f6f633e3d177`](https://github.com/triggerdotdev/trigger.dev/commit/7662a2f83274a47f070ac1970b44f6f633e3d177)) +- Add `@trigger.dev/sdk/preview` for features in preview. Adds sandboxed task runs and multiple machine configs as preview features, available only to early testers. ([`3e98abe3be9466968c162ea7d04547134a824a30`](https://github.com/triggerdotdev/trigger.dev/commit/3e98abe3be9466968c162ea7d04547134a824a30)) + +### Patch Changes + +- Fix the type of the handle returned by `batch.triggerByTask()`. It promised `runs`, `isCached` and `idempotencyKey`, which were never returned, so code like `results.runs[0]` compiled but threw at runtime. The handle is now typed as what it returns: `batchId`, `runCount` and `publicAccessToken`; use `batch.retrieve(batchId)` to get the run IDs, or `batch.triggerByTaskAndWait()` for typed results. ([`80fc05e8a7a647509b26a22e65dc198b94eccdc9`](https://github.com/triggerdotdev/trigger.dev/commit/80fc05e8a7a647509b26a22e65dc198b94eccdc9)) +- Add buffered tasks to `@trigger.dev/sdk/preview`: a task that collects triggers over a time or count window and runs once with the array of payloads. They're in preview and need to be enabled for your organization. Run tokens can buffer items too. ([`7c1789a12b7860a7363c0119932689c0cd7969bd`](https://github.com/triggerdotdev/trigger.dev/commit/7c1789a12b7860a7363c0119932689c0cd7969bd)) + + ```ts + import { buffer } from "@trigger.dev/sdk/preview"; + import { z } from "zod"; + + export const embedItems = buffer.task({ + id: "embed-items", + schema: z.object({ id: z.string() }), + buffer: { maxItems: 100, maxDelay: "10s" }, + run: async (items) => { + // one run per window, with every item it collected + }, + }); + + await embedItems.trigger({ id: "item_1" }); + ``` +- Fix `AgentChat` returning another turn's reply, or several replies joined together, instead of the answer to the message you sent: for example when continuing a chat without a saved `lastEventId`, sending two messages in a row, or when a run answers earlier messages first. Agents now mark where each turn starts and where steered messages join one on the output stream, so redeploy them on this version; with an older agent, a reply `AgentChat` can't match to your message is delivered when its turn completes instead of streamed. Custom readers of the session output stream must skip control records they don't recognise. A send aborted before its stream starts now asks the agent to stop. ([`77fb02dd6cb08134bb5a6c911e59161e55c2b0b3`](https://github.com/triggerdotdev/trigger.dev/commit/77fb02dd6cb08134bb5a6c911e59161e55c2b0b3)) +- On a Head Start first turn, `chat.agent` now asks the user before running a tool that needs approval, instead of running it as soon as the agent takes over. Redeploy the agent to get the fix; the route needs no change. If `run` calls `streamText` again with the handed-over messages and a tool that needs approval, that call now throws: pass the first call's response messages instead. ([`fd739033dfaf8e0def6715dedbb63124f838abbc`](https://github.com/triggerdotdev/trigger.dev/commit/fd739033dfaf8e0def6715dedbb63124f838abbc)) +- `TriggerChatTransport` now renews its session token only through your `accessToken` callback, so make it return a freshly minted token from your server. The `publicAccessToken` option of `chat.writeTurnComplete` is deprecated and ignored. ([`a070a403729838caf3a32906d4cd1b747c7ad703`](https://github.com/triggerdotdev/trigger.dev/commit/a070a403729838caf3a32906d4cd1b747c7ad703)) +- The bundled chat agent skills now use `claude-sonnet-5-5` in their examples. They used `claude-sonnet-4-5`, which Anthropic retires on November 30, 2026, so agents following the skills would have generated code that stops working. ([`59dc6636b39147c1297984050181facbf9420bd5`](https://github.com/triggerdotdev/trigger.dev/commit/59dc6636b39147c1297984050181facbf9420bd5)) +- A `chat.agent` channel's final reply is now the turn's last non-empty run of text (tool calls split the text into runs), instead of every step's text joined together. Notes the model wrote before its tool calls no longer end up in the posted reply, unless nothing follows the last tool call, in which case the text just before it is posted. `reply.message` still has every part. ([`7a2dd6ba86a1dcc334a0e853018780b5d8fa05e7`](https://github.com/triggerdotdev/trigger.dev/commit/7a2dd6ba86a1dcc334a0e853018780b5d8fa05e7)) +- `chat.customAgent` and `chat.createSession` loops can now hold Head Start tool calls that need approval: pass the `tools` (and AI SDK 7's `toolApproval`) you give your `streamText` to `consumeHandover`, `chat.createSession` or `applyHandover`. `chat.createSession` now also continues the same assistant message when the client answers a tool call, as `chat.agent` does, so save replies by message id. ([`d9604faf8e3a2ec4223e626f12f3219970e6187d`](https://github.com/triggerdotdev/trigger.dev/commit/d9604faf8e3a2ec4223e626f12f3219970e6187d)) +- `TriggerChatTransport` no longer replays the previous answer when a chat is sent to or reconnected without a saved `lastEventId`, for example after a page reload that doesn't restore it. Only the current turn's answer reaches the UI, and a reload mid-answer resumes it live. With older agents that write no turn markers, the answer can arrive when its turn completes rather than streaming, and with the oldest, which record no input cursor, a send made while the agent is idle can still get the previous answer. ([`04352350bd0ce807f89dc6af15f1d7c4948fbec1`](https://github.com/triggerdotdev/trigger.dev/commit/04352350bd0ce807f89dc6af15f1d7c4948fbec1)) +- With AI SDK 7's `useChat({ resume: true })`, a chat that remounts while a reply is still streaming (for example under React StrictMode in development) now rejoins the reply from its start instead of showing nothing until the next message. ([`85a3dbc612b09f2530073d7d5e7ab589307c6bc2`](https://github.com/triggerdotdev/trigger.dev/commit/85a3dbc612b09f2530073d7d5e7ab589307c6bc2)) +- A chat message sent while an earlier reply is still running, for example after Stop on a reply resumed after a reload, now gets only its own answer instead of the rest of that reply and an error. ([`73061256bb2e39c335f8ca55b7c8ae98b855f1bb`](https://github.com/triggerdotdev/trigger.dev/commit/73061256bb2e39c335f8ca55b7c8ae98b855f1bb)) +- Use `machine()` from `@trigger.dev/sdk/preview` to give tasks their own image and default preset. Add apt packages or Containerfile instructions to customize the project image. Pass the result as the task's `machine` option to build its image at deploy time. Available only to early testers. ([`cef33425c683fbd21992996739bea36fdc4040b5`](https://github.com/triggerdotdev/trigger.dev/commit/cef33425c683fbd21992996739bea36fdc4040b5)) +- Sandbox tasks restrict outbound network access by default. `sandbox.network` accepts `"restricted"` (Trigger.dev's services and the allowed domains of granted Vault variables only), `{ allow: ["api.example.com", "*.example.com"] }` to also allow HTTPS to those hosts, or `"unrestricted"`. Restricted sandboxes can only make outbound connections on port 443; a blocked HTTPS request gets a `403` with an `x-trigger-network-denied` header. ([`5d4d12e5cdbee930468868e72ce36c678a3f8e16`](https://github.com/triggerdotdev/trigger.dev/commit/5d4d12e5cdbee930468868e72ce36c678a3f8e16)) +- Use `sandbox: true` to run a deployed task with access limited to its own payload and output. Configure `sandbox.envVars` and `sandbox.scopes` to grant environment variables or additional permissions, including the `basic` and `oidc` presets. `basic` lets a sandbox inspect and manage its own run (including metadata and tags), and exchange messages with its attached Session, including waiting for input. Upgrade the SDK, CLI, and (when self-hosting) server before adopting this option. `trigger dev` still runs locally with development credentials and is not an isolation boundary. ([`024c5999a53fef9c2042c0d715f1d1cf2cf1b569`](https://github.com/triggerdotdev/trigger.dev/commit/024c5999a53fef9c2042c0d715f1d1cf2cf1b569)) +- Add `unstable_signals`: send a small message to every executing run in an environment that listens for its name, with `unstable_signals.send(name, payload)`, listen inside a task with `unstable_signals.on(name, handler)`, read the current latest once with `unstable_signals.latest(name)`, and forget the latest with `unstable_signals.clear(name)`. A run that starts listening receives the latest signal of that name first. Unstable: names and behavior may change. ([`7662a2f83274a47f070ac1970b44f6f633e3d177`](https://github.com/triggerdotdev/trigger.dev/commit/7662a2f83274a47f070ac1970b44f6f633e3d177)) +- Updated dependencies: + - `@trigger.dev/core@4.9.0` + ## 4.8.10 ### Patch Changes diff --git a/packages/trigger-sdk/package.json b/packages/trigger-sdk/package.json index 8670146aed4..45ef9ec845f 100644 --- a/packages/trigger-sdk/package.json +++ b/packages/trigger-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/sdk", - "version": "4.8.10", + "version": "4.9.0", "description": "trigger.dev Node.JS SDK", "license": "MIT", "publishConfig": { @@ -91,7 +91,7 @@ "dependencies": { "@opentelemetry/api": "1.9.1", "@opentelemetry/semantic-conventions": "1.41.1", - "@trigger.dev/core": "workspace:4.8.10", + "@trigger.dev/core": "workspace:4.9.0", "uncrypto": "^0.1.3" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e01a96acfcc..d847fe09fdf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1765,7 +1765,7 @@ importers: specifier: ^6.10.0 version: 6.19.0(magicast@0.3.5) '@trigger.dev/core': - specifier: workspace:4.8.10 + specifier: workspace:4.9.0 version: link:../core mlly: specifier: ^1.7.1 @@ -1832,13 +1832,13 @@ importers: specifier: ^0.25.0 version: 0.25.0(supports-color@10.0.0) '@trigger.dev/build': - specifier: workspace:4.8.10 + specifier: workspace:4.9.0 version: link:../build '@trigger.dev/core': - specifier: workspace:4.8.10 + specifier: workspace:4.9.0 version: link:../core '@trigger.dev/schema-to-json': - specifier: workspace:4.8.10 + specifier: workspace:4.9.0 version: link:../schema-to-json ansi-escapes: specifier: ^7.0.0 @@ -2167,14 +2167,14 @@ importers: packages/linear: dependencies: '@trigger.dev/core': - specifier: workspace:4.8.10 + specifier: workspace:4.9.0 version: link:../core devDependencies: '@arethetypeswrong/cli': specifier: ^0.18.5 version: 0.18.5 '@trigger.dev/sdk': - specifier: workspace:4.8.10 + specifier: workspace:4.9.0 version: link:../trigger-sdk '@types/node': specifier: 24.13.3 @@ -2217,7 +2217,7 @@ importers: packages/python: dependencies: '@trigger.dev/core': - specifier: workspace:4.8.10 + specifier: workspace:4.9.0 version: link:../core tinyexec: specifier: ^0.3.2 @@ -2227,10 +2227,10 @@ importers: specifier: ^0.18.5 version: 0.18.5 '@trigger.dev/build': - specifier: workspace:4.8.10 + specifier: workspace:4.9.0 version: link:../build '@trigger.dev/sdk': - specifier: workspace:4.8.10 + specifier: workspace:4.9.0 version: link:../trigger-sdk '@types/node': specifier: 24.13.3 @@ -2251,7 +2251,7 @@ importers: packages/react-hooks: dependencies: '@trigger.dev/core': - specifier: workspace:^4.8.10 + specifier: workspace:^4.9.0 version: link:../core react: specifier: 18.3.1 @@ -2285,7 +2285,7 @@ importers: packages/redis-worker: dependencies: '@trigger.dev/core': - specifier: workspace:4.8.10 + specifier: workspace:4.9.0 version: link:../core cron-parser: specifier: ^4.9.0 @@ -2331,7 +2331,7 @@ importers: packages/rsc: dependencies: '@trigger.dev/core': - specifier: workspace:^4.8.10 + specifier: workspace:^4.9.0 version: link:../core mlly: specifier: ^1.7.1 @@ -2411,14 +2411,14 @@ importers: packages/slack: dependencies: '@trigger.dev/core': - specifier: workspace:4.8.10 + specifier: workspace:4.9.0 version: link:../core devDependencies: '@arethetypeswrong/cli': specifier: ^0.18.5 version: 0.18.5 '@trigger.dev/sdk': - specifier: workspace:4.8.10 + specifier: workspace:4.9.0 version: link:../trigger-sdk '@types/node': specifier: 24.13.3 @@ -2445,7 +2445,7 @@ importers: specifier: 1.41.1 version: 1.41.1 '@trigger.dev/core': - specifier: workspace:4.8.10 + specifier: workspace:4.9.0 version: link:../core react: specifier: 18.3.1