@mastra/server 1.37.0-alpha.1 → 1.37.0-alpha.3

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 (320) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/_types/@mastra_schema-compat/dist/_types/@internal_ai-sdk-v4/dist/index.d.ts +7608 -0
  3. package/dist/_types/@mastra_schema-compat/dist/_types/@internal_ai-sdk-v5/dist/index.d.ts +9043 -0
  4. package/dist/_types/@mastra_schema-compat/dist/_types/@internal_ai-v6/dist/index.d.ts +13682 -0
  5. package/dist/_types/@mastra_schema-compat/dist/_types/@standard-schema_spec/dist/index.d.ts +119 -0
  6. package/dist/_types/@mastra_schema-compat/dist/index.d.ts +19 -0
  7. package/dist/_types/@mastra_schema-compat/dist/null-to-undefined.d.ts +24 -0
  8. package/dist/_types/@mastra_schema-compat/dist/provider-compats/anthropic.d.ts +20 -0
  9. package/dist/_types/@mastra_schema-compat/dist/provider-compats/deepseek.d.ts +21 -0
  10. package/dist/_types/@mastra_schema-compat/dist/provider-compats/google.d.ts +23 -0
  11. package/dist/_types/@mastra_schema-compat/dist/provider-compats/meta.d.ts +21 -0
  12. package/dist/_types/@mastra_schema-compat/dist/provider-compats/openai-reasoning.d.ts +10 -0
  13. package/dist/_types/@mastra_schema-compat/dist/provider-compats/openai.d.ts +25 -0
  14. package/dist/_types/@mastra_schema-compat/dist/schema-compatibility-v3.d.ts +315 -0
  15. package/dist/_types/@mastra_schema-compat/dist/schema-compatibility-v4.d.ts +304 -0
  16. package/dist/_types/@mastra_schema-compat/dist/schema-compatibility.d.ts +147 -0
  17. package/dist/_types/@mastra_schema-compat/dist/schema.d.ts +4 -0
  18. package/dist/_types/@mastra_schema-compat/dist/schema.types.d.ts +19 -0
  19. package/dist/_types/@mastra_schema-compat/dist/standard-schema/standard-schema.d.ts +107 -0
  20. package/dist/_types/@mastra_schema-compat/dist/standard-schema/standard-schema.types.d.ts +24 -0
  21. package/dist/_types/@mastra_schema-compat/dist/standard-schema-compat.d.ts +74 -0
  22. package/dist/_types/@mastra_schema-compat/dist/types.d.ts +6 -0
  23. package/dist/_types/@mastra_schema-compat/dist/utils.d.ts +96 -0
  24. package/dist/_types/@mastra_schema-compat/dist/zod-to-json.d.ts +17 -0
  25. package/dist/{api-schema-manifest-Z2JHGSRM.js → api-schema-manifest-NM2WQ53L.js} +4 -4
  26. package/dist/{api-schema-manifest-Z2JHGSRM.js.map → api-schema-manifest-NM2WQ53L.js.map} +1 -1
  27. package/dist/{api-schema-manifest-5TBFFQY7.cjs → api-schema-manifest-TNWGWAXQ.cjs} +6 -6
  28. package/dist/{api-schema-manifest-5TBFFQY7.cjs.map → api-schema-manifest-TNWGWAXQ.cjs.map} +1 -1
  29. package/dist/{chunk-YMWAMFXW.cjs → chunk-2IYQOU7P.cjs} +6 -6
  30. package/dist/{chunk-YMWAMFXW.cjs.map → chunk-2IYQOU7P.cjs.map} +1 -1
  31. package/dist/{chunk-2NAY2LUJ.js → chunk-37KOYJD5.js} +5 -5
  32. package/dist/{chunk-2NAY2LUJ.js.map → chunk-37KOYJD5.js.map} +1 -1
  33. package/dist/{chunk-4KSV4WWQ.js → chunk-42P4N3DD.js} +3 -3
  34. package/dist/{chunk-4KSV4WWQ.js.map → chunk-42P4N3DD.js.map} +1 -1
  35. package/dist/{chunk-5SPGEEYA.js → chunk-4TOPLN4A.js} +5 -5
  36. package/dist/{chunk-5SPGEEYA.js.map → chunk-4TOPLN4A.js.map} +1 -1
  37. package/dist/{chunk-2JXX4IPC.js → chunk-5AHL2NUD.js} +3 -3
  38. package/dist/{chunk-2JXX4IPC.js.map → chunk-5AHL2NUD.js.map} +1 -1
  39. package/dist/{chunk-4G7S52U3.cjs → chunk-5MXFNG6G.cjs} +5 -5
  40. package/dist/{chunk-4G7S52U3.cjs.map → chunk-5MXFNG6G.cjs.map} +1 -1
  41. package/dist/{chunk-7NM7SE7Y.js → chunk-5OQUKO6N.js} +4 -4
  42. package/dist/{chunk-7NM7SE7Y.js.map → chunk-5OQUKO6N.js.map} +1 -1
  43. package/dist/{chunk-6JCLSYOU.js → chunk-5PDA7RRM.js} +3 -3
  44. package/dist/{chunk-6JCLSYOU.js.map → chunk-5PDA7RRM.js.map} +1 -1
  45. package/dist/{chunk-I5WPFNWX.js → chunk-5WDXHJRW.js} +4 -4
  46. package/dist/{chunk-I5WPFNWX.js.map → chunk-5WDXHJRW.js.map} +1 -1
  47. package/dist/{chunk-4UFLVROK.cjs → chunk-6GNW5SFN.cjs} +13 -13
  48. package/dist/{chunk-4UFLVROK.cjs.map → chunk-6GNW5SFN.cjs.map} +1 -1
  49. package/dist/{chunk-CXEQO3RE.js → chunk-6HOTBZ3K.js} +3 -3
  50. package/dist/{chunk-CXEQO3RE.js.map → chunk-6HOTBZ3K.js.map} +1 -1
  51. package/dist/{chunk-OGYYXNGI.js → chunk-6L6ZOGEE.js} +3 -3
  52. package/dist/{chunk-OGYYXNGI.js.map → chunk-6L6ZOGEE.js.map} +1 -1
  53. package/dist/{chunk-RF7P3524.cjs → chunk-6YMLNFG2.cjs} +12 -12
  54. package/dist/{chunk-RF7P3524.cjs.map → chunk-6YMLNFG2.cjs.map} +1 -1
  55. package/dist/{chunk-OHJRP6K7.cjs → chunk-73YOKCNV.cjs} +27 -27
  56. package/dist/{chunk-OHJRP6K7.cjs.map → chunk-73YOKCNV.cjs.map} +1 -1
  57. package/dist/{chunk-UWUPLXZN.js → chunk-7D64XJKD.js} +4 -4
  58. package/dist/{chunk-UWUPLXZN.js.map → chunk-7D64XJKD.js.map} +1 -1
  59. package/dist/{chunk-5H52FP2S.js → chunk-7RNQJXJP.js} +6 -6
  60. package/dist/{chunk-5H52FP2S.js.map → chunk-7RNQJXJP.js.map} +1 -1
  61. package/dist/{chunk-QUVYOHFH.js → chunk-7TTCVVVF.js} +4 -4
  62. package/dist/{chunk-QUVYOHFH.js.map → chunk-7TTCVVVF.js.map} +1 -1
  63. package/dist/{chunk-5GI232FP.cjs → chunk-AFCYWNZO.cjs} +8 -8
  64. package/dist/{chunk-5GI232FP.cjs.map → chunk-AFCYWNZO.cjs.map} +1 -1
  65. package/dist/{chunk-T4UU7EJX.js → chunk-B33WOUWI.js} +4 -4
  66. package/dist/{chunk-T4UU7EJX.js.map → chunk-B33WOUWI.js.map} +1 -1
  67. package/dist/{chunk-QC4USGJS.js → chunk-BBTJ7JA4.js} +6 -6
  68. package/dist/{chunk-QC4USGJS.js.map → chunk-BBTJ7JA4.js.map} +1 -1
  69. package/dist/{chunk-JE2ZMOKB.js → chunk-BHDMAOFA.js} +4 -4
  70. package/dist/{chunk-JE2ZMOKB.js.map → chunk-BHDMAOFA.js.map} +1 -1
  71. package/dist/{chunk-V4ATNZXG.cjs → chunk-BQBKRPLD.cjs} +4 -4
  72. package/dist/{chunk-V4ATNZXG.cjs.map → chunk-BQBKRPLD.cjs.map} +1 -1
  73. package/dist/{chunk-XTFWFQZ7.cjs → chunk-BXTQ4QZA.cjs} +5 -5
  74. package/dist/{chunk-XTFWFQZ7.cjs.map → chunk-BXTQ4QZA.cjs.map} +1 -1
  75. package/dist/{chunk-ZRVRA2PY.cjs → chunk-CISVP6ZD.cjs} +6 -6
  76. package/dist/{chunk-ZRVRA2PY.cjs.map → chunk-CISVP6ZD.cjs.map} +1 -1
  77. package/dist/{chunk-YI3WMF2D.cjs → chunk-CZDLWIPQ.cjs} +3 -3
  78. package/dist/{chunk-YI3WMF2D.cjs.map → chunk-CZDLWIPQ.cjs.map} +1 -1
  79. package/dist/{chunk-DVRI2PQV.cjs → chunk-CZKSSCON.cjs} +9 -9
  80. package/dist/{chunk-DVRI2PQV.cjs.map → chunk-CZKSSCON.cjs.map} +1 -1
  81. package/dist/{chunk-PZCVWJ2I.js → chunk-DI5S2DY6.js} +4 -4
  82. package/dist/{chunk-PZCVWJ2I.js.map → chunk-DI5S2DY6.js.map} +1 -1
  83. package/dist/{chunk-7L6BZOXB.cjs → chunk-DP2D6LEW.cjs} +18 -18
  84. package/dist/{chunk-7L6BZOXB.cjs.map → chunk-DP2D6LEW.cjs.map} +1 -1
  85. package/dist/{chunk-WYP25ZMM.js → chunk-DSWUKENK.js} +3 -3
  86. package/dist/{chunk-WYP25ZMM.js.map → chunk-DSWUKENK.js.map} +1 -1
  87. package/dist/{chunk-X2IH3GWC.cjs → chunk-E4IH2WQA.cjs} +18 -18
  88. package/dist/{chunk-X2IH3GWC.cjs.map → chunk-E4IH2WQA.cjs.map} +1 -1
  89. package/dist/{chunk-FKQCQSXF.js → chunk-E5ZGN7GA.js} +5 -5
  90. package/dist/{chunk-FKQCQSXF.js.map → chunk-E5ZGN7GA.js.map} +1 -1
  91. package/dist/{chunk-SPGVPADY.js → chunk-EDKDBIHS.js} +3 -3
  92. package/dist/{chunk-SPGVPADY.js.map → chunk-EDKDBIHS.js.map} +1 -1
  93. package/dist/{chunk-DRHETQDI.cjs → chunk-ESFQUKV6.cjs} +11 -11
  94. package/dist/{chunk-DRHETQDI.cjs.map → chunk-ESFQUKV6.cjs.map} +1 -1
  95. package/dist/{chunk-77A2RTNZ.js → chunk-EXWRHE4M.js} +4 -4
  96. package/dist/{chunk-77A2RTNZ.js.map → chunk-EXWRHE4M.js.map} +1 -1
  97. package/dist/{chunk-PQ74DA4K.cjs → chunk-F2XPOHWS.cjs} +14 -14
  98. package/dist/{chunk-PQ74DA4K.cjs.map → chunk-F2XPOHWS.cjs.map} +1 -1
  99. package/dist/{chunk-LXOKTLBF.cjs → chunk-FS75MKSS.cjs} +17 -17
  100. package/dist/{chunk-LXOKTLBF.cjs.map → chunk-FS75MKSS.cjs.map} +1 -1
  101. package/dist/{chunk-XR3CGVKU.cjs → chunk-FTFHM5UT.cjs} +5 -5
  102. package/dist/{chunk-XR3CGVKU.cjs.map → chunk-FTFHM5UT.cjs.map} +1 -1
  103. package/dist/{chunk-AZKOTAON.js → chunk-FZMNN47O.js} +7 -7
  104. package/dist/{chunk-AZKOTAON.js.map → chunk-FZMNN47O.js.map} +1 -1
  105. package/dist/{chunk-F2FAL5CZ.js → chunk-G6NTGBOW.js} +3 -3
  106. package/dist/{chunk-F2FAL5CZ.js.map → chunk-G6NTGBOW.js.map} +1 -1
  107. package/dist/{chunk-KFG4YQ6B.js → chunk-HJOM5RVI.js} +4 -4
  108. package/dist/{chunk-KFG4YQ6B.js.map → chunk-HJOM5RVI.js.map} +1 -1
  109. package/dist/{chunk-23BRCQHZ.cjs → chunk-HRNTWI5X.cjs} +11 -11
  110. package/dist/{chunk-23BRCQHZ.cjs.map → chunk-HRNTWI5X.cjs.map} +1 -1
  111. package/dist/{chunk-X5I45TOD.cjs → chunk-HXGOUFHN.cjs} +18 -18
  112. package/dist/{chunk-X5I45TOD.cjs.map → chunk-HXGOUFHN.cjs.map} +1 -1
  113. package/dist/{chunk-PR6OZGWN.js → chunk-IFGQCW7S.js} +4 -4
  114. package/dist/{chunk-PR6OZGWN.js.map → chunk-IFGQCW7S.js.map} +1 -1
  115. package/dist/{chunk-ORWZ4QJZ.cjs → chunk-IZKPIRSU.cjs} +18 -18
  116. package/dist/{chunk-ORWZ4QJZ.cjs.map → chunk-IZKPIRSU.cjs.map} +1 -1
  117. package/dist/{chunk-FP3SA3LK.cjs → chunk-JHG52CBB.cjs} +28 -28
  118. package/dist/{chunk-FP3SA3LK.cjs.map → chunk-JHG52CBB.cjs.map} +1 -1
  119. package/dist/{chunk-P5ZWPVC2.js → chunk-JWJ4FFVU.js} +3 -3
  120. package/dist/{chunk-P5ZWPVC2.js.map → chunk-JWJ4FFVU.js.map} +1 -1
  121. package/dist/{chunk-R5CX6VIT.js → chunk-KHEQHKTJ.js} +5 -5
  122. package/dist/{chunk-R5CX6VIT.js.map → chunk-KHEQHKTJ.js.map} +1 -1
  123. package/dist/{chunk-QZ6UFQ7V.cjs → chunk-KT66JFSR.cjs} +6 -6
  124. package/dist/{chunk-QZ6UFQ7V.cjs.map → chunk-KT66JFSR.cjs.map} +1 -1
  125. package/dist/{chunk-LYGOXXXA.js → chunk-L3WLRWTC.js} +6 -6
  126. package/dist/{chunk-LYGOXXXA.js.map → chunk-L3WLRWTC.js.map} +1 -1
  127. package/dist/{chunk-57H2WB7S.cjs → chunk-LB4GA4FY.cjs} +18 -18
  128. package/dist/{chunk-57H2WB7S.cjs.map → chunk-LB4GA4FY.cjs.map} +1 -1
  129. package/dist/{chunk-5WCQI3QY.js → chunk-LENHUKA3.js} +6 -6
  130. package/dist/{chunk-5WCQI3QY.js.map → chunk-LENHUKA3.js.map} +1 -1
  131. package/dist/{chunk-CU2IRRTR.cjs → chunk-LIJBEWEH.cjs} +19 -19
  132. package/dist/{chunk-CU2IRRTR.cjs.map → chunk-LIJBEWEH.cjs.map} +1 -1
  133. package/dist/{chunk-DYWRKLPU.cjs → chunk-M4JYLRAA.cjs} +46 -46
  134. package/dist/{chunk-DYWRKLPU.cjs.map → chunk-M4JYLRAA.cjs.map} +1 -1
  135. package/dist/{chunk-UCKK7LPQ.js → chunk-NRTOCZP6.js} +3 -3
  136. package/dist/{chunk-UCKK7LPQ.js.map → chunk-NRTOCZP6.js.map} +1 -1
  137. package/dist/{chunk-3AWUH2DT.cjs → chunk-OHOYDTN5.cjs} +71 -71
  138. package/dist/{chunk-3AWUH2DT.cjs.map → chunk-OHOYDTN5.cjs.map} +1 -1
  139. package/dist/{chunk-CHOCR4YO.cjs → chunk-P22PC432.cjs} +32 -32
  140. package/dist/{chunk-CHOCR4YO.cjs.map → chunk-P22PC432.cjs.map} +1 -1
  141. package/dist/{chunk-N7ZFWAFJ.cjs → chunk-PB6X5Q6F.cjs} +12 -12
  142. package/dist/{chunk-N7ZFWAFJ.cjs.map → chunk-PB6X5Q6F.cjs.map} +1 -1
  143. package/dist/{chunk-ANHJG3Z7.js → chunk-PCZVV6RI.js} +4 -4
  144. package/dist/{chunk-ANHJG3Z7.js.map → chunk-PCZVV6RI.js.map} +1 -1
  145. package/dist/{chunk-JUYUBEMU.js → chunk-PECE2GUW.js} +3 -3
  146. package/dist/{chunk-JUYUBEMU.js.map → chunk-PECE2GUW.js.map} +1 -1
  147. package/dist/{chunk-LWPPY3XE.cjs → chunk-PVN4T77C.cjs} +8 -8
  148. package/dist/{chunk-LWPPY3XE.cjs.map → chunk-PVN4T77C.cjs.map} +1 -1
  149. package/dist/{chunk-NYPBCQOT.cjs → chunk-PX5OSGHM.cjs} +14 -14
  150. package/dist/{chunk-NYPBCQOT.cjs.map → chunk-PX5OSGHM.cjs.map} +1 -1
  151. package/dist/{chunk-WNPUO7IZ.cjs → chunk-PXJOA5PL.cjs} +70 -40
  152. package/dist/chunk-PXJOA5PL.cjs.map +1 -0
  153. package/dist/{chunk-G4N6PYWY.cjs → chunk-QJCTV56D.cjs} +28 -28
  154. package/dist/{chunk-G4N6PYWY.cjs.map → chunk-QJCTV56D.cjs.map} +1 -1
  155. package/dist/{chunk-V52ODUI3.js → chunk-R4XNJVIP.js} +4 -4
  156. package/dist/{chunk-V52ODUI3.js.map → chunk-R4XNJVIP.js.map} +1 -1
  157. package/dist/{chunk-UGJBURIS.cjs → chunk-R7XGET77.cjs} +7 -7
  158. package/dist/{chunk-UGJBURIS.cjs.map → chunk-R7XGET77.cjs.map} +1 -1
  159. package/dist/{chunk-TM3DGZGZ.js → chunk-RDCU5EQX.js} +6 -6
  160. package/dist/{chunk-TM3DGZGZ.js.map → chunk-RDCU5EQX.js.map} +1 -1
  161. package/dist/chunk-S3XJYKSQ.cjs +655 -0
  162. package/dist/{chunk-YW5L7LRF.cjs.map → chunk-S3XJYKSQ.cjs.map} +1 -1
  163. package/dist/{chunk-K46WKGGZ.js → chunk-SJJAW4RY.js} +7 -7
  164. package/dist/{chunk-K46WKGGZ.js.map → chunk-SJJAW4RY.js.map} +1 -1
  165. package/dist/{chunk-QVGUEAP6.js → chunk-SM4DXPYS.js} +4 -4
  166. package/dist/{chunk-QVGUEAP6.js.map → chunk-SM4DXPYS.js.map} +1 -1
  167. package/dist/{chunk-OR4OZJUW.cjs → chunk-SSWC72OL.cjs} +25 -25
  168. package/dist/{chunk-OR4OZJUW.cjs.map → chunk-SSWC72OL.cjs.map} +1 -1
  169. package/dist/{chunk-JWYT5XYO.cjs → chunk-TFYH42DN.cjs} +11 -11
  170. package/dist/{chunk-JWYT5XYO.cjs.map → chunk-TFYH42DN.cjs.map} +1 -1
  171. package/dist/{chunk-V2NLRL23.cjs → chunk-TG7Q2VG6.cjs} +27 -27
  172. package/dist/{chunk-V2NLRL23.cjs.map → chunk-TG7Q2VG6.cjs.map} +1 -1
  173. package/dist/{chunk-H5CDBXA4.cjs → chunk-U7TQO3K5.cjs} +18 -18
  174. package/dist/{chunk-H5CDBXA4.cjs.map → chunk-U7TQO3K5.cjs.map} +1 -1
  175. package/dist/{chunk-EAPGRYRG.cjs → chunk-UBMQFIZ5.cjs} +6 -6
  176. package/dist/{chunk-EAPGRYRG.cjs.map → chunk-UBMQFIZ5.cjs.map} +1 -1
  177. package/dist/{chunk-OSN3DL34.js → chunk-V2PFC4GN.js} +3 -3
  178. package/dist/{chunk-OSN3DL34.js.map → chunk-V2PFC4GN.js.map} +1 -1
  179. package/dist/{chunk-XNR667MS.cjs → chunk-VCDXVUAX.cjs} +11 -11
  180. package/dist/{chunk-XNR667MS.cjs.map → chunk-VCDXVUAX.cjs.map} +1 -1
  181. package/dist/{chunk-UU3HHGLK.js → chunk-VDEHE4SS.js} +3 -3
  182. package/dist/{chunk-UU3HHGLK.js.map → chunk-VDEHE4SS.js.map} +1 -1
  183. package/dist/{chunk-ZJVB5TZ4.js → chunk-VFMS237A.js} +71 -41
  184. package/dist/chunk-VFMS237A.js.map +1 -0
  185. package/dist/{chunk-U72BY62E.cjs → chunk-VKB5Q73O.cjs} +101 -101
  186. package/dist/{chunk-U72BY62E.cjs.map → chunk-VKB5Q73O.cjs.map} +1 -1
  187. package/dist/{chunk-4DUHTOLC.js → chunk-VM3RA22B.js} +3 -3
  188. package/dist/{chunk-4DUHTOLC.js.map → chunk-VM3RA22B.js.map} +1 -1
  189. package/dist/{chunk-7EDTSUCY.js → chunk-WEF5ZJPT.js} +3 -3
  190. package/dist/{chunk-7EDTSUCY.js.map → chunk-WEF5ZJPT.js.map} +1 -1
  191. package/dist/{chunk-EO6MLUAA.js → chunk-X6UKAJS5.js} +4 -4
  192. package/dist/{chunk-EO6MLUAA.js.map → chunk-X6UKAJS5.js.map} +1 -1
  193. package/dist/{chunk-UBYGPC2S.cjs → chunk-XCJ6SARN.cjs} +7 -7
  194. package/dist/{chunk-UBYGPC2S.cjs.map → chunk-XCJ6SARN.cjs.map} +1 -1
  195. package/dist/{chunk-Z4PDJRZT.cjs → chunk-Y2SHDKEU.cjs} +4 -4
  196. package/dist/{chunk-Z4PDJRZT.cjs.map → chunk-Y2SHDKEU.cjs.map} +1 -1
  197. package/dist/{chunk-BZHOSRJY.cjs → chunk-Y5ETJ6HT.cjs} +18 -18
  198. package/dist/{chunk-BZHOSRJY.cjs.map → chunk-Y5ETJ6HT.cjs.map} +1 -1
  199. package/dist/{chunk-XLPKT7N6.js → chunk-YAXPLU7U.js} +5 -5
  200. package/dist/{chunk-XLPKT7N6.js.map → chunk-YAXPLU7U.js.map} +1 -1
  201. package/dist/{chunk-I6WBJDRP.cjs → chunk-YM6HFQMA.cjs} +6 -6
  202. package/dist/{chunk-I6WBJDRP.cjs.map → chunk-YM6HFQMA.cjs.map} +1 -1
  203. package/dist/{chunk-TDLWDKJT.cjs → chunk-YRE5T3D6.cjs} +66 -66
  204. package/dist/{chunk-TDLWDKJT.cjs.map → chunk-YRE5T3D6.cjs.map} +1 -1
  205. package/dist/{chunk-UAMUMYGG.js → chunk-YWQLHSBA.js} +4 -4
  206. package/dist/{chunk-UAMUMYGG.js.map → chunk-YWQLHSBA.js.map} +1 -1
  207. package/dist/{chunk-PJFYMAGO.js → chunk-YX6VTUXY.js} +3 -3
  208. package/dist/{chunk-PJFYMAGO.js.map → chunk-YX6VTUXY.js.map} +1 -1
  209. package/dist/{chunk-4XSWMZTL.js → chunk-Z7WKF2EJ.js} +3 -3
  210. package/dist/{chunk-4XSWMZTL.js.map → chunk-Z7WKF2EJ.js.map} +1 -1
  211. package/dist/{chunk-HYYIE4HE.js → chunk-ZWS4G4X6.js} +40 -40
  212. package/dist/{chunk-HYYIE4HE.js.map → chunk-ZWS4G4X6.js.map} +1 -1
  213. package/dist/{dist-HR6TOFJM.cjs → dist-2N34JJPM.cjs} +27 -26
  214. package/dist/dist-2N34JJPM.cjs.map +1 -0
  215. package/dist/{dist-7I6EPNH3.js → dist-FQ4PS2UK.js} +8 -7
  216. package/dist/dist-FQ4PS2UK.js.map +1 -0
  217. package/dist/docs/SKILL.md +1 -1
  218. package/dist/docs/assets/SOURCE_MAP.json +1 -1
  219. package/dist/{observational-memory-KFKHBTCB-RX2CEPSU.js → observational-memory-FBSRD6QN-52YZX2CY.js} +3 -3
  220. package/dist/{observational-memory-KFKHBTCB-RX2CEPSU.js.map → observational-memory-FBSRD6QN-52YZX2CY.js.map} +1 -1
  221. package/dist/{observational-memory-KFKHBTCB-RMGPISAP.cjs → observational-memory-FBSRD6QN-RZQKP5DK.cjs} +26 -26
  222. package/dist/{observational-memory-KFKHBTCB-RMGPISAP.cjs.map → observational-memory-FBSRD6QN-RZQKP5DK.cjs.map} +1 -1
  223. package/dist/server/handlers/a2a.cjs +14 -14
  224. package/dist/server/handlers/a2a.js +1 -1
  225. package/dist/server/handlers/agent-builder.cjs +16 -16
  226. package/dist/server/handlers/agent-builder.js +1 -1
  227. package/dist/server/handlers/agent-versions.cjs +8 -8
  228. package/dist/server/handlers/agent-versions.js +1 -1
  229. package/dist/server/handlers/agents.cjs +41 -41
  230. package/dist/server/handlers/agents.js +1 -1
  231. package/dist/server/handlers/auth.cjs +12 -12
  232. package/dist/server/handlers/auth.js +1 -1
  233. package/dist/server/handlers/background-tasks.cjs +4 -4
  234. package/dist/server/handlers/background-tasks.js +1 -1
  235. package/dist/server/handlers/builder-registry.cjs +6 -6
  236. package/dist/server/handlers/builder-registry.js +1 -1
  237. package/dist/server/handlers/channels.cjs +5 -5
  238. package/dist/server/handlers/channels.js +1 -1
  239. package/dist/server/handlers/conversations.cjs +5 -5
  240. package/dist/server/handlers/conversations.js +1 -1
  241. package/dist/server/handlers/datasets.cjs +26 -26
  242. package/dist/server/handlers/datasets.js +1 -1
  243. package/dist/server/handlers/editor-builder.cjs +5 -5
  244. package/dist/server/handlers/editor-builder.js +1 -1
  245. package/dist/server/handlers/favorites-enrichment.cjs +3 -3
  246. package/dist/server/handlers/favorites-enrichment.js +1 -1
  247. package/dist/server/handlers/logs.cjs +4 -4
  248. package/dist/server/handlers/logs.js +1 -1
  249. package/dist/server/handlers/mcp-client-versions.cjs +8 -8
  250. package/dist/server/handlers/mcp-client-versions.js +1 -1
  251. package/dist/server/handlers/mcp.cjs +11 -11
  252. package/dist/server/handlers/mcp.js +1 -1
  253. package/dist/server/handlers/memory.cjs +27 -27
  254. package/dist/server/handlers/memory.js +1 -1
  255. package/dist/server/handlers/observability-new-endpoints.cjs +29 -29
  256. package/dist/server/handlers/observability-new-endpoints.d.ts +232 -232
  257. package/dist/server/handlers/observability-new-endpoints.js +1 -1
  258. package/dist/server/handlers/observability-shared.cjs +9 -9
  259. package/dist/server/handlers/observability-shared.js +1 -1
  260. package/dist/server/handlers/observability.cjs +40 -40
  261. package/dist/server/handlers/observability.js +2 -2
  262. package/dist/server/handlers/processor-providers.cjs +3 -3
  263. package/dist/server/handlers/processor-providers.js +1 -1
  264. package/dist/server/handlers/processors.cjs +4 -4
  265. package/dist/server/handlers/processors.js +1 -1
  266. package/dist/server/handlers/prompt-block-versions.cjs +8 -8
  267. package/dist/server/handlers/prompt-block-versions.js +1 -1
  268. package/dist/server/handlers/responses.cjs +4 -4
  269. package/dist/server/handlers/responses.js +1 -1
  270. package/dist/server/handlers/schedules.cjs +6 -6
  271. package/dist/server/handlers/schedules.js +1 -1
  272. package/dist/server/handlers/scorer-versions.cjs +8 -8
  273. package/dist/server/handlers/scorer-versions.js +1 -1
  274. package/dist/server/handlers/scores.cjs +7 -7
  275. package/dist/server/handlers/scores.js +1 -1
  276. package/dist/server/handlers/stored-agent-favorites.cjs +3 -3
  277. package/dist/server/handlers/stored-agent-favorites.js +1 -1
  278. package/dist/server/handlers/stored-agents.cjs +7 -7
  279. package/dist/server/handlers/stored-agents.js +1 -1
  280. package/dist/server/handlers/stored-mcp-clients.cjs +6 -6
  281. package/dist/server/handlers/stored-mcp-clients.js +1 -1
  282. package/dist/server/handlers/stored-prompt-blocks.cjs +6 -6
  283. package/dist/server/handlers/stored-prompt-blocks.js +1 -1
  284. package/dist/server/handlers/stored-scorers.cjs +6 -6
  285. package/dist/server/handlers/stored-scorers.js +1 -1
  286. package/dist/server/handlers/stored-skill-favorites.cjs +3 -3
  287. package/dist/server/handlers/stored-skill-favorites.js +1 -1
  288. package/dist/server/handlers/stored-skills.cjs +7 -7
  289. package/dist/server/handlers/stored-skills.js +1 -1
  290. package/dist/server/handlers/stored-workspaces.cjs +6 -6
  291. package/dist/server/handlers/stored-workspaces.js +1 -1
  292. package/dist/server/handlers/system.cjs +3 -3
  293. package/dist/server/handlers/system.js +1 -1
  294. package/dist/server/handlers/tool-providers.cjs +5 -5
  295. package/dist/server/handlers/tool-providers.js +1 -1
  296. package/dist/server/handlers/tools.cjs +6 -6
  297. package/dist/server/handlers/tools.js +1 -1
  298. package/dist/server/handlers/vector.cjs +16 -16
  299. package/dist/server/handlers/vector.js +1 -1
  300. package/dist/server/handlers/voice.cjs +8 -8
  301. package/dist/server/handlers/voice.js +1 -1
  302. package/dist/server/handlers/workflows.cjs +26 -26
  303. package/dist/server/handlers/workflows.js +1 -1
  304. package/dist/server/handlers/workspace.cjs +26 -26
  305. package/dist/server/handlers/workspace.js +1 -1
  306. package/dist/server/handlers.cjs +41 -41
  307. package/dist/server/handlers.js +15 -15
  308. package/dist/server/schemas/index.cjs +400 -400
  309. package/dist/server/schemas/index.js +7 -7
  310. package/dist/server/server-adapter/api-schema-manifest.d.ts +1 -1
  311. package/dist/server/server-adapter/index.cjs +26 -26
  312. package/dist/server/server-adapter/index.js +7 -7
  313. package/dist/server/server-adapter/openapi-utils.d.ts +1 -1
  314. package/dist/server/server-adapter/routes/observability.d.ts +116 -116
  315. package/package.json +5 -5
  316. package/dist/chunk-WNPUO7IZ.cjs.map +0 -1
  317. package/dist/chunk-YW5L7LRF.cjs +0 -655
  318. package/dist/chunk-ZJVB5TZ4.js.map +0 -1
  319. package/dist/dist-7I6EPNH3.js.map +0 -1
  320. package/dist/dist-HR6TOFJM.cjs.map +0 -1
