@mastra/deployer 1.0.0-beta.2 → 1.0.0-beta.21

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 (237) hide show
  1. package/CHANGELOG.md +367 -0
  2. package/dist/arktype-aI7TBD0R-CCZH3EYK.js +8 -0
  3. package/dist/arktype-aI7TBD0R-CCZH3EYK.js.map +1 -0
  4. package/dist/arktype-aI7TBD0R-XHBHUL3T.cjs +10 -0
  5. package/dist/arktype-aI7TBD0R-XHBHUL3T.cjs.map +1 -0
  6. package/dist/build/analyze/analyzeEntry.d.ts +4 -1
  7. package/dist/build/analyze/analyzeEntry.d.ts.map +1 -1
  8. package/dist/build/analyze/bundleExternals.d.ts +4 -5
  9. package/dist/build/analyze/bundleExternals.d.ts.map +1 -1
  10. package/dist/build/analyze.cjs +2 -2
  11. package/dist/build/analyze.d.ts +6 -6
  12. package/dist/build/analyze.d.ts.map +1 -1
  13. package/dist/build/analyze.js +1 -1
  14. package/dist/build/babel/remove-deployer.d.ts.map +1 -1
  15. package/dist/build/bundler.cjs +3 -3
  16. package/dist/build/bundler.d.ts +3 -1
  17. package/dist/build/bundler.d.ts.map +1 -1
  18. package/dist/build/bundler.js +1 -1
  19. package/dist/build/bundlerOptions.d.ts.map +1 -1
  20. package/dist/build/deployer.d.ts.map +1 -1
  21. package/dist/build/index.cjs +22 -13
  22. package/dist/build/index.d.ts +2 -0
  23. package/dist/build/index.d.ts.map +1 -1
  24. package/dist/build/index.js +5 -4
  25. package/dist/build/package-info.d.ts +9 -0
  26. package/dist/build/package-info.d.ts.map +1 -0
  27. package/dist/build/plugins/esm-shim.d.ts +14 -0
  28. package/dist/build/plugins/esm-shim.d.ts.map +1 -0
  29. package/dist/build/plugins/module-resolve-map.d.ts +3 -0
  30. package/dist/build/plugins/module-resolve-map.d.ts.map +1 -0
  31. package/dist/build/plugins/node-gyp-detector.d.ts +3 -0
  32. package/dist/build/plugins/node-gyp-detector.d.ts.map +1 -0
  33. package/dist/build/plugins/node-modules-extension-resolver.d.ts +7 -0
  34. package/dist/build/plugins/node-modules-extension-resolver.d.ts.map +1 -1
  35. package/dist/build/plugins/remove-all-except.d.ts +10 -0
  36. package/dist/build/plugins/remove-all-except.d.ts.map +1 -0
  37. package/dist/build/plugins/subpath-externals-resolver.d.ts +3 -0
  38. package/dist/build/plugins/subpath-externals-resolver.d.ts.map +1 -0
  39. package/dist/build/plugins/tsconfig-paths.d.ts +8 -0
  40. package/dist/build/plugins/tsconfig-paths.d.ts.map +1 -1
  41. package/dist/build/serverOptions.d.ts.map +1 -1
  42. package/dist/build/shared/extract-mastra-option.d.ts +4 -8
  43. package/dist/build/shared/extract-mastra-option.d.ts.map +1 -1
  44. package/dist/build/types.d.ts +5 -0
  45. package/dist/build/types.d.ts.map +1 -1
  46. package/dist/build/utils.d.ts +36 -4
  47. package/dist/build/utils.d.ts.map +1 -1
  48. package/dist/build/watcher.d.ts +2 -1
  49. package/dist/build/watcher.d.ts.map +1 -1
  50. package/dist/bundler/index.cjs +6 -2
  51. package/dist/bundler/index.d.ts +11 -8
  52. package/dist/bundler/index.d.ts.map +1 -1
  53. package/dist/bundler/index.js +1 -1
  54. package/dist/chunk-2VG357HT.cjs +4 -0
  55. package/dist/chunk-2VG357HT.cjs.map +1 -0
  56. package/dist/{chunk-OFUWEVGF.js → chunk-2ZPRZMBN.js} +70 -24
  57. package/dist/chunk-2ZPRZMBN.js.map +1 -0
  58. package/dist/{chunk-H3LLQ2MW.js → chunk-4NPMVODD.js} +813 -349
  59. package/dist/chunk-4NPMVODD.js.map +1 -0
  60. package/dist/chunk-5TYVF4KJ.cjs +76 -0
  61. package/dist/chunk-5TYVF4KJ.cjs.map +1 -0
  62. package/dist/chunk-DBXWQ2CA.js +159 -0
  63. package/dist/chunk-DBXWQ2CA.js.map +1 -0
  64. package/dist/{chunk-5QFG6SCM.js → chunk-DPDWM7HQ.js} +2 -2
  65. package/dist/chunk-DPDWM7HQ.js.map +1 -0
  66. package/dist/chunk-G6GFAPPU.js +6 -0
  67. package/dist/chunk-G6GFAPPU.js.map +1 -0
  68. package/dist/chunk-HPGDVJAZ.js +3 -0
  69. package/dist/chunk-HPGDVJAZ.js.map +1 -0
  70. package/dist/{chunk-IL2VLNIJ.cjs → chunk-HVKR4FT2.cjs} +77 -31
  71. package/dist/chunk-HVKR4FT2.cjs.map +1 -0
  72. package/dist/chunk-JBE6KM7R.cjs +95 -0
  73. package/dist/chunk-JBE6KM7R.cjs.map +1 -0
  74. package/dist/chunk-JRUJ546M.cjs +162 -0
  75. package/dist/chunk-JRUJ546M.cjs.map +1 -0
  76. package/dist/{chunk-3JYRSECU.cjs → chunk-JVBCN3RH.cjs} +4 -4
  77. package/dist/chunk-JVBCN3RH.cjs.map +1 -0
  78. package/dist/chunk-KE4NVPI4.cjs +8 -0
  79. package/dist/chunk-KE4NVPI4.cjs.map +1 -0
  80. package/dist/chunk-MCWU6IKS.js +14 -0
  81. package/dist/chunk-MCWU6IKS.js.map +1 -0
  82. package/dist/{chunk-WBAWUM7Z.js → chunk-NGWTN4SJ.js} +48 -28
  83. package/dist/chunk-NGWTN4SJ.js.map +1 -0
  84. package/dist/{chunk-C74EXQSL.cjs → chunk-NWQP6PZQ.cjs} +826 -362
  85. package/dist/chunk-NWQP6PZQ.cjs.map +1 -0
  86. package/dist/chunk-QAOUDKHK.js +67 -0
  87. package/dist/chunk-QAOUDKHK.js.map +1 -0
  88. package/dist/{chunk-AQAOWLJJ.cjs → chunk-SBGBJ7NB.cjs} +57 -36
  89. package/dist/chunk-SBGBJ7NB.cjs.map +1 -0
  90. package/dist/chunk-UKP4KHBS.js +88 -0
  91. package/dist/chunk-UKP4KHBS.js.map +1 -0
  92. package/dist/chunk-V4HCIN6G.js +93 -0
  93. package/dist/chunk-V4HCIN6G.js.map +1 -0
  94. package/dist/chunk-Z53UZLS3.cjs +112 -0
  95. package/dist/chunk-Z53UZLS3.cjs.map +1 -0
  96. package/dist/chunk-ZXQ7DOYU.cjs +16 -0
  97. package/dist/chunk-ZXQ7DOYU.cjs.map +1 -0
  98. package/dist/default-u_dwuiYb-JPNIZQKK.cjs +9 -0
  99. package/dist/default-u_dwuiYb-JPNIZQKK.cjs.map +1 -0
  100. package/dist/default-u_dwuiYb-RK5OD4MY.js +3 -0
  101. package/dist/default-u_dwuiYb-RK5OD4MY.js.map +1 -0
  102. package/dist/deploy/log.d.ts +1 -1
  103. package/dist/deploy/log.d.ts.map +1 -1
  104. package/dist/docs/README.md +32 -0
  105. package/dist/docs/SKILL.md +36 -0
  106. package/dist/docs/SOURCE_MAP.json +27 -0
  107. package/dist/docs/deployer/01-reference.md +93 -0
  108. package/dist/docs/deployment/01-overview.md +60 -0
  109. package/dist/docs/deployment/02-mastra-server.md +70 -0
  110. package/dist/docs/deployment/03-monorepo.md +70 -0
  111. package/dist/docs/deployment/04-cloud-providers.md +17 -0
  112. package/dist/docs/deployment/05-web-framework.md +55 -0
  113. package/dist/docs/deployment/06-workflow-runners.md +11 -0
  114. package/dist/effect-QlVUlMFu-HN3LWZSQ.cjs +17 -0
  115. package/dist/effect-QlVUlMFu-HN3LWZSQ.cjs.map +1 -0
  116. package/dist/effect-QlVUlMFu-XOJ2F4UA.js +15 -0
  117. package/dist/effect-QlVUlMFu-XOJ2F4UA.js.map +1 -0
  118. package/dist/esm-6TGK2CUM.js +1289 -0
  119. package/dist/esm-6TGK2CUM.js.map +1 -0
  120. package/dist/esm-SQKX5ABS.cjs +1336 -0
  121. package/dist/esm-SQKX5ABS.cjs.map +1 -0
  122. package/dist/index.cjs +11 -22
  123. package/dist/index.cjs.map +1 -1
  124. package/dist/index.js +5 -16
  125. package/dist/index.js.map +1 -1
  126. package/dist/server/handlers/restart-active-runs.d.ts +3 -0
  127. package/dist/server/handlers/restart-active-runs.d.ts.map +1 -0
  128. package/dist/server/index.cjs +2659 -10538
  129. package/dist/server/index.cjs.map +1 -1
  130. package/dist/server/index.d.ts +3 -12
  131. package/dist/server/index.d.ts.map +1 -1
  132. package/dist/server/index.js +2662 -10542
  133. package/dist/server/index.js.map +1 -1
  134. package/dist/services/index.cjs +4 -4
  135. package/dist/services/index.js +1 -1
  136. package/dist/sury-CWZTCd75-KEHKUXG7.cjs +17 -0
  137. package/dist/sury-CWZTCd75-KEHKUXG7.cjs.map +1 -0
  138. package/dist/sury-CWZTCd75-L2D76L25.js +15 -0
  139. package/dist/sury-CWZTCd75-L2D76L25.js.map +1 -0
  140. package/dist/typebox-Dei93FPO-LBLFC3RD.js +8 -0
  141. package/dist/typebox-Dei93FPO-LBLFC3RD.js.map +1 -0
  142. package/dist/typebox-Dei93FPO-RDSW6DFA.cjs +10 -0
  143. package/dist/typebox-Dei93FPO-RDSW6DFA.cjs.map +1 -0
  144. package/dist/valibot--1zFm7rT-NVADAEQI.cjs +17 -0
  145. package/dist/valibot--1zFm7rT-NVADAEQI.cjs.map +1 -0
  146. package/dist/valibot--1zFm7rT-R2UKWLZC.js +15 -0
  147. package/dist/valibot--1zFm7rT-R2UKWLZC.js.map +1 -0
  148. package/dist/valibot-D_HTw1Gn-DSFFOUBW.cjs +45 -0
  149. package/dist/valibot-D_HTw1Gn-DSFFOUBW.cjs.map +1 -0
  150. package/dist/valibot-D_HTw1Gn-KWXWP2TJ.js +43 -0
  151. package/dist/valibot-D_HTw1Gn-KWXWP2TJ.js.map +1 -0
  152. package/dist/validator/custom-resolver.cjs +20 -12
  153. package/dist/validator/custom-resolver.cjs.map +1 -1
  154. package/dist/validator/custom-resolver.d.ts.map +1 -1
  155. package/dist/validator/custom-resolver.js +18 -10
  156. package/dist/validator/custom-resolver.js.map +1 -1
  157. package/dist/validator/validate.d.ts +15 -1
  158. package/dist/validator/validate.d.ts.map +1 -1
  159. package/dist/zod-Bwrt9trS-GCUGPBJX.js +29 -0
  160. package/dist/zod-Bwrt9trS-GCUGPBJX.js.map +1 -0
  161. package/dist/zod-Bwrt9trS-ZZHFZ7YQ.cjs +31 -0
  162. package/dist/zod-Bwrt9trS-ZZHFZ7YQ.cjs.map +1 -0
  163. package/dist/zod-DSgpEGAE-3CMS4FSB.cjs +39 -0
  164. package/dist/zod-DSgpEGAE-3CMS4FSB.cjs.map +1 -0
  165. package/dist/zod-DSgpEGAE-IPE3O2NQ.js +37 -0
  166. package/dist/zod-DSgpEGAE-IPE3O2NQ.js.map +1 -0
  167. package/package.json +23 -26
  168. package/dist/build/babel/get-deployer.d.ts +0 -3
  169. package/dist/build/babel/get-deployer.d.ts.map +0 -1
  170. package/dist/build/babel/remove-all-options-bundler.d.ts +0 -5
  171. package/dist/build/babel/remove-all-options-bundler.d.ts.map +0 -1
  172. package/dist/build/babel/remove-all-options-deployer.d.ts +0 -5
  173. package/dist/build/babel/remove-all-options-deployer.d.ts.map +0 -1
  174. package/dist/build/babel/remove-all-options-server.d.ts +0 -5
  175. package/dist/build/babel/remove-all-options-server.d.ts.map +0 -1
  176. package/dist/chunk-3JYRSECU.cjs.map +0 -1
  177. package/dist/chunk-5QFG6SCM.js.map +0 -1
  178. package/dist/chunk-AQAOWLJJ.cjs.map +0 -1
  179. package/dist/chunk-C74EXQSL.cjs.map +0 -1
  180. package/dist/chunk-H3LLQ2MW.js.map +0 -1
  181. package/dist/chunk-HQJR52M7.js +0 -168
  182. package/dist/chunk-HQJR52M7.js.map +0 -1
  183. package/dist/chunk-IL2VLNIJ.cjs.map +0 -1
  184. package/dist/chunk-OFUWEVGF.js.map +0 -1
  185. package/dist/chunk-TDWIGFVF.cjs +0 -195
  186. package/dist/chunk-TDWIGFVF.cjs.map +0 -1
  187. package/dist/chunk-WBAWUM7Z.js.map +0 -1
  188. package/dist/server/handlers/auth/defaults.d.ts +0 -3
  189. package/dist/server/handlers/auth/defaults.d.ts.map +0 -1
  190. package/dist/server/handlers/auth/helpers.d.ts +0 -11
  191. package/dist/server/handlers/auth/helpers.d.ts.map +0 -1
  192. package/dist/server/handlers/auth/index.d.ts +0 -11
  193. package/dist/server/handlers/auth/index.d.ts.map +0 -1
  194. package/dist/server/handlers/prompt.d.ts +0 -3
  195. package/dist/server/handlers/prompt.d.ts.map +0 -1
  196. package/dist/server/handlers/routes/agent-builder/handlers.d.ts +0 -20
  197. package/dist/server/handlers/routes/agent-builder/handlers.d.ts.map +0 -1
  198. package/dist/server/handlers/routes/agent-builder/router.d.ts +0 -4
  199. package/dist/server/handlers/routes/agent-builder/router.d.ts.map +0 -1
  200. package/dist/server/handlers/routes/agents/handlers.d.ts +0 -232
  201. package/dist/server/handlers/routes/agents/handlers.d.ts.map +0 -1
  202. package/dist/server/handlers/routes/agents/router.d.ts +0 -5
  203. package/dist/server/handlers/routes/agents/router.d.ts.map +0 -1
  204. package/dist/server/handlers/routes/agents/voice.d.ts +0 -18
  205. package/dist/server/handlers/routes/agents/voice.d.ts.map +0 -1
  206. package/dist/server/handlers/routes/logs/handlers.d.ts +0 -5
  207. package/dist/server/handlers/routes/logs/handlers.d.ts.map +0 -1
  208. package/dist/server/handlers/routes/logs/router.d.ts +0 -3
  209. package/dist/server/handlers/routes/logs/router.d.ts.map +0 -1
  210. package/dist/server/handlers/routes/mcp/handlers.d.ts +0 -139
  211. package/dist/server/handlers/routes/mcp/handlers.d.ts.map +0 -1
  212. package/dist/server/handlers/routes/mcp/router.d.ts +0 -4
  213. package/dist/server/handlers/routes/mcp/router.d.ts.map +0 -1
  214. package/dist/server/handlers/routes/memory/handlers.d.ts +0 -15
  215. package/dist/server/handlers/routes/memory/handlers.d.ts.map +0 -1
  216. package/dist/server/handlers/routes/memory/router.d.ts +0 -4
  217. package/dist/server/handlers/routes/memory/router.d.ts.map +0 -1
  218. package/dist/server/handlers/routes/observability/handlers.d.ts +0 -6
  219. package/dist/server/handlers/routes/observability/handlers.d.ts.map +0 -1
  220. package/dist/server/handlers/routes/observability/router.d.ts +0 -3
  221. package/dist/server/handlers/routes/observability/router.d.ts.map +0 -1
  222. package/dist/server/handlers/routes/scores/handlers.d.ts +0 -302
  223. package/dist/server/handlers/routes/scores/handlers.d.ts.map +0 -1
  224. package/dist/server/handlers/routes/scores/router.d.ts +0 -4
  225. package/dist/server/handlers/routes/scores/router.d.ts.map +0 -1
  226. package/dist/server/handlers/routes/tools/handlers.d.ts +0 -7
  227. package/dist/server/handlers/routes/tools/handlers.d.ts.map +0 -1
  228. package/dist/server/handlers/routes/tools/router.d.ts +0 -4
  229. package/dist/server/handlers/routes/tools/router.d.ts.map +0 -1
  230. package/dist/server/handlers/routes/vector/handlers.d.ts +0 -10
  231. package/dist/server/handlers/routes/vector/handlers.d.ts.map +0 -1
  232. package/dist/server/handlers/routes/vector/router.d.ts +0 -4
  233. package/dist/server/handlers/routes/vector/router.d.ts.map +0 -1
  234. package/dist/server/handlers/routes/workflows/handlers.d.ts +0 -20
  235. package/dist/server/handlers/routes/workflows/handlers.d.ts.map +0 -1
  236. package/dist/server/handlers/routes/workflows/router.d.ts +0 -4
  237. package/dist/server/handlers/routes/workflows/router.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- import { Transform } from 'stream';
