Skip to content

feat: add type helpers for DurableAgent UI messages#1302

Closed
nicoalbanese wants to merge 2 commits intovercel:mainfrom
nicoalbanese:na/44395214
Closed

feat: add type helpers for DurableAgent UI messages#1302
nicoalbanese wants to merge 2 commits intovercel:mainfrom
nicoalbanese:na/44395214

Conversation

@nicoalbanese
Copy link
Copy Markdown

Summary

Adds type helper functions for DurableAgent UI messages to improve type safety and message validation when working with UI message types.

Changes

Agent Types (packages/ai/src/agent/durable-agent.ts)

  • Add type helper functions for DurableAgent UI messages
  • Improve type safety for message validation

Tests (packages/ai/src/agent/durable-agent-types.test.ts)

  • Add comprehensive test suite for UI message type helpers
  • Test type validation and message structure

Tests (packages/ai/src/agent/durable-agent.test.ts)

  • Update existing tests to use new type helpers

@nicoalbanese nicoalbanese requested a review from a team as a code owner March 9, 2026 11:48
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 9, 2026

⚠️ No Changeset found

Latest commit: bf245d5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Mar 9, 2026

@nicoalbanese is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

VaguelySerious added a commit that referenced this pull request Mar 14, 2026
… fix, telemetry spans

- Add InferDurableAgentTools and InferDurableAgentUIMessage type helpers (#1302)
- Support prepareStep on DurableAgent constructor with stream-level override (#1303)
- Fix AI_DownloadError for image URLs by defaulting to no-op download (#1376)
- Add telemetry span support (ai.streamText.doStream, ai.toolCall) via optional @opentelemetry/api (#1296)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

2 participants