@mastra/ai-sdk 1.4.1 → 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.
- package/CHANGELOG.md +34 -0
- package/dist/_types/@internal_ai-sdk-v5/dist/index.d.ts +425 -1757
- package/dist/_types/@internal_ai-v6/dist/index.d.ts +311 -1772
- package/dist/helpers.d.ts.map +1 -1
- package/dist/index.cjs +895 -440
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +895 -440
- package/dist/index.js.map +1 -1
- package/dist/ui.cjs +1 -0
- package/dist/ui.cjs.map +1 -1
- package/dist/ui.js +1 -0
- package/dist/ui.js.map +1 -1
- package/package.json +14 -14
- package/dist/chunk-3YJ25IUJ.js +0 -79
- package/dist/chunk-3YJ25IUJ.js.map +0 -1
- package/dist/chunk-DGUM43GV.js +0 -10
- package/dist/chunk-DGUM43GV.js.map +0 -1
- package/dist/chunk-HDI4ZP7N.js +0 -79
- package/dist/chunk-HDI4ZP7N.js.map +0 -1
- package/dist/chunk-HMOX24BQ.js +0 -439
- package/dist/chunk-HMOX24BQ.js.map +0 -1
- package/dist/chunk-IV3RKEE4.js +0 -439
- package/dist/chunk-IV3RKEE4.js.map +0 -1
- package/dist/chunk-JEQ2X3Z6.cjs +0 -12
- package/dist/chunk-JEQ2X3Z6.cjs.map +0 -1
- package/dist/chunk-PEZAMDZJ.cjs +0 -84
- package/dist/chunk-PEZAMDZJ.cjs.map +0 -1
- package/dist/chunk-VJW66KXQ.cjs +0 -441
- package/dist/chunk-VJW66KXQ.cjs.map +0 -1
- package/dist/chunk-WFARZCDO.cjs +0 -84
- package/dist/chunk-WFARZCDO.cjs.map +0 -1
- package/dist/chunk-X72VW7EY.cjs +0 -441
- package/dist/chunk-X72VW7EY.cjs.map +0 -1
- package/dist/token-APYSY3BW-CBIBV5F2.js +0 -61
- package/dist/token-APYSY3BW-CBIBV5F2.js.map +0 -1
- package/dist/token-APYSY3BW-INR55PKP.js +0 -61
- package/dist/token-APYSY3BW-INR55PKP.js.map +0 -1
- package/dist/token-APYSY3BW-M2K6HVOG.cjs +0 -63
- package/dist/token-APYSY3BW-M2K6HVOG.cjs.map +0 -1
- package/dist/token-APYSY3BW-Y5VD4L7Z.cjs +0 -63
- package/dist/token-APYSY3BW-Y5VD4L7Z.cjs.map +0 -1
- package/dist/token-util-RMHT2CPJ-3LCBPXJ6.cjs +0 -10
- package/dist/token-util-RMHT2CPJ-3LCBPXJ6.cjs.map +0 -1
- package/dist/token-util-RMHT2CPJ-4YTBAZ23.cjs +0 -10
- package/dist/token-util-RMHT2CPJ-4YTBAZ23.cjs.map +0 -1
- package/dist/token-util-RMHT2CPJ-HCMQIDTV.js +0 -8
- package/dist/token-util-RMHT2CPJ-HCMQIDTV.js.map +0 -1
- package/dist/token-util-RMHT2CPJ-IOKQM5O3.js +0 -8
- package/dist/token-util-RMHT2CPJ-IOKQM5O3.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
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
|
+
|
|
28
|
+
## 1.4.2-alpha.0
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- Fixed cache write tokens not being set on the AI SDK v6 usage object. `inputTokenDetails.cacheWriteTokens` now reflects the prompt cache creation tokens reported by the provider instead of always being `undefined`. Previously this value was only accessible via `providerMetadata.anthropic.cacheCreationInputTokens`. ([#16354](https://github.com/mastra-ai/mastra/pull/16354))
|
|
33
|
+
|
|
34
|
+
- Updated dependencies [[`6742347`](https://github.com/mastra-ai/mastra/commit/6742347d71955d7639adc9ddf6ff8282de7ee3ba), [`7b0ad1f`](https://github.com/mastra-ai/mastra/commit/7b0ad1f5c53dc118c6da12ae82ae2587037dc2b8), [`62666c3`](https://github.com/mastra-ai/mastra/commit/62666c367eaeac3941ead454b1d38810cc855721), [`4af2160`](https://github.com/mastra-ai/mastra/commit/4af2160322f4718cac421930cce85641e9512389), [`136c959`](https://github.com/mastra-ai/mastra/commit/136c9592fb0eeb0cd212f28629d8a29b7557a2fc), [`4df7cc7`](https://github.com/mastra-ai/mastra/commit/4df7cc79342fd065fe7fdeef93c094db14b12bcd), [`aca3121`](https://github.com/mastra-ai/mastra/commit/aca31211233dac25459f140ea4fcfb3a5af64c18), [`9cdf38e`](https://github.com/mastra-ai/mastra/commit/9cdf38e58506e1109c8b38f97cd7770978a4218e), [`990851e`](https://github.com/mastra-ai/mastra/commit/990851edcb0e30be5c2c18b6532f1a876cc2d335), [`6068a6c`](https://github.com/mastra-ai/mastra/commit/6068a6c42950fad3ebfc92346417896ba60803d2), [`00106be`](https://github.com/mastra-ai/mastra/commit/00106bede59b81e5b0e9cd6aad8d3b5dbc336387), [`e2a079c`](https://github.com/mastra-ai/mastra/commit/e2a079cc3755b1895f7bd5dc36e9be81b11c7c22), [`534a456`](https://github.com/mastra-ai/mastra/commit/534a456a25e4df1e5407e7e632f4cb3b1fa14f9d), [`36bae07`](https://github.com/mastra-ai/mastra/commit/36bae07c0e70b1b3006f2fd20830e8883dcbd066)]:
|
|
35
|
+
- @mastra/core@1.33.0-alpha.7
|
|
36
|
+
|
|
3
37
|
## 1.4.1
|
|
4
38
|
|
|
5
39
|
### Patch Changes
|