@mastra/server 1.0.0-beta.1 → 1.0.0-beta.11

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 (303) hide show
  1. package/CHANGELOG.md +273 -0
  2. package/README.md +2 -2
  3. package/dist/chunk-3SFLFUKY.js +116 -0
  4. package/dist/chunk-3SFLFUKY.js.map +1 -0
  5. package/dist/{chunk-W2KMU354.cjs → chunk-3XI22UQR.cjs} +19 -4
  6. package/dist/chunk-3XI22UQR.cjs.map +1 -0
  7. package/dist/chunk-4W2SM6CG.js +294 -0
  8. package/dist/chunk-4W2SM6CG.js.map +1 -0
  9. package/dist/chunk-5W4RPVTK.cjs +49 -0
  10. package/dist/chunk-5W4RPVTK.cjs.map +1 -0
  11. package/dist/chunk-7N3PD4SV.js +196 -0
  12. package/dist/chunk-7N3PD4SV.js.map +1 -0
  13. package/dist/{chunk-KJIDZQRA.cjs → chunk-7O3KPUJ4.cjs} +219 -24
  14. package/dist/chunk-7O3KPUJ4.cjs.map +1 -0
  15. package/dist/chunk-C3UIIRAT.cjs +920 -0
  16. package/dist/chunk-C3UIIRAT.cjs.map +1 -0
  17. package/dist/chunk-CDRVS35Y.js +23226 -0
  18. package/dist/chunk-CDRVS35Y.js.map +1 -0
  19. package/dist/chunk-DHWPHLGF.cjs +211 -0
  20. package/dist/chunk-DHWPHLGF.cjs.map +1 -0
  21. package/dist/chunk-DRUNNM4C.js +328 -0
  22. package/dist/chunk-DRUNNM4C.js.map +1 -0
  23. package/dist/{chunk-TOCYBDP2.js → chunk-ER3QM7DD.js} +4 -4
  24. package/dist/{chunk-TOCYBDP2.js.map → chunk-ER3QM7DD.js.map} +1 -1
  25. package/dist/chunk-FPCGLPLJ.cjs +297 -0
  26. package/dist/chunk-FPCGLPLJ.cjs.map +1 -0
  27. package/dist/chunk-FYY54HZC.js +310 -0
  28. package/dist/chunk-FYY54HZC.js.map +1 -0
  29. package/dist/chunk-GFF2I6UD.js +354 -0
  30. package/dist/chunk-GFF2I6UD.js.map +1 -0
  31. package/dist/chunk-GN2LFMET.cjs +23268 -0
  32. package/dist/chunk-GN2LFMET.cjs.map +1 -0
  33. package/dist/chunk-H2RMXG2Q.cjs +167 -0
  34. package/dist/chunk-H2RMXG2Q.cjs.map +1 -0
  35. package/dist/chunk-HAJOEDNB.js +274 -0
  36. package/dist/chunk-HAJOEDNB.js.map +1 -0
  37. package/dist/chunk-HFQGXVIE.js +786 -0
  38. package/dist/chunk-HFQGXVIE.js.map +1 -0
  39. package/dist/chunk-HT4LP3BO.js +75 -0
  40. package/dist/chunk-HT4LP3BO.js.map +1 -0
  41. package/dist/chunk-I6LR6CPC.cjs +125 -0
  42. package/dist/chunk-I6LR6CPC.cjs.map +1 -0
  43. package/dist/chunk-IEYXQTUW.cjs +284 -0
  44. package/dist/chunk-IEYXQTUW.cjs.map +1 -0
  45. package/dist/chunk-K3ELPJS3.js +1063 -0
  46. package/dist/chunk-K3ELPJS3.js.map +1 -0
  47. package/dist/{chunk-FPBYKMIS.js → chunk-KEXR53KI.js} +213 -24
  48. package/dist/chunk-KEXR53KI.js.map +1 -0
  49. package/dist/chunk-MCYD5LW7.cjs +90 -0
  50. package/dist/chunk-MCYD5LW7.cjs.map +1 -0
  51. package/dist/chunk-MQLS6Z7A.js +891 -0
  52. package/dist/chunk-MQLS6Z7A.js.map +1 -0
  53. package/dist/chunk-PUFCKXFW.cjs +312 -0
  54. package/dist/chunk-PUFCKXFW.cjs.map +1 -0
  55. package/dist/chunk-QNVYGEJ4.js +204 -0
  56. package/dist/chunk-QNVYGEJ4.js.map +1 -0
  57. package/dist/chunk-S3TIWWQL.cjs +322 -0
  58. package/dist/chunk-S3TIWWQL.cjs.map +1 -0
  59. package/dist/chunk-SXVANU23.js +164 -0
  60. package/dist/chunk-SXVANU23.js.map +1 -0
  61. package/dist/chunk-TYZ6ZISQ.cjs +368 -0
  62. package/dist/chunk-TYZ6ZISQ.cjs.map +1 -0
  63. package/dist/chunk-US6Y5RLR.cjs +205 -0
  64. package/dist/chunk-US6Y5RLR.cjs.map +1 -0
  65. package/dist/{chunk-QU6N55W6.cjs → chunk-V272B7RM.cjs} +11 -12
  66. package/dist/chunk-V272B7RM.cjs.map +1 -0
  67. package/dist/{chunk-D7T74TVR.js → chunk-WBLT2HL3.js} +19 -4
  68. package/dist/chunk-WBLT2HL3.js.map +1 -0
  69. package/dist/chunk-WE4USCF3.js +226 -0
  70. package/dist/chunk-WE4USCF3.js.map +1 -0
  71. package/dist/chunk-WI3X62RJ.cjs +810 -0
  72. package/dist/chunk-WI3X62RJ.cjs.map +1 -0
  73. package/dist/chunk-X43DWDXB.cjs +346 -0
  74. package/dist/chunk-X43DWDXB.cjs.map +1 -0
  75. package/dist/chunk-X4QMPCTP.cjs +259 -0
  76. package/dist/chunk-X4QMPCTP.cjs.map +1 -0
  77. package/dist/{chunk-X6C7BUWN.cjs → chunk-XQPJ63ZD.cjs} +4 -4
  78. package/dist/{chunk-X6C7BUWN.cjs.map → chunk-XQPJ63ZD.cjs.map} +1 -1
  79. package/dist/chunk-XW2HXQDO.js +302 -0
  80. package/dist/chunk-XW2HXQDO.js.map +1 -0
  81. package/dist/chunk-XWGAT2DA.js +44 -0
  82. package/dist/chunk-XWGAT2DA.js.map +1 -0
  83. package/dist/{chunk-SHWNNZBL.js → chunk-YP34EWWK.js} +9 -10
  84. package/dist/chunk-YP34EWWK.js.map +1 -0
  85. package/dist/chunk-ZN5R6OZB.cjs +1107 -0
  86. package/dist/chunk-ZN5R6OZB.cjs.map +1 -0
  87. package/dist/server/auth/defaults.d.ts +3 -0
  88. package/dist/server/auth/defaults.d.ts.map +1 -0
  89. package/dist/server/auth/helpers.d.ts +14 -0
  90. package/dist/server/auth/helpers.d.ts.map +1 -0
  91. package/dist/server/auth/index.cjs +137 -0
  92. package/dist/server/auth/index.cjs.map +1 -0
  93. package/dist/server/auth/index.d.ts +3 -0
  94. package/dist/server/auth/index.d.ts.map +1 -0
  95. package/dist/server/auth/index.js +127 -0
  96. package/dist/server/auth/index.js.map +1 -0
  97. package/dist/server/handlers/a2a.cjs +15 -7
  98. package/dist/server/handlers/a2a.d.ts +482 -0
  99. package/dist/server/handlers/a2a.d.ts.map +1 -1
  100. package/dist/server/handlers/a2a.js +1 -1
  101. package/dist/server/handlers/agent-builder.cjs +37 -37
  102. package/dist/server/handlers/agent-builder.d.ts +601 -77
  103. package/dist/server/handlers/agent-builder.d.ts.map +1 -1
  104. package/dist/server/handlers/agent-builder.js +1 -1
  105. package/dist/server/handlers/agents.cjs +53 -37
  106. package/dist/server/handlers/agents.d.ts +3275 -130
  107. package/dist/server/handlers/agents.d.ts.map +1 -1
  108. package/dist/server/handlers/agents.js +1 -1
  109. package/dist/server/handlers/logs.cjs +7 -7
  110. package/dist/server/handlers/logs.d.ts +135 -27
  111. package/dist/server/handlers/logs.d.ts.map +1 -1
  112. package/dist/server/handlers/logs.js +1 -1
  113. package/dist/server/handlers/mcp.cjs +40 -0
  114. package/dist/server/handlers/mcp.cjs.map +1 -0
  115. package/dist/server/handlers/mcp.d.ts +110 -0
  116. package/dist/server/handlers/mcp.d.ts.map +1 -0
  117. package/dist/server/handlers/mcp.js +3 -0
  118. package/dist/server/handlers/mcp.js.map +1 -0
  119. package/dist/server/handlers/memory.cjs +67 -27
  120. package/dist/server/handlers/memory.d.ts +933 -96
  121. package/dist/server/handlers/memory.d.ts.map +1 -1
  122. package/dist/server/handlers/memory.js +1 -1
  123. package/dist/server/handlers/observability.cjs +21 -5
  124. package/dist/server/handlers/observability.d.ts +119 -12
  125. package/dist/server/handlers/observability.d.ts.map +1 -1
  126. package/dist/server/handlers/observability.js +1 -1
  127. package/dist/server/handlers/scores.cjs +13 -13
  128. package/dist/server/handlers/scores.d.ts +110 -141
  129. package/dist/server/handlers/scores.d.ts.map +1 -1
  130. package/dist/server/handlers/scores.js +1 -1
  131. package/dist/server/handlers/stored-agents.cjs +28 -0
  132. package/dist/server/handlers/stored-agents.cjs.map +1 -0
  133. package/dist/server/handlers/stored-agents.d.ts +289 -0
  134. package/dist/server/handlers/stored-agents.d.ts.map +1 -0
  135. package/dist/server/handlers/stored-agents.js +3 -0
  136. package/dist/server/handlers/stored-agents.js.map +1 -0
  137. package/dist/server/handlers/test-utils.cjs +15 -0
  138. package/dist/server/handlers/test-utils.cjs.map +1 -0
  139. package/dist/server/handlers/test-utils.d.ts +6 -0
  140. package/dist/server/handlers/test-utils.d.ts.map +1 -0
  141. package/dist/server/handlers/test-utils.js +13 -0
  142. package/dist/server/handlers/test-utils.js.map +1 -0
  143. package/dist/server/handlers/tools.cjs +11 -11
  144. package/dist/server/handlers/tools.d.ts +69 -23
  145. package/dist/server/handlers/tools.d.ts.map +1 -1
  146. package/dist/server/handlers/tools.js +1 -1
  147. package/dist/server/handlers/utils.cjs +11 -3
  148. package/dist/server/handlers/utils.d.ts +5 -0
  149. package/dist/server/handlers/utils.d.ts.map +1 -1
  150. package/dist/server/handlers/utils.js +1 -1
  151. package/dist/server/handlers/vector.cjs +31 -7
  152. package/dist/server/handlers/vector.d.ts +93 -9
  153. package/dist/server/handlers/vector.d.ts.map +1 -1
  154. package/dist/server/handlers/vector.js +1 -1
  155. package/dist/server/handlers/voice.cjs +21 -9
  156. package/dist/server/handlers/voice.d.ts +81 -40
  157. package/dist/server/handlers/voice.d.ts.map +1 -1
  158. package/dist/server/handlers/voice.js +1 -1
  159. package/dist/server/handlers/workflows.cjs +69 -37
  160. package/dist/server/handlers/workflows.d.ts +929 -79
  161. package/dist/server/handlers/workflows.d.ts.map +1 -1
  162. package/dist/server/handlers/workflows.js +1 -1
  163. package/dist/server/handlers.cjs +36 -31
  164. package/dist/server/handlers.d.ts +1 -0
  165. package/dist/server/handlers.d.ts.map +1 -1
  166. package/dist/server/handlers.js +12 -11
  167. package/dist/server/schemas/a2a.d.ts +786 -0
  168. package/dist/server/schemas/a2a.d.ts.map +1 -0
  169. package/dist/server/schemas/agent-builder.d.ts +204 -0
  170. package/dist/server/schemas/agent-builder.d.ts.map +1 -0
  171. package/dist/server/schemas/agents.d.ts +1375 -0
  172. package/dist/server/schemas/agents.d.ts.map +1 -0
  173. package/dist/server/schemas/common.d.ts +179 -0
  174. package/dist/server/schemas/common.d.ts.map +1 -0
  175. package/dist/server/schemas/logs.d.ts +124 -0
  176. package/dist/server/schemas/logs.d.ts.map +1 -0
  177. package/dist/server/schemas/mcp.d.ts +299 -0
  178. package/dist/server/schemas/mcp.d.ts.map +1 -0
  179. package/dist/server/schemas/memory.d.ts +998 -0
  180. package/dist/server/schemas/memory.d.ts.map +1 -0
  181. package/dist/server/schemas/observability.d.ts +402 -0
  182. package/dist/server/schemas/observability.d.ts.map +1 -0
  183. package/dist/server/schemas/scores.d.ts +259 -0
  184. package/dist/server/schemas/scores.d.ts.map +1 -0
  185. package/dist/server/schemas/stored-agents.d.ts +792 -0
  186. package/dist/server/schemas/stored-agents.d.ts.map +1 -0
  187. package/dist/server/schemas/vectors.d.ts +107 -0
  188. package/dist/server/schemas/vectors.d.ts.map +1 -0
  189. package/dist/server/schemas/workflows.d.ts +608 -0
  190. package/dist/server/schemas/workflows.d.ts.map +1 -0
  191. package/dist/server/server-adapter/index.cjs +481 -0
  192. package/dist/server/server-adapter/index.cjs.map +1 -0
  193. package/dist/server/server-adapter/index.d.ts +91 -0
  194. package/dist/server/server-adapter/index.d.ts.map +1 -0
  195. package/dist/server/server-adapter/index.js +466 -0
  196. package/dist/server/server-adapter/index.js.map +1 -0
  197. package/dist/server/server-adapter/openapi-utils.d.ts +59 -0
  198. package/dist/server/server-adapter/openapi-utils.d.ts.map +1 -0
  199. package/dist/server/server-adapter/redact.d.ts +26 -0
  200. package/dist/server/server-adapter/redact.d.ts.map +1 -0
  201. package/dist/server/server-adapter/routes/a2a.d.ts +3 -0
  202. package/dist/server/server-adapter/routes/a2a.d.ts.map +1 -0
  203. package/dist/server/server-adapter/routes/agent-builder.d.ts +3 -0
  204. package/dist/server/server-adapter/routes/agent-builder.d.ts.map +1 -0
  205. package/dist/server/server-adapter/routes/agents.d.ts +3 -0
  206. package/dist/server/server-adapter/routes/agents.d.ts.map +1 -0
  207. package/dist/server/server-adapter/routes/index.d.ts +50 -0
  208. package/dist/server/server-adapter/routes/index.d.ts.map +1 -0
  209. package/dist/server/server-adapter/routes/legacy.d.ts +7 -0
  210. package/dist/server/server-adapter/routes/legacy.d.ts.map +1 -0
  211. package/dist/server/server-adapter/routes/logs.d.ts +3 -0
  212. package/dist/server/server-adapter/routes/logs.d.ts.map +1 -0
  213. package/dist/server/server-adapter/routes/mcp.d.ts +9 -0
  214. package/dist/server/server-adapter/routes/mcp.d.ts.map +1 -0
  215. package/dist/server/server-adapter/routes/memory.d.ts +3 -0
  216. package/dist/server/server-adapter/routes/memory.d.ts.map +1 -0
  217. package/dist/server/server-adapter/routes/observability.d.ts +3 -0
  218. package/dist/server/server-adapter/routes/observability.d.ts.map +1 -0
  219. package/dist/server/server-adapter/routes/route-builder.d.ts +52 -0
  220. package/dist/server/server-adapter/routes/route-builder.d.ts.map +1 -0
  221. package/dist/server/server-adapter/routes/scorers.d.ts +3 -0
  222. package/dist/server/server-adapter/routes/scorers.d.ts.map +1 -0
  223. package/dist/server/server-adapter/routes/stored-agents.d.ts +8 -0
  224. package/dist/server/server-adapter/routes/stored-agents.d.ts.map +1 -0
  225. package/dist/server/server-adapter/routes/stream-types.d.ts +10 -0
  226. package/dist/server/server-adapter/routes/stream-types.d.ts.map +1 -0
  227. package/dist/server/server-adapter/routes/tools.d.ts +3 -0
  228. package/dist/server/server-adapter/routes/tools.d.ts.map +1 -0
  229. package/dist/server/server-adapter/routes/vectors.d.ts +3 -0
  230. package/dist/server/server-adapter/routes/vectors.d.ts.map +1 -0
  231. package/dist/server/server-adapter/routes/workflows.d.ts +3 -0
  232. package/dist/server/server-adapter/routes/workflows.d.ts.map +1 -0
  233. package/dist/server/utils.d.ts +1 -1
  234. package/dist/server/utils.d.ts.map +1 -1
  235. package/dist/token-GVZ7HRD7.js +62 -0
  236. package/dist/{token-C3IMNCC4.js.map → token-GVZ7HRD7.js.map} +1 -1
  237. package/dist/{token-C3IMNCC4.js → token-JGA3ZWAN.js} +5 -6
  238. package/dist/token-JGA3ZWAN.js.map +1 -0
  239. package/dist/token-VFONFWVS.cjs +64 -0
  240. package/dist/{token-375W3LEI.cjs.map → token-VFONFWVS.cjs.map} +1 -1
  241. package/dist/{token-375W3LEI.cjs → token-ZOD6YIQ3.cjs} +7 -8
  242. package/dist/token-ZOD6YIQ3.cjs.map +1 -0
  243. package/dist/token-util-7R2ZFIXO.js +7 -0
  244. package/dist/{token-util-E5QO2RCL.js.map → token-util-7R2ZFIXO.js.map} +1 -1
  245. package/dist/token-util-BLJZJDBZ.cjs +9 -0
  246. package/dist/{token-util-CV3RRG6K.cjs.map → token-util-BLJZJDBZ.cjs.map} +1 -1
  247. package/dist/token-util-VGZUWSNR.cjs +9 -0
  248. package/dist/token-util-VGZUWSNR.cjs.map +1 -0
  249. package/dist/token-util-VKTPZLSE.js +7 -0
  250. package/dist/token-util-VKTPZLSE.js.map +1 -0
  251. package/package.json +30 -5
  252. package/dist/chunk-2IS5WICF.js +0 -23036
  253. package/dist/chunk-2IS5WICF.js.map +0 -1
  254. package/dist/chunk-2YZH5PH6.cjs +0 -200
  255. package/dist/chunk-2YZH5PH6.cjs.map +0 -1
  256. package/dist/chunk-3AMNUUZF.js +0 -124
  257. package/dist/chunk-3AMNUUZF.js.map +0 -1
  258. package/dist/chunk-3F52QCI4.js +0 -192
  259. package/dist/chunk-3F52QCI4.js.map +0 -1
  260. package/dist/chunk-4JF5WXPL.js +0 -502
  261. package/dist/chunk-4JF5WXPL.js.map +0 -1
  262. package/dist/chunk-73PAWDM5.js +0 -83
  263. package/dist/chunk-73PAWDM5.js.map +0 -1
  264. package/dist/chunk-A24TSVEZ.cjs +0 -130
  265. package/dist/chunk-A24TSVEZ.cjs.map +0 -1
  266. package/dist/chunk-A2NPD5N6.cjs +0 -517
  267. package/dist/chunk-A2NPD5N6.cjs.map +0 -1
  268. package/dist/chunk-B3Z6J745.js +0 -122
  269. package/dist/chunk-B3Z6J745.js.map +0 -1
  270. package/dist/chunk-BTWIR2B7.cjs +0 -28
  271. package/dist/chunk-BTWIR2B7.cjs.map +0 -1
  272. package/dist/chunk-D7T74TVR.js.map +0 -1
  273. package/dist/chunk-EHACNWDL.cjs +0 -681
  274. package/dist/chunk-EHACNWDL.cjs.map +0 -1
  275. package/dist/chunk-FPBYKMIS.js.map +0 -1
  276. package/dist/chunk-GLAZTMX3.cjs +0 -128
  277. package/dist/chunk-GLAZTMX3.cjs.map +0 -1
  278. package/dist/chunk-ID6JYDNL.cjs +0 -23075
  279. package/dist/chunk-ID6JYDNL.cjs.map +0 -1
  280. package/dist/chunk-KF3RI45U.cjs +0 -172
  281. package/dist/chunk-KF3RI45U.cjs.map +0 -1
  282. package/dist/chunk-KJIDZQRA.cjs.map +0 -1
  283. package/dist/chunk-KWH5QBXP.js +0 -123
  284. package/dist/chunk-KWH5QBXP.js.map +0 -1
  285. package/dist/chunk-ND5OKOMT.js +0 -165
  286. package/dist/chunk-ND5OKOMT.js.map +0 -1
  287. package/dist/chunk-PPMIB3FQ.cjs +0 -88
  288. package/dist/chunk-PPMIB3FQ.cjs.map +0 -1
  289. package/dist/chunk-QU6N55W6.cjs.map +0 -1
  290. package/dist/chunk-S54HNARD.cjs +0 -131
  291. package/dist/chunk-S54HNARD.cjs.map +0 -1
  292. package/dist/chunk-SHWNNZBL.js.map +0 -1
  293. package/dist/chunk-SZIFSF4T.js +0 -25
  294. package/dist/chunk-SZIFSF4T.js.map +0 -1
  295. package/dist/chunk-W2KMU354.cjs.map +0 -1
  296. package/dist/chunk-X3MICMI2.cjs +0 -620
  297. package/dist/chunk-X3MICMI2.cjs.map +0 -1
  298. package/dist/chunk-Z2O5YVHY.js +0 -661
  299. package/dist/chunk-Z2O5YVHY.js.map +0 -1
  300. package/dist/chunk-ZJ6KEY6H.js +0 -600
  301. package/dist/chunk-ZJ6KEY6H.js.map +0 -1
  302. package/dist/token-util-CV3RRG6K.cjs +0 -9
  303. package/dist/token-util-E5QO2RCL.js +0 -7
