@mastra/server 0.0.0-vnext-inngest-20250508131921 → 0.0.0-vnext-20251119160359

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 (270) hide show
  1. package/CHANGELOG.md +4880 -0
  2. package/LICENSE.md +11 -42
  3. package/README.md +1 -6
  4. package/dist/chunk-2PLXW4ZX.cjs +2777 -0
  5. package/dist/chunk-2PLXW4ZX.cjs.map +1 -0
  6. package/dist/chunk-2YZH5PH6.cjs +200 -0
  7. package/dist/chunk-2YZH5PH6.cjs.map +1 -0
  8. package/dist/chunk-3AMNUUZF.js +124 -0
  9. package/dist/chunk-3AMNUUZF.js.map +1 -0
  10. package/dist/chunk-3F52QCI4.js +192 -0
  11. package/dist/chunk-3F52QCI4.js.map +1 -0
  12. package/dist/{chunk-FV45V6WC.cjs → chunk-64ITUOXI.cjs} +3 -7
  13. package/dist/chunk-64ITUOXI.cjs.map +1 -0
  14. package/dist/{chunk-TRDNDNGQ.js → chunk-6QWQZI4Q.js} +4 -7
  15. package/dist/chunk-6QWQZI4Q.js.map +1 -0
  16. package/dist/chunk-73PAWDM5.js +83 -0
  17. package/dist/chunk-73PAWDM5.js.map +1 -0
  18. package/dist/chunk-7HVY3D64.cjs +22955 -0
  19. package/dist/chunk-7HVY3D64.cjs.map +1 -0
  20. package/dist/chunk-A24TSVEZ.cjs +130 -0
  21. package/dist/chunk-A24TSVEZ.cjs.map +1 -0
  22. package/dist/chunk-B3Z6J745.js +122 -0
  23. package/dist/chunk-B3Z6J745.js.map +1 -0
  24. package/dist/chunk-BTWIR2B7.cjs +28 -0
  25. package/dist/chunk-BTWIR2B7.cjs.map +1 -0
  26. package/dist/chunk-D7T74TVR.js +129 -0
  27. package/dist/chunk-D7T74TVR.js.map +1 -0
  28. package/dist/chunk-EHACNWDL.cjs +681 -0
  29. package/dist/chunk-EHACNWDL.cjs.map +1 -0
  30. package/dist/chunk-FPBYKMIS.js +477 -0
  31. package/dist/chunk-FPBYKMIS.js.map +1 -0
  32. package/dist/chunk-GLAZTMX3.cjs +128 -0
  33. package/dist/chunk-GLAZTMX3.cjs.map +1 -0
  34. package/dist/chunk-GU4EWMZB.cjs +769 -0
  35. package/dist/chunk-GU4EWMZB.cjs.map +1 -0
  36. package/dist/chunk-KF3RI45U.cjs +172 -0
  37. package/dist/chunk-KF3RI45U.cjs.map +1 -0
  38. package/dist/chunk-KJIDZQRA.cjs +485 -0
  39. package/dist/chunk-KJIDZQRA.cjs.map +1 -0
  40. package/dist/{chunk-4JINXASC.js → chunk-KWH5QBXP.js} +7 -4
  41. package/dist/chunk-KWH5QBXP.js.map +1 -0
  42. package/dist/chunk-LF2ZLOFP.js +767 -0
  43. package/dist/chunk-LF2ZLOFP.js.map +1 -0
  44. package/dist/chunk-LPM6BBAX.cjs +1043 -0
  45. package/dist/chunk-LPM6BBAX.cjs.map +1 -0
  46. package/dist/chunk-ND5OKOMT.js +165 -0
  47. package/dist/chunk-ND5OKOMT.js.map +1 -0
  48. package/dist/chunk-O7I5CWRX.cjs +44 -0
  49. package/dist/chunk-O7I5CWRX.cjs.map +1 -0
  50. package/dist/chunk-PPMIB3FQ.cjs +88 -0
  51. package/dist/chunk-PPMIB3FQ.cjs.map +1 -0
  52. package/dist/chunk-PR4QN5HX.js +39 -0
  53. package/dist/chunk-PR4QN5HX.js.map +1 -0
  54. package/dist/chunk-QU6N55W6.cjs +256 -0
  55. package/dist/chunk-QU6N55W6.cjs.map +1 -0
  56. package/dist/chunk-RQK4FQUD.js +1012 -0
  57. package/dist/chunk-RQK4FQUD.js.map +1 -0
  58. package/dist/{chunk-M56ECCHK.cjs → chunk-S54HNARD.cjs} +22 -19
  59. package/dist/chunk-S54HNARD.cjs.map +1 -0
  60. package/dist/chunk-SHWNNZBL.js +254 -0
  61. package/dist/chunk-SHWNNZBL.js.map +1 -0
  62. package/dist/{chunk-L7XE5QTW.js → chunk-SZIFSF4T.js} +11 -2
  63. package/dist/chunk-SZIFSF4T.js.map +1 -0
  64. package/dist/chunk-TOCYBDP2.js +46 -0
  65. package/dist/chunk-TOCYBDP2.js.map +1 -0
  66. package/dist/chunk-U7GLIXYO.cjs +534 -0
  67. package/dist/chunk-U7GLIXYO.cjs.map +1 -0
  68. package/dist/chunk-UXGQZUYZ.js +16 -0
  69. package/dist/chunk-UXGQZUYZ.js.map +1 -0
  70. package/dist/chunk-V5WWQN7P.cjs +18 -0
  71. package/dist/chunk-V5WWQN7P.cjs.map +1 -0
  72. package/dist/chunk-V6JYJS7O.js +518 -0
  73. package/dist/chunk-V6JYJS7O.js.map +1 -0
  74. package/dist/chunk-VEVU6EUO.js +22916 -0
  75. package/dist/chunk-VEVU6EUO.js.map +1 -0
  76. package/dist/chunk-W2KMU354.cjs +133 -0
  77. package/dist/chunk-W2KMU354.cjs.map +1 -0
  78. package/dist/chunk-X3MICMI2.cjs +620 -0
  79. package/dist/chunk-X3MICMI2.cjs.map +1 -0
  80. package/dist/chunk-X6C7BUWN.cjs +48 -0
  81. package/dist/chunk-X6C7BUWN.cjs.map +1 -0
  82. package/dist/chunk-Z2O5YVHY.js +661 -0
  83. package/dist/chunk-Z2O5YVHY.js.map +1 -0
  84. package/dist/chunk-ZJ6KEY6H.js +600 -0
  85. package/dist/chunk-ZJ6KEY6H.js.map +1 -0
  86. package/dist/chunk-ZULZ2752.js +2774 -0
  87. package/dist/chunk-ZULZ2752.js.map +1 -0
  88. package/dist/dist-4MVGNSRL.cjs +1150 -0
  89. package/dist/dist-4MVGNSRL.cjs.map +1 -0
  90. package/dist/dist-FZYCV3VB.cjs +940 -0
  91. package/dist/dist-FZYCV3VB.cjs.map +1 -0
  92. package/dist/dist-G2BYZJOC.cjs +928 -0
  93. package/dist/dist-G2BYZJOC.cjs.map +1 -0
  94. package/dist/dist-P4MXBQ3U.cjs +16 -0
  95. package/dist/dist-P4MXBQ3U.cjs.map +1 -0
  96. package/dist/dist-PQZUVLPC.js +937 -0
  97. package/dist/dist-PQZUVLPC.js.map +1 -0
  98. package/dist/dist-R7WYX6LC.js +925 -0
  99. package/dist/dist-R7WYX6LC.js.map +1 -0
  100. package/dist/dist-RFMYFILX.cjs +764 -0
  101. package/dist/dist-RFMYFILX.cjs.map +1 -0
  102. package/dist/dist-X7XR3M3Z.js +1147 -0
  103. package/dist/dist-X7XR3M3Z.js.map +1 -0
  104. package/dist/dist-XVBSOGFK.js +761 -0
  105. package/dist/dist-XVBSOGFK.js.map +1 -0
  106. package/dist/dist-YREX2TJT.js +3 -0
  107. package/dist/dist-YREX2TJT.js.map +1 -0
  108. package/dist/index.cjs +6 -0
  109. package/dist/index.cjs.map +1 -0
  110. package/dist/index.d.ts +1 -0
  111. package/dist/index.d.ts.map +1 -0
  112. package/dist/index.js +5 -0
  113. package/dist/index.js.map +1 -0
  114. package/dist/server/a2a/protocol.d.ts +8 -0
  115. package/dist/server/a2a/protocol.d.ts.map +1 -0
  116. package/dist/server/a2a/store.cjs +25 -0
  117. package/dist/server/a2a/store.cjs.map +1 -0
  118. package/dist/server/a2a/store.d.ts +14 -0
  119. package/dist/server/a2a/store.d.ts.map +1 -0
  120. package/dist/server/a2a/store.js +23 -0
  121. package/dist/server/a2a/store.js.map +1 -0
  122. package/dist/server/a2a/tasks.d.ts +20 -0
  123. package/dist/server/a2a/tasks.d.ts.map +1 -0
  124. package/dist/server/handlers/a2a.cjs +32 -0
  125. package/dist/server/handlers/a2a.cjs.map +1 -0
  126. package/dist/server/handlers/a2a.d.ts +68 -0
  127. package/dist/server/handlers/a2a.d.ts.map +1 -0
  128. package/dist/server/handlers/a2a.js +3 -0
  129. package/dist/server/handlers/a2a.js.map +1 -0
  130. package/dist/server/handlers/agent-builder.cjs +80 -0
  131. package/dist/server/handlers/agent-builder.cjs.map +1 -0
  132. package/dist/server/handlers/agent-builder.d.ts +85 -0
  133. package/dist/server/handlers/agent-builder.d.ts.map +1 -0
  134. package/dist/server/handlers/agent-builder.js +3 -0
  135. package/dist/server/handlers/agent-builder.js.map +1 -0
  136. package/dist/server/handlers/agents.cjs +60 -10
  137. package/dist/server/handlers/agents.cjs.map +1 -0
  138. package/dist/server/handlers/agents.d.ts +194 -6
  139. package/dist/server/handlers/agents.d.ts.map +1 -0
  140. package/dist/server/handlers/agents.js +3 -1
  141. package/dist/server/handlers/agents.js.map +1 -0
  142. package/dist/server/handlers/error.cjs +4 -2
  143. package/dist/server/handlers/error.cjs.map +1 -0
  144. package/dist/server/handlers/error.d.ts +2 -1
  145. package/dist/server/handlers/error.d.ts.map +1 -0
  146. package/dist/server/handlers/error.js +3 -1
  147. package/dist/server/handlers/error.js.map +1 -0
  148. package/dist/server/handlers/logs.cjs +9 -7
  149. package/dist/server/handlers/logs.cjs.map +1 -0
  150. package/dist/server/handlers/logs.d.ts +34 -3
  151. package/dist/server/handlers/logs.d.ts.map +1 -0
  152. package/dist/server/handlers/logs.js +3 -1
  153. package/dist/server/handlers/logs.js.map +1 -0
  154. package/dist/server/handlers/memory.cjs +37 -11
  155. package/dist/server/handlers/memory.cjs.map +1 -0
  156. package/dist/server/handlers/memory.d.ts +113 -8
  157. package/dist/server/handlers/memory.d.ts.map +1 -0
  158. package/dist/server/handlers/memory.js +3 -1
  159. package/dist/server/handlers/memory.js.map +1 -0
  160. package/dist/server/handlers/observability.cjs +24 -0
  161. package/dist/server/handlers/observability.cjs.map +1 -0
  162. package/dist/server/handlers/observability.d.ts +49 -0
  163. package/dist/server/handlers/observability.d.ts.map +1 -0
  164. package/dist/server/handlers/observability.js +3 -0
  165. package/dist/server/handlers/observability.js.map +1 -0
  166. package/dist/server/handlers/scores.cjs +32 -0
  167. package/dist/server/handlers/scores.cjs.map +1 -0
  168. package/dist/server/handlers/scores.d.ts +152 -0
  169. package/dist/server/handlers/scores.d.ts.map +1 -0
  170. package/dist/server/handlers/scores.js +3 -0
  171. package/dist/server/handlers/scores.js.map +1 -0
  172. package/dist/server/handlers/tools.cjs +12 -6
  173. package/dist/server/handlers/tools.cjs.map +1 -0
  174. package/dist/server/handlers/tools.d.ts +25 -4
  175. package/dist/server/handlers/tools.d.ts.map +1 -0
  176. package/dist/server/handlers/tools.js +3 -1
  177. package/dist/server/handlers/tools.js.map +1 -0
  178. package/dist/server/handlers/utils.cjs +8 -2
  179. package/dist/server/handlers/utils.cjs.map +1 -0
  180. package/dist/server/handlers/utils.d.ts +8 -1
  181. package/dist/server/handlers/utils.d.ts.map +1 -0
  182. package/dist/server/handlers/utils.js +3 -1
  183. package/dist/server/handlers/utils.js.map +1 -0
  184. package/dist/server/handlers/vector.cjs +9 -7
  185. package/dist/server/handlers/vector.cjs.map +1 -0
  186. package/dist/server/handlers/vector.d.ts +51 -6
  187. package/dist/server/handlers/vector.d.ts.map +1 -0
  188. package/dist/server/handlers/vector.js +3 -1
  189. package/dist/server/handlers/vector.js.map +1 -0
  190. package/dist/server/handlers/voice.cjs +10 -4
  191. package/dist/server/handlers/voice.cjs.map +1 -0
  192. package/dist/server/handlers/voice.d.ts +41 -3
  193. package/dist/server/handlers/voice.d.ts.map +1 -0
  194. package/dist/server/handlers/voice.js +3 -1
  195. package/dist/server/handlers/voice.js.map +1 -0
  196. package/dist/server/handlers/workflows.cjs +50 -16
  197. package/dist/server/handlers/workflows.cjs.map +1 -0
  198. package/dist/server/handlers/workflows.d.ts +88 -10
  199. package/dist/server/handlers/workflows.d.ts.map +1 -0
  200. package/dist/server/handlers/workflows.js +3 -1
  201. package/dist/server/handlers/workflows.js.map +1 -0
  202. package/dist/server/handlers.cjs +37 -30
  203. package/dist/server/handlers.cjs.map +1 -0
  204. package/dist/server/handlers.d.ts +12 -10
  205. package/dist/server/handlers.d.ts.map +1 -0
  206. package/dist/server/handlers.js +13 -10
  207. package/dist/server/handlers.js.map +1 -0
  208. package/dist/server/http-exception.d.ts +82 -0
  209. package/dist/server/http-exception.d.ts.map +1 -0
  210. package/dist/server/types.d.ts +10 -0
  211. package/dist/server/types.d.ts.map +1 -0
  212. package/dist/server/utils.d.ts +45 -0
  213. package/dist/server/utils.d.ts.map +1 -0
  214. package/dist/token-375W3LEI.cjs +64 -0
  215. package/dist/token-375W3LEI.cjs.map +1 -0
  216. package/dist/token-C3IMNCC4.js +62 -0
  217. package/dist/token-C3IMNCC4.js.map +1 -0
  218. package/dist/token-util-CV3RRG6K.cjs +9 -0
  219. package/dist/token-util-CV3RRG6K.cjs.map +1 -0
  220. package/dist/token-util-E5QO2RCL.js +7 -0
  221. package/dist/token-util-E5QO2RCL.js.map +1 -0
  222. package/package.json +48 -19
  223. package/dist/_tsup-dts-rollup.d.cts +0 -670
  224. package/dist/_tsup-dts-rollup.d.ts +0 -670
  225. package/dist/chunk-2FJURXCL.cjs +0 -213
  226. package/dist/chunk-3AHQ5RGN.js +0 -11
  227. package/dist/chunk-3EJZQ6TQ.js +0 -49
  228. package/dist/chunk-3XTEV33Q.js +0 -317
  229. package/dist/chunk-55HTWX4C.cjs +0 -93
  230. package/dist/chunk-5JNVY6DU.js +0 -120
  231. package/dist/chunk-5SWCVTNL.cjs +0 -5579
  232. package/dist/chunk-5YGDYMRB.cjs +0 -147
  233. package/dist/chunk-6Q7UXAYJ.cjs +0 -198
  234. package/dist/chunk-AMVOS7YB.cjs +0 -141
  235. package/dist/chunk-BPL2CBLV.js +0 -137
  236. package/dist/chunk-CHFORQ7J.cjs +0 -329
  237. package/dist/chunk-D3G23FP3.cjs +0 -126
  238. package/dist/chunk-GVBJ5I2S.js +0 -190
  239. package/dist/chunk-M2RXDCPV.cjs +0 -324
  240. package/dist/chunk-OMN3UI6X.js +0 -5576
  241. package/dist/chunk-OWNA6I2H.js +0 -312
  242. package/dist/chunk-Q6SHQECN.js +0 -88
  243. package/dist/chunk-QJ3AHN64.js +0 -141
  244. package/dist/chunk-QN4KF3BH.cjs +0 -18
  245. package/dist/chunk-RBQASTUP.js +0 -203
  246. package/dist/chunk-SKBVVI24.cjs +0 -54
  247. package/dist/chunk-ZLBRQFDD.cjs +0 -13
  248. package/dist/index.d.cts +0 -1
  249. package/dist/server/handlers/agents.d.cts +0 -6
  250. package/dist/server/handlers/error.d.cts +0 -1
  251. package/dist/server/handlers/logs.d.cts +0 -3
  252. package/dist/server/handlers/memory.d.cts +0 -8
  253. package/dist/server/handlers/network.cjs +0 -22
  254. package/dist/server/handlers/network.d.cts +0 -4
  255. package/dist/server/handlers/network.d.ts +0 -4
  256. package/dist/server/handlers/network.js +0 -1
  257. package/dist/server/handlers/telemetry.cjs +0 -14
  258. package/dist/server/handlers/telemetry.d.cts +0 -2
  259. package/dist/server/handlers/telemetry.d.ts +0 -2
  260. package/dist/server/handlers/telemetry.js +0 -1
  261. package/dist/server/handlers/tools.d.cts +0 -4
  262. package/dist/server/handlers/utils.d.cts +0 -1
  263. package/dist/server/handlers/vNextWorkflows.cjs +0 -46
  264. package/dist/server/handlers/vNextWorkflows.d.cts +0 -10
  265. package/dist/server/handlers/vNextWorkflows.d.ts +0 -10
  266. package/dist/server/handlers/vNextWorkflows.js +0 -1
  267. package/dist/server/handlers/vector.d.cts +0 -6
  268. package/dist/server/handlers/voice.d.cts +0 -3
  269. package/dist/server/handlers/workflows.d.cts +0 -10
  270. package/dist/server/handlers.d.cts +0 -10