1
+ import { Transform } from 'node:stream';
2
2
  import type { IMastraLogger } from '@mastra/core/logger';
3
3
  export declare const createPinoStream: (logger: IMastraLogger) => Transform;
4
4
  export declare function createChildProcessLogger({ logger, root }: {
@@ -1 +1 @@
1
- {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/deploy/log.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,eAAO,MAAM,gBAAgB,GAAI,QAAQ,aAAa,cAgBrD,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,IAElF,oBAAoB;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,sBAoC/F"}
1
+ {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/deploy/log.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,eAAO,MAAM,gBAAgB,GAAI,QAAQ,aAAa,cAgBrD,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,IAElF,oBAAoB;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,sBAoC/F"}
@@ -0,0 +1,32 @@
1
+ # @mastra/deployer Documentation
2
+
3
+ > Embedded documentation for coding agents
4
+
5
+ ## Quick Start
6
+
7
+ ```bash
8
+ # Read the skill overview
9
+ cat docs/SKILL.md
10
+
11
+ # Get the source map
12
+ cat docs/SOURCE_MAP.json
13
+
14
+ # Read topic documentation
15
+ cat docs/<topic>/01-overview.md
16
+ ```
17
+
18
+ ## Structure
19
+
20
+ ```
21
+ docs/
22
+ ├── SKILL.md # Entry point
23
+ ├── README.md # This file
24
+ ├── SOURCE_MAP.json # Export index
25
+ ├── deployer/ (1 files)
26
+ ├── deployment/ (6 files)
27
+ ```
28
+
29
+ ## Version
30
+
31
+ Package: @mastra/deployer
32
+ Version: 1.0.0-beta.21
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: mastra-deployer-docs
3
+ description: Documentation for @mastra/deployer. Includes links to type definitions and readable implementation code in dist/.
4
+ ---
5
+
6
+ # @mastra/deployer Documentation
7
+
8
+ > **Version**: 1.0.0-beta.21
9
+ > **Package**: @mastra/deployer
10
+
11
+ ## Quick Navigation
12
+
13
+ Use SOURCE_MAP.json to find any export:
14
+
15
+ ```bash
16
+ cat docs/SOURCE_MAP.json
17
+ ```
18
+
19
+ Each export maps to:
20
+ - **types**: `.d.ts` file with JSDoc and API signatures
21
+ - **implementation**: `.js` chunk file with readable source
22
+ - **docs**: Conceptual documentation in `docs/`
23
+
24
+ ## Top Exports
25
+
26
+ - Deps: dist/index.d.ts
27
+ - FileService: dist/index.d.ts
28
+ - createChildProcessLogger: dist/index.d.ts
29
+ - createPinoStream: dist/index.d.ts
30
+
31
+ See SOURCE_MAP.json for the complete list.
32
+
33
+ ## Available Topics
34
+
35
+ - [Deployer](deployer/) - 1 file(s)
36
+ - [Deployment](deployment/) - 6 file(s)
@@ -0,0 +1,27 @@
1
+ {
2
+ "version": "1.0.0-beta.21",
3
+ "package": "@mastra/deployer",
4
+ "exports": {
5
+ "Deps": {
6
+ "types": "dist/index.d.ts",
7
+ "implementation": "dist/chunk-DPDWM7HQ.js",
8
+ "line": 60
9
+ },
10
+ "FileService": {
11
+ "types": "dist/index.d.ts",
12
+ "implementation": "dist/chunk-DPDWM7HQ.js",
13
+ "line": 337
14
+ },
15
+ "createChildProcessLogger": {
16
+ "types": "dist/index.d.ts",
17
+ "implementation": "dist/chunk-DPDWM7HQ.js",
18
+ "line": 24
19
+ },
20
+ "createPinoStream": {
21
+ "types": "dist/index.d.ts",
22
+ "implementation": "dist/chunk-DPDWM7HQ.js",
23
+ "line": 12
24
+ }
25
+ },
26
+ "modules": {}
27
+ }
@@ -0,0 +1,93 @@
1
+ # Deployer API Reference
2
+
3
+ > API reference for deployer - 1 entries
4
+
5
+
6
+ ---
7
+
8
+ ## Reference: Deployer
9
+
10
+ > Documentation for the Deployer abstract class, which handles packaging and deployment of Mastra applications.
11
+
12
+ The Deployer handles the deployment of standalone Mastra applications by packaging code, managing environment files, and serving applications using the Hono framework. Concrete implementations must define the deploy method for specific deployment targets.
13
+
14
+ ## Usage Example
15
+
16
+ ```typescript
17
+ import { Deployer } from "@mastra/deployer";
18
+
19
+ // Create a custom deployer by extending the abstract Deployer class
20
+ class CustomDeployer extends Deployer {
21
+ constructor() {
22
+ super({ name: "custom-deployer" });
23
+ }
24
+
25
+ // Implement the abstract deploy method
26
+ async deploy(outputDirectory: string): Promise<void> {
27
+ // Prepare the output directory
28
+ await this.prepare(outputDirectory);
29
+
30
+ // Bundle the application
31
+ await this._bundle("server.ts", "mastra.ts", outputDirectory);
32
+
33
+ // Custom deployment logic
34
+ }
35
+ }
36
+ ```
37
+
38
+ ## Parameters
39
+
40
+ ### Constructor Parameters
41
+
42
+ ### deploy Parameters
43
+
44
+ ## Methods
45
+
46
+ ## Inherited Methods from Bundler
47
+
48
+ The Deployer class inherits the following key methods from the Bundler class:
49
+
50
+ ## Core Concepts
51
+
52
+ ### Deployment Lifecycle
53
+
54
+ The Deployer abstract class implements a structured deployment lifecycle:
55
+
56
+ 1. **Initialization**: The deployer is initialized with a name and creates a Deps instance for dependency management.
57
+ 2. **Environment Setup**: The `getEnvFiles` method identifies environment files (.env.production, .env) to be used during deployment.
58
+ 3. **Preparation**: The `prepare` method (inherited from Bundler) cleans the output directory and creates necessary subdirectories.
59
+ 4. **Bundling**: The `_bundle` method (inherited from Bundler) packages the application code and its dependencies.
60
+ 5. **Deployment**: The abstract `deploy` method is implemented by subclasses to handle the actual deployment process.
61
+
62
+ ### Environment File Management
63
+
64
+ The Deployer class includes built-in support for environment file management through the `getEnvFiles` method. This method:
65
+
66
+ - Looks for environment files in a predefined order (.env.production, .env)
67
+ - Uses the FileService to find the first existing file
68
+ - Returns an array of found environment files
69
+ - Returns an empty array if no environment files are found
70
+
71
+ ```typescript
72
+ getEnvFiles(): Promise<string[]> {
73
+ const possibleFiles = ['.env.production', '.env.local', '.env'];
74
+
75
+ try {
76
+ const fileService = new FileService();
77
+ const envFile = fileService.getFirstExistingFile(possibleFiles);
78
+
79
+ return Promise.resolve([envFile]);
80
+ } catch {}
81
+
82
+ return Promise.resolve([]);
83
+ }
84
+ ```
85
+
86
+ ### Bundling and Deployment Relationship
87
+
88
+ The Deployer class extends the Bundler class, establishing a clear relationship between bundling and deployment:
89
+
90
+ 1. **Bundling as a Prerequisite**: Bundling is a prerequisite step for deployment, where the application code is packaged into a deployable format.
91
+ 2. **Shared Infrastructure**: Both bundling and deployment share common infrastructure like dependency management and file system operations.
92
+ 3. **Specialized Deployment Logic**: While bundling focuses on code packaging, deployment adds environment-specific logic for deploying the bundled code.
93
+ 4. **Extensibility**: The abstract `deploy` method allows for creating specialized deployers for different target environments.
@@ -0,0 +1,60 @@
1
+ > Learn about different deployment options for your Mastra applications
2
+
3
+ # Deployment Overview
4
+
5
+ Mastra applications can be deployed to any Node.js-compatible environment. You can deploy a Mastra server, integrate with an existing web framework, deploy to cloud providers, or use Mastra Cloud for managed hosting.
6
+
7
+ ## Runtime support
8
+
9
+ Mastra can run against any of these runtime environments:
10
+
11
+ - Node.js `v22.13.0` or later
12
+ - Bun
13
+ - Deno
14
+ - Cloudflare
15
+
16
+ ## Deployment Options
17
+
18
+ ### Mastra Server
19
+
20
+ Mastra provides a [server](https://mastra.ai/docs/v1/server/mastra-server) powered by Hono that can be deployed independently. Use the `mastra build` command to build your application and deploy the output to your preferred VM, container, or PaaS platform.
21
+
22
+ Visit the [Mastra server deployment guide](https://mastra.ai/docs/v1/deployment/mastra-server).
23
+
24
+ ### Monorepo
25
+
26
+ Deploy a Mastra server as part of a monorepo setup, following the same approach as standalone deployment.
27
+
28
+ Read about [monorepo deployment](https://mastra.ai/docs/v1/deployment/monorepo).
29
+
30
+ ### Cloud Providers
31
+
32
+ Mastra applications can be deployed to cloud providers and serverless platforms. Mastra includes optional built-in deployers for Vercel, Netlify, and Cloudflare to automate the build and deployment process.
33
+
34
+ - [Amazon EC2](https://mastra.ai/guides/v1/deployment/amazon-ec2)
35
+ - [AWS Lambda](https://mastra.ai/guides/v1/deployment/aws-lambda)
36
+ - [Azure App Services](https://mastra.ai/guides/v1/deployment/azure-app-services)
37
+ - [Cloudflare](https://mastra.ai/guides/v1/deployment/cloudflare-deployer)
38
+ - [Digital Ocean](https://mastra.ai/guides/v1/deployment/digital-ocean)
39
+ - [Netlify](https://mastra.ai/guides/v1/deployment/netlify-deployer)
40
+ - [Vercel](https://mastra.ai/guides/v1/deployment/vercel-deployer)
41
+
42
+ ### Web Framework
43
+
44
+ When Mastra is integrated with a web framework, it deploys alongside your application using the framework's standard deployment process. The guides below cover framework-specific configuration requirements for deployment:
45
+
46
+ - [With Next.js on Vercel](https://mastra.ai/docs/v1/deployment/web-framework#with-nextjs-on-vercel)
47
+ - [With Astro on Vercel](https://mastra.ai/docs/v1/deployment/web-framework#with-astro-on-vercel)
48
+ - [With Astro on Netlify](https://mastra.ai/docs/v1/deployment/web-framework#with-astro-on-netlify)
49
+
50
+ ### Mastra Cloud
51
+
52
+ We're building Mastra Cloud to be the easiest place to deploy and observe your Mastra agents. It's currently in beta.
53
+
54
+ Learn more in the [Mastra Cloud docs](https://mastra.ai/docs/v1/mastra-cloud/overview).
55
+
56
+ ## Workflow Runners
57
+
58
+ Mastra workflows run using the built-in execution engine by default. For production workloads requiring managed infrastructure, workflows can also be deployed to specialized platforms like [Inngest](https://www.inngest.com) that provide step memoization, automatic retries, and real-time monitoring.
59
+
60
+ Visit the [Workflow Runners guide](https://mastra.ai/docs/v1/deployment/workflow-runners) for execution options and the [Inngest deployment guide](https://mastra.ai/guides/v1/deployment/inngest) for setup instructions.
@@ -0,0 +1,70 @@
1
+ > Learn how to build a Mastra server with build settings and deployment options.
2
+
3
+ # Deploy a Mastra Server
4
+
5
+ Mastra runs as a standard Node.js server and can be deployed across a wide range of environments.
6
+
7
+ ## Default project structure
8
+
9
+ The [getting started guide](https://mastra.ai/guides/v1/getting-started/quickstart) scaffolds a project with sensible defaults to help you begin quickly. By default, the CLI organizes application files under the `src/mastra/` directory, resulting in a structure similar to the following:
10
+
11
+ ```
12
+ src/
13
+ └── mastra/
14
+ ├── agents/
15
+ ├── tools/
16
+ ├── workflows/
17
+ └── index.ts
18
+ package.json
19
+ tsconfig.json
20
+ ```
21
+
22
+ ## Building
23
+
24
+ The `mastra build` command starts the build process:
25
+
26
+ ```bash
27
+ mastra build
28
+ ```
29
+
30
+ ### Customizing the input directory
31
+
32
+ If your Mastra files are located elsewhere, use the `--dir` flag to specify the custom location. The `--dir` flag tells Mastra where to find your entry point file (`index.ts` or `index.js`) and related directories.
33
+
34
+ ```bash
35
+ mastra build --dir ./my-project/mastra
36
+ ```
37
+
38
+ ## Build process
39
+
40
+ The build process follows these steps:
41
+
42
+ 1. **Locates entry file**: Finds `index.ts` or `index.js` in your specified directory (default: `src/mastra/`).
43
+ 2. **Creates build directory**: Generates a `.mastra/` directory containing:
44
+ - **`.build`**: Contains dependency analysis, bundled dependencies, and build configuration files.
45
+ - **`output`**: Contains the production-ready application bundle with `index.mjs` and project-specific files.
46
+ 3. **Copies static assets**: Copies the `public/` folder contents to the `output` directory for serving static files.
47
+ 4. **Bundles code**: Uses Rollup with tree shaking and source maps for optimization.
48
+ 5. **Generates server**: Creates a [Hono](https://hono.dev) HTTP server ready for deployment.
49
+
50
+ ### Build output structure
51
+
52
+ After building, Mastra creates a `.mastra/` directory with the following structure:
53
+
54
+ ```
55
+ .mastra/
56
+ ├── .build/
57
+ └── output/
58
+ ```
59
+
60
+ ### `public` folder
61
+
62
+ If a `public` folder exists in `src/mastra`, its contents are copied into the `.build/output` directory during the build process.
63
+
64
+ ## Running the Server
65
+
66
+ Start the HTTP server:
67
+
68
+ ```bash
69
+ node .mastra/output/index.mjs
70
+ ```
@@ -0,0 +1,70 @@
1
+ > Learn how to deploy Mastra applications that are part of a monorepo setup
2
+
3
+ # Deploy in a Monorepo
4
+
5
+ Deploying Mastra in a monorepo follows the same approach as deploying a standalone application. While some [Cloud](https://mastra.ai/guides/v1/deployment) or [Serverless Platform](https://mastra.ai/guides/v1/deployment) providers may introduce extra requirements, the core setup is the same.
6
+
7
+ ## Supported monorepos
8
+
9
+ Mastra works with:
10
+
11
+ - npm workspaces
12
+ - pnpm workspaces
13
+ - Yarn workspaces
14
+ - Turborepo
15
+
16
+ Known limitations:
17
+
18
+ - Bun workspaces - partial support; known issues
19
+ - Nx - You can use Nx's [supported dependency strategies](https://nx.dev/concepts/decisions/dependency-management) but you need to have `package.json` files inside your workspace packages
20
+
21
+ ## Example monorepo
22
+
23
+ In this example, the Mastra application is located at `apps/api`.
24
+
25
+ ```
26
+ apps/
27
+ ├── api/
28
+ │ ├── src/
29
+ │ │ └── mastra/
30
+ │ │ ├── agents/
31
+ │ │ ├── tools/
32
+ │ │ ├── workflows/
33
+ │ │ └── index.ts
34
+ │ ├── package.json
35
+ │ └── tsconfig.json
36
+ └── web/
37
+ packages/
38
+ ├── ui/
39
+ └── utils/
40
+ package.json
41
+ ```
42
+
43
+ ## Environment variables
44
+
45
+ Environment variables like `OPENAI_API_KEY` should be stored in an `.env` file at the root of the Mastra application `(apps/api)`, for example:
46
+
47
+ ```
48
+ api/
49
+ ├── src/
50
+ │ └── mastra/
51
+ ├── .env
52
+ ├── package.json
53
+ └── tsconfig.json
54
+ ```
55
+
56
+ ## Deployment configuration
57
+
58
+ The image below shows how to select `apps/api` as the project root when deploying to [Mastra Cloud](https://mastra.ai/docs/v1/mastra-cloud/overview). While the interface may differ between providers, the configuration remains the same.
59
+
60
+ ![Deployment configuration](/img/monorepo/monorepo-mastra-cloud.jpg)
61
+
62
+ > **Note:**
63
+ Make sure the correct package (e.g. `apps/api`) is selected as the deploy target. Selecting the wrong project root is a common deployment issue in monorepos.
64
+
65
+ ## Dependency management
66
+
67
+ In a monorepo, keep dependencies consistent to avoid version conflicts and build errors.
68
+
69
+ - Use a **single lockfile** at the project root so all packages resolve the same versions.
70
+ - Align versions of **shared libraries** (like Mastra or frameworks) to prevent duplicates.
@@ -0,0 +1,17 @@
1
+ > Deploy your Mastra applications to cloud providers
2
+
3
+ # Deploy to Cloud Providers
4
+
5
+ Mastra applications can be deployed to cloud providers and serverless platforms. Mastra includes optional built-in deployers for Vercel, Netlify, and Cloudflare to automate the deployment process.
6
+
7
+ ## Supported Cloud Providers
8
+
9
+ The following guides show how to deploy Mastra to specific cloud providers:
10
+
11
+ - [Amazon EC2](https://mastra.ai/guides/v1/deployment/amazon-ec2)
12
+ - [AWS Lambda](https://mastra.ai/guides/v1/deployment/aws-lambda)
13
+ - [Azure App Services](https://mastra.ai/guides/v1/deployment/azure-app-services)
14
+ - [Cloudflare](https://mastra.ai/guides/v1/deployment/cloudflare-deployer)
15
+ - [Digital Ocean](https://mastra.ai/guides/v1/deployment/digital-ocean)
16
+ - [Netlify](https://mastra.ai/guides/v1/deployment/netlify-deployer)
17
+ - [Vercel](https://mastra.ai/guides/v1/deployment/vercel-deployer)
@@ -0,0 +1,55 @@
1
+ > Learn how Mastra can be deployed when integrated with a Web Framework
2
+
3
+ # Deploy with a Web Framework
4
+
5
+ When Mastra is integrated with a web framework, it deploys alongside your application using the framework's standard deployment process. Follow the instructions below to ensure your Mastra integration deploys correctly.
6
+
7
+ > **Note:**
8
+ If you're deploying to a cloud provider, remove any usage of [LibSQLStore](https://mastra.ai/reference/v1/storage/libsql) from your Mastra configuration. LibSQLStore requires filesystem access and is not compatible with serverless platforms.
9
+
10
+ Integration guides:
11
+
12
+ - [With Next.js](https://mastra.ai/guides/v1/getting-started/next-js)
13
+ - [With Astro](https://mastra.ai/guides/v1/getting-started/astro)
14
+
15
+ ## With Next.js on Vercel
16
+
17
+ If you've integrated Mastra with Next.js [by following our guide](https://mastra.ai/guides/v1/getting-started/next-js) and plan to deploy to Vercel, add `serverExternalPackages: ["@mastra/*"]` to your `next.config.ts`:
18
+
19
+ ```typescript {4} title="next.config.ts"
20
+ import type { NextConfig } from "next";
21
+
22
+ const nextConfig: NextConfig = {
23
+ serverExternalPackages: ["@mastra/*"],
24
+ };
25
+
26
+ export default nextConfig;
27
+ ```
28
+
29
+ ## With Astro on Vercel
30
+
31
+ If you've integrated Mastra with Astro [by following our guide](https://mastra.ai/guides/v1/getting-started/astro) and plan to deploy to Vercel, add the Vercel adapter and server output to your `astro.config.mjs`:
32
+
33
+ ```javascript {2,5-6} title="astro.config.mjs"
34
+ import { defineConfig } from "astro/config";
35
+ import vercel from "@astrojs/vercel";
36
+
37
+ export default defineConfig({
38
+ adapter: vercel(),
39
+ output: "server",
40
+ });
41
+ ```
42
+
43
+ ## With Astro on Netlify
44
+
45
+ If you've integrated Mastra with Astro [by following our guide](https://mastra.ai/guides/v1/getting-started/astro) and plan to deploy to Netlify, add the Netlify adapter and server output to your `astro.config.mjs`:
46
+
47
+ ```javascript {2,5-6} title="astro.config.mjs"
48
+ import { defineConfig } from "astro/config";
49
+ import netlify from "@astrojs/netlify";
50
+
51
+ export default defineConfig({
52
+ adapter: netlify(),
53
+ output: "server",
54
+ });
55
+ ```
@@ -0,0 +1,11 @@
1
+ > Deploy Mastra workflows to specialized workflow execution platforms
2
+
3
+ # Workflow Runners
4
+
5
+ Mastra [workflows](../workflows/overview.mdx) can be executed using the built-in workflow runner or deployed to specialized workflow execution platforms that handle orchestration, monitoring, and reliability.
6
+
7
+ ## Inngest
8
+
9
+ Inngest is a developer platform for running background workflows without managing infrastructure. Mastra workflows can be deployed to Inngest, which provides step memoization, automatic retries, real-time monitoring, and suspend/resume capabilities.
10
+
11
+ Visit the [Inngest deployment guide](https://mastra.ai/guides/v1/deployment/inngest) for setup instructions and the [Inngest workflow example](https://github.com/mastra-ai/mastra/tree/main/examples/inngest) for a complete implementation.
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ var chunkJRUJ546M_cjs = require('./chunk-JRUJ546M.cjs');
4
+
5
+ // ../../node_modules/.pnpm/@standard-community+standard-json@0.3.5_@standard-schema+spec@1.1.0_@types+json-schema@_d6df1f0b22bbb764c4c0abc17f6c5d32/node_modules/@standard-community/standard-json/dist/effect-QlVUlMFu.js
6
+ async function getToJsonSchemaFn() {
7
+ try {
8
+ const { JSONSchema } = await import('effect');
9
+ return (schema) => JSONSchema.make(schema);
10
+ } catch {
11
+ throw new chunkJRUJ546M_cjs.MissingDependencyError("effect");
12
+ }
13
+ }
14
+
15
+ module.exports = getToJsonSchemaFn;
16
+ //# sourceMappingURL=effect-QlVUlMFu-HN3LWZSQ.cjs.map
17
+ //# sourceMappingURL=effect-QlVUlMFu-HN3LWZSQ.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../node_modules/.pnpm/@standard-community+standard-json@0.3.5_@standard-schema+spec@1.1.0_@types+json-schema@_d6df1f0b22bbb764c4c0abc17f6c5d32/node_modules/@standard-community/standard-json/dist/effect-QlVUlMFu.js"],"names":["MissingDependencyError"],"mappings":";;;;;AAGA,eAAe,iBAAA,GAAoB;AACjC,EAAA,IAAI;AACF,IAAA,MAAM,EAAE,UAAA,EAAW,GAAI,MAAM,OAAO,QAAQ,CAAA;AAC5C,IAAA,OAAO,CAAC,MAAA,KAAW,UAAA,CAAW,IAAA,CAAK,MAAM,CAAA;AAAA,EAC3C,CAAA,CAAA,MAAQ;AACN,IAAA,MAAM,IAAIA,yCAAuB,QAAQ,CAAA;AAAA,EAC3C;AACF","file":"effect-QlVUlMFu-HN3LWZSQ.cjs","sourcesContent":["import { M as MissingDependencyError } from './index-CLddUTqr.js';\nimport 'quansync';\n\nasync function getToJsonSchemaFn() {\n try {\n const { JSONSchema } = await import('effect');\n return (schema) => JSONSchema.make(schema);\n } catch {\n throw new MissingDependencyError(\"effect\");\n }\n}\n\nexport { getToJsonSchemaFn as default };\n"]}
@@ -0,0 +1,15 @@
1
+ import { MissingDependencyError } from './chunk-DBXWQ2CA.js';
2
+
3
+ // ../../node_modules/.pnpm/@standard-community+standard-json@0.3.5_@standard-schema+spec@1.1.0_@types+json-schema@_d6df1f0b22bbb764c4c0abc17f6c5d32/node_modules/@standard-community/standard-json/dist/effect-QlVUlMFu.js
4
+ async function getToJsonSchemaFn() {
5
+ try {
6
+ const { JSONSchema } = await import('effect');
7
+ return (schema) => JSONSchema.make(schema);
8
+ } catch {
9
+ throw new MissingDependencyError("effect");
10
+ }
11
+ }
12
+
13
+ export { getToJsonSchemaFn as default };
14
+ //# sourceMappingURL=effect-QlVUlMFu-XOJ2F4UA.js.map
15
+ //# sourceMappingURL=effect-QlVUlMFu-XOJ2F4UA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../node_modules/.pnpm/@standard-community+standard-json@0.3.5_@standard-schema+spec@1.1.0_@types+json-schema@_d6df1f0b22bbb764c4c0abc17f6c5d32/node_modules/@standard-community/standard-json/dist/effect-QlVUlMFu.js"],"names":[],"mappings":";;;AAGA,eAAe,iBAAA,GAAoB;AACjC,EAAA,IAAI;AACF,IAAA,MAAM,EAAE,UAAA,EAAW,GAAI,MAAM,OAAO,QAAQ,CAAA;AAC5C,IAAA,OAAO,CAAC,MAAA,KAAW,UAAA,CAAW,IAAA,CAAK,MAAM,CAAA;AAAA,EAC3C,CAAA,CAAA,MAAQ;AACN,IAAA,MAAM,IAAI,uBAAuB,QAAQ,CAAA;AAAA,EAC3C;AACF","file":"effect-QlVUlMFu-XOJ2F4UA.js","sourcesContent":["import { M as MissingDependencyError } from './index-CLddUTqr.js';\nimport 'quansync';\n\nasync function getToJsonSchemaFn() {\n try {\n const { JSONSchema } = await import('effect');\n return (schema) => JSONSchema.make(schema);\n } catch {\n throw new MissingDependencyError(\"effect\");\n }\n}\n\nexport { getToJsonSchemaFn as default };\n"]}