mastra 1.0.0-beta.10 → 1.0.0-beta.12

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 (339) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/dist/analytics/index.d.ts +1 -0
  3. package/dist/analytics/index.d.ts.map +1 -1
  4. package/dist/analytics/index.js +1 -1
  5. package/dist/{chunk-TL3K64EI.js → chunk-3MHPDBSK.js} +8 -6
  6. package/dist/chunk-3MHPDBSK.js.map +1 -0
  7. package/dist/{chunk-THUIZ4X5.js → chunk-NDB3XH2X.js} +45 -14
  8. package/dist/chunk-NDB3XH2X.js.map +1 -0
  9. package/dist/commands/actions/build-project.d.ts +1 -0
  10. package/dist/commands/actions/build-project.d.ts.map +1 -1
  11. package/dist/commands/actions/init-project.d.ts.map +1 -1
  12. package/dist/commands/build/BuildBundler.d.ts +6 -1
  13. package/dist/commands/build/BuildBundler.d.ts.map +1 -1
  14. package/dist/commands/build/build.d.ts +2 -1
  15. package/dist/commands/build/build.d.ts.map +1 -1
  16. package/dist/commands/create/create.js +2 -2
  17. package/dist/commands/create/utils.d.ts +1 -1
  18. package/dist/commands/dev/DevBundler.d.ts.map +1 -1
  19. package/dist/commands/dev/dev.d.ts.map +1 -1
  20. package/dist/commands/init/mcp-docs-server-install.d.ts +3 -2
  21. package/dist/commands/init/mcp-docs-server-install.d.ts.map +1 -1
  22. package/dist/commands/init/utils.d.ts +2 -1
  23. package/dist/commands/init/utils.d.ts.map +1 -1
  24. package/dist/commands/studio/studio.d.ts +3 -0
  25. package/dist/commands/studio/studio.d.ts.map +1 -1
  26. package/dist/commands/utils.d.ts +7 -1
  27. package/dist/commands/utils.d.ts.map +1 -1
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +116 -38
  30. package/dist/index.js.map +1 -1
  31. package/dist/playground/assets/{abap-FIXVzycL.js → abap-DeQMryv5.js} +1 -1
  32. package/dist/playground/assets/{abnf-By4-uL43.js → abnf-B0Q82kTJ.js} +1 -1
  33. package/dist/playground/assets/{actionscript-9f4cLMp1.js → actionscript-DlNT3NH7.js} +1 -1
  34. package/dist/playground/assets/{ada-HkG7d5Qx.js → ada-BWqa4NY9.js} +1 -1
  35. package/dist/playground/assets/{agda-NVUGKSBX.js → agda-B23Z6DoM.js} +1 -1
  36. package/dist/playground/assets/{al-B1SY5f_t.js → al-CGaEeJLb.js} +1 -1
  37. package/dist/playground/assets/{antlr4-CwEy4TSJ.js → antlr4-Dtxvj4BF.js} +1 -1
  38. package/dist/playground/assets/{apacheconf-DbL_4DCB.js → apacheconf-6m8M17tK.js} +1 -1
  39. package/dist/playground/assets/{apex-4a8yF-pY.js → apex-gp0OzCDc.js} +1 -1
  40. package/dist/playground/assets/{apl-Dv69rce6.js → apl-CLgPnCga.js} +1 -1
  41. package/dist/playground/assets/{applescript-CEJtb6gc.js → applescript-BQLVrD4r.js} +1 -1
  42. package/dist/playground/assets/{aql-BHV5TqzT.js → aql-C227Bqvx.js} +1 -1
  43. package/dist/playground/assets/{arduino-CPHnVaLq.js → arduino-BwHVQpbs.js} +1 -1
  44. package/dist/playground/assets/{arff-CBv-0Dr0.js → arff-Cni9MUvh.js} +1 -1
  45. package/dist/playground/assets/{asciidoc-BcbhqDMd.js → asciidoc-BVM8PD1V.js} +1 -1
  46. package/dist/playground/assets/{asm6502-DR7DA_kd.js → asm6502-LicJ7ast.js} +1 -1
  47. package/dist/playground/assets/{asmatmel-CUyodlOr.js → asmatmel-uvcdXPGo.js} +1 -1
  48. package/dist/playground/assets/{aspnet-CIEFyrfT.js → aspnet-pk6CCARx.js} +1 -1
  49. package/dist/playground/assets/{autohotkey-Bph4eoZz.js → autohotkey-B1t5VF8o.js} +1 -1
  50. package/dist/playground/assets/{autoit-C9go9SrR.js → autoit-B0wpPgHQ.js} +1 -1
  51. package/dist/playground/assets/{avisynth-DmV3YHH-.js → avisynth-CEfhzK15.js} +1 -1
  52. package/dist/playground/assets/{avro-idl-DFfE3que.js → avro-idl-Dd9ayWeQ.js} +1 -1
  53. package/dist/playground/assets/{bash-jmeqaWHv.js → bash-BD1-7Q1L.js} +1 -1
  54. package/dist/playground/assets/{basic-Bd0Xvv0J.js → basic-BRizzZHM.js} +1 -1
  55. package/dist/playground/assets/{batch-BuRRqR93.js → batch-Snw64RC9.js} +1 -1
  56. package/dist/playground/assets/{bbcode-Bj1xDsRH.js → bbcode-BShRHbpo.js} +1 -1
  57. package/dist/playground/assets/{bicep-sGbUQydi.js → bicep-C9smU4nn.js} +1 -1
  58. package/dist/playground/assets/{birb-Jvsj8R5K.js → birb-DZFk2ouj.js} +1 -1
  59. package/dist/playground/assets/{bison-CvpRrxL5.js → bison-BZyUXVI5.js} +1 -1
  60. package/dist/playground/assets/{bnf-D4J_7g2u.js → bnf-CrEEBWmP.js} +1 -1
  61. package/dist/playground/assets/{brainfuck-B8AoObrn.js → brainfuck-DHdn9leJ.js} +1 -1
  62. package/dist/playground/assets/{brightscript-BAsP5KY7.js → brightscript-DcEcNtOo.js} +1 -1
  63. package/dist/playground/assets/{bro-D3dpujDL.js → bro-BBoxs2Ap.js} +1 -1
  64. package/dist/playground/assets/{bsl-B8C16WaG.js → bsl-B2aHvnKl.js} +1 -1
  65. package/dist/playground/assets/{c-DhcBTJYa.js → c-a99z74kt.js} +1 -1
  66. package/dist/playground/assets/{cfscript-hJ_jcmxb.js → cfscript-BOqH8Afa.js} +1 -1
  67. package/dist/playground/assets/{chaiscript-BewoSnZY.js → chaiscript-CNtrvPPB.js} +1 -1
  68. package/dist/playground/assets/{chunk-55VPMN3N-Dhe3ufQx.js → chunk-55VPMN3N-D3iSl0Jn.js} +1 -1
  69. package/dist/playground/assets/{cil-BFlkBlAA.js → cil-DaZgExtj.js} +1 -1
  70. package/dist/playground/assets/{clike-BVgoTod2.js → clike-DayG7iKK.js} +1 -1
  71. package/dist/playground/assets/{clojure-DKF4IG7_.js → clojure-bcfheUAE.js} +1 -1
  72. package/dist/playground/assets/{cmake-f4bHlxfx.js → cmake-Wc6zdWrG.js} +1 -1
  73. package/dist/playground/assets/{cobol-b6YzEyDG.js → cobol-BJEvKDvE.js} +1 -1
  74. package/dist/playground/assets/{coffeescript-CKcbXY2Y.js → coffeescript-Sa78JrbI.js} +1 -1
  75. package/dist/playground/assets/{concurnas-CDvC9TA8.js → concurnas-DYK_EllN.js} +1 -1
  76. package/dist/playground/assets/{coq-DMsew7Ej.js → coq-BDS5TtVr.js} +1 -1
  77. package/dist/playground/assets/{core-CDJBBCPO.js → core-C4Es4q2_.js} +1 -1
  78. package/dist/playground/assets/{cpp-XJRt1avb.js → cpp-DFpVE-Eb.js} +1 -1
  79. package/dist/playground/assets/{crystal-D9QO3tZT.js → crystal-DBQ9vm1l.js} +1 -1
  80. package/dist/playground/assets/{csharp-Bc6Ynmxy.js → csharp-DzC3V8Re.js} +1 -1
  81. package/dist/playground/assets/{cshtml-D9djiSYy.js → cshtml-BieG6J3m.js} +1 -1
  82. package/dist/playground/assets/{csp-CRBEH-GS.js → csp-DIiHxd7W.js} +1 -1
  83. package/dist/playground/assets/{css-Dx6HjU9u.js → css-D_oGpw6r.js} +1 -1
  84. package/dist/playground/assets/{css-extras-wjWeiD_E.js → css-extras-SpSGLlJo.js} +1 -1
  85. package/dist/playground/assets/{csv-DyxK3wmT.js → csv-BOjw5Ths.js} +1 -1
  86. package/dist/playground/assets/{cypher-Cc4XfOy_.js → cypher-C37M88wn.js} +1 -1
  87. package/dist/playground/assets/{d-CsrhlVR-.js → d-Vt4PjkM5.js} +1 -1
  88. package/dist/playground/assets/{dart-sJXfdvpC.js → dart-Ud9K4IrD.js} +1 -1
  89. package/dist/playground/assets/{dataweave-wF6LdyMy.js → dataweave-DpVSfrCG.js} +1 -1
  90. package/dist/playground/assets/{dax-SZe2SxBb.js → dax-BK6e6gre.js} +1 -1
  91. package/dist/playground/assets/{dhall-C-ZT_se_.js → dhall-BBARpoVI.js} +1 -1
  92. package/dist/playground/assets/{diff-XkG0B6dy.js → diff-Dp7lzqS9.js} +1 -1
  93. package/dist/playground/assets/{django-CNVE53kn.js → django-CFA5yTnk.js} +1 -1
  94. package/dist/playground/assets/{dns-zone-file-DyHwwn2-.js → dns-zone-file-DEmtY8NS.js} +1 -1
  95. package/dist/playground/assets/{docker-CtPL61Su.js → docker-BOcoOdKi.js} +1 -1
  96. package/dist/playground/assets/{dot-bT1rIhkX.js → dot-BvJGDnnt.js} +1 -1
  97. package/dist/playground/assets/{ebnf-BBQkb-4j.js → ebnf-B0ooTBfZ.js} +1 -1
  98. package/dist/playground/assets/{editorconfig-bZGzi58w.js → editorconfig-Dqgd7G1v.js} +1 -1
  99. package/dist/playground/assets/{eiffel-DdiSXgQa.js → eiffel-CJqEEt8e.js} +1 -1
  100. package/dist/playground/assets/{ejs-BZ6XIneR.js → ejs-CnDT5Ec2.js} +1 -1
  101. package/dist/playground/assets/{elixir-zMJsNcjN.js → elixir-COsh0qsb.js} +1 -1
  102. package/dist/playground/assets/{elm-lbmKP8Yv.js → elm-VUgDmaWX.js} +1 -1
  103. package/dist/playground/assets/{erb-CU_MBiRT.js → erb-BDdoH6E0.js} +1 -1
  104. package/dist/playground/assets/{erlang-DkHZ8fiG.js → erlang-DFO49N7K.js} +1 -1
  105. package/dist/playground/assets/{etlua-MlIeAg7x.js → etlua-gQ1zK8dc.js} +1 -1
  106. package/dist/playground/assets/{excel-formula-D6MkfBk0.js → excel-formula-CTx5t5IQ.js} +1 -1
  107. package/dist/playground/assets/{factor-DpxrPjE8.js → factor-DBB_i8-Z.js} +1 -1
  108. package/dist/playground/assets/{false-DU0s4ntm.js → false-CJZcu7WR.js} +1 -1
  109. package/dist/playground/assets/{firestore-security-rules-BZSFJQaQ.js → firestore-security-rules-IO7LckTg.js} +1 -1
  110. package/dist/playground/assets/{flow-D3a2LgHE.js → flow-DiTuHH9E.js} +1 -1
  111. package/dist/playground/assets/{fortran-iBT8UWOX.js → fortran-DFj-TQ3Z.js} +1 -1
  112. package/dist/playground/assets/{fsharp-DXXWRguP.js → fsharp-CKntFSA8.js} +1 -1
  113. package/dist/playground/assets/{ftl-DovPr19-.js → ftl-EuMgobGJ.js} +1 -1
  114. package/dist/playground/assets/{gap-PZRisdYB.js → gap-0HwILXCE.js} +1 -1
  115. package/dist/playground/assets/{gcode-ChgV_KCF.js → gcode-BGmbv8ir.js} +1 -1
  116. package/dist/playground/assets/{gdscript-Cy8Xk01F.js → gdscript-GJfmNp4N.js} +1 -1
  117. package/dist/playground/assets/{gedcom-oQpcZB2I.js → gedcom-D71HnuEA.js} +1 -1
  118. package/dist/playground/assets/{gherkin-KCacYXwp.js → gherkin-DHGK4Fem.js} +1 -1
  119. package/dist/playground/assets/{git-CG8SgFBW.js → git-DGBB_u2Z.js} +1 -1
  120. package/dist/playground/assets/{glsl-B1Qtewh3.js → glsl-M90uv2pb.js} +1 -1
  121. package/dist/playground/assets/{gml-CZv1TPN3.js → gml-C8OrDCZ3.js} +1 -1
  122. package/dist/playground/assets/{gn-CFD0oOaJ.js → gn-9yd4TN-B.js} +1 -1
  123. package/dist/playground/assets/{go-BDhbzzZQ.js → go-CZqZo0K1.js} +1 -1
  124. package/dist/playground/assets/{go-module-TQV2JXyL.js → go-module-9XQJf3xW.js} +1 -1
  125. package/dist/playground/assets/{graphql-C8FTbJQM.js → graphql-R8JzIWAz.js} +1 -1
  126. package/dist/playground/assets/{groovy-vFnsC5L9.js → groovy-CxQT2lnK.js} +1 -1
  127. package/dist/playground/assets/{haml-BldrZnyA.js → haml-CL4OCebC.js} +1 -1
  128. package/dist/playground/assets/{handlebars-Cl4d1OSC.js → handlebars-CNaV-2WV.js} +1 -1
  129. package/dist/playground/assets/{haskell-k5R857Zs.js → haskell-C8PLbPlK.js} +1 -1
  130. package/dist/playground/assets/{haxe-x5eoD49s.js → haxe-CXdmUfdE.js} +1 -1
  131. package/dist/playground/assets/{hcl-mSl8xedx.js → hcl-C55NaF7l.js} +1 -1
  132. package/dist/playground/assets/{hlsl-9lMa_1xq.js → hlsl-BiLDuTdL.js} +1 -1
  133. package/dist/playground/assets/{hoon-YYkqqes1.js → hoon-B1PHoxzV.js} +1 -1
  134. package/dist/playground/assets/{hpkp-CUrVQJor.js → hpkp-DghclaH8.js} +1 -1
  135. package/dist/playground/assets/{hsts-DwVBB0lW.js → hsts-Che8Mk0h.js} +1 -1
  136. package/dist/playground/assets/{http-DglbIM32.js → http-CzNPgQGj.js} +1 -1
  137. package/dist/playground/assets/{ichigojam-DWa0cNxX.js → ichigojam-BiabpCGU.js} +1 -1
  138. package/dist/playground/assets/{icon-DW8v1-dE.js → icon-CaVPekzj.js} +1 -1
  139. package/dist/playground/assets/{icu-message-format-CIk1tr7R.js → icu-message-format-BK_RmkWk.js} +1 -1
  140. package/dist/playground/assets/{idris-CsroogRC.js → idris-BBvNN70Y.js} +1 -1
  141. package/dist/playground/assets/{iecst-Co3M2_Yi.js → iecst-CfUwRJTY.js} +1 -1
  142. package/dist/playground/assets/{ignore-oLK-8Ahh.js → ignore-D_3xQ7ZS.js} +1 -1
  143. package/dist/playground/assets/{index-q01yofCI.js → index-4yZWec-R.js} +1 -1
  144. package/dist/playground/assets/{index-D1KvEziA.js → index-BB04-6AJ.js} +1 -1
  145. package/dist/playground/assets/{index-DSR-RUmF.js → index-BOPK8vnG.js} +1 -1
  146. package/dist/playground/assets/{index-CbIcfWVl.js → index-BvkX9AK3.js} +1 -1
  147. package/dist/playground/assets/{index-Bn0E-nQM.js → index-BxlAqdnx.js} +1 -1
  148. package/dist/playground/assets/{index-DbrLwC0Y.js → index-C8lXzh7f.js} +1 -1
  149. package/dist/playground/assets/{index-B3K3E7lh.js → index-CHtvxbzn.js} +1 -1
  150. package/dist/playground/assets/{index-DKux1Dny.js → index-CT4NHjMP.js} +1 -1
  151. package/dist/playground/assets/{index-CdMDwMv2.js → index-CWW7lPSR.js} +1 -1
  152. package/dist/playground/assets/{index-DRjE9_iO.js → index-CZnjkI9I.js} +1 -1
  153. package/dist/playground/assets/{index-DrTrdtE8.js → index-Cn7mv5W9.js} +1 -1
  154. package/dist/playground/assets/{index-TeIAN1tr.js → index-CpoF9__E.js} +1 -1
  155. package/dist/playground/assets/{index-8uXMhpQm.js → index-DEEEElZ6.js} +1 -1
  156. package/dist/playground/assets/{index-CL31sTuI.js → index-DFCBEnNu.js} +1 -1
  157. package/dist/playground/assets/{index-l0uyD7k6.js → index-DO7sRrhF.js} +1 -1
  158. package/dist/playground/assets/{index-DD-4x9Lc.js → index-DSzWF-vU.js} +1 -1
  159. package/dist/playground/assets/{index-DWf13Ibp.js → index-jW1r9n2G.js} +1 -1
  160. package/dist/playground/assets/{index-BBzWmVlV.js → index-z7yy83NR.js} +1 -1
  161. package/dist/playground/assets/{inform7-CbjNwYtR.js → inform7-wR1PEaGp.js} +1 -1
  162. package/dist/playground/assets/{ini-3heMRyW6.js → ini-DB2NowwR.js} +1 -1
  163. package/dist/playground/assets/{io-CvfxPic_.js → io-cfXKj-bQ.js} +1 -1
  164. package/dist/playground/assets/{j-C98YOhah.js → j-C04IofMj.js} +1 -1
  165. package/dist/playground/assets/{java-DhQhApxl.js → java-BpUFAKlT.js} +1 -1
  166. package/dist/playground/assets/{javadoc-Cnp8Sbaz.js → javadoc-C2oUj0_F.js} +1 -1
  167. package/dist/playground/assets/{javadoclike-zr3NJLJi.js → javadoclike-CijsYhJB.js} +1 -1
  168. package/dist/playground/assets/{javascript-PUcqH7ZS.js → javascript-CUlUQdU8.js} +1 -1
  169. package/dist/playground/assets/{javastacktrace-C6l4ub9L.js → javastacktrace-CskhbxY0.js} +1 -1
  170. package/dist/playground/assets/{jexl-DNeXcm49.js → jexl-DxcOYppe.js} +1 -1
  171. package/dist/playground/assets/{jolie-zoTOW02A.js → jolie-By8RyoAE.js} +1 -1
  172. package/dist/playground/assets/{jq-Ca0CrUyy.js → jq-DdfCmiv2.js} +1 -1
  173. package/dist/playground/assets/{js-extras-B4r4kSxG.js → js-extras-CIacV901.js} +1 -1
  174. package/dist/playground/assets/{js-templates-DAlwvA0o.js → js-templates-dJObUii9.js} +1 -1
  175. package/dist/playground/assets/{jsdoc-DjsiXAM4.js → jsdoc-DlZX4Fii.js} +1 -1
  176. package/dist/playground/assets/{json-CLk2Yhfg.js → json-BHMyvXEx.js} +1 -1
  177. package/dist/playground/assets/{json5-DcU7maja.js → json5-BfxpNZft.js} +1 -1
  178. package/dist/playground/assets/{jsonp-DpVFheql.js → jsonp-BWUgX-Q7.js} +1 -1
  179. package/dist/playground/assets/{jsstacktrace-DgyGl8Rf.js → jsstacktrace-CZ7W_zTa.js} +1 -1
  180. package/dist/playground/assets/{jsx-BTbGatd0.js → jsx-BaNO3zra.js} +1 -1
  181. package/dist/playground/assets/{julia--GYy8oeg.js → julia-3mWETTF_.js} +1 -1
  182. package/dist/playground/assets/{keepalived-5vf1JhH_.js → keepalived-CrZkVkS4.js} +1 -1
  183. package/dist/playground/assets/{keyman-IFl0jfnx.js → keyman-C4z8Uzne.js} +1 -1
  184. package/dist/playground/assets/{kotlin-9LEEP8JX.js → kotlin-DWbfYPFD.js} +1 -1
  185. package/dist/playground/assets/{kumir-DWRlydVK.js → kumir-DqgMAZMc.js} +1 -1
  186. package/dist/playground/assets/{kusto-BFXdehEL.js → kusto-BSVXPfNr.js} +1 -1
  187. package/dist/playground/assets/{latex-Di49YGCi.js → latex-B2QP_UYU.js} +1 -1
  188. package/dist/playground/assets/{latte-Dvhdt96y.js → latte-CpFXMqSd.js} +1 -1
  189. package/dist/playground/assets/{less-D0HobN9c.js → less-BiOaqRTM.js} +1 -1
  190. package/dist/playground/assets/{lilypond-B6-c7NJu.js → lilypond-KgNzHovz.js} +1 -1
  191. package/dist/playground/assets/{liquid-DchZzf2C.js → liquid-BAdeMzjQ.js} +1 -1
  192. package/dist/playground/assets/{lisp-CYvk8xUV.js → lisp-Cr8x5hvg.js} +1 -1
  193. package/dist/playground/assets/{livescript-DnXQ3Cts.js → livescript-DqRZPPo7.js} +1 -1
  194. package/dist/playground/assets/{llvm-DnSbNag3.js → llvm-CV7e6tb7.js} +1 -1
  195. package/dist/playground/assets/{log-27FalpNh.js → log-e30Of_n5.js} +1 -1
  196. package/dist/playground/assets/{lolcode-dtWdLdKK.js → lolcode-BPot4wOS.js} +1 -1
  197. package/dist/playground/assets/{lua-DOG-z0SQ.js → lua-B93spTs7.js} +1 -1
  198. package/dist/playground/assets/{magma-tgLSM-Bu.js → magma-Dxw8HkdV.js} +1 -1
  199. package/dist/playground/assets/{main-B4eMybNm.js → main-JxIq11oH.js} +348 -346
  200. package/dist/playground/assets/{makefile-2tBsxb4I.js → makefile-EofxiRos.js} +1 -1
  201. package/dist/playground/assets/{markdown-Cq6fg4gF.js → markdown-9gLJhhYd.js} +1 -1
  202. package/dist/playground/assets/{markup-templating-2yvSgZUf.js → markup-templating-Dqi09IA2.js} +1 -1
  203. package/dist/playground/assets/{markup-CB5PvA0c.js → markup-wfrYP9el.js} +1 -1
  204. package/dist/playground/assets/{matlab-6PZ6jdlZ.js → matlab-DgRtrX-r.js} +1 -1
  205. package/dist/playground/assets/{maxscript-Bw9FpgtC.js → maxscript-B4XAZcUQ.js} +1 -1
  206. package/dist/playground/assets/{mel-CDFYe0Vs.js → mel-C9aDlsaP.js} +1 -1
  207. package/dist/playground/assets/{mermaid-DWIhjMoS.js → mermaid-DJr4dDkP.js} +1 -1
  208. package/dist/playground/assets/{mizar-C9oC8urs.js → mizar-D6jZRIqm.js} +1 -1
  209. package/dist/playground/assets/{mongodb-CmAe8j6w.js → mongodb-D1ZGLguP.js} +1 -1
  210. package/dist/playground/assets/{monkey-CJlsplfV.js → monkey-B378crN7.js} +1 -1
  211. package/dist/playground/assets/{moonscript-D_MHIf4p.js → moonscript-BiTFS47R.js} +1 -1
  212. package/dist/playground/assets/{n1ql-Dx5j-v-O.js → n1ql-qDn84WmB.js} +1 -1
  213. package/dist/playground/assets/{n4js-BMJanWSU.js → n4js-Buz_ySFw.js} +1 -1
  214. package/dist/playground/assets/{nand2tetris-hdl-B2HwHziQ.js → nand2tetris-hdl-BOLoEYjt.js} +1 -1
  215. package/dist/playground/assets/{naniscript-ZwQpPjaD.js → naniscript-ClmqxAHr.js} +1 -1
  216. package/dist/playground/assets/{nasm-tWtetAV-.js → nasm-WT9c9Jia.js} +1 -1
  217. package/dist/playground/assets/{neon-CoiFX-XW.js → neon-Ci7BTHsF.js} +1 -1
  218. package/dist/playground/assets/{nevod-_iJ0mW3A.js → nevod-CO18TZ6d.js} +1 -1
  219. package/dist/playground/assets/{nginx-Bbr-hTPn.js → nginx-DgrxhnSF.js} +1 -1
  220. package/dist/playground/assets/{nim-B-Oqihq4.js → nim-BNis2clQ.js} +1 -1
  221. package/dist/playground/assets/{nix-DYFkGjrM.js → nix-DgLFe_93.js} +1 -1
  222. package/dist/playground/assets/{nsis-BXCKQAg-.js → nsis-B1w2Qdmo.js} +1 -1
  223. package/dist/playground/assets/{objectivec-BM9MCIgp.js → objectivec-CXTp6vPW.js} +1 -1
  224. package/dist/playground/assets/{ocaml-BZ7ViprC.js → ocaml-xRPiGbhz.js} +1 -1
  225. package/dist/playground/assets/{opencl-CLRlnGe-.js → opencl-D-EyGn9i.js} +1 -1
  226. package/dist/playground/assets/{openqasm-ZQJUmoDa.js → openqasm-BuWJ1E4N.js} +1 -1
  227. package/dist/playground/assets/{oz-CxqsczrJ.js → oz-Ck8ljLfg.js} +1 -1
  228. package/dist/playground/assets/{parigp-BvJTqxyQ.js → parigp-ZOq060It.js} +1 -1
  229. package/dist/playground/assets/{parser-Wb4mb5NI.js → parser-BGdseppb.js} +1 -1
  230. package/dist/playground/assets/{pascal-B78HJWo9.js → pascal-CVX5JCm6.js} +1 -1
  231. package/dist/playground/assets/{pascaligo-E1N1zv0Y.js → pascaligo-DaF7Noge.js} +1 -1
  232. package/dist/playground/assets/{pcaxis-CtiHhjSC.js → pcaxis-BKsfUBo1.js} +1 -1
  233. package/dist/playground/assets/{peoplecode-BsFFgrRe.js → peoplecode-DpjssAn3.js} +1 -1
  234. package/dist/playground/assets/{perl-Bf5_xcTP.js → perl-B2L_odb8.js} +1 -1
  235. package/dist/playground/assets/{php-DucPl4ZV.js → php-Dfw0fzdt.js} +1 -1
  236. package/dist/playground/assets/{php-extras-CxNKxOX3.js → php-extras-Dkq8Q68U.js} +1 -1
  237. package/dist/playground/assets/{phpdoc-DZlZiD7X.js → phpdoc-CxbDGqiS.js} +1 -1
  238. package/dist/playground/assets/{plsql-C34RXOPs.js → plsql-YzByTi48.js} +1 -1
  239. package/dist/playground/assets/{powerquery-CkFGJ_Xy.js → powerquery-CfLXr7eR.js} +1 -1
  240. package/dist/playground/assets/{powershell-CW7Onzic.js → powershell-D5Yzda0C.js} +1 -1
  241. package/dist/playground/assets/{processing-B5UbloLN.js → processing-ByMOWgWP.js} +1 -1
  242. package/dist/playground/assets/{prolog-BlU-_0Ir.js → prolog-DjAQxB58.js} +1 -1
  243. package/dist/playground/assets/{promql-BNn9i8LV.js → promql-BNb13Srr.js} +1 -1
  244. package/dist/playground/assets/{properties-D6sdR9gz.js → properties-PLlvZRQH.js} +1 -1
  245. package/dist/playground/assets/{protobuf-CkctDIie.js → protobuf-Dr0WTH-Z.js} +1 -1
  246. package/dist/playground/assets/{psl-BfjoDuWR.js → psl-D43ceL8w.js} +1 -1
  247. package/dist/playground/assets/{pug-Ds_BIC0j.js → pug-C5jW122F.js} +1 -1
  248. package/dist/playground/assets/{puppet-CVAY__pZ.js → puppet-B0ASWUgn.js} +1 -1
  249. package/dist/playground/assets/{pure-BJ6TJ6pB.js → pure-BSGquYqL.js} +1 -1
  250. package/dist/playground/assets/{purebasic-BZMQJyyx.js → purebasic-B7P3M9iV.js} +1 -1
  251. package/dist/playground/assets/{purescript-DY8jG8kM.js → purescript-Dk4_vzhn.js} +1 -1
  252. package/dist/playground/assets/{python-BDC05EBX.js → python-B2mbzSQH.js} +1 -1
  253. package/dist/playground/assets/{q-CnIRln_4.js → q-BJ7s8pbs.js} +1 -1
  254. package/dist/playground/assets/{qml-DhOQ6jdV.js → qml-DpEE_0rO.js} +1 -1
  255. package/dist/playground/assets/{qore-CbVQy-Xl.js → qore-BfEtA02y.js} +1 -1
  256. package/dist/playground/assets/{qsharp-CeNOc743.js → qsharp-nOaWlgnS.js} +1 -1
  257. package/dist/playground/assets/{r-mtj5Kfyc.js → r-CGdsKeio.js} +1 -1
  258. package/dist/playground/assets/{racket-sXoSfApN.js → racket-NId6DzcC.js} +1 -1
  259. package/dist/playground/assets/{reason-CP0LK2VB.js → reason-CEAJyjoX.js} +1 -1
  260. package/dist/playground/assets/{regex-BIe5JmZ5.js → regex-BvbD-uyH.js} +1 -1
  261. package/dist/playground/assets/{rego-DI-dPGn1.js → rego-CFCvZWhQ.js} +1 -1
  262. package/dist/playground/assets/{renpy-0aB_GxON.js → renpy-DDsINICO.js} +1 -1
  263. package/dist/playground/assets/{rest-BqX_yJ5N.js → rest-Cvfw8Rik.js} +1 -1
  264. package/dist/playground/assets/{rip-BWUheBfE.js → rip-COJdsi_W.js} +1 -1
  265. package/dist/playground/assets/{roboconf-D_Nq9tpb.js → roboconf-Dazad1QD.js} +1 -1
  266. package/dist/playground/assets/{robotframework-CM_pBRFH.js → robotframework-CHz2nPbx.js} +1 -1
  267. package/dist/playground/assets/{ruby-D1XmI6_f.js → ruby-D0RKhMr2.js} +1 -1
  268. package/dist/playground/assets/{rust-CQQcVvjq.js → rust-BfJGQgkp.js} +1 -1
  269. package/dist/playground/assets/{sas-yhHbUu0b.js → sas-kXjCrJO0.js} +1 -1
  270. package/dist/playground/assets/{sass-IHUHXnBn.js → sass-Bso0NxOw.js} +1 -1
  271. package/dist/playground/assets/{scala-DlE7FbQL.js → scala-QPKqIyca.js} +1 -1
  272. package/dist/playground/assets/{scheme-V99S768C.js → scheme-RhlYEs5y.js} +1 -1
  273. package/dist/playground/assets/{scss-CMOzQllk.js → scss-BkDePXqA.js} +1 -1
  274. package/dist/playground/assets/{shell-session-DxzihzM-.js → shell-session-Cn3U1eaX.js} +1 -1
  275. package/dist/playground/assets/{smali-DAEt8bec.js → smali-6fAhhhR4.js} +1 -1
  276. package/dist/playground/assets/{smalltalk-CTObSEWd.js → smalltalk-DgiPJhvi.js} +1 -1
  277. package/dist/playground/assets/{smarty-CfrSd2id.js → smarty-DOTqkAVx.js} +1 -1
  278. package/dist/playground/assets/{sml-lAZR79St.js → sml-Cg0uj4O-.js} +1 -1
  279. package/dist/playground/assets/{solidity-CsqwN1f1.js → solidity-CLL85rtg.js} +1 -1
  280. package/dist/playground/assets/{solution-file-GAIntbKz.js → solution-file-BK8Snkba.js} +1 -1
  281. package/dist/playground/assets/{soy-0bHJr-e8.js → soy-BGtQGJbK.js} +1 -1
  282. package/dist/playground/assets/{sparql-bdcwXcaQ.js → sparql-DOa8GSCW.js} +1 -1
  283. package/dist/playground/assets/{splunk-spl-D0e-xejf.js → splunk-spl-BM9t4JCb.js} +1 -1
  284. package/dist/playground/assets/{sqf-B0erNtrK.js → sqf-zDZmS_xk.js} +1 -1
  285. package/dist/playground/assets/{sql-D9Qnx9_3.js → sql-DPuWhLFh.js} +1 -1
  286. package/dist/playground/assets/{squirrel-1FSuXxet.js → squirrel-vZo_p6Gq.js} +1 -1
  287. package/dist/playground/assets/{stan-B-MoRzf6.js → stan-Bqn9HWG5.js} +1 -1
  288. package/dist/playground/assets/style-Dqob8QUB.css +1 -0
  289. package/dist/playground/assets/{stylus-CQP9rzko.js → stylus-C8ptzTSi.js} +1 -1
  290. package/dist/playground/assets/{swift-Dl6I7uWH.js → swift-DQqCwPDE.js} +1 -1
  291. package/dist/playground/assets/{systemd-DvLH6rd8.js → systemd-C0qDru-a.js} +1 -1
  292. package/dist/playground/assets/{t4-cs-BTK0fk6g.js → t4-cs-BhZswEOD.js} +1 -1
  293. package/dist/playground/assets/{t4-templating-C7ULougy.js → t4-templating-BNAHFhjR.js} +1 -1
  294. package/dist/playground/assets/{t4-vb-kZjJPFOO.js → t4-vb-5eP8dUgG.js} +1 -1
  295. package/dist/playground/assets/{tap-CxGzIlqW.js → tap-C2CtXMX-.js} +1 -1
  296. package/dist/playground/assets/{tcl-y-C4lMKp.js → tcl-DbS1oxCU.js} +1 -1
  297. package/dist/playground/assets/{textile-da1depoN.js → textile-C-1hTb7T.js} +1 -1
  298. package/dist/playground/assets/{token-6GSAFR2W-SPYPLMBM-Ds6s4YQD.js → token-6GSAFR2W-SPYPLMBM-DTsTw0X8.js} +1 -1
  299. package/dist/playground/assets/token-util-NEHG7TUY-JRJTGTAB-B_vX4i0o.js +1 -0
  300. package/dist/playground/assets/{toml-bQAJCiNJ.js → toml-D6811wVb.js} +1 -1
  301. package/dist/playground/assets/{tremor-eEDkuhPQ.js → tremor-CdJIvWVA.js} +1 -1
  302. package/dist/playground/assets/{tsx-B0tIOpOU.js → tsx-DYc_42A6.js} +1 -1
  303. package/dist/playground/assets/{tt2-CqM9haCV.js → tt2-DkUmc1fs.js} +1 -1
  304. package/dist/playground/assets/{turtle-BKc3Sf5q.js → turtle-BMPgquQo.js} +1 -1
  305. package/dist/playground/assets/{twig-B0LxUrLL.js → twig-CjxKrb_3.js} +1 -1
  306. package/dist/playground/assets/{typescript-BM_333WK.js → typescript-DR13aDfj.js} +1 -1
  307. package/dist/playground/assets/{typoscript-CIc4zY_B.js → typoscript-Dfwy2wCS.js} +1 -1
  308. package/dist/playground/assets/{unrealscript-DIrJirtK.js → unrealscript-BbZU4j9k.js} +1 -1
  309. package/dist/playground/assets/{uorazor-DiZbcDAj.js → uorazor-CHecYMPk.js} +1 -1
  310. package/dist/playground/assets/{uri-pIRqtHEB.js → uri-Aq4I58Cz.js} +1 -1
  311. package/dist/playground/assets/{v-CfFnr08V.js → v-B5zX-nQj.js} +1 -1
  312. package/dist/playground/assets/{vala-BOIwfEot.js → vala-DeGMdwqi.js} +1 -1
  313. package/dist/playground/assets/{vbnet-D-8FKekT.js → vbnet-CLqWQuKm.js} +1 -1
  314. package/dist/playground/assets/{velocity-DTbiRxBl.js → velocity-BzUrI2-G.js} +1 -1
  315. package/dist/playground/assets/{verilog-B5ezP9T7.js → verilog-LOPBhoyO.js} +1 -1
  316. package/dist/playground/assets/{vhdl-C-VZtwiM.js → vhdl-Bp9sVrb9.js} +1 -1
  317. package/dist/playground/assets/{vim-CnbEfD9Z.js → vim-C21yTtyA.js} +1 -1
  318. package/dist/playground/assets/{visual-basic-CJH-fs4J.js → visual-basic-CQ10lKLh.js} +1 -1
  319. package/dist/playground/assets/{warpscript-TYUMDd6T.js → warpscript-DshiIHZW.js} +1 -1
  320. package/dist/playground/assets/{wasm-CKyxOEiI.js → wasm-gpyEW0in.js} +1 -1
  321. package/dist/playground/assets/{web-idl-BLIDy5vW.js → web-idl-DsZVBF8j.js} +1 -1
  322. package/dist/playground/assets/{wiki-YtaIm40z.js → wiki-Dqwcbzsr.js} +1 -1
  323. package/dist/playground/assets/{wolfram-CkEmmh5H.js → wolfram-CsZ5bj4I.js} +1 -1
  324. package/dist/playground/assets/{wren-Cz6qOcN3.js → wren-Ck2izBiQ.js} +1 -1
  325. package/dist/playground/assets/{xeora--XacNV5b.js → xeora-DHNAkShw.js} +1 -1
  326. package/dist/playground/assets/{xml-doc-B9r6ZOIY.js → xml-doc-DnyLTAep.js} +1 -1
  327. package/dist/playground/assets/{xojo-VGGevHLq.js → xojo-CKmP9dXP.js} +1 -1
  328. package/dist/playground/assets/{xquery-W1TekyQh.js → xquery-DL3uI8fY.js} +1 -1
  329. package/dist/playground/assets/{yaml-DaIUFbAU.js → yaml-DcIkGBPk.js} +1 -1
  330. package/dist/playground/assets/{yang-Br9OlhBh.js → yang-CN-yXqMr.js} +1 -1
  331. package/dist/playground/assets/{zig-CZnqCBRG.js → zig-Bn9NVsgw.js} +1 -1
  332. package/dist/playground/index.html +2 -2
  333. package/dist/utils/mastra-packages.d.ts +6 -0
  334. package/dist/utils/mastra-packages.d.ts.map +1 -0
  335. package/package.json +6 -5
  336. package/dist/chunk-THUIZ4X5.js.map +0 -1
  337. package/dist/chunk-TL3K64EI.js.map +0 -1
  338. package/dist/playground/assets/style-DIBTTqA7.css +0 -1
  339. package/dist/playground/assets/token-util-NEHG7TUY-JRJTGTAB-BozatJbH.js +0 -1
