@mastra/mcp-docs-server 0.13.44 → 0.13.45
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/.docs/organized/changelogs/%40internal%2Fchangeset-cli.md +2 -0
- package/.docs/organized/changelogs/%40internal%2Fexternal-types.md +2 -0
- package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +201 -1
- package/.docs/organized/changelogs/%40internal%2Ftypes-builder.md +2 -0
- package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +251 -51
- package/.docs/organized/changelogs/%40mastra%2Fastra.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fchroma.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fcloud.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +422 -222
- package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Flance.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Floggers.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmssql.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Frag.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Freact.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +72 -0
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-azure.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-gladia.md +104 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google-gemini-live.md +49 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +201 -1
- package/.docs/organized/changelogs/create-mastra.md +201 -1
- package/.docs/organized/changelogs/mastra.md +201 -1
- package/.docs/raw/agents/adding-voice.mdx +49 -0
- package/.docs/raw/course/01-first-agent/05-running-playground.md +5 -5
- package/.docs/raw/course/01-first-agent/09-testing-your-agent.md +3 -3
- package/.docs/raw/course/01-first-agent/13-testing-your-tool.md +3 -3
- package/.docs/raw/course/01-first-agent/17-testing-memory.md +2 -2
- package/.docs/raw/course/04-workflows/07-using-playground.md +1 -1
- package/.docs/raw/frameworks/agentic-uis/ai-sdk.mdx +23 -1
- package/.docs/raw/reference/client-js/memory.mdx +43 -0
- package/.docs/raw/reference/core/mastra-class.mdx +8 -0
- package/.docs/raw/reference/core/mastra-model-gateway.mdx +223 -0
- package/.docs/raw/reference/scorers/answer-relevancy.mdx +28 -98
- package/.docs/raw/reference/scorers/answer-similarity.mdx +12 -258
- package/.docs/raw/reference/scorers/bias.mdx +29 -87
- package/.docs/raw/reference/scorers/completeness.mdx +32 -91
- package/.docs/raw/reference/scorers/content-similarity.mdx +29 -99
- package/.docs/raw/reference/scorers/context-precision.mdx +28 -130
- package/.docs/raw/reference/scorers/faithfulness.mdx +28 -101
- package/.docs/raw/reference/scorers/hallucination.mdx +28 -103
- package/.docs/raw/reference/scorers/keyword-coverage.mdx +28 -107
- package/.docs/raw/reference/scorers/textual-difference.mdx +27 -100
- package/.docs/raw/reference/scorers/tone-consistency.mdx +25 -98
- package/.docs/raw/reference/scorers/toxicity.mdx +29 -92
- package/.docs/raw/reference/storage/cloudflare-d1.mdx +37 -0
- package/.docs/raw/reference/storage/lance.mdx +33 -0
- package/.docs/raw/reference/storage/libsql.mdx +37 -0
- package/.docs/raw/reference/storage/mongodb.mdx +39 -0
- package/.docs/raw/reference/storage/mssql.mdx +37 -0
- package/.docs/raw/reference/storage/postgresql.mdx +37 -0
- package/.docs/raw/reference/streaming/agents/stream.mdx +7 -0
- package/.docs/raw/reference/voice/composite-voice.mdx +71 -28
- package/.docs/raw/reference/voice/voice.listen.mdx +86 -52
- package/.docs/raw/reference/voice/voice.speak.mdx +75 -40
- package/.docs/raw/voice/overview.mdx +67 -0
- package/.docs/raw/workflows/control-flow.mdx +180 -0
- package/CHANGELOG.md +20 -0
- package/dist/{chunk-TUAHUTTB.js → chunk-VE65X75W.js} +24 -4
- package/dist/prepare-docs/package-changes.d.ts.map +1 -1
- package/dist/prepare-docs/prepare.js +1 -1
- package/dist/stdio.js +1 -1
- package/package.json +5 -5
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @mastra/rag
|
|
2
2
|
|
|
3
|
+
## 1.3.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Add metadata filtering support a GraphRag (#10352) ([#10403](https://github.com/mastra-ai/mastra/pull/10403))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`5657314`](https://github.com/mastra-ai/mastra/commit/5657314a1f9d49019bb53f357fa48f75a69247ca), [`e5aca78`](https://github.com/mastra-ai/mastra/commit/e5aca78bb7f263bb8b470bedae81efe9805d7544), [`33a607a`](https://github.com/mastra-ai/mastra/commit/33a607a1f716c2029d4a1ff1603dd756129a33b3), [`cc10fc1`](https://github.com/mastra-ai/mastra/commit/cc10fc192d9f527c71a23cc9def10d8718935ee1), [`1f7ee84`](https://github.com/mastra-ai/mastra/commit/1f7ee841a643ef12d90392125881f06fdf877293), [`e7d5149`](https://github.com/mastra-ai/mastra/commit/e7d514995260b63b2108308e85c64de37dcd0f71), [`f195082`](https://github.com/mastra-ai/mastra/commit/f1950822a2425d5ccae78c5d010e02ddb027a869), [`d9986dd`](https://github.com/mastra-ai/mastra/commit/d9986dd3513f7ca3244a8e599a440ccf4d8bc28b), [`a45b0f0`](https://github.com/mastra-ai/mastra/commit/a45b0f0cd19eab1fe4deceae3abf029442c22f74), [`f6e8eb3`](https://github.com/mastra-ai/mastra/commit/f6e8eb3dac53b70b06e906b2818b1d2a5b0486d7), [`ce57a2b`](https://github.com/mastra-ai/mastra/commit/ce57a2b62fd0d5f6532e4ecd1ba9ba93ac9b95fc), [`3236f35`](https://github.com/mastra-ai/mastra/commit/3236f352ae13cc8552c2965164e97bd125dae48d), [`ce57a2b`](https://github.com/mastra-ai/mastra/commit/ce57a2b62fd0d5f6532e4ecd1ba9ba93ac9b95fc), [`0230321`](https://github.com/mastra-ai/mastra/commit/02303217870bedea0ef009bea9a952f24ed38aaf), [`7b541f4`](https://github.com/mastra-ai/mastra/commit/7b541f49eda6f5a87b738198edbd136927599475), [`0eea842`](https://github.com/mastra-ai/mastra/commit/0eea8423cbdd37f2111593c6f7d2efcde4b7e4ce), [`63ae8a2`](https://github.com/mastra-ai/mastra/commit/63ae8a22c0c09bbb8b9779f5f38934cd75f616af), [`bf810c5`](https://github.com/mastra-ai/mastra/commit/bf810c5c561bd8ef221c0f6bd84e69770b9a38cc), [`ac7ef07`](https://github.com/mastra-ai/mastra/commit/ac7ef07633caee89707142171d2873c888ffef85), [`522f0b4`](https://github.com/mastra-ai/mastra/commit/522f0b45330719858794eabffffde4f343f55549), [`bf810c5`](https://github.com/mastra-ai/mastra/commit/bf810c5c561bd8ef221c0f6bd84e69770b9a38cc), [`8b51d55`](https://github.com/mastra-ai/mastra/commit/8b51d55bae531edf7e383958d7ecee04df31f5d5), [`2131ac5`](https://github.com/mastra-ai/mastra/commit/2131ac571d5065f0a656c57494bca98691bb7609)]:
|
|
10
|
+
- @mastra/core@0.24.6
|
|
11
|
+
|
|
12
|
+
## 1.3.6-alpha.0
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Add metadata filtering support a GraphRag (#10352) ([#10403](https://github.com/mastra-ai/mastra/pull/10403))
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [[`5657314`](https://github.com/mastra-ai/mastra/commit/5657314a1f9d49019bb53f357fa48f75a69247ca), [`e5aca78`](https://github.com/mastra-ai/mastra/commit/e5aca78bb7f263bb8b470bedae81efe9805d7544), [`33a607a`](https://github.com/mastra-ai/mastra/commit/33a607a1f716c2029d4a1ff1603dd756129a33b3), [`cc10fc1`](https://github.com/mastra-ai/mastra/commit/cc10fc192d9f527c71a23cc9def10d8718935ee1), [`1f7ee84`](https://github.com/mastra-ai/mastra/commit/1f7ee841a643ef12d90392125881f06fdf877293), [`e7d5149`](https://github.com/mastra-ai/mastra/commit/e7d514995260b63b2108308e85c64de37dcd0f71), [`f195082`](https://github.com/mastra-ai/mastra/commit/f1950822a2425d5ccae78c5d010e02ddb027a869), [`d9986dd`](https://github.com/mastra-ai/mastra/commit/d9986dd3513f7ca3244a8e599a440ccf4d8bc28b), [`a45b0f0`](https://github.com/mastra-ai/mastra/commit/a45b0f0cd19eab1fe4deceae3abf029442c22f74), [`f6e8eb3`](https://github.com/mastra-ai/mastra/commit/f6e8eb3dac53b70b06e906b2818b1d2a5b0486d7), [`ce57a2b`](https://github.com/mastra-ai/mastra/commit/ce57a2b62fd0d5f6532e4ecd1ba9ba93ac9b95fc), [`3236f35`](https://github.com/mastra-ai/mastra/commit/3236f352ae13cc8552c2965164e97bd125dae48d), [`ce57a2b`](https://github.com/mastra-ai/mastra/commit/ce57a2b62fd0d5f6532e4ecd1ba9ba93ac9b95fc), [`0230321`](https://github.com/mastra-ai/mastra/commit/02303217870bedea0ef009bea9a952f24ed38aaf), [`7b541f4`](https://github.com/mastra-ai/mastra/commit/7b541f49eda6f5a87b738198edbd136927599475), [`0eea842`](https://github.com/mastra-ai/mastra/commit/0eea8423cbdd37f2111593c6f7d2efcde4b7e4ce), [`63ae8a2`](https://github.com/mastra-ai/mastra/commit/63ae8a22c0c09bbb8b9779f5f38934cd75f616af), [`bf810c5`](https://github.com/mastra-ai/mastra/commit/bf810c5c561bd8ef221c0f6bd84e69770b9a38cc), [`ac7ef07`](https://github.com/mastra-ai/mastra/commit/ac7ef07633caee89707142171d2873c888ffef85), [`522f0b4`](https://github.com/mastra-ai/mastra/commit/522f0b45330719858794eabffffde4f343f55549), [`bf810c5`](https://github.com/mastra-ai/mastra/commit/bf810c5c561bd8ef221c0f6bd84e69770b9a38cc), [`8b51d55`](https://github.com/mastra-ai/mastra/commit/8b51d55bae531edf7e383958d7ecee04df31f5d5), [`2131ac5`](https://github.com/mastra-ai/mastra/commit/2131ac571d5065f0a656c57494bca98691bb7609)]:
|
|
19
|
+
- @mastra/core@0.24.6-alpha.0
|
|
20
|
+
|
|
3
21
|
## 1.3.5
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -298,5 +316,187 @@
|
|
|
298
316
|
|
|
299
317
|
- [#7124](https://github.com/mastra-ai/mastra/pull/7124) [`29de0e1`](https://github.com/mastra-ai/mastra/commit/29de0e1b0a7173317ae7d1ab0c0993167c659f2b) Thanks [@abhiaiyer91](https://github.com/abhiaiyer91)! - MastraEmbeddingModel and ts hack
|
|
300
318
|
|
|
319
|
+
- [#7120](https://github.com/mastra-ai/mastra/pull/7120) [`b415a4e`](https://github.com/mastra-ai/mastra/commit/b415a4e05b2546ccb9b5ba31a2bdf23deb1c7fa8) Thanks [@NikAiyer](https://github.com/NikAiyer)! - added providerOptions to createVectorQueryTool and createGraphRAGTool
|
|
320
|
+
|
|
321
|
+
- [#7125](https://github.com/mastra-ai/mastra/pull/7125) [`6ac697e`](https://github.com/mastra-ai/mastra/commit/6ac697edcc2435482c247cba615277ec4765dcc4) Thanks [@abhiaiyer91](https://github.com/abhiaiyer91)! - improveEmbeddingModelStuff
|
|
322
|
+
|
|
323
|
+
- Updated dependencies [[`637f323`](https://github.com/mastra-ai/mastra/commit/637f32371d79a8f78c52c0d53411af0915fcec67), [`29de0e1`](https://github.com/mastra-ai/mastra/commit/29de0e1b0a7173317ae7d1ab0c0993167c659f2b), [`6ac697e`](https://github.com/mastra-ai/mastra/commit/6ac697edcc2435482c247cba615277ec4765dcc4)]:
|
|
324
|
+
- @mastra/core@0.15.3-alpha.1
|
|
325
|
+
|
|
326
|
+
## 1.2.2
|
|
327
|
+
|
|
328
|
+
### Patch Changes
|
|
329
|
+
|
|
330
|
+
- [`c6113ed`](https://github.com/mastra-ai/mastra/commit/c6113ed7f9df297e130d94436ceee310273d6430) Thanks [@wardpeet](https://github.com/wardpeet)! - Fix peerdpes for @mastra/core
|
|
331
|
+
|
|
332
|
+
- Updated dependencies []:
|
|
333
|
+
- @mastra/core@0.15.2
|
|
334
|
+
|
|
335
|
+
## 1.2.1
|
|
336
|
+
|
|
337
|
+
### Patch Changes
|
|
338
|
+
|
|
339
|
+
- [`95b2aa9`](https://github.com/mastra-ai/mastra/commit/95b2aa908230919e67efcac0d69005a2d5745298) Thanks [@wardpeet](https://github.com/wardpeet)! - Fix peerdeps @mastra/core
|
|
340
|
+
|
|
341
|
+
- Updated dependencies []:
|
|
342
|
+
- @mastra/core@0.15.1
|
|
343
|
+
|
|
344
|
+
## 1.2.0
|
|
345
|
+
|
|
346
|
+
### Minor Changes
|
|
347
|
+
|
|
348
|
+
- [#7028](https://github.com/mastra-ai/mastra/pull/7028) [`da58ccc`](https://github.com/mastra-ai/mastra/commit/da58ccc1f2ac33da0cb97b00443fc6208b45bdec) Thanks [@wardpeet](https://github.com/wardpeet)! - Bump core peerdependency
|
|
349
|
+
|
|
350
|
+
- [#7032](https://github.com/mastra-ai/mastra/pull/7032) [`1191ce9`](https://github.com/mastra-ai/mastra/commit/1191ce946b40ed291e7877a349f8388e3cff7e5c) Thanks [@wardpeet](https://github.com/wardpeet)! - Bump zod peerdep to 3.25.0 to support both v3/v4
|
|
351
|
+
|
|
352
|
+
### Patch Changes
|
|
353
|
+
|
|
354
|
+
- [#6996](https://github.com/mastra-ai/mastra/pull/6996) [`24d9ee3`](https://github.com/mastra-ai/mastra/commit/24d9ee3db1c09d15f27a5d0971b102abcfcf7dfd) Thanks [@wardpeet](https://github.com/wardpeet)! - Improve type resolving
|
|
355
|
+
|
|
356
|
+
- [#6982](https://github.com/mastra-ai/mastra/pull/6982) [`94e9f54`](https://github.com/mastra-ai/mastra/commit/94e9f547d66ef7cd01d9075ab53b5ca9a1cae100) Thanks [@wardpeet](https://github.com/wardpeet)! - Fix AI peerdeps for NPM install
|
|
357
|
+
|
|
358
|
+
- [#6942](https://github.com/mastra-ai/mastra/pull/6942) [`ca8ec2f`](https://github.com/mastra-ai/mastra/commit/ca8ec2f61884b9dfec5fc0d5f4f29d281ad13c01) Thanks [@wardpeet](https://github.com/wardpeet)! - Add zod as peerdeps for all packages
|
|
359
|
+
|
|
360
|
+
- Updated dependencies [[`0778757`](https://github.com/mastra-ai/mastra/commit/07787570e4addbd501522037bd2542c3d9e26822), [`943a7f3`](https://github.com/mastra-ai/mastra/commit/943a7f3dbc6a8ab3f9b7bc7c8a1c5b319c3d7f56), [`bf504a8`](https://github.com/mastra-ai/mastra/commit/bf504a833051f6f321d832cc7d631f3cb86d657b), [`be49354`](https://github.com/mastra-ai/mastra/commit/be493546dca540101923ec700feb31f9a13939f2), [`d591ab3`](https://github.com/mastra-ai/mastra/commit/d591ab3ecc985c1870c0db347f8d7a20f7360536), [`ba82abe`](https://github.com/mastra-ai/mastra/commit/ba82abe76e869316bb5a9c95e8ea3946f3436fae), [`727f7e5`](https://github.com/mastra-ai/mastra/commit/727f7e5086e62e0dfe3356fb6dcd8bcb420af246), [`e6f5046`](https://github.com/mastra-ai/mastra/commit/e6f50467aff317e67e8bd74c485c3fbe2a5a6db1), [`82d9f64`](https://github.com/mastra-ai/mastra/commit/82d9f647fbe4f0177320e7c05073fce88599aa95), [`2e58325`](https://github.com/mastra-ai/mastra/commit/2e58325beb170f5b92f856e27d915cd26917e5e6), [`1191ce9`](https://github.com/mastra-ai/mastra/commit/1191ce946b40ed291e7877a349f8388e3cff7e5c), [`4189486`](https://github.com/mastra-ai/mastra/commit/4189486c6718fda78347bdf4ce4d3fc33b2236e1), [`ca8ec2f`](https://github.com/mastra-ai/mastra/commit/ca8ec2f61884b9dfec5fc0d5f4f29d281ad13c01), [`9613558`](https://github.com/mastra-ai/mastra/commit/9613558e6475f4710e05d1be7553a32ee7bddc20)]:
|
|
361
|
+
- @mastra/core@0.15.0
|
|
362
|
+
|
|
363
|
+
## 1.2.0-alpha.2
|
|
364
|
+
|
|
365
|
+
### Minor Changes
|
|
366
|
+
|
|
367
|
+
- [#7032](https://github.com/mastra-ai/mastra/pull/7032) [`1191ce9`](https://github.com/mastra-ai/mastra/commit/1191ce946b40ed291e7877a349f8388e3cff7e5c) Thanks [@wardpeet](https://github.com/wardpeet)! - Bump zod peerdep to 3.25.0 to support both v3/v4
|
|
368
|
+
|
|
369
|
+
### Patch Changes
|
|
370
|
+
|
|
371
|
+
- Updated dependencies [[`1191ce9`](https://github.com/mastra-ai/mastra/commit/1191ce946b40ed291e7877a349f8388e3cff7e5c)]:
|
|
372
|
+
- @mastra/core@0.15.0-alpha.4
|
|
373
|
+
|
|
374
|
+
## 1.2.0-alpha.1
|
|
375
|
+
|
|
376
|
+
### Minor Changes
|
|
377
|
+
|
|
378
|
+
- [#7028](https://github.com/mastra-ai/mastra/pull/7028) [`da58ccc`](https://github.com/mastra-ai/mastra/commit/da58ccc1f2ac33da0cb97b00443fc6208b45bdec) Thanks [@wardpeet](https://github.com/wardpeet)! - Bump core peerdependency
|
|
379
|
+
|
|
380
|
+
### Patch Changes
|
|
381
|
+
|
|
382
|
+
- Updated dependencies []:
|
|
383
|
+
- @mastra/core@0.15.0-alpha.3
|
|
384
|
+
|
|
385
|
+
## 1.1.1-alpha.0
|
|
386
|
+
|
|
387
|
+
### Patch Changes
|
|
388
|
+
|
|
389
|
+
- [#6996](https://github.com/mastra-ai/mastra/pull/6996) [`24d9ee3`](https://github.com/mastra-ai/mastra/commit/24d9ee3db1c09d15f27a5d0971b102abcfcf7dfd) Thanks [@wardpeet](https://github.com/wardpeet)! - Improve type resolving
|
|
390
|
+
|
|
391
|
+
- [#6982](https://github.com/mastra-ai/mastra/pull/6982) [`94e9f54`](https://github.com/mastra-ai/mastra/commit/94e9f547d66ef7cd01d9075ab53b5ca9a1cae100) Thanks [@wardpeet](https://github.com/wardpeet)! - Fix AI peerdeps for NPM install
|
|
392
|
+
|
|
393
|
+
- [#6942](https://github.com/mastra-ai/mastra/pull/6942) [`ca8ec2f`](https://github.com/mastra-ai/mastra/commit/ca8ec2f61884b9dfec5fc0d5f4f29d281ad13c01) Thanks [@wardpeet](https://github.com/wardpeet)! - Add zod as peerdeps for all packages
|
|
394
|
+
|
|
395
|
+
- Updated dependencies [[`943a7f3`](https://github.com/mastra-ai/mastra/commit/943a7f3dbc6a8ab3f9b7bc7c8a1c5b319c3d7f56), [`be49354`](https://github.com/mastra-ai/mastra/commit/be493546dca540101923ec700feb31f9a13939f2), [`d591ab3`](https://github.com/mastra-ai/mastra/commit/d591ab3ecc985c1870c0db347f8d7a20f7360536), [`ba82abe`](https://github.com/mastra-ai/mastra/commit/ba82abe76e869316bb5a9c95e8ea3946f3436fae), [`727f7e5`](https://github.com/mastra-ai/mastra/commit/727f7e5086e62e0dfe3356fb6dcd8bcb420af246), [`82d9f64`](https://github.com/mastra-ai/mastra/commit/82d9f647fbe4f0177320e7c05073fce88599aa95), [`4189486`](https://github.com/mastra-ai/mastra/commit/4189486c6718fda78347bdf4ce4d3fc33b2236e1), [`ca8ec2f`](https://github.com/mastra-ai/mastra/commit/ca8ec2f61884b9dfec5fc0d5f4f29d281ad13c01)]:
|
|
396
|
+
- @mastra/core@0.14.2-alpha.1
|
|
397
|
+
|
|
398
|
+
## 1.1.0
|
|
399
|
+
|
|
400
|
+
### Minor Changes
|
|
401
|
+
|
|
402
|
+
- 03997ae: Update peer deps of core
|
|
403
|
+
|
|
404
|
+
### Patch Changes
|
|
405
|
+
|
|
406
|
+
- 2454423: Agentic loop and streaming workflow: generateVNext and streamVNext
|
|
407
|
+
- Updated dependencies [227c7e6]
|
|
408
|
+
- Updated dependencies [12cae67]
|
|
409
|
+
- Updated dependencies [fd3a3eb]
|
|
410
|
+
- Updated dependencies [6faaee5]
|
|
411
|
+
- Updated dependencies [4232b14]
|
|
412
|
+
- Updated dependencies [a89de7e]
|
|
413
|
+
- Updated dependencies [5a37d0c]
|
|
414
|
+
- Updated dependencies [4bde0cb]
|
|
415
|
+
- Updated dependencies [cf4f357]
|
|
416
|
+
- Updated dependencies [ad888a2]
|
|
417
|
+
- Updated dependencies [481751d]
|
|
418
|
+
- Updated dependencies [2454423]
|
|
419
|
+
- Updated dependencies [194e395]
|
|
420
|
+
- Updated dependencies [a722c0b]
|
|
421
|
+
- Updated dependencies [c30bca8]
|
|
422
|
+
- Updated dependencies [3b5fec7]
|
|
423
|
+
- Updated dependencies [a8f129d]
|
|
424
|
+
- @mastra/core@0.14.0
|
|
425
|
+
|
|
426
|
+
## 1.1.0-alpha.1
|
|
427
|
+
|
|
428
|
+
### Minor Changes
|
|
429
|
+
|
|
430
|
+
- 03997ae: Update peer deps of core
|
|
431
|
+
|
|
432
|
+
### Patch Changes
|
|
433
|
+
|
|
434
|
+
- @mastra/core@0.14.0-alpha.7
|
|
435
|
+
|
|
436
|
+
## 1.0.9-alpha.0
|
|
437
|
+
|
|
438
|
+
### Patch Changes
|
|
439
|
+
|
|
440
|
+
- a741dde: generateVNext plumbing
|
|
441
|
+
- Updated dependencies [0a7f675]
|
|
442
|
+
- Updated dependencies [12cae67]
|
|
443
|
+
- Updated dependencies [5a37d0c]
|
|
444
|
+
- Updated dependencies [4bde0cb]
|
|
445
|
+
- Updated dependencies [1a80071]
|
|
446
|
+
- Updated dependencies [36a3be8]
|
|
447
|
+
- Updated dependencies [361757b]
|
|
448
|
+
- Updated dependencies [2bb9955]
|
|
449
|
+
- Updated dependencies [2454423]
|
|
450
|
+
- Updated dependencies [a44d91e]
|
|
451
|
+
- Updated dependencies [dfb91e9]
|
|
452
|
+
- Updated dependencies [a741dde]
|
|
453
|
+
- Updated dependencies [7cb3fc0]
|
|
454
|
+
- Updated dependencies [195eabb]
|
|
455
|
+
- Updated dependencies [b78b95b]
|
|
456
|
+
- @mastra/core@0.14.0-alpha.4
|
|
457
|
+
|
|
458
|
+
## 1.0.8
|
|
459
|
+
|
|
460
|
+
### Patch Changes
|
|
461
|
+
|
|
462
|
+
- 1be6004: Added semantic markdown chunking strategy.
|
|
463
|
+
- Updated dependencies [d5330bf]
|
|
464
|
+
- Updated dependencies [2e74797]
|
|
465
|
+
- Updated dependencies [8388649]
|
|
466
|
+
- Updated dependencies [a239d41]
|
|
467
|
+
- Updated dependencies [dd94a26]
|
|
468
|
+
- Updated dependencies [3ba6772]
|
|
469
|
+
- Updated dependencies [b5cf2a3]
|
|
470
|
+
- Updated dependencies [2fff911]
|
|
471
|
+
- Updated dependencies [b32c50d]
|
|
472
|
+
- Updated dependencies [63449d0]
|
|
473
|
+
- Updated dependencies [121a3f8]
|
|
474
|
+
- Updated dependencies [ec510e7]
|
|
475
|
+
- @mastra/core@0.13.2
|
|
476
|
+
|
|
477
|
+
## 1.0.8-alpha.0
|
|
478
|
+
|
|
479
|
+
### Patch Changes
|
|
480
|
+
|
|
481
|
+
- 1be6004: Added semantic markdown chunking strategy.
|
|
482
|
+
- Updated dependencies [8388649]
|
|
483
|
+
- Updated dependencies [dd94a26]
|
|
484
|
+
- Updated dependencies [3ba6772]
|
|
485
|
+
- Updated dependencies [2fff911]
|
|
486
|
+
- @mastra/core@0.13.2-alpha.0
|
|
487
|
+
|
|
488
|
+
## 1.0.7
|
|
489
|
+
|
|
490
|
+
### Patch Changes
|
|
301
491
|
|
|
302
|
-
|
|
492
|
+
- 351b36e: update evals and rag ai sdk package versions
|
|
493
|
+
- ccd519c: Add sentence chunking strategy and strategy-specific parameter validation for all existing strategies.
|
|
494
|
+
- 4a406ec: fixes TypeScript declaration file imports to ensure proper ESM compatibility
|
|
495
|
+
- Updated dependencies [cb36de0]
|
|
496
|
+
- Updated dependencies [d0496e6]
|
|
497
|
+
- Updated dependencies [a82b851]
|
|
498
|
+
- Updated dependencies [ea0c5f2]
|
|
499
|
+
- Updated dependencies [41a0a0e]
|
|
500
|
+
- Updated dependencies [2871020]
|
|
501
|
+
|
|
502
|
+
... 2670 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,69 @@
|
|
|
1
1
|
# @mastra/react-hooks
|
|
2
2
|
|
|
3
|
+
## 0.0.21
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Configurable resourceId in react useChat ([#10561](https://github.com/mastra-ai/mastra/pull/10561))
|
|
8
|
+
|
|
9
|
+
- fix(agent): persist messages before tool suspension ([#10542](https://github.com/mastra-ai/mastra/pull/10542))
|
|
10
|
+
|
|
11
|
+
Fixes issues where thread and messages were not saved before suspension when tools require approval or call suspend() during execution. This caused conversation history to be lost if users refreshed during tool approval or suspension.
|
|
12
|
+
|
|
13
|
+
**Backend changes (@mastra/core):**
|
|
14
|
+
- Add assistant messages to messageList immediately after LLM execution
|
|
15
|
+
- Flush messages synchronously before suspension to persist state
|
|
16
|
+
- Create thread if it doesn't exist before flushing
|
|
17
|
+
- Add metadata helpers to persist and remove tool approval state
|
|
18
|
+
- Pass saveQueueManager and memory context through workflow for immediate persistence
|
|
19
|
+
|
|
20
|
+
**Frontend changes (@mastra/react):**
|
|
21
|
+
- Extract runId from pending approvals to enable resumption after refresh
|
|
22
|
+
- Convert `pendingToolApprovals` (DB format) to `requireApprovalMetadata` (runtime format)
|
|
23
|
+
- Handle both `dynamic-tool` and `tool-{NAME}` part types for approval state
|
|
24
|
+
- Change runId from hardcoded `agentId` to unique `uuid()`
|
|
25
|
+
|
|
26
|
+
**UI changes (@mastra/playground-ui):**
|
|
27
|
+
- Handle tool calls awaiting approval in message initialization
|
|
28
|
+
- Convert approval metadata format when loading initial messages
|
|
29
|
+
|
|
30
|
+
Fixes #9745, #9906
|
|
31
|
+
|
|
32
|
+
- Updated dependencies []:
|
|
33
|
+
- @mastra/client-js@0.16.15
|
|
34
|
+
|
|
35
|
+
## 0.0.21-alpha.0
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- Configurable resourceId in react useChat ([#10561](https://github.com/mastra-ai/mastra/pull/10561))
|
|
40
|
+
|
|
41
|
+
- fix(agent): persist messages before tool suspension ([#10542](https://github.com/mastra-ai/mastra/pull/10542))
|
|
42
|
+
|
|
43
|
+
Fixes issues where thread and messages were not saved before suspension when tools require approval or call suspend() during execution. This caused conversation history to be lost if users refreshed during tool approval or suspension.
|
|
44
|
+
|
|
45
|
+
**Backend changes (@mastra/core):**
|
|
46
|
+
- Add assistant messages to messageList immediately after LLM execution
|
|
47
|
+
- Flush messages synchronously before suspension to persist state
|
|
48
|
+
- Create thread if it doesn't exist before flushing
|
|
49
|
+
- Add metadata helpers to persist and remove tool approval state
|
|
50
|
+
- Pass saveQueueManager and memory context through workflow for immediate persistence
|
|
51
|
+
|
|
52
|
+
**Frontend changes (@mastra/react):**
|
|
53
|
+
- Extract runId from pending approvals to enable resumption after refresh
|
|
54
|
+
- Convert `pendingToolApprovals` (DB format) to `requireApprovalMetadata` (runtime format)
|
|
55
|
+
- Handle both `dynamic-tool` and `tool-{NAME}` part types for approval state
|
|
56
|
+
- Change runId from hardcoded `agentId` to unique `uuid()`
|
|
57
|
+
|
|
58
|
+
**UI changes (@mastra/playground-ui):**
|
|
59
|
+
- Handle tool calls awaiting approval in message initialization
|
|
60
|
+
- Convert approval metadata format when loading initial messages
|
|
61
|
+
|
|
62
|
+
Fixes #9745, #9906
|
|
63
|
+
|
|
64
|
+
- Updated dependencies []:
|
|
65
|
+
- @mastra/client-js@0.16.15-alpha.0
|
|
66
|
+
|
|
3
67
|
## 0.0.20
|
|
4
68
|
|
|
5
69
|
### Patch Changes
|
|
@@ -298,5 +362,141 @@
|
|
|
298
362
|
|
|
299
363
|
- handle error case in react sdk ([#8676](https://github.com/mastra-ai/mastra/pull/8676))
|
|
300
364
|
|
|
365
|
+
- fix maxSteps model settings not being passed to generate and stream endpoints ([#8627](https://github.com/mastra-ai/mastra/pull/8627))
|
|
366
|
+
|
|
367
|
+
- Updated dependencies [[`7b1ef57`](https://github.com/mastra-ai/mastra/commit/7b1ef57fc071c2aa2a2e32905b18cd88719c5a39), [`78cfb6b`](https://github.com/mastra-ai/mastra/commit/78cfb6b66fe88bc848105fccb6459fd75413ec87)]:
|
|
368
|
+
- @mastra/client-js@0.16.0-alpha.0
|
|
369
|
+
|
|
370
|
+
## 0.0.5
|
|
371
|
+
|
|
372
|
+
### Patch Changes
|
|
373
|
+
|
|
374
|
+
- Updated dependencies []:
|
|
375
|
+
- @mastra/client-js@0.15.2
|
|
376
|
+
|
|
377
|
+
## 0.0.5-alpha.1
|
|
378
|
+
|
|
379
|
+
### Patch Changes
|
|
380
|
+
|
|
381
|
+
- Updated dependencies []:
|
|
382
|
+
- @mastra/client-js@0.15.2-alpha.1
|
|
383
|
+
|
|
384
|
+
## 0.0.5-alpha.0
|
|
385
|
+
|
|
386
|
+
### Patch Changes
|
|
387
|
+
|
|
388
|
+
- Updated dependencies []:
|
|
389
|
+
- @mastra/client-js@0.15.2-alpha.0
|
|
390
|
+
|
|
391
|
+
## 0.0.4
|
|
392
|
+
|
|
393
|
+
### Patch Changes
|
|
394
|
+
|
|
395
|
+
- Mutable shared workflow run state ([#8545](https://github.com/mastra-ai/mastra/pull/8545))
|
|
396
|
+
|
|
397
|
+
- add tripwire reason in playground ([#8568](https://github.com/mastra-ai/mastra/pull/8568))
|
|
398
|
+
|
|
399
|
+
- type fixes and missing changeset ([#8545](https://github.com/mastra-ai/mastra/pull/8545))
|
|
400
|
+
|
|
401
|
+
- Convert WorkflowWatchResult to WorkflowResult in workflow graph ([#8541](https://github.com/mastra-ai/mastra/pull/8541))
|
|
402
|
+
|
|
403
|
+
- Updated dependencies [[`4783b30`](https://github.com/mastra-ai/mastra/commit/4783b3063efea887825514b783ba27f67912c26d), [`2aee9e7`](https://github.com/mastra-ai/mastra/commit/2aee9e7d188b8b256a4ddc203ccefb366b4867fa)]:
|
|
404
|
+
- @mastra/client-js@0.15.1
|
|
405
|
+
|
|
406
|
+
## 0.0.4-alpha.4
|
|
407
|
+
|
|
408
|
+
### Patch Changes
|
|
409
|
+
|
|
410
|
+
- Updated dependencies []:
|
|
411
|
+
- @mastra/client-js@0.15.1-alpha.4
|
|
412
|
+
|
|
413
|
+
## 0.0.4-alpha.3
|
|
414
|
+
|
|
415
|
+
### Patch Changes
|
|
416
|
+
|
|
417
|
+
- Updated dependencies []:
|
|
418
|
+
- @mastra/client-js@0.15.1-alpha.3
|
|
419
|
+
|
|
420
|
+
## 0.0.4-alpha.2
|
|
421
|
+
|
|
422
|
+
### Patch Changes
|
|
423
|
+
|
|
424
|
+
- Updated dependencies []:
|
|
425
|
+
- @mastra/client-js@0.15.1-alpha.2
|
|
426
|
+
|
|
427
|
+
## 0.0.4-alpha.1
|
|
428
|
+
|
|
429
|
+
### Patch Changes
|
|
430
|
+
|
|
431
|
+
- Mutable shared workflow run state ([#8545](https://github.com/mastra-ai/mastra/pull/8545))
|
|
432
|
+
|
|
433
|
+
- add tripwire reason in playground ([#8568](https://github.com/mastra-ai/mastra/pull/8568))
|
|
434
|
+
|
|
435
|
+
- type fixes and missing changeset ([#8545](https://github.com/mastra-ai/mastra/pull/8545))
|
|
436
|
+
|
|
437
|
+
- Convert WorkflowWatchResult to WorkflowResult in workflow graph ([#8541](https://github.com/mastra-ai/mastra/pull/8541))
|
|
438
|
+
|
|
439
|
+
- Updated dependencies [[`4783b30`](https://github.com/mastra-ai/mastra/commit/4783b3063efea887825514b783ba27f67912c26d), [`2aee9e7`](https://github.com/mastra-ai/mastra/commit/2aee9e7d188b8b256a4ddc203ccefb366b4867fa)]:
|
|
440
|
+
- @mastra/client-js@0.15.1-alpha.1
|
|
441
|
+
|
|
442
|
+
## 0.0.4-alpha.0
|
|
443
|
+
|
|
444
|
+
### Patch Changes
|
|
445
|
+
|
|
446
|
+
- Updated dependencies []:
|
|
447
|
+
- @mastra/client-js@0.15.1-alpha.0
|
|
448
|
+
|
|
449
|
+
## 0.0.3
|
|
450
|
+
|
|
451
|
+
### Patch Changes
|
|
452
|
+
|
|
453
|
+
- generateVNext into react SDK + to asistant ui message ([#8345](https://github.com/mastra-ai/mastra/pull/8345))
|
|
454
|
+
|
|
455
|
+
- distinguish between legacy and regular messages in agent chat for useChat usage ([#8409](https://github.com/mastra-ai/mastra/pull/8409))
|
|
456
|
+
|
|
457
|
+
- Updated dependencies [[`d41aee5`](https://github.com/mastra-ai/mastra/commit/d41aee526d124e35f42720a08e64043229193679), [`fbf6e32`](https://github.com/mastra-ai/mastra/commit/fbf6e324946332d0f5ed8930bf9d4d4479cefd7a), [`4753027`](https://github.com/mastra-ai/mastra/commit/4753027ee889288775c6958bdfeda03ff909af67)]:
|
|
458
|
+
- @mastra/client-js@0.15.0
|
|
459
|
+
|
|
460
|
+
## 0.0.3-alpha.0
|
|
461
|
+
|
|
462
|
+
### Patch Changes
|
|
463
|
+
|
|
464
|
+
- generateVNext into react SDK + to asistant ui message ([#8345](https://github.com/mastra-ai/mastra/pull/8345))
|
|
465
|
+
|
|
466
|
+
- distinguish between legacy and regular messages in agent chat for useChat usage ([#8409](https://github.com/mastra-ai/mastra/pull/8409))
|
|
467
|
+
|
|
468
|
+
- Updated dependencies [[`d41aee5`](https://github.com/mastra-ai/mastra/commit/d41aee526d124e35f42720a08e64043229193679), [`fbf6e32`](https://github.com/mastra-ai/mastra/commit/fbf6e324946332d0f5ed8930bf9d4d4479cefd7a), [`4753027`](https://github.com/mastra-ai/mastra/commit/4753027ee889288775c6958bdfeda03ff909af67)]:
|
|
469
|
+
- @mastra/client-js@0.15.0-alpha.0
|
|
470
|
+
|
|
471
|
+
## 0.0.2
|
|
472
|
+
|
|
473
|
+
### Patch Changes
|
|
474
|
+
|
|
475
|
+
- Updated dependencies []:
|
|
476
|
+
- @mastra/client-js@0.14.1
|
|
477
|
+
|
|
478
|
+
## 0.0.2-alpha.1
|
|
479
|
+
|
|
480
|
+
### Patch Changes
|
|
481
|
+
|
|
482
|
+
- Updated dependencies []:
|
|
483
|
+
- @mastra/client-js@0.14.1-alpha.1
|
|
484
|
+
|
|
485
|
+
## 0.0.2-alpha.0
|
|
486
|
+
|
|
487
|
+
### Patch Changes
|
|
488
|
+
|
|
489
|
+
- Updated dependencies []:
|
|
490
|
+
- @mastra/client-js@0.14.1-alpha.0
|
|
491
|
+
|
|
492
|
+
## 0.0.1
|
|
493
|
+
|
|
494
|
+
### Patch Changes
|
|
495
|
+
|
|
496
|
+
- modify the useMastraChat hook to useChat ([#8265](https://github.com/mastra-ai/mastra/pull/8265))
|
|
497
|
+
|
|
498
|
+
- Updated dependencies [[`dc099b4`](https://github.com/mastra-ai/mastra/commit/dc099b40fb31147ba3f362f98d991892033c4c67), [`5cb4596`](https://github.com/mastra-ai/mastra/commit/5cb4596c644104ea817bb0c5a07b8b1f8de595a8), [`86be6be`](https://github.com/mastra-ai/mastra/commit/86be6bee7e64b7d828a6b4eec283265c820dfa43), [`57b6dd5`](https://github.com/mastra-ai/mastra/commit/57b6dd50f9e6d92c0ed3e7199e6a92752025e3a1), [`ea8d386`](https://github.com/mastra-ai/mastra/commit/ea8d386cd8c5593664515fd5770c06bf2aa980ef), [`67b0f00`](https://github.com/mastra-ai/mastra/commit/67b0f005b520335c71fb85cbaa25df4ce8484a81), [`6f67656`](https://github.com/mastra-ai/mastra/commit/6f676562276926e2982401574d1e07157579be30)]:
|
|
499
|
+
- @mastra/client-js@0.14.0
|
|
500
|
+
|
|
301
501
|
|
|
302
|
-
...
|
|
502
|
+
... 16 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,77 @@
|
|
|
1
1
|
# @mastra/schema-compat
|
|
2
2
|
|
|
3
|
+
## 0.11.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fixed OpenAI schema compatibility when using `agent.generate()` or `agent.stream()` with `structuredOutput`. ([#10454](https://github.com/mastra-ai/mastra/pull/10454))
|
|
8
|
+
|
|
9
|
+
## Changes
|
|
10
|
+
- **Automatic transformation**: Zod schemas are now automatically transformed for OpenAI strict mode compatibility when using OpenAI models (including reasoning models like o1, o3, o4)
|
|
11
|
+
- **Optional field handling**: `.optional()` fields are converted to `.nullable()` with a transform that converts `null` → `undefined`, preserving optional semantics while satisfying OpenAI's strict mode requirements
|
|
12
|
+
- **Preserves nullable fields**: Intentionally `.nullable()` fields remain unchanged
|
|
13
|
+
- **Deep transformation**: Handles `.optional()` fields at any nesting level (objects, arrays, unions, etc.)
|
|
14
|
+
- **JSON Schema objects**: Not transformed, only Zod schemas
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
const agent = new Agent({
|
|
20
|
+
name: 'data-extractor',
|
|
21
|
+
model: { provider: 'openai', modelId: 'gpt-4o' },
|
|
22
|
+
instructions: 'Extract user information',
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const schema = z.object({
|
|
26
|
+
name: z.string(),
|
|
27
|
+
age: z.number().optional(),
|
|
28
|
+
deletedAt: z.date().nullable(),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
// Schema is automatically transformed for OpenAI compatibility
|
|
32
|
+
const result = await agent.generate('Extract: John, deleted yesterday', {
|
|
33
|
+
structuredOutput: { schema },
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// Result: { name: 'John', age: undefined, deletedAt: null }
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## 0.11.8-alpha.0
|
|
40
|
+
|
|
41
|
+
### Patch Changes
|
|
42
|
+
|
|
43
|
+
- Fixed OpenAI schema compatibility when using `agent.generate()` or `agent.stream()` with `structuredOutput`. ([#10454](https://github.com/mastra-ai/mastra/pull/10454))
|
|
44
|
+
|
|
45
|
+
## Changes
|
|
46
|
+
- **Automatic transformation**: Zod schemas are now automatically transformed for OpenAI strict mode compatibility when using OpenAI models (including reasoning models like o1, o3, o4)
|
|
47
|
+
- **Optional field handling**: `.optional()` fields are converted to `.nullable()` with a transform that converts `null` → `undefined`, preserving optional semantics while satisfying OpenAI's strict mode requirements
|
|
48
|
+
- **Preserves nullable fields**: Intentionally `.nullable()` fields remain unchanged
|
|
49
|
+
- **Deep transformation**: Handles `.optional()` fields at any nesting level (objects, arrays, unions, etc.)
|
|
50
|
+
- **JSON Schema objects**: Not transformed, only Zod schemas
|
|
51
|
+
|
|
52
|
+
## Example
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
const agent = new Agent({
|
|
56
|
+
name: 'data-extractor',
|
|
57
|
+
model: { provider: 'openai', modelId: 'gpt-4o' },
|
|
58
|
+
instructions: 'Extract user information',
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
const schema = z.object({
|
|
62
|
+
name: z.string(),
|
|
63
|
+
age: z.number().optional(),
|
|
64
|
+
deletedAt: z.date().nullable(),
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
// Schema is automatically transformed for OpenAI compatibility
|
|
68
|
+
const result = await agent.generate('Extract: John, deleted yesterday', {
|
|
69
|
+
structuredOutput: { schema },
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
// Result: { name: 'John', age: undefined, deletedAt: null }
|
|
73
|
+
```
|
|
74
|
+
|
|
3
75
|
## 0.11.7
|
|
4
76
|
|
|
5
77
|
### Patch Changes
|