@mastra/server 1.16.0-alpha.1 → 1.16.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 (543) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/dist/_types/@internal_core/dist/index.d.ts +212 -21
  3. package/dist/chunk-22JIX4IH.cjs +66 -0
  4. package/dist/chunk-22JIX4IH.cjs.map +1 -0
  5. package/dist/chunk-24YYB3J7.cjs +40 -0
  6. package/dist/chunk-24YYB3J7.cjs.map +1 -0
  7. package/dist/{chunk-LW2FKUW5.js → chunk-2BRN4DAE.js} +4 -4
  8. package/dist/chunk-2BRN4DAE.js.map +1 -0
  9. package/dist/chunk-2U535WWQ.cjs +57 -0
  10. package/dist/chunk-2U535WWQ.cjs.map +1 -0
  11. package/dist/chunk-37G66LYP.cjs +65 -0
  12. package/dist/chunk-37G66LYP.cjs.map +1 -0
  13. package/dist/{chunk-E4RLL73F.cjs → chunk-37LAVKFO.cjs} +33 -33
  14. package/dist/{chunk-E4RLL73F.cjs.map → chunk-37LAVKFO.cjs.map} +1 -1
  15. package/dist/{chunk-LG2MUCSW.cjs → chunk-3BRCE7JC.cjs} +32 -32
  16. package/dist/{chunk-LG2MUCSW.cjs.map → chunk-3BRCE7JC.cjs.map} +1 -1
  17. package/dist/{chunk-PNJPBMSY.js → chunk-3SVFRICR.js} +3 -3
  18. package/dist/chunk-3SVFRICR.js.map +1 -0
  19. package/dist/{chunk-7KSSSSLW.cjs → chunk-3W54ZNYP.cjs} +133 -133
  20. package/dist/{chunk-7KSSSSLW.cjs.map → chunk-3W54ZNYP.cjs.map} +1 -1
  21. package/dist/{chunk-MJTEQGJT.cjs → chunk-457RSMZH.cjs} +59 -18
  22. package/dist/chunk-457RSMZH.cjs.map +1 -0
  23. package/dist/{chunk-CSSSPADR.js → chunk-4D7KSU4X.js} +7 -7
  24. package/dist/chunk-4D7KSU4X.js.map +1 -0
  25. package/dist/{chunk-4ZHENCAC.cjs → chunk-4G5KVXN6.cjs} +37 -37
  26. package/dist/{chunk-4ZHENCAC.cjs.map → chunk-4G5KVXN6.cjs.map} +1 -1
  27. package/dist/{chunk-X7USLRKI.js → chunk-4NRXB7VI.js} +6 -6
  28. package/dist/{chunk-X7USLRKI.js.map → chunk-4NRXB7VI.js.map} +1 -1
  29. package/dist/chunk-4OM2A5ZZ.cjs +377 -0
  30. package/dist/chunk-4OM2A5ZZ.cjs.map +1 -0
  31. package/dist/chunk-4P237WJB.cjs +77 -0
  32. package/dist/chunk-4P237WJB.cjs.map +1 -0
  33. package/dist/chunk-4Y4RMTIA.cjs +387 -0
  34. package/dist/chunk-4Y4RMTIA.cjs.map +1 -0
  35. package/dist/{chunk-P63CP2ZR.js → chunk-5GXB4IME.js} +5 -5
  36. package/dist/{chunk-P63CP2ZR.js.map → chunk-5GXB4IME.js.map} +1 -1
  37. package/dist/chunk-5JWVKCGZ.cjs +85 -0
  38. package/dist/chunk-5JWVKCGZ.cjs.map +1 -0
  39. package/dist/chunk-5XEAWQRZ.cjs +86 -0
  40. package/dist/chunk-5XEAWQRZ.cjs.map +1 -0
  41. package/dist/chunk-67F5GKI5.cjs +38 -0
  42. package/dist/chunk-67F5GKI5.cjs.map +1 -0
  43. package/dist/chunk-6BHM6ZJR.cjs +28 -0
  44. package/dist/chunk-6BHM6ZJR.cjs.map +1 -0
  45. package/dist/chunk-6N5NDQVM.cjs +130 -0
  46. package/dist/chunk-6N5NDQVM.cjs.map +1 -0
  47. package/dist/{chunk-Y452XTPZ.js → chunk-6QBPL7ME.js} +6 -6
  48. package/dist/chunk-6QBPL7ME.js.map +1 -0
  49. package/dist/chunk-7C2R3QNO.cjs +103 -0
  50. package/dist/chunk-7C2R3QNO.cjs.map +1 -0
  51. package/dist/{chunk-B4YTCF2Y.js → chunk-7DAVYYZ6.js} +5 -5
  52. package/dist/{chunk-B4YTCF2Y.js.map → chunk-7DAVYYZ6.js.map} +1 -1
  53. package/dist/{chunk-W7I2JHCT.js → chunk-7TESOQZ3.js} +5 -5
  54. package/dist/{chunk-W7I2JHCT.js.map → chunk-7TESOQZ3.js.map} +1 -1
  55. package/dist/{chunk-II6TN6MR.js → chunk-7X4P2I6L.js} +4 -4
  56. package/dist/chunk-7X4P2I6L.js.map +1 -0
  57. package/dist/{chunk-7WP6LX5N.js → chunk-7ZHBGYZB.js} +5 -5
  58. package/dist/{chunk-7WP6LX5N.js.map → chunk-7ZHBGYZB.js.map} +1 -1
  59. package/dist/{chunk-5OJTF4BH.cjs → chunk-A5J2TY2W.cjs} +18 -18
  60. package/dist/{chunk-5OJTF4BH.cjs.map → chunk-A5J2TY2W.cjs.map} +1 -1
  61. package/dist/{chunk-OP626LZY.js → chunk-ACC4X5V6.js} +6 -6
  62. package/dist/chunk-ACC4X5V6.js.map +1 -0
  63. package/dist/{chunk-IWH4OW2X.js → chunk-ATZ7V3XS.js} +7 -7
  64. package/dist/chunk-ATZ7V3XS.js.map +1 -0
  65. package/dist/{chunk-Y2BKW5ND.cjs → chunk-B34S64RC.cjs} +2 -2
  66. package/dist/chunk-B34S64RC.cjs.map +1 -0
  67. package/dist/{chunk-CCEVYU3X.js → chunk-B5KNWY2P.js} +5 -5
  68. package/dist/{chunk-CCEVYU3X.js.map → chunk-B5KNWY2P.js.map} +1 -1
  69. package/dist/{chunk-HMUJSYUR.js → chunk-BAD2NWEJ.js} +4 -4
  70. package/dist/chunk-BAD2NWEJ.js.map +1 -0
  71. package/dist/{chunk-BTRFBBRF.js → chunk-BWUKBT7Z.js} +5 -5
  72. package/dist/chunk-BWUKBT7Z.js.map +1 -0
  73. package/dist/{chunk-5A232FX3.js → chunk-CZUJUB46.js} +15 -6
  74. package/dist/chunk-CZUJUB46.js.map +1 -0
  75. package/dist/chunk-DCWP744F.cjs +84 -0
  76. package/dist/chunk-DCWP744F.cjs.map +1 -0
  77. package/dist/chunk-DOHUOYZS.cjs +25 -0
  78. package/dist/chunk-DOHUOYZS.cjs.map +1 -0
  79. package/dist/{chunk-CLXK74N7.js → chunk-E56FRMZY.js} +5 -5
  80. package/dist/{chunk-CLXK74N7.js.map → chunk-E56FRMZY.js.map} +1 -1
  81. package/dist/chunk-E63CFDUE.cjs +113 -0
  82. package/dist/chunk-E63CFDUE.cjs.map +1 -0
  83. package/dist/{chunk-I4THGZHE.js → chunk-ECEYFPVI.js} +4 -4
  84. package/dist/chunk-ECEYFPVI.js.map +1 -0
  85. package/dist/chunk-EES2ZZGL.cjs +91 -0
  86. package/dist/chunk-EES2ZZGL.cjs.map +1 -0
  87. package/dist/{chunk-YJLDMFSE.cjs → chunk-EGSCXVMR.cjs} +15 -69
  88. package/dist/chunk-EGSCXVMR.cjs.map +1 -0
  89. package/dist/{chunk-UQALKED3.js → chunk-FB5NRM2M.js} +5 -5
  90. package/dist/{chunk-UQALKED3.js.map → chunk-FB5NRM2M.js.map} +1 -1
  91. package/dist/{chunk-VO6UDRJS.cjs → chunk-FPEX6KOJ.cjs} +151 -148
  92. package/dist/chunk-FPEX6KOJ.cjs.map +1 -0
  93. package/dist/{chunk-6QUGCOP5.js → chunk-FU5Z5NSF.js} +6 -6
  94. package/dist/{chunk-6QUGCOP5.js.map → chunk-FU5Z5NSF.js.map} +1 -1
  95. package/dist/{chunk-PONEV4T5.js → chunk-G2S6L4IR.js} +5 -5
  96. package/dist/chunk-G2S6L4IR.js.map +1 -0
  97. package/dist/{chunk-OH2TKHUS.js → chunk-G2ZZKKQI.js} +9 -9
  98. package/dist/{chunk-OH2TKHUS.js.map → chunk-G2ZZKKQI.js.map} +1 -1
  99. package/dist/{chunk-WCZPCP3F.cjs → chunk-G5KXPZUB.cjs} +21 -21
  100. package/dist/{chunk-WCZPCP3F.cjs.map → chunk-G5KXPZUB.cjs.map} +1 -1
  101. package/dist/{chunk-UYAZFEAW.js → chunk-GF42M6A3.js} +69 -38
  102. package/dist/chunk-GF42M6A3.js.map +1 -0
  103. package/dist/chunk-GVZ7VB33.cjs +47 -0
  104. package/dist/chunk-GVZ7VB33.cjs.map +1 -0
  105. package/dist/{chunk-6INBDRFJ.js → chunk-GYD5JBBZ.js} +5 -5
  106. package/dist/{chunk-6INBDRFJ.js.map → chunk-GYD5JBBZ.js.map} +1 -1
  107. package/dist/{chunk-4H646L2Z.cjs → chunk-H6ZLN6EU.cjs} +45 -45
  108. package/dist/{chunk-4H646L2Z.cjs.map → chunk-H6ZLN6EU.cjs.map} +1 -1
  109. package/dist/{chunk-3CUUB624.cjs → chunk-HBMIUVV4.cjs} +36 -36
  110. package/dist/{chunk-3CUUB624.cjs.map → chunk-HBMIUVV4.cjs.map} +1 -1
  111. package/dist/{chunk-NLMVQMCR.js → chunk-HDHGRTUS.js} +3 -3
  112. package/dist/chunk-HDHGRTUS.js.map +1 -0
  113. package/dist/chunk-HGEHQKAH.cjs +61 -0
  114. package/dist/chunk-HGEHQKAH.cjs.map +1 -0
  115. package/dist/{chunk-L4VJYJCY.js → chunk-HI5EDX3F.js} +6 -6
  116. package/dist/chunk-HI5EDX3F.js.map +1 -0
  117. package/dist/chunk-HITLRKIU.cjs +191 -0
  118. package/dist/chunk-HITLRKIU.cjs.map +1 -0
  119. package/dist/chunk-HXICAUTW.cjs +390 -0
  120. package/dist/chunk-HXICAUTW.cjs.map +1 -0
  121. package/dist/{chunk-JTAGYRQP.js → chunk-JA4UAHWP.js} +3 -3
  122. package/dist/chunk-JA4UAHWP.js.map +1 -0
  123. package/dist/{chunk-JLIHQAX7.cjs → chunk-JH576GTI.cjs} +37 -37
  124. package/dist/chunk-JH576GTI.cjs.map +1 -0
  125. package/dist/{chunk-R344LGXP.js → chunk-JL6JURL5.js} +7 -7
  126. package/dist/{chunk-R344LGXP.js.map → chunk-JL6JURL5.js.map} +1 -1
  127. package/dist/{chunk-2AUSWWKT.js → chunk-JSED6H32.js} +4 -4
  128. package/dist/chunk-JSED6H32.js.map +1 -0
  129. package/dist/{chunk-KKFLSWNW.js → chunk-K6RNBFGH.js} +7 -7
  130. package/dist/{chunk-KKFLSWNW.js.map → chunk-K6RNBFGH.js.map} +1 -1
  131. package/dist/{chunk-BWTGKLXJ.cjs → chunk-KAWEDYGS.cjs} +27 -27
  132. package/dist/{chunk-BWTGKLXJ.cjs.map → chunk-KAWEDYGS.cjs.map} +1 -1
  133. package/dist/{chunk-TJIN7OPG.js → chunk-KKQMEJOK.js} +4 -4
  134. package/dist/chunk-KKQMEJOK.js.map +1 -0
  135. package/dist/{chunk-H4AABNBB.js → chunk-KO2V7HRR.js} +4 -4
  136. package/dist/chunk-KO2V7HRR.js.map +1 -0
  137. package/dist/{chunk-IB2ZR7T7.js → chunk-M6AQTASN.js} +5 -5
  138. package/dist/{chunk-IB2ZR7T7.js.map → chunk-M6AQTASN.js.map} +1 -1
  139. package/dist/{chunk-HRVCVRIR.js → chunk-MH2WUZWZ.js} +7 -7
  140. package/dist/{chunk-HRVCVRIR.js.map → chunk-MH2WUZWZ.js.map} +1 -1
  141. package/dist/{chunk-YIVUIIWJ.js → chunk-MKW43AJ3.js} +7 -7
  142. package/dist/{chunk-YIVUIIWJ.js.map → chunk-MKW43AJ3.js.map} +1 -1
  143. package/dist/{chunk-IGZADYRV.cjs → chunk-MNEANLCY.cjs} +22 -22
  144. package/dist/{chunk-IGZADYRV.cjs.map → chunk-MNEANLCY.cjs.map} +1 -1
  145. package/dist/{chunk-RFO7PBA6.js → chunk-MROITNSM.js} +4 -4
  146. package/dist/chunk-MROITNSM.js.map +1 -0
  147. package/dist/chunk-MUOB33WV.cjs +107 -0
  148. package/dist/chunk-MUOB33WV.cjs.map +1 -0
  149. package/dist/{chunk-G4FSJJAS.cjs → chunk-NCCK5NVX.cjs} +30 -30
  150. package/dist/{chunk-G4FSJJAS.cjs.map → chunk-NCCK5NVX.cjs.map} +1 -1
  151. package/dist/{chunk-QB3ZGAO4.js → chunk-NIKW5NHG.js} +3 -3
  152. package/dist/chunk-NIKW5NHG.js.map +1 -0
  153. package/dist/{chunk-5BBO2RHV.js → chunk-NMS2SC2B.js} +14 -67
  154. package/dist/chunk-NMS2SC2B.js.map +1 -0
  155. package/dist/{chunk-LPLSDJEE.cjs → chunk-NOBDUHIG.cjs} +28 -28
  156. package/dist/{chunk-LPLSDJEE.cjs.map → chunk-NOBDUHIG.cjs.map} +1 -1
  157. package/dist/{chunk-7NDOPT3W.js → chunk-NWS4QRE6.js} +5 -5
  158. package/dist/chunk-NWS4QRE6.js.map +1 -0
  159. package/dist/{chunk-VD26CDFT.js → chunk-OXE6JN54.js} +6 -6
  160. package/dist/{chunk-VD26CDFT.js.map → chunk-OXE6JN54.js.map} +1 -1
  161. package/dist/{chunk-NA7LKQPZ.js → chunk-P23KBWKB.js} +2 -2
  162. package/dist/chunk-P23KBWKB.js.map +1 -0
  163. package/dist/chunk-PFKYMKIH.cjs +58 -0
  164. package/dist/chunk-PFKYMKIH.cjs.map +1 -0
  165. package/dist/{chunk-FYO3ZHLO.js → chunk-PIORYI6S.js} +4 -4
  166. package/dist/chunk-PIORYI6S.js.map +1 -0
  167. package/dist/chunk-QGYUGVXG.cjs +312 -0
  168. package/dist/chunk-QGYUGVXG.cjs.map +1 -0
  169. package/dist/{chunk-4AUZJETY.js → chunk-QJZOWORS.js} +6 -6
  170. package/dist/{chunk-4AUZJETY.js.map → chunk-QJZOWORS.js.map} +1 -1
  171. package/dist/chunk-QKOLB27L.cjs +79 -0
  172. package/dist/chunk-QKOLB27L.cjs.map +1 -0
  173. package/dist/{chunk-2ERW3HSX.js → chunk-QRCL3KIX.js} +5 -5
  174. package/dist/chunk-QRCL3KIX.js.map +1 -0
  175. package/dist/{chunk-BOIOGPBE.js → chunk-R6LBCSVW.js} +4 -4
  176. package/dist/{chunk-BOIOGPBE.js.map → chunk-R6LBCSVW.js.map} +1 -1
  177. package/dist/{chunk-APJA4LIB.js → chunk-RA52MKCE.js} +4 -4
  178. package/dist/chunk-RA52MKCE.js.map +1 -0
  179. package/dist/{chunk-TZTKWB74.js → chunk-RGI5IQDO.js} +3 -3
  180. package/dist/{chunk-TZTKWB74.js.map → chunk-RGI5IQDO.js.map} +1 -1
  181. package/dist/{chunk-QIP5UCDX.js → chunk-RW62AXQH.js} +6 -4
  182. package/dist/chunk-RW62AXQH.js.map +1 -0
  183. package/dist/{chunk-USZD5AX2.js → chunk-S2QK2XG2.js} +3 -3
  184. package/dist/chunk-S2QK2XG2.js.map +1 -0
  185. package/dist/{chunk-V7DWWIJ6.js → chunk-S7PYDU5I.js} +4 -4
  186. package/dist/chunk-S7PYDU5I.js.map +1 -0
  187. package/dist/{chunk-KLGVHICT.js → chunk-SCHPGBMK.js} +8 -8
  188. package/dist/{chunk-KLGVHICT.js.map → chunk-SCHPGBMK.js.map} +1 -1
  189. package/dist/{chunk-HMJCSYZW.cjs → chunk-SEMV475G.cjs} +12 -12
  190. package/dist/{chunk-HMJCSYZW.cjs.map → chunk-SEMV475G.cjs.map} +1 -1
  191. package/dist/{chunk-AUPN3AM6.js → chunk-SJOVDYRT.js} +3 -3
  192. package/dist/chunk-SJOVDYRT.js.map +1 -0
  193. package/dist/chunk-TKEJJLHK.js +281 -0
  194. package/dist/chunk-TKEJJLHK.js.map +1 -0
  195. package/dist/{chunk-7XBOJMBD.js → chunk-TKP6FJQ3.js} +3 -3
  196. package/dist/chunk-TKP6FJQ3.js.map +1 -0
  197. package/dist/{chunk-DVOXGNVI.js → chunk-TVGJFK3J.js} +12 -12
  198. package/dist/{chunk-DVOXGNVI.js.map → chunk-TVGJFK3J.js.map} +1 -1
  199. package/dist/{chunk-RRQAOK3A.cjs → chunk-TYYGY4H4.cjs} +34 -34
  200. package/dist/chunk-TYYGY4H4.cjs.map +1 -0
  201. package/dist/{chunk-WQCIZSIK.cjs → chunk-UFK5THVP.cjs} +30 -30
  202. package/dist/{chunk-WQCIZSIK.cjs.map → chunk-UFK5THVP.cjs.map} +1 -1
  203. package/dist/{chunk-MN45G3GB.js → chunk-UKYIFRF3.js} +4 -4
  204. package/dist/{chunk-MN45G3GB.js.map → chunk-UKYIFRF3.js.map} +1 -1
  205. package/dist/{chunk-FLTCEG6J.cjs → chunk-ULLR3RN3.cjs} +30 -30
  206. package/dist/{chunk-FLTCEG6J.cjs.map → chunk-ULLR3RN3.cjs.map} +1 -1
  207. package/dist/{chunk-6AXJQ6UB.cjs → chunk-UUQ6I673.cjs} +17 -17
  208. package/dist/{chunk-6AXJQ6UB.cjs.map → chunk-UUQ6I673.cjs.map} +1 -1
  209. package/dist/{chunk-FS7SSMBW.js → chunk-V7EVEI4C.js} +5 -5
  210. package/dist/chunk-V7EVEI4C.js.map +1 -0
  211. package/dist/{chunk-TB3QXBEC.js → chunk-VMDL27ZN.js} +4 -4
  212. package/dist/{chunk-TB3QXBEC.js.map → chunk-VMDL27ZN.js.map} +1 -1
  213. package/dist/chunk-VTPTMQFA.cjs +298 -0
  214. package/dist/chunk-VTPTMQFA.cjs.map +1 -0
  215. package/dist/{chunk-DWJI2VL3.cjs → chunk-WC4OPIB4.cjs} +6 -6
  216. package/dist/{chunk-DWJI2VL3.cjs.map → chunk-WC4OPIB4.cjs.map} +1 -1
  217. package/dist/{chunk-ZXGZ7K6D.cjs → chunk-WIQDQTKG.cjs} +34 -34
  218. package/dist/chunk-WIQDQTKG.cjs.map +1 -0
  219. package/dist/{chunk-DUWAI5L3.cjs → chunk-WUCJRGTK.cjs} +36 -36
  220. package/dist/{chunk-DUWAI5L3.cjs.map → chunk-WUCJRGTK.cjs.map} +1 -1
  221. package/dist/chunk-WV5LJP6Y.cjs +120 -0
  222. package/dist/chunk-WV5LJP6Y.cjs.map +1 -0
  223. package/dist/{chunk-GHPFPYUG.js → chunk-WYAFNFFM.js} +56 -43
  224. package/dist/chunk-WYAFNFFM.js.map +1 -0
  225. package/dist/{chunk-N6ZHI7A3.cjs → chunk-XBMICDYC.cjs} +111 -111
  226. package/dist/{chunk-N6ZHI7A3.cjs.map → chunk-XBMICDYC.cjs.map} +1 -1
  227. package/dist/chunk-XM2YJ3NM.cjs +84 -0
  228. package/dist/chunk-XM2YJ3NM.cjs.map +1 -0
  229. package/dist/{chunk-MPXNKSVP.cjs → chunk-Y2OBOWHZ.cjs} +42 -42
  230. package/dist/chunk-Y2OBOWHZ.cjs.map +1 -0
  231. package/dist/{chunk-KYKIFNJQ.cjs → chunk-YEYWCSMW.cjs} +38 -38
  232. package/dist/{chunk-KYKIFNJQ.cjs.map → chunk-YEYWCSMW.cjs.map} +1 -1
  233. package/dist/chunk-YG3JPRRY.cjs +70 -0
  234. package/dist/chunk-YG3JPRRY.cjs.map +1 -0
  235. package/dist/{chunk-Q2X6FP4W.cjs → chunk-YIVUZPOV.cjs} +117 -117
  236. package/dist/{chunk-Q2X6FP4W.cjs.map → chunk-YIVUZPOV.cjs.map} +1 -1
  237. package/dist/{chunk-EL2DRC3C.js → chunk-YKS5HCGB.js} +16 -13
  238. package/dist/chunk-YKS5HCGB.js.map +1 -0
  239. package/dist/{chunk-FXX6WI5F.cjs → chunk-YTB4DWYU.cjs} +97 -66
  240. package/dist/chunk-YTB4DWYU.cjs.map +1 -0
  241. package/dist/{chunk-JKUQ3PWM.cjs → chunk-YV7FX2SA.cjs} +36 -36
  242. package/dist/{chunk-JKUQ3PWM.cjs.map → chunk-YV7FX2SA.cjs.map} +1 -1
  243. package/dist/{chunk-NHTUBHMO.cjs → chunk-YWPRH3D3.cjs} +140 -127
  244. package/dist/chunk-YWPRH3D3.cjs.map +1 -0
  245. package/dist/chunk-YZFZHEHC.cjs +73 -0
  246. package/dist/chunk-YZFZHEHC.cjs.map +1 -0
  247. package/dist/{chunk-KPMEA5UE.js → chunk-ZEVZ6OJY.js} +3 -3
  248. package/dist/chunk-ZEVZ6OJY.js.map +1 -0
  249. package/dist/chunk-ZFCNTRZ2.cjs +21 -0
  250. package/dist/chunk-ZFCNTRZ2.cjs.map +1 -0
  251. package/dist/{chunk-6LTXNJU5.js → chunk-ZHULRNJG.js} +10 -7
  252. package/dist/chunk-ZHULRNJG.js.map +1 -0
  253. package/dist/{chunk-FO5SVAKR.js → chunk-ZKXIAID6.js} +6 -6
  254. package/dist/{chunk-FO5SVAKR.js.map → chunk-ZKXIAID6.js.map} +1 -1
  255. package/dist/{chunk-26DWGZNJ.cjs → chunk-ZPHHURXX.cjs} +166 -166
  256. package/dist/{chunk-26DWGZNJ.cjs.map → chunk-ZPHHURXX.cjs.map} +1 -1
  257. package/dist/{chunk-OVXPDSMT.js → chunk-ZRUDCNFS.js} +59 -18
  258. package/dist/chunk-ZRUDCNFS.js.map +1 -0
  259. package/dist/docs/SKILL.md +1 -1
  260. package/dist/docs/assets/SOURCE_MAP.json +1 -1
  261. package/dist/{observational-memory-3XFCO6MX-WVUSRO35.cjs → observational-memory-OZ7TG4DZ-COUORCVN.cjs} +28 -28
  262. package/dist/{observational-memory-3XFCO6MX-WVUSRO35.cjs.map → observational-memory-OZ7TG4DZ-COUORCVN.cjs.map} +1 -1
  263. package/dist/{observational-memory-3XFCO6MX-WHVD3JTT.js → observational-memory-OZ7TG4DZ-MYYBYEP6.js} +3 -3
  264. package/dist/{observational-memory-3XFCO6MX-WHVD3JTT.js.map → observational-memory-OZ7TG4DZ-MYYBYEP6.js.map} +1 -1
  265. package/dist/server/handlers/a2a.cjs +9 -9
  266. package/dist/server/handlers/a2a.d.ts +1 -1
  267. package/dist/server/handlers/a2a.d.ts.map +1 -1
  268. package/dist/server/handlers/a2a.js +1 -1
  269. package/dist/server/handlers/agent-builder.cjs +16 -16
  270. package/dist/server/handlers/agent-builder.js +1 -1
  271. package/dist/server/handlers/agent-versions.cjs +8 -8
  272. package/dist/server/handlers/agent-versions.d.ts +1 -1
  273. package/dist/server/handlers/agent-versions.d.ts.map +1 -1
  274. package/dist/server/handlers/agent-versions.js +1 -1
  275. package/dist/server/handlers/agents.cjs +33 -33
  276. package/dist/server/handlers/agents.d.ts +11 -6
  277. package/dist/server/handlers/agents.d.ts.map +1 -1
  278. package/dist/server/handlers/agents.js +1 -1
  279. package/dist/server/handlers/auth.cjs +10 -10
  280. package/dist/server/handlers/auth.js +1 -1
  281. package/dist/server/handlers/datasets.cjs +24 -24
  282. package/dist/server/handlers/datasets.js +1 -1
  283. package/dist/server/handlers/error.cjs +3 -3
  284. package/dist/server/handlers/error.d.ts +2 -3
  285. package/dist/server/handlers/error.d.ts.map +1 -1
  286. package/dist/server/handlers/error.js +1 -1
  287. package/dist/server/handlers/logs.cjs +4 -4
  288. package/dist/server/handlers/logs.js +1 -1
  289. package/dist/server/handlers/mcp-client-versions.cjs +8 -8
  290. package/dist/server/handlers/mcp-client-versions.js +1 -1
  291. package/dist/server/handlers/mcp.cjs +9 -9
  292. package/dist/server/handlers/mcp.js +1 -1
  293. package/dist/server/handlers/memory.cjs +27 -27
  294. package/dist/server/handlers/memory.js +1 -1
  295. package/dist/server/handlers/observability-new-endpoints.cjs +19 -19
  296. package/dist/server/handlers/observability-new-endpoints.d.ts +177 -17
  297. package/dist/server/handlers/observability-new-endpoints.d.ts.map +1 -1
  298. package/dist/server/handlers/observability-new-endpoints.js +1 -1
  299. package/dist/server/handlers/observability.cjs +24 -24
  300. package/dist/server/handlers/observability.d.ts +1 -1
  301. package/dist/server/handlers/observability.d.ts.map +1 -1
  302. package/dist/server/handlers/observability.js +2 -2
  303. package/dist/server/handlers/processor-providers.cjs +3 -3
  304. package/dist/server/handlers/processor-providers.js +1 -1
  305. package/dist/server/handlers/processors.cjs +4 -4
  306. package/dist/server/handlers/processors.js +1 -1
  307. package/dist/server/handlers/prompt-block-versions.cjs +8 -8
  308. package/dist/server/handlers/prompt-block-versions.js +1 -1
  309. package/dist/server/handlers/scorer-versions.cjs +8 -8
  310. package/dist/server/handlers/scorer-versions.js +1 -1
  311. package/dist/server/handlers/scores.cjs +7 -7
  312. package/dist/server/handlers/scores.js +1 -1
  313. package/dist/server/handlers/stored-agents.cjs +7 -7
  314. package/dist/server/handlers/stored-agents.d.ts +1 -1
  315. package/dist/server/handlers/stored-agents.d.ts.map +1 -1
  316. package/dist/server/handlers/stored-agents.js +1 -1
  317. package/dist/server/handlers/stored-mcp-clients.cjs +6 -6
  318. package/dist/server/handlers/stored-mcp-clients.js +1 -1
  319. package/dist/server/handlers/stored-prompt-blocks.cjs +6 -6
  320. package/dist/server/handlers/stored-prompt-blocks.js +1 -1
  321. package/dist/server/handlers/stored-scorers.cjs +6 -6
  322. package/dist/server/handlers/stored-scorers.js +1 -1
  323. package/dist/server/handlers/stored-skills.cjs +7 -7
  324. package/dist/server/handlers/stored-skills.js +1 -1
  325. package/dist/server/handlers/stored-workspaces.cjs +6 -6
  326. package/dist/server/handlers/stored-workspaces.js +1 -1
  327. package/dist/server/handlers/system.cjs +2 -2
  328. package/dist/server/handlers/system.d.ts +4 -0
  329. package/dist/server/handlers/system.d.ts.map +1 -1
  330. package/dist/server/handlers/system.js +1 -1
  331. package/dist/server/handlers/tool-providers.cjs +5 -5
  332. package/dist/server/handlers/tool-providers.js +1 -1
  333. package/dist/server/handlers/tools.cjs +6 -6
  334. package/dist/server/handlers/tools.js +1 -1
  335. package/dist/server/handlers/vector.cjs +16 -16
  336. package/dist/server/handlers/vector.js +1 -1
  337. package/dist/server/handlers/voice.cjs +8 -8
  338. package/dist/server/handlers/voice.js +1 -1
  339. package/dist/server/handlers/workflows.cjs +24 -24
  340. package/dist/server/handlers/workflows.d.ts +1 -1
  341. package/dist/server/handlers/workflows.d.ts.map +1 -1
  342. package/dist/server/handlers/workflows.js +1 -1
  343. package/dist/server/handlers/workspace.cjs +26 -26
  344. package/dist/server/handlers/workspace.d.ts +60 -32
  345. package/dist/server/handlers/workspace.d.ts.map +1 -1
  346. package/dist/server/handlers/workspace.js +1 -1
  347. package/dist/server/handlers.cjs +28 -28
  348. package/dist/server/handlers.js +14 -14
  349. package/dist/server/schemas/a2a.d.ts +1 -1
  350. package/dist/server/schemas/a2a.d.ts.map +1 -1
  351. package/dist/server/schemas/agent-builder.d.ts +1 -1
  352. package/dist/server/schemas/agent-builder.d.ts.map +1 -1
  353. package/dist/server/schemas/agent-versions.d.ts +1 -1
  354. package/dist/server/schemas/agent-versions.d.ts.map +1 -1
  355. package/dist/server/schemas/agents.d.ts +1 -1
  356. package/dist/server/schemas/agents.d.ts.map +1 -1
  357. package/dist/server/schemas/auth.d.ts +1 -1
  358. package/dist/server/schemas/auth.d.ts.map +1 -1
  359. package/dist/server/schemas/common.d.ts +1 -1
  360. package/dist/server/schemas/common.d.ts.map +1 -1
  361. package/dist/server/schemas/datasets.d.ts +1 -1
  362. package/dist/server/schemas/datasets.d.ts.map +1 -1
  363. package/dist/server/schemas/default-options.d.ts +1 -1
  364. package/dist/server/schemas/default-options.d.ts.map +1 -1
  365. package/dist/server/schemas/index.cjs +461 -457
  366. package/dist/server/schemas/index.js +30 -30
  367. package/dist/server/schemas/logs.d.ts +1 -1
  368. package/dist/server/schemas/logs.d.ts.map +1 -1
  369. package/dist/server/schemas/mcp-client-versions.d.ts +1 -1
  370. package/dist/server/schemas/mcp-client-versions.d.ts.map +1 -1
  371. package/dist/server/schemas/mcp.d.ts +1 -1
  372. package/dist/server/schemas/mcp.d.ts.map +1 -1
  373. package/dist/server/schemas/memory-config.d.ts +1 -1
  374. package/dist/server/schemas/memory-config.d.ts.map +1 -1
  375. package/dist/server/schemas/memory.d.ts +1 -1
  376. package/dist/server/schemas/memory.d.ts.map +1 -1
  377. package/dist/server/schemas/processor-providers.d.ts +1 -1
  378. package/dist/server/schemas/processor-providers.d.ts.map +1 -1
  379. package/dist/server/schemas/processors.d.ts +1 -1
  380. package/dist/server/schemas/processors.d.ts.map +1 -1
  381. package/dist/server/schemas/prompt-block-versions.d.ts +1 -1
  382. package/dist/server/schemas/prompt-block-versions.d.ts.map +1 -1
  383. package/dist/server/schemas/route-contracts.d.ts +1 -1
  384. package/dist/server/schemas/route-contracts.d.ts.map +1 -1
  385. package/dist/server/schemas/rule-group.d.ts +1 -1
  386. package/dist/server/schemas/rule-group.d.ts.map +1 -1
  387. package/dist/server/schemas/scorer-versions.d.ts +1 -1
  388. package/dist/server/schemas/scorer-versions.d.ts.map +1 -1
  389. package/dist/server/schemas/scores.d.ts +1 -1
  390. package/dist/server/schemas/scores.d.ts.map +1 -1
  391. package/dist/server/schemas/stored-agents.d.ts +1 -1
  392. package/dist/server/schemas/stored-agents.d.ts.map +1 -1
  393. package/dist/server/schemas/stored-mcp-clients.d.ts +1 -1
  394. package/dist/server/schemas/stored-mcp-clients.d.ts.map +1 -1
  395. package/dist/server/schemas/stored-prompt-blocks.d.ts +1 -1
  396. package/dist/server/schemas/stored-prompt-blocks.d.ts.map +1 -1
  397. package/dist/server/schemas/stored-scorers.d.ts +1 -1
  398. package/dist/server/schemas/stored-scorers.d.ts.map +1 -1
  399. package/dist/server/schemas/stored-skills.d.ts +1 -1
  400. package/dist/server/schemas/stored-skills.d.ts.map +1 -1
  401. package/dist/server/schemas/stored-workspaces.d.ts +1 -1
  402. package/dist/server/schemas/stored-workspaces.d.ts.map +1 -1
  403. package/dist/server/schemas/system.d.ts +3 -1
  404. package/dist/server/schemas/system.d.ts.map +1 -1
  405. package/dist/server/schemas/tool-providers.d.ts +1 -1
  406. package/dist/server/schemas/tool-providers.d.ts.map +1 -1
  407. package/dist/server/schemas/vectors.d.ts +1 -1
  408. package/dist/server/schemas/vectors.d.ts.map +1 -1
  409. package/dist/server/schemas/version-common.d.ts +1 -1
  410. package/dist/server/schemas/version-common.d.ts.map +1 -1
  411. package/dist/server/schemas/workflows.d.ts +1 -1
  412. package/dist/server/schemas/workflows.d.ts.map +1 -1
  413. package/dist/server/schemas/workspace.d.ts +7 -1
  414. package/dist/server/schemas/workspace.d.ts.map +1 -1
  415. package/dist/server/server-adapter/index.cjs +286 -286
  416. package/dist/server/server-adapter/index.cjs.map +1 -1
  417. package/dist/server/server-adapter/index.d.ts +1 -1
  418. package/dist/server/server-adapter/index.d.ts.map +1 -1
  419. package/dist/server/server-adapter/index.js +35 -35
  420. package/dist/server/server-adapter/index.js.map +1 -1
  421. package/dist/server/server-adapter/routes/index.d.ts +1 -1
  422. package/dist/server/server-adapter/routes/index.d.ts.map +1 -1
  423. package/dist/server/server-adapter/routes/observability.d.ts +88 -8
  424. package/dist/server/server-adapter/routes/observability.d.ts.map +1 -1
  425. package/dist/server/server-adapter/routes/route-builder.d.ts +2 -2
  426. package/dist/server/server-adapter/routes/route-builder.d.ts.map +1 -1
  427. package/dist/server/server-adapter/routes/system.d.ts +4 -0
  428. package/dist/server/server-adapter/routes/system.d.ts.map +1 -1
  429. package/dist/server/server-adapter/routes/workspace.d.ts +30 -16
  430. package/dist/server/server-adapter/routes/workspace.d.ts.map +1 -1
  431. package/package.json +5 -5
  432. package/dist/chunk-2AUSWWKT.js.map +0 -1
  433. package/dist/chunk-2ERW3HSX.js.map +0 -1
  434. package/dist/chunk-43MOXX6D.cjs +0 -74
  435. package/dist/chunk-43MOXX6D.cjs.map +0 -1
  436. package/dist/chunk-574U64WA.cjs +0 -103
  437. package/dist/chunk-574U64WA.cjs.map +0 -1
  438. package/dist/chunk-5A232FX3.js.map +0 -1
  439. package/dist/chunk-5BBO2RHV.js.map +0 -1
  440. package/dist/chunk-5HJQACVQ.cjs +0 -32
  441. package/dist/chunk-5HJQACVQ.cjs.map +0 -1
  442. package/dist/chunk-5WFMCDP6.cjs +0 -42
  443. package/dist/chunk-5WFMCDP6.cjs.map +0 -1
  444. package/dist/chunk-6LTXNJU5.js.map +0 -1
  445. package/dist/chunk-7NDOPT3W.js.map +0 -1
  446. package/dist/chunk-7XBOJMBD.js.map +0 -1
  447. package/dist/chunk-APJA4LIB.js.map +0 -1
  448. package/dist/chunk-AUPN3AM6.js.map +0 -1
  449. package/dist/chunk-BAECEBZY.cjs +0 -117
  450. package/dist/chunk-BAECEBZY.cjs.map +0 -1
  451. package/dist/chunk-BNJI7YMJ.cjs +0 -89
  452. package/dist/chunk-BNJI7YMJ.cjs.map +0 -1
  453. package/dist/chunk-BTRFBBRF.js.map +0 -1
  454. package/dist/chunk-CSSSPADR.js.map +0 -1
  455. package/dist/chunk-CWPZX27X.cjs +0 -88
  456. package/dist/chunk-CWPZX27X.cjs.map +0 -1
  457. package/dist/chunk-CXL3KPGO.cjs +0 -58
  458. package/dist/chunk-CXL3KPGO.cjs.map +0 -1
  459. package/dist/chunk-EL2DRC3C.js.map +0 -1
  460. package/dist/chunk-EU4WZ6EN.cjs +0 -391
  461. package/dist/chunk-EU4WZ6EN.cjs.map +0 -1
  462. package/dist/chunk-FOHX5HVN.cjs +0 -77
  463. package/dist/chunk-FOHX5HVN.cjs.map +0 -1
  464. package/dist/chunk-FS7SSMBW.js.map +0 -1
  465. package/dist/chunk-FU22BXAG.cjs +0 -29
  466. package/dist/chunk-FU22BXAG.cjs.map +0 -1
  467. package/dist/chunk-FXX6WI5F.cjs.map +0 -1
  468. package/dist/chunk-FYO3ZHLO.js.map +0 -1
  469. package/dist/chunk-GHPFPYUG.js.map +0 -1
  470. package/dist/chunk-H4AABNBB.js.map +0 -1
  471. package/dist/chunk-HMUJSYUR.js.map +0 -1
  472. package/dist/chunk-I4THGZHE.js.map +0 -1
  473. package/dist/chunk-I6ZA2R6M.cjs +0 -302
  474. package/dist/chunk-I6ZA2R6M.cjs.map +0 -1
  475. package/dist/chunk-II6TN6MR.js.map +0 -1
  476. package/dist/chunk-IWH4OW2X.js.map +0 -1
  477. package/dist/chunk-J3SEZ24R.cjs +0 -70
  478. package/dist/chunk-J3SEZ24R.cjs.map +0 -1
  479. package/dist/chunk-JLIHQAX7.cjs.map +0 -1
  480. package/dist/chunk-JTAGYRQP.js.map +0 -1
  481. package/dist/chunk-KPMEA5UE.js.map +0 -1
  482. package/dist/chunk-KXXILK3T.cjs +0 -134
  483. package/dist/chunk-KXXILK3T.cjs.map +0 -1
  484. package/dist/chunk-L4VJYJCY.js.map +0 -1
  485. package/dist/chunk-LCP4G5CT.cjs +0 -83
  486. package/dist/chunk-LCP4G5CT.cjs.map +0 -1
  487. package/dist/chunk-LU7HU7KW.cjs +0 -65
  488. package/dist/chunk-LU7HU7KW.cjs.map +0 -1
  489. package/dist/chunk-LW2FKUW5.js.map +0 -1
  490. package/dist/chunk-MJTEQGJT.cjs.map +0 -1
  491. package/dist/chunk-MPXNKSVP.cjs.map +0 -1
  492. package/dist/chunk-NA7LKQPZ.js.map +0 -1
  493. package/dist/chunk-NHTUBHMO.cjs.map +0 -1
  494. package/dist/chunk-NLMVQMCR.js.map +0 -1
  495. package/dist/chunk-O272KKXN.cjs +0 -111
  496. package/dist/chunk-O272KKXN.cjs.map +0 -1
  497. package/dist/chunk-OP626LZY.js.map +0 -1
  498. package/dist/chunk-OVXPDSMT.js.map +0 -1
  499. package/dist/chunk-P2ZMGGHF.cjs +0 -19
  500. package/dist/chunk-P2ZMGGHF.cjs.map +0 -1
  501. package/dist/chunk-PNJPBMSY.js.map +0 -1
  502. package/dist/chunk-PONEV4T5.js.map +0 -1
  503. package/dist/chunk-QB3ZGAO4.js.map +0 -1
  504. package/dist/chunk-QIP5UCDX.js.map +0 -1
  505. package/dist/chunk-QTBCX6KF.cjs +0 -84
  506. package/dist/chunk-QTBCX6KF.cjs.map +0 -1
  507. package/dist/chunk-RCSPGNEZ.cjs +0 -44
  508. package/dist/chunk-RCSPGNEZ.cjs.map +0 -1
  509. package/dist/chunk-RFO7PBA6.js.map +0 -1
  510. package/dist/chunk-RRQAOK3A.cjs.map +0 -1
  511. package/dist/chunk-SE3VUDBK.cjs +0 -390
  512. package/dist/chunk-SE3VUDBK.cjs.map +0 -1
  513. package/dist/chunk-TJIN7OPG.js.map +0 -1
  514. package/dist/chunk-U3PO2SCK.cjs +0 -124
  515. package/dist/chunk-U3PO2SCK.cjs.map +0 -1
  516. package/dist/chunk-U4YUXGDH.cjs +0 -195
  517. package/dist/chunk-U4YUXGDH.cjs.map +0 -1
  518. package/dist/chunk-ULL6VJ5E.cjs +0 -90
  519. package/dist/chunk-ULL6VJ5E.cjs.map +0 -1
  520. package/dist/chunk-USD6C4ZL.cjs +0 -316
  521. package/dist/chunk-USD6C4ZL.cjs.map +0 -1
  522. package/dist/chunk-USZD5AX2.js.map +0 -1
  523. package/dist/chunk-UYAZFEAW.js.map +0 -1
  524. package/dist/chunk-V7DWWIJ6.js.map +0 -1
  525. package/dist/chunk-VKTJMAUK.js +0 -281
  526. package/dist/chunk-VKTJMAUK.js.map +0 -1
  527. package/dist/chunk-VO6UDRJS.cjs.map +0 -1
  528. package/dist/chunk-VTHT3PPM.cjs +0 -61
  529. package/dist/chunk-VTHT3PPM.cjs.map +0 -1
  530. package/dist/chunk-WOMVBFIP.cjs +0 -81
  531. package/dist/chunk-WOMVBFIP.cjs.map +0 -1
  532. package/dist/chunk-Y2BKW5ND.cjs.map +0 -1
  533. package/dist/chunk-Y452XTPZ.js.map +0 -1
  534. package/dist/chunk-YJLDMFSE.cjs.map +0 -1
  535. package/dist/chunk-YUWWXTL2.cjs +0 -69
  536. package/dist/chunk-YUWWXTL2.cjs.map +0 -1
  537. package/dist/chunk-ZHKXVTMQ.cjs +0 -38
  538. package/dist/chunk-ZHKXVTMQ.cjs.map +0 -1
  539. package/dist/chunk-ZHVL7YBO.cjs +0 -381
  540. package/dist/chunk-ZHVL7YBO.cjs.map +0 -1
  541. package/dist/chunk-ZXGZ7K6D.cjs.map +0 -1
  542. package/dist/chunk-ZYXDUS6Q.cjs +0 -95
  543. package/dist/chunk-ZYXDUS6Q.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/server/handlers/workflows.ts"],"names":["__export","HTTPException","WorkflowRegistry","createRoute","z","listWorkflowsResponseSchema","getWorkflowInfo","handleError","workflowIdPathParams","workflowInfoSchema","listWorkflowRunsQuerySchema","workflowRunsResponseSchema","getEffectiveResourceId","workflowRunPathParams","workflowRunResultQuerySchema","workflowRunResultSchema","validateRunOwnership","workflowControlResponseSchema","optionalRunIdSchema","createWorkflowRunBodySchema","createWorkflowRunResponseSchema","runIdSchema","streamWorkflowBodySchema","TransformStream","resumeBodySchema","streamResponseSchema","startAsyncWorkflowBodySchema","workflowExecutionResultSchema","ReadableStream","restartBodySchema","timeTravelBodySchema"],"mappings":";;;;;;;;;;;;;;;AAAA,IAAA,iBAAA,GAAA;AAAAA,0BAAA,CAAA,iBAA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mBAAA,EAA0C;AAEtE,MAAA,MAAM,MAAA,GAAS,eAAA,CAAgB,QAAA,CAAS,SAAA,EAAU;AAElD,MAAA,MAAM,eAAA,GAAkB,MAAM,WAAA,CAAY,UAAA,CAAW,OAAO,CAAC,CAAA;AAE7D,MAAA,KAAA,MAAW,SAAS,eAAA,EAAiB;AACnC,QAAA,MAAM,MAAA,CAAO,MAAM,KAAY,CAAA;AAAA,MACjC;AAEA,MAAA,MAAA,CAAO,WAAA,EAAY;AAEnB,MAAA,MAAM,MAAA,GAAS,KAAK,mBAAA,EAAoB;AACxC,MAAA,OAAO,MAAA,CAAO,MAAA,EAAQ,WAAA,CAAY,eAAe,CAAA;AAAA,IACnD,SAAS,KAAA,EAAO;AACd,MAAA,OAAOhB,6BAAA,CAAY,OAAO,iCAAiC,CAAA;AAAA,IAC7D;AAAA,EACF;AACF,CAAC","file":"chunk-7KSSSSLW.cjs","sourcesContent":["import { ReadableStream, TransformStream } from 'node:stream/web';\nimport type { RequestContext } from '@mastra/core/di';\nimport type { WorkflowInfo, ChunkType, StreamEvent, WorkflowStateField } from '@mastra/core/workflows';\nimport { z } from 'zod';\nimport { HTTPException } from '../http-exception';\nimport { streamResponseSchema } from '../schemas/agents';\nimport { optionalRunIdSchema, runIdSchema } from '../schemas/common';\nimport {\n createWorkflowRunBodySchema,\n createWorkflowRunResponseSchema,\n listWorkflowRunsQuerySchema,\n listWorkflowsResponseSchema,\n restartBodySchema,\n timeTravelBodySchema,\n resumeBodySchema,\n startAsyncWorkflowBodySchema,\n streamWorkflowBodySchema,\n workflowControlResponseSchema,\n workflowExecutionResultSchema,\n workflowIdPathParams,\n workflowInfoSchema,\n workflowRunPathParams,\n workflowRunsResponseSchema,\n workflowRunResultQuerySchema,\n workflowRunResultSchema,\n} from '../schemas/workflows';\nimport { createRoute } from '../server-adapter/routes/route-builder';\nimport type { Context } from '../types';\nimport { getWorkflowInfo, WorkflowRegistry } from '../utils';\nimport { handleError } from './error';\nimport { getEffectiveResourceId, validateRunOwnership } from './utils';\n\nexport interface WorkflowContext extends Context {\n workflowId?: string;\n runId?: string;\n requestContext?: RequestContext;\n}\n\nasync function listWorkflowsFromSystem({ mastra, workflowId }: WorkflowContext) {\n const logger = mastra.getLogger();\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n let workflow;\n\n // First check registry for temporary workflows\n workflow = WorkflowRegistry.getWorkflow(workflowId);\n\n if (!workflow) {\n try {\n workflow = mastra.getWorkflowById(workflowId);\n } catch (error) {\n logger.debug('Error getting workflow, searching agents for workflow', error);\n }\n }\n\n if (!workflow) {\n logger.debug('Workflow not found, searching agents for workflow', { workflowId });\n const agents = mastra.listAgents();\n\n if (Object.keys(agents || {}).length) {\n for (const [_, agent] of Object.entries(agents)) {\n try {\n const workflows = await agent.listWorkflows();\n\n if (workflows[workflowId]) {\n workflow = workflows[workflowId];\n break;\n }\n } catch (error) {\n logger.debug('Error getting workflow from agent', error);\n }\n }\n }\n }\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n return { workflow };\n}\n\n// ============================================================================\n// Route Definitions (new pattern - handlers defined inline with createRoute)\n// ============================================================================\n\nexport const LIST_WORKFLOWS_ROUTE = createRoute({\n method: 'GET',\n path: '/workflows',\n responseType: 'json',\n queryParamSchema: z.object({\n partial: z.string().optional(),\n }),\n responseSchema: listWorkflowsResponseSchema,\n summary: 'List all workflows',\n description: 'Returns a list of all available workflows in the system',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: (async ({ mastra, partial }: any) => {\n try {\n const workflows = mastra.listWorkflows({ serialized: false });\n const isPartial = partial === 'true';\n const _workflows = Object.entries(workflows).reduce<Record<string, WorkflowInfo>>((acc, [key, workflow]) => {\n acc[key] = getWorkflowInfo(workflow as any, isPartial);\n return acc;\n }, {});\n return _workflows;\n } catch (error) {\n return handleError(error, 'Error getting workflows');\n }\n }) as any,\n});\n\nexport const GET_WORKFLOW_BY_ID_ROUTE = createRoute({\n method: 'GET',\n path: '/workflows/:workflowId',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n responseSchema: workflowInfoSchema,\n summary: 'Get workflow by ID',\n description: 'Returns details for a specific workflow',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: (async ({ mastra, workflowId }: any) => {\n try {\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n return getWorkflowInfo(workflow);\n } catch (error) {\n return handleError(error, 'Error getting workflow');\n }\n }) as any,\n});\n\nexport const LIST_WORKFLOW_RUNS_ROUTE = createRoute({\n method: 'GET',\n path: '/workflows/:workflowId/runs',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: listWorkflowRunsQuerySchema,\n responseSchema: workflowRunsResponseSchema,\n summary: 'List workflow runs',\n description: 'Returns a paginated list of execution runs for the specified workflow',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({\n mastra,\n workflowId,\n fromDate,\n toDate,\n page,\n perPage,\n limit,\n offset,\n resourceId,\n status,\n requestContext,\n }) => {\n try {\n // Use effective resourceId (context key takes precedence over client-provided value)\n const effectiveResourceId = getEffectiveResourceId(requestContext, resourceId);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n // Support both page/perPage and limit/offset for backwards compatibility\n // If page/perPage provided, use directly; otherwise convert from limit/offset\n let finalPage = page;\n let finalPerPage = perPage;\n\n if (finalPerPage === undefined && limit !== undefined) {\n finalPerPage = limit;\n }\n if (finalPage === undefined && offset !== undefined && finalPerPage !== undefined && finalPerPage > 0) {\n finalPage = Math.floor(offset / finalPerPage);\n }\n\n if (\n finalPerPage !== undefined &&\n (typeof finalPerPage !== 'number' || !Number.isInteger(finalPerPage) || finalPerPage <= 0)\n ) {\n throw new HTTPException(400, { message: 'perPage must be a positive integer' });\n }\n if (finalPage !== undefined && (!Number.isInteger(finalPage) || finalPage < 0)) {\n throw new HTTPException(400, { message: 'page must be a non-negative integer' });\n }\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n const workflowRuns = (await workflow.listWorkflowRuns({\n fromDate: fromDate ? (typeof fromDate === 'string' ? new Date(fromDate) : fromDate) : undefined,\n toDate: toDate ? (typeof toDate === 'string' ? new Date(toDate) : toDate) : undefined,\n perPage: finalPerPage,\n page: finalPage,\n resourceId: effectiveResourceId,\n status,\n })) || {\n runs: [],\n total: 0,\n };\n return workflowRuns;\n } catch (error) {\n return handleError(error, 'Error getting workflow runs');\n }\n },\n});\n\nexport const GET_WORKFLOW_RUN_BY_ID_ROUTE = createRoute({\n method: 'GET',\n path: '/workflows/:workflowId/runs/:runId',\n responseType: 'json',\n pathParamSchema: workflowRunPathParams,\n queryParamSchema: workflowRunResultQuerySchema,\n responseSchema: workflowRunResultSchema,\n summary: 'Get workflow run by ID',\n description:\n 'Returns a workflow run with metadata and processed execution state. Use the fields query parameter to reduce payload size by requesting only specific fields (e.g., ?fields=status,result,metadata)',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, fields, withNestedWorkflows, requestContext }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'Run ID is required' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n // Parse fields parameter (comma-separated string)\n const fieldList = fields ? (fields.split(',').map((f: string) => f.trim()) as WorkflowStateField[]) : undefined;\n\n const run = await workflow.getWorkflowRunById(runId, {\n withNestedWorkflows: withNestedWorkflows !== 'false', // Default to true unless explicitly 'false'\n fields: fieldList,\n });\n\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n\n await validateRunOwnership(run, effectiveResourceId);\n\n return run;\n } catch (error) {\n return handleError(error, 'Error getting workflow run');\n }\n },\n});\n\nexport const DELETE_WORKFLOW_RUN_BY_ID_ROUTE = createRoute({\n method: 'DELETE',\n path: '/workflows/:workflowId/runs/:runId',\n responseType: 'json',\n pathParamSchema: workflowRunPathParams,\n responseSchema: workflowControlResponseSchema,\n summary: 'Delete workflow run by ID',\n description: 'Deletes a specific workflow run by ID',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'Run ID is required' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n // Validate ownership before deletion\n const run = await workflow.getWorkflowRunById(runId);\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n await validateRunOwnership(run, effectiveResourceId);\n\n await workflow.deleteWorkflowRunById(runId);\n\n return { message: 'Workflow run deleted' };\n } catch (error) {\n return handleError(error, 'Error deleting workflow run');\n }\n },\n});\n\nexport const CREATE_WORKFLOW_RUN_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/create-run',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: optionalRunIdSchema,\n bodySchema: createWorkflowRunBodySchema,\n responseSchema: createWorkflowRunResponseSchema,\n summary: 'Create workflow run',\n description: 'Creates a new workflow execution instance with an optional custom run ID',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, resourceId, disableScorers, requestContext }) => {\n try {\n // Use effective resourceId (context key takes precedence over client-provided value)\n const effectiveResourceId = getEffectiveResourceId(requestContext, resourceId);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const run = await workflow.createRun({ runId, resourceId: effectiveResourceId, disableScorers });\n\n return { runId: run.runId };\n } catch (error) {\n return handleError(error, 'Error creating workflow run');\n }\n },\n});\n\nexport const STREAM_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/stream',\n responseType: 'stream',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: streamWorkflowBodySchema,\n summary: 'Stream workflow execution',\n description: 'Executes a workflow and streams the results in real-time',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, resourceId, requestContext, ...params }) => {\n try {\n // Use effective resourceId (context key takes precedence over client-provided value)\n const effectiveResourceId = getEffectiveResourceId(requestContext, resourceId);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to stream workflow' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n const serverCache = mastra.getServerCache();\n\n const run = await workflow.createRun({ runId, resourceId: effectiveResourceId });\n const result = run.stream({ ...params, requestContext });\n return result.fullStream.pipeThrough(\n new TransformStream<ChunkType, ChunkType>({\n transform(chunk, controller) {\n if (serverCache) {\n const cacheKey = runId;\n serverCache.listPush(cacheKey, chunk).catch(() => {});\n }\n controller.enqueue(chunk);\n },\n }),\n );\n } catch (error) {\n return handleError(error, 'Error streaming workflow');\n }\n },\n});\n\nexport const RESUME_STREAM_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/resume-stream',\n responseType: 'stream',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: resumeBodySchema,\n responseSchema: streamResponseSchema,\n summary: 'Resume workflow stream',\n description: 'Resumes a suspended workflow execution and continues streaming results',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to resume workflow' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const run = await workflow.getWorkflowRunById(runId);\n\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n\n await validateRunOwnership(run, effectiveResourceId);\n\n const _run = await workflow.createRun({ runId, resourceId: run.resourceId });\n const serverCache = mastra.getServerCache();\n\n const stream = _run.resumeStream({ ...params, requestContext }).fullStream.pipeThrough(\n new TransformStream<ChunkType, ChunkType>({\n transform(chunk, controller) {\n if (serverCache) {\n const cacheKey = runId;\n serverCache.listPush(cacheKey, chunk).catch(() => {});\n }\n\n controller.enqueue(chunk);\n },\n }),\n );\n\n return stream;\n } catch (error) {\n return handleError(error, 'Error resuming workflow');\n }\n },\n});\n\nexport const START_ASYNC_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/start-async',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: optionalRunIdSchema,\n bodySchema: startAsyncWorkflowBodySchema,\n responseSchema: workflowExecutionResultSchema,\n summary: 'Start workflow asynchronously',\n description: 'Starts a workflow execution asynchronously without streaming results',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, resourceId, requestContext, ...params }) => {\n try {\n // Use effective resourceId (context key takes precedence over client-provided value)\n const effectiveResourceId = getEffectiveResourceId(requestContext, resourceId);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const _run = await workflow.createRun({ runId, resourceId: effectiveResourceId });\n const result = await _run.start({ ...params, requestContext });\n return result;\n } catch (error) {\n return handleError(error, 'Error starting async workflow');\n }\n },\n});\n\nexport const START_WORKFLOW_RUN_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/start',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: startAsyncWorkflowBodySchema,\n responseSchema: workflowControlResponseSchema,\n summary: 'Start specific workflow run',\n description: 'Starts execution of a specific workflow run by ID',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to start run' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const run = await workflow.getWorkflowRunById(runId);\n\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n\n await validateRunOwnership(run, effectiveResourceId);\n\n const _run = await workflow.createRun({ runId, resourceId: run.resourceId });\n void _run.start({\n ...params,\n requestContext,\n });\n\n return { message: 'Workflow run started' };\n } catch (e) {\n return handleError(e, 'Error starting workflow run');\n }\n },\n});\n\nexport const OBSERVE_STREAM_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/observe',\n responseType: 'stream',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n responseSchema: streamResponseSchema,\n summary: 'Observe workflow stream',\n description: 'Observes and streams updates from an already running workflow execution',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to observe workflow stream' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const run = await workflow.getWorkflowRunById(runId);\n\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n\n await validateRunOwnership(run, effectiveResourceId);\n\n const _run = await workflow.createRun({ runId, resourceId: run.resourceId });\n const serverCache = mastra.getServerCache();\n if (!serverCache) {\n throw new HTTPException(500, { message: 'Server cache not found' });\n }\n\n // Get cached chunks first\n const cachedRunChunks = await serverCache.listFromTo(runId, 0);\n\n // Create a readable stream that first emits cached chunks, then the live stream\n const combinedStream = new ReadableStream<ChunkType>({\n start(controller) {\n // First, emit all cached chunks\n const emitCachedChunks = async () => {\n for (const chunk of cachedRunChunks) {\n controller.enqueue(chunk as ChunkType);\n }\n };\n\n // Then, pipe the live stream\n const liveStream = _run.observeStream();\n const reader = liveStream.getReader();\n\n const pump = async () => {\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n controller.close();\n break;\n }\n controller.enqueue(value);\n }\n } catch (error) {\n controller.error(error);\n } finally {\n reader.releaseLock();\n }\n };\n\n // Start with cached chunks, then live stream\n void emitCachedChunks()\n .then(() => {\n void pump();\n })\n .catch(error => {\n controller.error(error);\n });\n },\n });\n\n return combinedStream;\n } catch (error) {\n return handleError(error, 'Error observing workflow stream');\n }\n },\n});\n\nexport const RESUME_ASYNC_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/resume-async',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: resumeBodySchema,\n responseSchema: workflowExecutionResultSchema,\n summary: 'Resume workflow asynchronously',\n description: 'Resumes a suspended workflow execution asynchronously without streaming',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to resume workflow' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const run = await workflow.getWorkflowRunById(runId);\n\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n\n await validateRunOwnership(run, effectiveResourceId);\n\n const _run = await workflow.createRun({ runId, resourceId: run.resourceId });\n const result = await _run.resume({ ...params, requestContext });\n\n return result;\n } catch (error) {\n return handleError(error, 'Error resuming workflow step');\n }\n },\n});\n\nexport const RESUME_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/resume',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: resumeBodySchema,\n responseSchema: workflowControlResponseSchema,\n summary: 'Resume workflow',\n description: 'Resumes a suspended workflow execution from a specific step',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to resume workflow' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const run = await workflow.getWorkflowRunById(runId);\n\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n\n await validateRunOwnership(run, effectiveResourceId);\n\n const _run = await workflow.createRun({ runId, resourceId: run.resourceId });\n\n void _run.resume({ ...params, requestContext });\n\n return { message: 'Workflow run resumed' };\n } catch (error) {\n return handleError(error, 'Error resuming workflow');\n }\n },\n});\n\nexport const RESTART_ASYNC_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/restart-async',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: restartBodySchema,\n responseSchema: workflowExecutionResultSchema,\n summary: 'Restart workflow asynchronously',\n description: 'Restarts an active workflow execution asynchronously',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to restart workflow' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const run = await workflow.getWorkflowRunById(runId);\n\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n\n await validateRunOwnership(run, effectiveResourceId);\n\n const _run = await workflow.createRun({ runId, resourceId: run.resourceId });\n const result = await _run.restart({ ...params, requestContext });\n\n return result;\n } catch (error) {\n return handleError(error, 'Error restarting workflow');\n }\n },\n});\n\nexport const RESTART_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/restart',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: restartBodySchema,\n responseSchema: workflowControlResponseSchema,\n summary: 'Restart workflow',\n description: 'Restarts an active workflow execution',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to restart workflow' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const run = await workflow.getWorkflowRunById(runId);\n\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n\n await validateRunOwnership(run, effectiveResourceId);\n\n const _run = await workflow.createRun({ runId, resourceId: run.resourceId });\n\n void _run.restart({ ...params, requestContext });\n\n return { message: 'Workflow run restarted' };\n } catch (error) {\n return handleError(error, 'Error restarting workflow');\n }\n },\n});\n\nexport const RESTART_ALL_ACTIVE_WORKFLOW_RUNS_ASYNC_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/restart-all-active-workflow-runs-async',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n responseSchema: workflowControlResponseSchema,\n summary: 'Restart all active workflow runs asynchronously',\n description: 'Restarts all active workflow runs asynchronously',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId }) => {\n try {\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n await workflow.restartAllActiveWorkflowRuns();\n\n return { message: 'All active workflow runs restarted' };\n } catch (error) {\n return handleError(error, 'Error restarting workflow');\n }\n },\n});\n\nexport const RESTART_ALL_ACTIVE_WORKFLOW_RUNS_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/restart-all-active-workflow-runs',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n responseSchema: workflowControlResponseSchema,\n summary: 'Restart all active workflow runs',\n description: 'Restarts all active workflow runs',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId }) => {\n try {\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n void workflow.restartAllActiveWorkflowRuns();\n\n return { message: 'All active workflow runs restarted' };\n } catch (error) {\n return handleError(error, 'Error restarting workflow');\n }\n },\n});\n\nexport const TIME_TRAVEL_ASYNC_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/time-travel-async',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: timeTravelBodySchema,\n responseSchema: workflowExecutionResultSchema,\n summary: 'Time travel workflow asynchronously',\n description: 'Time travels a workflow run asynchronously without streaming',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to time travel workflow' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const run = await workflow.getWorkflowRunById(runId);\n\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n\n await validateRunOwnership(run, effectiveResourceId);\n\n const _run = await workflow.createRun({ runId, resourceId: run.resourceId });\n const result = await _run.timeTravel({ ...params, requestContext });\n\n return result;\n } catch (error) {\n return handleError(error, 'Error time traveling workflow');\n }\n },\n});\n\nexport const TIME_TRAVEL_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/time-travel',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: timeTravelBodySchema,\n responseSchema: workflowControlResponseSchema,\n summary: 'Time travel workflow',\n description: 'Time travels a workflow run, starting from a specific step',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to time travel workflow' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const run = await workflow.getWorkflowRunById(runId);\n\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n\n await validateRunOwnership(run, effectiveResourceId);\n\n const _run = await workflow.createRun({ runId, resourceId: run.resourceId });\n\n void _run.timeTravel({ ...params, requestContext });\n\n return { message: 'Workflow run time travel started' };\n } catch (error) {\n return handleError(error, 'Error time traveling workflow');\n }\n },\n});\n\nexport const TIME_TRAVEL_STREAM_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/time-travel-stream',\n responseType: 'stream',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: timeTravelBodySchema,\n summary: 'Time travel workflow stream',\n description: 'Time travels a workflow run, starting from a specific step, and streams the results in real-time',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to time travel workflow stream' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n // Validate ownership of existing run before time traveling\n const existingRun = await workflow.getWorkflowRunById(runId);\n if (!existingRun) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n await validateRunOwnership(existingRun, effectiveResourceId);\n\n const serverCache = mastra.getServerCache();\n\n const run = await workflow.createRun({ runId, resourceId: existingRun.resourceId });\n const result = run.timeTravelStream({ ...params, requestContext });\n return result.fullStream.pipeThrough(\n new TransformStream<ChunkType, ChunkType>({\n transform(chunk, controller) {\n if (serverCache) {\n const cacheKey = runId;\n serverCache.listPush(cacheKey, chunk).catch(() => {});\n }\n controller.enqueue(chunk);\n },\n }),\n );\n } catch (error) {\n return handleError(error, 'Error time traveling workflow stream');\n }\n },\n});\n\nexport const CANCEL_WORKFLOW_RUN_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/runs/:runId/cancel',\n responseType: 'json',\n pathParamSchema: workflowRunPathParams,\n responseSchema: workflowControlResponseSchema,\n summary: 'Cancel workflow run',\n description: 'Cancels an in-progress workflow execution',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to cancel workflow run' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const run = await workflow.getWorkflowRunById(runId);\n\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n\n await validateRunOwnership(run, effectiveResourceId);\n\n const _run = await workflow.createRun({ runId, resourceId: run.resourceId });\n\n await _run.cancel();\n\n return { message: 'Workflow run cancelled' };\n } catch (error) {\n return handleError(error, 'Error canceling workflow run');\n }\n },\n});\n\n// Legacy routes (deprecated)\nexport const STREAM_LEGACY_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/stream-legacy',\n responseType: 'stream',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: streamWorkflowBodySchema,\n responseSchema: streamResponseSchema,\n summary: '[DEPRECATED] Stream workflow with legacy format',\n description: 'Legacy endpoint for streaming workflow execution. Use /workflows/:workflowId/stream instead.',\n tags: ['Workflows', 'Legacy'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, resourceId, requestContext, ...params }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, resourceId);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to resume workflow' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const serverCache = mastra.getServerCache();\n\n const run = await workflow.createRun({ runId, resourceId: effectiveResourceId });\n const result = run.streamLegacy({\n ...params,\n requestContext,\n onChunk: async chunk => {\n if (serverCache) {\n const cacheKey = runId;\n await serverCache.listPush(cacheKey, chunk);\n }\n },\n });\n\n return result.stream;\n } catch (error) {\n return handleError(error, 'Error executing workflow');\n }\n },\n});\n\nexport const OBSERVE_STREAM_LEGACY_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/observe-stream-legacy',\n responseType: 'stream',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n responseSchema: streamResponseSchema,\n summary: '[DEPRECATED] Observe workflow stream with legacy format',\n description: 'Legacy endpoint for observing workflow stream. Use /workflows/:workflowId/observe instead.',\n tags: ['Workflows', 'Legacy'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to observe workflow stream' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const run = await workflow.getWorkflowRunById(runId);\n\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n\n await validateRunOwnership(run, effectiveResourceId);\n\n const _run = await workflow.createRun({ runId, resourceId: run.resourceId });\n const serverCache = mastra.getServerCache();\n if (!serverCache) {\n throw new HTTPException(500, { message: 'Server cache not found' });\n }\n\n const transformStream = new TransformStream<StreamEvent, StreamEvent>();\n\n const writer = transformStream.writable.getWriter();\n\n const cachedRunChunks = await serverCache.listFromTo(runId, 0);\n\n for (const chunk of cachedRunChunks) {\n await writer.write(chunk as any);\n }\n\n writer.releaseLock();\n\n const result = _run.observeStreamLegacy();\n return result.stream?.pipeThrough(transformStream);\n } catch (error) {\n return handleError(error, 'Error observing workflow stream');\n }\n },\n});\n"]}
1
+ {"version":3,"sources":["../src/server/handlers/workflows.ts"],"names":["__export","HTTPException","WorkflowRegistry","createRoute","z","listWorkflowsResponseSchema","getWorkflowInfo","handleError","workflowIdPathParams","workflowInfoSchema","listWorkflowRunsQuerySchema","workflowRunsResponseSchema","getEffectiveResourceId","workflowRunPathParams","workflowRunResultQuerySchema","workflowRunResultSchema","validateRunOwnership","workflowControlResponseSchema","optionalRunIdSchema","createWorkflowRunBodySchema","createWorkflowRunResponseSchema","runIdSchema","streamWorkflowBodySchema","TransformStream","resumeBodySchema","streamResponseSchema","startAsyncWorkflowBodySchema","workflowExecutionResultSchema","ReadableStream","restartBodySchema","timeTravelBodySchema"],"mappings":";;;;;;;;;;;;;;;AAAA,IAAA,iBAAA,GAAA;AAAAA,0BAAA,CAAA,iBAAA,EAAA;AAAA,EAAA,yBAAA,EAAA,MAAA,yBAAA;AAAA,EAAA,yBAAA,EAAA,MAAA,yBAAA;AAAA,EAAA,+BAAA,EAAA,MAAA,+BAAA;AAAA,EAAA,wBAAA,EAAA,MAAA,wBAAA;AAAA,EAAA,4BAAA,EAAA,MAAA,4BAAA;AAAA,EAAA,oBAAA,EAAA,MAAA,oBAAA;AAAA,EAAA,wBAAA,EAAA,MA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AAEA,MAAA,MAAA,CAAO,WAAA,EAAY;AAEnB,MAAA,MAAM,MAAA,GAAS,KAAK,mBAAA,EAAoB;AACxC,MAAA,OAAO,MAAA,CAAO,MAAA,EAAQ,WAAA,CAAY,eAAe,CAAA;AAAA,IACnD,SAAS,KAAA,EAAO;AACd,MAAA,OAAOhB,6BAAA,CAAY,OAAO,iCAAiC,CAAA;AAAA,IAC7D;AAAA,EACF;AACF,CAAC","file":"chunk-3W54ZNYP.cjs","sourcesContent":["import { ReadableStream, TransformStream } from 'node:stream/web';\nimport type { RequestContext } from '@mastra/core/di';\nimport type { WorkflowInfo, ChunkType, StreamEvent, WorkflowStateField } from '@mastra/core/workflows';\nimport { z } from 'zod/v4';\nimport { HTTPException } from '../http-exception';\nimport { streamResponseSchema } from '../schemas/agents';\nimport { optionalRunIdSchema, runIdSchema } from '../schemas/common';\nimport {\n createWorkflowRunBodySchema,\n createWorkflowRunResponseSchema,\n listWorkflowRunsQuerySchema,\n listWorkflowsResponseSchema,\n restartBodySchema,\n timeTravelBodySchema,\n resumeBodySchema,\n startAsyncWorkflowBodySchema,\n streamWorkflowBodySchema,\n workflowControlResponseSchema,\n workflowExecutionResultSchema,\n workflowIdPathParams,\n workflowInfoSchema,\n workflowRunPathParams,\n workflowRunsResponseSchema,\n workflowRunResultQuerySchema,\n workflowRunResultSchema,\n} from '../schemas/workflows';\nimport { createRoute } from '../server-adapter/routes/route-builder';\nimport type { Context } from '../types';\nimport { getWorkflowInfo, WorkflowRegistry } from '../utils';\nimport { handleError } from './error';\nimport { getEffectiveResourceId, validateRunOwnership } from './utils';\n\nexport interface WorkflowContext extends Context {\n workflowId?: string;\n runId?: string;\n requestContext?: RequestContext;\n}\n\nasync function listWorkflowsFromSystem({ mastra, workflowId }: WorkflowContext) {\n const logger = mastra.getLogger();\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n let workflow;\n\n // First check registry for temporary workflows\n workflow = WorkflowRegistry.getWorkflow(workflowId);\n\n if (!workflow) {\n try {\n workflow = mastra.getWorkflowById(workflowId);\n } catch (error) {\n logger.debug('Error getting workflow, searching agents for workflow', error);\n }\n }\n\n if (!workflow) {\n logger.debug('Workflow not found, searching agents for workflow', { workflowId });\n const agents = mastra.listAgents();\n\n if (Object.keys(agents || {}).length) {\n for (const [_, agent] of Object.entries(agents)) {\n try {\n const workflows = await agent.listWorkflows();\n\n if (workflows[workflowId]) {\n workflow = workflows[workflowId];\n break;\n }\n } catch (error) {\n logger.debug('Error getting workflow from agent', error);\n }\n }\n }\n }\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n return { workflow };\n}\n\n// ============================================================================\n// Route Definitions (new pattern - handlers defined inline with createRoute)\n// ============================================================================\n\nexport const LIST_WORKFLOWS_ROUTE = createRoute({\n method: 'GET',\n path: '/workflows',\n responseType: 'json',\n queryParamSchema: z.object({\n partial: z.string().optional(),\n }),\n responseSchema: listWorkflowsResponseSchema,\n summary: 'List all workflows',\n description: 'Returns a list of all available workflows in the system',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: (async ({ mastra, partial }: any) => {\n try {\n const workflows = mastra.listWorkflows({ serialized: false });\n const isPartial = partial === 'true';\n const _workflows = Object.entries(workflows).reduce<Record<string, WorkflowInfo>>((acc, [key, workflow]) => {\n acc[key] = getWorkflowInfo(workflow as any, isPartial);\n return acc;\n }, {});\n return _workflows;\n } catch (error) {\n return handleError(error, 'Error getting workflows');\n }\n }) as any,\n});\n\nexport const GET_WORKFLOW_BY_ID_ROUTE = createRoute({\n method: 'GET',\n path: '/workflows/:workflowId',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n responseSchema: workflowInfoSchema,\n summary: 'Get workflow by ID',\n description: 'Returns details for a specific workflow',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: (async ({ mastra, workflowId }: any) => {\n try {\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n return getWorkflowInfo(workflow);\n } catch (error) {\n return handleError(error, 'Error getting workflow');\n }\n }) as any,\n});\n\nexport const LIST_WORKFLOW_RUNS_ROUTE = createRoute({\n method: 'GET',\n path: '/workflows/:workflowId/runs',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: listWorkflowRunsQuerySchema,\n responseSchema: workflowRunsResponseSchema,\n summary: 'List workflow runs',\n description: 'Returns a paginated list of execution runs for the specified workflow',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({\n mastra,\n workflowId,\n fromDate,\n toDate,\n page,\n perPage,\n limit,\n offset,\n resourceId,\n status,\n requestContext,\n }) => {\n try {\n // Use effective resourceId (context key takes precedence over client-provided value)\n const effectiveResourceId = getEffectiveResourceId(requestContext, resourceId);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n // Support both page/perPage and limit/offset for backwards compatibility\n // If page/perPage provided, use directly; otherwise convert from limit/offset\n let finalPage = page;\n let finalPerPage = perPage;\n\n if (finalPerPage === undefined && limit !== undefined) {\n finalPerPage = limit;\n }\n if (finalPage === undefined && offset !== undefined && finalPerPage !== undefined && finalPerPage > 0) {\n finalPage = Math.floor(offset / finalPerPage);\n }\n\n if (\n finalPerPage !== undefined &&\n (typeof finalPerPage !== 'number' || !Number.isInteger(finalPerPage) || finalPerPage <= 0)\n ) {\n throw new HTTPException(400, { message: 'perPage must be a positive integer' });\n }\n if (finalPage !== undefined && (!Number.isInteger(finalPage) || finalPage < 0)) {\n throw new HTTPException(400, { message: 'page must be a non-negative integer' });\n }\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n const workflowRuns = (await workflow.listWorkflowRuns({\n fromDate: fromDate ? (typeof fromDate === 'string' ? new Date(fromDate) : fromDate) : undefined,\n toDate: toDate ? (typeof toDate === 'string' ? new Date(toDate) : toDate) : undefined,\n perPage: finalPerPage,\n page: finalPage,\n resourceId: effectiveResourceId,\n status,\n })) || {\n runs: [],\n total: 0,\n };\n return workflowRuns;\n } catch (error) {\n return handleError(error, 'Error getting workflow runs');\n }\n },\n});\n\nexport const GET_WORKFLOW_RUN_BY_ID_ROUTE = createRoute({\n method: 'GET',\n path: '/workflows/:workflowId/runs/:runId',\n responseType: 'json',\n pathParamSchema: workflowRunPathParams,\n queryParamSchema: workflowRunResultQuerySchema,\n responseSchema: workflowRunResultSchema,\n summary: 'Get workflow run by ID',\n description:\n 'Returns a workflow run with metadata and processed execution state. Use the fields query parameter to reduce payload size by requesting only specific fields (e.g., ?fields=status,result,metadata)',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, fields, withNestedWorkflows, requestContext }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'Run ID is required' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n // Parse fields parameter (comma-separated string)\n const fieldList = fields ? (fields.split(',').map((f: string) => f.trim()) as WorkflowStateField[]) : undefined;\n\n const run = await workflow.getWorkflowRunById(runId, {\n withNestedWorkflows: withNestedWorkflows !== 'false', // Default to true unless explicitly 'false'\n fields: fieldList,\n });\n\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n\n await validateRunOwnership(run, effectiveResourceId);\n\n return run;\n } catch (error) {\n return handleError(error, 'Error getting workflow run');\n }\n },\n});\n\nexport const DELETE_WORKFLOW_RUN_BY_ID_ROUTE = createRoute({\n method: 'DELETE',\n path: '/workflows/:workflowId/runs/:runId',\n responseType: 'json',\n pathParamSchema: workflowRunPathParams,\n responseSchema: workflowControlResponseSchema,\n summary: 'Delete workflow run by ID',\n description: 'Deletes a specific workflow run by ID',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'Run ID is required' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n // Validate ownership before deletion\n const run = await workflow.getWorkflowRunById(runId);\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n await validateRunOwnership(run, effectiveResourceId);\n\n await workflow.deleteWorkflowRunById(runId);\n\n return { message: 'Workflow run deleted' };\n } catch (error) {\n return handleError(error, 'Error deleting workflow run');\n }\n },\n});\n\nexport const CREATE_WORKFLOW_RUN_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/create-run',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: optionalRunIdSchema,\n bodySchema: createWorkflowRunBodySchema,\n responseSchema: createWorkflowRunResponseSchema,\n summary: 'Create workflow run',\n description: 'Creates a new workflow execution instance with an optional custom run ID',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, resourceId, disableScorers, requestContext }) => {\n try {\n // Use effective resourceId (context key takes precedence over client-provided value)\n const effectiveResourceId = getEffectiveResourceId(requestContext, resourceId);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const run = await workflow.createRun({ runId, resourceId: effectiveResourceId, disableScorers });\n\n return { runId: run.runId };\n } catch (error) {\n return handleError(error, 'Error creating workflow run');\n }\n },\n});\n\nexport const STREAM_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/stream',\n responseType: 'stream',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: streamWorkflowBodySchema,\n summary: 'Stream workflow execution',\n description: 'Executes a workflow and streams the results in real-time',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, resourceId, requestContext, ...params }) => {\n try {\n // Use effective resourceId (context key takes precedence over client-provided value)\n const effectiveResourceId = getEffectiveResourceId(requestContext, resourceId);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to stream workflow' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n const serverCache = mastra.getServerCache();\n\n const run = await workflow.createRun({ runId, resourceId: effectiveResourceId });\n const result = run.stream({ ...params, requestContext });\n return result.fullStream.pipeThrough(\n new TransformStream<ChunkType, ChunkType>({\n transform(chunk, controller) {\n if (serverCache) {\n const cacheKey = runId;\n serverCache.listPush(cacheKey, chunk).catch(() => {});\n }\n controller.enqueue(chunk);\n },\n }),\n );\n } catch (error) {\n return handleError(error, 'Error streaming workflow');\n }\n },\n});\n\nexport const RESUME_STREAM_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/resume-stream',\n responseType: 'stream',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: resumeBodySchema,\n responseSchema: streamResponseSchema,\n summary: 'Resume workflow stream',\n description: 'Resumes a suspended workflow execution and continues streaming results',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to resume workflow' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const run = await workflow.getWorkflowRunById(runId);\n\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n\n await validateRunOwnership(run, effectiveResourceId);\n\n const _run = await workflow.createRun({ runId, resourceId: run.resourceId });\n const serverCache = mastra.getServerCache();\n\n const stream = _run.resumeStream({ ...params, requestContext }).fullStream.pipeThrough(\n new TransformStream<ChunkType, ChunkType>({\n transform(chunk, controller) {\n if (serverCache) {\n const cacheKey = runId;\n serverCache.listPush(cacheKey, chunk).catch(() => {});\n }\n\n controller.enqueue(chunk);\n },\n }),\n );\n\n return stream;\n } catch (error) {\n return handleError(error, 'Error resuming workflow');\n }\n },\n});\n\nexport const START_ASYNC_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/start-async',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: optionalRunIdSchema,\n bodySchema: startAsyncWorkflowBodySchema,\n responseSchema: workflowExecutionResultSchema,\n summary: 'Start workflow asynchronously',\n description: 'Starts a workflow execution asynchronously without streaming results',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, resourceId, requestContext, ...params }) => {\n try {\n // Use effective resourceId (context key takes precedence over client-provided value)\n const effectiveResourceId = getEffectiveResourceId(requestContext, resourceId);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const _run = await workflow.createRun({ runId, resourceId: effectiveResourceId });\n const result = await _run.start({ ...params, requestContext });\n return result;\n } catch (error) {\n return handleError(error, 'Error starting async workflow');\n }\n },\n});\n\nexport const START_WORKFLOW_RUN_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/start',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: startAsyncWorkflowBodySchema,\n responseSchema: workflowControlResponseSchema,\n summary: 'Start specific workflow run',\n description: 'Starts execution of a specific workflow run by ID',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to start run' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const run = await workflow.getWorkflowRunById(runId);\n\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n\n await validateRunOwnership(run, effectiveResourceId);\n\n const _run = await workflow.createRun({ runId, resourceId: run.resourceId });\n void _run.start({\n ...params,\n requestContext,\n });\n\n return { message: 'Workflow run started' };\n } catch (e) {\n return handleError(e, 'Error starting workflow run');\n }\n },\n});\n\nexport const OBSERVE_STREAM_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/observe',\n responseType: 'stream',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n responseSchema: streamResponseSchema,\n summary: 'Observe workflow stream',\n description: 'Observes and streams updates from an already running workflow execution',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to observe workflow stream' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const run = await workflow.getWorkflowRunById(runId);\n\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n\n await validateRunOwnership(run, effectiveResourceId);\n\n const _run = await workflow.createRun({ runId, resourceId: run.resourceId });\n const serverCache = mastra.getServerCache();\n if (!serverCache) {\n throw new HTTPException(500, { message: 'Server cache not found' });\n }\n\n // Get cached chunks first\n const cachedRunChunks = await serverCache.listFromTo(runId, 0);\n\n // Create a readable stream that first emits cached chunks, then the live stream\n const combinedStream = new ReadableStream<ChunkType>({\n start(controller) {\n // First, emit all cached chunks\n const emitCachedChunks = async () => {\n for (const chunk of cachedRunChunks) {\n controller.enqueue(chunk as ChunkType);\n }\n };\n\n // Then, pipe the live stream\n const liveStream = _run.observeStream();\n const reader = liveStream.getReader();\n\n const pump = async () => {\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n controller.close();\n break;\n }\n controller.enqueue(value);\n }\n } catch (error) {\n controller.error(error);\n } finally {\n reader.releaseLock();\n }\n };\n\n // Start with cached chunks, then live stream\n void emitCachedChunks()\n .then(() => {\n void pump();\n })\n .catch(error => {\n controller.error(error);\n });\n },\n });\n\n return combinedStream;\n } catch (error) {\n return handleError(error, 'Error observing workflow stream');\n }\n },\n});\n\nexport const RESUME_ASYNC_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/resume-async',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: resumeBodySchema,\n responseSchema: workflowExecutionResultSchema,\n summary: 'Resume workflow asynchronously',\n description: 'Resumes a suspended workflow execution asynchronously without streaming',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to resume workflow' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const run = await workflow.getWorkflowRunById(runId);\n\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n\n await validateRunOwnership(run, effectiveResourceId);\n\n const _run = await workflow.createRun({ runId, resourceId: run.resourceId });\n const result = await _run.resume({ ...params, requestContext });\n\n return result;\n } catch (error) {\n return handleError(error, 'Error resuming workflow step');\n }\n },\n});\n\nexport const RESUME_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/resume',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: resumeBodySchema,\n responseSchema: workflowControlResponseSchema,\n summary: 'Resume workflow',\n description: 'Resumes a suspended workflow execution from a specific step',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to resume workflow' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const run = await workflow.getWorkflowRunById(runId);\n\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n\n await validateRunOwnership(run, effectiveResourceId);\n\n const _run = await workflow.createRun({ runId, resourceId: run.resourceId });\n\n void _run.resume({ ...params, requestContext });\n\n return { message: 'Workflow run resumed' };\n } catch (error) {\n return handleError(error, 'Error resuming workflow');\n }\n },\n});\n\nexport const RESTART_ASYNC_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/restart-async',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: restartBodySchema,\n responseSchema: workflowExecutionResultSchema,\n summary: 'Restart workflow asynchronously',\n description: 'Restarts an active workflow execution asynchronously',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to restart workflow' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const run = await workflow.getWorkflowRunById(runId);\n\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n\n await validateRunOwnership(run, effectiveResourceId);\n\n const _run = await workflow.createRun({ runId, resourceId: run.resourceId });\n const result = await _run.restart({ ...params, requestContext });\n\n return result;\n } catch (error) {\n return handleError(error, 'Error restarting workflow');\n }\n },\n});\n\nexport const RESTART_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/restart',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: restartBodySchema,\n responseSchema: workflowControlResponseSchema,\n summary: 'Restart workflow',\n description: 'Restarts an active workflow execution',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to restart workflow' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const run = await workflow.getWorkflowRunById(runId);\n\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n\n await validateRunOwnership(run, effectiveResourceId);\n\n const _run = await workflow.createRun({ runId, resourceId: run.resourceId });\n\n void _run.restart({ ...params, requestContext });\n\n return { message: 'Workflow run restarted' };\n } catch (error) {\n return handleError(error, 'Error restarting workflow');\n }\n },\n});\n\nexport const RESTART_ALL_ACTIVE_WORKFLOW_RUNS_ASYNC_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/restart-all-active-workflow-runs-async',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n responseSchema: workflowControlResponseSchema,\n summary: 'Restart all active workflow runs asynchronously',\n description: 'Restarts all active workflow runs asynchronously',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId }) => {\n try {\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n await workflow.restartAllActiveWorkflowRuns();\n\n return { message: 'All active workflow runs restarted' };\n } catch (error) {\n return handleError(error, 'Error restarting workflow');\n }\n },\n});\n\nexport const RESTART_ALL_ACTIVE_WORKFLOW_RUNS_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/restart-all-active-workflow-runs',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n responseSchema: workflowControlResponseSchema,\n summary: 'Restart all active workflow runs',\n description: 'Restarts all active workflow runs',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId }) => {\n try {\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n void workflow.restartAllActiveWorkflowRuns();\n\n return { message: 'All active workflow runs restarted' };\n } catch (error) {\n return handleError(error, 'Error restarting workflow');\n }\n },\n});\n\nexport const TIME_TRAVEL_ASYNC_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/time-travel-async',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: timeTravelBodySchema,\n responseSchema: workflowExecutionResultSchema,\n summary: 'Time travel workflow asynchronously',\n description: 'Time travels a workflow run asynchronously without streaming',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to time travel workflow' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const run = await workflow.getWorkflowRunById(runId);\n\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n\n await validateRunOwnership(run, effectiveResourceId);\n\n const _run = await workflow.createRun({ runId, resourceId: run.resourceId });\n const result = await _run.timeTravel({ ...params, requestContext });\n\n return result;\n } catch (error) {\n return handleError(error, 'Error time traveling workflow');\n }\n },\n});\n\nexport const TIME_TRAVEL_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/time-travel',\n responseType: 'json',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: timeTravelBodySchema,\n responseSchema: workflowControlResponseSchema,\n summary: 'Time travel workflow',\n description: 'Time travels a workflow run, starting from a specific step',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to time travel workflow' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const run = await workflow.getWorkflowRunById(runId);\n\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n\n await validateRunOwnership(run, effectiveResourceId);\n\n const _run = await workflow.createRun({ runId, resourceId: run.resourceId });\n\n void _run.timeTravel({ ...params, requestContext });\n\n return { message: 'Workflow run time travel started' };\n } catch (error) {\n return handleError(error, 'Error time traveling workflow');\n }\n },\n});\n\nexport const TIME_TRAVEL_STREAM_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/time-travel-stream',\n responseType: 'stream',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: timeTravelBodySchema,\n summary: 'Time travel workflow stream',\n description: 'Time travels a workflow run, starting from a specific step, and streams the results in real-time',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to time travel workflow stream' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n // Validate ownership of existing run before time traveling\n const existingRun = await workflow.getWorkflowRunById(runId);\n if (!existingRun) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n await validateRunOwnership(existingRun, effectiveResourceId);\n\n const serverCache = mastra.getServerCache();\n\n const run = await workflow.createRun({ runId, resourceId: existingRun.resourceId });\n const result = run.timeTravelStream({ ...params, requestContext });\n return result.fullStream.pipeThrough(\n new TransformStream<ChunkType, ChunkType>({\n transform(chunk, controller) {\n if (serverCache) {\n const cacheKey = runId;\n serverCache.listPush(cacheKey, chunk).catch(() => {});\n }\n controller.enqueue(chunk);\n },\n }),\n );\n } catch (error) {\n return handleError(error, 'Error time traveling workflow stream');\n }\n },\n});\n\nexport const CANCEL_WORKFLOW_RUN_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/runs/:runId/cancel',\n responseType: 'json',\n pathParamSchema: workflowRunPathParams,\n responseSchema: workflowControlResponseSchema,\n summary: 'Cancel workflow run',\n description: 'Cancels an in-progress workflow execution',\n tags: ['Workflows'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to cancel workflow run' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const run = await workflow.getWorkflowRunById(runId);\n\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n\n await validateRunOwnership(run, effectiveResourceId);\n\n const _run = await workflow.createRun({ runId, resourceId: run.resourceId });\n\n await _run.cancel();\n\n return { message: 'Workflow run cancelled' };\n } catch (error) {\n return handleError(error, 'Error canceling workflow run');\n }\n },\n});\n\n// Legacy routes (deprecated)\nexport const STREAM_LEGACY_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/stream-legacy',\n responseType: 'stream',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: streamWorkflowBodySchema,\n responseSchema: streamResponseSchema,\n summary: '[DEPRECATED] Stream workflow with legacy format',\n description: 'Legacy endpoint for streaming workflow execution. Use /workflows/:workflowId/stream instead.',\n tags: ['Workflows', 'Legacy'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, resourceId, requestContext, ...params }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, resourceId);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to resume workflow' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const serverCache = mastra.getServerCache();\n\n const run = await workflow.createRun({ runId, resourceId: effectiveResourceId });\n const result = run.streamLegacy({\n ...params,\n requestContext,\n onChunk: async chunk => {\n if (serverCache) {\n const cacheKey = runId;\n await serverCache.listPush(cacheKey, chunk);\n }\n },\n });\n\n return result.stream;\n } catch (error) {\n return handleError(error, 'Error executing workflow');\n }\n },\n});\n\nexport const OBSERVE_STREAM_LEGACY_WORKFLOW_ROUTE = createRoute({\n method: 'POST',\n path: '/workflows/:workflowId/observe-stream-legacy',\n responseType: 'stream',\n pathParamSchema: workflowIdPathParams,\n queryParamSchema: runIdSchema,\n responseSchema: streamResponseSchema,\n summary: '[DEPRECATED] Observe workflow stream with legacy format',\n description: 'Legacy endpoint for observing workflow stream. Use /workflows/:workflowId/observe instead.',\n tags: ['Workflows', 'Legacy'],\n requiresAuth: true,\n handler: async ({ mastra, workflowId, runId, requestContext }) => {\n try {\n const effectiveResourceId = getEffectiveResourceId(requestContext, undefined);\n\n if (!workflowId) {\n throw new HTTPException(400, { message: 'Workflow ID is required' });\n }\n\n if (!runId) {\n throw new HTTPException(400, { message: 'runId required to observe workflow stream' });\n }\n\n const { workflow } = await listWorkflowsFromSystem({ mastra, workflowId });\n\n if (!workflow) {\n throw new HTTPException(404, { message: 'Workflow not found' });\n }\n\n const run = await workflow.getWorkflowRunById(runId);\n\n if (!run) {\n throw new HTTPException(404, { message: 'Workflow run not found' });\n }\n\n await validateRunOwnership(run, effectiveResourceId);\n\n const _run = await workflow.createRun({ runId, resourceId: run.resourceId });\n const serverCache = mastra.getServerCache();\n if (!serverCache) {\n throw new HTTPException(500, { message: 'Server cache not found' });\n }\n\n const transformStream = new TransformStream<StreamEvent, StreamEvent>();\n\n const writer = transformStream.writable.getWriter();\n\n const cachedRunChunks = await serverCache.listFromTo(runId, 0);\n\n for (const chunk of cachedRunChunks) {\n await writer.write(chunk as any);\n }\n\n writer.releaseLock();\n\n const result = _run.observeStreamLegacy();\n return result.stream?.pipeThrough(transformStream);\n } catch (error) {\n return handleError(error, 'Error observing workflow stream');\n }\n },\n});\n"]}
@@ -10,7 +10,7 @@ var processors = require('@mastra/core/processors');
10
10
  var crypto$1 = require('crypto');
11
11
  var async_hooks = require('async_hooks');
12
12
 
13
- // ../memory/dist/chunk-JJBSFPC5.js
13
+ // ../memory/dist/chunk-T5FHEWK6.js
14
14
 
15
15
  // ../../node_modules/.pnpm/xxhash-wasm@1.1.0/node_modules/xxhash-wasm/esm/xxhash-wasm.js
16
16
  var t = new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 48, 8, 96, 3, 127, 127, 127, 1, 127, 96, 3, 127, 127, 127, 0, 96, 2, 127, 127, 0, 96, 1, 127, 1, 127, 96, 3, 127, 127, 126, 1, 126, 96, 3, 126, 127, 127, 1, 126, 96, 2, 127, 126, 0, 96, 1, 127, 1, 126, 3, 11, 10, 0, 0, 2, 1, 3, 4, 5, 6, 1, 7, 5, 3, 1, 0, 1, 7, 85, 9, 3, 109, 101, 109, 2, 0, 5, 120, 120, 104, 51, 50, 0, 0, 6, 105, 110, 105, 116, 51, 50, 0, 2, 8, 117, 112, 100, 97, 116, 101, 51, 50, 0, 3, 8, 100, 105, 103, 101, 115, 116, 51, 50, 0, 4, 5, 120, 120, 104, 54, 52, 0, 5, 6, 105, 110, 105, 116, 54, 52, 0, 7, 8, 117, 112, 100, 97, 116, 101, 54, 52, 0, 8, 8, 100, 105, 103, 101, 115, 116, 54, 52, 0, 9, 10, 251, 22, 10, 242, 1, 1, 4, 127, 32, 0, 32, 1, 106, 33, 3, 32, 1, 65, 16, 79, 4, 127, 32, 3, 65, 16, 107, 33, 6, 32, 2, 65, 168, 136, 141, 161, 2, 106, 33, 3, 32, 2, 65, 137, 235, 208, 208, 7, 107, 33, 4, 32, 2, 65, 207, 140, 162, 142, 6, 106, 33, 5, 3, 64, 32, 3, 32, 0, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 33, 3, 32, 4, 32, 0, 65, 4, 106, 34, 0, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 33, 4, 32, 2, 32, 0, 65, 4, 106, 34, 0, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 33, 2, 32, 5, 32, 0, 65, 4, 106, 34, 0, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 33, 5, 32, 6, 32, 0, 65, 4, 106, 34, 0, 79, 13, 0, 11, 32, 2, 65, 12, 119, 32, 5, 65, 18, 119, 106, 32, 4, 65, 7, 119, 106, 32, 3, 65, 1, 119, 106, 5, 32, 2, 65, 177, 207, 217, 178, 1, 106, 11, 32, 1, 106, 32, 0, 32, 1, 65, 15, 113, 16, 1, 11, 146, 1, 0, 32, 1, 32, 2, 106, 33, 2, 3, 64, 32, 1, 65, 4, 106, 32, 2, 75, 69, 4, 64, 32, 0, 32, 1, 40, 2, 0, 65, 189, 220, 202, 149, 124, 108, 106, 65, 17, 119, 65, 175, 214, 211, 190, 2, 108, 33, 0, 32, 1, 65, 4, 106, 33, 1, 12, 1, 11, 11, 3, 64, 32, 1, 32, 2, 79, 69, 4, 64, 32, 0, 32, 1, 45, 0, 0, 65, 177, 207, 217, 178, 1, 108, 106, 65, 11, 119, 65, 177, 243, 221, 241, 121, 108, 33, 0, 32, 1, 65, 1, 106, 33, 1, 12, 1, 11, 11, 32, 0, 32, 0, 65, 15, 118, 115, 65, 247, 148, 175, 175, 120, 108, 34, 0, 65, 13, 118, 32, 0, 115, 65, 189, 220, 202, 149, 124, 108, 34, 0, 65, 16, 118, 32, 0, 115, 11, 63, 0, 32, 0, 65, 8, 106, 32, 1, 65, 168, 136, 141, 161, 2, 106, 54, 2, 0, 32, 0, 65, 12, 106, 32, 1, 65, 137, 235, 208, 208, 7, 107, 54, 2, 0, 32, 0, 65, 16, 106, 32, 1, 54, 2, 0, 32, 0, 65, 20, 106, 32, 1, 65, 207, 140, 162, 142, 6, 106, 54, 2, 0, 11, 195, 4, 1, 6, 127, 32, 1, 32, 2, 106, 33, 6, 32, 0, 65, 24, 106, 33, 4, 32, 0, 65, 40, 106, 40, 2, 0, 33, 3, 32, 0, 32, 0, 40, 2, 0, 32, 2, 106, 54, 2, 0, 32, 0, 65, 4, 106, 34, 5, 32, 5, 40, 2, 0, 32, 2, 65, 16, 79, 32, 0, 40, 2, 0, 65, 16, 79, 114, 114, 54, 2, 0, 32, 2, 32, 3, 106, 65, 16, 73, 4, 64, 32, 3, 32, 4, 106, 32, 1, 32, 2, 252, 10, 0, 0, 32, 0, 65, 40, 106, 32, 2, 32, 3, 106, 54, 2, 0, 15, 11, 32, 3, 4, 64, 32, 3, 32, 4, 106, 32, 1, 65, 16, 32, 3, 107, 34, 2, 252, 10, 0, 0, 32, 0, 65, 8, 106, 34, 3, 32, 3, 40, 2, 0, 32, 4, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 54, 2, 0, 32, 0, 65, 12, 106, 34, 3, 32, 3, 40, 2, 0, 32, 4, 65, 4, 106, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 54, 2, 0, 32, 0, 65, 16, 106, 34, 3, 32, 3, 40, 2, 0, 32, 4, 65, 8, 106, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 54, 2, 0, 32, 0, 65, 20, 106, 34, 3, 32, 3, 40, 2, 0, 32, 4, 65, 12, 106, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 54, 2, 0, 32, 0, 65, 40, 106, 65, 0, 54, 2, 0, 32, 1, 32, 2, 106, 33, 1, 11, 32, 1, 32, 6, 65, 16, 107, 77, 4, 64, 32, 6, 65, 16, 107, 33, 8, 32, 0, 65, 8, 106, 40, 2, 0, 33, 2, 32, 0, 65, 12, 106, 40, 2, 0, 33, 3, 32, 0, 65, 16, 106, 40, 2, 0, 33, 5, 32, 0, 65, 20, 106, 40, 2, 0, 33, 7, 3, 64, 32, 2, 32, 1, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 33, 2, 32, 3, 32, 1, 65, 4, 106, 34, 1, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 33, 3, 32, 5, 32, 1, 65, 4, 106, 34, 1, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 33, 5, 32, 7, 32, 1, 65, 4, 106, 34, 1, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 33, 7, 32, 8, 32, 1, 65, 4, 106, 34, 1, 79, 13, 0, 11, 32, 0, 65, 8, 106, 32, 2, 54, 2, 0, 32, 0, 65, 12, 106, 32, 3, 54, 2, 0, 32, 0, 65, 16, 106, 32, 5, 54, 2, 0, 32, 0, 65, 20, 106, 32, 7, 54, 2, 0, 11, 32, 1, 32, 6, 73, 4, 64, 32, 4, 32, 1, 32, 6, 32, 1, 107, 34, 1, 252, 10, 0, 0, 32, 0, 65, 40, 106, 32, 1, 54, 2, 0, 11, 11, 97, 1, 1, 127, 32, 0, 65, 16, 106, 40, 2, 0, 33, 1, 32, 0, 65, 4, 106, 40, 2, 0, 4, 127, 32, 1, 65, 12, 119, 32, 0, 65, 20, 106, 40, 2, 0, 65, 18, 119, 106, 32, 0, 65, 12, 106, 40, 2, 0, 65, 7, 119, 106, 32, 0, 65, 8, 106, 40, 2, 0, 65, 1, 119, 106, 5, 32, 1, 65, 177, 207, 217, 178, 1, 106, 11, 32, 0, 40, 2, 0, 106, 32, 0, 65, 24, 106, 32, 0, 65, 40, 106, 40, 2, 0, 16, 1, 11, 255, 3, 2, 3, 126, 1, 127, 32, 0, 32, 1, 106, 33, 6, 32, 1, 65, 32, 79, 4, 126, 32, 6, 65, 32, 107, 33, 6, 32, 2, 66, 214, 235, 130, 238, 234, 253, 137, 245, 224, 0, 124, 33, 3, 32, 2, 66, 177, 169, 172, 193, 173, 184, 212, 166, 61, 125, 33, 4, 32, 2, 66, 249, 234, 208, 208, 231, 201, 161, 228, 225, 0, 124, 33, 5, 3, 64, 32, 3, 32, 0, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 3, 32, 4, 32, 0, 65, 8, 106, 34, 0, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 4, 32, 2, 32, 0, 65, 8, 106, 34, 0, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 2, 32, 5, 32, 0, 65, 8, 106, 34, 0, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 5, 32, 6, 32, 0, 65, 8, 106, 34, 0, 79, 13, 0, 11, 32, 2, 66, 12, 137, 32, 5, 66, 18, 137, 124, 32, 4, 66, 7, 137, 124, 32, 3, 66, 1, 137, 124, 32, 3, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 32, 4, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 32, 2, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 32, 5, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 5, 32, 2, 66, 197, 207, 217, 178, 241, 229, 186, 234, 39, 124, 11, 32, 1, 173, 124, 32, 0, 32, 1, 65, 31, 113, 16, 6, 11, 134, 2, 0, 32, 1, 32, 2, 106, 33, 2, 3, 64, 32, 2, 32, 1, 65, 8, 106, 79, 4, 64, 32, 1, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 32, 0, 133, 66, 27, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 33, 0, 32, 1, 65, 8, 106, 33, 1, 12, 1, 11, 11, 32, 1, 65, 4, 106, 32, 2, 77, 4, 64, 32, 0, 32, 1, 53, 2, 0, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 23, 137, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 249, 243, 221, 241, 153, 246, 153, 171, 22, 124, 33, 0, 32, 1, 65, 4, 106, 33, 1, 11, 3, 64, 32, 1, 32, 2, 73, 4, 64, 32, 0, 32, 1, 49, 0, 0, 66, 197, 207, 217, 178, 241, 229, 186, 234, 39, 126, 133, 66, 11, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 0, 32, 1, 65, 1, 106, 33, 1, 12, 1, 11, 11, 32, 0, 32, 0, 66, 33, 136, 133, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 34, 0, 32, 0, 66, 29, 136, 133, 66, 249, 243, 221, 241, 153, 246, 153, 171, 22, 126, 34, 0, 32, 0, 66, 32, 136, 133, 11, 77, 0, 32, 0, 65, 8, 106, 32, 1, 66, 214, 235, 130, 238, 234, 253, 137, 245, 224, 0, 124, 55, 3, 0, 32, 0, 65, 16, 106, 32, 1, 66, 177, 169, 172, 193, 173, 184, 212, 166, 61, 125, 55, 3, 0, 32, 0, 65, 24, 106, 32, 1, 55, 3, 0, 32, 0, 65, 32, 106, 32, 1, 66, 249, 234, 208, 208, 231, 201, 161, 228, 225, 0, 124, 55, 3, 0, 11, 244, 4, 2, 3, 127, 4, 126, 32, 1, 32, 2, 106, 33, 5, 32, 0, 65, 40, 106, 33, 4, 32, 0, 65, 200, 0, 106, 40, 2, 0, 33, 3, 32, 0, 32, 0, 41, 3, 0, 32, 2, 173, 124, 55, 3, 0, 32, 2, 32, 3, 106, 65, 32, 73, 4, 64, 32, 3, 32, 4, 106, 32, 1, 32, 2, 252, 10, 0, 0, 32, 0, 65, 200, 0, 106, 32, 2, 32, 3, 106, 54, 2, 0, 15, 11, 32, 3, 4, 64, 32, 3, 32, 4, 106, 32, 1, 65, 32, 32, 3, 107, 34, 2, 252, 10, 0, 0, 32, 0, 65, 8, 106, 34, 3, 32, 3, 41, 3, 0, 32, 4, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 55, 3, 0, 32, 0, 65, 16, 106, 34, 3, 32, 3, 41, 3, 0, 32, 4, 65, 8, 106, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 55, 3, 0, 32, 0, 65, 24, 106, 34, 3, 32, 3, 41, 3, 0, 32, 4, 65, 16, 106, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 55, 3, 0, 32, 0, 65, 32, 106, 34, 3, 32, 3, 41, 3, 0, 32, 4, 65, 24, 106, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 55, 3, 0, 32, 0, 65, 200, 0, 106, 65, 0, 54, 2, 0, 32, 1, 32, 2, 106, 33, 1, 11, 32, 1, 65, 32, 106, 32, 5, 77, 4, 64, 32, 5, 65, 32, 107, 33, 2, 32, 0, 65, 8, 106, 41, 3, 0, 33, 6, 32, 0, 65, 16, 106, 41, 3, 0, 33, 7, 32, 0, 65, 24, 106, 41, 3, 0, 33, 8, 32, 0, 65, 32, 106, 41, 3, 0, 33, 9, 3, 64, 32, 6, 32, 1, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 6, 32, 7, 32, 1, 65, 8, 106, 34, 1, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 7, 32, 8, 32, 1, 65, 8, 106, 34, 1, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 8, 32, 9, 32, 1, 65, 8, 106, 34, 1, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 9, 32, 2, 32, 1, 65, 8, 106, 34, 1, 79, 13, 0, 11, 32, 0, 65, 8, 106, 32, 6, 55, 3, 0, 32, 0, 65, 16, 106, 32, 7, 55, 3, 0, 32, 0, 65, 24, 106, 32, 8, 55, 3, 0, 32, 0, 65, 32, 106, 32, 9, 55, 3, 0, 11, 32, 1, 32, 5, 73, 4, 64, 32, 4, 32, 1, 32, 5, 32, 1, 107, 34, 1, 252, 10, 0, 0, 32, 0, 65, 200, 0, 106, 32, 1, 54, 2, 0, 11, 11, 188, 2, 1, 5, 126, 32, 0, 65, 24, 106, 41, 3, 0, 33, 1, 32, 0, 41, 3, 0, 34, 2, 66, 32, 90, 4, 126, 32, 0, 65, 8, 106, 41, 3, 0, 34, 3, 66, 1, 137, 32, 0, 65, 16, 106, 41, 3, 0, 34, 4, 66, 7, 137, 124, 32, 1, 66, 12, 137, 32, 0, 65, 32, 106, 41, 3, 0, 34, 5, 66, 18, 137, 124, 124, 32, 3, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 32, 4, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 32, 1, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 32, 5, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 5, 32, 1, 66, 197, 207, 217, 178, 241, 229, 186, 234, 39, 124, 11, 32, 2, 124, 32, 0, 65, 40, 106, 32, 2, 66, 31, 131, 167, 16, 6, 11]);
