-
chore: release v4.5.0-rc.2 (#3702)
发布于
2026-05-23 16:15:33 +00:00 | 807 次提交 在此版本后已推送到 mainSummary
3 improvements, 1 bug fix.
Improvements
- The per-turn merge now overlays the wire copy's tool-part state
advancement onto the agent's existing chain —state+ the matching
resolution field (output/errorText/approval) come from the
wire, everything else (text, reasoning, toolinput, provider metadata)
stays whatever the snapshot orhydrateMessagesreturned. Previously a
full-message replace overwrote those fields with whatever the client
shipped, so a slimmed wire copy landed a tool call with noarguments
on the next LLM call. Coversoutput-available/output-error(HITL
addToolOutput) andapproval-responded/output-denied(approval
flow). TriggerChatTransport.sendMessagesandAgentChat.sendRawnow slim
assistant messages that carry advanced tool parts. The wire payload is
just{ id, role, parts: [<state + resolution field>] }for
submit-messagecontinuations; everything else passes through.
Reasoning blobs and full tool inputs no longer ride the wire on every
addToolOutput/addToolApproveResponse, so continuation payloads
stay well under the.in/appendcap on long agent loops.- Add
TriggerClientfor running multiple SDK clients side-by-side,
each with its own auth, preview branch, and baseURL. Useful when a
single process needs to trigger tasks or read runs across multiple
projects, environments, or preview branches without mutating shared
global state.
(#3683)
Bug fixes
- Fix
chat.agentHITL continuations on reasoning-heavy turns. Two
changes that work together:
(#3719)
Raw changeset output
⚠️⚠️⚠️⚠️⚠️⚠️
mainis currently in pre mode so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
changeset pre exitonmain.⚠️⚠️⚠️⚠️⚠️⚠️
Releases
@trigger.dev/build@4.5.0-rc.2
Patch Changes
- Updated dependencies:
@trigger.dev/core@4.5.0-rc.2
trigger.dev@4.5.0-rc.2
Patch Changes
- Updated dependencies:
@trigger.dev/build@4.5.0-rc.2@trigger.dev/core@4.5.0-rc.2@trigger.dev/schema-to-json@4.5.0-rc.2
@trigger.dev/plugins@4.5.0-rc.2
Patch Changes
- Updated dependencies:
@trigger.dev/core@4.5.0-rc.2
@trigger.dev/python@4.5.0-rc.2
Patch Changes
- Updated dependencies:
@trigger.dev/sdk@4.5.0-rc.2@trigger.dev/build@4.5.0-rc.2@trigger.dev/core@4.5.0-rc.2
@trigger.dev/react-hooks@4.5.0-rc.2
Patch Changes
- Updated dependencies:
@trigger.dev/core@4.5.0-rc.2
@trigger.dev/redis-worker@4.5.0-rc.2
Patch Changes
- Updated dependencies:
@trigger.dev/core@4.5.0-rc.2
@trigger.dev/rsc@4.5.0-rc.2
Patch Changes
- Updated dependencies:
@trigger.dev/core@4.5.0-rc.2
@trigger.dev/schema-to-json@4.5.0-rc.2
Patch Changes
- Updated dependencies:
@trigger.dev/core@4.5.0-rc.2
@trigger.dev/sdk@4.5.0-rc.2
Patch Changes
-
Fix
chat.agentHITL continuations on reasoning-heavy turns. Two
changes that work together:
(#3719) -
The per-turn merge now overlays the wire copy's tool-part state
advancement onto the agent's existing chain —state+ the matching
resolution field (output/errorText/approval) come from the
wire, everything else (text, reasoning, toolinput, provider metadata)
stays whatever the snapshot orhydrateMessagesreturned. Previously a
full-message replace overwrote those fields with whatever the client
shipped, so a slimmed wire copy landed a tool call with noarguments
on the next LLM call. Coversoutput-available/output-error(HITL
addToolOutput) andapproval-responded/output-denied(approval
flow). -
TriggerChatTransport.sendMessagesandAgentChat.sendRawnow slim
assistant messages that carry advanced tool parts. The wire payload is
just{ id, role, parts: [<state + resolution field>] }for
submit-messagecontinuations; everything else passes through.
Reasoning blobs and full tool inputs no longer ride the wire on every
addToolOutput/addToolApproveResponse, so continuation payloads
stay well under the.in/appendcap on long agent loops.
Note:
onValidateMessagesreceives the slim wire on HITL turns. If you
callvalidateUIMessagesfromaiagainst the fullmessagesarray it
will reject the slim assistant; filter to user messages (or skip on HITL
turns) — see the updated docstring ononValidateMessagesfor the
recommended pattern.For
hydrateMessageshooks that persist the chain, this release also
adds a small helper to the@trigger.dev/sdk/aisurface:```ts import { chat, upsertIncomingMessage } from "@trigger.dev/sdk/ai"; chat.agent({hydrateMessages: async ({ chatId, trigger, incomingMessages }) => {
const record = await db.chat.findUnique({ where: { id: chatId } });
const stored = record?.messages ?? [];
if (upsertIncomingMessage(stored, { trigger, incomingMessages })) {
await db.chat.update({ where: { id: chatId }, data: { messages: stored }
});
}
return stored;
},
});
```It pushes fresh user messages by id, no-ops on HITL continuations (the
incoming shares an id with the existing assistant — the runtime overlays
the new tool-state advance), and skips on non-submit-messagetriggers.
Returnstrueif it mutatedstoredso the caller knows whether to
persist.Net effect:
chat.addToolOutput(...)/
chat.addToolApproveResponse(...)on multi-step reasoning agents
(OpenAI Responses withstore: false, Anthropic extended thinking,
etc.) no longer blows the cap and no longer corrupts the LLM input.-
Add
TriggerClientfor running multiple SDK clients side-by-side,
each with its own auth, preview branch, and baseURL. Useful when a
single process needs to trigger tasks or read runs across multiple
projects, environments, or preview branches without mutating shared
global state.
(#3683)import { TriggerClient } from "@trigger.dev/sdk";
const prod = new TriggerClient({ accessToken:
process.env.TRIGGER_PROD_KEY });
const preview = new TriggerClient({
accessToken: process.env.TRIGGER_PREVIEW_KEY,
previewBranch: "signup-flow",
});await prod.tasks.trigger("send-email", payload); await preview.runs.list({ status: ["COMPLETED"] }); ```- Updated dependencies:
@trigger.dev/core@4.5.0-rc.2
@trigger.dev/core@4.5.0-rc.2
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
下载附件
- The per-turn merge now overlays the wire copy's tool-part state