@@ -0,0 +1,304 @@
1
+ import { z, ZodOptional, ZodObject, ZodArray, ZodUnion, ZodString, ZodNumber, ZodDate, ZodDefault, ZodNull, ZodNullable, ZodIntersection } from 'zod/v4';
2
+ import type { ZodAny, ZodType } from 'zod/v4';
3
+ import type { Targets } from 'zod-to-json-schema';
4
+ import type { JSONSchema7, Schema } from './json-schema/index.js';
5
+ import type { SchemaCompatLayer as ParentSchemaCompatLayer } from './schema-compatibility.js';
6
+ import type { ModelInformation } from './types.js';
7
+ /**
8
+ * All supported string validation check types that can be processed or converted to descriptions.
9
+ * @constant
10
+ */
11
+ export declare const ALL_STRING_CHECKS: readonly ["regex", "emoji", "email", "url", "uuid", "cuid", "min_length", "max_length", "string_format"];
12
+ /**
13
+ * All supported number validation check types that can be processed or converted to descriptions.
14
+ * @constant
15
+ */
16
+ export declare const ALL_NUMBER_CHECKS: readonly ["greater_than", "less_than", "multiple_of"];
17
+ /**
18
+ * All supported array validation check types that can be processed or converted to descriptions.
19
+ * @constant
20
+ */
21
+ export declare const ALL_ARRAY_CHECKS: readonly ["min", "max", "length"];
22
+ /**
23
+ * Zod types that are not supported by most AI model providers and should be avoided.
24
+ * @constant
25
+ */
26
+ export declare const UNSUPPORTED_ZOD_TYPES: readonly ["ZodIntersection", "ZodNever", "ZodNull", "ZodTuple", "ZodUndefined"];
27
+ /**
28
+ * Zod types that are generally supported by AI model providers.
29
+ * @constant
30
+ */
31
+ export declare const SUPPORTED_ZOD_TYPES: readonly ["ZodObject", "ZodArray", "ZodUnion", "ZodString", "ZodNumber", "ZodDate", "ZodAny", "ZodDefault", "ZodNullable"];
32
+ /**
33
+ * All Zod types (both supported and unsupported).
34
+ * @constant
35
+ */
36
+ export declare const ALL_ZOD_TYPES: readonly ["ZodObject", "ZodArray", "ZodUnion", "ZodString", "ZodNumber", "ZodDate", "ZodAny", "ZodDefault", "ZodNullable", "ZodIntersection", "ZodNever", "ZodNull", "ZodTuple", "ZodUndefined"];
37
+ /**
38
+ * Type representing string validation checks.
39
+ */
40
+ export type StringCheckType = (typeof ALL_STRING_CHECKS)[number];
41
+ /**
42
+ * Type representing number validation checks.
43
+ */
44
+ export type NumberCheckType = (typeof ALL_NUMBER_CHECKS)[number];
45
+ /**
46
+ * Type representing array validation checks.
47
+ */
48
+ export type ArrayCheckType = (typeof ALL_ARRAY_CHECKS)[number];
49
+ /**
50
+ * Type representing unsupported Zod schema types.
51
+ */
52
+ export type UnsupportedZodType = (typeof UNSUPPORTED_ZOD_TYPES)[number];
53
+ /**
54
+ * Type representing supported Zod schema types.
55
+ */
56
+ export type SupportedZodType = (typeof SUPPORTED_ZOD_TYPES)[number];
57
+ /**
58
+ * Type representing all Zod schema types (supported and unsupported).
59
+ */
60
+ export type AllZodType = (typeof ALL_ZOD_TYPES)[number];
61
+ /**
62
+ * Utility type to extract the shape of a Zod object schema.
63
+ */
64
+ export type ZodShape<T extends z.ZodObject<any, any>> = T['shape'];
65
+ /**
66
+ * Utility type to extract the keys from a Zod object shape.
67
+ */
68
+ export type ShapeKey<T extends z.ZodObject<any, any>> = keyof ZodShape<T>;
69
+ /**
70
+ * Utility type to extract the value types from a Zod object shape.
71
+ */
72
+ export type ShapeValue<T extends z.ZodObject<any, any>> = ZodShape<T>[ShapeKey<T>];
73
+ type ConstraintHelperText = string[];
74
+ /**
75
+ * Abstract base class for creating schema compatibility layers for different AI model providers.
76
+ *
77
+ * This class provides a framework for transforming Zod schemas to work with specific AI model
78
+ * provider requirements and limitations. Each provider may have different support levels for
79
+ * JSON Schema features, validation constraints, and data types.
80
+ *
81
+ *
82
+ * @example
83
+ * ```typescript
84
+ * import { SchemaCompatLayer } from '@mastra/schema-compat';
85
+ * import type { LanguageModelV1 } from 'ai';
86
+ *
87
+ * class CustomProviderCompat extends SchemaCompatLayer {
88
+ * constructor(model: LanguageModelV1) {
89
+ * super(model);
90
+ * }
91
+ *
92
+ * shouldApply(): boolean {
93
+ * return this.getModel().provider === 'custom-provider';
94
+ * }
95
+ *
96
+ * getSchemaTarget() {
97
+ * return 'jsonSchema7';
98
+ * }
99
+ *
100
+ * processZodType<T extends z.AnyZodObject>(value: z.ZodAny): ShapeValue<T> {
101
+ * // Custom processing logic for this provider
102
+ * switch (value._def.typeName) {
103
+ * case 'ZodString':
104
+ * return this.defaultZodStringHandler(value, ['email', 'url']);
105
+ * default:
106
+ * return this.defaultUnsupportedZodTypeHandler(value);
107
+ * }
108
+ * }
109
+ * }
110
+ * ```
111
+ */
112
+ export declare class SchemaCompatLayer {
113
+ private model;
114
+ private parent;
115
+ /**
116
+ * Creates a new schema compatibility instance.
117
+ *
118
+ * @param model - The language model this compatibility layer applies to
119
+ */
120
+ constructor(model: ModelInformation, parent: ParentSchemaCompatLayer);
121
+ /**
122
+ * Gets the language model associated with this compatibility layer.
123
+ *
124
+ * @returns The language model instance
125
+ */
126
+ getModel(): ModelInformation;
127
+ getUnsupportedZodTypes(): readonly string[];
128
+ /**
129
+ * Type guard for optional Zod types
130
+ */
131
+ isOptional(v: ZodAny | ZodOptional<any>): v is ZodOptional<any>;
132
+ /**
133
+ * Type guard for object Zod types
134
+ */
135
+ isObj(v: ZodAny | ZodObject<any, any>): v is ZodObject<any, any>;
136
+ /**
137
+ * Type guard for null Zod types
138
+ */
139
+ isNull(v: ZodAny | ZodNull): v is ZodNull;
140
+ /**
141
+ * Type guard for nullable Zod types
142
+ */
143
+ isNullable(v: ZodAny | ZodNullable<any>): v is ZodNullable<any>;
144
+ /**
145
+ * Type guard for array Zod types
146
+ */
147
+ isArr(v: ZodAny | ZodArray<any>): v is ZodArray<any>;
148
+ /**
149
+ * Type guard for union Zod types
150
+ */
151
+ isUnion(v: ZodAny | ZodUnion<[ZodAny, ...ZodAny[]]>): v is ZodUnion<[ZodAny, ...ZodAny[]]>;
152
+ /**
153
+ * Type guard for string Zod types
154
+ */
155
+ isString(v: ZodAny | ZodString): v is ZodString;
156
+ /**
157
+ * Type guard for number Zod types
158
+ */
159
+ isNumber(v: ZodAny | ZodNumber): v is ZodNumber;
160
+ /**
161
+ * Type guard for date Zod types
162
+ */
163
+ isDate(v: ZodAny | ZodDate): v is ZodDate;
164
+ /**
165
+ * Type guard for default Zod types
166
+ */
167
+ isDefault(v: ZodAny | ZodDefault<any>): v is ZodDefault<any>;
168
+ /**
169
+ * Type guard for intersection Zod types
170
+ */
171
+ isIntersection(v: ZodAny | ZodIntersection<any, any>): v is ZodIntersection<any, any>;
172
+ /**
173
+ * Determines whether this compatibility layer should be applied for the current model.
174
+ *
175
+ * @returns True if this compatibility layer should be used, false otherwise
176
+ * @abstract
177
+ */
178
+ shouldApply(): boolean;
179
+ /**
180
+ * Returns the JSON Schema target format for this provider.
181
+ *
182
+ * @returns The schema target format, or undefined to use the default 'jsonSchema7'
183
+ * @abstract
184
+ */
185
+ getSchemaTarget(): Targets | undefined;
186
+ /**
187
+ * Processes a specific Zod type according to the provider's requirements.
188
+ *
189
+ * @param value - The Zod type to process
190
+ * @returns The processed Zod type
191
+ * @abstract
192
+ */
193
+ processZodType(value: ZodType): ZodType;
194
+ /**
195
+ * Default handler for Zod object types. Recursively processes all properties in the object.
196
+ *
197
+ * @param value - The Zod object to process
198
+ * @returns The processed Zod object
199
+ */
200
+ defaultZodObjectHandler(value: ZodObject<any, any>, options?: {
201
+ passthrough?: boolean;
202
+ }): ZodObject<any, any>;
203
+ /**
204
+ * Merges validation constraints into a parameter description.
205
+ *
206
+ * This helper method converts validation constraints that may not be supported
207
+ * by a provider into human-readable descriptions.
208
+ *
209
+ * @param description - The existing parameter description
210
+ * @param constraints - The validation constraints to merge
211
+ * @returns The updated description with constraints, or undefined if no constraints
212
+ */
213
+ mergeParameterDescription(description: string | undefined, constraints: ConstraintHelperText): string | undefined;
214
+ /**
215
+ * Default handler for unsupported Zod types. Throws an error for specified unsupported types.
216
+ *
217
+ * @param value - The Zod type to check
218
+ * @param throwOnTypes - Array of type names to throw errors for
219
+ * @returns The original value if not in the throw list
220
+ * @throws Error if the type is in the unsupported list
221
+ */
222
+ defaultUnsupportedZodTypeHandler<T extends z.ZodObject<any, any>>(value: z.ZodAny, throwOnTypes?: readonly UnsupportedZodType[]): ShapeValue<T>;
223
+ /**
224
+ * Default handler for Zod array types. Processes array constraints according to provider support.
225
+ *
226
+ * @param value - The Zod array to process
227
+ * @param handleChecks - Array constraints to convert to descriptions vs keep as validation
228
+ * @returns The processed Zod array
229
+ */
230
+ defaultZodArrayHandler(value: ZodArray<any>, handleChecks?: readonly ArrayCheckType[]): ZodArray<any>;
231
+ /**
232
+ * Default handler for Zod union types. Processes all union options.
233
+ *
234
+ * @param value - The Zod union to process
235
+ * @returns The processed Zod union
236
+ * @throws Error if union has fewer than 2 options
237
+ */
238
+ defaultZodUnionHandler(value: ZodUnion<[ZodAny, ...ZodAny[]]>): ZodAny;
239
+ /**
240
+ * Default handler for Zod string types. Processes string validation constraints.
241
+ *
242
+ * @param value - The Zod string to process
243
+ * @param handleChecks - String constraints to convert to descriptions vs keep as validation
244
+ * @returns The processed Zod string
245
+ */
246
+ defaultZodStringHandler(value: ZodString, handleChecks?: readonly StringCheckType[]): ZodString;
247
+ /**
248
+ * Default handler for Zod number types. Processes number validation constraints.
249
+ *
250
+ * @param value - The Zod number to process
251
+ * @param handleChecks - Number constraints to convert to descriptions vs keep as validation
252
+ * @returns The processed Zod number
253
+ */
254
+ defaultZodNumberHandler(value: ZodNumber, handleChecks?: readonly NumberCheckType[]): ZodNumber;
255
+ /**
256
+ * Default handler for Zod date types. Converts dates to ISO strings with constraint descriptions.
257
+ *
258
+ * @param value - The Zod date to process
259
+ * @returns A Zod string schema representing the date in ISO format
260
+ */
261
+ defaultZodDateHandler(value: ZodDate): ZodString;
262
+ /**
263
+ * Default handler for Zod optional types. Processes the inner type and maintains optionality.
264
+ *
265
+ * @param value - The Zod optional to process
266
+ * @param handleTypes - Types that should be processed vs passed through
267
+ * @returns The processed Zod optional
268
+ */
269
+ defaultZodOptionalHandler(value: ZodOptional<any>, handleTypes?: readonly AllZodType[]): ZodType;
270
+ /**
271
+ * Default handler for Zod nullable types. Processes the inner type and maintains nullability.
272
+ *
273
+ * @param value - The Zod nullable to process
274
+ * @param handleTypes - Types that should be processed vs passed through
275
+ * @returns The processed Zod nullable
276
+ */
277
+ defaultZodNullableHandler(value: ZodNullable<any>, handleTypes?: readonly AllZodType[]): ZodType;
278
+ /**
279
+ * Recursively collects leaf types from a ZodIntersection tree.
280
+ */
281
+ private collectIntersectionLeaves;
282
+ /**
283
+ * Default handler for Zod intersection types.
284
+ * Flattens the intersection tree and merges object shapes into a single z.object().
285
+ * Falls back to z.any() for non-object intersections.
286
+ */
287
+ defaultZodIntersectionHandler(value: ZodIntersection<any, any>): ZodType;
288
+ /**
289
+ * Processes a Zod object schema and converts it to an AI SDK Schema.
290
+ *
291
+ * @param zodSchema - The Zod object schema to process
292
+ * @returns An AI SDK Schema with provider-specific compatibility applied
293
+ */
294
+ processToAISDKSchema(zodSchema: ZodType): Schema;
295
+ /**
296
+ * Processes a Zod object schema and converts it to a JSON Schema.
297
+ *
298
+ * @param zodSchema - The Zod object schema to process
299
+ * @returns A JSONSchema7 object with provider-specific compatibility applied
300
+ */
301
+ processToJSONSchema(zodSchema: ZodType): JSONSchema7;
302
+ }
303
+ export {};
304
+ //# sourceMappingURL=schema-compatibility-v4.d.ts.map
@@ -0,0 +1,147 @@
1
+ import type { z as zV3 } from 'zod/v3';
2
+ import type { z as zV4 } from 'zod/v4';
3
+ import type { Targets } from 'zod-to-json-schema';
4
+ import type { JSONSchema7, Schema } from './json-schema/index.js';
5
+ import type { PublicSchema, StandardSchemaWithJSON } from './schema.js';
6
+ import * as v3 from './schema-compatibility-v3.js';
7
+ import * as v4 from './schema-compatibility-v4.js';
8
+ import type { ZodType, ZodUnion } from './schema.types.js';
9
+ import type { ModelInformation } from './types.js';
10
+ export { ALL_STRING_CHECKS, ALL_NUMBER_CHECKS, ALL_ARRAY_CHECKS, UNSUPPORTED_ZOD_TYPES as UNSUPPORTED_ZOD_TYPES_V3, SUPPORTED_ZOD_TYPES as SUPPORTED_ZOD_TYPES_V3, } from './schema-compatibility-v3.js';
11
+ export type { UnsupportedZodType as UnsupportedZodTypeV3, ShapeValue as ShapeValueV3, StringCheckType, NumberCheckType, ArrayCheckType, AllZodType as AllZodTypeV3, } from './schema-compatibility-v3.js';
12
+ export { UNSUPPORTED_ZOD_TYPES as UNSUPPORTED_ZOD_TYPES_V4, SUPPORTED_ZOD_TYPES as SUPPORTED_ZOD_TYPES_V4, } from './schema-compatibility-v4.js';
13
+ export type { UnsupportedZodType as UnsupportedZodTypeV4, ShapeValue as ShapeValueV4, AllZodType as AllZodTypeV4, } from './schema-compatibility-v4.js';
14
+ type ConstraintHelperText = string[];
15
+ export declare abstract class SchemaCompatLayer {
16
+ private model;
17
+ private v3Layer;
18
+ private v4Layer;
19
+ /**
20
+ * Creates a new schema compatibility instance.
21
+ *
22
+ * @param model - The language model this compatibility layer applies to
23
+ */
24
+ constructor(model: ModelInformation);
25
+ preProcessJSONNode(_schema: JSONSchema7, _parentSchema?: JSONSchema7): void;
26
+ postProcessJSONNode(_schema: JSONSchema7, _parentSchema?: JSONSchema7): void;
27
+ /**
28
+ * Gets the language model associated with this compatibility layer.
29
+ *
30
+ * @returns The language model instance
31
+ */
32
+ getModel(): ModelInformation;
33
+ getUnsupportedZodTypes(value: ZodType): readonly string[];
34
+ isOptional(v: zV3.ZodType | zV4.ZodType): v is zV3.ZodOptional<any> | zV4.ZodOptional<any>;
35
+ isObj(v: zV3.ZodType | zV4.ZodType): v is zV3.ZodObject<any, any, any, any, any> | zV4.ZodObject<any, any>;
36
+ isNull(v: zV3.ZodType | zV4.ZodType): v is zV3.ZodNull | zV4.ZodNull;
37
+ isNullable(v: zV3.ZodType | zV4.ZodType): v is zV3.ZodNullable<any> | zV4.ZodNullable<any>;
38
+ isArr(v: zV3.ZodType | zV4.ZodType): v is zV3.ZodArray<any, any> | zV4.ZodArray<any>;
39
+ isUnion(v: zV3.ZodType | zV4.ZodType): v is zV3.ZodUnion<[zV3.ZodType, ...zV3.ZodType[]]> | zV4.ZodUnion<[zV4.ZodType, ...zV4.ZodType[]]>;
40
+ isString(v: zV3.ZodType | zV4.ZodType): v is zV3.ZodString | zV4.ZodString;
41
+ isNumber(v: zV3.ZodType | zV4.ZodType): v is zV3.ZodNumber | zV4.ZodNumber;
42
+ isDate(v: zV3.ZodType | zV4.ZodType): v is zV3.ZodDate | zV4.ZodDate;
43
+ isDefault(v: zV3.ZodType | zV4.ZodType): v is zV3.ZodDefault<any> | zV4.ZodDefault<any>;
44
+ isIntersection(v: zV3.ZodType | zV4.ZodType): v is zV3.ZodIntersection<any, any> | zV4.ZodIntersection<any, any>;
45
+ abstract shouldApply(): boolean;
46
+ abstract getSchemaTarget(): Targets | undefined;
47
+ abstract processZodType(value: ZodType): ZodType;
48
+ defaultZodObjectHandler(value: zV3.ZodObject<any, any, any, any, any> | zV4.ZodObject<any, any>, options?: {
49
+ passthrough?: boolean;
50
+ }): zV3.ZodObject<any, any, any, any, any> | zV4.ZodObject<any, any>;
51
+ mergeParameterDescription(description: string | undefined, constraints: ConstraintHelperText): string | undefined;
52
+ defaultUnsupportedZodTypeHandler(value: zV3.ZodType | zV4.ZodType, throwOnTypes?: readonly (v3.UnsupportedZodType | v4.UnsupportedZodType)[]): zV3.ZodType | zV4.ZodType;
53
+ defaultZodArrayHandler(value: zV3.ZodArray<any, any> | zV4.ZodArray<any>, handleChecks?: readonly v3.ArrayCheckType[]): zV3.ZodArray<any, any> | zV4.ZodArray<any>;
54
+ defaultZodUnionHandler(value: ZodUnion): zV3.ZodType | zV4.ZodType;
55
+ defaultZodStringHandler(value: zV3.ZodString | zV4.ZodString, handleChecks?: readonly v3.StringCheckType[]): zV3.ZodString | zV4.ZodString;
56
+ defaultZodNumberHandler(value: zV3.ZodNumber | zV4.ZodNumber, handleChecks?: readonly v3.NumberCheckType[]): zV3.ZodNumber | zV4.ZodNumber;
57
+ defaultZodDateHandler(value: zV3.ZodDate | zV4.ZodDate): zV3.ZodString | zV4.ZodString;
58
+ defaultZodOptionalHandler(value: zV3.ZodOptional<any> | zV4.ZodOptional<any>, handleTypes?: readonly string[]): zV3.ZodType | zV4.ZodType;
59
+ defaultZodNullableHandler(value: zV3.ZodNullable<any> | zV4.ZodNullable<any>, handleTypes?: readonly string[]): zV3.ZodType | zV4.ZodType;
60
+ defaultZodIntersectionHandler(value: zV3.ZodIntersection<any, any> | zV4.ZodIntersection<any, any>): zV3.ZodType | zV4.ZodType;
61
+ /**
62
+ * @deprecated please use processToCompatSchema to usse StandardSchemaWithJSON
63
+ * @param zodSchema
64
+ * @returns
65
+ */
66
+ processToAISDKSchema(zodSchema: zV3.ZodSchema | zV4.ZodType): Schema;
67
+ /**
68
+ * @param schema
69
+ * @returns
70
+ */
71
+ processToJSONSchema(schema: PublicSchema<any>, io?: 'input' | 'output'): JSONSchema7;
72
+ processToCompatSchema<T>(schema: PublicSchema<T>): StandardSchemaWithJSON<T>;
73
+ /**
74
+ * Default handler for JSON Schema objects.
75
+ * Processes object schemas with properties and required fields.
76
+ */
77
+ protected defaultObjectHandler(schema: JSONSchema7): JSONSchema7;
78
+ /**
79
+ * Default handler for JSON Schema arrays.
80
+ * Converts array constraints (minItems, maxItems) to description text.
81
+ */
82
+ protected defaultArrayHandler(schema: JSONSchema7): JSONSchema7;
83
+ /**
84
+ * Default handler for JSON Schema strings.
85
+ * Converts string constraints (minLength, maxLength, pattern, format) to description text.
86
+ */
87
+ protected defaultStringHandler(schema: JSONSchema7): JSONSchema7;
88
+ /**
89
+ * Default handler for JSON Schema numbers/integers.
90
+ * Converts number constraints (minimum, maximum, multipleOf, exclusiveMinimum, exclusiveMaximum) to description text.
91
+ */
92
+ protected defaultNumberHandler(schema: JSONSchema7): JSONSchema7;
93
+ /**
94
+ * Default handler for JSON Schema unions (anyOf/oneOf).
95
+ * Processes union schemas and can convert anyOf patterns to type arrays for simple primitives.
96
+ */
97
+ protected defaultUnionHandler(schema: JSONSchema7): JSONSchema7;
98
+ /**
99
+ * Default handler for JSON Schema allOf (intersection) types.
100
+ * Flattens allOf sub-schemas by merging properties and required arrays into a single object schema.
101
+ */
102
+ protected defaultAllOfHandler(schema: JSONSchema7): JSONSchema7;
103
+ /**
104
+ * Default handler for JSON Schema nullable types.
105
+ * Ensures nullable types are represented correctly.
106
+ */
107
+ protected defaultNullableHandler(schema: JSONSchema7): JSONSchema7;
108
+ /**
109
+ * Default handler for JSON Schema dates (string with date/date-time format).
110
+ * Converts date formats to string type with format constraint in description.
111
+ */
112
+ protected defaultDateHandler(schema: JSONSchema7): JSONSchema7;
113
+ /**
114
+ * Default handler for empty JSON schemas.
115
+ * Converts empty {} schemas to a union of primitive types.
116
+ */
117
+ protected defaultEmptySchemaHandler(schema: JSONSchema7): JSONSchema7;
118
+ /**
119
+ * Default handler for unsupported JSON Schema features.
120
+ * Can be used to strip or convert unsupported keywords.
121
+ */
122
+ protected defaultUnsupportedHandler(schema: JSONSchema7, unsupportedKeywords?: string[]): JSONSchema7;
123
+ protected isObjectSchema(schema: JSONSchema7): boolean;
124
+ protected isArraySchema(schema: JSONSchema7): boolean;
125
+ protected isStringSchema(schema: JSONSchema7): boolean;
126
+ protected isNumberSchema(schema: JSONSchema7): boolean;
127
+ protected isUnionSchema(schema: JSONSchema7): boolean;
128
+ protected isAllOfSchema(schema: JSONSchema7): schema is JSONSchema7 & {
129
+ allOf: JSONSchema7[];
130
+ };
131
+ /**
132
+ * Checks if a property is optional within a parent object schema.
133
+ * A property is optional if it's not in the parent's `required` array.
134
+ * @param propertyName - The name of the property to check
135
+ * @param parentSchema - The parent object schema containing the property
136
+ */
137
+ protected isOptionalProperty(propertyName: string, parentSchema: JSONSchema7): boolean;
138
+ /**
139
+ * Converts a Zod schema to JSON Schema using the standard-schema interface
140
+ * and applies pre/post processing via traverse.
141
+ *
142
+ * Uses 'input' io mode so that fields with defaults are optional (appropriate for tool parameters).
143
+ * @deprecated please use processToCompatSchema
144
+ */
145
+ toJSONSchema(zodSchema: ZodType): JSONSchema7;
146
+ }
147
+ //# sourceMappingURL=schema-compatibility.d.ts.map
@@ -0,0 +1,4 @@
1
+ export type { StandardSchemaWithJSON, InferOutput as InferStandardSchemaOutput, InferInput as InferStandardSchemaInput, StandardSchemaIssue, StandardSchemaWithJSONProps, } from './standard-schema/standard-schema.types.js';
2
+ export type { PublicSchema, InferPublicSchema, ZodType } from './schema.types.js';
3
+ export { toStandardSchema, isStandardSchema, isStandardJSONSchema, isStandardSchemaWithJSON, standardSchemaToJSONSchema, JSON_SCHEMA_LIBRARY_OPTIONS, } from './standard-schema/standard-schema.js';
4
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1,19 @@
1
+ import type { Schema as SchemaV4 } from './_types/@internal_ai-sdk-v4/dist/index.d.ts';
2
+ import type { Schema as SchemaV5 } from './_types/@internal_ai-sdk-v5/dist/index.d.ts';
3
+ import type { Schema as SchemaV6 } from './_types/@internal_ai-v6/dist/index.d.ts';
4
+ import type { JSONSchema7 } from 'json-schema';
5
+ import type z3 from 'zod/v3';
6
+ import type z4 from 'zod/v4';
7
+ import type { StandardSchemaWithJSON } from './standard-schema/standard-schema.types.js';
8
+ export type ZodType = z4.ZodType<any, any> | z3.Schema<any, z3.ZodTypeDef, any>;
9
+ export type ZodOptional = z4.ZodOptional<any> | z3.ZodOptional<any>;
10
+ export type ZodObject = z4.ZodObject<any, any> | z3.ZodObject<any, any, any, any, any>;
11
+ export type ZodArray = z4.ZodArray<any> | z3.ZodArray<any, any>;
12
+ export type ZodUnion = z4.ZodUnion<any> | z3.ZodUnion<any>;
13
+ export type ZodString = z4.ZodString | z3.ZodString;
14
+ export type ZodNumber = z4.ZodNumber | z3.ZodNumber;
15
+ export type ZodDate = z4.ZodDate | z3.ZodDate;
16
+ export type ZodDefault = z4.ZodDefault<any> | z3.ZodDefault<any>;
17
+ export type PublicSchema<Output = unknown, Input = Output> = z4.ZodType<Output, Input> | z3.Schema<Output, z3.ZodTypeDef, Input> | SchemaV4<Output> | SchemaV5<Output> | SchemaV6<Output> | JSONSchema7 | StandardSchemaWithJSON<Input, Output>;
18
+ export type InferPublicSchema<T extends PublicSchema> = T extends PublicSchema<infer Output> ? Output : never;
19
+ //# sourceMappingURL=schema.types.d.ts.map
@@ -0,0 +1,107 @@
1
+ import type { StandardJSONSchemaV1, StandardSchemaV1 } from '../_types/@standard-schema_spec/dist/index.d.ts';
2
+ import type { JSONSchema7 } from 'json-schema';
3
+ import type { PublicSchema } from '../schema.types.js';
4
+ import type { StandardSchemaWithJSON } from './standard-schema.types.js';
5
+ /**
6
+ * Override function for JSON Schema conversion.
7
+ * Handles types that Zod v4 cannot natively represent in JSON Schema:
8
+ * - z.date() -> { type: 'string', format: 'date-time' }
9
+ */
10
+ declare function jsonSchemaOverride(ctx: {
11
+ zodSchema: unknown;
12
+ jsonSchema: Record<string, unknown>;
13
+ }): undefined;
14
+ /**
15
+ * Library options for JSON Schema conversion.
16
+ * - unrepresentable: 'any' allows z.custom() and other unrepresentable types to be converted to {}
17
+ * instead of throwing "Custom types cannot be represented in JSON Schema"
18
+ * - override: converts z.date() to { type: 'string', format: 'date-time' }
19
+ */
20
+ export declare const JSON_SCHEMA_LIBRARY_OPTIONS: {
21
+ unrepresentable: "any";
22
+ override: typeof jsonSchemaOverride;
23
+ };
24
+ export type { StandardSchemaWithJSON, StandardSchemaWithJSONProps, InferInput, InferOutput, StandardSchemaIssue, } from './standard-schema.types.js';
25
+ export declare function toStandardSchema<T = unknown>(schema: PublicSchema<T>): StandardSchemaWithJSON<T>;
26
+ /**
27
+ * Type guard to check if a value implements the StandardSchemaV1 interface.
28
+ *
29
+ * @param value - The value to check
30
+ * @returns True if the value implements StandardSchemaV1
31
+ *
32
+ * @example
33
+ * ```typescript
34
+ * import { isStandardSchema } from '@mastra/schema-compat';
35
+ *
36
+ * if (isStandardSchema(someValue)) {
37
+ * const result = someValue['~standard'].validate(input);
38
+ * }
39
+ * ```
40
+ */
41
+ export declare function isStandardSchema(value: unknown): value is StandardSchemaV1;
42
+ /**
43
+ * Type guard to check if a value implements the StandardJSONSchemaV1 interface.
44
+ *
45
+ * @param value - The value to check
46
+ * @returns True if the value implements StandardJSONSchemaV1
47
+ *
48
+ * @example
49
+ * ```typescript
50
+ * import { isStandardJSONSchema } from '@mastra/schema-compat';
51
+ *
52
+ * if (isStandardJSONSchema(someValue)) {
53
+ * const jsonSchema = someValue['~standard'].jsonSchema.output({ target: 'draft-07' });
54
+ * }
55
+ * ```
56
+ */
57
+ export declare function isStandardJSONSchema(value: unknown): value is StandardJSONSchemaV1;
58
+ /**
59
+ * Type guard to check if a value implements both StandardSchemaV1 and StandardJSONSchemaV1.
60
+ *
61
+ * @param value - The value to check
62
+ * @returns True if the value implements both interfaces
63
+ *
64
+ * @example
65
+ * ```typescript
66
+ * import { isStandardSchemaWithJSON } from '@mastra/schema-compat';
67
+ *
68
+ * if (isStandardSchemaWithJSON(someValue)) {
69
+ * // Can use both validation and JSON Schema conversion
70
+ * const result = someValue['~standard'].validate(input);
71
+ * const jsonSchema = someValue['~standard'].jsonSchema.output({ target: 'draft-07' });
72
+ * }
73
+ * ```
74
+ */
75
+ export declare function isStandardSchemaWithJSON(value: unknown): value is StandardSchemaWithJSON;
76
+ /**
77
+ * Converts a StandardSchemaWithJSON to a JSON Schema.
78
+ *
79
+ * @param schema - The StandardSchemaWithJSON schema to convert
80
+ * @param options - Conversion options
81
+ * @param options.target - The JSON Schema target version (default: 'draft-07')
82
+ * @param options.io - Whether to use input or output schema (default: 'output')
83
+ * - 'input': Use for tool parameters, function arguments, request bodies
84
+ * - 'output': Use for return types, response bodies
85
+ * @returns The JSON Schema representation
86
+ *
87
+ * @example
88
+ * ```typescript
89
+ * import { standardSchemaToJSONSchema, toStandardSchema } from '@mastra/schema-compat';
90
+ * import { z } from 'zod';
91
+ *
92
+ * const zodSchema = z.object({ name: z.string() });
93
+ * const standardSchema = toStandardSchema(zodSchema);
94
+ *
95
+ * // For output types (default)
96
+ * const outputSchema = standardSchemaToJSONSchema(standardSchema);
97
+ *
98
+ * // For input types (tool parameters)
99
+ * const inputSchema = standardSchemaToJSONSchema(standardSchema, { io: 'input' });
100
+ * ```
101
+ */
102
+ export declare function standardSchemaToJSONSchema(schema: StandardSchemaWithJSON, options?: {
103
+ target?: StandardJSONSchemaV1.Target;
104
+ io?: 'input' | 'output';
105
+ override?: (typeof JSON_SCHEMA_LIBRARY_OPTIONS)['override'];
106
+ }): JSONSchema7;
107
+ //# sourceMappingURL=standard-schema.d.ts.map
@@ -0,0 +1,24 @@
1
+ import type { StandardJSONSchemaV1, StandardSchemaV1, StandardTypedV1 } from '../_types/@standard-schema_spec/dist/index.d.ts';
2
+ /**
3
+ * Type for schemas that implement both StandardSchemaV1 and StandardJSONSchemaV1.
4
+ * This combined type provides both validation and JSON Schema conversion capabilities.
5
+ */
6
+ export type StandardSchemaWithJSON<Input = unknown, Output = Input> = StandardSchemaV1<Input, Output> & StandardJSONSchemaV1<Input, Output>;
7
+ /**
8
+ * Props type for the combined standard schema interface.
9
+ */
10
+ export type StandardSchemaWithJSONProps<Input = unknown, Output = Input> = StandardSchemaV1.Props<Input, Output> & StandardJSONSchemaV1.Props<Input, Output>;
11
+ /**
12
+ * Utility type to infer the input type from a StandardSchemaV1 or StandardJSONSchemaV1.
13
+ */
14
+ export type InferInput<T extends StandardTypedV1> = StandardTypedV1.InferInput<T>;
15
+ /**
16
+ * Utility type to infer the output type from a StandardSchemaV1 or StandardJSONSchemaV1.
17
+ */
18
+ export type InferOutput<T extends StandardTypedV1> = StandardTypedV1.InferOutput<T>;
19
+ /**
20
+ * Supported targets for zod-to-json-schema conversion.
21
+ */
22
+ export type ZodToJsonSchemaTarget = 'jsonSchema7' | 'openApi3' | 'jsonSchema2019-09';
23
+ export type StandardSchemaIssue = StandardSchemaV1.Issue;
24
+ //# sourceMappingURL=standard-schema.types.d.ts.map