@@ -1041,7 +1041,7 @@ function imageSize(input) {
1041
1041
  throw new TypeError(`unsupported file type: ${type}`);
1042
1042
  }
1043
1043
 
1044
- // ../memory/dist/chunk-JJBSFPC5.js
1044
+ // ../memory/dist/chunk-T5FHEWK6.js
1045
1045
  function formatRelativeTime(date, currentDate) {
1046
1046
  const diffMs = currentDate.getTime() - date.getTime();
1047
1047
  const diffDays = Math.floor(diffMs / (1e3 * 60 * 60 * 24));
@@ -2747,6 +2747,7 @@ User messages are extremely important. If the user asks a question or gives a ne
2747
2747
 
2748
2748
  ${instruction}` : ""}`;
2749
2749
  }
2750
+ var MAX_COMPRESSION_LEVEL = 4;
2750
2751
  var COMPRESSION_GUIDANCE = {
2751
2752
  0: "",
2752
2753
  1: `
@@ -2759,11 +2760,11 @@ Please re-process with slightly more compression:
2759
2760
  - Closer to the end, retain more fine details (recent context matters more)
2760
2761
  - Memory is getting long - use a more condensed style throughout
2761
2762
  - Combine related items more aggressively but do not lose important specific details of names, places, events, and people
2763
+ - Combine repeated similar tool calls (e.g. multiple file views, searches, or edits in the same area) into a single summary line describing what was explored/changed and the outcome
2762
2764
  - Preserve \u2705 completion markers \u2014 they are memory signals that tell the assistant what is already resolved and help prevent repeated work
2763
2765
  - Preserve the concrete resolved outcome captured by \u2705 markers so the assistant knows what exactly is done
2764
- - For example if there is a long nested observation list about repeated tool calls, you can combine those into a single line and observe that the tool was called multiple times for x reason, and finally y outcome happened.
2765
2766
 
2766
- Your current detail level was a 10/10, lets aim for a 8/10 detail level.
2767
+ Aim for a 8/10 detail level.
2767
2768
  `,
2768
2769
  2: `
2769
2770
  ## AGGRESSIVE COMPRESSION REQUIRED
@@ -2775,12 +2776,13 @@ Please re-process with much more aggressive compression:
2775
2776
  - Closer to the end, retain fine details (recent context matters more)
2776
2777
  - Memory is getting very long - use a significantly more condensed style throughout
2777
2778
  - Combine related items aggressively but do not lose important specific details of names, places, events, and people
2779
+ - Combine repeated similar tool calls (e.g. multiple file views, searches, or edits in the same area) into a single summary line describing what was explored/changed and the outcome
2780
+ - If the same file or module is mentioned across many observations, merge into one entry covering the full arc
2778
2781
  - Preserve \u2705 completion markers \u2014 they are memory signals that tell the assistant what is already resolved and help prevent repeated work
2779
2782
  - Preserve the concrete resolved outcome captured by \u2705 markers so the assistant knows what exactly is done
2780
- - For example if there is a long nested observation list about repeated tool calls, you can combine those into a single line and observe that the tool was called multiple times for x reason, and finally y outcome happened.
2781
2783
  - Remove redundant information and merge overlapping observations
2782
2784
 
2783
- Your current detail level was a 10/10, lets aim for a 6/10 detail level.
2785
+ Aim for a 6/10 detail level.
2784
2786
  `,
2785
2787
  3: `
2786
2788
  ## CRITICAL COMPRESSION REQUIRED
@@ -2791,13 +2793,32 @@ Please re-process with maximum compression:
2791
2793
  - Summarize the oldest observations (first 50-70%) into brief high-level paragraphs \u2014 only key facts, decisions, and outcomes
2792
2794
  - For the most recent observations (last 30-50%), retain important details but still use a condensed style
2793
2795
  - Ruthlessly merge related observations \u2014 if 10 observations are about the same topic, combine into 1-2 lines
2796
+ - Combine all tool call sequences (file views, searches, edits, builds) into outcome-only summaries \u2014 drop individual steps entirely
2794
2797
  - Drop procedural details (tool calls, retries, intermediate steps) \u2014 keep only final outcomes
2795
2798
  - Drop observations that are no longer relevant or have been superseded by newer information
2796
2799
  - Preserve \u2705 completion markers \u2014 they are memory signals that tell the assistant what is already resolved and help prevent repeated work
2797
2800
  - Preserve the concrete resolved outcome captured by \u2705 markers so the assistant knows what exactly is done
2798
2801
  - Preserve: names, dates, decisions, errors, user preferences, and architectural choices
2799
2802
 
2800
- Your current detail level was a 10/10, lets aim for a 4/10 detail level.
2803
+ Aim for a 4/10 detail level.
2804
+ `,
2805
+ 4: `
2806
+ ## EXTREME COMPRESSION REQUIRED
2807
+
2808
+ Multiple compression attempts have failed. The content may already be dense from a prior reflection.
2809
+
2810
+ You MUST dramatically reduce the number of observations while keeping the standard observation format (date groups with bullet points and priority emojis):
2811
+ - Tool call observations are the biggest source of bloat. Collapse ALL tool call sequences into outcome-only observations \u2014 e.g. 10 observations about viewing/searching/editing files become 1 observation about what was actually learned or achieved (e.g. "Investigated auth module and found token validation was skipping expiry check")
2812
+ - Never preserve individual tool calls (viewed file X, searched for Y, ran build) \u2014 only preserve what was discovered or accomplished
2813
+ - Consolidate many related observations into single, more generic observations
2814
+ - Merge all same-day date groups into at most 2-3 date groups per day
2815
+ - For older content, each topic or task should be at most 1-2 observations capturing the key outcome
2816
+ - For recent content, retain more detail but still merge related items aggressively
2817
+ - If multiple observations describe incremental progress on the same task, keep only the final state
2818
+ - Preserve \u2705 completion markers and their outcomes but merge related completions into fewer lines
2819
+ - Preserve: user preferences, key decisions, architectural choices, and unresolved issues
2820
+
2821
+ Aim for a 2/10 detail level. Fewer, more generic observations are better than many specific ones that exceed the budget.
2801
2822
  `
2802
2823
  };
2803
2824
  function buildReflectorPrompt(observations, manualPrompt, compressionLevel, skipContinuationHints) {
@@ -4919,6 +4940,22 @@ Async buffering is enabled by default \u2014 this opt-out is only needed when us
4919
4940
  modelId: resolved.modelId
4920
4941
  };
4921
4942
  }
4943
+ /**
4944
+ * Get the default compression start level based on model behavior.
4945
+ * gemini-2.5-flash is a faithful transcriber that needs explicit pressure to compress effectively.
4946
+ */
4947
+ async getCompressionStartLevel(requestContext) {
4948
+ try {
4949
+ const resolved = await this.resolveModelContext(this.reflectionConfig.model, requestContext);
4950
+ const modelId = resolved?.modelId ?? "";
4951
+ if (modelId.includes("gemini-2.5-flash")) {
4952
+ return 2;
4953
+ }
4954
+ return 1;
4955
+ } catch {
4956
+ return 1;
4957
+ }
4958
+ }
4922
4959
  getRuntimeModelContext(model) {
4923
4960
  if (!model?.modelId) {
4924
4961
  return void 0;
@@ -5716,8 +5753,9 @@ ${unreflectedContent}` : bufferedReflection;
5716
5753
  const originalTokens = this.tokenCounter.countObservations(observations);
5717
5754
  const targetThreshold = observationTokensThreshold ?? getMaxThreshold(this.reflectionConfig.observationTokens);
5718
5755
  let totalUsage = { inputTokens: 0, outputTokens: 0, totalTokens: 0 };
5719
- let currentLevel = compressionStartLevel ?? 0;
5720
- const maxLevel = 3;
5756
+ const startLevel = compressionStartLevel ?? 0;
5757
+ let currentLevel = startLevel;
5758
+ const maxLevel = Math.min(MAX_COMPRESSION_LEVEL, startLevel + 3);
5721
5759
  let parsed = { observations: "", suggestedContinuation: void 0 };
5722
5760
  let reflectedTokens = 0;
5723
5761
  let attemptNumber = 0;
@@ -5788,13 +5826,17 @@ ${unreflectedContent}` : bufferedReflection;
5788
5826
  omDebug(`[OM:callReflector] degenerate output persists at maxLevel=${maxLevel}, breaking`);
5789
5827
  break;
5790
5828
  }
5829
+ if (currentLevel >= maxLevel) {
5830
+ break;
5831
+ }
5832
+ const nextLevel = currentLevel + 1;
5791
5833
  if (streamContext?.writer) {
5792
5834
  const failedMarker = createObservationFailedMarker({
5793
5835
  cycleId: streamContext.cycleId,
5794
5836
  operationType: "reflection",
5795
5837
  startedAt: streamContext.startedAt,
5796
5838
  tokensAttempted: originalTokens,
5797
- error: `Did not compress below threshold (${originalTokens} \u2192 ${reflectedTokens}, target: ${targetThreshold}), retrying at level ${currentLevel + 1}`,
5839
+ error: `Did not compress below threshold (${originalTokens} \u2192 ${reflectedTokens}, target: ${targetThreshold}), retrying at level ${nextLevel}`,
5798
5840
  recordId: streamContext.recordId,
5799
5841
  threadId: streamContext.threadId
5800
5842
  });
@@ -5815,7 +5857,7 @@ ${unreflectedContent}` : bufferedReflection;
5815
5857
  await streamContext.writer.custom(startMarker).catch(() => {
5816
5858
  });
5817
5859
  }
5818
- currentLevel = Math.min(currentLevel + 1, maxLevel);
5860
+ currentLevel = nextLevel;
5819
5861
  }
5820
5862
  return {
5821
5863
  observations: parsed.observations,
@@ -7716,9 +7758,6 @@ ${bufferedObservations}`;
7716
7758
  omDebug(
7717
7759
  `[OM:reflect] doAsyncBufferedReflection: slicing observations for reflection \u2014 totalLines=${totalLines}, avgTokPerLine=${avgTokensPerLine.toFixed(1)}, activationPointTokens=${activationPointTokens}, linesToReflect=${linesToReflect}/${totalLines}, sliceTokenEstimate=${sliceTokenEstimate}, compressionTarget=${compressionTarget}`
7718
7760
  );
7719
- omDebug(
7720
- `[OM:reflect] doAsyncBufferedReflection: starting reflector call, recordId=${currentRecord.id}, observationTokens=${sliceTokenEstimate}, compressionTarget=${compressionTarget} (inputTokens), activeObsLength=${activeObservations.length}, reflectedLineCount=${reflectedObservationLineCount}`
7721
- );
7722
7761
  if (writer) {
7723
7762
  const startMarker = createBufferingStartMarker({
7724
7763
  cycleId,
@@ -7732,6 +7771,9 @@ ${bufferedObservations}`;
7732
7771
  void writer.custom(startMarker).catch(() => {
7733
7772
  });
7734
7773
  }
7774
+ omDebug(
7775
+ `[OM:reflect] doAsyncBufferedReflection: starting reflector call, recordId=${currentRecord.id}, observationTokens=${sliceTokenEstimate}, compressionTarget=${compressionTarget} (inputTokens), activeObsLength=${activeObservations.length}, reflectedLineCount=${reflectedObservationLineCount}`
7776
+ );
7735
7777
  const reflectResult = await this.callReflector(
7736
7778
  activeObservations,
7737
7779
  void 0,
@@ -7743,8 +7785,7 @@ ${bufferedObservations}`;
7743
7785
  // No abort signal for background ops
7744
7786
  true,
7745
7787
  // Skip continuation hints for async buffering
7746
- 1,
7747
- // Start at compression level 1 for buffered reflection
7788
+ await this.getCompressionStartLevel(requestContext),
7748
7789
  requestContext
7749
7790
  );
7750
7791
  const reflectionTokenCount = this.tokenCounter.countObservations(reflectResult.observations);
@@ -8605,5 +8646,5 @@ exports.stripEphemeralAnchorIds = stripEphemeralAnchorIds;
8605
8646
  exports.stripObservationGroups = stripObservationGroups;
8606
8647
  exports.truncateStringByTokens = truncateStringByTokens;
8607
8648
  exports.wrapInObservationGroup = wrapInObservationGroup;
8608
- //# sourceMappingURL=chunk-MJTEQGJT.cjs.map
8609
- //# sourceMappingURL=chunk-MJTEQGJT.cjs.map
8649
+ //# sourceMappingURL=chunk-457RSMZH.cjs.map
8650
+ //# sourceMappingURL=chunk-457RSMZH.cjs.map