@mastra/server 0.0.0-cloud-transporter-20250513033346 → 0.0.0-cloud-storage-adapter-20251106204059

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