@@ -1,3 +1,41 @@
1
- export { getSpeakersHandler } from '../../_tsup-dts-rollup.js';
2
- export { generateSpeechHandler } from '../../_tsup-dts-rollup.js';
3
- export { transcribeSpeechHandler } from '../../_tsup-dts-rollup.js';
1
+ import type { Agent } from '@mastra/core/agent';
2
+ import type { RequestContext } from '@mastra/core/request-context';
3
+ import type { Context } from '../types.js';
4
+ interface VoiceContext extends Context {
5
+ agentId?: string;
6
+ requestContext?: RequestContext;
7
+ }
8
+ /**
9
+ * Get available speakers for an agent
10
+ */
11
+ export declare function getSpeakersHandler({ mastra, agentId, requestContext }: VoiceContext): Promise<{
12
+ voiceId: string;
13
+ }[]>;
14
+ /**
15
+ * Generate speech from text
16
+ */
17
+ export declare function generateSpeechHandler({ mastra, agentId, body, requestContext, }: VoiceContext & {
18
+ body?: {
19
+ text?: string;
20
+ speakerId?: string;
21
+ };
22
+ }): Promise<NodeJS.ReadableStream>;
23
+ /**
24
+ * Transcribe speech to text
25
+ */
26
+ export declare function transcribeSpeechHandler({ mastra, agentId, body, requestContext, }: VoiceContext & {
27
+ body?: {
28
+ audioData?: Buffer;
29
+ options?: Parameters<NonNullable<Agent['voice']>['listen']>[1];
30
+ };
31
+ }): Promise<{
32
+ text: string | void | NodeJS.ReadableStream;
33
+ }>;
34
+ /**
35
+ * Get available listeners for an agent
36
+ */
37
+ export declare function getListenerHandler({ mastra, agentId, requestContext }: VoiceContext): Promise<{
38
+ enabled: boolean;
39
+ }>;
40
+ export {};
41
+ //# sourceMappingURL=voice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["../../../src/server/handlers/voice.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAKxC,UAAU,YAAa,SAAQ,OAAO;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,YAAY;;KAuBzF;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,EAC1C,MAAM,EACN,OAAO,EACP,IAAI,EACJ,cAAc,GACf,EAAE,YAAY,GAAG;IAChB,IAAI,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,kCAwCA;AAED;;GAEG;AACH,wBAAsB,uBAAuB,CAAC,EAC5C,MAAM,EACN,OAAO,EACP,IAAI,EACJ,cAAc,GACf,EAAE,YAAY,GAAG;IAChB,IAAI,CAAC,EAAE;QACL,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAChE,CAAC;CACH;;GA+BA;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,YAAY;;GAuBzF"}
@@ -1 +1,3 @@
1
- export { generateSpeechHandler, getSpeakersHandler, transcribeSpeechHandler } from '../../chunk-Q6SHQECN.js';
1
+ export { generateSpeechHandler, getListenerHandler, getSpeakersHandler, transcribeSpeechHandler } from '../../chunk-B3Z6J745.js';
2
+ //# sourceMappingURL=voice.js.map
3
+ //# sourceMappingURL=voice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"voice.js"}
@@ -1,46 +1,80 @@
1
1
  'use strict';
