@letta-ai/letta-client 0.1.5 → 0.1.8

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 (540) hide show
  1. package/Client.d.ts +6 -0
  2. package/Client.js +10 -0
  3. package/api/resources/agents/client/Client.d.ts +18 -97
  4. package/api/resources/agents/client/Client.js +44 -436
  5. package/{dist/api/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.d.ts → api/resources/agents/client/requests/AgentsSearchRequest.d.ts} +3 -3
  6. package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -2
  7. package/api/resources/agents/client/requests/ResetMessagesRequest.d.ts +13 -0
  8. package/api/resources/agents/client/requests/index.d.ts +2 -4
  9. package/api/resources/agents/resources/archivalMemory/client/Client.js +4 -4
  10. package/api/resources/agents/resources/context/client/Client.js +1 -1
  11. package/api/resources/agents/resources/coreMemory/client/Client.d.ts +123 -0
  12. package/api/resources/agents/resources/coreMemory/client/Client.js +525 -0
  13. package/api/resources/agents/resources/index.d.ts +6 -2
  14. package/api/resources/agents/resources/index.js +7 -3
  15. package/api/resources/agents/resources/{memory → memoryVariables}/client/Client.d.ts +11 -13
  16. package/api/resources/agents/resources/{memory → memoryVariables}/client/Client.js +15 -25
  17. package/api/resources/agents/resources/memoryVariables/index.d.ts +2 -0
  18. package/api/resources/agents/resources/memoryVariables/index.js +18 -0
  19. package/api/resources/agents/{types/AgentsGetAgentVariablesResponse.d.ts → resources/memoryVariables/types/MemoryVariablesGetResponse.d.ts} +1 -1
  20. package/api/resources/agents/resources/memoryVariables/types/index.d.ts +1 -0
  21. package/api/resources/agents/resources/memoryVariables/types/index.js +17 -0
  22. package/api/resources/agents/resources/messages/client/Client.d.ts +1 -1
  23. package/api/resources/agents/resources/messages/client/Client.js +6 -6
  24. package/api/resources/agents/resources/recallMemory/client/Client.js +1 -1
  25. package/api/resources/agents/resources/sources/client/Client.js +1 -1
  26. package/api/resources/agents/resources/templates/client/Client.d.ts +82 -0
  27. package/{dist/api/resources/agents/resources/memoryBlocks → api/resources/agents/resources/templates}/client/Client.js +126 -45
  28. package/api/resources/agents/resources/templates/client/index.d.ts +1 -0
  29. package/api/resources/agents/resources/templates/client/index.js +17 -0
  30. package/api/resources/agents/{client/requests/AgentsCreateTemplateFromAgentRequest.d.ts → resources/templates/client/requests/TemplatesCreateRequest.d.ts} +2 -2
  31. package/api/resources/agents/{client/requests/AgentsCreateVersionRequest.d.ts → resources/templates/client/requests/TemplatesCreateVersionRequest.d.ts} +1 -1
  32. package/api/resources/agents/{client/requests/AgentsMigrateRequest.d.ts → resources/templates/client/requests/TemplatesMigrateRequest.d.ts} +1 -1
  33. package/api/resources/agents/resources/templates/client/requests/index.d.ts +3 -0
  34. package/api/resources/agents/resources/templates/index.d.ts +2 -0
  35. package/api/resources/agents/resources/templates/index.js +18 -0
  36. package/api/resources/agents/{types/AgentsMigrateResponse.d.ts → resources/templates/types/TemplatesMigrateResponse.d.ts} +1 -1
  37. package/api/resources/agents/resources/templates/types/index.d.ts +1 -0
  38. package/api/resources/agents/resources/templates/types/index.js +17 -0
  39. package/api/resources/agents/resources/tools/client/Client.js +3 -3
  40. package/api/resources/agents/types/AgentsSearchRequestCombinator.d.ts +8 -0
  41. package/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestCombinator.js → AgentsSearchRequestCombinator.js} +2 -2
  42. package/api/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +16 -0
  43. package/api/resources/agents/types/AgentsSearchRequestSearchItemName.d.ts +8 -0
  44. package/api/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +9 -0
  45. package/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemNameOperator.js → AgentsSearchRequestSearchItemNameOperator.js} +2 -2
  46. package/api/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.d.ts +8 -0
  47. package/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +8 -0
  48. package/{dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.js → api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.js} +2 -2
  49. package/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +8 -0
  50. package/{dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.js → api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js} +2 -2
  51. package/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemVersion.d.ts → AgentsSearchRequestSearchItemVersion.d.ts} +1 -1
  52. package/api/resources/agents/types/index.d.ts +8 -10
  53. package/api/resources/agents/types/index.js +8 -10
  54. package/api/resources/blocks/client/Client.js +7 -7
  55. package/api/resources/health/client/Client.js +1 -1
  56. package/api/resources/index.d.ts +4 -0
  57. package/api/resources/index.js +5 -1
  58. package/api/resources/jobs/client/Client.js +4 -4
  59. package/api/resources/models/client/Client.js +2 -2
  60. package/api/resources/providers/client/Client.d.ts +86 -0
  61. package/api/resources/providers/client/Client.js +336 -0
  62. package/api/resources/providers/client/index.d.ts +1 -0
  63. package/api/resources/providers/client/index.js +17 -0
  64. package/api/resources/providers/client/requests/DeleteProviderRequest.d.ts +15 -0
  65. package/api/resources/providers/client/requests/ListProvidersRequest.d.ts +11 -0
  66. package/api/resources/providers/client/requests/ProviderCreate.d.ts +16 -0
  67. package/api/resources/providers/client/requests/ProviderUpdate.d.ts +16 -0
  68. package/api/resources/providers/client/requests/index.d.ts +4 -0
  69. package/api/resources/runs/client/Client.d.ts +115 -0
  70. package/api/resources/runs/client/Client.js +500 -0
  71. package/api/resources/runs/client/index.d.ts +1 -0
  72. package/api/resources/runs/client/index.js +17 -0
  73. package/api/resources/runs/client/requests/GetRunMessagesRequest.d.ts +50 -0
  74. package/api/resources/runs/client/requests/index.d.ts +1 -0
  75. package/api/resources/sources/client/Client.js +8 -8
  76. package/api/resources/sources/resources/files/client/Client.js +3 -3
  77. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  78. package/api/resources/tools/client/Client.d.ts +3 -1
  79. package/api/resources/tools/client/Client.js +15 -13
  80. package/api/resources/tools/client/requests/ToolRunFromSource.d.ts +7 -3
  81. package/api/resources/tools/client/requests/ToolUpdate.d.ts +2 -2
  82. package/api/types/AgentType.d.ts +1 -2
  83. package/api/types/AgentType.js +0 -1
  84. package/api/types/Job.d.ts +2 -0
  85. package/api/types/JobType.d.ts +8 -0
  86. package/api/types/JobType.js +10 -0
  87. package/api/types/LettaSchemasToolTool.d.ts +4 -3
  88. package/api/types/Provider.d.ts +13 -0
  89. package/api/types/Run.d.ts +34 -0
  90. package/api/types/ToolCreate.d.ts +0 -2
  91. package/api/types/ToolType.d.ts +9 -0
  92. package/api/types/ToolType.js +11 -0
  93. package/api/types/index.d.ts +4 -0
  94. package/api/types/index.js +4 -0
  95. package/dist/Client.d.ts +6 -0
  96. package/dist/Client.js +10 -0
  97. package/dist/api/resources/agents/client/Client.d.ts +18 -97
  98. package/dist/api/resources/agents/client/Client.js +44 -436
  99. package/{api/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.d.ts → dist/api/resources/agents/client/requests/AgentsSearchRequest.d.ts} +3 -3
  100. package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -2
  101. package/dist/api/resources/agents/client/requests/ResetMessagesRequest.d.ts +13 -0
  102. package/dist/api/resources/agents/client/requests/index.d.ts +2 -4
  103. package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +4 -4
  104. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  105. package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +123 -0
  106. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +525 -0
  107. package/dist/api/resources/agents/resources/index.d.ts +6 -2
  108. package/dist/api/resources/agents/resources/index.js +7 -3
  109. package/dist/api/resources/agents/resources/{memory → memoryVariables}/client/Client.d.ts +11 -13
  110. package/dist/api/resources/agents/resources/{memory → memoryVariables}/client/Client.js +15 -25
  111. package/dist/api/resources/agents/resources/memoryVariables/client/index.js +2 -0
  112. package/dist/api/resources/agents/resources/memoryVariables/index.d.ts +2 -0
  113. package/dist/api/resources/agents/resources/memoryVariables/index.js +18 -0
  114. package/dist/api/resources/agents/{types/AgentsGetAgentVariablesResponse.d.ts → resources/memoryVariables/types/MemoryVariablesGetResponse.d.ts} +1 -1
  115. package/dist/api/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.js +5 -0
  116. package/dist/api/resources/agents/resources/memoryVariables/types/index.d.ts +1 -0
  117. package/dist/api/resources/agents/resources/memoryVariables/types/index.js +17 -0
  118. package/dist/api/resources/agents/resources/messages/client/Client.d.ts +1 -1
  119. package/dist/api/resources/agents/resources/messages/client/Client.js +6 -6
  120. package/dist/api/resources/agents/resources/recallMemory/client/Client.js +1 -1
  121. package/dist/api/resources/agents/resources/sources/client/Client.js +1 -1
  122. package/dist/api/resources/agents/resources/templates/client/Client.d.ts +82 -0
  123. package/{api/resources/agents/resources/memoryBlocks → dist/api/resources/agents/resources/templates}/client/Client.js +126 -45
  124. package/dist/api/resources/agents/resources/templates/client/index.d.ts +1 -0
  125. package/dist/api/resources/agents/resources/templates/client/index.js +17 -0
  126. package/dist/api/resources/agents/{client/requests/AgentsCreateTemplateFromAgentRequest.d.ts → resources/templates/client/requests/TemplatesCreateRequest.d.ts} +2 -2
  127. package/dist/api/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.js +5 -0
  128. package/dist/api/resources/agents/{client/requests/AgentsCreateVersionRequest.d.ts → resources/templates/client/requests/TemplatesCreateVersionRequest.d.ts} +1 -1
  129. package/dist/api/resources/agents/resources/templates/client/requests/TemplatesCreateVersionRequest.js +5 -0
  130. package/dist/api/resources/agents/{client/requests/AgentsMigrateRequest.d.ts → resources/templates/client/requests/TemplatesMigrateRequest.d.ts} +1 -1
  131. package/dist/api/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.js +5 -0
  132. package/dist/api/resources/agents/resources/templates/client/requests/index.d.ts +3 -0
  133. package/dist/api/resources/agents/resources/templates/client/requests/index.js +2 -0
  134. package/dist/api/resources/agents/resources/templates/index.d.ts +2 -0
  135. package/dist/api/resources/agents/resources/templates/index.js +18 -0
  136. package/dist/api/resources/agents/{types/AgentsMigrateResponse.d.ts → resources/templates/types/TemplatesMigrateResponse.d.ts} +1 -1
  137. package/dist/api/resources/agents/resources/templates/types/TemplatesMigrateResponse.js +5 -0
  138. package/dist/api/resources/agents/resources/templates/types/index.d.ts +1 -0
  139. package/dist/api/resources/agents/resources/templates/types/index.js +17 -0
  140. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  141. package/dist/api/resources/agents/types/AgentsSearchRequestCombinator.d.ts +8 -0
  142. package/dist/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestCombinator.js → AgentsSearchRequestCombinator.js} +2 -2
  143. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +16 -0
  144. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItem.js +5 -0
  145. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemName.d.ts +8 -0
  146. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemName.js +5 -0
  147. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +9 -0
  148. package/dist/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemNameOperator.js → AgentsSearchRequestSearchItemNameOperator.js} +2 -2
  149. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.d.ts +8 -0
  150. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.js +5 -0
  151. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +8 -0
  152. package/{api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.js → dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.js} +2 -2
  153. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +8 -0
  154. package/{api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.js → dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js} +2 -2
  155. package/dist/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemVersion.d.ts → AgentsSearchRequestSearchItemVersion.d.ts} +1 -1
  156. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemVersion.js +5 -0
  157. package/dist/api/resources/agents/types/index.d.ts +8 -10
  158. package/dist/api/resources/agents/types/index.js +8 -10
  159. package/dist/api/resources/blocks/client/Client.js +7 -7
  160. package/dist/api/resources/health/client/Client.js +1 -1
  161. package/dist/api/resources/index.d.ts +4 -0
  162. package/dist/api/resources/index.js +5 -1
  163. package/dist/api/resources/jobs/client/Client.js +4 -4
  164. package/dist/api/resources/models/client/Client.js +2 -2
  165. package/dist/api/resources/providers/client/Client.d.ts +86 -0
  166. package/dist/api/resources/providers/client/Client.js +336 -0
  167. package/dist/api/resources/providers/client/index.d.ts +1 -0
  168. package/dist/api/resources/providers/client/index.js +17 -0
  169. package/dist/api/resources/providers/client/requests/DeleteProviderRequest.d.ts +15 -0
  170. package/dist/api/resources/providers/client/requests/DeleteProviderRequest.js +5 -0
  171. package/dist/api/resources/providers/client/requests/ListProvidersRequest.d.ts +11 -0
  172. package/dist/api/resources/providers/client/requests/ListProvidersRequest.js +5 -0
  173. package/dist/api/resources/providers/client/requests/ProviderCreate.d.ts +16 -0
  174. package/dist/api/resources/providers/client/requests/ProviderCreate.js +5 -0
  175. package/dist/api/resources/providers/client/requests/ProviderUpdate.d.ts +16 -0
  176. package/dist/api/resources/providers/client/requests/ProviderUpdate.js +5 -0
  177. package/dist/api/resources/providers/client/requests/index.d.ts +4 -0
  178. package/dist/api/resources/providers/client/requests/index.js +2 -0
  179. package/dist/api/resources/runs/client/Client.d.ts +115 -0
  180. package/dist/api/resources/runs/client/Client.js +500 -0
  181. package/dist/api/resources/runs/client/index.d.ts +1 -0
  182. package/dist/api/resources/runs/client/index.js +17 -0
  183. package/dist/api/resources/runs/client/requests/GetRunMessagesRequest.d.ts +50 -0
  184. package/dist/api/resources/runs/client/requests/GetRunMessagesRequest.js +5 -0
  185. package/dist/api/resources/runs/client/requests/index.d.ts +1 -0
  186. package/dist/api/resources/runs/client/requests/index.js +2 -0
  187. package/dist/api/resources/sources/client/Client.js +8 -8
  188. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  189. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  190. package/dist/api/resources/tools/client/Client.d.ts +3 -1
  191. package/dist/api/resources/tools/client/Client.js +15 -13
  192. package/dist/api/resources/tools/client/requests/ToolRunFromSource.d.ts +7 -3
  193. package/dist/api/resources/tools/client/requests/ToolUpdate.d.ts +2 -2
  194. package/dist/api/types/AgentType.d.ts +1 -2
  195. package/dist/api/types/AgentType.js +0 -1
  196. package/dist/api/types/Job.d.ts +2 -0
  197. package/dist/api/types/JobType.d.ts +8 -0
  198. package/dist/api/types/JobType.js +10 -0
  199. package/dist/api/types/LettaSchemasToolTool.d.ts +4 -3
  200. package/dist/api/types/Provider.d.ts +13 -0
  201. package/dist/api/types/Provider.js +5 -0
  202. package/dist/api/types/Run.d.ts +34 -0
  203. package/dist/api/types/Run.js +5 -0
  204. package/dist/api/types/ToolCreate.d.ts +0 -2
  205. package/dist/api/types/ToolType.d.ts +9 -0
  206. package/dist/api/types/ToolType.js +11 -0
  207. package/dist/api/types/index.d.ts +4 -0
  208. package/dist/api/types/index.js +4 -0
  209. package/dist/serialization/resources/agents/client/index.d.ts +0 -1
  210. package/dist/serialization/resources/agents/client/index.js +1 -2
  211. package/dist/serialization/resources/agents/client/requests/AgentsSearchRequest.d.ts +18 -0
  212. package/{serialization/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.js → dist/serialization/resources/agents/client/requests/AgentsSearchRequest.js} +6 -6
  213. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
  214. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -1
  215. package/dist/serialization/resources/agents/client/requests/index.d.ts +1 -4
  216. package/dist/serialization/resources/agents/client/requests/index.js +3 -9
  217. package/dist/serialization/resources/agents/resources/coreMemory/client/getBlocks.d.ts +11 -0
  218. package/dist/serialization/resources/agents/resources/coreMemory/client/getBlocks.js +32 -0
  219. package/dist/serialization/resources/agents/resources/{memory/resources/messages → coreMemory}/client/index.d.ts +1 -0
  220. package/{serialization/resources/agents/resources/memory/resources/messages → dist/serialization/resources/agents/resources/coreMemory}/client/index.js +2 -1
  221. package/dist/serialization/resources/agents/resources/coreMemory/client/listInContext.d.ts +11 -0
  222. package/dist/serialization/resources/agents/resources/{memory/resources/messages → coreMemory}/client/listInContext.js +2 -2
  223. package/dist/serialization/resources/agents/resources/coreMemory/index.d.ts +1 -0
  224. package/dist/serialization/resources/agents/resources/coreMemory/index.js +17 -0
  225. package/dist/serialization/resources/agents/resources/index.d.ts +6 -1
  226. package/dist/serialization/resources/agents/resources/index.js +7 -2
  227. package/dist/serialization/resources/agents/resources/memoryVariables/index.d.ts +1 -0
  228. package/dist/serialization/resources/agents/resources/memoryVariables/index.js +17 -0
  229. package/dist/serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.d.ts +12 -0
  230. package/dist/serialization/resources/agents/{types/AgentsGetAgentVariablesResponse.js → resources/memoryVariables/types/MemoryVariablesGetResponse.js} +3 -3
  231. package/dist/serialization/resources/agents/resources/memoryVariables/types/index.d.ts +1 -0
  232. package/dist/serialization/resources/agents/resources/memoryVariables/types/index.js +17 -0
  233. package/dist/serialization/resources/agents/resources/templates/client/index.d.ts +1 -0
  234. package/dist/serialization/resources/agents/resources/templates/client/index.js +17 -0
  235. package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +12 -0
  236. package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.js +33 -0
  237. package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateVersionRequest.d.ts +12 -0
  238. package/dist/serialization/resources/agents/{client/requests/AgentsCreateVersionRequest.js → resources/templates/client/requests/TemplatesCreateVersionRequest.js} +3 -3
  239. package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.d.ts +14 -0
  240. package/{serialization/resources/agents/client/requests/AgentsMigrateRequest.js → dist/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.js} +3 -3
  241. package/dist/serialization/resources/agents/resources/templates/client/requests/index.d.ts +3 -0
  242. package/dist/serialization/resources/agents/resources/templates/client/requests/index.js +9 -0
  243. package/dist/serialization/resources/agents/resources/templates/index.d.ts +2 -0
  244. package/dist/serialization/resources/agents/resources/templates/index.js +18 -0
  245. package/dist/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.d.ts +12 -0
  246. package/dist/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.js +33 -0
  247. package/dist/serialization/resources/agents/resources/templates/types/index.d.ts +1 -0
  248. package/dist/serialization/resources/agents/resources/templates/types/index.js +17 -0
  249. package/dist/serialization/resources/agents/types/AgentsSearchRequestCombinator.d.ts +10 -0
  250. package/dist/serialization/resources/agents/types/{AgentsMigrateResponse.js → AgentsSearchRequestCombinator.js} +2 -4
  251. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +22 -0
  252. package/dist/serialization/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemOrderBy.js → AgentsSearchRequestSearchItem.js} +13 -6
  253. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.d.ts +14 -0
  254. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.js +35 -0
  255. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +10 -0
  256. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.js +31 -0
  257. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.d.ts +15 -0
  258. package/dist/serialization/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemName.js → AgentsSearchRequestSearchItemOrderBy.js} +6 -5
  259. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +10 -0
  260. package/dist/serialization/resources/agents/types/{AgentsSearchDeployedAgentsRequestCombinator.js → AgentsSearchRequestSearchItemOrderByDirection.js} +2 -2
  261. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +10 -0
  262. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js +31 -0
  263. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemVersion.d.ts +12 -0
  264. package/dist/serialization/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemVersion.js → AgentsSearchRequestSearchItemVersion.js} +2 -2
  265. package/dist/serialization/resources/agents/types/index.d.ts +8 -10
  266. package/dist/serialization/resources/agents/types/index.js +8 -10
  267. package/dist/serialization/resources/index.d.ts +3 -0
  268. package/dist/serialization/resources/index.js +4 -1
  269. package/dist/serialization/resources/providers/client/index.d.ts +2 -0
  270. package/{api/resources/agents/resources/memory/resources → dist/serialization/resources/providers/client}/index.js +6 -2
  271. package/dist/serialization/resources/providers/client/listProviders.d.ts +11 -0
  272. package/{serialization/resources/agents/types/AgentsMigrateResponse.js → dist/serialization/resources/providers/client/listProviders.js} +3 -4
  273. package/dist/serialization/resources/providers/client/requests/ProviderCreate.d.ts +13 -0
  274. package/{serialization/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.js → dist/serialization/resources/providers/client/requests/ProviderCreate.js} +4 -3
  275. package/dist/serialization/resources/providers/client/requests/ProviderUpdate.d.ts +13 -0
  276. package/dist/serialization/resources/{agents/client/requests/AgentsCreateTemplateFromAgentRequest.js → providers/client/requests/ProviderUpdate.js} +4 -3
  277. package/dist/serialization/resources/providers/client/requests/index.d.ts +2 -0
  278. package/dist/serialization/resources/providers/client/requests/index.js +7 -0
  279. package/dist/serialization/resources/providers/index.d.ts +1 -0
  280. package/dist/serialization/resources/providers/index.js +17 -0
  281. package/dist/serialization/resources/runs/client/getRunMessages.d.ts +11 -0
  282. package/dist/serialization/resources/runs/client/getRunMessages.js +32 -0
  283. package/dist/serialization/resources/runs/client/index.d.ts +3 -0
  284. package/dist/{api/resources/agents/resources/memory/resources → serialization/resources/runs/client}/index.js +4 -2
  285. package/dist/serialization/resources/{agents/client/getAgentMemoryBlocks.d.ts → runs/client/listActiveRuns.d.ts} +3 -3
  286. package/dist/serialization/resources/{agents/client/getAgentMemoryBlocks.js → runs/client/listActiveRuns.js} +2 -2
  287. package/{serialization/resources/agents/client/getAgentMemoryBlocks.d.ts → dist/serialization/resources/runs/client/listRuns.d.ts} +3 -3
  288. package/{serialization/resources/agents/client/getAgentMemoryBlocks.js → dist/serialization/resources/runs/client/listRuns.js} +2 -2
  289. package/dist/serialization/resources/runs/index.d.ts +1 -0
  290. package/dist/serialization/resources/runs/index.js +17 -0
  291. package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -1
  292. package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.js +2 -1
  293. package/dist/serialization/resources/tools/client/requests/ToolUpdate.d.ts +1 -1
  294. package/dist/serialization/resources/tools/client/requests/ToolUpdate.js +1 -1
  295. package/dist/serialization/types/AgentType.d.ts +1 -1
  296. package/dist/serialization/types/AgentType.js +1 -7
  297. package/dist/serialization/types/Job.d.ts +2 -0
  298. package/dist/serialization/types/Job.js +2 -0
  299. package/dist/serialization/types/JobType.d.ts +10 -0
  300. package/dist/serialization/types/JobType.js +34 -0
  301. package/dist/serialization/types/LettaSchemasToolTool.d.ts +3 -2
  302. package/dist/serialization/types/LettaSchemasToolTool.js +3 -2
  303. package/dist/serialization/types/Provider.d.ts +15 -0
  304. package/dist/serialization/types/Provider.js +36 -0
  305. package/dist/serialization/types/Run.d.ts +22 -0
  306. package/dist/serialization/types/Run.js +43 -0
  307. package/dist/serialization/types/ToolCreate.d.ts +0 -1
  308. package/dist/serialization/types/ToolCreate.js +0 -1
  309. package/dist/serialization/types/ToolType.d.ts +10 -0
  310. package/dist/serialization/types/ToolType.js +35 -0
  311. package/dist/serialization/types/index.d.ts +4 -0
  312. package/dist/serialization/types/index.js +4 -0
  313. package/dist/version.d.ts +1 -1
  314. package/dist/version.js +1 -1
  315. package/package.json +1 -1
  316. package/reference.md +1048 -317
  317. package/serialization/resources/agents/client/index.d.ts +0 -1
  318. package/serialization/resources/agents/client/index.js +1 -2
  319. package/serialization/resources/agents/client/requests/AgentsSearchRequest.d.ts +18 -0
  320. package/{dist/serialization/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.js → serialization/resources/agents/client/requests/AgentsSearchRequest.js} +6 -6
  321. package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
  322. package/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -1
  323. package/serialization/resources/agents/client/requests/index.d.ts +1 -4
  324. package/serialization/resources/agents/client/requests/index.js +3 -9
  325. package/serialization/resources/agents/resources/coreMemory/client/getBlocks.d.ts +11 -0
  326. package/serialization/resources/agents/resources/coreMemory/client/getBlocks.js +32 -0
  327. package/serialization/resources/agents/resources/{memory/resources/messages → coreMemory}/client/index.d.ts +1 -0
  328. package/{dist/serialization/resources/agents/resources/memory/resources/messages → serialization/resources/agents/resources/coreMemory}/client/index.js +2 -1
  329. package/serialization/resources/agents/resources/coreMemory/client/listInContext.d.ts +11 -0
  330. package/serialization/resources/agents/resources/{memory/resources/messages → coreMemory}/client/listInContext.js +2 -2
  331. package/serialization/resources/agents/resources/coreMemory/index.d.ts +1 -0
  332. package/serialization/resources/agents/resources/coreMemory/index.js +17 -0
  333. package/serialization/resources/agents/resources/index.d.ts +6 -1
  334. package/serialization/resources/agents/resources/index.js +7 -2
  335. package/serialization/resources/agents/resources/memoryVariables/index.d.ts +1 -0
  336. package/serialization/resources/agents/resources/memoryVariables/index.js +17 -0
  337. package/serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.d.ts +12 -0
  338. package/serialization/resources/agents/{types/AgentsGetAgentVariablesResponse.js → resources/memoryVariables/types/MemoryVariablesGetResponse.js} +3 -3
  339. package/serialization/resources/agents/resources/memoryVariables/types/index.d.ts +1 -0
  340. package/serialization/resources/agents/resources/memoryVariables/types/index.js +17 -0
  341. package/serialization/resources/agents/resources/templates/client/index.d.ts +1 -0
  342. package/serialization/resources/agents/resources/templates/client/index.js +17 -0
  343. package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +12 -0
  344. package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.js +33 -0
  345. package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateVersionRequest.d.ts +12 -0
  346. package/serialization/resources/agents/{client/requests/AgentsCreateVersionRequest.js → resources/templates/client/requests/TemplatesCreateVersionRequest.js} +3 -3
  347. package/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.d.ts +14 -0
  348. package/{dist/serialization/resources/agents/client/requests/AgentsMigrateRequest.js → serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.js} +3 -3
  349. package/serialization/resources/agents/resources/templates/client/requests/index.d.ts +3 -0
  350. package/serialization/resources/agents/resources/templates/client/requests/index.js +9 -0
  351. package/serialization/resources/agents/resources/templates/index.d.ts +2 -0
  352. package/serialization/resources/agents/resources/templates/index.js +18 -0
  353. package/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.d.ts +12 -0
  354. package/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.js +33 -0
  355. package/serialization/resources/agents/resources/templates/types/index.d.ts +1 -0
  356. package/serialization/resources/agents/resources/templates/types/index.js +17 -0
  357. package/serialization/resources/agents/types/AgentsSearchRequestCombinator.d.ts +10 -0
  358. package/serialization/resources/agents/types/AgentsSearchRequestCombinator.js +31 -0
  359. package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +22 -0
  360. package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +43 -0
  361. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.d.ts +14 -0
  362. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.js +35 -0
  363. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +10 -0
  364. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.js +31 -0
  365. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.d.ts +15 -0
  366. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.js +36 -0
  367. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +10 -0
  368. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.js +31 -0
  369. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +10 -0
  370. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js +31 -0
  371. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemVersion.d.ts +12 -0
  372. package/serialization/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemVersion.js → AgentsSearchRequestSearchItemVersion.js} +2 -2
  373. package/serialization/resources/agents/types/index.d.ts +8 -10
  374. package/serialization/resources/agents/types/index.js +8 -10
  375. package/serialization/resources/index.d.ts +3 -0
  376. package/serialization/resources/index.js +4 -1
  377. package/serialization/resources/providers/client/index.d.ts +2 -0
  378. package/serialization/resources/providers/client/index.js +31 -0
  379. package/serialization/resources/providers/client/listProviders.d.ts +11 -0
  380. package/serialization/resources/providers/client/listProviders.js +32 -0
  381. package/serialization/resources/providers/client/requests/ProviderCreate.d.ts +13 -0
  382. package/serialization/resources/providers/client/requests/ProviderCreate.js +34 -0
  383. package/serialization/resources/providers/client/requests/ProviderUpdate.d.ts +13 -0
  384. package/serialization/resources/providers/client/requests/ProviderUpdate.js +34 -0
  385. package/serialization/resources/providers/client/requests/index.d.ts +2 -0
  386. package/serialization/resources/providers/client/requests/index.js +7 -0
  387. package/serialization/resources/providers/index.d.ts +1 -0
  388. package/serialization/resources/providers/index.js +17 -0
  389. package/serialization/resources/runs/client/getRunMessages.d.ts +11 -0
  390. package/serialization/resources/runs/client/getRunMessages.js +32 -0
  391. package/serialization/resources/runs/client/index.d.ts +3 -0
  392. package/{dist/serialization/resources/agents/resources/memory/resources → serialization/resources/runs/client}/index.js +4 -2
  393. package/serialization/resources/runs/client/listActiveRuns.d.ts +11 -0
  394. package/serialization/resources/runs/client/listActiveRuns.js +32 -0
  395. package/serialization/resources/runs/client/listRuns.d.ts +11 -0
  396. package/serialization/resources/runs/client/listRuns.js +32 -0
  397. package/serialization/resources/runs/index.d.ts +1 -0
  398. package/serialization/resources/runs/index.js +17 -0
  399. package/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -1
  400. package/serialization/resources/tools/client/requests/ToolRunFromSource.js +2 -1
  401. package/serialization/resources/tools/client/requests/ToolUpdate.d.ts +1 -1
  402. package/serialization/resources/tools/client/requests/ToolUpdate.js +1 -1
  403. package/serialization/types/AgentType.d.ts +1 -1
  404. package/serialization/types/AgentType.js +1 -7
  405. package/serialization/types/Job.d.ts +2 -0
  406. package/serialization/types/Job.js +2 -0
  407. package/serialization/types/JobType.d.ts +10 -0
  408. package/serialization/types/JobType.js +34 -0
  409. package/serialization/types/LettaSchemasToolTool.d.ts +3 -2
  410. package/serialization/types/LettaSchemasToolTool.js +3 -2
  411. package/serialization/types/Provider.d.ts +15 -0
  412. package/serialization/types/Provider.js +36 -0
  413. package/serialization/types/Run.d.ts +22 -0
  414. package/serialization/types/Run.js +43 -0
  415. package/serialization/types/ToolCreate.d.ts +0 -1
  416. package/serialization/types/ToolCreate.js +0 -1
  417. package/serialization/types/ToolType.d.ts +10 -0
  418. package/serialization/types/ToolType.js +35 -0
  419. package/serialization/types/index.d.ts +4 -0
  420. package/serialization/types/index.js +4 -0
  421. package/version.d.ts +1 -1
  422. package/version.js +1 -1
  423. package/api/resources/agents/resources/memory/index.d.ts +0 -2
  424. package/api/resources/agents/resources/memory/index.js +0 -18
  425. package/api/resources/agents/resources/memory/resources/index.d.ts +0 -1
  426. package/api/resources/agents/resources/memory/resources/messages/client/Client.d.ts +0 -42
  427. package/api/resources/agents/resources/memory/resources/messages/client/Client.js +0 -124
  428. package/api/resources/agents/resources/memoryBlocks/client/Client.d.ts +0 -59
  429. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.d.ts +0 -8
  430. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.d.ts +0 -16
  431. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemName.d.ts +0 -8
  432. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemNameOperator.d.ts +0 -9
  433. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderBy.d.ts +0 -8
  434. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.d.ts +0 -8
  435. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.d.ts +0 -8
  436. package/dist/api/resources/agents/resources/memory/index.d.ts +0 -2
  437. package/dist/api/resources/agents/resources/memory/index.js +0 -18
  438. package/dist/api/resources/agents/resources/memory/resources/index.d.ts +0 -1
  439. package/dist/api/resources/agents/resources/memory/resources/messages/client/Client.d.ts +0 -42
  440. package/dist/api/resources/agents/resources/memory/resources/messages/client/Client.js +0 -124
  441. package/dist/api/resources/agents/resources/memory/resources/messages/client/index.d.ts +0 -1
  442. package/dist/api/resources/agents/resources/memoryBlocks/client/Client.d.ts +0 -59
  443. package/dist/api/resources/agents/resources/memoryBlocks/client/index.d.ts +0 -1
  444. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.d.ts +0 -8
  445. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.d.ts +0 -16
  446. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemName.d.ts +0 -8
  447. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemNameOperator.d.ts +0 -9
  448. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderBy.d.ts +0 -8
  449. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.d.ts +0 -8
  450. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.d.ts +0 -8
  451. package/dist/serialization/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.d.ts +0 -12
  452. package/dist/serialization/resources/agents/client/requests/AgentsCreateVersionRequest.d.ts +0 -12
  453. package/dist/serialization/resources/agents/client/requests/AgentsMigrateRequest.d.ts +0 -14
  454. package/dist/serialization/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.d.ts +0 -18
  455. package/dist/serialization/resources/agents/resources/memory/index.d.ts +0 -1
  456. package/dist/serialization/resources/agents/resources/memory/index.js +0 -17
  457. package/dist/serialization/resources/agents/resources/memory/resources/index.d.ts +0 -1
  458. package/dist/serialization/resources/agents/resources/memory/resources/messages/client/listInContext.d.ts +0 -11
  459. package/dist/serialization/resources/agents/types/AgentsGetAgentVariablesResponse.d.ts +0 -12
  460. package/dist/serialization/resources/agents/types/AgentsMigrateResponse.d.ts +0 -12
  461. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.d.ts +0 -10
  462. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.d.ts +0 -22
  463. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.js +0 -43
  464. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemName.d.ts +0 -14
  465. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemNameOperator.d.ts +0 -10
  466. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemNameOperator.js +0 -31
  467. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderBy.d.ts +0 -15
  468. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.d.ts +0 -10
  469. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.js +0 -31
  470. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.d.ts +0 -10
  471. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.js +0 -31
  472. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemVersion.d.ts +0 -12
  473. package/serialization/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.d.ts +0 -12
  474. package/serialization/resources/agents/client/requests/AgentsCreateVersionRequest.d.ts +0 -12
  475. package/serialization/resources/agents/client/requests/AgentsMigrateRequest.d.ts +0 -14
  476. package/serialization/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.d.ts +0 -18
  477. package/serialization/resources/agents/resources/memory/index.d.ts +0 -1
  478. package/serialization/resources/agents/resources/memory/index.js +0 -17
  479. package/serialization/resources/agents/resources/memory/resources/index.d.ts +0 -1
  480. package/serialization/resources/agents/resources/memory/resources/index.js +0 -27
  481. package/serialization/resources/agents/resources/memory/resources/messages/client/listInContext.d.ts +0 -11
  482. package/serialization/resources/agents/types/AgentsGetAgentVariablesResponse.d.ts +0 -12
  483. package/serialization/resources/agents/types/AgentsMigrateResponse.d.ts +0 -12
  484. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.d.ts +0 -10
  485. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.js +0 -31
  486. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.d.ts +0 -22
  487. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.js +0 -43
  488. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemName.d.ts +0 -14
  489. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemName.js +0 -35
  490. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemNameOperator.d.ts +0 -10
  491. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemNameOperator.js +0 -31
  492. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderBy.d.ts +0 -15
  493. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderBy.js +0 -36
  494. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.d.ts +0 -10
  495. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.js +0 -31
  496. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.d.ts +0 -10
  497. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.js +0 -31
  498. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemVersion.d.ts +0 -12
  499. /package/api/resources/agents/client/requests/{AgentsCreateTemplateFromAgentRequest.js → AgentsSearchRequest.js} +0 -0
  500. /package/api/resources/agents/client/requests/{AgentsCreateVersionRequest.js → ResetMessagesRequest.js} +0 -0
  501. /package/api/resources/agents/resources/{memory → coreMemory}/client/index.d.ts +0 -0
  502. /package/api/resources/agents/resources/{memory → coreMemory}/client/index.js +0 -0
  503. /package/api/resources/agents/resources/{memory/resources/messages → coreMemory}/index.d.ts +0 -0
  504. /package/api/resources/agents/resources/{memory/resources/messages → coreMemory}/index.js +0 -0
  505. /package/api/resources/agents/resources/{memory/resources/messages → memoryVariables}/client/index.d.ts +0 -0
  506. /package/api/resources/agents/resources/{memory/resources/messages → memoryVariables}/client/index.js +0 -0
  507. /package/api/resources/agents/{client/requests/AgentsMigrateRequest.js → resources/memoryVariables/types/MemoryVariablesGetResponse.js} +0 -0
  508. /package/api/resources/agents/{client/requests/AgentsSearchDeployedAgentsRequest.js → resources/templates/client/requests/TemplatesCreateRequest.js} +0 -0
  509. /package/api/resources/agents/{types/AgentsGetAgentVariablesResponse.js → resources/templates/client/requests/TemplatesCreateVersionRequest.js} +0 -0
  510. /package/api/resources/agents/{types/AgentsMigrateResponse.js → resources/templates/client/requests/TemplatesMigrateRequest.js} +0 -0
  511. /package/api/resources/agents/resources/{memoryBlocks/client → templates/client/requests}/index.js +0 -0
  512. /package/api/resources/agents/{types/AgentsSearchDeployedAgentsRequestSearchItem.js → resources/templates/types/TemplatesMigrateResponse.js} +0 -0
  513. /package/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemName.js → AgentsSearchRequestSearchItem.js} +0 -0
  514. /package/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemOrderBy.js → AgentsSearchRequestSearchItemName.js} +0 -0
  515. /package/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemVersion.js → AgentsSearchRequestSearchItemOrderBy.js} +0 -0
  516. /package/{dist/api/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.js → api/resources/agents/types/AgentsSearchRequestSearchItemVersion.js} +0 -0
  517. /package/{dist/api/resources/agents/client/requests/AgentsCreateVersionRequest.js → api/resources/providers/client/requests/DeleteProviderRequest.js} +0 -0
  518. /package/{dist/api/resources/agents/client/requests/AgentsMigrateRequest.js → api/resources/providers/client/requests/ListProvidersRequest.js} +0 -0
  519. /package/{dist/api/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.js → api/resources/providers/client/requests/ProviderCreate.js} +0 -0
  520. /package/{dist/api/resources/agents/types/AgentsGetAgentVariablesResponse.js → api/resources/providers/client/requests/ProviderUpdate.js} +0 -0
  521. /package/{dist/api/resources/agents/resources/memory/client → api/resources/providers/client/requests}/index.js +0 -0
  522. /package/api/resources/{agents/resources/memoryBlocks → providers}/index.d.ts +0 -0
  523. /package/api/resources/{agents/resources/memoryBlocks → providers}/index.js +0 -0
  524. /package/{dist/api/resources/agents/types/AgentsMigrateResponse.js → api/resources/runs/client/requests/GetRunMessagesRequest.js} +0 -0
  525. /package/{dist/api/resources/agents/resources/memory/resources/messages/client → api/resources/runs/client/requests}/index.js +0 -0
  526. /package/{dist/api/resources/agents/resources/memory/resources/messages → api/resources/runs}/index.d.ts +0 -0
  527. /package/{dist/api/resources/agents/resources/memory/resources/messages → api/resources/runs}/index.js +0 -0
  528. /package/{dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.js → api/types/Provider.js} +0 -0
  529. /package/{dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemName.js → api/types/Run.js} +0 -0
  530. /package/dist/api/resources/agents/{types/AgentsSearchDeployedAgentsRequestSearchItemOrderBy.js → client/requests/AgentsSearchRequest.js} +0 -0
  531. /package/dist/api/resources/agents/{types/AgentsSearchDeployedAgentsRequestSearchItemVersion.js → client/requests/ResetMessagesRequest.js} +0 -0
  532. /package/{api/resources/agents/resources/memoryBlocks → dist/api/resources/agents/resources/coreMemory}/client/index.d.ts +0 -0
  533. /package/dist/api/resources/agents/resources/{memoryBlocks → coreMemory}/client/index.js +0 -0
  534. /package/dist/api/resources/agents/resources/{memoryBlocks → coreMemory}/index.d.ts +0 -0
  535. /package/dist/api/resources/agents/resources/{memoryBlocks → coreMemory}/index.js +0 -0
  536. /package/dist/api/resources/agents/resources/{memory → memoryVariables}/client/index.d.ts +0 -0
  537. /package/dist/{serialization/resources/agents/resources/memory/resources/messages → api/resources/providers}/index.d.ts +0 -0
  538. /package/dist/{serialization/resources/agents/resources/memory/resources/messages → api/resources/providers}/index.js +0 -0
  539. /package/{serialization/resources/agents/resources/memory/resources/messages → dist/api/resources/runs}/index.d.ts +0 -0
  540. /package/{serialization/resources/agents/resources/memory/resources/messages → dist/api/resources/runs}/index.js +0 -0
@@ -0,0 +1,500 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
37
+ var __importDefault = (this && this.__importDefault) || function (mod) {
38
+ return (mod && mod.__esModule) ? mod : { "default": mod };
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.Runs = void 0;
42
+ const environments = __importStar(require("../../../../environments"));
43
+ const core = __importStar(require("../../../../core"));
44
+ const Letta = __importStar(require("../../../index"));
45
+ const url_join_1 = __importDefault(require("url-join"));
46
+ const serializers = __importStar(require("../../../../serialization/index"));
47
+ const errors = __importStar(require("../../../../errors/index"));
48
+ class Runs {
49
+ constructor(_options = {}) {
50
+ this._options = _options;
51
+ }
52
+ /**
53
+ * List all runs.
54
+ *
55
+ * @param {Runs.RequestOptions} requestOptions - Request-specific configuration.
56
+ *
57
+ * @throws {@link Letta.UnprocessableEntityError}
58
+ *
59
+ * @example
60
+ * await client.runs.listRuns()
61
+ */
62
+ listRuns(requestOptions) {
63
+ var _a, _b;
64
+ return __awaiter(this, void 0, void 0, function* () {
65
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
66
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/runs/"),
67
+ method: "GET",
68
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
69
+ contentType: "application/json",
70
+ requestType: "json",
71
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
72
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
73
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
74
+ });
75
+ if (_response.ok) {
76
+ return serializers.runs.listRuns.Response.parseOrThrow(_response.body, {
77
+ unrecognizedObjectKeys: "passthrough",
78
+ allowUnrecognizedUnionMembers: true,
79
+ allowUnrecognizedEnumValues: true,
80
+ skipValidation: true,
81
+ breadcrumbsPrefix: ["response"],
82
+ });
83
+ }
84
+ if (_response.error.reason === "status-code") {
85
+ switch (_response.error.statusCode) {
86
+ case 422:
87
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
88
+ unrecognizedObjectKeys: "passthrough",
89
+ allowUnrecognizedUnionMembers: true,
90
+ allowUnrecognizedEnumValues: true,
91
+ skipValidation: true,
92
+ breadcrumbsPrefix: ["response"],
93
+ }));
94
+ default:
95
+ throw new errors.LettaError({
96
+ statusCode: _response.error.statusCode,
97
+ body: _response.error.body,
98
+ });
99
+ }
100
+ }
101
+ switch (_response.error.reason) {
102
+ case "non-json":
103
+ throw new errors.LettaError({
104
+ statusCode: _response.error.statusCode,
105
+ body: _response.error.rawBody,
106
+ });
107
+ case "timeout":
108
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/runs/.");
109
+ case "unknown":
110
+ throw new errors.LettaError({
111
+ message: _response.error.errorMessage,
112
+ });
113
+ }
114
+ });
115
+ }
116
+ /**
117
+ * List all active runs.
118
+ *
119
+ * @param {Runs.RequestOptions} requestOptions - Request-specific configuration.
120
+ *
121
+ * @throws {@link Letta.UnprocessableEntityError}
122
+ *
123
+ * @example
124
+ * await client.runs.listActiveRuns()
125
+ */
126
+ listActiveRuns(requestOptions) {
127
+ var _a, _b;
128
+ return __awaiter(this, void 0, void 0, function* () {
129
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
130
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/runs/active"),
131
+ method: "GET",
132
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
133
+ contentType: "application/json",
134
+ requestType: "json",
135
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
136
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
137
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
138
+ });
139
+ if (_response.ok) {
140
+ return serializers.runs.listActiveRuns.Response.parseOrThrow(_response.body, {
141
+ unrecognizedObjectKeys: "passthrough",
142
+ allowUnrecognizedUnionMembers: true,
143
+ allowUnrecognizedEnumValues: true,
144
+ skipValidation: true,
145
+ breadcrumbsPrefix: ["response"],
146
+ });
147
+ }
148
+ if (_response.error.reason === "status-code") {
149
+ switch (_response.error.statusCode) {
150
+ case 422:
151
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
152
+ unrecognizedObjectKeys: "passthrough",
153
+ allowUnrecognizedUnionMembers: true,
154
+ allowUnrecognizedEnumValues: true,
155
+ skipValidation: true,
156
+ breadcrumbsPrefix: ["response"],
157
+ }));
158
+ default:
159
+ throw new errors.LettaError({
160
+ statusCode: _response.error.statusCode,
161
+ body: _response.error.body,
162
+ });
163
+ }
164
+ }
165
+ switch (_response.error.reason) {
166
+ case "non-json":
167
+ throw new errors.LettaError({
168
+ statusCode: _response.error.statusCode,
169
+ body: _response.error.rawBody,
170
+ });
171
+ case "timeout":
172
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/runs/active.");
173
+ case "unknown":
174
+ throw new errors.LettaError({
175
+ message: _response.error.errorMessage,
176
+ });
177
+ }
178
+ });
179
+ }
180
+ /**
181
+ * Get the status of a run.
182
+ *
183
+ * @param {string} runId
184
+ * @param {Runs.RequestOptions} requestOptions - Request-specific configuration.
185
+ *
186
+ * @throws {@link Letta.UnprocessableEntityError}
187
+ *
188
+ * @example
189
+ * await client.runs.getRun("run_id")
190
+ */
191
+ getRun(runId, requestOptions) {
192
+ var _a, _b;
193
+ return __awaiter(this, void 0, void 0, function* () {
194
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
195
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/runs/${encodeURIComponent(runId)}`),
196
+ method: "GET",
197
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
198
+ contentType: "application/json",
199
+ requestType: "json",
200
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
201
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
202
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
203
+ });
204
+ if (_response.ok) {
205
+ return serializers.Run.parseOrThrow(_response.body, {
206
+ unrecognizedObjectKeys: "passthrough",
207
+ allowUnrecognizedUnionMembers: true,
208
+ allowUnrecognizedEnumValues: true,
209
+ skipValidation: true,
210
+ breadcrumbsPrefix: ["response"],
211
+ });
212
+ }
213
+ if (_response.error.reason === "status-code") {
214
+ switch (_response.error.statusCode) {
215
+ case 422:
216
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
217
+ unrecognizedObjectKeys: "passthrough",
218
+ allowUnrecognizedUnionMembers: true,
219
+ allowUnrecognizedEnumValues: true,
220
+ skipValidation: true,
221
+ breadcrumbsPrefix: ["response"],
222
+ }));
223
+ default:
224
+ throw new errors.LettaError({
225
+ statusCode: _response.error.statusCode,
226
+ body: _response.error.body,
227
+ });
228
+ }
229
+ }
230
+ switch (_response.error.reason) {
231
+ case "non-json":
232
+ throw new errors.LettaError({
233
+ statusCode: _response.error.statusCode,
234
+ body: _response.error.rawBody,
235
+ });
236
+ case "timeout":
237
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/runs/{run_id}.");
238
+ case "unknown":
239
+ throw new errors.LettaError({
240
+ message: _response.error.errorMessage,
241
+ });
242
+ }
243
+ });
244
+ }
245
+ /**
246
+ * Delete a run by its run_id.
247
+ *
248
+ * @param {string} runId
249
+ * @param {Runs.RequestOptions} requestOptions - Request-specific configuration.
250
+ *
251
+ * @throws {@link Letta.UnprocessableEntityError}
252
+ *
253
+ * @example
254
+ * await client.runs.deleteRun("run_id")
255
+ */
256
+ deleteRun(runId, requestOptions) {
257
+ var _a, _b;
258
+ return __awaiter(this, void 0, void 0, function* () {
259
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
260
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/runs/${encodeURIComponent(runId)}`),
261
+ method: "DELETE",
262
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
263
+ contentType: "application/json",
264
+ requestType: "json",
265
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
266
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
267
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
268
+ });
269
+ if (_response.ok) {
270
+ return serializers.Run.parseOrThrow(_response.body, {
271
+ unrecognizedObjectKeys: "passthrough",
272
+ allowUnrecognizedUnionMembers: true,
273
+ allowUnrecognizedEnumValues: true,
274
+ skipValidation: true,
275
+ breadcrumbsPrefix: ["response"],
276
+ });
277
+ }
278
+ if (_response.error.reason === "status-code") {
279
+ switch (_response.error.statusCode) {
280
+ case 422:
281
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
282
+ unrecognizedObjectKeys: "passthrough",
283
+ allowUnrecognizedUnionMembers: true,
284
+ allowUnrecognizedEnumValues: true,
285
+ skipValidation: true,
286
+ breadcrumbsPrefix: ["response"],
287
+ }));
288
+ default:
289
+ throw new errors.LettaError({
290
+ statusCode: _response.error.statusCode,
291
+ body: _response.error.body,
292
+ });
293
+ }
294
+ }
295
+ switch (_response.error.reason) {
296
+ case "non-json":
297
+ throw new errors.LettaError({
298
+ statusCode: _response.error.statusCode,
299
+ body: _response.error.rawBody,
300
+ });
301
+ case "timeout":
302
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling DELETE /v1/runs/{run_id}.");
303
+ case "unknown":
304
+ throw new errors.LettaError({
305
+ message: _response.error.errorMessage,
306
+ });
307
+ }
308
+ });
309
+ }
310
+ /**
311
+ * Get messages associated with a run with filtering options.
312
+ *
313
+ * Args:
314
+ * run_id: ID of the run
315
+ * cursor: Cursor for pagination
316
+ * start_date: Filter messages after this date
317
+ * end_date: Filter messages before this date
318
+ * limit: Maximum number of messages to return
319
+ * query_text: Search text in message content
320
+ * ascending: Sort order by creation time
321
+ * tags: Filter by message tags
322
+ * match_all_tags: If true, match all tags. If false, match any tag
323
+ * role: Filter by message role (user/assistant/system/tool)
324
+ * tool_name: Filter by tool call name
325
+ * user_id: ID of the user making the request
326
+ *
327
+ * @param {string} runId
328
+ * @param {Letta.GetRunMessagesRequest} request
329
+ * @param {Runs.RequestOptions} requestOptions - Request-specific configuration.
330
+ *
331
+ * @throws {@link Letta.UnprocessableEntityError}
332
+ *
333
+ * @example
334
+ * await client.runs.getRunMessages("run_id")
335
+ */
336
+ getRunMessages(runId, request = {}, requestOptions) {
337
+ var _a, _b;
338
+ return __awaiter(this, void 0, void 0, function* () {
339
+ const { cursor, startDate, endDate, limit, queryText, ascending, tags, matchAllTags, role, toolName } = request;
340
+ const _queryParams = {};
341
+ if (cursor != null) {
342
+ _queryParams["cursor"] = cursor;
343
+ }
344
+ if (startDate != null) {
345
+ _queryParams["start_date"] = startDate.toISOString();
346
+ }
347
+ if (endDate != null) {
348
+ _queryParams["end_date"] = endDate.toISOString();
349
+ }
350
+ if (limit != null) {
351
+ _queryParams["limit"] = limit.toString();
352
+ }
353
+ if (queryText != null) {
354
+ _queryParams["query_text"] = queryText;
355
+ }
356
+ if (ascending != null) {
357
+ _queryParams["ascending"] = ascending.toString();
358
+ }
359
+ if (tags != null) {
360
+ if (Array.isArray(tags)) {
361
+ _queryParams["tags"] = tags.map((item) => item);
362
+ }
363
+ else {
364
+ _queryParams["tags"] = tags;
365
+ }
366
+ }
367
+ if (matchAllTags != null) {
368
+ _queryParams["match_all_tags"] = matchAllTags.toString();
369
+ }
370
+ if (role != null) {
371
+ _queryParams["role"] = role;
372
+ }
373
+ if (toolName != null) {
374
+ _queryParams["tool_name"] = toolName;
375
+ }
376
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
377
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/runs/${encodeURIComponent(runId)}/messages`),
378
+ method: "GET",
379
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
380
+ contentType: "application/json",
381
+ queryParameters: _queryParams,
382
+ requestType: "json",
383
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
384
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
385
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
386
+ });
387
+ if (_response.ok) {
388
+ return serializers.runs.getRunMessages.Response.parseOrThrow(_response.body, {
389
+ unrecognizedObjectKeys: "passthrough",
390
+ allowUnrecognizedUnionMembers: true,
391
+ allowUnrecognizedEnumValues: true,
392
+ skipValidation: true,
393
+ breadcrumbsPrefix: ["response"],
394
+ });
395
+ }
396
+ if (_response.error.reason === "status-code") {
397
+ switch (_response.error.statusCode) {
398
+ case 422:
399
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
400
+ unrecognizedObjectKeys: "passthrough",
401
+ allowUnrecognizedUnionMembers: true,
402
+ allowUnrecognizedEnumValues: true,
403
+ skipValidation: true,
404
+ breadcrumbsPrefix: ["response"],
405
+ }));
406
+ default:
407
+ throw new errors.LettaError({
408
+ statusCode: _response.error.statusCode,
409
+ body: _response.error.body,
410
+ });
411
+ }
412
+ }
413
+ switch (_response.error.reason) {
414
+ case "non-json":
415
+ throw new errors.LettaError({
416
+ statusCode: _response.error.statusCode,
417
+ body: _response.error.rawBody,
418
+ });
419
+ case "timeout":
420
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/runs/{run_id}/messages.");
421
+ case "unknown":
422
+ throw new errors.LettaError({
423
+ message: _response.error.errorMessage,
424
+ });
425
+ }
426
+ });
427
+ }
428
+ /**
429
+ * Get usage statistics for a run.
430
+ *
431
+ * @param {string} runId
432
+ * @param {Runs.RequestOptions} requestOptions - Request-specific configuration.
433
+ *
434
+ * @throws {@link Letta.UnprocessableEntityError}
435
+ *
436
+ * @example
437
+ * await client.runs.getRunUsage("run_id")
438
+ */
439
+ getRunUsage(runId, requestOptions) {
440
+ var _a, _b;
441
+ return __awaiter(this, void 0, void 0, function* () {
442
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
443
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/runs/${encodeURIComponent(runId)}/usage`),
444
+ method: "GET",
445
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
446
+ contentType: "application/json",
447
+ requestType: "json",
448
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
449
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
450
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
451
+ });
452
+ if (_response.ok) {
453
+ return serializers.UsageStatistics.parseOrThrow(_response.body, {
454
+ unrecognizedObjectKeys: "passthrough",
455
+ allowUnrecognizedUnionMembers: true,
456
+ allowUnrecognizedEnumValues: true,
457
+ skipValidation: true,
458
+ breadcrumbsPrefix: ["response"],
459
+ });
460
+ }
461
+ if (_response.error.reason === "status-code") {
462
+ switch (_response.error.statusCode) {
463
+ case 422:
464
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
465
+ unrecognizedObjectKeys: "passthrough",
466
+ allowUnrecognizedUnionMembers: true,
467
+ allowUnrecognizedEnumValues: true,
468
+ skipValidation: true,
469
+ breadcrumbsPrefix: ["response"],
470
+ }));
471
+ default:
472
+ throw new errors.LettaError({
473
+ statusCode: _response.error.statusCode,
474
+ body: _response.error.body,
475
+ });
476
+ }
477
+ }
478
+ switch (_response.error.reason) {
479
+ case "non-json":
480
+ throw new errors.LettaError({
481
+ statusCode: _response.error.statusCode,
482
+ body: _response.error.rawBody,
483
+ });
484
+ case "timeout":
485
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/runs/{run_id}/usage.");
486
+ case "unknown":
487
+ throw new errors.LettaError({
488
+ message: _response.error.errorMessage,
489
+ });
490
+ }
491
+ });
492
+ }
493
+ _getCustomAuthorizationHeaders() {
494
+ return __awaiter(this, void 0, void 0, function* () {
495
+ const tokenValue = yield core.Supplier.get(this._options.token);
496
+ return { Authorization: `Bearer ${tokenValue}` };
497
+ });
498
+ }
499
+ }
500
+ exports.Runs = Runs;
@@ -0,0 +1 @@
1
+ export * from "./requests";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests"), exports);
@@ -0,0 +1,50 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Letta from "../../../../index";
5
+ /**
6
+ * @example
7
+ * {}
8
+ */
9
+ export interface GetRunMessagesRequest {
10
+ /**
11
+ * Cursor for pagination
12
+ */
13
+ cursor?: string;
14
+ /**
15
+ * Filter messages after this date
16
+ */
17
+ startDate?: Date;
18
+ /**
19
+ * Filter messages before this date
20
+ */
21
+ endDate?: Date;
22
+ /**
23
+ * Maximum number of messages to return
24
+ */
25
+ limit?: number;
26
+ /**
27
+ * Search text in message content
28
+ */
29
+ queryText?: string;
30
+ /**
31
+ * Sort order by creation time
32
+ */
33
+ ascending?: boolean;
34
+ /**
35
+ * Filter by message tags
36
+ */
37
+ tags?: string | string[];
38
+ /**
39
+ * If true, match all tags. If false, match any tag
40
+ */
41
+ matchAllTags?: boolean;
42
+ /**
43
+ * Filter by message role
44
+ */
45
+ role?: Letta.MessageRole;
46
+ /**
47
+ * Filter by tool call name
48
+ */
49
+ toolName?: string;
50
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export { type GetRunMessagesRequest } from "./GetRunMessagesRequest";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });