@mastra/server 0.0.0-vector-sources-20250516175436 → 0.0.0-vector-extension-schema-20250922130418

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 (333) hide show
  1. package/CHANGELOG.md +3745 -0
  2. package/LICENSE.md +11 -42
  3. package/README.md +0 -5
  4. package/dist/{chunk-H5PTF3Y4.js → chunk-4QCXUEAT.js} +11 -2
  5. package/dist/chunk-4QCXUEAT.js.map +1 -0
  6. package/dist/chunk-4RRMWXQ2.js +3522 -0
  7. package/dist/chunk-4RRMWXQ2.js.map +1 -0
  8. package/dist/chunk-57HWW2TY.cjs +587 -0
  9. package/dist/chunk-57HWW2TY.cjs.map +1 -0
  10. package/dist/chunk-5DP5XZH6.cjs +928 -0
  11. package/dist/chunk-5DP5XZH6.cjs.map +1 -0
  12. package/dist/chunk-66YYHFGF.js +761 -0
  13. package/dist/chunk-66YYHFGF.js.map +1 -0
  14. package/dist/chunk-6GMFZ5LK.js +2774 -0
  15. package/dist/chunk-6GMFZ5LK.js.map +1 -0
  16. package/dist/chunk-743UIDHI.cjs +2013 -0
  17. package/dist/chunk-743UIDHI.cjs.map +1 -0
  18. package/dist/chunk-7JYXPDM4.js +15712 -0
  19. package/dist/chunk-7JYXPDM4.js.map +1 -0
  20. package/dist/{chunk-OCWPVYNI.cjs → chunk-7NADHFD2.cjs} +3 -0
  21. package/dist/chunk-7NADHFD2.cjs.map +1 -0
  22. package/dist/chunk-7QEJ5QG5.js +151 -0
  23. package/dist/chunk-7QEJ5QG5.js.map +1 -0
  24. package/dist/chunk-A3AL7EWJ.js +83 -0
  25. package/dist/chunk-A3AL7EWJ.js.map +1 -0
  26. package/dist/chunk-AK2FXLLB.cjs +849 -0
  27. package/dist/chunk-AK2FXLLB.cjs.map +1 -0
  28. package/dist/{chunk-5SN4U5AC.cjs → chunk-AVEPEUN4.cjs} +115 -138
  29. package/dist/chunk-AVEPEUN4.cjs.map +1 -0
  30. package/dist/chunk-CNU4A2XU.js +129 -0
  31. package/dist/chunk-CNU4A2XU.js.map +1 -0
  32. package/dist/chunk-CY4TP3FK.js +16 -0
  33. package/dist/chunk-CY4TP3FK.js.map +1 -0
  34. package/dist/chunk-EMMSS5I5.cjs +37 -0
  35. package/dist/chunk-EMMSS5I5.cjs.map +1 -0
  36. package/dist/chunk-EMNGA4R4.js +845 -0
  37. package/dist/chunk-EMNGA4R4.js.map +1 -0
  38. package/dist/chunk-FALVL2VV.cjs +3525 -0
  39. package/dist/chunk-FALVL2VV.cjs.map +1 -0
  40. package/dist/chunk-FQNT7PI4.js +937 -0
  41. package/dist/chunk-FQNT7PI4.js.map +1 -0
  42. package/dist/chunk-G3PMV62Z.js +33 -0
  43. package/dist/chunk-G3PMV62Z.js.map +1 -0
  44. package/dist/chunk-G4PUALCE.cjs +28 -0
  45. package/dist/chunk-G4PUALCE.cjs.map +1 -0
  46. package/dist/chunk-G662L2YZ.js +568 -0
  47. package/dist/chunk-G662L2YZ.js.map +1 -0
  48. package/dist/chunk-GDWMF6SB.cjs +133 -0
  49. package/dist/chunk-GDWMF6SB.cjs.map +1 -0
  50. package/dist/chunk-GU4EWMZB.cjs +769 -0
  51. package/dist/chunk-GU4EWMZB.cjs.map +1 -0
  52. package/dist/chunk-GUI3CROV.cjs +159 -0
  53. package/dist/chunk-GUI3CROV.cjs.map +1 -0
  54. package/dist/chunk-HJQKWRKQ.cjs +764 -0
  55. package/dist/chunk-HJQKWRKQ.cjs.map +1 -0
  56. package/dist/{chunk-YWLUOY3D.cjs → chunk-HVBBFCDH.cjs} +1110 -793
  57. package/dist/chunk-HVBBFCDH.cjs.map +1 -0
  58. package/dist/chunk-HZJRQ5L3.cjs +1411 -0
  59. package/dist/chunk-HZJRQ5L3.cjs.map +1 -0
  60. package/dist/chunk-IGFMAZZ5.cjs +1150 -0
  61. package/dist/chunk-IGFMAZZ5.cjs.map +1 -0
  62. package/dist/chunk-ILESGJ6N.js +524 -0
  63. package/dist/chunk-ILESGJ6N.js.map +1 -0
  64. package/dist/chunk-IOQGI4ML.js +931 -0
  65. package/dist/chunk-IOQGI4ML.js.map +1 -0
  66. package/dist/chunk-J7BPKKOG.cjs +163 -0
  67. package/dist/chunk-J7BPKKOG.cjs.map +1 -0
  68. package/dist/{chunk-HFWCEP5S.js → chunk-JRDEOHAJ.js} +47 -14
  69. package/dist/chunk-JRDEOHAJ.js.map +1 -0
  70. package/dist/chunk-KNGXRN26.cjs +335 -0
  71. package/dist/chunk-KNGXRN26.cjs.map +1 -0
  72. package/dist/{chunk-OR3CIE2H.js → chunk-KV6VHX4V.js} +29 -7
  73. package/dist/chunk-KV6VHX4V.js.map +1 -0
  74. package/dist/chunk-L265APUD.cjs +69 -0
  75. package/dist/chunk-L265APUD.cjs.map +1 -0
  76. package/dist/chunk-LF2ZLOFP.js +767 -0
  77. package/dist/chunk-LF2ZLOFP.js.map +1 -0
  78. package/dist/chunk-LYPU75T6.js +1147 -0
  79. package/dist/chunk-LYPU75T6.js.map +1 -0
  80. package/dist/{chunk-NYN7KFXL.js → chunk-MMROOK5J.js} +3 -0
  81. package/dist/chunk-MMROOK5J.js.map +1 -0
  82. package/dist/chunk-N35YCWQ5.cjs +540 -0
  83. package/dist/chunk-N35YCWQ5.cjs.map +1 -0
  84. package/dist/{chunk-LIVAK2DM.js → chunk-N7F33WAD.js} +1083 -794
  85. package/dist/chunk-N7F33WAD.js.map +1 -0
  86. package/dist/chunk-NG5IVLEZ.js +1012 -0
  87. package/dist/chunk-NG5IVLEZ.js.map +1 -0
  88. package/dist/chunk-NLWACBE7.cjs +128 -0
  89. package/dist/chunk-NLWACBE7.cjs.map +1 -0
  90. package/dist/chunk-OGW6HHVI.js +1408 -0
  91. package/dist/chunk-OGW6HHVI.js.map +1 -0
  92. package/dist/chunk-OJQOYXHU.cjs +15748 -0
  93. package/dist/chunk-OJQOYXHU.cjs.map +1 -0
  94. package/dist/chunk-OZLRIVC4.cjs +588 -0
  95. package/dist/chunk-OZLRIVC4.cjs.map +1 -0
  96. package/dist/chunk-P7CIEIJ3.js +925 -0
  97. package/dist/chunk-P7CIEIJ3.js.map +1 -0
  98. package/dist/chunk-P7RBMCBE.cjs +934 -0
  99. package/dist/chunk-P7RBMCBE.cjs.map +1 -0
  100. package/dist/chunk-PPYGWINI.cjs +2777 -0
  101. package/dist/chunk-PPYGWINI.cjs.map +1 -0
  102. package/dist/{chunk-P6SCPDYW.js → chunk-PUYSH3IL.js} +114 -137
  103. package/dist/chunk-PUYSH3IL.js.map +1 -0
  104. package/dist/{chunk-MHKNLNAN.cjs → chunk-PWTXZZTR.cjs} +33 -10
  105. package/dist/chunk-PWTXZZTR.cjs.map +1 -0
  106. package/dist/chunk-R7NOGUZG.js +65 -0
  107. package/dist/chunk-R7NOGUZG.js.map +1 -0
  108. package/dist/chunk-RCHEPTZZ.js +2006 -0
  109. package/dist/chunk-RCHEPTZZ.js.map +1 -0
  110. package/dist/chunk-RE4RPXT2.cjs +18 -0
  111. package/dist/chunk-RE4RPXT2.cjs.map +1 -0
  112. package/dist/chunk-SIGXR3JT.cjs +1043 -0
  113. package/dist/chunk-SIGXR3JT.cjs.map +1 -0
  114. package/dist/chunk-SPLSYTYW.cjs +88 -0
  115. package/dist/chunk-SPLSYTYW.cjs.map +1 -0
  116. package/dist/chunk-SQY4T6EJ.js +571 -0
  117. package/dist/chunk-SQY4T6EJ.js.map +1 -0
  118. package/dist/{chunk-TJKLBTFB.js → chunk-SYRRSBGL.js} +51 -27
  119. package/dist/chunk-SYRRSBGL.js.map +1 -0
  120. package/dist/{chunk-BNEY4P4P.cjs → chunk-T3TIA3O6.cjs} +20 -18
  121. package/dist/chunk-T3TIA3O6.cjs.map +1 -0
  122. package/dist/{chunk-EJO45KYT.js → chunk-TTHEEIZ3.js} +53 -50
  123. package/dist/chunk-TTHEEIZ3.js.map +1 -0
  124. package/dist/chunk-TVSIG4JE.cjs +940 -0
  125. package/dist/chunk-TVSIG4JE.cjs.map +1 -0
  126. package/dist/{chunk-55DOQLP6.js → chunk-WHN4VX55.js} +5 -3
  127. package/dist/chunk-WHN4VX55.js.map +1 -0
  128. package/dist/dist-26HWEQY6.js +3 -0
  129. package/dist/dist-26HWEQY6.js.map +1 -0
  130. package/dist/dist-3A5DXB37.cjs +20 -0
  131. package/dist/dist-3A5DXB37.cjs.map +1 -0
  132. package/dist/dist-3SJKQJGY.cjs +16 -0
  133. package/dist/dist-3SJKQJGY.cjs.map +1 -0
  134. package/dist/dist-4ZQSPE5K.js +3 -0
  135. package/dist/dist-4ZQSPE5K.js.map +1 -0
  136. package/dist/dist-5W5QNRTD.js +3 -0
  137. package/dist/dist-5W5QNRTD.js.map +1 -0
  138. package/dist/dist-653SRMPL.js +3 -0
  139. package/dist/dist-653SRMPL.js.map +1 -0
  140. package/dist/dist-6U6EFC5C.cjs +16 -0
  141. package/dist/dist-6U6EFC5C.cjs.map +1 -0
  142. package/dist/dist-7IHNNYMF.cjs +16 -0
  143. package/dist/dist-7IHNNYMF.cjs.map +1 -0
  144. package/dist/dist-B5IPRF6W.js +3 -0
  145. package/dist/dist-B5IPRF6W.js.map +1 -0
  146. package/dist/dist-EOMYFT4Y.cjs +16 -0
  147. package/dist/dist-EOMYFT4Y.cjs.map +1 -0
  148. package/dist/dist-EZZMMMNT.cjs +16 -0
  149. package/dist/dist-EZZMMMNT.cjs.map +1 -0
  150. package/dist/dist-F2ET4MNO.cjs +16 -0
  151. package/dist/dist-F2ET4MNO.cjs.map +1 -0
  152. package/dist/dist-H64VX6DE.js +3 -0
  153. package/dist/dist-H64VX6DE.js.map +1 -0
  154. package/dist/dist-HY7RMLJQ.cjs +16 -0
  155. package/dist/dist-HY7RMLJQ.cjs.map +1 -0
  156. package/dist/dist-M6S4P3FJ.js +3 -0
  157. package/dist/dist-M6S4P3FJ.js.map +1 -0
  158. package/dist/dist-NR7QSCQT.js +3 -0
  159. package/dist/dist-NR7QSCQT.js.map +1 -0
  160. package/dist/dist-QLFMCMCX.js +3 -0
  161. package/dist/dist-QLFMCMCX.js.map +1 -0
  162. package/dist/dist-UY46BFRP.js +3 -0
  163. package/dist/dist-UY46BFRP.js.map +1 -0
  164. package/dist/dist-WCQDRTIV.cjs +16 -0
  165. package/dist/dist-WCQDRTIV.cjs.map +1 -0
  166. package/dist/dist-WKYB3LTJ.cjs +16 -0
  167. package/dist/dist-WKYB3LTJ.cjs.map +1 -0
  168. package/dist/index.cjs +6 -0
  169. package/dist/index.cjs.map +1 -0
  170. package/dist/index.d.ts +1 -0
  171. package/dist/index.d.ts.map +1 -0
  172. package/dist/index.js +5 -0
  173. package/dist/index.js.map +1 -0
  174. package/dist/server/a2a/protocol.d.ts +8 -0
  175. package/dist/server/a2a/protocol.d.ts.map +1 -0
  176. package/dist/server/a2a/store.cjs +25 -0
  177. package/dist/server/a2a/store.cjs.map +1 -0
  178. package/dist/server/a2a/store.d.ts +14 -0
  179. package/dist/server/a2a/store.d.ts.map +1 -0
  180. package/dist/server/a2a/store.js +23 -0
  181. package/dist/server/a2a/store.js.map +1 -0
  182. package/dist/server/a2a/tasks.d.ts +20 -0
  183. package/dist/server/a2a/tasks.d.ts.map +1 -0
  184. package/dist/server/handlers/a2a.cjs +13 -11
  185. package/dist/server/handlers/a2a.cjs.map +1 -0
  186. package/dist/server/handlers/a2a.d.ts +68 -6
  187. package/dist/server/handlers/a2a.d.ts.map +1 -0
  188. package/dist/server/handlers/a2a.js +3 -1
  189. package/dist/server/handlers/a2a.js.map +1 -0
  190. package/dist/server/handlers/agent-builder.cjs +68 -0
  191. package/dist/server/handlers/agent-builder.cjs.map +1 -0
  192. package/dist/server/handlers/agent-builder.d.ts +88 -0
  193. package/dist/server/handlers/agent-builder.d.ts.map +1 -0
  194. package/dist/server/handlers/agent-builder.js +3 -0
  195. package/dist/server/handlers/agent-builder.js.map +1 -0
  196. package/dist/server/handlers/agents.cjs +41 -7
  197. package/dist/server/handlers/agents.cjs.map +1 -0
  198. package/dist/server/handlers/agents.d.ts +139 -6
  199. package/dist/server/handlers/agents.d.ts.map +1 -0
  200. package/dist/server/handlers/agents.js +3 -1
  201. package/dist/server/handlers/agents.js.map +1 -0
  202. package/dist/server/handlers/error.cjs +4 -2
  203. package/dist/server/handlers/error.cjs.map +1 -0
  204. package/dist/server/handlers/error.d.ts +2 -1
  205. package/dist/server/handlers/error.d.ts.map +1 -0
  206. package/dist/server/handlers/error.js +3 -1
  207. package/dist/server/handlers/error.js.map +1 -0
  208. package/dist/server/handlers/legacyWorkflows.cjs +48 -0
  209. package/dist/server/handlers/legacyWorkflows.cjs.map +1 -0
  210. package/dist/server/handlers/legacyWorkflows.d.ts +59 -0
  211. package/dist/server/handlers/legacyWorkflows.d.ts.map +1 -0
  212. package/dist/server/handlers/legacyWorkflows.js +3 -0
  213. package/dist/server/handlers/legacyWorkflows.js.map +1 -0
  214. package/dist/server/handlers/logs.cjs +6 -4
  215. package/dist/server/handlers/logs.cjs.map +1 -0
  216. package/dist/server/handlers/logs.d.ts +34 -3
  217. package/dist/server/handlers/logs.d.ts.map +1 -0
  218. package/dist/server/handlers/logs.js +3 -1
  219. package/dist/server/handlers/logs.js.map +1 -0
  220. package/dist/server/handlers/memory.cjs +39 -9
  221. package/dist/server/handlers/memory.cjs.map +1 -0
  222. package/dist/server/handlers/memory.d.ts +118 -8
  223. package/dist/server/handlers/memory.d.ts.map +1 -0
  224. package/dist/server/handlers/memory.js +3 -1
  225. package/dist/server/handlers/memory.js.map +1 -0
  226. package/dist/server/handlers/observability.cjs +16 -0
  227. package/dist/server/handlers/observability.cjs.map +1 -0
  228. package/dist/server/handlers/observability.d.ts +23 -0
  229. package/dist/server/handlers/observability.d.ts.map +1 -0
  230. package/dist/server/handlers/observability.js +3 -0
  231. package/dist/server/handlers/observability.js.map +1 -0
  232. package/dist/server/handlers/scores.cjs +32 -0
  233. package/dist/server/handlers/scores.cjs.map +1 -0
  234. package/dist/server/handlers/scores.d.ts +49 -0
  235. package/dist/server/handlers/scores.d.ts.map +1 -0
  236. package/dist/server/handlers/scores.js +3 -0
  237. package/dist/server/handlers/scores.js.map +1 -0
  238. package/dist/server/handlers/telemetry.cjs +9 -3
  239. package/dist/server/handlers/telemetry.cjs.map +1 -0
  240. package/dist/server/handlers/telemetry.d.ts +33 -2
  241. package/dist/server/handlers/telemetry.d.ts.map +1 -0
  242. package/dist/server/handlers/telemetry.js +3 -1
  243. package/dist/server/handlers/telemetry.js.map +1 -0
  244. package/dist/server/handlers/tools.cjs +11 -5
  245. package/dist/server/handlers/tools.cjs.map +1 -0
  246. package/dist/server/handlers/tools.d.ts +25 -4
  247. package/dist/server/handlers/tools.d.ts.map +1 -0
  248. package/dist/server/handlers/tools.js +3 -1
  249. package/dist/server/handlers/tools.js.map +1 -0
  250. package/dist/server/handlers/utils.cjs +8 -2
  251. package/dist/server/handlers/utils.cjs.map +1 -0
  252. package/dist/server/handlers/utils.d.ts +8 -1
  253. package/dist/server/handlers/utils.d.ts.map +1 -0
  254. package/dist/server/handlers/utils.js +3 -1
  255. package/dist/server/handlers/utils.js.map +1 -0
  256. package/dist/server/handlers/vNextNetwork.cjs +220 -0
  257. package/dist/server/handlers/vNextNetwork.cjs.map +1 -0
  258. package/dist/server/handlers/vNextNetwork.d.ts +246 -0
  259. package/dist/server/handlers/vNextNetwork.d.ts.map +1 -0
  260. package/dist/server/handlers/vNextNetwork.js +213 -0
  261. package/dist/server/handlers/vNextNetwork.js.map +1 -0
  262. package/dist/server/handlers/vector.cjs +9 -7
  263. package/dist/server/handlers/vector.cjs.map +1 -0
  264. package/dist/server/handlers/vector.d.ts +51 -6
  265. package/dist/server/handlers/vector.d.ts.map +1 -0
  266. package/dist/server/handlers/vector.js +3 -1
  267. package/dist/server/handlers/vector.js.map +1 -0
  268. package/dist/server/handlers/voice.cjs +10 -4
  269. package/dist/server/handlers/voice.cjs.map +1 -0
  270. package/dist/server/handlers/voice.d.ts +41 -3
  271. package/dist/server/handlers/voice.d.ts.map +1 -0
  272. package/dist/server/handlers/voice.js +3 -1
  273. package/dist/server/handlers/voice.js.map +1 -0
  274. package/dist/server/handlers/workflows.cjs +43 -13
  275. package/dist/server/handlers/workflows.cjs.map +1 -0
  276. package/dist/server/handlers/workflows.d.ts +82 -10
  277. package/dist/server/handlers/workflows.d.ts.map +1 -0
  278. package/dist/server/handlers/workflows.js +3 -1
  279. package/dist/server/handlers/workflows.js.map +1 -0
  280. package/dist/server/handlers.cjs +44 -32
  281. package/dist/server/handlers.cjs.map +1 -0
  282. package/dist/server/handlers.d.ts +14 -11
  283. package/dist/server/handlers.d.ts.map +1 -0
  284. package/dist/server/handlers.js +15 -11
  285. package/dist/server/handlers.js.map +1 -0
  286. package/dist/server/http-exception.d.ts +87 -0
  287. package/dist/server/http-exception.d.ts.map +1 -0
  288. package/dist/server/types.d.ts +10 -0
  289. package/dist/server/types.d.ts.map +1 -0
  290. package/dist/server/utils.d.ts +44 -0
  291. package/dist/server/utils.d.ts.map +1 -0
  292. package/package.json +51 -21
  293. package/dist/_tsup-dts-rollup.d.cts +0 -816
  294. package/dist/_tsup-dts-rollup.d.ts +0 -816
  295. package/dist/chunk-57CJTIPW.cjs +0 -18
  296. package/dist/chunk-64U3UDTH.cjs +0 -13
  297. package/dist/chunk-75ZPJI57.cjs +0 -9
  298. package/dist/chunk-C7564HUT.js +0 -142
  299. package/dist/chunk-D4IRYCUI.cjs +0 -235
  300. package/dist/chunk-DJJIUEL2.js +0 -211
  301. package/dist/chunk-HWZVAG3H.js +0 -49
  302. package/dist/chunk-I2B73Y4I.cjs +0 -332
  303. package/dist/chunk-M5ABIP7D.js +0 -11
  304. package/dist/chunk-MIQYDLLM.js +0 -329
  305. package/dist/chunk-MLKGABMK.js +0 -7
  306. package/dist/chunk-OGCNNUHF.cjs +0 -54
  307. package/dist/chunk-UCTEMO2Q.cjs +0 -341
  308. package/dist/chunk-VPNDC2DI.cjs +0 -148
  309. package/dist/chunk-WUC6LSTW.js +0 -227
  310. package/dist/chunk-Y7UWRW5X.cjs +0 -221
  311. package/dist/chunk-YBVOQN4M.cjs +0 -94
  312. package/dist/chunk-ZE5AAC4I.cjs +0 -138
  313. package/dist/index.d.cts +0 -1
  314. package/dist/server/handlers/a2a.d.cts +0 -6
  315. package/dist/server/handlers/agents.d.cts +0 -6
  316. package/dist/server/handlers/error.d.cts +0 -1
  317. package/dist/server/handlers/logs.d.cts +0 -3
  318. package/dist/server/handlers/memory.d.cts +0 -8
  319. package/dist/server/handlers/network.cjs +0 -22
  320. package/dist/server/handlers/network.d.cts +0 -4
  321. package/dist/server/handlers/network.d.ts +0 -4
  322. package/dist/server/handlers/network.js +0 -1
  323. package/dist/server/handlers/telemetry.d.cts +0 -2
  324. package/dist/server/handlers/tools.d.cts +0 -4
  325. package/dist/server/handlers/utils.d.cts +0 -1
  326. package/dist/server/handlers/vNextWorkflows.cjs +0 -46
  327. package/dist/server/handlers/vNextWorkflows.d.cts +0 -10
  328. package/dist/server/handlers/vNextWorkflows.d.ts +0 -10
  329. package/dist/server/handlers/vNextWorkflows.js +0 -1
  330. package/dist/server/handlers/vector.d.cts +0 -6
  331. package/dist/server/handlers/voice.d.cts +0 -3
  332. package/dist/server/handlers/workflows.d.cts +0 -10
  333. package/dist/server/handlers.d.cts +0 -11
@@ -1,816 +0,0 @@
1
- import type { Agent } from '@mastra/core/agent';
2
- import type { AgentCard } from '@mastra/core/a2a';
3
- import type { AgentNetwork } from '@mastra/core/network';
4
- import type { Artifact } from '@mastra/core/a2a';
5
- import type { BaseLogMessage } from '@mastra/core/logger';
6
- import { CoreMessage } from 'ai';
7
- import type { CoreMessage as CoreMessage_2 } from '@mastra/core/llm';
8
- import { EvalRow } from '@mastra/core/storage';
9
- import { GenerateObjectResult } from 'ai';
10
- import { GenerateTextResult } from 'ai';
11
- import type { JSONRPCError } from '@mastra/core/a2a';
12
- import { JSONRPCResponse } from '@mastra/core/a2a';
13
- import type { Logger } from '@mastra/core/logger';
14
- import type { Mastra } from '@mastra/core/mastra';
15
- import type { MastraMemory } from '@mastra/core/memory';
16
- import { Message } from 'ai';
17
- import type { Message as Message_2 } from '@mastra/core/a2a';
18
- import { MessageType } from '@mastra/core/memory';
19
- import { NewStep } from '@mastra/core/workflows/vNext';
20
- import type { NewWorkflow } from '@mastra/core/workflows/vNext';
21
- import type { QueryResult } from '@mastra/core/vector';
22
- import { ReadableStream as ReadableStream_2 } from 'node:stream/web';
23
- import { RuntimeContext } from '@mastra/core/runtime-context';
24
- import { RuntimeContext as RuntimeContext_2 } from '@mastra/core/di';
25
- import type { SerializedStepFlowEntry } from '@mastra/core/workflows/vNext';
26
- import { Step } from '@mastra/core/workflows';
27
- import { StepExecutionContext } from '@mastra/core/workflows';
28
- import { StepGraph } from '@mastra/core/workflows';
29
- import { StorageThreadType } from '@mastra/core/memory';
30
- import { Task } from '@mastra/core/a2a';
31
- import { TaskAndHistory } from '@mastra/core/a2a';
32
- import type { TaskContext } from '@mastra/core/a2a';
33
- import type { TaskIdParams } from '@mastra/core/a2a';
34
- import type { TaskQueryParams } from '@mastra/core/a2a';
35
- import type { TaskSendParams } from '@mastra/core/a2a';
36
- import type { TaskStatus } from '@mastra/core/a2a';
37
- import type { ToolAction } from '@mastra/core/tools';
38
- import type { VercelTool } from '@mastra/core/tools';
39
- import type { VNextWorkflowRuns } from '@mastra/core/storage';
40
- import type { Workflow } from '@mastra/core/workflows';
41
- import { WorkflowContext as WorkflowContext_2 } from '@mastra/core/workflows';
42
- import { WorkflowResult } from '@mastra/core/workflows/vNext';
43
- import { WorkflowRunResult } from '@mastra/core/workflows';
44
- import type { WorkflowRuns } from '@mastra/core/storage';
45
- import { ZodType } from 'zod';
46
- import { ZodTypeDef } from 'zod';
47
-
48
- export declare namespace a2a {
49
- export {
50
- getAgentCardByIdHandler,
51
- handleTaskSend,
52
- handleTaskGet,
53
- handleTaskSendSubscribe,
54
- handleTaskCancel,
55
- getAgentExecutionHandler
56
- }
57
- }
58
-
59
- export declare namespace agents {
60
- export {
61
- getAgentsHandler,
62
- getAgentByIdHandler,
63
- getEvalsByAgentIdHandler,
64
- getLiveEvalsByAgentIdHandler,
65
- generateHandler,
66
- streamGenerateHandler
67
- }
68
- }
69
-
70
- export declare interface ApiError extends Error {
71
- message: string;
72
- status?: number;
73
- }
74
-
75
- export declare function applyUpdateToTaskAndHistory(current: TaskAndHistory, update: Omit<TaskStatus, 'timestamp'> | Artifact): TaskAndHistory;
76
-
77
- declare type ClientErrorStatusCode = 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451;
78
-
79
- export declare interface Context {
80
- mastra: Mastra;
81
- }
82
-
83
- export declare function convertToCoreMessage(message: Message_2): CoreMessage_2;
84
-
85
- export declare function createErrorResponse(id: number | string | null, error: JSONRPCError<unknown>): JSONRPCResponse<null, unknown>;
86
-
87
- export declare function createIndex({ mastra, vectorName, index, }: Pick<VectorContext, 'mastra' | 'vectorName'> & {
88
- index: CreateIndexRequest;
89
- }): Promise<{
90
- success: boolean;
91
- }>;
92
-
93
- declare interface CreateIndexRequest {
94
- indexName: string;
95
- dimension: number;
96
- metric?: 'cosine' | 'euclidean' | 'dotproduct';
97
- }
98
-
99
- export declare function createRunHandler({ mastra, workflowId, runId: prevRunId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<{
100
- runId: string;
101
- }>;
102
-
103
- export declare function createSuccessResponse<T>(id: number | string | null, result: T): JSONRPCResponse<T>;
104
-
105
- export declare function createTaskContext({ task, userMessage, history, activeCancellations, }: {
106
- task: Task;
107
- userMessage: Message_2;
108
- history: Message_2[];
109
- activeCancellations: Set<string>;
110
- }): TaskContext;
111
-
112
- export declare function createThreadHandler({ mastra, agentId, body, }: Pick<MemoryContext, 'mastra' | 'agentId'> & {
113
- body?: Omit<Parameters<MastraMemory['createThread']>[0], 'resourceId'> & {
114
- resourceId?: string;
115
- };
116
- }): Promise<StorageThreadType>;
117
-
118
- export declare function createVNextWorkflowRunHandler({ mastra, workflowId, runId: prevRunId, }: Pick<VNextWorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<{
119
- runId: string;
120
- }>;
121
-
122
- export declare function deleteIndex({ mastra, vectorName, indexName, }: Pick<VectorContext, 'mastra' | 'vectorName'> & {
123
- indexName?: string;
124
- }): Promise<{
125
- success: boolean;
126
- }>;
127
-
128
- export declare function deleteThreadHandler({ mastra, agentId, threadId, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId'>): Promise<{
129
- result: string;
130
- }>;
131
-
132
- declare type DeprecatedStatusCode = 305 | 306;
133
-
134
- export declare function describeIndex({ mastra, vectorName, indexName, }: Pick<VectorContext, 'mastra' | 'vectorName'> & {
135
- indexName?: string;
136
- }): Promise<{
137
- dimension: number;
138
- count: number;
139
- metric: string | undefined;
140
- }>;
141
-
142
- export declare function executeAgentToolHandler({ mastra, agentId, toolId, data, runtimeContext, runtimeContextFromRequest, }: Pick<ToolsContext, 'mastra' | 'toolId'> & {
143
- agentId?: string;
144
- data: any;
145
- runtimeContext: RuntimeContext_2;
146
- runtimeContextFromRequest: Record<string, unknown>;
147
- }): Promise<any>;
148
-
149
- export declare function executeToolHandler(tools: ToolsContext['tools']): ({ mastra, runId, toolId, data, runtimeContext, runtimeContextFromRequest, }: Pick<ToolsContext, "mastra" | "toolId" | "runId"> & {
150
- data?: unknown;
151
- runtimeContext: RuntimeContext_2;
152
- runtimeContextFromRequest: Record<string, unknown>;
153
- }) => Promise<any>;
154
-
155
- export declare function generateHandler({ mastra, runtimeContext, agentId, body, }: Context & {
156
- runtimeContext: RuntimeContext;
157
- agentId: string;
158
- body: GetBody<'generate'> & {
159
- resourceid?: string;
160
- runtimeContext?: Record<string, unknown>;
161
- };
162
- }): Promise<GenerateTextResult<any, any>>;
163
-
164
- export declare function generateHandler_alias_1({ mastra, runtimeContext, networkId, body, }: NetworkContext & {
165
- runtimeContext: RuntimeContext;
166
- body: {
167
- messages?: Parameters<AgentNetwork['generate']>[0];
168
- } & Parameters<AgentNetwork['generate']>[1];
169
- }): Promise<GenerateObjectResult<any>>;
170
-
171
- /**
172
- * Generate speech from text
173
- */
174
- export declare function generateSpeechHandler({ mastra, agentId, body, }: VoiceContext & {
175
- body?: {
176
- text?: string;
177
- speakerId?: string;
178
- };
179
- }): Promise<NodeJS.ReadableStream>;
180
-
181
- export declare function getAgentByIdHandler({ mastra, runtimeContext, agentId, }: Context & {
182
- runtimeContext: RuntimeContext;
183
- agentId: string;
184
- }): Promise<{
185
- name: any;
186
- instructions: string;
187
- tools: any;
188
- workflows: {};
189
- provider: string;
190
- modelId: string;
191
- }>;
192
-
193
- export declare function getAgentCardByIdHandler({ mastra, agentId, executionUrl, provider, version, runtimeContext, }: Context & {
194
- runtimeContext: RuntimeContext;
195
- agentId: keyof ReturnType<typeof mastra.getAgents>;
196
- executionUrl?: string;
197
- version?: string;
198
- provider?: {
199
- organization: string;
200
- url: string;
201
- };
202
- }): Promise<AgentCard>;
203
-
204
- export declare function getAgentExecutionHandler({ requestId, mastra, agentId, runtimeContext, method, params, taskStore, logger, }: Context & {
205
- requestId: string;
206
- runtimeContext: RuntimeContext;
207
- agentId: string;
208
- method: 'tasks/send' | 'tasks/sendSubscribe' | 'tasks/get' | 'tasks/cancel';
209
- params: TaskSendParams | TaskQueryParams | TaskIdParams;
210
- taskStore?: InMemoryTaskStore;
211
- logger?: Logger;
212
- }): Promise<any>;
213
-
214
- export declare function getAgentsHandler({ mastra, runtimeContext }: Context & {
215
- runtimeContext: RuntimeContext;
216
- }): Promise<any>;
217
-
218
- declare type GetBody<T extends keyof Agent & {
219
- [K in keyof Agent]: Agent[K] extends (...args: any) => any ? K : never;
220
- }[keyof Agent]> = {
221
- messages: Parameters<Agent[T]>[0];
222
- } & Parameters<Agent[T]>[1];
223
-
224
- export declare function getEvalsByAgentIdHandler({ mastra, runtimeContext, agentId, }: Context & {
225
- runtimeContext: RuntimeContext;
226
- agentId: string;
227
- }): Promise<{
228
- id: string;
229
- name: any;
230
- instructions: string;
231
- evals: EvalRow[];
232
- }>;
233
-
234
- export declare function getLiveEvalsByAgentIdHandler({ mastra, runtimeContext, agentId, }: Context & {
235
- runtimeContext: RuntimeContext;
236
- agentId: string;
237
- }): Promise<{
238
- id: string;
239
- name: any;
240
- instructions: string;
241
- evals: EvalRow[];
242
- }>;
243
-
244
- export declare function getLogsByRunIdHandler({ mastra, runId, transportId, }: Pick<LogsContext, 'mastra' | 'runId' | 'transportId'>): Promise<BaseLogMessage[] | undefined>;
245
-
246
- export declare function getLogsHandler({ mastra, transportId, }: Pick<LogsContext, 'mastra' | 'transportId'>): Promise<BaseLogMessage[]>;
247
-
248
- export declare function getLogTransports({ mastra }: Pick<LogsContext, 'mastra'>): Promise<{
249
- transports: string[];
250
- }>;
251
-
252
- export declare function getMemoryStatusHandler({ mastra, agentId }: Pick<MemoryContext, 'mastra' | 'agentId'>): Promise<{
253
- result: boolean;
254
- }>;
255
-
256
- export declare function getMessagesHandler({ mastra, agentId, threadId, limit, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId'> & {
257
- limit?: number;
258
- }): Promise<{
259
- messages: CoreMessage[];
260
- uiMessages: Message[];
261
- }>;
262
-
263
- export declare function getNetworkByIdHandler({ mastra, networkId, runtimeContext, }: Pick<NetworkContext, 'mastra' | 'networkId' | 'runtimeContext'>): Promise<{
264
- id: string;
265
- name: string;
266
- instructions: string;
267
- agents: {
268
- name: string;
269
- provider: string;
270
- modelId: string;
271
- }[];
272
- routingModel: {
273
- provider: string;
274
- modelId: string;
275
- };
276
- }>;
277
-
278
- export declare function getNetworksHandler({ mastra, runtimeContext, }: Pick<NetworkContext, 'mastra' | 'runtimeContext'>): Promise<{
279
- id: string;
280
- name: string;
281
- instructions: string;
282
- agents: {
283
- name: string;
284
- provider: string;
285
- modelId: string;
286
- }[];
287
- routingModel: {
288
- provider: string;
289
- modelId: string;
290
- };
291
- }[]>;
292
-
293
- /**
294
- * Get available speakers for an agent
295
- */
296
- export declare function getSpeakersHandler({ mastra, agentId }: VoiceContext): Promise<{
297
- voiceId: string;
298
- }[]>;
299
-
300
- export declare function getTelemetryHandler({ mastra, body }: TelemetryContext): Promise<any[]>;
301
-
302
- export declare function getThreadByIdHandler({ mastra, agentId, threadId, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId'>): Promise<StorageThreadType>;
303
-
304
- export declare function getThreadsHandler({ mastra, agentId, resourceId, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'resourceId'>): Promise<StorageThreadType[]>;
305
-
306
- export declare function getToolByIdHandler({ tools, toolId }: Pick<ToolsContext, 'tools' | 'toolId'>): Promise<any>;
307
-
308
- export declare function getToolsHandler({ tools }: Pick<ToolsContext, 'tools'>): Promise<Record<string, any>>;
309
-
310
- export declare function getVNextWorkflowByIdHandler({ mastra, workflowId }: VNextWorkflowContext): Promise<{
311
- steps: SerializedStep[];
312
- name: string | undefined;
313
- stepGraph: SerializedStepFlowEntry[];
314
- inputSchema: string | undefined;
315
- outputSchema: string | undefined;
316
- }>;
317
-
318
- export declare function getVNextWorkflowRunByIdHandler({ mastra, workflowId, runId, }: Pick<VNextWorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReturnType<NewWorkflow['getWorkflowRunById']>>;
319
-
320
- export declare function getVNextWorkflowRunsHandler({ mastra, workflowId, fromDate, toDate, limit, offset, resourceId, }: VNextWorkflowContext & {
321
- fromDate?: Date;
322
- toDate?: Date;
323
- limit?: number;
324
- offset?: number;
325
- resourceId?: string;
326
- }): Promise<VNextWorkflowRuns>;
327
-
328
- export declare function getVNextWorkflowsHandler({ mastra }: VNextWorkflowContext): Promise<any>;
329
-
330
- export declare function getWorkflowByIdHandler({ mastra, workflowId }: WorkflowContext): Promise<{
331
- stepGraph: StepGraph;
332
- stepSubscriberGraph: Record<string, StepGraph>;
333
- serializedStepGraph: StepGraph;
334
- serializedStepSubscriberGraph: Record<string, StepGraph>;
335
- name: string;
336
- triggerSchema: string | undefined;
337
- steps: any;
338
- }>;
339
-
340
- export declare function getWorkflowRunHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReturnType<Workflow['getRun']>>;
341
-
342
- export declare function getWorkflowRunsHandler({ mastra, workflowId, fromDate, toDate, limit, offset, resourceId, }: WorkflowContext & {
343
- fromDate?: Date;
344
- toDate?: Date;
345
- limit?: number;
346
- offset?: number;
347
- resourceId?: string;
348
- }): Promise<WorkflowRuns>;
349
-
350
- export declare function getWorkflowsHandler({ mastra }: WorkflowContext): Promise<any>;
351
-
352
- export declare function handleError(error: unknown, defaultMessage: string): never;
353
-
354
- export declare function handleTaskCancel({ requestId, taskStore, agentId, taskId, logger, }: {
355
- requestId: string;
356
- taskStore: InMemoryTaskStore;
357
- agentId: string;
358
- taskId: string;
359
- logger?: Logger;
360
- }): Promise<JSONRPCResponse<Task, unknown>>;
361
-
362
- export declare function handleTaskGet({ requestId, taskStore, agentId, taskId, }: {
363
- requestId: string;
364
- taskStore: InMemoryTaskStore;
365
- agentId: string;
366
- taskId: string;
367
- }): Promise<JSONRPCResponse<TaskAndHistory, unknown>>;
368
-
369
- export declare function handleTaskSend({ requestId, params, taskStore, agent, logger, runtimeContext, }: {
370
- requestId: string;
371
- params: TaskSendParams;
372
- taskStore: InMemoryTaskStore;
373
- agent: Agent;
374
- logger?: Logger;
375
- runtimeContext: RuntimeContext;
376
- }): Promise<JSONRPCResponse<null, unknown> | JSONRPCResponse<Task, unknown>>;
377
-
378
- export declare function handleTaskSendSubscribe({ requestId, params, taskStore, agent, logger, runtimeContext, }: {
379
- requestId: string;
380
- params: TaskSendParams;
381
- taskStore: InMemoryTaskStore;
382
- agent: Agent;
383
- logger?: Logger;
384
- runtimeContext: RuntimeContext;
385
- }): AsyncGenerator<JSONRPCResponse<null, unknown> | JSONRPCResponse<Task, unknown> | JSONRPCResponse< {
386
- state: string;
387
- message: {
388
- role: string;
389
- parts: {
390
- type: string;
391
- text: string;
392
- }[];
393
- };
394
- }, unknown>, void, unknown>;
395
-
396
- /**
397
- * `HTTPException` must be used when a fatal error such as authentication failure occurs.
398
- *
399
- * @see {@link https://hono.dev/docs/api/exception}
400
- *
401
- * @param {StatusCode} status - status code of HTTPException
402
- * @param {HTTPExceptionOptions} options - options of HTTPException
403
- * @param {HTTPExceptionOptions["res"]} options.res - response of options of HTTPException
404
- * @param {HTTPExceptionOptions["message"]} options.message - message of options of HTTPException
405
- * @param {HTTPExceptionOptions["cause"]} options.cause - cause of options of HTTPException
406
- *
407
- * @example
408
- * ```ts
409
- * import { HTTPException } from 'hono/http-exception'
410
- *
411
- * // ...
412
- *
413
- * app.post('/auth', async (c, next) => {
414
- * // authentication
415
- * if (authorized === false) {
416
- * throw new HTTPException(401, { message: 'Custom error message' })
417
- * }
418
- * await next()
419
- * })
420
- * ```
421
- */
422
- export declare class HTTPException extends Error {
423
- readonly res?: Response;
424
- readonly status: StatusCode;
425
- /**
426
- * Creates an instance of `HTTPException`.
427
- * @param status - HTTP status code for the exception. Defaults to 500.
428
- * @param options - Additional options for the exception.
429
- */
430
- constructor(status?: StatusCode, options?: HTTPExceptionOptions);
431
- /**
432
- * Returns the response object associated with the exception.
433
- * If a response object is not provided, a new response is created with the error message and status code.
434
- * @returns The response object.
435
- */
436
- getResponse(): Response;
437
- }
438
-
439
- /**
440
- * Options for creating an `HTTPException`.
441
- * @property res - Optional response object to use.
442
- * @property message - Optional custom error message.
443
- * @property cause - Optional cause of the error.
444
- */
445
- declare type HTTPExceptionOptions = {
446
- res?: Response;
447
- message?: string;
448
- cause?: unknown;
449
- };
450
-
451
- /**
452
- * @module
453
- * This module provides the `HTTPException` class.
454
- */
455
- declare type InfoStatusCode = 100 | 101 | 102 | 103;
456
-
457
- export declare class InMemoryTaskStore {
458
- private store;
459
- activeCancellations: Set<string>;
460
- load({ agentId, taskId }: {
461
- agentId: string;
462
- taskId: string;
463
- }): Promise<TaskAndHistory | null>;
464
- save({ agentId, data }: {
465
- agentId: string;
466
- data: TaskAndHistory;
467
- }): Promise<void>;
468
- }
469
-
470
- export declare function listIndexes({ mastra, vectorName }: Pick<VectorContext, 'mastra' | 'vectorName'>): Promise<string[]>;
471
-
472
- export declare function loadOrCreateTaskAndHistory({ agentId, taskId, taskStore, message, sessionId, metadata, logger, }: {
473
- agentId: string;
474
- taskId: string;
475
- taskStore: InMemoryTaskStore;
476
- message: Message_2;
477
- sessionId?: string | null;
478
- metadata?: Record<string, unknown> | null;
479
- logger?: Logger;
480
- }): Promise<TaskAndHistory>;
481
-
482
- export declare namespace logs {
483
- export {
484
- getLogsHandler,
485
- getLogsByRunIdHandler,
486
- getLogTransports
487
- }
488
- }
489
-
490
- declare type LogsContext = {
491
- mastra: Mastra;
492
- transportId?: string;
493
- runId?: string;
494
- };
495
-
496
- export declare namespace memory {
497
- export {
498
- getMemoryStatusHandler,
499
- getThreadsHandler,
500
- getThreadByIdHandler,
501
- saveMessagesHandler,
502
- createThreadHandler,
503
- updateThreadHandler,
504
- deleteThreadHandler,
505
- getMessagesHandler
506
- }
507
- }
508
-
509
- declare interface MemoryContext extends Context {
510
- agentId?: string;
511
- resourceId?: string;
512
- threadId?: string;
513
- }
514
-
515
- export declare namespace network {
516
- export {
517
- getNetworksHandler,
518
- getNetworkByIdHandler,
519
- generateHandler_alias_1 as generateHandler,
520
- streamGenerateHandler_alias_1 as streamGenerateHandler
521
- }
522
- }
523
-
524
- declare interface NetworkContext extends Context {
525
- networkId?: string;
526
- runtimeContext: RuntimeContext;
527
- }
528
-
529
- export declare function normalizeError(error: any, reqId: number | string | null, taskId?: string, logger?: Logger): JSONRPCResponse<null, unknown>;
530
-
531
- declare interface QueryRequest {
532
- indexName: string;
533
- queryVector: number[];
534
- topK?: number;
535
- filter?: Record<string, any>;
536
- includeVector?: boolean;
537
- }
538
-
539
- export declare function queryVectors({ mastra, vectorName, query, }: Pick<VectorContext, 'mastra' | 'vectorName'> & {
540
- query: QueryRequest;
541
- }): Promise<QueryResult[]>;
542
-
543
- declare type RedirectStatusCode = 300 | 301 | 302 | 303 | 304 | DeprecatedStatusCode | 307 | 308;
544
-
545
- export declare function resumeAsyncVNextWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, runtimeContextFromRequest, }: VNextWorkflowContext & {
546
- body: {
547
- step: string | string[];
548
- resumeData?: unknown;
549
- };
550
- runtimeContext?: RuntimeContext_2;
551
- runtimeContextFromRequest?: Record<string, unknown>;
552
- }): Promise<WorkflowResult<ZodType<any, ZodTypeDef, any>, NewStep<string, any, any, any, any>[]>>;
553
-
554
- export declare function resumeAsyncWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }: WorkflowContext & {
555
- body: {
556
- stepId: string;
557
- context: any;
558
- };
559
- runtimeContext: RuntimeContext;
560
- }): Promise<Omit<WorkflowRunResult<any, Step<string, any, any, StepExecutionContext<any, WorkflowContext_2<any, Step<string, any, any, any>[], Record<string, any>>>>[], any>, "runId"> | undefined>;
561
-
562
- export declare function resumeVNextWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }: VNextWorkflowContext & {
563
- body: {
564
- step: string | string[];
565
- resumeData?: unknown;
566
- };
567
- runtimeContext?: RuntimeContext_2;
568
- }): Promise<{
569
- message: string;
570
- }>;
571
-
572
- export declare function resumeWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }: WorkflowContext & {
573
- body: {
574
- stepId: string;
575
- context: any;
576
- };
577
- runtimeContext: RuntimeContext;
578
- }): Promise<{
579
- message: string;
580
- }>;
581
-
582
- export declare function saveMessagesHandler({ mastra, agentId, body, }: Pick<MemoryContext, 'mastra' | 'agentId'> & {
583
- body: {
584
- messages: Parameters<MastraMemory['saveMessages']>[0]['messages'];
585
- };
586
- }): Promise<MessageType[]>;
587
-
588
- declare type SerializedStep = {
589
- id: string;
590
- description: string;
591
- inputSchema: string | undefined;
592
- outputSchema: string | undefined;
593
- resumeSchema: string | undefined;
594
- suspendSchema: string | undefined;
595
- };
596
-
597
- declare type ServerErrorStatusCode = 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511;
598
-
599
- export declare function startAsyncVNextWorkflowHandler({ mastra, runtimeContext, workflowId, runId, inputData, runtimeContextFromRequest, }: Pick<VNextWorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
600
- inputData?: unknown;
601
- runtimeContext?: RuntimeContext_2;
602
- runtimeContextFromRequest?: Record<string, unknown>;
603
- }): Promise<WorkflowResult<ZodType<any, ZodTypeDef, any>, NewStep<string, any, any, any, any>[]>>;
604
-
605
- export declare function startAsyncWorkflowHandler({ mastra, runtimeContext, workflowId, runId, triggerData, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
606
- triggerData?: unknown;
607
- runtimeContext: RuntimeContext;
608
- }): Promise<WorkflowRunResult<any, Step<string, any, any, StepExecutionContext<any, WorkflowContext_2<any, Step<string, any, any, any>[], Record<string, any>>>>[], any>>;
609
-
610
- export declare function startVNextWorkflowRunHandler({ mastra, runtimeContext, workflowId, runId, inputData, runtimeContextFromRequest, }: Pick<VNextWorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
611
- inputData?: unknown;
612
- runtimeContext?: RuntimeContext_2;
613
- runtimeContextFromRequest?: Record<string, unknown>;
614
- }): Promise<{
615
- message: string;
616
- }>;
617
-
618
- export declare function startWorkflowRunHandler({ mastra, runtimeContext, workflowId, runId, triggerData, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
619
- triggerData?: unknown;
620
- runtimeContext: RuntimeContext;
621
- }): Promise<{
622
- message: string;
623
- }>;
624
-
625
- /**
626
- * If you want to use an unofficial status, use `UnofficialStatusCode`.
627
- */
628
- export declare type StatusCode = InfoStatusCode | SuccessStatusCode | RedirectStatusCode | ClientErrorStatusCode | ServerErrorStatusCode | UnofficialStatusCode;
629
-
630
- export declare function storeTelemetryHandler({ mastra, body }: Context & {
631
- body: {
632
- resourceSpans: any[];
633
- };
634
- }): Promise<{
635
- status: string;
636
- message: string;
637
- error: any;
638
- } | {
639
- status: string;
640
- message: string;
641
- traceCount: number;
642
- }>;
643
-
644
- export declare function streamGenerateHandler({ mastra, runtimeContext, agentId, body, }: Context & {
645
- runtimeContext: RuntimeContext;
646
- agentId: string;
647
- body: GetBody<'stream'> & {
648
- resourceid?: string;
649
- runtimeContext?: string;
650
- };
651
- }): Promise<Response | undefined>;
652
-
653
- export declare function streamGenerateHandler_alias_1({ mastra, networkId, body, runtimeContext, }: NetworkContext & {
654
- runtimeContext: RuntimeContext;
655
- body: {
656
- messages?: Parameters<AgentNetwork['stream']>[0];
657
- } & Parameters<AgentNetwork['stream']>[1];
658
- }): Promise<Response>;
659
-
660
- declare type SuccessStatusCode = 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226;
661
-
662
- export declare namespace telemetry {
663
- export {
664
- getTelemetryHandler,
665
- storeTelemetryHandler
666
- }
667
- }
668
-
669
- declare interface TelemetryContext extends Context {
670
- body?: {
671
- name?: string;
672
- scope?: string;
673
- page?: number;
674
- perPage?: number;
675
- attribute?: string | string[];
676
- fromDate?: Date;
677
- toDate?: Date;
678
- };
679
- }
680
-
681
- export declare namespace tools {
682
- export {
683
- getToolsHandler,
684
- getToolByIdHandler,
685
- executeToolHandler,
686
- executeAgentToolHandler
687
- }
688
- }
689
-
690
- declare interface ToolsContext extends Context {
691
- tools?: Record<string, ToolAction | VercelTool>;
692
- toolId?: string;
693
- runId?: string;
694
- }
695
-
696
- /**
697
- * Transcribe speech to text
698
- */
699
- export declare function transcribeSpeechHandler({ mastra, agentId, body, }: VoiceContext & {
700
- body?: {
701
- audioData?: Buffer;
702
- options?: Parameters<NonNullable<Agent['voice']>['listen']>[1];
703
- };
704
- }): Promise<{
705
- text: string | void | NodeJS.ReadableStream;
706
- }>;
707
-
708
- /**
709
- * @deprecated
710
- * Use `UnofficialStatusCode` instead.
711
- */
712
- export declare type UnOfficalStatusCode = UnofficialStatusCode;
713
-
714
- /**
715
- * `UnofficialStatusCode` can be used to specify an unofficial status code.
716
- * @example
717
- *
718
- * ```ts
719
- * app.get('/unknown', (c) => {
720
- * return c.text("Unknown Error", 520 as UnofficialStatusCode)
721
- * })
722
- * ```
723
- */
724
- export declare type UnofficialStatusCode = -1;
725
-
726
- export declare function updateThreadHandler({ mastra, agentId, threadId, body, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId'> & {
727
- body?: Parameters<MastraMemory['saveThread']>[0]['thread'];
728
- }): Promise<StorageThreadType>;
729
-
730
- declare interface UpsertRequest {
731
- indexName: string;
732
- vectors: number[][];
733
- metadata?: Record<string, any>[];
734
- ids?: string[];
735
- }
736
-
737
- export declare function upsertVectors({ mastra, vectorName, index }: VectorContext & {
738
- index: UpsertRequest;
739
- }): Promise<{
740
- ids: string[];
741
- }>;
742
-
743
- export declare function validateBody(body: Record<string, unknown>): void;
744
-
745
- export declare namespace vector {
746
- export {
747
- upsertVectors,
748
- createIndex,
749
- queryVectors,
750
- listIndexes,
751
- describeIndex,
752
- deleteIndex
753
- }
754
- }
755
-
756
- declare interface VectorContext extends Context {
757
- vectorName?: string;
758
- }
759
-
760
- declare interface VNextWorkflowContext extends Context {
761
- workflowId?: string;
762
- runId?: string;
763
- }
764
-
765
- export declare namespace vNextWorkflows {
766
- export {
767
- getVNextWorkflowsHandler,
768
- getVNextWorkflowByIdHandler,
769
- getVNextWorkflowRunByIdHandler,
770
- createVNextWorkflowRunHandler,
771
- startAsyncVNextWorkflowHandler,
772
- startVNextWorkflowRunHandler,
773
- watchVNextWorkflowHandler,
774
- resumeAsyncVNextWorkflowHandler,
775
- resumeVNextWorkflowHandler,
776
- getVNextWorkflowRunsHandler
777
- }
778
- }
779
-
780
- export declare namespace voice {
781
- export {
782
- getSpeakersHandler,
783
- generateSpeechHandler,
784
- transcribeSpeechHandler
785
- }
786
- }
787
-
788
- declare interface VoiceContext extends Context {
789
- agentId?: string;
790
- }
791
-
792
- export declare function watchVNextWorkflowHandler({ mastra, workflowId, runId, }: Pick<VNextWorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReadableStream_2<string>>;
793
-
794
- export declare function watchWorkflowHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReadableStream_2<string>>;
795
-
796
- declare interface WorkflowContext extends Context {
797
- workflowId?: string;
798
- runId?: string;
799
- }
800
-
801
- export declare namespace workflows {
802
- export {
803
- getWorkflowsHandler,
804
- getWorkflowByIdHandler,
805
- startAsyncWorkflowHandler,
806
- getWorkflowRunHandler,
807
- createRunHandler,
808
- startWorkflowRunHandler,
809
- watchWorkflowHandler,
810
- resumeAsyncWorkflowHandler,
811
- resumeWorkflowHandler,
812
- getWorkflowRunsHandler
813
- }
814
- }
815
-
816
- export { }