@letta-ai/letta-client 0.1.12 → 0.1.14

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 (788) hide show
  1. package/api/resources/agents/client/Client.d.ts +129 -10
  2. package/api/resources/agents/client/Client.js +636 -29
  3. package/api/resources/agents/client/requests/AgentsListRequest.d.ts +5 -1
  4. package/api/resources/agents/{resources/archivalMemory/client/requests/ArchivalMemoryListRequest.d.ts → client/requests/ListArchivalMemoryRequest.d.ts} +1 -1
  5. package/api/resources/agents/client/requests/index.d.ts +2 -0
  6. package/api/resources/agents/resources/archivalMemory/client/Client.d.ts +4 -21
  7. package/api/resources/agents/resources/archivalMemory/client/Client.js +22 -98
  8. package/api/resources/agents/resources/archivalMemory/client/index.d.ts +1 -1
  9. package/api/resources/agents/resources/archivalMemory/client/index.js +0 -15
  10. package/api/resources/agents/resources/context/client/Client.d.ts +2 -2
  11. package/api/resources/agents/resources/context/client/Client.js +3 -3
  12. package/api/resources/agents/resources/coreMemory/client/Client.d.ts +16 -46
  13. package/api/resources/agents/resources/coreMemory/client/Client.js +64 -199
  14. package/api/resources/agents/resources/index.d.ts +0 -1
  15. package/api/resources/agents/resources/index.js +0 -1
  16. package/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -2
  17. package/api/resources/agents/resources/memoryVariables/client/Client.js +4 -4
  18. package/api/resources/agents/resources/memoryVariables/types/{MemoryVariablesGetResponse.d.ts → MemoryVariablesListResponse.d.ts} +1 -1
  19. package/api/resources/agents/resources/memoryVariables/types/index.d.ts +1 -1
  20. package/api/resources/agents/resources/memoryVariables/types/index.js +1 -1
  21. package/api/resources/agents/resources/messages/client/Client.d.ts +2 -2
  22. package/api/resources/agents/resources/messages/client/Client.js +8 -8
  23. package/api/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +1 -1
  24. package/api/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +1 -24
  25. package/api/resources/agents/resources/messages/types/MessagesListResponse.d.ts +1 -1
  26. package/api/resources/agents/resources/sources/client/Client.d.ts +28 -2
  27. package/api/resources/agents/resources/sources/client/Client.js +136 -4
  28. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  29. package/api/resources/agents/resources/tools/client/Client.d.ts +7 -7
  30. package/api/resources/agents/resources/tools/client/Client.js +13 -13
  31. package/api/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +1 -15
  32. package/api/resources/agents/types/AgentsSearchRequestSearchItemDirection.d.ts +9 -0
  33. package/api/resources/agents/types/AgentsSearchRequestSearchItemDirectionDirection.d.ts +8 -0
  34. package/{dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.js → api/resources/agents/types/AgentsSearchRequestSearchItemDirectionDirection.js} +2 -2
  35. package/api/resources/agents/types/AgentsSearchRequestSearchItemDirectionValue.d.ts +8 -0
  36. package/{dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js → api/resources/agents/types/AgentsSearchRequestSearchItemDirectionValue.js} +2 -2
  37. package/api/resources/agents/types/{AgentsSearchRequestSearchItemName.d.ts → AgentsSearchRequestSearchItemOne.d.ts} +3 -2
  38. package/api/resources/agents/types/{AgentsSearchRequestSearchItemNameOperator.d.ts → AgentsSearchRequestSearchItemOneOperator.d.ts} +2 -2
  39. package/api/resources/agents/types/{AgentsSearchRequestSearchItemNameOperator.js → AgentsSearchRequestSearchItemOneOperator.js} +2 -2
  40. package/{dist/api/resources/agents/types/AgentsSearchRequestSearchItemTags.d.ts → api/resources/agents/types/AgentsSearchRequestSearchItemTwo.d.ts} +2 -1
  41. package/{dist/api/resources/agents/types/AgentsSearchRequestSearchItemVersion.d.ts → api/resources/agents/types/AgentsSearchRequestSearchItemZero.d.ts} +2 -1
  42. package/api/resources/agents/types/index.d.ts +7 -7
  43. package/api/resources/agents/types/index.js +7 -7
  44. package/api/resources/blocks/client/Client.d.ts +4 -34
  45. package/api/resources/blocks/client/Client.js +9 -141
  46. package/api/resources/blocks/client/requests/index.d.ts +0 -2
  47. package/api/resources/health/client/Client.js +1 -1
  48. package/api/resources/jobs/client/Client.d.ts +2 -2
  49. package/api/resources/jobs/client/Client.js +6 -6
  50. package/api/resources/models/client/Client.js +2 -2
  51. package/api/resources/providers/client/Client.d.ts +2 -2
  52. package/api/resources/providers/client/Client.js +9 -9
  53. package/api/resources/providers/client/requests/ListProvidersRequest.d.ts +1 -1
  54. package/api/resources/runs/client/Client.d.ts +10 -9
  55. package/api/resources/runs/client/Client.js +25 -21
  56. package/{dist/api/resources/runs/client/requests/GetRunMessagesRequest.d.ts → api/resources/runs/client/requests/ListRunMessagesRequest.d.ts} +8 -4
  57. package/api/resources/runs/client/requests/index.d.ts +1 -1
  58. package/api/resources/sources/client/Client.d.ts +4 -34
  59. package/api/resources/sources/client/Client.js +10 -154
  60. package/api/resources/sources/client/requests/index.d.ts +0 -2
  61. package/api/resources/sources/resources/files/client/Client.js +6 -6
  62. package/api/resources/sources/resources/files/client/requests/FilesListRequest.d.ts +1 -1
  63. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  64. package/api/resources/tag/client/Client.js +4 -4
  65. package/api/resources/tag/client/requests/ListTagsRequest.d.ts +1 -1
  66. package/api/resources/tools/client/Client.d.ts +9 -9
  67. package/api/resources/tools/client/Client.js +23 -23
  68. package/api/resources/tools/client/requests/ToolsListRequest.d.ts +1 -1
  69. package/api/types/AgentState.d.ts +1 -1
  70. package/{dist/api/types/AssistantMessageOutput.d.ts → api/types/AssistantMessage.d.ts} +2 -1
  71. package/api/types/Block.d.ts +1 -1
  72. package/api/types/ChatCompletionMessageToolCall.d.ts +11 -0
  73. package/api/types/ContextWindowOverview.d.ts +2 -2
  74. package/api/types/{LettaSchemasOpenaiChatCompletionRequestToolCallFunction.d.ts → Function.d.ts} +4 -2
  75. package/{dist/api/types/FunctionSchema.d.ts → api/types/FunctionDefinition.d.ts} +4 -1
  76. package/api/types/FunctionTool.d.ts +10 -0
  77. package/api/types/LettaMessageUnion.d.ts +1 -21
  78. package/api/types/LettaUsageStatistics.d.ts +1 -0
  79. package/api/types/{LettaSchemasMessageMessage.d.ts → Message.d.ts} +3 -3
  80. package/api/types/ReasoningMessage.d.ts +1 -0
  81. package/api/types/Source.d.ts +1 -1
  82. package/api/types/{SystemMessageOutput.d.ts → SystemMessage.d.ts} +2 -1
  83. package/{dist/api/types/LettaSchemasToolTool.d.ts → api/types/Tool.d.ts} +1 -1
  84. package/{dist/api/types/LettaSchemasLettaMessageToolCall.d.ts → api/types/ToolCall.d.ts} +1 -1
  85. package/api/types/ToolCallMessage.d.ts +1 -0
  86. package/api/types/ToolCallMessageToolCall.d.ts +1 -1
  87. package/api/types/ToolReturnMessage.d.ts +1 -0
  88. package/api/types/ToolType.d.ts +2 -1
  89. package/api/types/ToolType.js +1 -0
  90. package/api/types/{UserMessageOutput.d.ts → UserMessage.d.ts} +2 -1
  91. package/api/types/index.d.ts +10 -41
  92. package/api/types/index.js +10 -41
  93. package/dist/api/resources/agents/client/Client.d.ts +129 -10
  94. package/dist/api/resources/agents/client/Client.js +636 -29
  95. package/dist/api/resources/agents/client/requests/AgentsListRequest.d.ts +5 -1
  96. package/dist/api/resources/agents/{resources/archivalMemory/client/requests/ArchivalMemoryListRequest.d.ts → client/requests/ListArchivalMemoryRequest.d.ts} +1 -1
  97. package/dist/api/resources/agents/client/requests/index.d.ts +2 -0
  98. package/dist/api/resources/agents/resources/archivalMemory/client/Client.d.ts +4 -21
  99. package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +22 -98
  100. package/dist/api/resources/agents/resources/archivalMemory/client/index.d.ts +1 -1
  101. package/dist/api/resources/agents/resources/archivalMemory/client/index.js +0 -15
  102. package/dist/api/resources/agents/resources/context/client/Client.d.ts +2 -2
  103. package/dist/api/resources/agents/resources/context/client/Client.js +3 -3
  104. package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +16 -46
  105. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +64 -199
  106. package/dist/api/resources/agents/resources/index.d.ts +0 -1
  107. package/dist/api/resources/agents/resources/index.js +0 -1
  108. package/dist/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -2
  109. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +4 -4
  110. package/dist/api/resources/agents/resources/memoryVariables/types/{MemoryVariablesGetResponse.d.ts → MemoryVariablesListResponse.d.ts} +1 -1
  111. package/dist/api/resources/agents/resources/memoryVariables/types/index.d.ts +1 -1
  112. package/dist/api/resources/agents/resources/memoryVariables/types/index.js +1 -1
  113. package/dist/api/resources/agents/resources/messages/client/Client.d.ts +2 -2
  114. package/dist/api/resources/agents/resources/messages/client/Client.js +8 -8
  115. package/dist/api/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +1 -1
  116. package/dist/api/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +1 -24
  117. package/dist/api/resources/agents/resources/messages/types/MessagesListResponse.d.ts +1 -1
  118. package/dist/api/resources/agents/resources/sources/client/Client.d.ts +28 -2
  119. package/dist/api/resources/agents/resources/sources/client/Client.js +136 -4
  120. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  121. package/dist/api/resources/agents/resources/tools/client/Client.d.ts +7 -7
  122. package/dist/api/resources/agents/resources/tools/client/Client.js +13 -13
  123. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +1 -15
  124. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemDirection.d.ts +9 -0
  125. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemDirectionDirection.d.ts +8 -0
  126. package/{api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.js → dist/api/resources/agents/types/AgentsSearchRequestSearchItemDirectionDirection.js} +2 -2
  127. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemDirectionValue.d.ts +8 -0
  128. package/{api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js → dist/api/resources/agents/types/AgentsSearchRequestSearchItemDirectionValue.js} +2 -2
  129. package/dist/api/resources/agents/types/{AgentsSearchRequestSearchItemName.d.ts → AgentsSearchRequestSearchItemOne.d.ts} +3 -2
  130. package/dist/api/resources/agents/types/{AgentsSearchRequestSearchItemNameOperator.d.ts → AgentsSearchRequestSearchItemOneOperator.d.ts} +2 -2
  131. package/dist/api/resources/agents/types/{AgentsSearchRequestSearchItemNameOperator.js → AgentsSearchRequestSearchItemOneOperator.js} +2 -2
  132. package/{api/resources/agents/types/AgentsSearchRequestSearchItemTags.d.ts → dist/api/resources/agents/types/AgentsSearchRequestSearchItemTwo.d.ts} +2 -1
  133. package/{api/resources/agents/types/AgentsSearchRequestSearchItemVersion.d.ts → dist/api/resources/agents/types/AgentsSearchRequestSearchItemZero.d.ts} +2 -1
  134. package/dist/api/resources/agents/types/index.d.ts +7 -7
  135. package/dist/api/resources/agents/types/index.js +7 -7
  136. package/dist/api/resources/blocks/client/Client.d.ts +4 -34
  137. package/dist/api/resources/blocks/client/Client.js +9 -141
  138. package/dist/api/resources/blocks/client/requests/index.d.ts +0 -2
  139. package/dist/api/resources/health/client/Client.js +1 -1
  140. package/dist/api/resources/jobs/client/Client.d.ts +2 -2
  141. package/dist/api/resources/jobs/client/Client.js +6 -6
  142. package/dist/api/resources/models/client/Client.js +2 -2
  143. package/dist/api/resources/providers/client/Client.d.ts +2 -2
  144. package/dist/api/resources/providers/client/Client.js +9 -9
  145. package/dist/api/resources/providers/client/requests/ListProvidersRequest.d.ts +1 -1
  146. package/dist/api/resources/runs/client/Client.d.ts +10 -9
  147. package/dist/api/resources/runs/client/Client.js +25 -21
  148. package/{api/resources/runs/client/requests/GetRunMessagesRequest.d.ts → dist/api/resources/runs/client/requests/ListRunMessagesRequest.d.ts} +8 -4
  149. package/dist/api/resources/runs/client/requests/index.d.ts +1 -1
  150. package/dist/api/resources/sources/client/Client.d.ts +4 -34
  151. package/dist/api/resources/sources/client/Client.js +10 -154
  152. package/dist/api/resources/sources/client/requests/index.d.ts +0 -2
  153. package/dist/api/resources/sources/resources/files/client/Client.js +6 -6
  154. package/dist/api/resources/sources/resources/files/client/requests/FilesListRequest.d.ts +1 -1
  155. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  156. package/dist/api/resources/tag/client/Client.js +4 -4
  157. package/dist/api/resources/tag/client/requests/ListTagsRequest.d.ts +1 -1
  158. package/dist/api/resources/tools/client/Client.d.ts +9 -9
  159. package/dist/api/resources/tools/client/Client.js +23 -23
  160. package/dist/api/resources/tools/client/requests/ToolsListRequest.d.ts +1 -1
  161. package/dist/api/types/AgentState.d.ts +1 -1
  162. package/{api/types/AssistantMessageOutput.d.ts → dist/api/types/AssistantMessage.d.ts} +2 -1
  163. package/dist/api/types/Block.d.ts +1 -1
  164. package/dist/api/types/ChatCompletionMessageToolCall.d.ts +11 -0
  165. package/dist/api/types/ContextWindowOverview.d.ts +2 -2
  166. package/{api/types/FunctionCallOutput.d.ts → dist/api/types/Function.d.ts} +3 -1
  167. package/{api/types/FunctionSchema.d.ts → dist/api/types/FunctionDefinition.d.ts} +4 -1
  168. package/dist/api/types/FunctionTool.d.ts +10 -0
  169. package/dist/api/types/LettaMessageUnion.d.ts +1 -21
  170. package/dist/api/types/LettaUsageStatistics.d.ts +1 -0
  171. package/dist/api/types/{LettaSchemasMessageMessage.d.ts → Message.d.ts} +3 -3
  172. package/dist/api/types/ReasoningMessage.d.ts +1 -0
  173. package/dist/api/types/Source.d.ts +1 -1
  174. package/dist/api/types/{SystemMessageOutput.d.ts → SystemMessage.d.ts} +2 -1
  175. package/{api/types/LettaSchemasToolTool.d.ts → dist/api/types/Tool.d.ts} +1 -1
  176. package/{api/types/LettaSchemasLettaMessageToolCall.d.ts → dist/api/types/ToolCall.d.ts} +1 -1
  177. package/dist/api/types/ToolCallMessage.d.ts +1 -0
  178. package/dist/api/types/ToolCallMessageToolCall.d.ts +1 -1
  179. package/dist/api/types/ToolReturnMessage.d.ts +1 -0
  180. package/dist/api/types/ToolType.d.ts +2 -1
  181. package/dist/api/types/ToolType.js +1 -0
  182. package/dist/api/types/{UserMessageOutput.d.ts → UserMessage.d.ts} +2 -1
  183. package/dist/api/types/index.d.ts +10 -41
  184. package/dist/api/types/index.js +10 -41
  185. package/dist/serialization/resources/agents/client/createArchivalMemory.d.ts +11 -0
  186. package/dist/serialization/resources/agents/{resources/archivalMemory/client/list.js → client/createArchivalMemory.js} +2 -2
  187. package/dist/serialization/resources/agents/client/index.d.ts +3 -0
  188. package/dist/serialization/resources/agents/client/index.js +4 -1
  189. package/dist/serialization/resources/agents/client/listArchivalMemory.d.ts +11 -0
  190. package/dist/serialization/resources/agents/{resources/archivalMemory/client/create.js → client/listArchivalMemory.js} +2 -2
  191. package/dist/serialization/resources/agents/client/listCoreMemoryBlocks.d.ts +11 -0
  192. package/{serialization/resources/agents/resources/coreMemory/client/list.js → dist/serialization/resources/agents/client/listCoreMemoryBlocks.js} +2 -2
  193. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
  194. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -1
  195. package/dist/serialization/resources/agents/client/requests/CreateArchivalMemory.d.ts +12 -0
  196. package/{serialization/resources/agents/resources/archivalMemory → dist/serialization/resources/agents}/client/requests/CreateArchivalMemory.js +1 -1
  197. package/dist/serialization/resources/agents/client/requests/UpdateAgent.d.ts +1 -1
  198. package/dist/serialization/resources/agents/client/requests/UpdateAgent.js +1 -1
  199. package/dist/serialization/resources/agents/client/requests/index.d.ts +1 -0
  200. package/dist/serialization/resources/agents/client/requests/index.js +3 -1
  201. package/dist/serialization/resources/agents/resources/index.d.ts +0 -3
  202. package/dist/serialization/resources/agents/resources/index.js +1 -4
  203. package/{serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.d.ts → dist/serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesListResponse.d.ts} +2 -2
  204. package/{serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.js → dist/serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesListResponse.js} +2 -2
  205. package/dist/serialization/resources/agents/resources/memoryVariables/types/index.d.ts +1 -1
  206. package/dist/serialization/resources/agents/resources/memoryVariables/types/index.js +1 -1
  207. package/dist/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +2 -2
  208. package/dist/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.js +2 -2
  209. package/dist/serialization/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +4 -25
  210. package/dist/serialization/resources/agents/resources/messages/types/LettaStreamingResponse.js +12 -17
  211. package/dist/serialization/resources/agents/resources/messages/types/MessagesListResponse.d.ts +2 -2
  212. package/dist/serialization/resources/agents/resources/messages/types/MessagesListResponse.js +2 -2
  213. package/dist/serialization/resources/agents/resources/sources/client/index.d.ts +1 -1
  214. package/dist/serialization/resources/agents/resources/sources/client/index.js +2 -2
  215. package/{serialization/resources/agents/resources/sources/client/get.d.ts → dist/serialization/resources/agents/resources/sources/client/list.d.ts} +1 -1
  216. package/dist/serialization/resources/agents/resources/tools/client/list.d.ts +3 -3
  217. package/dist/serialization/resources/agents/resources/tools/client/list.js +2 -2
  218. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +5 -17
  219. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +10 -15
  220. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemDirection.d.ts +16 -0
  221. package/dist/serialization/resources/agents/types/{AgentsSearchRequestSearchItemOrderBy.js → AgentsSearchRequestSearchItemDirection.js} +7 -6
  222. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemDirectionDirection.d.ts +10 -0
  223. package/dist/serialization/resources/agents/types/{AgentsSearchRequestSearchItemNameOperator.js → AgentsSearchRequestSearchItemDirectionDirection.js} +2 -2
  224. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemDirectionValue.d.ts +10 -0
  225. package/dist/serialization/resources/agents/types/{AgentsSearchRequestSearchItemOrderByValue.js → AgentsSearchRequestSearchItemDirectionValue.js} +2 -2
  226. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOne.d.ts +15 -0
  227. package/dist/serialization/resources/agents/types/{AgentsSearchRequestSearchItemName.js → AgentsSearchRequestSearchItemOne.js} +5 -4
  228. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOneOperator.d.ts +10 -0
  229. package/dist/serialization/resources/agents/types/{AgentsSearchRequestSearchItemOrderByDirection.js → AgentsSearchRequestSearchItemOneOperator.js} +2 -2
  230. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemTwo.d.ts +14 -0
  231. package/{serialization/resources/agents/types/AgentsSearchRequestSearchItemTags.js → dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemTwo.js} +3 -2
  232. package/dist/serialization/resources/agents/types/{AgentsSearchRequestSearchItemTags.d.ts → AgentsSearchRequestSearchItemZero.d.ts} +4 -4
  233. package/{serialization/resources/agents/types/AgentsSearchRequestSearchItemVersion.js → dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemZero.js} +3 -2
  234. package/dist/serialization/resources/agents/types/index.d.ts +7 -7
  235. package/dist/serialization/resources/agents/types/index.js +7 -7
  236. package/dist/serialization/resources/runs/client/index.d.ts +1 -1
  237. package/dist/serialization/resources/runs/client/index.js +2 -2
  238. package/dist/serialization/resources/runs/client/{getRunMessages.d.ts → listRunMessages.d.ts} +1 -1
  239. package/dist/serialization/resources/sources/client/requests/SourceCreate.d.ts +1 -1
  240. package/dist/serialization/resources/sources/client/requests/SourceCreate.js +1 -1
  241. package/dist/serialization/resources/sources/client/requests/SourceUpdate.d.ts +1 -1
  242. package/dist/serialization/resources/sources/client/requests/SourceUpdate.js +1 -1
  243. package/dist/serialization/resources/tools/client/addBaseTool.d.ts +3 -3
  244. package/dist/serialization/resources/tools/client/addBaseTool.js +2 -2
  245. package/dist/serialization/resources/tools/client/list.d.ts +3 -3
  246. package/dist/serialization/resources/tools/client/list.js +2 -2
  247. package/dist/serialization/types/AgentState.d.ts +3 -3
  248. package/dist/serialization/types/AgentState.js +3 -3
  249. package/{serialization/types/AssistantMessageOutput.d.ts → dist/serialization/types/AssistantMessage.d.ts} +3 -2
  250. package/dist/serialization/types/{AssistantMessageOutput.js → AssistantMessage.js} +3 -2
  251. package/dist/serialization/types/Block.d.ts +1 -1
  252. package/dist/serialization/types/Block.js +1 -1
  253. package/dist/serialization/types/BlockUpdate.d.ts +1 -1
  254. package/dist/serialization/types/BlockUpdate.js +1 -1
  255. package/dist/serialization/types/ChatCompletionMessageToolCall.d.ts +16 -0
  256. package/dist/serialization/types/{DeleteAssistantFileResponse.js → ChatCompletionMessageToolCall.js} +8 -5
  257. package/dist/serialization/types/ContextWindowOverview.d.ts +4 -4
  258. package/dist/serialization/types/ContextWindowOverview.js +4 -4
  259. package/dist/serialization/types/CreateBlock.d.ts +1 -1
  260. package/dist/serialization/types/CreateBlock.js +1 -1
  261. package/dist/serialization/types/{FunctionCallOutput.d.ts → Function.d.ts} +3 -2
  262. package/{serialization/types/FunctionCallOutput.js → dist/serialization/types/Function.js} +5 -3
  263. package/{serialization/types/FunctionSchema.d.ts → dist/serialization/types/FunctionDefinition.d.ts} +4 -2
  264. package/{serialization/types/FunctionSchema.js → dist/serialization/types/FunctionDefinition.js} +6 -3
  265. package/dist/serialization/types/FunctionTool.d.ts +15 -0
  266. package/dist/serialization/types/{ChatCompletionRequestStop.js → FunctionTool.js} +8 -5
  267. package/dist/serialization/types/Job.d.ts +1 -1
  268. package/dist/serialization/types/Job.js +1 -1
  269. package/dist/serialization/types/LettaMessageUnion.d.ts +4 -22
  270. package/dist/serialization/types/LettaMessageUnion.js +11 -16
  271. package/dist/serialization/types/LettaUsageStatistics.d.ts +1 -0
  272. package/dist/serialization/types/LettaUsageStatistics.js +1 -0
  273. package/{serialization/types/LettaSchemasMessageMessage.d.ts → dist/serialization/types/Message.d.ts} +4 -4
  274. package/{serialization/types/LettaSchemasMessageMessage.js → dist/serialization/types/Message.js} +4 -4
  275. package/dist/serialization/types/Passage.d.ts +1 -1
  276. package/dist/serialization/types/Passage.js +1 -1
  277. package/dist/serialization/types/ReasoningMessage.d.ts +1 -0
  278. package/dist/serialization/types/ReasoningMessage.js +1 -0
  279. package/dist/serialization/types/Run.d.ts +1 -1
  280. package/dist/serialization/types/Run.js +1 -1
  281. package/dist/serialization/types/Source.d.ts +1 -1
  282. package/dist/serialization/types/Source.js +1 -1
  283. package/{serialization/types/SystemMessageOutput.d.ts → dist/serialization/types/SystemMessage.d.ts} +3 -2
  284. package/dist/serialization/types/{UserMessageOutput.js → SystemMessage.js} +3 -2
  285. package/dist/serialization/types/{LettaSchemasToolTool.d.ts → Tool.d.ts} +2 -2
  286. package/dist/serialization/types/{LettaSchemasToolTool.js → Tool.js} +2 -2
  287. package/{serialization/types/FunctionCallOutput.d.ts → dist/serialization/types/ToolCall.d.ts} +4 -3
  288. package/{serialization/types/LettaSchemasLettaMessageToolCall.js → dist/serialization/types/ToolCall.js} +2 -2
  289. package/dist/serialization/types/ToolCallMessage.d.ts +1 -0
  290. package/dist/serialization/types/ToolCallMessage.js +1 -0
  291. package/dist/serialization/types/ToolCallMessageToolCall.d.ts +2 -2
  292. package/dist/serialization/types/ToolCallMessageToolCall.js +2 -2
  293. package/dist/serialization/types/ToolReturnMessage.d.ts +1 -0
  294. package/dist/serialization/types/ToolReturnMessage.js +1 -0
  295. package/dist/serialization/types/ToolType.d.ts +1 -1
  296. package/dist/serialization/types/ToolType.js +1 -0
  297. package/dist/serialization/types/{UserMessageOutput.d.ts → UserMessage.d.ts} +3 -2
  298. package/dist/serialization/types/{SystemMessageOutput.js → UserMessage.js} +3 -2
  299. package/dist/serialization/types/index.d.ts +10 -41
  300. package/dist/serialization/types/index.js +10 -41
  301. package/dist/version.d.ts +1 -1
  302. package/dist/version.js +1 -1
  303. package/package.json +1 -1
  304. package/reference.md +889 -569
  305. package/serialization/resources/agents/client/createArchivalMemory.d.ts +11 -0
  306. package/serialization/resources/agents/{resources/archivalMemory/client/create.js → client/createArchivalMemory.js} +2 -2
  307. package/serialization/resources/agents/client/index.d.ts +3 -0
  308. package/serialization/resources/agents/client/index.js +4 -1
  309. package/serialization/resources/agents/client/listArchivalMemory.d.ts +11 -0
  310. package/serialization/resources/agents/{resources/archivalMemory/client/list.js → client/listArchivalMemory.js} +2 -2
  311. package/serialization/resources/agents/client/listCoreMemoryBlocks.d.ts +11 -0
  312. package/{dist/serialization/resources/agents/resources/coreMemory/client/list.js → serialization/resources/agents/client/listCoreMemoryBlocks.js} +2 -2
  313. package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
  314. package/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -1
  315. package/serialization/resources/agents/client/requests/CreateArchivalMemory.d.ts +12 -0
  316. package/{dist/serialization/resources/agents/resources/archivalMemory → serialization/resources/agents}/client/requests/CreateArchivalMemory.js +1 -1
  317. package/serialization/resources/agents/client/requests/UpdateAgent.d.ts +1 -1
  318. package/serialization/resources/agents/client/requests/UpdateAgent.js +1 -1
  319. package/serialization/resources/agents/client/requests/index.d.ts +1 -0
  320. package/serialization/resources/agents/client/requests/index.js +3 -1
  321. package/serialization/resources/agents/resources/index.d.ts +0 -3
  322. package/serialization/resources/agents/resources/index.js +1 -4
  323. package/{dist/serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.d.ts → serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesListResponse.d.ts} +2 -2
  324. package/{dist/serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.js → serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesListResponse.js} +2 -2
  325. package/serialization/resources/agents/resources/memoryVariables/types/index.d.ts +1 -1
  326. package/serialization/resources/agents/resources/memoryVariables/types/index.js +1 -1
  327. package/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +2 -2
  328. package/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.js +2 -2
  329. package/serialization/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +4 -25
  330. package/serialization/resources/agents/resources/messages/types/LettaStreamingResponse.js +12 -17
  331. package/serialization/resources/agents/resources/messages/types/MessagesListResponse.d.ts +2 -2
  332. package/serialization/resources/agents/resources/messages/types/MessagesListResponse.js +2 -2
  333. package/serialization/resources/agents/resources/sources/client/index.d.ts +1 -1
  334. package/serialization/resources/agents/resources/sources/client/index.js +2 -2
  335. package/{dist/serialization/resources/agents/resources/sources/client/get.d.ts → serialization/resources/agents/resources/sources/client/list.d.ts} +1 -1
  336. package/serialization/resources/agents/resources/tools/client/list.d.ts +3 -3
  337. package/serialization/resources/agents/resources/tools/client/list.js +2 -2
  338. package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +5 -17
  339. package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +10 -15
  340. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemDirection.d.ts +16 -0
  341. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemDirection.js +47 -0
  342. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemDirectionDirection.d.ts +10 -0
  343. package/serialization/resources/agents/types/{AgentsSearchRequestSearchItemNameOperator.js → AgentsSearchRequestSearchItemDirectionDirection.js} +2 -2
  344. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemDirectionValue.d.ts +10 -0
  345. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemDirectionValue.js +41 -0
  346. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOne.d.ts +15 -0
  347. package/serialization/resources/agents/types/{AgentsSearchRequestSearchItemName.js → AgentsSearchRequestSearchItemOne.js} +5 -4
  348. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOneOperator.d.ts +10 -0
  349. package/serialization/resources/agents/types/{AgentsSearchRequestSearchItemOrderByDirection.js → AgentsSearchRequestSearchItemOneOperator.js} +2 -2
  350. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemTwo.d.ts +14 -0
  351. package/{dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemTags.js → serialization/resources/agents/types/AgentsSearchRequestSearchItemTwo.js} +3 -2
  352. package/serialization/resources/agents/types/{AgentsSearchRequestSearchItemTags.d.ts → AgentsSearchRequestSearchItemZero.d.ts} +4 -4
  353. package/{dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemVersion.js → serialization/resources/agents/types/AgentsSearchRequestSearchItemZero.js} +3 -2
  354. package/serialization/resources/agents/types/index.d.ts +7 -7
  355. package/serialization/resources/agents/types/index.js +7 -7
  356. package/serialization/resources/runs/client/index.d.ts +1 -1
  357. package/serialization/resources/runs/client/index.js +2 -2
  358. package/serialization/resources/runs/client/{getRunMessages.d.ts → listRunMessages.d.ts} +1 -1
  359. package/serialization/resources/sources/client/requests/SourceCreate.d.ts +1 -1
  360. package/serialization/resources/sources/client/requests/SourceCreate.js +1 -1
  361. package/serialization/resources/sources/client/requests/SourceUpdate.d.ts +1 -1
  362. package/serialization/resources/sources/client/requests/SourceUpdate.js +1 -1
  363. package/serialization/resources/tools/client/addBaseTool.d.ts +3 -3
  364. package/serialization/resources/tools/client/addBaseTool.js +2 -2
  365. package/serialization/resources/tools/client/list.d.ts +3 -3
  366. package/serialization/resources/tools/client/list.js +2 -2
  367. package/serialization/types/AgentState.d.ts +3 -3
  368. package/serialization/types/AgentState.js +3 -3
  369. package/{dist/serialization/types/AssistantMessageOutput.d.ts → serialization/types/AssistantMessage.d.ts} +3 -2
  370. package/serialization/types/{AssistantMessageOutput.js → AssistantMessage.js} +3 -2
  371. package/serialization/types/Block.d.ts +1 -1
  372. package/serialization/types/Block.js +1 -1
  373. package/serialization/types/BlockUpdate.d.ts +1 -1
  374. package/serialization/types/BlockUpdate.js +1 -1
  375. package/serialization/types/ChatCompletionMessageToolCall.d.ts +16 -0
  376. package/{dist/serialization/types/DeleteAssistantResponse.js → serialization/types/ChatCompletionMessageToolCall.js} +8 -5
  377. package/serialization/types/ContextWindowOverview.d.ts +4 -4
  378. package/serialization/types/ContextWindowOverview.js +4 -4
  379. package/serialization/types/CreateBlock.d.ts +1 -1
  380. package/serialization/types/CreateBlock.js +1 -1
  381. package/serialization/types/{ToolCallFunctionOutput.d.ts → Function.d.ts} +4 -3
  382. package/{dist/serialization/types/FunctionCallOutput.js → serialization/types/Function.js} +5 -3
  383. package/{dist/serialization/types/FunctionSchema.d.ts → serialization/types/FunctionDefinition.d.ts} +4 -2
  384. package/{dist/serialization/types/FunctionSchema.js → serialization/types/FunctionDefinition.js} +6 -3
  385. package/serialization/types/FunctionTool.d.ts +15 -0
  386. package/{dist/serialization/types/CreateAssistantFileRequest.js → serialization/types/FunctionTool.js} +8 -4
  387. package/serialization/types/Job.d.ts +1 -1
  388. package/serialization/types/Job.js +1 -1
  389. package/serialization/types/LettaMessageUnion.d.ts +4 -22
  390. package/serialization/types/LettaMessageUnion.js +11 -16
  391. package/serialization/types/LettaUsageStatistics.d.ts +1 -0
  392. package/serialization/types/LettaUsageStatistics.js +1 -0
  393. package/{dist/serialization/types/LettaSchemasMessageMessage.d.ts → serialization/types/Message.d.ts} +4 -4
  394. package/{dist/serialization/types/LettaSchemasMessageMessage.js → serialization/types/Message.js} +4 -4
  395. package/serialization/types/Passage.d.ts +1 -1
  396. package/serialization/types/Passage.js +1 -1
  397. package/serialization/types/ReasoningMessage.d.ts +1 -0
  398. package/serialization/types/ReasoningMessage.js +1 -0
  399. package/serialization/types/Run.d.ts +1 -1
  400. package/serialization/types/Run.js +1 -1
  401. package/serialization/types/Source.d.ts +1 -1
  402. package/serialization/types/Source.js +1 -1
  403. package/serialization/types/{UserMessageOutput.d.ts → SystemMessage.d.ts} +3 -2
  404. package/serialization/types/{UserMessageOutput.js → SystemMessage.js} +3 -2
  405. package/serialization/types/{LettaSchemasToolTool.d.ts → Tool.d.ts} +2 -2
  406. package/serialization/types/{LettaSchemasToolTool.js → Tool.js} +2 -2
  407. package/{dist/serialization/types/ToolCallFunctionOutput.d.ts → serialization/types/ToolCall.d.ts} +3 -2
  408. package/{dist/serialization/types/LettaSchemasLettaMessageToolCall.js → serialization/types/ToolCall.js} +2 -2
  409. package/serialization/types/ToolCallMessage.d.ts +1 -0
  410. package/serialization/types/ToolCallMessage.js +1 -0
  411. package/serialization/types/ToolCallMessageToolCall.d.ts +2 -2
  412. package/serialization/types/ToolCallMessageToolCall.js +2 -2
  413. package/serialization/types/ToolReturnMessage.d.ts +1 -0
  414. package/serialization/types/ToolReturnMessage.js +1 -0
  415. package/serialization/types/ToolType.d.ts +1 -1
  416. package/serialization/types/ToolType.js +1 -0
  417. package/{dist/serialization/types/SystemMessageOutput.d.ts → serialization/types/UserMessage.d.ts} +3 -2
  418. package/serialization/types/{SystemMessageOutput.js → UserMessage.js} +3 -2
  419. package/serialization/types/index.d.ts +10 -41
  420. package/serialization/types/index.js +10 -41
  421. package/version.d.ts +1 -1
  422. package/version.js +1 -1
  423. package/api/resources/agents/resources/archivalMemory/client/requests/index.d.ts +0 -2
  424. package/api/resources/agents/resources/archivalMemory/client/requests/index.js +0 -2
  425. package/api/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.d.ts +0 -8
  426. package/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +0 -8
  427. package/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +0 -8
  428. package/api/resources/blocks/client/requests/LinkAgentMemoryBlockRequest.d.ts +0 -15
  429. package/api/resources/blocks/client/requests/UnlinkAgentMemoryBlockRequest.d.ts +0 -15
  430. package/api/resources/sources/client/requests/SourcesAttachRequest.d.ts +0 -15
  431. package/api/resources/sources/client/requests/SourcesDetachRequest.d.ts +0 -15
  432. package/api/types/AssistantFile.d.ts +0 -12
  433. package/api/types/AssistantMessageInput.d.ts +0 -10
  434. package/api/types/ChatCompletionRequest.d.ts +0 -29
  435. package/api/types/ChatCompletionRequestFunctionCall.d.ts +0 -5
  436. package/api/types/ChatCompletionRequestMessagesItem.d.ts +0 -5
  437. package/api/types/ChatCompletionRequestStop.d.ts +0 -4
  438. package/api/types/ChatCompletionRequestToolChoice.d.ts +0 -5
  439. package/api/types/ChatCompletionResponse.d.ts +0 -16
  440. package/api/types/Choice.d.ts +0 -11
  441. package/api/types/CreateAssistantFileRequest.d.ts +0 -7
  442. package/api/types/CreateAssistantRequest.d.ts +0 -21
  443. package/api/types/DeleteAssistantFileResponse.d.ts +0 -10
  444. package/api/types/DeleteAssistantResponse.d.ts +0 -10
  445. package/api/types/FunctionCallInput.d.ts +0 -6
  446. package/api/types/LettaSchemasOpenaiChatCompletionRequestTool.d.ts +0 -8
  447. package/api/types/LettaSchemasOpenaiChatCompletionRequestToolCall.d.ts +0 -9
  448. package/api/types/LettaSchemasOpenaiChatCompletionResponseMessage.d.ts +0 -10
  449. package/api/types/LettaSchemasOpenaiChatCompletionResponseToolCall.d.ts +0 -9
  450. package/api/types/LettaSchemasOpenaiChatCompletionResponseToolCall.js +0 -5
  451. package/api/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.d.ts +0 -9
  452. package/api/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.js +0 -5
  453. package/api/types/LettaSchemasOpenaiChatCompletionsToolCallInput.d.ts +0 -11
  454. package/api/types/LettaSchemasOpenaiChatCompletionsToolCallInput.js +0 -5
  455. package/api/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.d.ts +0 -11
  456. package/api/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.js +0 -5
  457. package/api/types/LettaSchemasToolTool.js +0 -5
  458. package/api/types/LogProbToken.d.ts +0 -8
  459. package/api/types/LogProbToken.js +0 -5
  460. package/api/types/MessageContentLogProb.d.ts +0 -10
  461. package/api/types/MessageContentLogProb.js +0 -5
  462. package/api/types/OpenAiAssistant.d.ts +0 -27
  463. package/api/types/OpenAiAssistant.js +0 -5
  464. package/api/types/ResponseFormat.d.ts +0 -6
  465. package/api/types/ResponseFormat.js +0 -5
  466. package/api/types/SystemMessageInput.d.ts +0 -8
  467. package/api/types/SystemMessageInput.js +0 -5
  468. package/api/types/SystemMessageOutput.js +0 -5
  469. package/api/types/ToolCallFunctionOutput.d.ts +0 -9
  470. package/api/types/ToolCallFunctionOutput.js +0 -5
  471. package/api/types/ToolFunctionChoice.d.ts +0 -8
  472. package/api/types/ToolFunctionChoice.js +0 -5
  473. package/api/types/ToolInput.d.ts +0 -8
  474. package/api/types/ToolInput.js +0 -5
  475. package/api/types/ToolMessage.d.ts +0 -8
  476. package/api/types/ToolMessage.js +0 -5
  477. package/api/types/UserMessageInput.d.ts +0 -9
  478. package/api/types/UserMessageInput.js +0 -5
  479. package/api/types/UserMessageInputContent.d.ts +0 -4
  480. package/api/types/UserMessageInputContent.js +0 -5
  481. package/api/types/UserMessageOutput.js +0 -5
  482. package/dist/api/resources/agents/resources/archivalMemory/client/requests/ArchivalMemoryListRequest.js +0 -5
  483. package/dist/api/resources/agents/resources/archivalMemory/client/requests/index.d.ts +0 -2
  484. package/dist/api/resources/agents/resources/archivalMemory/client/requests/index.js +0 -2
  485. package/dist/api/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.js +0 -5
  486. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemName.js +0 -5
  487. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.d.ts +0 -8
  488. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.js +0 -5
  489. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +0 -8
  490. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +0 -8
  491. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemTags.js +0 -5
  492. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemVersion.js +0 -5
  493. package/dist/api/resources/blocks/client/requests/LinkAgentMemoryBlockRequest.d.ts +0 -15
  494. package/dist/api/resources/blocks/client/requests/LinkAgentMemoryBlockRequest.js +0 -5
  495. package/dist/api/resources/blocks/client/requests/UnlinkAgentMemoryBlockRequest.d.ts +0 -15
  496. package/dist/api/resources/blocks/client/requests/UnlinkAgentMemoryBlockRequest.js +0 -5
  497. package/dist/api/resources/runs/client/requests/GetRunMessagesRequest.js +0 -5
  498. package/dist/api/resources/sources/client/requests/SourcesAttachRequest.d.ts +0 -15
  499. package/dist/api/resources/sources/client/requests/SourcesAttachRequest.js +0 -5
  500. package/dist/api/resources/sources/client/requests/SourcesDetachRequest.d.ts +0 -15
  501. package/dist/api/resources/sources/client/requests/SourcesDetachRequest.js +0 -5
  502. package/dist/api/types/AssistantFile.d.ts +0 -12
  503. package/dist/api/types/AssistantFile.js +0 -5
  504. package/dist/api/types/AssistantMessageInput.d.ts +0 -10
  505. package/dist/api/types/AssistantMessageInput.js +0 -5
  506. package/dist/api/types/AssistantMessageOutput.js +0 -5
  507. package/dist/api/types/ChatCompletionRequest.d.ts +0 -29
  508. package/dist/api/types/ChatCompletionRequest.js +0 -5
  509. package/dist/api/types/ChatCompletionRequestFunctionCall.d.ts +0 -5
  510. package/dist/api/types/ChatCompletionRequestFunctionCall.js +0 -5
  511. package/dist/api/types/ChatCompletionRequestMessagesItem.d.ts +0 -5
  512. package/dist/api/types/ChatCompletionRequestMessagesItem.js +0 -5
  513. package/dist/api/types/ChatCompletionRequestStop.d.ts +0 -4
  514. package/dist/api/types/ChatCompletionRequestStop.js +0 -5
  515. package/dist/api/types/ChatCompletionRequestToolChoice.d.ts +0 -5
  516. package/dist/api/types/ChatCompletionRequestToolChoice.js +0 -5
  517. package/dist/api/types/ChatCompletionResponse.d.ts +0 -16
  518. package/dist/api/types/ChatCompletionResponse.js +0 -5
  519. package/dist/api/types/Choice.d.ts +0 -11
  520. package/dist/api/types/Choice.js +0 -5
  521. package/dist/api/types/CreateAssistantFileRequest.d.ts +0 -7
  522. package/dist/api/types/CreateAssistantFileRequest.js +0 -5
  523. package/dist/api/types/CreateAssistantRequest.d.ts +0 -21
  524. package/dist/api/types/CreateAssistantRequest.js +0 -5
  525. package/dist/api/types/DeleteAssistantFileResponse.d.ts +0 -10
  526. package/dist/api/types/DeleteAssistantFileResponse.js +0 -5
  527. package/dist/api/types/DeleteAssistantResponse.d.ts +0 -10
  528. package/dist/api/types/DeleteAssistantResponse.js +0 -5
  529. package/dist/api/types/FunctionCallInput.d.ts +0 -6
  530. package/dist/api/types/FunctionCallInput.js +0 -5
  531. package/dist/api/types/FunctionCallOutput.d.ts +0 -7
  532. package/dist/api/types/FunctionCallOutput.js +0 -5
  533. package/dist/api/types/FunctionSchema.js +0 -5
  534. package/dist/api/types/LettaSchemasLettaMessageToolCall.js +0 -5
  535. package/dist/api/types/LettaSchemasMessageMessage.js +0 -5
  536. package/dist/api/types/LettaSchemasOpenaiChatCompletionRequestTool.d.ts +0 -8
  537. package/dist/api/types/LettaSchemasOpenaiChatCompletionRequestTool.js +0 -5
  538. package/dist/api/types/LettaSchemasOpenaiChatCompletionRequestToolCall.d.ts +0 -9
  539. package/dist/api/types/LettaSchemasOpenaiChatCompletionRequestToolCall.js +0 -5
  540. package/dist/api/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.d.ts +0 -7
  541. package/dist/api/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.js +0 -5
  542. package/dist/api/types/LettaSchemasOpenaiChatCompletionResponseMessage.d.ts +0 -10
  543. package/dist/api/types/LettaSchemasOpenaiChatCompletionResponseMessage.js +0 -5
  544. package/dist/api/types/LettaSchemasOpenaiChatCompletionResponseToolCall.d.ts +0 -9
  545. package/dist/api/types/LettaSchemasOpenaiChatCompletionResponseToolCall.js +0 -5
  546. package/dist/api/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.d.ts +0 -9
  547. package/dist/api/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.js +0 -5
  548. package/dist/api/types/LettaSchemasOpenaiChatCompletionsToolCallInput.d.ts +0 -11
  549. package/dist/api/types/LettaSchemasOpenaiChatCompletionsToolCallInput.js +0 -5
  550. package/dist/api/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.d.ts +0 -11
  551. package/dist/api/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.js +0 -5
  552. package/dist/api/types/LettaSchemasToolTool.js +0 -5
  553. package/dist/api/types/LogProbToken.d.ts +0 -8
  554. package/dist/api/types/LogProbToken.js +0 -5
  555. package/dist/api/types/MessageContentLogProb.d.ts +0 -10
  556. package/dist/api/types/MessageContentLogProb.js +0 -5
  557. package/dist/api/types/OpenAiAssistant.d.ts +0 -27
  558. package/dist/api/types/OpenAiAssistant.js +0 -5
  559. package/dist/api/types/ResponseFormat.d.ts +0 -6
  560. package/dist/api/types/ResponseFormat.js +0 -5
  561. package/dist/api/types/SystemMessageInput.d.ts +0 -8
  562. package/dist/api/types/SystemMessageInput.js +0 -5
  563. package/dist/api/types/SystemMessageOutput.js +0 -5
  564. package/dist/api/types/ToolCallFunctionOutput.d.ts +0 -9
  565. package/dist/api/types/ToolCallFunctionOutput.js +0 -5
  566. package/dist/api/types/ToolFunctionChoice.d.ts +0 -8
  567. package/dist/api/types/ToolFunctionChoice.js +0 -5
  568. package/dist/api/types/ToolInput.d.ts +0 -8
  569. package/dist/api/types/ToolInput.js +0 -5
  570. package/dist/api/types/ToolMessage.d.ts +0 -8
  571. package/dist/api/types/ToolMessage.js +0 -5
  572. package/dist/api/types/UserMessageInput.d.ts +0 -9
  573. package/dist/api/types/UserMessageInput.js +0 -5
  574. package/dist/api/types/UserMessageInputContent.d.ts +0 -4
  575. package/dist/api/types/UserMessageInputContent.js +0 -5
  576. package/dist/api/types/UserMessageOutput.js +0 -5
  577. package/dist/serialization/resources/agents/resources/archivalMemory/client/create.d.ts +0 -11
  578. package/dist/serialization/resources/agents/resources/archivalMemory/client/index.d.ts +0 -3
  579. package/dist/serialization/resources/agents/resources/archivalMemory/client/index.js +0 -42
  580. package/dist/serialization/resources/agents/resources/archivalMemory/client/list.d.ts +0 -11
  581. package/dist/serialization/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.d.ts +0 -12
  582. package/dist/serialization/resources/agents/resources/archivalMemory/client/requests/index.d.ts +0 -1
  583. package/dist/serialization/resources/agents/resources/archivalMemory/client/requests/index.js +0 -5
  584. package/dist/serialization/resources/agents/resources/archivalMemory/index.d.ts +0 -1
  585. package/dist/serialization/resources/agents/resources/archivalMemory/index.js +0 -17
  586. package/dist/serialization/resources/agents/resources/coreMemory/client/index.d.ts +0 -1
  587. package/dist/serialization/resources/agents/resources/coreMemory/client/index.js +0 -37
  588. package/dist/serialization/resources/agents/resources/coreMemory/client/list.d.ts +0 -11
  589. package/dist/serialization/resources/agents/resources/coreMemory/index.d.ts +0 -1
  590. package/dist/serialization/resources/agents/resources/coreMemory/index.js +0 -17
  591. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.d.ts +0 -14
  592. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +0 -10
  593. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.d.ts +0 -15
  594. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +0 -10
  595. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +0 -10
  596. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemVersion.d.ts +0 -12
  597. package/dist/serialization/types/AssistantFile.d.ts +0 -15
  598. package/dist/serialization/types/AssistantFile.js +0 -46
  599. package/dist/serialization/types/AssistantMessageInput.d.ts +0 -16
  600. package/dist/serialization/types/AssistantMessageInput.js +0 -47
  601. package/dist/serialization/types/ChatCompletionRequest.d.ts +0 -38
  602. package/dist/serialization/types/ChatCompletionRequest.js +0 -69
  603. package/dist/serialization/types/ChatCompletionRequestFunctionCall.d.ts +0 -11
  604. package/dist/serialization/types/ChatCompletionRequestFunctionCall.js +0 -46
  605. package/dist/serialization/types/ChatCompletionRequestMessagesItem.d.ts +0 -14
  606. package/dist/serialization/types/ChatCompletionRequestMessagesItem.js +0 -45
  607. package/dist/serialization/types/ChatCompletionRequestStop.d.ts +0 -10
  608. package/dist/serialization/types/ChatCompletionRequestToolChoice.d.ts +0 -11
  609. package/dist/serialization/types/ChatCompletionRequestToolChoice.js +0 -47
  610. package/dist/serialization/types/ChatCompletionResponse.d.ts +0 -20
  611. package/dist/serialization/types/ChatCompletionResponse.js +0 -51
  612. package/dist/serialization/types/Choice.d.ts +0 -18
  613. package/dist/serialization/types/Choice.js +0 -51
  614. package/dist/serialization/types/CreateAssistantFileRequest.d.ts +0 -12
  615. package/dist/serialization/types/CreateAssistantRequest.d.ts +0 -19
  616. package/dist/serialization/types/CreateAssistantRequest.js +0 -50
  617. package/dist/serialization/types/DeleteAssistantFileResponse.d.ts +0 -14
  618. package/dist/serialization/types/DeleteAssistantResponse.d.ts +0 -14
  619. package/dist/serialization/types/FunctionCallInput.d.ts +0 -12
  620. package/dist/serialization/types/FunctionCallInput.js +0 -43
  621. package/dist/serialization/types/LettaSchemasLettaMessageToolCall.d.ts +0 -14
  622. package/dist/serialization/types/LettaSchemasOpenaiChatCompletionRequestTool.d.ts +0 -14
  623. package/dist/serialization/types/LettaSchemasOpenaiChatCompletionRequestTool.js +0 -45
  624. package/dist/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCall.d.ts +0 -15
  625. package/dist/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCall.js +0 -46
  626. package/dist/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.d.ts +0 -13
  627. package/dist/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.js +0 -44
  628. package/dist/serialization/types/LettaSchemasOpenaiChatCompletionResponseMessage.d.ts +0 -17
  629. package/dist/serialization/types/LettaSchemasOpenaiChatCompletionResponseMessage.js +0 -48
  630. package/dist/serialization/types/LettaSchemasOpenaiChatCompletionResponseToolCall.d.ts +0 -15
  631. package/dist/serialization/types/LettaSchemasOpenaiChatCompletionResponseToolCall.js +0 -46
  632. package/dist/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.d.ts +0 -13
  633. package/dist/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.js +0 -44
  634. package/dist/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallInput.d.ts +0 -15
  635. package/dist/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallInput.js +0 -46
  636. package/dist/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.d.ts +0 -15
  637. package/dist/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.js +0 -46
  638. package/dist/serialization/types/LogProbToken.d.ts +0 -14
  639. package/dist/serialization/types/LogProbToken.js +0 -45
  640. package/dist/serialization/types/MessageContentLogProb.d.ts +0 -16
  641. package/dist/serialization/types/MessageContentLogProb.js +0 -47
  642. package/dist/serialization/types/OpenAiAssistant.d.ts +0 -21
  643. package/dist/serialization/types/OpenAiAssistant.js +0 -52
  644. package/dist/serialization/types/ResponseFormat.d.ts +0 -12
  645. package/dist/serialization/types/ResponseFormat.js +0 -43
  646. package/dist/serialization/types/SystemMessageInput.d.ts +0 -14
  647. package/dist/serialization/types/SystemMessageInput.js +0 -45
  648. package/dist/serialization/types/ToolCallFunctionOutput.js +0 -44
  649. package/dist/serialization/types/ToolFunctionChoice.d.ts +0 -14
  650. package/dist/serialization/types/ToolFunctionChoice.js +0 -45
  651. package/dist/serialization/types/ToolInput.d.ts +0 -14
  652. package/dist/serialization/types/ToolInput.js +0 -45
  653. package/dist/serialization/types/ToolMessage.d.ts +0 -14
  654. package/dist/serialization/types/ToolMessage.js +0 -45
  655. package/dist/serialization/types/UserMessageInput.d.ts +0 -15
  656. package/dist/serialization/types/UserMessageInput.js +0 -46
  657. package/dist/serialization/types/UserMessageInputContent.d.ts +0 -10
  658. package/dist/serialization/types/UserMessageInputContent.js +0 -44
  659. package/serialization/resources/agents/resources/archivalMemory/client/create.d.ts +0 -11
  660. package/serialization/resources/agents/resources/archivalMemory/client/index.d.ts +0 -3
  661. package/serialization/resources/agents/resources/archivalMemory/client/index.js +0 -42
  662. package/serialization/resources/agents/resources/archivalMemory/client/list.d.ts +0 -11
  663. package/serialization/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.d.ts +0 -12
  664. package/serialization/resources/agents/resources/archivalMemory/client/requests/index.d.ts +0 -1
  665. package/serialization/resources/agents/resources/archivalMemory/client/requests/index.js +0 -5
  666. package/serialization/resources/agents/resources/archivalMemory/index.d.ts +0 -1
  667. package/serialization/resources/agents/resources/archivalMemory/index.js +0 -17
  668. package/serialization/resources/agents/resources/coreMemory/client/index.d.ts +0 -1
  669. package/serialization/resources/agents/resources/coreMemory/client/index.js +0 -37
  670. package/serialization/resources/agents/resources/coreMemory/client/list.d.ts +0 -11
  671. package/serialization/resources/agents/resources/coreMemory/index.d.ts +0 -1
  672. package/serialization/resources/agents/resources/coreMemory/index.js +0 -17
  673. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.d.ts +0 -14
  674. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +0 -10
  675. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.d.ts +0 -15
  676. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.js +0 -46
  677. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +0 -10
  678. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +0 -10
  679. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js +0 -41
  680. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemVersion.d.ts +0 -12
  681. package/serialization/types/AssistantFile.d.ts +0 -15
  682. package/serialization/types/AssistantFile.js +0 -46
  683. package/serialization/types/AssistantMessageInput.d.ts +0 -16
  684. package/serialization/types/AssistantMessageInput.js +0 -47
  685. package/serialization/types/ChatCompletionRequest.d.ts +0 -38
  686. package/serialization/types/ChatCompletionRequest.js +0 -69
  687. package/serialization/types/ChatCompletionRequestFunctionCall.d.ts +0 -11
  688. package/serialization/types/ChatCompletionRequestFunctionCall.js +0 -46
  689. package/serialization/types/ChatCompletionRequestMessagesItem.d.ts +0 -14
  690. package/serialization/types/ChatCompletionRequestMessagesItem.js +0 -45
  691. package/serialization/types/ChatCompletionRequestStop.d.ts +0 -10
  692. package/serialization/types/ChatCompletionRequestStop.js +0 -44
  693. package/serialization/types/ChatCompletionRequestToolChoice.d.ts +0 -11
  694. package/serialization/types/ChatCompletionRequestToolChoice.js +0 -47
  695. package/serialization/types/ChatCompletionResponse.d.ts +0 -20
  696. package/serialization/types/ChatCompletionResponse.js +0 -51
  697. package/serialization/types/Choice.d.ts +0 -18
  698. package/serialization/types/Choice.js +0 -51
  699. package/serialization/types/CreateAssistantFileRequest.d.ts +0 -12
  700. package/serialization/types/CreateAssistantFileRequest.js +0 -43
  701. package/serialization/types/CreateAssistantRequest.d.ts +0 -19
  702. package/serialization/types/CreateAssistantRequest.js +0 -50
  703. package/serialization/types/DeleteAssistantFileResponse.d.ts +0 -14
  704. package/serialization/types/DeleteAssistantFileResponse.js +0 -45
  705. package/serialization/types/DeleteAssistantResponse.d.ts +0 -14
  706. package/serialization/types/DeleteAssistantResponse.js +0 -45
  707. package/serialization/types/FunctionCallInput.d.ts +0 -12
  708. package/serialization/types/FunctionCallInput.js +0 -43
  709. package/serialization/types/LettaSchemasLettaMessageToolCall.d.ts +0 -14
  710. package/serialization/types/LettaSchemasOpenaiChatCompletionRequestTool.d.ts +0 -14
  711. package/serialization/types/LettaSchemasOpenaiChatCompletionRequestTool.js +0 -45
  712. package/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCall.d.ts +0 -15
  713. package/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCall.js +0 -46
  714. package/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.d.ts +0 -13
  715. package/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.js +0 -44
  716. package/serialization/types/LettaSchemasOpenaiChatCompletionResponseMessage.d.ts +0 -17
  717. package/serialization/types/LettaSchemasOpenaiChatCompletionResponseMessage.js +0 -48
  718. package/serialization/types/LettaSchemasOpenaiChatCompletionResponseToolCall.d.ts +0 -15
  719. package/serialization/types/LettaSchemasOpenaiChatCompletionResponseToolCall.js +0 -46
  720. package/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.d.ts +0 -13
  721. package/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.js +0 -44
  722. package/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallInput.d.ts +0 -15
  723. package/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallInput.js +0 -46
  724. package/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.d.ts +0 -15
  725. package/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.js +0 -46
  726. package/serialization/types/LogProbToken.d.ts +0 -14
  727. package/serialization/types/LogProbToken.js +0 -45
  728. package/serialization/types/MessageContentLogProb.d.ts +0 -16
  729. package/serialization/types/MessageContentLogProb.js +0 -47
  730. package/serialization/types/OpenAiAssistant.d.ts +0 -21
  731. package/serialization/types/OpenAiAssistant.js +0 -52
  732. package/serialization/types/ResponseFormat.d.ts +0 -12
  733. package/serialization/types/ResponseFormat.js +0 -43
  734. package/serialization/types/SystemMessageInput.d.ts +0 -14
  735. package/serialization/types/SystemMessageInput.js +0 -45
  736. package/serialization/types/ToolCallFunctionOutput.js +0 -44
  737. package/serialization/types/ToolFunctionChoice.d.ts +0 -14
  738. package/serialization/types/ToolFunctionChoice.js +0 -45
  739. package/serialization/types/ToolInput.d.ts +0 -14
  740. package/serialization/types/ToolInput.js +0 -45
  741. package/serialization/types/ToolMessage.d.ts +0 -14
  742. package/serialization/types/ToolMessage.js +0 -45
  743. package/serialization/types/UserMessageInput.d.ts +0 -15
  744. package/serialization/types/UserMessageInput.js +0 -46
  745. package/serialization/types/UserMessageInputContent.d.ts +0 -10
  746. package/serialization/types/UserMessageInputContent.js +0 -44
  747. /package/api/resources/agents/{resources/archivalMemory/client → client}/requests/CreateArchivalMemory.d.ts +0 -0
  748. /package/api/resources/agents/{resources/archivalMemory/client → client}/requests/CreateArchivalMemory.js +0 -0
  749. /package/api/resources/agents/{resources/archivalMemory/client/requests/ArchivalMemoryListRequest.js → client/requests/ListArchivalMemoryRequest.js} +0 -0
  750. /package/api/resources/agents/resources/memoryVariables/types/{MemoryVariablesGetResponse.js → MemoryVariablesListResponse.js} +0 -0
  751. /package/api/resources/agents/types/{AgentsSearchRequestSearchItemName.js → AgentsSearchRequestSearchItemDirection.js} +0 -0
  752. /package/api/resources/agents/types/{AgentsSearchRequestSearchItemOrderBy.js → AgentsSearchRequestSearchItemOne.js} +0 -0
  753. /package/api/resources/agents/types/{AgentsSearchRequestSearchItemTags.js → AgentsSearchRequestSearchItemTwo.js} +0 -0
  754. /package/api/resources/agents/types/{AgentsSearchRequestSearchItemVersion.js → AgentsSearchRequestSearchItemZero.js} +0 -0
  755. /package/api/resources/{blocks/client/requests/LinkAgentMemoryBlockRequest.js → runs/client/requests/ListRunMessagesRequest.js} +0 -0
  756. /package/api/{resources/blocks/client/requests/UnlinkAgentMemoryBlockRequest.js → types/AssistantMessage.js} +0 -0
  757. /package/api/{resources/runs/client/requests/GetRunMessagesRequest.js → types/ChatCompletionMessageToolCall.js} +0 -0
  758. /package/api/{resources/sources/client/requests/SourcesAttachRequest.js → types/Function.js} +0 -0
  759. /package/api/{resources/sources/client/requests/SourcesDetachRequest.js → types/FunctionDefinition.js} +0 -0
  760. /package/api/types/{AssistantFile.js → FunctionTool.js} +0 -0
  761. /package/api/types/{AssistantMessageInput.js → Message.js} +0 -0
  762. /package/api/types/{AssistantMessageOutput.js → SystemMessage.js} +0 -0
  763. /package/api/types/{ChatCompletionRequest.js → Tool.js} +0 -0
  764. /package/api/types/{ChatCompletionRequestFunctionCall.js → ToolCall.js} +0 -0
  765. /package/api/types/{ChatCompletionRequestMessagesItem.js → UserMessage.js} +0 -0
  766. /package/dist/api/resources/agents/{resources/archivalMemory/client → client}/requests/CreateArchivalMemory.d.ts +0 -0
  767. /package/dist/api/resources/agents/{resources/archivalMemory/client → client}/requests/CreateArchivalMemory.js +0 -0
  768. /package/{api/types/ChatCompletionRequestStop.js → dist/api/resources/agents/client/requests/ListArchivalMemoryRequest.js} +0 -0
  769. /package/{api/types/ChatCompletionRequestToolChoice.js → dist/api/resources/agents/resources/memoryVariables/types/MemoryVariablesListResponse.js} +0 -0
  770. /package/{api/types/ChatCompletionResponse.js → dist/api/resources/agents/types/AgentsSearchRequestSearchItemDirection.js} +0 -0
  771. /package/{api/types/Choice.js → dist/api/resources/agents/types/AgentsSearchRequestSearchItemOne.js} +0 -0
  772. /package/{api/types/CreateAssistantFileRequest.js → dist/api/resources/agents/types/AgentsSearchRequestSearchItemTwo.js} +0 -0
  773. /package/{api/types/CreateAssistantRequest.js → dist/api/resources/agents/types/AgentsSearchRequestSearchItemZero.js} +0 -0
  774. /package/{api/types/DeleteAssistantFileResponse.js → dist/api/resources/runs/client/requests/ListRunMessagesRequest.js} +0 -0
  775. /package/{api/types/DeleteAssistantResponse.js → dist/api/types/AssistantMessage.js} +0 -0
  776. /package/{api/types/FunctionCallInput.js → dist/api/types/ChatCompletionMessageToolCall.js} +0 -0
  777. /package/{api/types/FunctionCallOutput.js → dist/api/types/Function.js} +0 -0
  778. /package/{api/types/FunctionSchema.js → dist/api/types/FunctionDefinition.js} +0 -0
  779. /package/{api/types/LettaSchemasLettaMessageToolCall.js → dist/api/types/FunctionTool.js} +0 -0
  780. /package/{api/types/LettaSchemasMessageMessage.js → dist/api/types/Message.js} +0 -0
  781. /package/{api/types/LettaSchemasOpenaiChatCompletionRequestTool.js → dist/api/types/SystemMessage.js} +0 -0
  782. /package/{api/types/LettaSchemasOpenaiChatCompletionRequestToolCall.js → dist/api/types/Tool.js} +0 -0
  783. /package/{api/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.js → dist/api/types/ToolCall.js} +0 -0
  784. /package/{api/types/LettaSchemasOpenaiChatCompletionResponseMessage.js → dist/api/types/UserMessage.js} +0 -0
  785. /package/dist/serialization/resources/agents/resources/sources/client/{get.js → list.js} +0 -0
  786. /package/dist/serialization/resources/runs/client/{getRunMessages.js → listRunMessages.js} +0 -0
  787. /package/serialization/resources/agents/resources/sources/client/{get.js → list.js} +0 -0
  788. /package/serialization/resources/runs/client/{getRunMessages.js → listRunMessages.js} +0 -0
@@ -58,11 +58,11 @@ const errors = __importStar(require("../../../../errors/index"));
58
58
  const Client_1 = require("../resources/context/client/Client");
59
59
  const Client_2 = require("../resources/tools/client/Client");
60
60
  const Client_3 = require("../resources/sources/client/Client");
61
- const Client_4 = require("../resources/coreMemory/client/Client");
62
- const Client_5 = require("../resources/archivalMemory/client/Client");
63
- const Client_6 = require("../resources/messages/client/Client");
64
- const Client_7 = require("../resources/templates/client/Client");
65
- const Client_8 = require("../resources/memoryVariables/client/Client");
61
+ const Client_4 = require("../resources/messages/client/Client");
62
+ const Client_5 = require("../resources/templates/client/Client");
63
+ const Client_6 = require("../resources/memoryVariables/client/Client");
64
+ const Client_7 = require("../resources/coreMemory/client/Client");
65
+ const Client_8 = require("../resources/archivalMemory/client/Client");
66
66
  class Agents {
67
67
  constructor(_options = {}) {
68
68
  this._options = _options;
@@ -79,25 +79,25 @@ class Agents {
79
79
  var _a;
80
80
  return ((_a = this._sources) !== null && _a !== void 0 ? _a : (this._sources = new Client_3.Sources(this._options)));
81
81
  }
82
- get coreMemory() {
82
+ get messages() {
83
83
  var _a;
84
- return ((_a = this._coreMemory) !== null && _a !== void 0 ? _a : (this._coreMemory = new Client_4.CoreMemory(this._options)));
84
+ return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new Client_4.Messages(this._options)));
85
85
  }
86
- get archivalMemory() {
86
+ get templates() {
87
87
  var _a;
88
- return ((_a = this._archivalMemory) !== null && _a !== void 0 ? _a : (this._archivalMemory = new Client_5.ArchivalMemory(this._options)));
88
+ return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new Client_5.Templates(this._options)));
89
89
  }
