Skip to content

chore: release v4.5.0-rc.2#3702

Merged
ericallam merged 1 commit into
mainfrom
changeset-release/main
May 23, 2026
Merged

chore: release v4.5.0-rc.2#3702
ericallam merged 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 22, 2026

Summary

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, tool input, provider metadata) stays whatever the snapshot or hydrateMessages returned. Previously a full-message replace overwrote those fields with whatever the client shipped, so a slimmed wire copy landed a tool call with no arguments on the next LLM call. Covers output-available / output-error (HITL addToolOutput) and approval-responded / output-denied (approval flow).
  • TriggerChatTransport.sendMessages and AgentChat.sendRaw now slim assistant messages that carry advanced tool parts. The wire payload is just { id, role, parts: [<state + resolution field>] } for submit-message continuations; 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/append cap on long agent loops.
  • Add TriggerClient for 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.agent HITL continuations on reasoning-heavy turns. Two changes that work together: (#3719)
Raw changeset output

⚠️⚠️⚠️⚠️⚠️⚠️

main is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on main.

⚠️⚠️⚠️⚠️⚠️⚠️

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.agent HITL 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, tool input, provider metadata) stays whatever the snapshot or hydrateMessages returned. Previously a full-message replace overwrote those fields with whatever the client shipped, so a slimmed wire copy landed a tool call with no arguments on the next LLM call. Covers output-available / output-error (HITL addToolOutput) and approval-responded / output-denied (approval flow).
    • TriggerChatTransport.sendMessages and AgentChat.sendRaw now slim assistant messages that carry advanced tool parts. The wire payload is just { id, role, parts: [<state + resolution field>] } for submit-message continuations; 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/append cap on long agent loops.

    Note: onValidateMessages receives the slim wire on HITL turns. If you call validateUIMessages from ai against the full messages array it will reject the slim assistant; filter to user messages (or skip on HITL turns) — see the updated docstring on onValidateMessages for the recommended pattern.

    For hydrateMessages hooks that persist the chain, this release also adds a small helper to the @trigger.dev/sdk/ai surface:

    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-message triggers. Returns true if it mutated stored so the caller knows whether to persist.

    Net effect: chat.addToolOutput(...) / chat.addToolApproveResponse(...) on multi-step reasoning agents (OpenAI Responses with store: false, Anthropic extended thinking, etc.) no longer blows the cap and no longer corrupts the LLM input.

  • Add TriggerClient for 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

@github-actions github-actions Bot changed the title chore: release (rc) chore: release v4.5.0-rc.2 May 22, 2026
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@github-actions github-actions Bot changed the title chore: release v4.5.0-rc.2 chore: release (rc) May 22, 2026
@github-actions github-actions Bot force-pushed the changeset-release/main branch from 9634f52 to a7b2ff2 Compare May 22, 2026 13:44
@github-actions github-actions Bot changed the title chore: release (rc) chore: release v4.5.0-rc.2 May 22, 2026
@github-actions github-actions Bot changed the title chore: release v4.5.0-rc.2 chore: release (rc) May 22, 2026
@github-actions github-actions Bot force-pushed the changeset-release/main branch from a7b2ff2 to e67e643 Compare May 22, 2026 14:12
@github-actions github-actions Bot changed the title chore: release (rc) chore: release v4.5.0-rc.2 May 22, 2026
@github-actions github-actions Bot changed the title chore: release v4.5.0-rc.2 chore: release (rc) May 22, 2026
@github-actions github-actions Bot force-pushed the changeset-release/main branch from e67e643 to 8514f1e Compare May 22, 2026 14:43
@github-actions github-actions Bot changed the title chore: release (rc) chore: release v4.5.0-rc.2 May 22, 2026
@github-actions github-actions Bot changed the title chore: release v4.5.0-rc.2 chore: release (rc) May 22, 2026
@github-actions github-actions Bot changed the title chore: release (rc) chore: release v4.5.0-rc.2 May 22, 2026
@github-actions github-actions Bot force-pushed the changeset-release/main branch from 8514f1e to 5dab2df Compare May 22, 2026 15:29
@github-actions github-actions Bot changed the title chore: release v4.5.0-rc.2 chore: release (rc) May 22, 2026
@github-actions github-actions Bot force-pushed the changeset-release/main branch from 5dab2df to f32ca91 Compare May 22, 2026 15:35
@github-actions github-actions Bot changed the title chore: release (rc) chore: release v4.5.0-rc.2 May 22, 2026
@github-actions github-actions Bot changed the title chore: release v4.5.0-rc.2 chore: release (rc) May 22, 2026
@github-actions github-actions Bot force-pushed the changeset-release/main branch from f32ca91 to cd1ea9f Compare May 22, 2026 16:20
@github-actions github-actions Bot changed the title chore: release (rc) chore: release v4.5.0-rc.2 May 22, 2026
@github-actions github-actions Bot changed the title chore: release v4.5.0-rc.2 chore: release (rc) May 23, 2026
@github-actions github-actions Bot force-pushed the changeset-release/main branch from cd1ea9f to c03f711 Compare May 23, 2026 15:09
@github-actions github-actions Bot changed the title chore: release (rc) chore: release v4.5.0-rc.2 May 23, 2026
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 2 additional findings in Devin Review.

Open in Devin Review

Comment thread packages/trigger-sdk/CHANGELOG.md
@github-actions github-actions Bot changed the title chore: release v4.5.0-rc.2 chore: release (rc) May 23, 2026
@github-actions github-actions Bot force-pushed the changeset-release/main branch from c03f711 to fd855cd Compare May 23, 2026 16:11
@github-actions github-actions Bot changed the title chore: release (rc) chore: release v4.5.0-rc.2 May 23, 2026
@ericallam ericallam merged commit d34014d into main May 23, 2026
8 checks passed
@ericallam ericallam deleted the changeset-release/main branch May 23, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant