@mastra/ai-sdk 1.4.2-alpha.0 → 1.4.2-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @mastra/ai-sdk
2
2
 
3
+ ## 1.4.2-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Added support for showing different tool values to users than the values used internally during execution. AI SDK streams now read Mastra display values for tool call input, streamed input deltas, tool results, tool errors, approvals, and suspensions. ([#16103](https://github.com/mastra-ai/mastra/pull/16103))
8
+
9
+ ```ts
10
+ const lookupCustomer = createTool({
11
+ // Runtime still receives the full input and returns the full output.
12
+ execute: async ({ customerId, internalPath }) => lookupCustomerRecord(customerId, internalPath),
13
+ transform: {
14
+ display: {
15
+ input: ({ input }) => ({ customerId: input?.customerId }),
16
+ output: ({ output }) => ({ displayName: output?.displayName }),
17
+ error: () => ({ message: 'Customer lookup failed' }),
18
+ },
19
+ },
20
+ });
21
+ ```
22
+
23
+ This lets chat UIs show safe display values while runtime code keeps the original payloads. See https://github.com/mastra-ai/mastra/issues/16054.
24
+
25
+ - Updated dependencies [[`7c275a8`](https://github.com/mastra-ai/mastra/commit/7c275a810595e1a6c41ccc39720531ab65734700), [`890b24c`](https://github.com/mastra-ai/mastra/commit/890b24cc7d32ed6aa4dfe253e54dc6bf4099f690), [`0f48ebf`](https://github.com/mastra-ai/mastra/commit/0f48ebfc7ac7897b2092a189f45751924cf56d1c), [`f180e49`](https://github.com/mastra-ai/mastra/commit/f180e4990e71b04c9a475b523584071712f0048f), [`9260e01`](https://github.com/mastra-ai/mastra/commit/9260e015276fb1b500f7878ee452b47476bf1583), [`2f6c54e`](https://github.com/mastra-ai/mastra/commit/2f6c54e17c041cac1def54baaa6b771647836414), [`e06a159`](https://github.com/mastra-ai/mastra/commit/e06a1598ca07a6c3778aefc2a2d288363c6294ff), [`db34bc6`](https://github.com/mastra-ai/mastra/commit/db34bc6fb36cf125bda0c46be4d3fdc774b70cc4)]:
26
+ - @mastra/core@1.33.0-alpha.8
27
+
3
28
  ## 1.4.2-alpha.0
4
29
 
5
30
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/ai-sdk",
3
- "version": "1.4.2-alpha.0",
3
+ "version": "1.4.2-alpha.1",
4
4
  "description": "Adds custom API routes to be compatible with the AI SDK UI parts",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -47,13 +47,13 @@
47
47
  "vitest": "4.1.5",
48
48
  "zod": "^4.3.6",
49
49
  "@internal/ai-sdk-v4": "0.0.39",
50
+ "@internal/ai-v6": "0.0.39",
50
51
  "@internal/lint": "0.0.92",
51
- "@internal/ai-sdk-v5": "0.0.39",
52
52
  "@internal/types-builder": "0.0.67",
53
- "@mastra/core": "1.33.0-alpha.7",
54
- "@internal/ai-v6": "0.0.39",
55
- "@mastra/memory": "1.18.0-alpha.2",
56
- "@mastra/libsql": "1.10.1-alpha.1"
53
+ "@internal/ai-sdk-v5": "0.0.39",
54
+ "@mastra/core": "1.33.0-alpha.8",
55
+ "@mastra/memory": "1.18.0-alpha.3",
56
+ "@mastra/libsql": "1.10.1-alpha.2"
57
57
  },
58
58
  "keywords": [
59
59
  "mastra",