package/dist/index.js CHANGED
@@ -1,24 +1,26 @@
1
1
  #! /usr/bin/env node
2
- import { package_default, COMPONENTS, parseComponents, LLMProvider, parseLlmProvider, parseMcp, create, checkForPkgJson, getVersionTag, checkAndInstallCoreDeps, interactivePrompt, init, logger, FileService, createLogger, shouldSkipDotenvLoading, DepsService } from './chunk-THUIZ4X5.js';
3
- export { create } from './chunk-THUIZ4X5.js';
4
- import { PosthogAnalytics, setAnalytics } from './chunk-TL3K64EI.js';
5
- export { PosthogAnalytics } from './chunk-TL3K64EI.js';
2
+ import { package_default, COMPONENTS, parseComponents, LLMProvider, parseLlmProvider, parseMcp, create, checkForPkgJson, getVersionTag, isGitInitialized, checkAndInstallCoreDeps, interactivePrompt, init, logger, FileService, createLogger, shouldSkipDotenvLoading, DepsService } from './chunk-NDB3XH2X.js';
3
+ export { create } from './chunk-NDB3XH2X.js';
4
+ import { PosthogAnalytics, setAnalytics } from './chunk-3MHPDBSK.js';
5
+ export { PosthogAnalytics } from './chunk-3MHPDBSK.js';
6
6
  import { Command } from 'commander';