@@ -1,112 +1,949 @@
1
1
  import type { MastraDBMessage } from '@mastra/core/agent';
2
- import { RequestContext } from '@mastra/core/di';
3
- import type { MastraMemory } from '@mastra/core/memory';
4
- import type { StorageListMessagesInput, StorageOrderBy } from '@mastra/core/storage';
5
- import type { Context } from '../types.js';
6
- import { handleError } from './error.js';
7
- interface MemoryContext extends Context {
8
- agentId?: string;
9
- resourceId?: string;
10
- threadId?: string;
11
- requestContext?: RequestContext;
12
- }
13
- export declare function getMemoryStatusHandler({ mastra, agentId, requestContext, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'requestContext'>): Promise<{
2
+ export declare function getTextContent(message: MastraDBMessage): string;
3
+ export declare const GET_MEMORY_STATUS_ROUTE: import("../server-adapter").ServerRoute<{
4
+ agentId: string;
5
+ }, {
14
6
  result: boolean;
15
- }>;
16
- export declare function getMemoryConfigHandler({ mastra, agentId, requestContext, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'requestContext'>): Promise<{
17
- config: import("@mastra/core/memory").MemoryConfig;
18
- }>;
19
- export declare function listThreadsHandler({ mastra, agentId, resourceId, requestContext, page, perPage, orderBy, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'resourceId' | 'requestContext'> & {
7
+ }, "json">;
8
+ export declare const GET_MEMORY_CONFIG_ROUTE: import("../server-adapter").ServerRoute<{
9
+ agentId: string;
10
+ }, {
11
+ config: {
12
+ lastMessages?: number | false | undefined;
13
+ semanticRecall?: any;
14
+ workingMemory?: any;
15
+ };
16
+ }, "json">;
17
+ export declare const LIST_THREADS_ROUTE: import("../server-adapter").ServerRoute<import("../server-adapter").InferParams<undefined, import("zod").ZodObject<{
18
+ perPage: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
19
+ page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
20
+ } & {
21
+ agentId: import("zod").ZodString;
22
+ resourceId: import("zod").ZodString;
23
+ orderBy: import("zod").ZodOptional<import("zod").ZodObject<{
24
+ field: import("zod").ZodOptional<import("zod").ZodEnum<["createdAt", "updatedAt"]>>;
25
+ direction: import("zod").ZodOptional<import("zod").ZodEnum<["ASC", "DESC"]>>;
26
+ }, "strip", import("zod").ZodTypeAny, {
27
+ field?: "createdAt" | "updatedAt" | undefined;
28
+ direction?: "ASC" | "DESC" | undefined;
29
+ }, {
30
+ field?: "createdAt" | "updatedAt" | undefined;
31
+ direction?: "ASC" | "DESC" | undefined;
32
+ }>>;
33
+ }, "strip", import("zod").ZodTypeAny, {
34
+ page: number;
35
+ perPage: number;
36
+ resourceId: string;
37
+ agentId: string;
38
+ orderBy?: {
39
+ field?: "createdAt" | "updatedAt" | undefined;
40
+ direction?: "ASC" | "DESC" | undefined;
41
+ } | undefined;
42
+ }, {
43
+ resourceId: string;
44
+ agentId: string;
45
+ page?: number | undefined;
46
+ perPage?: number | undefined;
47
+ orderBy?: {
48
+ field?: "createdAt" | "updatedAt" | undefined;
49
+ direction?: "ASC" | "DESC" | undefined;
50
+ } | undefined;
51
+ }> | import("zod").ZodObject<{
52
+ perPage: import("zod").ZodOptional<import("zod").ZodNumber>;
53
+ page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
54
+ } & {
55
+ agentId: import("zod").ZodString;
56
+ resourceId: import("zod").ZodString;
57
+ orderBy: import("zod").ZodOptional<import("zod").ZodObject<{
58
+ field: import("zod").ZodOptional<import("zod").ZodEnum<["createdAt", "updatedAt"]>>;
59
+ direction: import("zod").ZodOptional<import("zod").ZodEnum<["ASC", "DESC"]>>;
60
+ }, "strip", import("zod").ZodTypeAny, {
61
+ field?: "createdAt" | "updatedAt" | undefined;
62
+ direction?: "ASC" | "DESC" | undefined;
63
+ }, {
64
+ field?: "createdAt" | "updatedAt" | undefined;
65
+ direction?: "ASC" | "DESC" | undefined;
66
+ }>>;
67
+ }, "strip", import("zod").ZodTypeAny, {
68
+ page: number;
69
+ resourceId: string;
70
+ agentId: string;
71
+ perPage?: number | undefined;
72
+ orderBy?: {
73
+ field?: "createdAt" | "updatedAt" | undefined;
74
+ direction?: "ASC" | "DESC" | undefined;
75
+ } | undefined;
76
+ }, {
77
+ resourceId: string;
78
+ agentId: string;
79
+ page?: number | undefined;
80
+ perPage?: number | undefined;
81
+ orderBy?: {
82
+ field?: "createdAt" | "updatedAt" | undefined;
83
+ direction?: "ASC" | "DESC" | undefined;
84
+ } | undefined;
85
+ }>, undefined>, {
86
+ total: number;
20
87
  page: number;
21
88
  perPage: number | false;
22
- orderBy?: StorageOrderBy;
23
- }): Promise<import("@mastra/core/storage").StorageListThreadsByResourceIdOutput>;
24
- export declare function getThreadByIdHandler({ mastra, agentId, threadId, requestContext, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId' | 'requestContext'>): Promise<import("@mastra/core/memory").StorageThreadType>;
25
- export declare function saveMessagesHandler({ mastra, agentId, body, requestContext, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'requestContext'> & {
26
- body: {
27
- messages: Parameters<MastraMemory['saveMessages']>[0]['messages'];
28
- };
29
- }): Promise<{
30
- messages: MastraDBMessage[];
31
- }>;
32
- export declare function createThreadHandler({ mastra, agentId, body, requestContext, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'requestContext'> & {
33
- body?: Omit<Parameters<MastraMemory['createThread']>[0], 'resourceId'> & {
34
- resourceId?: string;
35
- };
36
- }): Promise<import("@mastra/core/memory").StorageThreadType>;
37
- export declare function updateThreadHandler({ mastra, agentId, threadId, body, requestContext, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId' | 'requestContext'> & {
38
- body?: Parameters<MastraMemory['saveThread']>[0]['thread'];
39
- }): Promise<import("@mastra/core/memory").StorageThreadType>;
40
- export declare function deleteThreadHandler({ mastra, agentId, threadId, requestContext, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId' | 'requestContext'>): Promise<{
41
- result: string;
42
- }>;
43
- export declare function listMessagesHandler({ mastra, agentId, threadId, resourceId, perPage, page, orderBy, include, filter, requestContext, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId' | 'requestContext'> & Omit<StorageListMessagesInput, 'threadId'>): Promise<{
44
- messages: MastraDBMessage[];
45
- }>;
46
- /**
47
- * Handler to get the working memory for a thread (optionally resource-scoped).
48
- * @returns workingMemory - the working memory for the thread
49
- * @returns source - thread or resource
50
- */
51
- export declare function getWorkingMemoryHandler({ mastra, agentId, threadId, resourceId, requestContext, memoryConfig, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId' | 'requestContext'> & {
52
- resourceId?: Parameters<MastraMemory['getWorkingMemory']>[0]['resourceId'];
53
- memoryConfig?: Parameters<MastraMemory['getWorkingMemory']>[0]['memoryConfig'];
54
- }): Promise<{
55
- workingMemory: string | null;
56
- source: string;
57
- workingMemoryTemplate: import("@mastra/core/memory").WorkingMemoryTemplate | null;
89
+ hasMore: boolean;
90
+ threads: {
91
+ id: string;
92
+ createdAt: Date;
93
+ updatedAt: Date;
94
+ resourceId: string;
95
+ metadata?: Record<string, unknown> | undefined;
96
+ title?: string | undefined;
97
+ }[];
98
+ }, "json">;
99
+ export declare const GET_THREAD_BY_ID_ROUTE: import("../server-adapter").ServerRoute<import("../server-adapter").InferParams<import("zod").ZodObject<{
100
+ threadId: import("zod").ZodString;
101
+ }, "strip", import("zod").ZodTypeAny, {
102
+ threadId: string;
103
+ }, {
104
+ threadId: string;
105
+ }>, import("zod").ZodObject<{
106
+ agentId: import("zod").ZodString;
107
+ }, "strip", import("zod").ZodTypeAny, {
108
+ agentId: string;
109
+ }, {
110
+ agentId: string;
111
+ }>, undefined>, {
112
+ id: string;
113
+ createdAt: Date;
114
+ updatedAt: Date;
115
+ resourceId: string;
116
+ metadata?: Record<string, unknown> | undefined;
117
+ title?: string | undefined;
118
+ }, "json">;
119
+ export declare const LIST_MESSAGES_ROUTE: import("../server-adapter").ServerRoute<import("../server-adapter").InferParams<import("zod").ZodObject<{
120
+ threadId: import("zod").ZodString;
121
+ }, "strip", import("zod").ZodTypeAny, {
122
+ threadId: string;
123
+ }, {
124
+ threadId: string;
125
+ }>, import("zod").ZodObject<{
126
+ perPage: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
127
+ page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
128
+ } & {
129
+ agentId: import("zod").ZodString;
130
+ resourceId: import("zod").ZodOptional<import("zod").ZodString>;
131
+ orderBy: import("zod").ZodOptional<import("zod").ZodObject<{
132
+ field: import("zod").ZodOptional<import("zod").ZodEnum<["createdAt"]>>;
133
+ direction: import("zod").ZodOptional<import("zod").ZodEnum<["ASC", "DESC"]>>;
134
+ }, "strip", import("zod").ZodTypeAny, {
135
+ field?: "createdAt" | undefined;
136
+ direction?: "ASC" | "DESC" | undefined;
137
+ }, {
138
+ field?: "createdAt" | undefined;
139
+ direction?: "ASC" | "DESC" | undefined;
140
+ }>>;
141
+ include: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
142
+ id: import("zod").ZodString;
143
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
144
+ withPreviousMessages: import("zod").ZodOptional<import("zod").ZodNumber>;
145
+ withNextMessages: import("zod").ZodOptional<import("zod").ZodNumber>;
146
+ }, "strip", import("zod").ZodTypeAny, {
147
+ id: string;
148
+ threadId?: string | undefined;
149
+ withPreviousMessages?: number | undefined;
150
+ withNextMessages?: number | undefined;
151
+ }, {
152
+ id: string;
153
+ threadId?: string | undefined;
154
+ withPreviousMessages?: number | undefined;
155
+ withNextMessages?: number | undefined;
156
+ }>, "many">>, {
157
+ id: string;
158
+ threadId?: string | undefined;
159
+ withPreviousMessages?: number | undefined;
160
+ withNextMessages?: number | undefined;
161
+ }[] | undefined, unknown>;
162
+ filter: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodObject<{
163
+ dateRange: import("zod").ZodOptional<import("zod").ZodObject<{
164
+ start: import("zod").ZodOptional<import("zod").ZodDate>;
165
+ end: import("zod").ZodOptional<import("zod").ZodDate>;
166
+ }, "strip", import("zod").ZodTypeAny, {
167
+ start?: Date | undefined;
168
+ end?: Date | undefined;
169
+ }, {
170
+ start?: Date | undefined;
171
+ end?: Date | undefined;
172
+ }>>;
173
+ }, "strip", import("zod").ZodTypeAny, {
174
+ dateRange?: {
175
+ start?: Date | undefined;
176
+ end?: Date | undefined;
177
+ } | undefined;
178
+ }, {
179
+ dateRange?: {
180
+ start?: Date | undefined;
181
+ end?: Date | undefined;
182
+ } | undefined;
183
+ }>>, {
184
+ dateRange?: {
185
+ start?: Date | undefined;
186
+ end?: Date | undefined;
187
+ } | undefined;
188
+ } | undefined, unknown>;
189
+ }, "strip", import("zod").ZodTypeAny, {
190
+ page: number;
191
+ perPage: number;
192
+ agentId: string;
193
+ filter?: {
194
+ dateRange?: {
195
+ start?: Date | undefined;
196
+ end?: Date | undefined;
197
+ } | undefined;
198
+ } | undefined;
199
+ resourceId?: string | undefined;
200
+ orderBy?: {
201
+ field?: "createdAt" | undefined;
202
+ direction?: "ASC" | "DESC" | undefined;
203
+ } | undefined;
204
+ include?: {
205
+ id: string;
206
+ threadId?: string | undefined;
207
+ withPreviousMessages?: number | undefined;
208
+ withNextMessages?: number | undefined;
209
+ }[] | undefined;
210
+ }, {
211
+ agentId: string;
212
+ filter?: unknown;
213
+ page?: number | undefined;
214
+ perPage?: number | undefined;
215
+ resourceId?: string | undefined;
216
+ orderBy?: {
217
+ field?: "createdAt" | undefined;
218
+ direction?: "ASC" | "DESC" | undefined;
219
+ } | undefined;
220
+ include?: unknown;
221
+ }> | import("zod").ZodObject<{
222
+ perPage: import("zod").ZodOptional<import("zod").ZodNumber>;
223
+ page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
224
+ } & {
225
+ agentId: import("zod").ZodString;
226
+ resourceId: import("zod").ZodOptional<import("zod").ZodString>;
227
+ orderBy: import("zod").ZodOptional<import("zod").ZodObject<{
228
+ field: import("zod").ZodOptional<import("zod").ZodEnum<["createdAt"]>>;
229
+ direction: import("zod").ZodOptional<import("zod").ZodEnum<["ASC", "DESC"]>>;
230
+ }, "strip", import("zod").ZodTypeAny, {
231
+ field?: "createdAt" | undefined;
232
+ direction?: "ASC" | "DESC" | undefined;
233
+ }, {
234
+ field?: "createdAt" | undefined;
235
+ direction?: "ASC" | "DESC" | undefined;
236
+ }>>;
237
+ include: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
238
+ id: import("zod").ZodString;
239
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
240
+ withPreviousMessages: import("zod").ZodOptional<import("zod").ZodNumber>;
241
+ withNextMessages: import("zod").ZodOptional<import("zod").ZodNumber>;
242
+ }, "strip", import("zod").ZodTypeAny, {
243
+ id: string;
244
+ threadId?: string | undefined;
245
+ withPreviousMessages?: number | undefined;
246
+ withNextMessages?: number | undefined;
247
+ }, {
248
+ id: string;
249
+ threadId?: string | undefined;
250
+ withPreviousMessages?: number | undefined;
251
+ withNextMessages?: number | undefined;
252
+ }>, "many">>, {
253
+ id: string;
254
+ threadId?: string | undefined;
255
+ withPreviousMessages?: number | undefined;
256
+ withNextMessages?: number | undefined;
257
+ }[] | undefined, unknown>;
258
+ filter: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodObject<{
259
+ dateRange: import("zod").ZodOptional<import("zod").ZodObject<{
260
+ start: import("zod").ZodOptional<import("zod").ZodDate>;
261
+ end: import("zod").ZodOptional<import("zod").ZodDate>;
262
+ }, "strip", import("zod").ZodTypeAny, {
263
+ start?: Date | undefined;
264
+ end?: Date | undefined;
265
+ }, {
266
+ start?: Date | undefined;
267
+ end?: Date | undefined;
268
+ }>>;
269
+ }, "strip", import("zod").ZodTypeAny, {
270
+ dateRange?: {
271
+ start?: Date | undefined;
272
+ end?: Date | undefined;
273
+ } | undefined;
274
+ }, {
275
+ dateRange?: {
276
+ start?: Date | undefined;
277
+ end?: Date | undefined;
278
+ } | undefined;
279
+ }>>, {
280
+ dateRange?: {
281
+ start?: Date | undefined;
282
+ end?: Date | undefined;
283
+ } | undefined;
284
+ } | undefined, unknown>;
285
+ }, "strip", import("zod").ZodTypeAny, {
286
+ page: number;
287
+ agentId: string;
288
+ filter?: {
289
+ dateRange?: {
290
+ start?: Date | undefined;
291
+ end?: Date | undefined;
292
+ } | undefined;
293
+ } | undefined;
294
+ perPage?: number | undefined;
295
+ resourceId?: string | undefined;
296
+ orderBy?: {
297
+ field?: "createdAt" | undefined;
298
+ direction?: "ASC" | "DESC" | undefined;
299
+ } | undefined;
300
+ include?: {
301
+ id: string;
302
+ threadId?: string | undefined;
303
+ withPreviousMessages?: number | undefined;
304
+ withNextMessages?: number | undefined;
305
+ }[] | undefined;
306
+ }, {
307
+ agentId: string;
308
+ filter?: unknown;
309
+ page?: number | undefined;
310
+ perPage?: number | undefined;
311
+ resourceId?: string | undefined;
312
+ orderBy?: {
313
+ field?: "createdAt" | undefined;
314
+ direction?: "ASC" | "DESC" | undefined;
315
+ } | undefined;
316
+ include?: unknown;
317
+ }>, undefined>, {
318
+ messages: any[];
319
+ uiMessages?: unknown;
320
+ }, "json">;
321
+ export declare const GET_WORKING_MEMORY_ROUTE: import("../server-adapter").ServerRoute<import("../server-adapter").InferParams<import("zod").ZodObject<{
322
+ threadId: import("zod").ZodString;
323
+ }, "strip", import("zod").ZodTypeAny, {
324
+ threadId: string;
325
+ }, {
326
+ threadId: string;
327
+ }>, import("zod").ZodObject<{
328
+ agentId: import("zod").ZodString;
329
+ resourceId: import("zod").ZodOptional<import("zod").ZodString>;
330
+ memoryConfig: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>, Record<string, unknown> | undefined, unknown>;
331
+ }, "strip", import("zod").ZodTypeAny, {
332
+ agentId: string;
333
+ resourceId?: string | undefined;
334
+ memoryConfig?: Record<string, unknown> | undefined;
335
+ }, {
336
+ agentId: string;
337
+ resourceId?: string | undefined;
338
+ memoryConfig?: unknown;
339
+ }>, undefined>, {
340
+ source: "thread" | "resource";
58
341
  threadExists: boolean;
59
- }>;
60
- /**
61
- * Handler to update the working memory for a thread (optionally resource-scoped).
62
- * @param threadId - the thread id
63
- * @param body - the body containing the working memory to update and the resource id (optional)
64
- */
65
- export declare function updateWorkingMemoryHandler({ mastra, agentId, threadId, body, requestContext, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId' | 'requestContext'> & {
66
- body: Omit<Parameters<MastraMemory['updateWorkingMemory']>[0], 'threadId'>;
67
- }): Promise<{
68
- success: boolean;
69
- }>;
70
- interface SearchResult {
342
+ workingMemory?: unknown;
343
+ workingMemoryTemplate?: unknown;
344
+ }, "json">;
345
+ export declare const SAVE_MESSAGES_ROUTE: import("../server-adapter").ServerRoute<import("../server-adapter").InferParams<undefined, import("zod").ZodObject<{
346
+ agentId: import("zod").ZodString;
347
+ }, "strip", import("zod").ZodTypeAny, {
348
+ agentId: string;
349
+ }, {
350
+ agentId: string;
351
+ }>, import("zod").ZodObject<{
352
+ messages: import("zod").ZodArray<import("zod").ZodAny, "many">;
353
+ }, "strip", import("zod").ZodTypeAny, {
354
+ messages: any[];
355
+ }, {
356
+ messages: any[];
357
+ }>>, {
358
+ messages: any[];
359
+ }, "json">;
360
+ export declare const CREATE_THREAD_ROUTE: import("../server-adapter").ServerRoute<import("../server-adapter").InferParams<undefined, import("zod").ZodObject<{
361
+ agentId: import("zod").ZodString;
362
+ }, "strip", import("zod").ZodTypeAny, {
363
+ agentId: string;
364
+ }, {
365
+ agentId: string;
366
+ }>, import("zod").ZodObject<{
367
+ resourceId: import("zod").ZodString;
368
+ title: import("zod").ZodOptional<import("zod").ZodString>;
369
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
370
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
371
+ }, "strip", import("zod").ZodTypeAny, {
372
+ resourceId: string;
373
+ metadata?: Record<string, unknown> | undefined;
374
+ threadId?: string | undefined;
375
+ title?: string | undefined;
376
+ }, {
377
+ resourceId: string;
378
+ metadata?: Record<string, unknown> | undefined;
379
+ threadId?: string | undefined;
380
+ title?: string | undefined;
381
+ }>>, {
71
382
  id: string;
72
- role: string;
73
- content: any;
74
383
  createdAt: Date;
75
- threadId?: string;
76
- threadTitle?: string;
77
- score?: number;
78
- context?: {
79
- before?: SearchResult[];
80
- after?: SearchResult[];
81
- };
82
- }
83
- interface SearchResponse {
84
- results: SearchResult[];
85
- count: number;
86
- query: string;
87
- searchScope?: string;
88
- searchType?: string;
89
- }
90
- /**
91
- * Handler to delete one or more messages.
92
- * @param messageIds - Can be a single ID, array of IDs, or objects with ID property
93
- */
94
- export declare function deleteMessagesHandler({ mastra, agentId, messageIds, requestContext, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'requestContext'> & {
384
+ updatedAt: Date;
385
+ resourceId: string;
386
+ metadata?: Record<string, unknown> | undefined;
387
+ title?: string | undefined;
388
+ }, "json">;
389
+ export declare const UPDATE_THREAD_ROUTE: import("../server-adapter").ServerRoute<import("../server-adapter").InferParams<import("zod").ZodObject<{
390
+ threadId: import("zod").ZodString;
391
+ }, "strip", import("zod").ZodTypeAny, {
392
+ threadId: string;
393
+ }, {
394
+ threadId: string;
395
+ }>, import("zod").ZodObject<{
396
+ agentId: import("zod").ZodString;
397
+ }, "strip", import("zod").ZodTypeAny, {
398
+ agentId: string;
399
+ }, {
400
+ agentId: string;
401
+ }>, import("zod").ZodObject<{
402
+ title: import("zod").ZodOptional<import("zod").ZodString>;
403
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
404
+ resourceId: import("zod").ZodOptional<import("zod").ZodString>;
405
+ }, "strip", import("zod").ZodTypeAny, {
406
+ metadata?: Record<string, unknown> | undefined;
407
+ resourceId?: string | undefined;
408
+ title?: string | undefined;
409
+ }, {
410
+ metadata?: Record<string, unknown> | undefined;
411
+ resourceId?: string | undefined;
412
+ title?: string | undefined;
413
+ }>>, {
414
+ id: string;
415
+ createdAt: Date;
416
+ updatedAt: Date;
417
+ resourceId: string;
418
+ metadata?: Record<string, unknown> | undefined;
419
+ title?: string | undefined;
420
+ }, "json">;
421
+ export declare const DELETE_THREAD_ROUTE: import("../server-adapter").ServerRoute<import("../server-adapter").InferParams<import("zod").ZodObject<{
422
+ threadId: import("zod").ZodString;
423
+ }, "strip", import("zod").ZodTypeAny, {
424
+ threadId: string;
425
+ }, {
426
+ threadId: string;
427
+ }>, import("zod").ZodObject<{
428
+ agentId: import("zod").ZodString;
429
+ }, "strip", import("zod").ZodTypeAny, {
430
+ agentId: string;
431
+ }, {
432
+ agentId: string;
433
+ }>, undefined>, {
434
+ result: string;
435
+ }, "json">;
436
+ export declare const UPDATE_WORKING_MEMORY_ROUTE: import("../server-adapter").ServerRoute<import("../server-adapter").InferParams<import("zod").ZodObject<{
437
+ threadId: import("zod").ZodString;
438
+ }, "strip", import("zod").ZodTypeAny, {
439
+ threadId: string;
440
+ }, {
441
+ threadId: string;
442
+ }>, import("zod").ZodObject<{
443
+ agentId: import("zod").ZodString;
444
+ }, "strip", import("zod").ZodTypeAny, {
445
+ agentId: string;
446
+ }, {
447
+ agentId: string;
448
+ }>, import("zod").ZodObject<{
449
+ workingMemory: import("zod").ZodString;
450
+ resourceId: import("zod").ZodOptional<import("zod").ZodString>;
451
+ memoryConfig: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
452
+ }, "strip", import("zod").ZodTypeAny, {
453
+ workingMemory: string;
454
+ resourceId?: string | undefined;
455
+ memoryConfig?: Record<string, unknown> | undefined;
456
+ }, {
457
+ workingMemory: string;
458
+ resourceId?: string | undefined;
459
+ memoryConfig?: Record<string, unknown> | undefined;
460
+ }>>, {
461
+ success: boolean;
462
+ }, "json">;
463
+ export declare const DELETE_MESSAGES_ROUTE: import("../server-adapter").ServerRoute<import("../server-adapter").InferParams<undefined, import("zod").ZodObject<{
464
+ agentId: import("zod").ZodString;
465
+ }, "strip", import("zod").ZodTypeAny, {
466
+ agentId: string;
467
+ }, {
468
+ agentId: string;
469
+ }>, import("zod").ZodObject<{
470
+ messageIds: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">, import("zod").ZodObject<{
471
+ id: import("zod").ZodString;
472
+ }, "strip", import("zod").ZodTypeAny, {
473
+ id: string;
474
+ }, {
475
+ id: string;
476
+ }>, import("zod").ZodArray<import("zod").ZodObject<{
477
+ id: import("zod").ZodString;
478
+ }, "strip", import("zod").ZodTypeAny, {
479
+ id: string;
480
+ }, {
481
+ id: string;
482
+ }>, "many">]>;
483
+ }, "strip", import("zod").ZodTypeAny, {
95
484
  messageIds: string | string[] | {
96
485
  id: string;
97
486
  } | {
98
487
  id: string;
99
488
  }[];
100
- }): Promise<{
101
- success: boolean;
489
+ }, {
490
+ messageIds: string | string[] | {
491
+ id: string;
492
+ } | {
493
+ id: string;
494
+ }[];
495
+ }>>, {
102
496
  message: string;
103
- }>;
104
- export declare function searchMemoryHandler({ mastra, agentId, searchQuery, resourceId, threadId, limit, requestContext, memoryConfig, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'requestContext'> & {
497
+ success: boolean;
498
+ }, "json">;
499
+ export declare const SEARCH_MEMORY_ROUTE: import("../server-adapter").ServerRoute<{
500
+ limit: number;
501
+ resourceId: string;
502
+ agentId: string;
105
503
  searchQuery: string;
504
+ threadId?: string | undefined;
505
+ memoryConfig?: Record<string, unknown> | undefined;
506
+ }, {
507
+ results: unknown[];
508
+ count: number;
509
+ query: string;
510
+ searchScope?: string | undefined;
511
+ searchType?: string | undefined;
512
+ }, "json">;
513
+ export declare const GET_MEMORY_STATUS_NETWORK_ROUTE: import("../server-adapter").ServerRoute<{
514
+ agentId: string;
515
+ }, {
516
+ result: boolean;
517
+ }, "json">;
518
+ export declare const LIST_THREADS_NETWORK_ROUTE: import("../server-adapter").ServerRoute<import("../server-adapter").InferParams<undefined, import("zod").ZodObject<{
519
+ perPage: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
520
+ page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
521
+ } & {
522
+ agentId: import("zod").ZodString;
523
+ resourceId: import("zod").ZodString;
524
+ orderBy: import("zod").ZodOptional<import("zod").ZodObject<{
525
+ field: import("zod").ZodOptional<import("zod").ZodEnum<["createdAt", "updatedAt"]>>;
526
+ direction: import("zod").ZodOptional<import("zod").ZodEnum<["ASC", "DESC"]>>;
527
+ }, "strip", import("zod").ZodTypeAny, {
528
+ field?: "createdAt" | "updatedAt" | undefined;
529
+ direction?: "ASC" | "DESC" | undefined;
530
+ }, {
531
+ field?: "createdAt" | "updatedAt" | undefined;
532
+ direction?: "ASC" | "DESC" | undefined;
533
+ }>>;
534
+ }, "strip", import("zod").ZodTypeAny, {
535
+ page: number;
536
+ perPage: number;
537
+ resourceId: string;
538
+ agentId: string;
539
+ orderBy?: {
540
+ field?: "createdAt" | "updatedAt" | undefined;
541
+ direction?: "ASC" | "DESC" | undefined;
542
+ } | undefined;
543
+ }, {
544
+ resourceId: string;
545
+ agentId: string;
546
+ page?: number | undefined;
547
+ perPage?: number | undefined;
548
+ orderBy?: {
549
+ field?: "createdAt" | "updatedAt" | undefined;
550
+ direction?: "ASC" | "DESC" | undefined;
551
+ } | undefined;
552
+ }> | import("zod").ZodObject<{
553
+ perPage: import("zod").ZodOptional<import("zod").ZodNumber>;
554
+ page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
555
+ } & {
556
+ agentId: import("zod").ZodString;
557
+ resourceId: import("zod").ZodString;
558
+ orderBy: import("zod").ZodOptional<import("zod").ZodObject<{
559
+ field: import("zod").ZodOptional<import("zod").ZodEnum<["createdAt", "updatedAt"]>>;
560
+ direction: import("zod").ZodOptional<import("zod").ZodEnum<["ASC", "DESC"]>>;
561
+ }, "strip", import("zod").ZodTypeAny, {
562
+ field?: "createdAt" | "updatedAt" | undefined;
563
+ direction?: "ASC" | "DESC" | undefined;
564
+ }, {
565
+ field?: "createdAt" | "updatedAt" | undefined;
566
+ direction?: "ASC" | "DESC" | undefined;
567
+ }>>;
568
+ }, "strip", import("zod").ZodTypeAny, {
569
+ page: number;
570
+ resourceId: string;
571
+ agentId: string;
572
+ perPage?: number | undefined;
573
+ orderBy?: {
574
+ field?: "createdAt" | "updatedAt" | undefined;
575
+ direction?: "ASC" | "DESC" | undefined;
576
+ } | undefined;
577
+ }, {
578
+ resourceId: string;
579
+ agentId: string;
580
+ page?: number | undefined;
581
+ perPage?: number | undefined;
582
+ orderBy?: {
583
+ field?: "createdAt" | "updatedAt" | undefined;
584
+ direction?: "ASC" | "DESC" | undefined;
585
+ } | undefined;
586
+ }>, undefined>, {
587
+ total: number;
588
+ page: number;
589
+ perPage: number | false;
590
+ hasMore: boolean;
591
+ threads: {
592
+ id: string;
593
+ createdAt: Date;
594
+ updatedAt: Date;
595
+ resourceId: string;
596
+ metadata?: Record<string, unknown> | undefined;
597
+ title?: string | undefined;
598
+ }[];
599
+ }, "json">;
600
+ export declare const GET_THREAD_BY_ID_NETWORK_ROUTE: import("../server-adapter").ServerRoute<import("../server-adapter").InferParams<import("zod").ZodObject<{
601
+ threadId: import("zod").ZodString;
602
+ }, "strip", import("zod").ZodTypeAny, {
603
+ threadId: string;
604
+ }, {
605
+ threadId: string;
606
+ }>, import("zod").ZodObject<{
607
+ agentId: import("zod").ZodString;
608
+ }, "strip", import("zod").ZodTypeAny, {
609
+ agentId: string;
610
+ }, {
611
+ agentId: string;
612
+ }>, undefined>, {
613
+ id: string;
614
+ createdAt: Date;
615
+ updatedAt: Date;
616
+ resourceId: string;
617
+ metadata?: Record<string, unknown> | undefined;
618
+ title?: string | undefined;
619
+ }, "json">;
620
+ export declare const LIST_MESSAGES_NETWORK_ROUTE: import("../server-adapter").ServerRoute<import("../server-adapter").InferParams<import("zod").ZodObject<{
621
+ threadId: import("zod").ZodString;
622
+ }, "strip", import("zod").ZodTypeAny, {
623
+ threadId: string;
624
+ }, {
625
+ threadId: string;
626
+ }>, import("zod").ZodObject<{
627
+ perPage: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
628
+ page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
629
+ } & {
630
+ agentId: import("zod").ZodString;
631
+ resourceId: import("zod").ZodOptional<import("zod").ZodString>;
632
+ orderBy: import("zod").ZodOptional<import("zod").ZodObject<{
633
+ field: import("zod").ZodOptional<import("zod").ZodEnum<["createdAt"]>>;
634
+ direction: import("zod").ZodOptional<import("zod").ZodEnum<["ASC", "DESC"]>>;
635
+ }, "strip", import("zod").ZodTypeAny, {
636
+ field?: "createdAt" | undefined;
637
+ direction?: "ASC" | "DESC" | undefined;
638
+ }, {
639
+ field?: "createdAt" | undefined;
640
+ direction?: "ASC" | "DESC" | undefined;
641
+ }>>;
642
+ include: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
643
+ id: import("zod").ZodString;
644
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
645
+ withPreviousMessages: import("zod").ZodOptional<import("zod").ZodNumber>;
646
+ withNextMessages: import("zod").ZodOptional<import("zod").ZodNumber>;
647
+ }, "strip", import("zod").ZodTypeAny, {
648
+ id: string;
649
+ threadId?: string | undefined;
650
+ withPreviousMessages?: number | undefined;
651
+ withNextMessages?: number | undefined;
652
+ }, {
653
+ id: string;
654
+ threadId?: string | undefined;
655
+ withPreviousMessages?: number | undefined;
656
+ withNextMessages?: number | undefined;
657
+ }>, "many">>, {
658
+ id: string;
659
+ threadId?: string | undefined;
660
+ withPreviousMessages?: number | undefined;
661
+ withNextMessages?: number | undefined;
662
+ }[] | undefined, unknown>;
663
+ filter: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodObject<{
664
+ dateRange: import("zod").ZodOptional<import("zod").ZodObject<{
665
+ start: import("zod").ZodOptional<import("zod").ZodDate>;
666
+ end: import("zod").ZodOptional<import("zod").ZodDate>;
667
+ }, "strip", import("zod").ZodTypeAny, {
668
+ start?: Date | undefined;
669
+ end?: Date | undefined;
670
+ }, {
671
+ start?: Date | undefined;
672
+ end?: Date | undefined;
673
+ }>>;
674
+ }, "strip", import("zod").ZodTypeAny, {
675
+ dateRange?: {
676
+ start?: Date | undefined;
677
+ end?: Date | undefined;
678
+ } | undefined;
679
+ }, {
680
+ dateRange?: {
681
+ start?: Date | undefined;
682
+ end?: Date | undefined;
683
+ } | undefined;
684
+ }>>, {
685
+ dateRange?: {
686
+ start?: Date | undefined;
687
+ end?: Date | undefined;
688
+ } | undefined;
689
+ } | undefined, unknown>;
690
+ }, "strip", import("zod").ZodTypeAny, {
691
+ page: number;
692
+ perPage: number;
693
+ agentId: string;
694
+ filter?: {
695
+ dateRange?: {
696
+ start?: Date | undefined;
697
+ end?: Date | undefined;
698
+ } | undefined;
699
+ } | undefined;
700
+ resourceId?: string | undefined;
701
+ orderBy?: {
702
+ field?: "createdAt" | undefined;
703
+ direction?: "ASC" | "DESC" | undefined;
704
+ } | undefined;
705
+ include?: {
706
+ id: string;
707
+ threadId?: string | undefined;
708
+ withPreviousMessages?: number | undefined;
709
+ withNextMessages?: number | undefined;
710
+ }[] | undefined;
711
+ }, {
712
+ agentId: string;
713
+ filter?: unknown;
714
+ page?: number | undefined;
715
+ perPage?: number | undefined;
716
+ resourceId?: string | undefined;
717
+ orderBy?: {
718
+ field?: "createdAt" | undefined;
719
+ direction?: "ASC" | "DESC" | undefined;
720
+ } | undefined;
721
+ include?: unknown;
722
+ }> | import("zod").ZodObject<{
723
+ perPage: import("zod").ZodOptional<import("zod").ZodNumber>;
724
+ page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
725
+ } & {
726
+ agentId: import("zod").ZodString;
727
+ resourceId: import("zod").ZodOptional<import("zod").ZodString>;
728
+ orderBy: import("zod").ZodOptional<import("zod").ZodObject<{
729
+ field: import("zod").ZodOptional<import("zod").ZodEnum<["createdAt"]>>;
730
+ direction: import("zod").ZodOptional<import("zod").ZodEnum<["ASC", "DESC"]>>;
731
+ }, "strip", import("zod").ZodTypeAny, {
732
+ field?: "createdAt" | undefined;
733
+ direction?: "ASC" | "DESC" | undefined;
734
+ }, {
735
+ field?: "createdAt" | undefined;
736
+ direction?: "ASC" | "DESC" | undefined;
737
+ }>>;
738
+ include: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
739
+ id: import("zod").ZodString;
740
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
741
+ withPreviousMessages: import("zod").ZodOptional<import("zod").ZodNumber>;
742
+ withNextMessages: import("zod").ZodOptional<import("zod").ZodNumber>;
743
+ }, "strip", import("zod").ZodTypeAny, {
744
+ id: string;
745
+ threadId?: string | undefined;
746
+ withPreviousMessages?: number | undefined;
747
+ withNextMessages?: number | undefined;
748
+ }, {
749
+ id: string;
750
+ threadId?: string | undefined;
751
+ withPreviousMessages?: number | undefined;
752
+ withNextMessages?: number | undefined;
753
+ }>, "many">>, {
754
+ id: string;
755
+ threadId?: string | undefined;
756
+ withPreviousMessages?: number | undefined;
757
+ withNextMessages?: number | undefined;
758
+ }[] | undefined, unknown>;
759
+ filter: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodObject<{
760
+ dateRange: import("zod").ZodOptional<import("zod").ZodObject<{
761
+ start: import("zod").ZodOptional<import("zod").ZodDate>;
762
+ end: import("zod").ZodOptional<import("zod").ZodDate>;
763
+ }, "strip", import("zod").ZodTypeAny, {
764
+ start?: Date | undefined;
765
+ end?: Date | undefined;
766
+ }, {
767
+ start?: Date | undefined;
768
+ end?: Date | undefined;
769
+ }>>;
770
+ }, "strip", import("zod").ZodTypeAny, {
771
+ dateRange?: {
772
+ start?: Date | undefined;
773
+ end?: Date | undefined;
774
+ } | undefined;
775
+ }, {
776
+ dateRange?: {
777
+ start?: Date | undefined;
778
+ end?: Date | undefined;
779
+ } | undefined;
780
+ }>>, {
781
+ dateRange?: {
782
+ start?: Date | undefined;
783
+ end?: Date | undefined;
784
+ } | undefined;
785
+ } | undefined, unknown>;
786
+ }, "strip", import("zod").ZodTypeAny, {
787
+ page: number;
788
+ agentId: string;
789
+ filter?: {
790
+ dateRange?: {
791
+ start?: Date | undefined;
792
+ end?: Date | undefined;
793
+ } | undefined;
794
+ } | undefined;
795
+ perPage?: number | undefined;
796
+ resourceId?: string | undefined;
797
+ orderBy?: {
798
+ field?: "createdAt" | undefined;
799
+ direction?: "ASC" | "DESC" | undefined;
800
+ } | undefined;
801
+ include?: {
802
+ id: string;
803
+ threadId?: string | undefined;
804
+ withPreviousMessages?: number | undefined;
805
+ withNextMessages?: number | undefined;
806
+ }[] | undefined;
807
+ }, {
808
+ agentId: string;
809
+ filter?: unknown;
810
+ page?: number | undefined;
811
+ perPage?: number | undefined;
812
+ resourceId?: string | undefined;
813
+ orderBy?: {
814
+ field?: "createdAt" | undefined;
815
+ direction?: "ASC" | "DESC" | undefined;
816
+ } | undefined;
817
+ include?: unknown;
818
+ }>, undefined>, {
819
+ messages: any[];
820
+ uiMessages?: unknown;
821
+ }, "json">;
822
+ export declare const SAVE_MESSAGES_NETWORK_ROUTE: import("../server-adapter").ServerRoute<import("../server-adapter").InferParams<undefined, import("zod").ZodObject<{
823
+ agentId: import("zod").ZodString;
824
+ }, "strip", import("zod").ZodTypeAny, {
825
+ agentId: string;
826
+ }, {
827
+ agentId: string;
828
+ }>, import("zod").ZodObject<{
829
+ messages: import("zod").ZodArray<import("zod").ZodAny, "many">;
830
+ }, "strip", import("zod").ZodTypeAny, {
831
+ messages: any[];
832
+ }, {
833
+ messages: any[];
834
+ }>>, {
835
+ messages: any[];
836
+ }, "json">;
837
+ export declare const CREATE_THREAD_NETWORK_ROUTE: import("../server-adapter").ServerRoute<import("../server-adapter").InferParams<undefined, import("zod").ZodObject<{
838
+ agentId: import("zod").ZodString;
839
+ }, "strip", import("zod").ZodTypeAny, {
840
+ agentId: string;
841
+ }, {
842
+ agentId: string;
843
+ }>, import("zod").ZodObject<{
844
+ resourceId: import("zod").ZodString;
845
+ title: import("zod").ZodOptional<import("zod").ZodString>;
846
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
847
+ threadId: import("zod").ZodOptional<import("zod").ZodString>;
848
+ }, "strip", import("zod").ZodTypeAny, {
106
849
  resourceId: string;
107
- threadId?: string;
108
- limit?: number;
109
- memoryConfig?: any;
110
- }): Promise<SearchResponse | ReturnType<typeof handleError>>;
111
- export {};
850
+ metadata?: Record<string, unknown> | undefined;
851
+ threadId?: string | undefined;
852
+ title?: string | undefined;
853
+ }, {
854
+ resourceId: string;
855
+ metadata?: Record<string, unknown> | undefined;
856
+ threadId?: string | undefined;
857
+ title?: string | undefined;
858
+ }>>, {
859
+ id: string;
860
+ createdAt: Date;
861
+ updatedAt: Date;
862
+ resourceId: string;
863
+ metadata?: Record<string, unknown> | undefined;
864
+ title?: string | undefined;
865
+ }, "json">;
866
+ export declare const UPDATE_THREAD_NETWORK_ROUTE: import("../server-adapter").ServerRoute<import("../server-adapter").InferParams<import("zod").ZodObject<{
867
+ threadId: import("zod").ZodString;
868
+ }, "strip", import("zod").ZodTypeAny, {
869
+ threadId: string;
870
+ }, {
871
+ threadId: string;
872
+ }>, import("zod").ZodObject<{
873
+ agentId: import("zod").ZodString;
874
+ }, "strip", import("zod").ZodTypeAny, {
875
+ agentId: string;
876
+ }, {
877
+ agentId: string;
878
+ }>, import("zod").ZodObject<{
879
+ title: import("zod").ZodOptional<import("zod").ZodString>;
880
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
881
+ resourceId: import("zod").ZodOptional<import("zod").ZodString>;
882
+ }, "strip", import("zod").ZodTypeAny, {
883
+ metadata?: Record<string, unknown> | undefined;
884
+ resourceId?: string | undefined;
885
+ title?: string | undefined;
886
+ }, {
887
+ metadata?: Record<string, unknown> | undefined;
888
+ resourceId?: string | undefined;
889
+ title?: string | undefined;
890
+ }>>, {
891
+ id: string;
892
+ createdAt: Date;
893
+ updatedAt: Date;
894
+ resourceId: string;
895
+ metadata?: Record<string, unknown> | undefined;
896
+ title?: string | undefined;
897
+ }, "json">;
898
+ export declare const DELETE_THREAD_NETWORK_ROUTE: import("../server-adapter").ServerRoute<import("../server-adapter").InferParams<import("zod").ZodObject<{
899
+ threadId: import("zod").ZodString;
900
+ }, "strip", import("zod").ZodTypeAny, {
901
+ threadId: string;
902
+ }, {
903
+ threadId: string;
904
+ }>, import("zod").ZodObject<{
905
+ agentId: import("zod").ZodString;
906
+ }, "strip", import("zod").ZodTypeAny, {
907
+ agentId: string;
908
+ }, {
909
+ agentId: string;
910
+ }>, undefined>, {
911
+ result: string;
912
+ }, "json">;
913
+ export declare const DELETE_MESSAGES_NETWORK_ROUTE: import("../server-adapter").ServerRoute<import("../server-adapter").InferParams<undefined, import("zod").ZodObject<{
914
+ agentId: import("zod").ZodString;
915
+ }, "strip", import("zod").ZodTypeAny, {
916
+ agentId: string;
917
+ }, {
918
+ agentId: string;
919
+ }>, import("zod").ZodObject<{
920
+ messageIds: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">, import("zod").ZodObject<{
921
+ id: import("zod").ZodString;
922
+ }, "strip", import("zod").ZodTypeAny, {
923
+ id: string;
924
+ }, {
925
+ id: string;
926
+ }>, import("zod").ZodArray<import("zod").ZodObject<{
927
+ id: import("zod").ZodString;
928
+ }, "strip", import("zod").ZodTypeAny, {
929
+ id: string;
930
+ }, {
931
+ id: string;
932
+ }>, "many">]>;
933
+ }, "strip", import("zod").ZodTypeAny, {
934
+ messageIds: string | string[] | {
935
+ id: string;
936
+ } | {
937
+ id: string;
938
+ }[];
939
+ }, {
940
+ messageIds: string | string[] | {
941
+ id: string;
942
+ } | {
943
+ id: string;
944
+ }[];
945
+ }>>, {
946
+ message: string;
947
+ success: boolean;
948
+ }, "json">;
112
949
  //# sourceMappingURL=memory.d.ts.map