90
- get messages() {
90
+ get memoryVariables() {
91
91
  var _a;
92
- return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new Client_6.Messages(this._options)));
92
+ return ((_a = this._memoryVariables) !== null && _a !== void 0 ? _a : (this._memoryVariables = new Client_6.MemoryVariables(this._options)));
93
93
  }
94
- get templates() {
94
+ get coreMemory() {
95
95
  var _a;
96
- return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new Client_7.Templates(this._options)));
96
+ return ((_a = this._coreMemory) !== null && _a !== void 0 ? _a : (this._coreMemory = new Client_7.CoreMemory(this._options)));
97
97
  }
98
- get memoryVariables() {
98
+ get archivalMemory() {
99
99
  var _a;
100
- return ((_a = this._memoryVariables) !== null && _a !== void 0 ? _a : (this._memoryVariables = new Client_8.MemoryVariables(this._options)));
100
+ return ((_a = this._archivalMemory) !== null && _a !== void 0 ? _a : (this._archivalMemory = new Client_8.ArchivalMemory(this._options)));
101
101
  }
102
102
  /**
103
103
  * List all agents associated with a given user.
@@ -114,7 +114,7 @@ class Agents {
114
114
  list() {
115
115
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
116
116
  var _a, _b, _c;
117
- const { name, tags, matchAllTags, cursor, limit, queryText } = request;
117
+ const { name, tags, matchAllTags, before, after, limit, queryText } = request;
118
118
  const _queryParams = {};
119
119
  if (name != null) {
120
120
  _queryParams["name"] = name;
@@ -130,8 +130,11 @@ class Agents {
130
130
  if (matchAllTags != null) {
131
131
  _queryParams["match_all_tags"] = matchAllTags.toString();
132
132
  }
133
- if (cursor != null) {
134
- _queryParams["cursor"] = cursor;
133
+ if (before != null) {
134
+ _queryParams["before"] = before;
135
+ }
136
+ if (after != null) {
137
+ _queryParams["after"] = after;
135
138
  }
136
139
  if (limit != null) {
137
140
  _queryParams["limit"] = limit.toString();
@@ -142,7 +145,7 @@ class Agents {
142
145
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
143
146
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/agents/"),
144
147
  method: "GET",
145
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
148
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.14", "User-Agent": "@letta-ai/letta-client/0.1.14", "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),
146
149
  contentType: "application/json",
147
150
  queryParameters: _queryParams,
148
151
  requestType: "json",
@@ -208,7 +211,7 @@ class Agents {
208
211
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
209
212
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/agents/"),
210
213
  method: "POST",
211
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
214
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.14", "User-Agent": "@letta-ai/letta-client/0.1.14", "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),
212
215
  contentType: "application/json",
213
216
  requestType: "json",
214
217
  body: serializers.CreateAgentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -266,15 +269,15 @@ class Agents {
266
269
  * @throws {@link Letta.UnprocessableEntityError}
267
270
  *
268
271
  * @example
269
- * await client.agents.get("agent_id")
272
+ * await client.agents.retrieve("agent_id")
270
273
  */
271
- get(agentId, requestOptions) {
274
+ retrieve(agentId, requestOptions) {
272
275
  return __awaiter(this, void 0, void 0, function* () {
273
276
  var _a, _b, _c;
274
277
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
275
278
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
276
279
  method: "GET",
277
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
280
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.14", "User-Agent": "@letta-ai/letta-client/0.1.14", "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),
278
281
  contentType: "application/json",
279
282
  requestType: "json",
280
283
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -339,7 +342,7 @@ class Agents {
339
342
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
340
343
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
341
344
  method: "DELETE",
342
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
345
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.14", "User-Agent": "@letta-ai/letta-client/0.1.14", "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),
343
346
  contentType: "application/json",
344
347
  requestType: "json",
345
348
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -391,15 +394,15 @@ class Agents {
391
394
  * @throws {@link Letta.UnprocessableEntityError}
392
395
  *
393
396
  * @example
394
- * await client.agents.update("agent_id")
397
+ * await client.agents.modify("agent_id")
395
398
  */
396
- update(agentId_1) {
399
+ modify(agentId_1) {
397
400
  return __awaiter(this, arguments, void 0, function* (agentId, request = {}, requestOptions) {
398
401
  var _a, _b, _c;
399
402
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
400
403
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
401
404
  method: "PATCH",
402
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
405
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.14", "User-Agent": "@letta-ai/letta-client/0.1.14", "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),
403
406
  contentType: "application/json",
404
407
  requestType: "json",
405
408
  body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -448,6 +451,610 @@ class Agents {
448
451
  }
449
452
  });
450
453
  }
454
+ /**
455
+ * Retrieve the memory state of a specific agent.
456
+ * This endpoint fetches the current memory state of the agent identified by the user ID and agent ID.
457
+ *
458
+ * @param {string} agentId
459
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
460
+ *
461
+ * @throws {@link Letta.UnprocessableEntityError}
462
+ *
463
+ * @example
464
+ * await client.agents.retrieveAgentMemory("agent_id")
465
+ */
466
+ retrieveAgentMemory(agentId, requestOptions) {
467
+ return __awaiter(this, void 0, void 0, function* () {
468
+ var _a, _b, _c;
469
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
470
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory`),
471
+ method: "GET",
472
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.14", "User-Agent": "@letta-ai/letta-client/0.1.14", "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),
473
+ contentType: "application/json",
474
+ requestType: "json",
475
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
476
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
477
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
478
+ });
479
+ if (_response.ok) {
480
+ return serializers.Memory.parseOrThrow(_response.body, {
481
+ unrecognizedObjectKeys: "passthrough",
482
+ allowUnrecognizedUnionMembers: true,
483
+ allowUnrecognizedEnumValues: true,
484
+ skipValidation: true,
485
+ breadcrumbsPrefix: ["response"],
486
+ });
487
+ }
488
+ if (_response.error.reason === "status-code") {
489
+ switch (_response.error.statusCode) {
490
+ case 422:
491
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
492
+ unrecognizedObjectKeys: "passthrough",
493
+ allowUnrecognizedUnionMembers: true,
494
+ allowUnrecognizedEnumValues: true,
495
+ skipValidation: true,
496
+ breadcrumbsPrefix: ["response"],
497
+ }));
498
+ default:
499
+ throw new errors.LettaError({
500
+ statusCode: _response.error.statusCode,
501
+ body: _response.error.body,
502
+ });
503
+ }
504
+ }
505
+ switch (_response.error.reason) {
506
+ case "non-json":
507
+ throw new errors.LettaError({
508
+ statusCode: _response.error.statusCode,
509
+ body: _response.error.rawBody,
510
+ });
511
+ case "timeout":
512
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/core-memory.");
513
+ case "unknown":
514
+ throw new errors.LettaError({
515
+ message: _response.error.errorMessage,
516
+ });
517
+ }
518
+ });
519
+ }
520
+ /**
521
+ * Retrieve a memory block from an agent.
522
+ *
523
+ * @param {string} agentId
524
+ * @param {string} blockLabel
525
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
526
+ *
527
+ * @throws {@link Letta.UnprocessableEntityError}
528
+ *
529
+ * @example
530
+ * await client.agents.retrieveCoreMemoryBlock("agent_id", "block_label")
531
+ */
532
+ retrieveCoreMemoryBlock(agentId, blockLabel, requestOptions) {
533
+ return __awaiter(this, void 0, void 0, function* () {
534
+ var _a, _b, _c;
535
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
536
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks/${encodeURIComponent(blockLabel)}`),
537
+ method: "GET",
538
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.14", "User-Agent": "@letta-ai/letta-client/0.1.14", "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),
539
+ contentType: "application/json",
540
+ requestType: "json",
541
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
542
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
543
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
544
+ });
545
+ if (_response.ok) {
546
+ return serializers.Block.parseOrThrow(_response.body, {
547
+ unrecognizedObjectKeys: "passthrough",
548
+ allowUnrecognizedUnionMembers: true,
549
+ allowUnrecognizedEnumValues: true,
550
+ skipValidation: true,
551
+ breadcrumbsPrefix: ["response"],
552
+ });
553
+ }
554
+ if (_response.error.reason === "status-code") {
555
+ switch (_response.error.statusCode) {
556
+ case 422:
557
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
558
+ unrecognizedObjectKeys: "passthrough",
559
+ allowUnrecognizedUnionMembers: true,
560
+ allowUnrecognizedEnumValues: true,
561
+ skipValidation: true,
562
+ breadcrumbsPrefix: ["response"],
563
+ }));
564
+ default:
565
+ throw new errors.LettaError({
566
+ statusCode: _response.error.statusCode,
567
+ body: _response.error.body,
568
+ });
569
+ }
570
+ }
571
+ switch (_response.error.reason) {
572
+ case "non-json":
573
+ throw new errors.LettaError({
574
+ statusCode: _response.error.statusCode,
575
+ body: _response.error.rawBody,
576
+ });
577
+ case "timeout":
578
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/core-memory/blocks/{block_label}.");
579
+ case "unknown":
580
+ throw new errors.LettaError({
581
+ message: _response.error.errorMessage,
582
+ });
583
+ }
584
+ });
585
+ }
586
+ /**
587
+ * Updates a memory block of an agent.
588
+ *
589
+ * @param {string} agentId
590
+ * @param {string} blockLabel
591
+ * @param {Letta.BlockUpdate} request
592
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
593
+ *
594
+ * @throws {@link Letta.UnprocessableEntityError}
595
+ *
596
+ * @example
597
+ * await client.agents.modifyCoreMemoryBlock("agent_id", "block_label", {})
598
+ */
599
+ modifyCoreMemoryBlock(agentId, blockLabel, request, requestOptions) {
600
+ return __awaiter(this, void 0, void 0, function* () {
601
+ var _a, _b, _c;
602
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
603
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks/${encodeURIComponent(blockLabel)}`),
604
+ method: "PATCH",
605
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.14", "User-Agent": "@letta-ai/letta-client/0.1.14", "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),
606
+ contentType: "application/json",
607
+ requestType: "json",
608
+ body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
609
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
610
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
611
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
612
+ });
613
+ if (_response.ok) {
614
+ return serializers.Block.parseOrThrow(_response.body, {
615
+ unrecognizedObjectKeys: "passthrough",
616
+ allowUnrecognizedUnionMembers: true,
617
+ allowUnrecognizedEnumValues: true,
618
+ skipValidation: true,
619
+ breadcrumbsPrefix: ["response"],
620
+ });
621
+ }
622
+ if (_response.error.reason === "status-code") {
623
+ switch (_response.error.statusCode) {
624
+ case 422:
625
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
626
+ unrecognizedObjectKeys: "passthrough",
627
+ allowUnrecognizedUnionMembers: true,
628
+ allowUnrecognizedEnumValues: true,
629
+ skipValidation: true,
630
+ breadcrumbsPrefix: ["response"],
631
+ }));
632
+ default:
633
+ throw new errors.LettaError({
634
+ statusCode: _response.error.statusCode,
635
+ body: _response.error.body,
636
+ });
637
+ }
638
+ }
639
+ switch (_response.error.reason) {
640
+ case "non-json":
641
+ throw new errors.LettaError({
642
+ statusCode: _response.error.statusCode,
643
+ body: _response.error.rawBody,
644
+ });
645
+ case "timeout":
646
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/agents/{agent_id}/core-memory/blocks/{block_label}.");
647
+ case "unknown":
648
+ throw new errors.LettaError({
649
+ message: _response.error.errorMessage,
650
+ });
651
+ }
652
+ });
653
+ }
654
+ /**
655
+ * Retrieve the memory blocks of a specific agent.
656
+ *
657
+ * @param {string} agentId
658
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
659
+ *
660
+ * @throws {@link Letta.UnprocessableEntityError}
661
+ *
662
+ * @example
663
+ * await client.agents.listCoreMemoryBlocks("agent_id")
664
+ */
665
+ listCoreMemoryBlocks(agentId, requestOptions) {
666
+ return __awaiter(this, void 0, void 0, function* () {
667
+ var _a, _b, _c;
668
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
669
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks`),
670
+ method: "GET",
671
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.14", "User-Agent": "@letta-ai/letta-client/0.1.14", "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),
672
+ contentType: "application/json",
673
+ requestType: "json",
674
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
675
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
676
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
677
+ });
678
+ if (_response.ok) {
679
+ return serializers.agents.listCoreMemoryBlocks.Response.parseOrThrow(_response.body, {
680
+ unrecognizedObjectKeys: "passthrough",
681
+ allowUnrecognizedUnionMembers: true,
682
+ allowUnrecognizedEnumValues: true,
683
+ skipValidation: true,
684
+ breadcrumbsPrefix: ["response"],
685
+ });
686
+ }
687
+ if (_response.error.reason === "status-code") {
688
+ switch (_response.error.statusCode) {
689
+ case 422:
690
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
691
+ unrecognizedObjectKeys: "passthrough",
692
+ allowUnrecognizedUnionMembers: true,
693
+ allowUnrecognizedEnumValues: true,
694
+ skipValidation: true,
695
+ breadcrumbsPrefix: ["response"],
696
+ }));
697
+ default:
698
+ throw new errors.LettaError({
699
+ statusCode: _response.error.statusCode,
700
+ body: _response.error.body,
701
+ });
702
+ }
703
+ }
704
+ switch (_response.error.reason) {
705
+ case "non-json":
706
+ throw new errors.LettaError({
707
+ statusCode: _response.error.statusCode,
708
+ body: _response.error.rawBody,
709
+ });
710
+ case "timeout":
711
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/core-memory/blocks.");
712
+ case "unknown":
713
+ throw new errors.LettaError({
714
+ message: _response.error.errorMessage,
715
+ });
716
+ }
717
+ });
718
+ }
719
+ /**
720
+ * Attach a block to an agent.
721
+ *
722
+ * @param {string} agentId
723
+ * @param {string} blockId
724
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
725
+ *
726
+ * @throws {@link Letta.UnprocessableEntityError}
727
+ *
728
+ * @example
729
+ * await client.agents.attachCoreMemoryBlock("agent_id", "block_id")
730
+ */
731
+ attachCoreMemoryBlock(agentId, blockId, requestOptions) {
732
+ return __awaiter(this, void 0, void 0, function* () {
733
+ var _a, _b, _c;
734
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
735
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks/attach/${encodeURIComponent(blockId)}`),
736
+ method: "PATCH",
737
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.14", "User-Agent": "@letta-ai/letta-client/0.1.14", "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),
738
+ contentType: "application/json",
739
+ requestType: "json",
740
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
741
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
742
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
743
+ });
744
+ if (_response.ok) {
745
+ return serializers.AgentState.parseOrThrow(_response.body, {
746
+ unrecognizedObjectKeys: "passthrough",
747
+ allowUnrecognizedUnionMembers: true,
748
+ allowUnrecognizedEnumValues: true,
749
+ skipValidation: true,
750
+ breadcrumbsPrefix: ["response"],
751
+ });
752
+ }
753
+ if (_response.error.reason === "status-code") {
754
+ switch (_response.error.statusCode) {
755
+ case 422:
756
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
757
+ unrecognizedObjectKeys: "passthrough",
758
+ allowUnrecognizedUnionMembers: true,
759
+ allowUnrecognizedEnumValues: true,
760
+ skipValidation: true,
761
+ breadcrumbsPrefix: ["response"],
762
+ }));
763
+ default:
764
+ throw new errors.LettaError({
765
+ statusCode: _response.error.statusCode,
766
+ body: _response.error.body,
767
+ });
768
+ }
769
+ }
770
+ switch (_response.error.reason) {
771
+ case "non-json":
772
+ throw new errors.LettaError({
773
+ statusCode: _response.error.statusCode,
774
+ body: _response.error.rawBody,
775
+ });
776
+ case "timeout":
777
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/agents/{agent_id}/core-memory/blocks/attach/{block_id}.");
778
+ case "unknown":
779
+ throw new errors.LettaError({
780
+ message: _response.error.errorMessage,
781
+ });
782
+ }
783
+ });
784
+ }
785
+ /**
786
+ * Detach a block from an agent.
787
+ *
788
+ * @param {string} agentId
789
+ * @param {string} blockId
790
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
791
+ *
792
+ * @throws {@link Letta.UnprocessableEntityError}
793
+ *
794
+ * @example
795
+ * await client.agents.detachCoreMemoryBlock("agent_id", "block_id")
796
+ */
797
+ detachCoreMemoryBlock(agentId, blockId, requestOptions) {
798
+ return __awaiter(this, void 0, void 0, function* () {
799
+ var _a, _b, _c;
800
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
801
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks/detach/${encodeURIComponent(blockId)}`),
802
+ method: "PATCH",
803
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.14", "User-Agent": "@letta-ai/letta-client/0.1.14", "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),
804
+ contentType: "application/json",
805
+ requestType: "json",
806
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
807
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
808
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
809
+ });
810
+ if (_response.ok) {
811
+ return serializers.AgentState.parseOrThrow(_response.body, {
812
+ unrecognizedObjectKeys: "passthrough",
813
+ allowUnrecognizedUnionMembers: true,
814
+ allowUnrecognizedEnumValues: true,
815
+ skipValidation: true,
816
+ breadcrumbsPrefix: ["response"],
817
+ });
818
+ }
819
+ if (_response.error.reason === "status-code") {
820
+ switch (_response.error.statusCode) {
821
+ case 422:
822
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
823
+ unrecognizedObjectKeys: "passthrough",
824
+ allowUnrecognizedUnionMembers: true,
825
+ allowUnrecognizedEnumValues: true,
826
+ skipValidation: true,
827
+ breadcrumbsPrefix: ["response"],
828
+ }));
829
+ default:
830
+ throw new errors.LettaError({
831
+ statusCode: _response.error.statusCode,
832
+ body: _response.error.body,
833
+ });
834
+ }
835
+ }
836
+ switch (_response.error.reason) {
837
+ case "non-json":
838
+ throw new errors.LettaError({
839
+ statusCode: _response.error.statusCode,
840
+ body: _response.error.rawBody,
841
+ });
842
+ case "timeout":
843
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/agents/{agent_id}/core-memory/blocks/detach/{block_id}.");
844
+ case "unknown":
845
+ throw new errors.LettaError({
846
+ message: _response.error.errorMessage,
847
+ });
848
+ }
849
+ });
850
+ }
851
+ /**
852
+ * Retrieve the memories in an agent's archival memory store (paginated query).
853
+ *
854
+ * @param {string} agentId
855
+ * @param {Letta.ListArchivalMemoryRequest} request
856
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
857
+ *
858
+ * @throws {@link Letta.UnprocessableEntityError}
859
+ *
860
+ * @example
861
+ * await client.agents.listArchivalMemory("agent_id")
862
+ */
863
+ listArchivalMemory(agentId_1) {
864
+ return __awaiter(this, arguments, void 0, function* (agentId, request = {}, requestOptions) {
865
+ var _a, _b, _c;
866
+ const { after, before, limit } = request;
867
+ const _queryParams = {};
868
+ if (after != null) {
869
+ _queryParams["after"] = after.toString();
870
+ }
871
+ if (before != null) {
872
+ _queryParams["before"] = before.toString();
873
+ }
874
+ if (limit != null) {
875
+ _queryParams["limit"] = limit.toString();
876
+ }
877
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
878
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/archival-memory`),
879
+ method: "GET",
880
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.14", "User-Agent": "@letta-ai/letta-client/0.1.14", "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),
881
+ contentType: "application/json",
882
+ queryParameters: _queryParams,
883
+ requestType: "json",
884
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
885
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
886
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
887
+ });
888
+ if (_response.ok) {
889
+ return serializers.agents.listArchivalMemory.Response.parseOrThrow(_response.body, {
890
+ unrecognizedObjectKeys: "passthrough",
891
+ allowUnrecognizedUnionMembers: true,
892
+ allowUnrecognizedEnumValues: true,
893
+ skipValidation: true,
894
+ breadcrumbsPrefix: ["response"],
895
+ });
896
+ }
897
+ if (_response.error.reason === "status-code") {
898
+ switch (_response.error.statusCode) {
899
+ case 422:
900
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
901
+ unrecognizedObjectKeys: "passthrough",
902
+ allowUnrecognizedUnionMembers: true,
903
+ allowUnrecognizedEnumValues: true,
904
+ skipValidation: true,
905
+ breadcrumbsPrefix: ["response"],
906
+ }));
907
+ default:
908
+ throw new errors.LettaError({
909
+ statusCode: _response.error.statusCode,
910
+ body: _response.error.body,
911
+ });
912
+ }
913
+ }
914
+ switch (_response.error.reason) {
915
+ case "non-json":
916
+ throw new errors.LettaError({
917
+ statusCode: _response.error.statusCode,
918
+ body: _response.error.rawBody,
919
+ });
920
+ case "timeout":
921
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/archival-memory.");
922
+ case "unknown":
923
+ throw new errors.LettaError({
924
+ message: _response.error.errorMessage,
925
+ });
926
+ }
927
+ });
928
+ }
929
+ /**
930
+ * Insert a memory into an agent's archival memory store.
931
+ *
932
+ * @param {string} agentId
933
+ * @param {Letta.CreateArchivalMemory} request
934
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
935
+ *
936
+ * @throws {@link Letta.UnprocessableEntityError}
937
+ *
938
+ * @example
939
+ * await client.agents.createArchivalMemory("agent_id", {
940
+ * text: "text"
941
+ * })
942
+ */
943
+ createArchivalMemory(agentId, request, requestOptions) {
944
+ return __awaiter(this, void 0, void 0, function* () {
945
+ var _a, _b, _c;
946
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
947
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/archival-memory`),
948
+ method: "POST",
949
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.14", "User-Agent": "@letta-ai/letta-client/0.1.14", "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),
950
+ contentType: "application/json",
951
+ requestType: "json",
952
+ body: serializers.CreateArchivalMemory.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
953
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
954
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
955
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
956
+ });
957
+ if (_response.ok) {
958
+ return serializers.agents.createArchivalMemory.Response.parseOrThrow(_response.body, {
959
+ unrecognizedObjectKeys: "passthrough",
960
+ allowUnrecognizedUnionMembers: true,
961
+ allowUnrecognizedEnumValues: true,
962
+ skipValidation: true,
963
+ breadcrumbsPrefix: ["response"],
964
+ });
965
+ }
966
+ if (_response.error.reason === "status-code") {
967
+ switch (_response.error.statusCode) {
968
+ case 422:
969
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
970
+ unrecognizedObjectKeys: "passthrough",
971
+ allowUnrecognizedUnionMembers: true,
972
+ allowUnrecognizedEnumValues: true,
973
+ skipValidation: true,
974
+ breadcrumbsPrefix: ["response"],
975
+ }));
976
+ default:
977
+ throw new errors.LettaError({
978
+ statusCode: _response.error.statusCode,
979
+ body: _response.error.body,
980
+ });
981
+ }
982
+ }
983
+ switch (_response.error.reason) {
984
+ case "non-json":
985
+ throw new errors.LettaError({
986
+ statusCode: _response.error.statusCode,
987
+ body: _response.error.rawBody,
988
+ });
989
+ case "timeout":
990
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/archival-memory.");
991
+ case "unknown":
992
+ throw new errors.LettaError({
993
+ message: _response.error.errorMessage,
994
+ });
995
+ }
996
+ });
997
+ }
998
+ /**
999
+ * Delete a memory from an agent's archival memory store.
1000
+ *
1001
+ * @param {string} agentId
1002
+ * @param {string} memoryId
1003
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
1004
+ *
1005
+ * @throws {@link Letta.UnprocessableEntityError}
1006
+ *
1007
+ * @example
1008
+ * await client.agents.deleteArchivalMemory("agent_id", "memory_id")
1009
+ */
1010
+ deleteArchivalMemory(agentId, memoryId, requestOptions) {
1011
+ return __awaiter(this, void 0, void 0, function* () {
1012
+ var _a, _b, _c;
1013
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1014
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/archival-memory/${encodeURIComponent(memoryId)}`),
1015
+ method: "DELETE",
1016
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.14", "User-Agent": "@letta-ai/letta-client/0.1.14", "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),
1017
+ contentType: "application/json",
1018
+ requestType: "json",
1019
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1020
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1021
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1022
+ });
1023
+ if (_response.ok) {
1024
+ return _response.body;
1025
+ }
1026
+ if (_response.error.reason === "status-code") {
1027
+ switch (_response.error.statusCode) {
1028
+ case 422:
1029
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
1030
+ unrecognizedObjectKeys: "passthrough",
1031
+ allowUnrecognizedUnionMembers: true,
1032
+ allowUnrecognizedEnumValues: true,
1033
+ skipValidation: true,
1034
+ breadcrumbsPrefix: ["response"],
1035
+ }));
1036
+ default:
1037
+ throw new errors.LettaError({
1038
+ statusCode: _response.error.statusCode,
1039
+ body: _response.error.body,
1040
+ });
1041
+ }
1042
+ }
1043
+ switch (_response.error.reason) {
1044
+ case "non-json":
1045
+ throw new errors.LettaError({
1046
+ statusCode: _response.error.statusCode,
1047
+ body: _response.error.rawBody,
1048
+ });
1049
+ case "timeout":
1050
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling DELETE /v1/agents/{agent_id}/archival-memory/{memory_id}.");
1051
+ case "unknown":
1052
+ throw new errors.LettaError({
1053
+ message: _response.error.errorMessage,
1054
+ });
1055
+ }
1056
+ });
1057
+ }
451
1058
  /**
452
1059
  * Resets the messages for an agent
453
1060
  *
@@ -471,7 +1078,7 @@ class Agents {
471
1078
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
472
1079
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/reset-messages`),
473
1080
  method: "PATCH",
474
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
1081
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.14", "User-Agent": "@letta-ai/letta-client/0.1.14", "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),
475
1082
  contentType: "application/json",
476
1083
  queryParameters: _queryParams,
477
1084
  requestType: "json",
@@ -537,7 +1144,7 @@ class Agents {
537
1144
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
538
1145
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/agents/search"),
539
1146
  method: "POST",
540
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
1147
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.14", "User-Agent": "@letta-ai/letta-client/0.1.14", "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),
541
1148
  contentType: "application/json",
542
1149
  requestType: "json",
543
1150
  body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),