7
7
  import pc2 from 'picocolors';
8
8
  import * as p2 from '@clack/prompts';
9
- import fs, { existsSync, readFileSync } from 'fs';
9
+ import fs, { existsSync, readFileSync, writeFileSync } from 'fs';
10
10
  import path, { dirname, join } from 'path';
11
- import { getServerOptions, normalizeStudioBase, FileService as FileService$2, getBundlerOptions, getWatcherInputOptions, createWatcher } from '@mastra/deployer/build';
12
- import { Bundler } from '@mastra/deployer/bundler';
11
+ import { fileURLToPath } from 'url';
12
+ import { getServerOptions, normalizeStudioBase, FileService as FileService$2, getWatcherInputOptions, createWatcher } from '@mastra/deployer/build';
13
+ import { Bundler, IS_DEFAULT } from '@mastra/deployer/bundler';
14
+ import * as fsExtra from 'fs-extra';
15
+ import { copy } from 'fs-extra';
13
16
  import { getDeployer, FileService as FileService$1 } from '@mastra/deployer';
14
17
  import stripJsonComments from 'strip-json-comments';
15
18
  import process2 from 'process';
16
19
  import devcert from '@expo/devcert';
17
20
  import { execa } from 'execa';
18
21
  import getPort from 'get-port';