2
2
 
3
- var chunkCHFORQ7J_cjs = require('../../chunk-CHFORQ7J.cjs');
3
+ var chunkX3MICMI2_cjs = require('../../chunk-X3MICMI2.cjs');
4
4
 
5
5
 
6
6
 
7
- Object.defineProperty(exports, "createRunHandler", {
7
+ Object.defineProperty(exports, "cancelWorkflowRunHandler", {
8
8
  enumerable: true,
9
- get: function () { return chunkCHFORQ7J_cjs.createRunHandler; }
9
+ get: function () { return chunkX3MICMI2_cjs.cancelWorkflowRunHandler; }
10
+ });
11
+ Object.defineProperty(exports, "createWorkflowRunHandler", {
12
+ enumerable: true,
13
+ get: function () { return chunkX3MICMI2_cjs.createWorkflowRunHandler; }
10
14
  });
11
15
  Object.defineProperty(exports, "getWorkflowByIdHandler", {
12
16
  enumerable: true,
13
- get: function () { return chunkCHFORQ7J_cjs.getWorkflowByIdHandler; }
17
+ get: function () { return chunkX3MICMI2_cjs.getWorkflowByIdHandler; }
18
+ });
19
+ Object.defineProperty(exports, "getWorkflowRunByIdHandler", {
20
+ enumerable: true,
21
+ get: function () { return chunkX3MICMI2_cjs.getWorkflowRunByIdHandler; }
22
+ });
23
+ Object.defineProperty(exports, "getWorkflowRunExecutionResultHandler", {
24
+ enumerable: true,
25
+ get: function () { return chunkX3MICMI2_cjs.getWorkflowRunExecutionResultHandler; }
26
+ });
27
+ Object.defineProperty(exports, "listWorkflowRunsHandler", {
28
+ enumerable: true,
29
+ get: function () { return chunkX3MICMI2_cjs.listWorkflowRunsHandler; }
14
30
  });
15
- Object.defineProperty(exports, "getWorkflowRunHandler", {
31
+ Object.defineProperty(exports, "listWorkflowsHandler", {
16
32
  enumerable: true,
17
- get: function () { return chunkCHFORQ7J_cjs.getWorkflowRunHandler; }
33
+ get: function () { return chunkX3MICMI2_cjs.listWorkflowsHandler; }
18
34
  });
19
- Object.defineProperty(exports, "getWorkflowRunsHandler", {
35
+ Object.defineProperty(exports, "observeStreamLegacyWorkflowHandler", {
20
36
  enumerable: true,
21
- get: function () { return chunkCHFORQ7J_cjs.getWorkflowRunsHandler; }
37
+ get: function () { return chunkX3MICMI2_cjs.observeStreamLegacyWorkflowHandler; }
22
38
  });
23
- Object.defineProperty(exports, "getWorkflowsHandler", {
39
+ Object.defineProperty(exports, "observeStreamVNextWorkflowHandler", {
24
40
  enumerable: true,
25
- get: function () { return chunkCHFORQ7J_cjs.getWorkflowsHandler; }
41
+ get: function () { return chunkX3MICMI2_cjs.observeStreamVNextWorkflowHandler; }
42
+ });
43
+ Object.defineProperty(exports, "observeStreamWorkflowHandler", {
44
+ enumerable: true,
45
+ get: function () { return chunkX3MICMI2_cjs.observeStreamWorkflowHandler; }
26
46
  });
27
47
  Object.defineProperty(exports, "resumeAsyncWorkflowHandler", {
28
48
  enumerable: true,
29
- get: function () { return chunkCHFORQ7J_cjs.resumeAsyncWorkflowHandler; }
49
+ get: function () { return chunkX3MICMI2_cjs.resumeAsyncWorkflowHandler; }
50
+ });
51
+ Object.defineProperty(exports, "resumeStreamWorkflowHandler", {
52
+ enumerable: true,
53
+ get: function () { return chunkX3MICMI2_cjs.resumeStreamWorkflowHandler; }
30
54
  });
31
55
  Object.defineProperty(exports, "resumeWorkflowHandler", {
32
56
  enumerable: true,
33
- get: function () { return chunkCHFORQ7J_cjs.resumeWorkflowHandler; }
57
+ get: function () { return chunkX3MICMI2_cjs.resumeWorkflowHandler; }
34
58
  });
35
59
  Object.defineProperty(exports, "startAsyncWorkflowHandler", {
36
60
  enumerable: true,
37
- get: function () { return chunkCHFORQ7J_cjs.startAsyncWorkflowHandler; }
61
+ get: function () { return chunkX3MICMI2_cjs.startAsyncWorkflowHandler; }
38
62
  });
39
63
  Object.defineProperty(exports, "startWorkflowRunHandler", {
40
64
  enumerable: true,
41
- get: function () { return chunkCHFORQ7J_cjs.startWorkflowRunHandler; }
65
+ get: function () { return chunkX3MICMI2_cjs.startWorkflowRunHandler; }
66
+ });
67
+ Object.defineProperty(exports, "streamLegacyWorkflowHandler", {
68
+ enumerable: true,
69
+ get: function () { return chunkX3MICMI2_cjs.streamLegacyWorkflowHandler; }
70
+ });
71
+ Object.defineProperty(exports, "streamVNextWorkflowHandler", {
72
+ enumerable: true,
73
+ get: function () { return chunkX3MICMI2_cjs.streamVNextWorkflowHandler; }
42
74
  });
43
- Object.defineProperty(exports, "watchWorkflowHandler", {
75
+ Object.defineProperty(exports, "streamWorkflowHandler", {
44
76
  enumerable: true,
45
- get: function () { return chunkCHFORQ7J_cjs.watchWorkflowHandler; }
77
+ get: function () { return chunkX3MICMI2_cjs.streamWorkflowHandler; }
46
78
  });
79
+ //# sourceMappingURL=workflows.cjs.map
80
+ //# sourceMappingURL=workflows.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"workflows.cjs"}
@@ -1,10 +1,88 @@
1
- export { getWorkflowsHandler } from '../../_tsup-dts-rollup.js';
2
- export { getWorkflowByIdHandler } from '../../_tsup-dts-rollup.js';
3
- export { startAsyncWorkflowHandler } from '../../_tsup-dts-rollup.js';
4
- export { getWorkflowRunHandler } from '../../_tsup-dts-rollup.js';
5
- export { createRunHandler } from '../../_tsup-dts-rollup.js';
6
- export { startWorkflowRunHandler } from '../../_tsup-dts-rollup.js';
7
- export { watchWorkflowHandler } from '../../_tsup-dts-rollup.js';
8
- export { resumeAsyncWorkflowHandler } from '../../_tsup-dts-rollup.js';
9
- export { resumeWorkflowHandler } from '../../_tsup-dts-rollup.js';
10
- export { getWorkflowRunsHandler } from '../../_tsup-dts-rollup.js';
1
+ import { ReadableStream } from 'node:stream/web';
2
+ import type { RequestContext } from '@mastra/core/di';
3
+ import type { TracingOptions } from '@mastra/core/observability';
4
+ import type { WorkflowRuns } from '@mastra/core/storage';
5
+ import type { Workflow, WorkflowInfo, ChunkType, StreamEvent, WorkflowState } from '@mastra/core/workflows';
6
+ import type { Context } from '../types.js';
7
+ export interface WorkflowContext extends Context {
8
+ workflowId?: string;
9
+ runId?: string;
10
+ }
11
+ export declare function listWorkflowsHandler({ mastra }: WorkflowContext): Promise<Record<string, WorkflowInfo>>;
12
+ export declare function getWorkflowByIdHandler({ mastra, workflowId }: WorkflowContext): Promise<WorkflowInfo>;
13
+ export declare function getWorkflowRunByIdHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReturnType<Workflow['getWorkflowRunById']>>;
14
+ export declare function getWorkflowRunExecutionResultHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<WorkflowState>;
15
+ export declare function createWorkflowRunHandler({ mastra, workflowId, runId: prevRunId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<{
16
+ runId: string;
17
+ }>;
18
+ export declare function startAsyncWorkflowHandler({ mastra, requestContext, workflowId, runId, inputData, tracingOptions, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
19
+ inputData?: unknown;
20
+ requestContext?: RequestContext;
21
+ tracingOptions?: TracingOptions;
22
+ }): Promise<import("@mastra/core/workflows").WorkflowResult<any, any, any, any>>;
23
+ export declare function startWorkflowRunHandler({ mastra, requestContext, workflowId, runId, inputData, tracingOptions, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
24
+ inputData?: unknown;
25
+ requestContext?: RequestContext;
26
+ tracingOptions?: TracingOptions;
27
+ }): Promise<{
28
+ message: string;
29
+ }>;
30
+ export declare function streamWorkflowHandler({ mastra, requestContext, workflowId, runId, inputData, tracingOptions, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
31
+ inputData?: unknown;
32
+ requestContext?: RequestContext;
33
+ tracingOptions?: TracingOptions;
34
+ }): Promise<ReadableStream<ChunkType>>;
35
+ export declare function streamLegacyWorkflowHandler({ mastra, requestContext, workflowId, runId, inputData, tracingOptions, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
36
+ inputData?: unknown;
37
+ requestContext?: RequestContext;
38
+ tracingOptions?: TracingOptions;
39
+ }): Promise<{
40
+ stream: ReadableStream<StreamEvent>;
41
+ getWorkflowState: () => Promise<import("@mastra/core/workflows").WorkflowResult<any, any, any, any>>;
42
+ }>;
43
+ export declare function observeStreamLegacyWorkflowHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReadableStream<StreamEvent>>;
44
+ export declare function observeStreamWorkflowHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReadableStream<ChunkType>>;
45
+ export declare function streamVNextWorkflowHandler({ mastra, requestContext, workflowId, runId, inputData, closeOnSuspend, tracingOptions, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
46
+ inputData?: unknown;
47
+ requestContext?: RequestContext;
48
+ closeOnSuspend?: boolean;
49
+ tracingOptions?: TracingOptions;
50
+ }): Promise<ReadableStream<ChunkType>>;
51
+ export declare function observeStreamVNextWorkflowHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReadableStream<ChunkType>>;
52
+ export declare function resumeAsyncWorkflowHandler({ mastra, workflowId, runId, body, requestContext, tracingOptions, }: WorkflowContext & {
53
+ body: {
54
+ step: string | string[];
55
+ resumeData?: unknown;
56
+ };
57
+ requestContext?: RequestContext;
58
+ tracingOptions?: TracingOptions;
59
+ }): Promise<import("@mastra/core/workflows").WorkflowResult<any, any, any, any>>;
60
+ export declare function resumeWorkflowHandler({ mastra, workflowId, runId, body, requestContext, tracingOptions, }: WorkflowContext & {
61
+ body: {
62
+ step: string | string[];
63
+ resumeData?: unknown;
64
+ };
65
+ requestContext?: RequestContext;
66
+ tracingOptions?: TracingOptions;
67
+ }): Promise<{
68
+ message: string;
69
+ }>;
70
+ export declare function resumeStreamWorkflowHandler({ mastra, workflowId, runId, body, requestContext, tracingOptions, }: WorkflowContext & {
71
+ body: {
72
+ step: string | string[];
73
+ resumeData?: unknown;
74
+ };
75
+ requestContext?: RequestContext;
76
+ tracingOptions?: TracingOptions;
77
+ }): Promise<ReadableStream<ChunkType>>;
78
+ export declare function listWorkflowRunsHandler({ mastra, workflowId, fromDate, toDate, perPage, page, resourceId, }: WorkflowContext & {
79
+ fromDate?: Date;
80
+ toDate?: Date;
81
+ perPage?: number | false;
82
+ page?: number;
83
+ resourceId?: string;
84
+ }): Promise<WorkflowRuns>;
85
+ export declare function cancelWorkflowRunHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<{
86
+ message: string;
87
+ }>;
88
+ //# sourceMappingURL=workflows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../../src/server/handlers/workflows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAmB,MAAM,iBAAiB,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE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2B,CAAC,EAChD,MAAM,EACN,UAAU,EACV,KAAK,EACL,IAAI,EACJ,cAAc,EACd,cAAc,GACf,EAAE,eAAe,GAAG;IACnB,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACxD,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,sCAiDA;AAED,wBAAsB,uBAAuB,CAAC,EAC5C,MAAM,EACN,UAAU,EACV,QAAQ,EACR,MAAM,EACN,OAAO,EACP,IAAI,EACJ,UAAU,GACX,EAAE,eAAe,GAAG;IACnB,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,YAAY,CAAC,CA4BxB;AAED,wBAAsB,wBAAwB,CAAC,EAC7C,MAAM,EACN,UAAU,EACV,KAAK,GACN,EAAE,IAAI,CAAC,eAAe,EAAE,QAAQ,GAAG,YAAY,GAAG,OAAO,CAAC;;GA8B1D"}
@@ -1 +1,3 @@
1
- export { createRunHandler, getWorkflowByIdHandler, getWorkflowRunHandler, getWorkflowRunsHandler, getWorkflowsHandler, resumeAsyncWorkflowHandler, resumeWorkflowHandler, startAsyncWorkflowHandler, startWorkflowRunHandler, watchWorkflowHandler } from '../../chunk-3XTEV33Q.js';
1
+ export { cancelWorkflowRunHandler, createWorkflowRunHandler, getWorkflowByIdHandler, getWorkflowRunByIdHandler, getWorkflowRunExecutionResultHandler, listWorkflowRunsHandler, listWorkflowsHandler, observeStreamLegacyWorkflowHandler, observeStreamVNextWorkflowHandler, observeStreamWorkflowHandler, resumeAsyncWorkflowHandler, resumeStreamWorkflowHandler, resumeWorkflowHandler, startAsyncWorkflowHandler, startWorkflowRunHandler, streamLegacyWorkflowHandler, streamVNextWorkflowHandler, streamWorkflowHandler } from '../../chunk-ZJ6KEY6H.js';
2
+ //# sourceMappingURL=workflows.js.map
3
+ //# sourceMappingURL=workflows.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"workflows.js"}
@@ -1,55 +1,62 @@
1
1
  'use strict';
2
2
 
3
- var chunkD3G23FP3_cjs = require('../chunk-D3G23FP3.cjs');
4
- var chunkM2RXDCPV_cjs = require('../chunk-M2RXDCPV.cjs');
5
- var chunkM56ECCHK_cjs = require('../chunk-M56ECCHK.cjs');
6
- var chunk55HTWX4C_cjs = require('../chunk-55HTWX4C.cjs');
7
- var chunkCHFORQ7J_cjs = require('../chunk-CHFORQ7J.cjs');
8
- var chunk6Q7UXAYJ_cjs = require('../chunk-6Q7UXAYJ.cjs');
9
- var chunkSKBVVI24_cjs = require('../chunk-SKBVVI24.cjs');
10
- var chunk2FJURXCL_cjs = require('../chunk-2FJURXCL.cjs');
11
- var chunk5YGDYMRB_cjs = require('../chunk-5YGDYMRB.cjs');
12
- var chunkAMVOS7YB_cjs = require('../chunk-AMVOS7YB.cjs');
3
+ var chunkU7GLIXYO_cjs = require('../chunk-U7GLIXYO.cjs');
4
+ var chunkA24TSVEZ_cjs = require('../chunk-A24TSVEZ.cjs');
5
+ var chunk2YZH5PH6_cjs = require('../chunk-2YZH5PH6.cjs');
6
+ var chunkKF3RI45U_cjs = require('../chunk-KF3RI45U.cjs');
7
+ var chunkS54HNARD_cjs = require('../chunk-S54HNARD.cjs');
8
+ var chunkGLAZTMX3_cjs = require('../chunk-GLAZTMX3.cjs');
9
+ var chunkKJIDZQRA_cjs = require('../chunk-KJIDZQRA.cjs');
10
+ var chunk7HVY3D64_cjs = require('../chunk-7HVY3D64.cjs');
11
+ var chunkX3MICMI2_cjs = require('../chunk-X3MICMI2.cjs');
12
+ var chunkEHACNWDL_cjs = require('../chunk-EHACNWDL.cjs');
13
+ var chunkPPMIB3FQ_cjs = require('../chunk-PPMIB3FQ.cjs');
13
14
 
14
15
 
15
16
 
16
- Object.defineProperty(exports, "tools", {
17
+ Object.defineProperty(exports, "memory", {
17
18
  enumerable: true,
18
- get: function () { return chunkD3G23FP3_cjs.tools_exports; }
19
+ get: function () { return chunkU7GLIXYO_cjs.memory_exports; }
19
20
  });
20
- Object.defineProperty(exports, "vNextWorkflows", {
21
+ Object.defineProperty(exports, "observability", {
21
22
  enumerable: true,
22
- get: function () { return chunkM2RXDCPV_cjs.vNextWorkflows_exports; }
23
+ get: function () { return chunkA24TSVEZ_cjs.observability_exports; }
23
24
  });
24
- Object.defineProperty(exports, "vector", {
25
+ Object.defineProperty(exports, "scores", {
25
26
  enumerable: true,
26
- get: function () { return chunkM56ECCHK_cjs.vector_exports; }
27
+ get: function () { return chunk2YZH5PH6_cjs.scores_exports; }
27
28
  });
28
- Object.defineProperty(exports, "voice", {
29
+ Object.defineProperty(exports, "tools", {
29
30
  enumerable: true,
30
- get: function () { return chunk55HTWX4C_cjs.voice_exports; }
31
+ get: function () { return chunkKF3RI45U_cjs.tools_exports; }
31
32
  });
32
- Object.defineProperty(exports, "workflows", {
33
+ Object.defineProperty(exports, "vector", {
33
34
  enumerable: true,
34
- get: function () { return chunkCHFORQ7J_cjs.workflows_exports; }
35
+ get: function () { return chunkS54HNARD_cjs.vector_exports; }
35
36
  });
36
- Object.defineProperty(exports, "agents", {
37
+ Object.defineProperty(exports, "voice", {
37
38
  enumerable: true,
38
- get: function () { return chunk6Q7UXAYJ_cjs.agents_exports; }
39
+ get: function () { return chunkGLAZTMX3_cjs.voice_exports; }
39
40
  });
40
- Object.defineProperty(exports, "logs", {
41
+ Object.defineProperty(exports, "a2a", {
41
42
  enumerable: true,
42
- get: function () { return chunkSKBVVI24_cjs.logs_exports; }
43
+ get: function () { return chunkKJIDZQRA_cjs.a2a_exports; }
43
44
  });
44
- Object.defineProperty(exports, "memory", {
45
+ Object.defineProperty(exports, "agentBuilder", {
46
+ enumerable: true,
47
+ get: function () { return chunk7HVY3D64_cjs.agent_builder_exports; }
48
+ });
49
+ Object.defineProperty(exports, "workflows", {
45
50
  enumerable: true,
46
- get: function () { return chunk2FJURXCL_cjs.memory_exports; }
51
+ get: function () { return chunkX3MICMI2_cjs.workflows_exports; }
47
52
  });
48
- Object.defineProperty(exports, "network", {
53
+ Object.defineProperty(exports, "agents", {
49
54
  enumerable: true,
50
- get: function () { return chunk5YGDYMRB_cjs.network_exports; }
55
+ get: function () { return chunkEHACNWDL_cjs.agents_exports; }
51
56
  });
52
- Object.defineProperty(exports, "telemetry", {
57
+ Object.defineProperty(exports, "logs", {
53
58
  enumerable: true,
54
- get: function () { return chunkAMVOS7YB_cjs.telemetry_exports; }
59
+ get: function () { return chunkPPMIB3FQ_cjs.logs_exports; }
55
60
  });
61
+ //# sourceMappingURL=handlers.cjs.map
62
+ //# sourceMappingURL=handlers.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"handlers.cjs"}
@@ -1,10 +1,12 @@
1
- export { agents } from '../_tsup-dts-rollup.js';
2
- export { logs } from '../_tsup-dts-rollup.js';
3
- export { memory } from '../_tsup-dts-rollup.js';
4
- export { network } from '../_tsup-dts-rollup.js';
5
- export { telemetry } from '../_tsup-dts-rollup.js';
6
- export { tools } from '../_tsup-dts-rollup.js';
7
- export { workflows } from '../_tsup-dts-rollup.js';
8
- export { vNextWorkflows } from '../_tsup-dts-rollup.js';
9
- export { vector } from '../_tsup-dts-rollup.js';
10
- export { voice } from '../_tsup-dts-rollup.js';
1
+ export * as agentBuilder from './handlers/agent-builder.js';
2
+ export * as agents from './handlers/agents.js';
3
+ export * as a2a from './handlers/a2a.js';
4
+ export * as logs from './handlers/logs.js';
5
+ export * as memory from './handlers/memory.js';
6
+ export * as observability from './handlers/observability.js';
7
+ export * as scores from './handlers/scores.js';
8
+ export * as tools from './handlers/tools.js';
9
+ export * as vector from './handlers/vector.js';
10
+ export * as voice from './handlers/voice.js';
11
+ export * as workflows from './handlers/workflows.js';
12
+ //# sourceMappingURL=handlers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../src/server/handlers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC"}
@@ -1,10 +1,13 @@
1
- export { tools_exports as tools } from '../chunk-5JNVY6DU.js';
2
- export { vNextWorkflows_exports as vNextWorkflows } from '../chunk-OWNA6I2H.js';
3
- export { vector_exports as vector } from '../chunk-4JINXASC.js';
4
- export { voice_exports as voice } from '../chunk-Q6SHQECN.js';
5
- export { workflows_exports as workflows } from '../chunk-3XTEV33Q.js';
6
- export { agents_exports as agents } from '../chunk-GVBJ5I2S.js';
7
- export { logs_exports as logs } from '../chunk-3EJZQ6TQ.js';
8
- export { memory_exports as memory } from '../chunk-RBQASTUP.js';
9
- export { network_exports as network } from '../chunk-QJ3AHN64.js';
10
- export { telemetry_exports as telemetry } from '../chunk-BPL2CBLV.js';
1
+ export { memory_exports as memory } from '../chunk-V6JYJS7O.js';
2
+ export { observability_exports as observability } from '../chunk-3AMNUUZF.js';
3
+ export { scores_exports as scores } from '../chunk-3F52QCI4.js';
4
+ export { tools_exports as tools } from '../chunk-ND5OKOMT.js';
5
+ export { vector_exports as vector } from '../chunk-KWH5QBXP.js';
6
+ export { voice_exports as voice } from '../chunk-B3Z6J745.js';
7
+ export { a2a_exports as a2a } from '../chunk-FPBYKMIS.js';
8
+ export { agent_builder_exports as agentBuilder } from '../chunk-VEVU6EUO.js';
9
+ export { workflows_exports as workflows } from '../chunk-ZJ6KEY6H.js';
10
+ export { agents_exports as agents } from '../chunk-Z2O5YVHY.js';
11
+ export { logs_exports as logs } from '../chunk-73PAWDM5.js';
12
+ //# sourceMappingURL=handlers.js.map
13
+ //# sourceMappingURL=handlers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"handlers.js"}
@@ -0,0 +1,82 @@
1
+ /**
2
+ * @module
3
+ * This module provides the `HTTPException` class.
4
+ */
5
+ type InfoStatusCode = 100 | 101 | 102 | 103;
6
+ type SuccessStatusCode = 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226;
7
+ type DeprecatedStatusCode = 305 | 306;
8
+ type RedirectStatusCode = 300 | 301 | 302 | 303 | 304 | DeprecatedStatusCode | 307 | 308;
9
+ 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;
10
+ type ServerErrorStatusCode = 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511;
11
+ /**
12
+ * `UnofficialStatusCode` can be used to specify an unofficial status code.
13
+ * @example
14
+ *
15
+ * ```ts
16
+ * app.get('/unknown', (c) => {
17
+ * return c.text("Unknown Error", 520 as UnofficialStatusCode)
18
+ * })
19
+ * ```
20
+ */
21
+ export type UnofficialStatusCode = -1;
22
+ /**
23
+ * If you want to use an unofficial status, use `UnofficialStatusCode`.
24
+ */
25
+ export type StatusCode = InfoStatusCode | SuccessStatusCode | RedirectStatusCode | ClientErrorStatusCode | ServerErrorStatusCode | UnofficialStatusCode;
26
+ /**
27
+ * Options for creating an `HTTPException`.
28
+ * @property res - Optional response object to use.
29
+ * @property message - Optional custom error message.
30
+ * @property cause - Optional cause of the error.
31
+ * @property stack - Optional stack trace for the error.
32
+ */
33
+ type HTTPExceptionOptions = {
34
+ res?: Response;
35
+ message?: string;
36
+ cause?: unknown;
37
+ stack?: string;
38
+ };
39
+ /**
40
+ * `HTTPException` must be used when a fatal error such as authentication failure occurs.
41
+ *
42
+ * @see {@link https://hono.dev/docs/api/exception}
43
+ *
44
+ * @param {StatusCode} status - status code of HTTPException
45
+ * @param {HTTPExceptionOptions} options - options of HTTPException
46
+ * @param {HTTPExceptionOptions["res"]} options.res - response of options of HTTPException
47
+ * @param {HTTPExceptionOptions["message"]} options.message - message of options of HTTPException
48
+ * @param {HTTPExceptionOptions["cause"]} options.cause - cause of options of HTTPException
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * import { HTTPException } from 'hono/http-exception'
53
+ *
54
+ * // ...
55
+ *
56
+ * app.post('/auth', async (c, next) => {
57
+ * // authentication
58
+ * if (authorized === false) {
59
+ * throw new HTTPException(401, { message: 'Custom error message' })
60
+ * }
61
+ * await next()
62
+ * })
63
+ * ```
64
+ */
65
+ export declare class HTTPException extends Error {
66
+ readonly res?: Response;
67
+ readonly status: StatusCode;
68
+ /**
69
+ * Creates an instance of `HTTPException`.
70
+ * @param status - HTTP status code for the exception. Defaults to 500.
71
+ * @param options - Additional options for the exception.
72
+ */
73
+ constructor(status?: StatusCode, options?: HTTPExceptionOptions);
74
+ /**
75
+ * Returns the response object associated with the exception.
76
+ * If a response object is not provided, a new response is created with the error message and status code.
77
+ * @returns The response object.
78
+ */
79
+ getResponse(): Response;
80
+ }
81
+ export {};
82
+ //# sourceMappingURL=http-exception.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-exception.d.ts","sourceRoot":"","sources":["../../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AC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,aAAc,SAAQ,KAAK;IACtC,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAE5B;;;;OAIG;gBACS,MAAM,GAAE,UAAgB,EAAE,OAAO,CAAC,EAAE,oBAAoB;IAOpE;;;;OAIG;IACH,WAAW,IAAI,QAAQ;CAYxB"}
@@ -0,0 +1,10 @@
1
+ import type { MastraError } from '@mastra/core/error';
2
+ import type { Mastra } from '@mastra/core/mastra';
3
+ export interface ApiError extends MastraError {
4
+ message: string;
5
+ status?: number;
6
+ }
7
+ export interface Context {
8
+ mastra: Mastra;
9
+ }
10
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/server/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAElD,MAAM,WAAW,QAAS,SAAQ,WAAW;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,45 @@
1
+ import type { Mastra } from '@mastra/core';
2
+ import type { SystemMessage } from '@mastra/core/llm';
3
+ import type { Workflow, WorkflowInfo } from '@mastra/core/workflows';
4
+ export declare function getWorkflowInfo(workflow: Workflow): WorkflowInfo;
5
+ /**
6
+ * Workflow Registry for temporarily registering additional workflows
7
+ * that are not part of the user's Mastra instance (e.g., internal template workflows)
8
+ */
9
+ export declare class WorkflowRegistry {
10
+ private static additionalWorkflows;
11
+ /**
12
+ * Register a workflow temporarily
13
+ */
14
+ static registerTemporaryWorkflow(id: string, workflow: Workflow): void;
15
+ /**
16
+ * Register all workflows from map
17
+ */
18
+ static registerTemporaryWorkflows(workflows: Record<string, Workflow>, mastra?: Mastra<any, any, any, any, any, any, any, any, any>): void;
19
+ /**
20
+ * Get a workflow by ID from the registry (returns undefined if not found)
21
+ */
22
+ static getWorkflow(workflowId: string): Workflow | undefined;
23
+ /**
24
+ * Get all workflows from the registry
25
+ */
26
+ static getAllWorkflows(): Record<string, Workflow>;
27
+ /**
28
+ * Clean up a temporary workflow
29
+ */
30
+ static cleanupTemporaryWorkflow(workflowId: string): void;
31
+ /**
32
+ * Clean up all registered workflows
33
+ */
34
+ static cleanup(): void;
35
+ /**
36
+ * Check if a workflow ID is a valid agent-builder workflow
37
+ */
38
+ static isAgentBuilderWorkflow(workflowId: string): boolean;
39
+ /**
40
+ * Get all registered temporary workflow IDs (for debugging)
41
+ */
42
+ static getRegisteredWorkflowIds(): string[];
43
+ }
44
+ export declare function convertInstructionsToString(message: SystemMessage): string;
45
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/server/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,KAAK,EAAqB,QAAQ,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AA0BxF,wBAAgB,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,YAAY,CAqBhE;AAED;;;GAGG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAAgC;IAElE;;OAEG;IACH,MAAM,CAAC,yBAAyB,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,QAA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