22
+ import { getPackageInfo } from 'local-pkg';
19
23
  import { writeFile } from 'fs/promises';
20
- import { fileURLToPath } from 'url';
21
- import * as fsExtra from 'fs-extra';
22
24
  import { spawn } from 'child_process';
23
25
  import { config } from 'dotenv';
24
26
  import http from 'http';
@@ -473,8 +475,20 @@ var addScorer = async (scorerName, args) => {
473
475
  });
474
476
  };
475
477
  var BuildBundler = class extends Bundler {
476
- constructor() {
478
+ studio;
479
+ constructor({ studio: studio2 } = {}) {
477
480
  super("Build");
481
+ this.studio = studio2 ?? false;
482
+ }
483
+ async getUserBundlerOptions(mastraEntryFile, outputDirectory) {
484
+ const bundlerOptions = await super.getUserBundlerOptions(mastraEntryFile, outputDirectory);
485
+ if (!bundlerOptions?.[IS_DEFAULT]) {
486
+ return bundlerOptions;
487
+ }
488
+ return {
489
+ ...bundlerOptions,
490
+ externals: true
491
+ };
478
492
  }
479
493
  getEnvFiles() {
480
494
  if (shouldSkipDotenvLoading()) {
@@ -491,6 +505,14 @@ var BuildBundler = class extends Bundler {
491
505
  }
492
506
  async prepare(outputDirectory) {
493
507
  await super.prepare(outputDirectory);
508
+ if (this.studio) {
509
+ const __filename2 = fileURLToPath(import.meta.url);
510
+ const __dirname2 = dirname(__filename2);
511
+ const playgroundServePath = join(outputDirectory, this.outputDir, "playground");
512
+ await copy(join(dirname(__dirname2), "dist/playground"), playgroundServePath, {
513
+ overwrite: true
514
+ });
515
+ }
494
516
  }
495
517
  async bundle(entryFile, outputDirectory, { toolsPaths, projectRoot }) {
496
518
  return this._bundle(this.getEntry(), entryFile, { outputDirectory, projectRoot }, toolsPaths);
@@ -503,7 +525,7 @@ var BuildBundler = class extends Bundler {
503
525
  import { createNodeServer, getToolExports } from '#server';
504
526
  import { tools } from '#tools';
505
527
  // @ts-ignore
506
- await createNodeServer(mastra, { tools: getToolExports(tools) });
528
+ await createNodeServer(mastra, { tools: getToolExports(tools), playground: ${this.studio} });
507
529
 
508
530
  if (mastra.getStorage()) {
509
531
  // start storage init in the background
@@ -520,6 +542,7 @@ async function build({
520
542
  dir: dir2,
521
543
  tools,
522
544
  root,
545
+ studio: studio2,
523
546
  debug
524
547
  }) {
525
548
  const rootDir = root || process.cwd();
@@ -531,7 +554,7 @@ async function build({
531
554
  const mastraEntryFile = fs3.getFirstExistingFile([join(mastraDir, "index.ts"), join(mastraDir, "index.js")]);
532
555
  const platformDeployer = await getDeployer(mastraEntryFile, outputDirectory);
533
556
  if (!platformDeployer) {
534
- const deployer = new BuildBundler();
557
+ const deployer = new BuildBundler({ studio: studio2 });
535
558
  deployer.__setLogger(logger2);
536
559
  const discoveredTools2 = deployer.getAllToolPaths(mastraDir, tools);
537
560
  await deployer.prepare(outputDirectory);
@@ -540,7 +563,13 @@ async function build({
540
563
  projectRoot: rootDir
541
564
  });
542
565
  logger2.info(`Build successful, you can now deploy the .mastra/output directory to your target platform.`);
543
- logger2.info(`To start the server, run: node .mastra/output/index.mjs`);
566
+ if (studio2) {
567
+ logger2.info(
568
+ `To start the server with studio, run: MASTRA_STUDIO_PATH=.mastra/output/playground node .mastra/output/index.mjs`
569
+ );
570
+ } else {
571
+ logger2.info(`To start the server, run: node .mastra/output/index.mjs`);
572
+ }
544
573
  return;
545
574
  }
546
575
  logger2.info("Deployer found, preparing deployer build...");
@@ -580,6 +609,7 @@ var buildProject = async (args) => {
580
609
  dir: args?.dir,
581
610
  root: args?.root,
582
611
  tools: args?.tools ? args.tools.split(",") : [],
612
+ studio: args?.studio,
583
613
  debug: args.debug
584
614
  });
585
615
  },
@@ -632,9 +662,10 @@ var initProject = async (args) => {
632
662
  execution: async () => {
633
663
  await checkForPkgJson();
634
664
  const versionTag = await getVersionTag();
665
+ const skipGitInit = await isGitInitialized({ cwd: process.cwd() });
635
666
  await checkAndInstallCoreDeps(Boolean(args?.example || args?.default), versionTag);
636
667
  if (!Object.keys(args).length) {
637
- const result = await interactivePrompt();
668
+ const result = await interactivePrompt({ skip: { gitInit: skipGitInit } });
638
669
  await init({
639
670
  ...result,
640
671
  llmApiKey: result?.llmApiKey,
@@ -1020,6 +1051,37 @@ var DevLogger = class {
1020
1051
  }
1021
1052
  };
1022
1053
  var devLogger = new DevLogger();
1054
+ async function getResolvedVersion(packageName, specifiedVersion) {
1055
+ try {
1056
+ const packageInfo = await getPackageInfo(packageName);
1057
+ return packageInfo?.version ?? specifiedVersion;
1058
+ } catch {
1059
+ return specifiedVersion;
1060
+ }
1061
+ }
1062
+ async function getMastraPackages2(rootDir) {
1063
+ try {
1064
+ const packageJsonPath = join(rootDir, "package.json");
1065
+ const packageJsonContent = readFileSync(packageJsonPath, "utf-8");
1066
+ const packageJson = JSON.parse(packageJsonContent);
1067
+ const allDependencies = {
1068
+ ...packageJson.dependencies ?? {},
1069
+ ...packageJson.devDependencies ?? {}
1070
+ };
1071
+ const mastraDeps = Object.entries(allDependencies).filter(
1072
+ ([name]) => name.startsWith("@mastra/") || name === "mastra"
1073
+ );
1074
+ const packages = await Promise.all(
1075
+ mastraDeps.map(async ([name, specifiedVersion]) => ({
1076
+ name,
1077
+ version: await getResolvedVersion(name, specifiedVersion)
1078
+ }))
1079
+ );
1080
+ return packages;
1081
+ } catch {
1082
+ return [];
1083
+ }
1084
+ }
1023
1085
  var DevBundler = class extends Bundler {
1024
1086
  customEnvFile;
1025
1087
  constructor(customEnvFile) {
@@ -1055,13 +1117,8 @@ var DevBundler = class extends Bundler {
1055
1117
  const __filename2 = fileURLToPath(import.meta.url);
1056
1118
  const __dirname2 = dirname(__filename2);
1057
1119
  const envFiles = await this.getEnvFiles();
1058
- let sourcemapEnabled = false;
1059
- try {
1060
- const bundlerOptions = await getBundlerOptions(entryFile, outputDirectory);
1061
- sourcemapEnabled = !!bundlerOptions?.sourcemap;
1062
- } catch (error) {
1063
- this.logger.debug("Failed to get bundler options, sourcemap will be disabled", { error });
1064
- }
1120
+ const bundlerOptions = await this.getUserBundlerOptions(entryFile, outputDirectory);
1121
+ const sourcemapEnabled = !!bundlerOptions?.sourcemap;
1065
1122
  const inputOptions = await getWatcherInputOptions(
1066
1123
  entryFile,
1067
1124
  "node",
@@ -1202,6 +1259,10 @@ var startServer = async (dotMastraPath, {
1202
1259
  commands.push(...startOptions.customArgs);
1203
1260
  }
1204
1261
  commands.push("index.mjs");
1262
+ const packagesFilePath = join(dotMastraPath, "..", "mastra-packages.json");
1263
+ if (startOptions.mastraPackages) {
1264
+ writeFileSync(packagesFilePath, JSON.stringify(startOptions.mastraPackages), "utf-8");
1265
+ }
1205
1266
  currentServerProcess = execa(process2.execPath, commands, {
1206
1267
  cwd: dotMastraPath,
1207
1268
  env: {
@@ -1210,6 +1271,7 @@ var startServer = async (dotMastraPath, {
1210
1271
  MASTRA_DEV: "true",
1211
1272
  PORT: port.toString(),
1212
1273
  MASTRA_DEFAULT_STORAGE_URL: `file:${join(dotMastraPath, "..", "mastra.db")}`,
1274
+ MASTRA_PACKAGES_FILE: packagesFilePath,
1213
1275
  ...startOptions?.https ? {
1214
1276
  MASTRA_HTTPS_KEY: startOptions.https.key.toString("base64"),
1215
1277
  MASTRA_HTTPS_CERT: startOptions.https.cert.toString("base64")
@@ -1410,7 +1472,8 @@ async function dev({
1410
1472
  const { key, cert } = await devcert.certificateFor(serverOptions?.host ?? "localhost");
1411
1473
  httpsOptions = { key, cert };
1412
1474
  }
1413
- const startOptions = { inspect, inspectBrk, customArgs, https: httpsOptions };
1475
+ const mastraPackages = await getMastraPackages2(rootDir);
1476
+ const startOptions = { inspect, inspectBrk, customArgs, https: httpsOptions, mastraPackages };
1414
1477
  await bundler.prepare(dotMastraPath);
1415
1478
  const watcher = await bundler.watch(entryFile, dotMastraPath, discoveredTools);
1416
1479
  await startServer(
@@ -1560,7 +1623,11 @@ var startProject = async (args) => {
1560
1623
  };
1561
1624
  var __filename = fileURLToPath(import.meta.url);
1562
1625
  var __dirname = dirname(__filename);
1563
- async function studio(options = {}) {
1626
+ async function studio(options = {
1627
+ serverHost: "localhost",
1628
+ serverPort: 4111,
1629
+ serverProtocol: "http"
1630
+ }) {
1564
1631
  config({ path: [options.env || ".env.production", ".env"] });
1565
1632
  try {
1566
1633
  const distPath = join(__dirname, "playground");
@@ -1569,7 +1636,7 @@ async function studio(options = {}) {
1569
1636
  process.exit(1);
1570
1637
  }
1571
1638
  const port = options.port || 3e3;
1572
- const server = createServer(distPath);
1639
+ const server = createServer(distPath, options);
1573
1640
  server.listen(port, () => {
1574
1641
  logger.info(`Mastra Studio running on http://localhost:${port}`);
1575
1642
  });
@@ -1588,16 +1655,19 @@ async function studio(options = {}) {
1588
1655
  process.exit(1);
1589
1656
  }
1590
1657
  }
1591
- var createServer = (builtStudioPath) => {
1592
- const server = http.createServer((request, response) => {
1593
- return handler(request, response, {
1594
- public: builtStudioPath,
1595
- rewrites: [
1596
- {
1597
- source: "**",
1598
- destination: "/index.html"
1599
- }
1600
- ]
1658
+ var createServer = (builtStudioPath, options) => {
1659
+ const indexHtmlPath = join(builtStudioPath, "index.html");
1660
+ const basePath = "";
1661
+ let html = readFileSync(indexHtmlPath, "utf8").replaceAll("%%MASTRA_STUDIO_BASE_PATH%%", basePath).replace("%%MASTRA_SERVER_HOST%%", options.serverHost || "localhost").replace("%%MASTRA_SERVER_PORT%%", String(options.serverPort || 4111)).replace("%%MASTRA_SERVER_PROTOCOL%%", options.serverProtocol || "http");
1662
+ const server = http.createServer((req, res) => {
1663
+ const url = req.url || basePath;
1664
+ const isStaticAsset = url.includes("/assets/") || url.includes("/dist/assets/") || url.includes("/mastra.svg") || url.includes("/favicon.ico");
1665
+ if (!isStaticAsset) {
1666
+ res.writeHead(200, { "Content-Type": "text/html" });
1667
+ return res.end(html);
1668
+ }
1669
+ return handler(req, res, {
1670
+ public: builtStudioPath
1601
1671
  });
1602
1672
  });
1603
1673
  return server;
@@ -1629,7 +1699,11 @@ program.command("create [project-name]").description("Create a new Mastra projec
1629
1699
  ).option("-l, --llm <model-provider>", `Default model provider (${LLMProvider.join(", ")})`, parseLlmProvider).option("-k, --llm-api-key <api-key>", "API key for the model provider").option("-e, --example", "Include example code").option("-n, --no-example", "Do not include example code").option("-t, --timeout [timeout]", "Configurable timeout for package installation, defaults to 60000 ms").option("-d, --dir <directory>", "Target directory for Mastra source code (default: src/)").option(
1630
1700
  "-p, --project-name <string>",
1631
1701
  "Project name that will be used in package.json and as the project directory name."
1632
- ).option("-m, --mcp <editor>", "MCP Server for code editor (cursor, cursor-global, windsurf, vscode)", parseMcp).option(
1702
+ ).option(
1703
+ "-m, --mcp <editor>",
1704
+ "MCP Server for code editor (cursor, cursor-global, windsurf, vscode, antigravity)",
1705
+ parseMcp
1706
+ ).option(
1633
1707
  "--template [template-name]",
1634
1708
  "Create project from a template (use template name, public GitHub URL, or leave blank to select from list)"
1635
1709
  ).action(createProject);
@@ -1637,7 +1711,11 @@ program.command("init").description("Initialize Mastra in your project").option(
1637
1711
  "-c, --components <components>",
1638
1712
  `Comma-separated list of components (${COMPONENTS.join(", ")})`,
1639
1713
  parseComponents
1640
- ).option("-l, --llm <model-provider>", `Default model provider (${LLMProvider.join(", ")})`, parseLlmProvider).option("-k, --llm-api-key <api-key>", "API key for the model provider").option("-e, --example", "Include example code").option("-n, --no-example", "Do not include example code").option("-m, --mcp <editor>", "MCP Server for code editor (cursor, cursor-global, windsurf, vscode)", parseMcp).action(initProject);
1714
+ ).option("-l, --llm <model-provider>", `Default model provider (${LLMProvider.join(", ")})`, parseLlmProvider).option("-k, --llm-api-key <api-key>", "API key for the model provider").option("-e, --example", "Include example code").option("-n, --no-example", "Do not include example code").option(
1715
+ "-m, --mcp <editor>",
1716
+ "MCP Server for code editor (cursor, cursor-global, windsurf, vscode, antigravity)",
1717
+ parseMcp
1718
+ ).action(initProject);
1641
1719
  program.command("lint").description("Lint your Mastra project").option("-d, --dir <path>", "Path to your Mastra folder").option("-r, --root <path>", "Path to your root folder").option("-t, --tools <toolsDirs>", "Comma-separated list of paths to tool files to include").action(lintProject);
1642
1720
  program.command("dev").description("Start mastra server").option("-d, --dir <dir>", "Path to your mastra folder").option("-r, --root <root>", "Path to your root folder").option("-t, --tools <toolsDirs>", "Comma-separated list of paths to tool files to include").option("-e, --env <env>", "Custom env file to include in the dev server").option(
1643
1721
  "-i, --inspect [host:port]",
@@ -1649,9 +1727,9 @@ program.command("dev").description("Start mastra server").option("-d, --dir <dir
1649
1727
  "-c, --custom-args <args>",
1650
1728
  "Comma-separated list of custom arguments to pass to the dev server. IE: --experimental-transform-types"
1651
1729
  ).option("-s, --https", "Enable local HTTPS").option("--debug", "Enable debug logs", false).action(startDevServer);
1652
- program.command("build").description("Build your Mastra project").option("-d, --dir <path>", "Path to your Mastra Folder").option("-r, --root <path>", "Path to your root folder").option("-t, --tools <toolsDirs>", "Comma-separated list of paths to tool files to include").option("--debug", "Enable debug logs", false).action(buildProject);
1730
+ program.command("build").description("Build your Mastra project").option("-d, --dir <path>", "Path to your Mastra Folder").option("-r, --root <path>", "Path to your root folder").option("-t, --tools <toolsDirs>", "Comma-separated list of paths to tool files to include").option("-s, --studio", "Bundle the studio UI with the build").option("--debug", "Enable debug logs", false).action(buildProject);
1653
1731
  program.command("start").description("Start your built Mastra application").option("-d, --dir <path>", "Path to your built Mastra output directory (default: .mastra/output)").option("-e, --env <env>", "Custom env file to include in the start").action(startProject);
1654
- program.command("studio").description("Start the Mastra studio").option("-p, --port <port>", "Port to run the studio on (default: 3000)").option("-e, --env <env>", "Custom env file to include in the studio").action(studio);
1732
+ program.command("studio").description("Start the Mastra studio").option("-p, --port <port>", "Port to run the studio on (default: 3000)").option("-e, --env <env>", "Custom env file to include in the studio").option("-h, --server-host <serverHost>", "Host of the Mastra API server (default: localhost)").option("-s, --server-port <serverPort>", "Port of the Mastra API server (default: 4111)").option("-x, --server-protocol <serverProtocol>", "Protocol of the Mastra API server (default: http)").action(studio);
1655
1733
  var scorersCommand = program.command("scorers").description("Manage scorers for evaluating AI outputs");
1656
1734
  scorersCommand.command("add [scorer-name]").description("Add a new scorer to your project").option("-d, --dir <path>", "Path to your Mastra directory (default: auto-detect)").action(addScorer);
1657
1735
  scorersCommand.command("list").description("List available scorer templates").action(listScorers);