@letta-ai/letta-client 0.1.7 → 0.1.9

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 (811) hide show
  1. package/Client.d.ts +8 -0
  2. package/Client.js +10 -0
  3. package/README.md +9 -9
  4. package/api/errors/ConflictError.js +17 -7
  5. package/api/errors/InternalServerError.js +17 -7
  6. package/api/errors/NotFoundError.js +17 -7
  7. package/api/errors/UnprocessableEntityError.js +17 -7
  8. package/api/resources/agents/client/Client.d.ts +17 -7
  9. package/api/resources/agents/client/Client.js +116 -39
  10. package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +6 -9
  11. package/api/resources/agents/client/requests/ResetMessagesRequest.d.ts +13 -0
  12. package/api/resources/agents/client/requests/ResetMessagesRequest.js +5 -0
  13. package/api/resources/agents/client/requests/index.d.ts +1 -0
  14. package/api/resources/agents/resources/archivalMemory/client/Client.d.ts +2 -0
  15. package/api/resources/agents/resources/archivalMemory/client/Client.js +31 -21
  16. package/api/resources/agents/resources/context/client/Client.d.ts +2 -0
  17. package/api/resources/agents/resources/context/client/Client.js +20 -10
  18. package/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -0
  19. package/api/resources/agents/resources/coreMemory/client/Client.js +38 -28
  20. package/api/resources/agents/resources/index.js +17 -7
  21. package/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -0
  22. package/api/resources/agents/resources/memoryVariables/client/Client.js +20 -10
  23. package/api/resources/agents/resources/messages/client/Client.d.ts +3 -1
  24. package/api/resources/agents/resources/messages/client/Client.js +37 -27
  25. package/api/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +1 -1
  26. package/api/resources/agents/resources/messages/types/MessagesListResponse.d.ts +1 -1
  27. package/api/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +1 -1
  28. package/api/resources/agents/resources/recallMemory/client/Client.d.ts +2 -0
  29. package/api/resources/agents/resources/recallMemory/client/Client.js +20 -10
  30. package/api/resources/agents/resources/sources/client/Client.d.ts +2 -0
  31. package/api/resources/agents/resources/sources/client/Client.js +20 -10
  32. package/api/resources/agents/resources/templates/client/Client.d.ts +2 -0
  33. package/api/resources/agents/resources/templates/client/Client.js +30 -20
  34. package/api/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +1 -1
  35. package/api/resources/agents/resources/tools/client/Client.d.ts +2 -0
  36. package/api/resources/agents/resources/tools/client/Client.js +26 -16
  37. package/api/resources/agents/types/AgentsSearchRequestCombinator.d.ts +1 -1
  38. package/api/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +1 -1
  39. package/api/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +1 -1
  40. package/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +1 -1
  41. package/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +1 -1
  42. package/api/resources/agents/types/CreateAgentRequestToolRulesItem.d.ts +1 -1
  43. package/api/resources/agents/types/UpdateAgentToolRulesItem.d.ts +1 -1
  44. package/api/resources/blocks/client/Client.d.ts +2 -0
  45. package/api/resources/blocks/client/Client.js +40 -30
  46. package/api/resources/health/client/Client.d.ts +2 -0
  47. package/api/resources/health/client/Client.js +20 -10
  48. package/api/resources/index.d.ts +4 -0
  49. package/api/resources/index.js +22 -8
  50. package/api/resources/jobs/client/Client.d.ts +2 -0
  51. package/api/resources/jobs/client/Client.js +31 -21
  52. package/api/resources/models/client/Client.d.ts +2 -0
  53. package/api/resources/models/client/Client.js +23 -13
  54. package/api/resources/providers/client/Client.d.ts +2 -0
  55. package/api/resources/providers/client/Client.js +31 -21
  56. package/api/resources/runs/client/Client.d.ts +117 -0
  57. package/api/resources/runs/client/Client.js +510 -0
  58. package/api/resources/runs/client/index.d.ts +1 -0
  59. package/api/resources/runs/client/index.js +17 -0
  60. package/api/resources/runs/client/requests/GetRunMessagesRequest.d.ts +50 -0
  61. package/api/resources/runs/client/requests/GetRunMessagesRequest.js +5 -0
  62. package/api/resources/runs/client/requests/index.d.ts +1 -0
  63. package/api/resources/runs/client/requests/index.js +2 -0
  64. package/api/resources/runs/index.d.ts +1 -0
  65. package/api/resources/runs/index.js +17 -0
  66. package/api/resources/sources/client/Client.d.ts +2 -0
  67. package/api/resources/sources/client/Client.js +43 -33
  68. package/api/resources/sources/resources/files/client/Client.d.ts +2 -1
  69. package/api/resources/sources/resources/files/client/Client.js +28 -18
  70. package/api/resources/sources/resources/index.js +17 -7
  71. package/api/resources/sources/resources/passages/client/Client.d.ts +2 -0
  72. package/api/resources/sources/resources/passages/client/Client.js +20 -10
  73. package/api/resources/tag/client/Client.d.ts +44 -0
  74. package/api/resources/tag/client/Client.js +146 -0
  75. package/api/resources/tag/client/index.d.ts +1 -0
  76. package/api/resources/tag/client/index.js +17 -0
  77. package/api/resources/tag/client/requests/ListTagsRequest.d.ts +12 -0
  78. package/api/resources/tag/client/requests/ListTagsRequest.js +5 -0
  79. package/api/resources/tag/client/requests/index.d.ts +1 -0
  80. package/api/resources/tag/client/requests/index.js +2 -0
  81. package/api/resources/tag/index.d.ts +1 -0
  82. package/api/resources/tag/index.js +17 -0
  83. package/api/resources/tools/client/Client.d.ts +2 -0
  84. package/api/resources/tools/client/Client.js +57 -47
  85. package/api/resources/tools/client/requests/ToolRunFromSource.d.ts +1 -1
  86. package/api/resources/tools/client/requests/ToolUpdate.d.ts +0 -2
  87. package/api/types/AgentStateToolRulesItem.d.ts +1 -1
  88. package/api/types/AgentType.d.ts +1 -1
  89. package/api/types/AppAuthSchemeAuthMode.d.ts +1 -1
  90. package/api/types/ChatCompletionRequestFunctionCall.d.ts +1 -1
  91. package/api/types/ChatCompletionRequestMessagesItem.d.ts +1 -1
  92. package/api/types/ChatCompletionRequestStop.d.ts +1 -1
  93. package/api/types/ChatCompletionRequestToolChoice.d.ts +1 -1
  94. package/api/types/EmbeddingConfigEmbeddingEndpointType.d.ts +1 -1
  95. package/api/types/Job.d.ts +2 -0
  96. package/api/types/JobStatus.d.ts +1 -1
  97. package/api/types/JobType.d.ts +8 -0
  98. package/api/types/JobType.js +10 -0
  99. package/api/types/LettaResponseMessagesItem.d.ts +1 -1
  100. package/api/types/LettaSchemasToolTool.d.ts +0 -2
  101. package/api/types/LlmConfigModelEndpointType.d.ts +1 -1
  102. package/api/types/MessageCreateRole.d.ts +1 -1
  103. package/api/types/MessageRole.d.ts +1 -1
  104. package/api/types/NotFoundErrorBodyMessage.d.ts +1 -1
  105. package/api/types/Run.d.ts +34 -0
  106. package/api/types/Run.js +5 -0
  107. package/api/types/SandboxConfigCreateConfig.d.ts +1 -1
  108. package/api/types/SandboxConfigUpdateConfig.d.ts +1 -1
  109. package/api/types/SandboxType.d.ts +1 -1
  110. package/api/types/ToolCallMessageToolCall.d.ts +1 -1
  111. package/api/types/ToolCreate.d.ts +0 -2
  112. package/api/types/ToolReturnMessageStatus.d.ts +1 -1
  113. package/api/types/ToolRuleType.d.ts +1 -1
  114. package/api/types/ToolType.d.ts +1 -1
  115. package/api/types/UserMessageInputContent.d.ts +1 -1
  116. package/api/types/ValidationErrorLocItem.d.ts +1 -1
  117. package/api/types/index.d.ts +2 -0
  118. package/api/types/index.js +2 -0
  119. package/core/fetcher/APIResponse.d.ts +1 -1
  120. package/core/fetcher/Fetcher.d.ts +1 -1
  121. package/core/fetcher/Fetcher.js +2 -2
  122. package/core/fetcher/Supplier.d.ts +1 -1
  123. package/core/fetcher/createRequestUrl.js +1 -2
  124. package/core/fetcher/getFetchFn.js +18 -9
  125. package/core/fetcher/getHeader.js +1 -2
  126. package/core/fetcher/getRequestBody.js +3 -4
  127. package/core/fetcher/getResponseBody.js +1 -2
  128. package/core/fetcher/makeRequest.d.ts +1 -1
  129. package/core/fetcher/requestWithRetries.js +3 -4
  130. package/core/fetcher/signals.d.ts +0 -1
  131. package/core/fetcher/signals.js +2 -3
  132. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
  133. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
  134. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
  135. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
  136. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
  137. package/core/form-data-utils/FormDataWrapper.d.ts +4 -4
  138. package/core/form-data-utils/FormDataWrapper.js +22 -12
  139. package/core/index.js +17 -7
  140. package/core/runtime/runtime.d.ts +1 -1
  141. package/core/runtime/runtime.js +51 -41
  142. package/core/schemas/Schema.d.ts +5 -5
  143. package/core/schemas/builders/bigint/bigint.js +1 -2
  144. package/core/schemas/builders/date/date.js +1 -2
  145. package/core/schemas/builders/enum/enum.js +1 -2
  146. package/core/schemas/builders/lazy/lazy.d.ts +1 -1
  147. package/core/schemas/builders/lazy/lazy.js +3 -4
  148. package/core/schemas/builders/lazy/lazyObject.js +1 -2
  149. package/core/schemas/builders/list/list.js +1 -2
  150. package/core/schemas/builders/literals/booleanLiteral.js +1 -2
  151. package/core/schemas/builders/literals/stringLiteral.js +1 -2
  152. package/core/schemas/builders/object/object.d.ts +1 -1
  153. package/core/schemas/builders/object/object.js +2 -3
  154. package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
  155. package/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
  156. package/core/schemas/builders/object/property.js +2 -3
  157. package/core/schemas/builders/object/types.d.ts +11 -11
  158. package/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
  159. package/core/schemas/builders/object-like/types.d.ts +1 -1
  160. package/core/schemas/builders/record/record.js +1 -2
  161. package/core/schemas/builders/record/types.d.ts +2 -2
  162. package/core/schemas/builders/schema-utils/getSchemaUtils.js +3 -4
  163. package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
  164. package/core/schemas/builders/set/set.js +1 -2
  165. package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
  166. package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
  167. package/core/schemas/builders/union/discriminant.js +1 -2
  168. package/core/schemas/builders/union/types.d.ts +6 -6
  169. package/core/schemas/builders/union/union.d.ts +1 -1
  170. package/core/schemas/builders/union/union.js +1 -2
  171. package/core/schemas/utils/MaybePromise.d.ts +1 -1
  172. package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +3 -3
  173. package/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
  174. package/core/schemas/utils/entries.d.ts +1 -1
  175. package/core/schemas/utils/entries.js +1 -2
  176. package/core/schemas/utils/filterObject.d.ts +1 -1
  177. package/core/schemas/utils/filterObject.js +1 -2
  178. package/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
  179. package/core/schemas/utils/isPlainObject.js +1 -2
  180. package/core/schemas/utils/keys.d.ts +1 -1
  181. package/core/schemas/utils/keys.js +1 -2
  182. package/core/schemas/utils/maybeSkipValidation.js +1 -2
  183. package/core/schemas/utils/partition.js +1 -2
  184. package/core/streaming-fetcher/Stream.d.ts +0 -1
  185. package/core/streaming-fetcher/Stream.js +20 -21
  186. package/dist/Client.d.ts +8 -0
  187. package/dist/Client.js +10 -0
  188. package/dist/api/errors/ConflictError.js +17 -7
  189. package/dist/api/errors/InternalServerError.js +17 -7
  190. package/dist/api/errors/NotFoundError.js +17 -7
  191. package/dist/api/errors/UnprocessableEntityError.js +17 -7
  192. package/dist/api/resources/agents/client/Client.d.ts +17 -7
  193. package/dist/api/resources/agents/client/Client.js +116 -39
  194. package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +6 -9
  195. package/dist/api/resources/agents/client/requests/ResetMessagesRequest.d.ts +13 -0
  196. package/dist/api/resources/agents/client/requests/ResetMessagesRequest.js +5 -0
  197. package/dist/api/resources/agents/client/requests/index.d.ts +1 -0
  198. package/dist/api/resources/agents/resources/archivalMemory/client/Client.d.ts +2 -0
  199. package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +31 -21
  200. package/dist/api/resources/agents/resources/context/client/Client.d.ts +2 -0
  201. package/dist/api/resources/agents/resources/context/client/Client.js +20 -10
  202. package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -0
  203. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +38 -28
  204. package/dist/api/resources/agents/resources/index.js +17 -7
  205. package/dist/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -0
  206. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +20 -10
  207. package/dist/api/resources/agents/resources/messages/client/Client.d.ts +3 -1
  208. package/dist/api/resources/agents/resources/messages/client/Client.js +37 -27
  209. package/dist/api/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +1 -1
  210. package/dist/api/resources/agents/resources/messages/types/MessagesListResponse.d.ts +1 -1
  211. package/dist/api/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +1 -1
  212. package/dist/api/resources/agents/resources/recallMemory/client/Client.d.ts +2 -0
  213. package/dist/api/resources/agents/resources/recallMemory/client/Client.js +20 -10
  214. package/dist/api/resources/agents/resources/sources/client/Client.d.ts +2 -0
  215. package/dist/api/resources/agents/resources/sources/client/Client.js +20 -10
  216. package/dist/api/resources/agents/resources/templates/client/Client.d.ts +2 -0
  217. package/dist/api/resources/agents/resources/templates/client/Client.js +30 -20
  218. package/dist/api/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +1 -1
  219. package/dist/api/resources/agents/resources/tools/client/Client.d.ts +2 -0
  220. package/dist/api/resources/agents/resources/tools/client/Client.js +26 -16
  221. package/dist/api/resources/agents/types/AgentsSearchRequestCombinator.d.ts +1 -1
  222. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +1 -1
  223. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +1 -1
  224. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +1 -1
  225. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +1 -1
  226. package/dist/api/resources/agents/types/CreateAgentRequestToolRulesItem.d.ts +1 -1
  227. package/dist/api/resources/agents/types/UpdateAgentToolRulesItem.d.ts +1 -1
  228. package/dist/api/resources/blocks/client/Client.d.ts +2 -0
  229. package/dist/api/resources/blocks/client/Client.js +40 -30
  230. package/dist/api/resources/health/client/Client.d.ts +2 -0
  231. package/dist/api/resources/health/client/Client.js +20 -10
  232. package/dist/api/resources/index.d.ts +4 -0
  233. package/dist/api/resources/index.js +22 -8
  234. package/dist/api/resources/jobs/client/Client.d.ts +2 -0
  235. package/dist/api/resources/jobs/client/Client.js +31 -21
  236. package/dist/api/resources/models/client/Client.d.ts +2 -0
  237. package/dist/api/resources/models/client/Client.js +23 -13
  238. package/dist/api/resources/providers/client/Client.d.ts +2 -0
  239. package/dist/api/resources/providers/client/Client.js +31 -21
  240. package/dist/api/resources/runs/client/Client.d.ts +117 -0
  241. package/dist/api/resources/runs/client/Client.js +510 -0
  242. package/dist/api/resources/runs/client/index.d.ts +1 -0
  243. package/dist/api/resources/runs/client/index.js +17 -0
  244. package/dist/api/resources/runs/client/requests/GetRunMessagesRequest.d.ts +50 -0
  245. package/dist/api/resources/runs/client/requests/GetRunMessagesRequest.js +5 -0
  246. package/dist/api/resources/runs/client/requests/index.d.ts +1 -0
  247. package/dist/api/resources/runs/client/requests/index.js +2 -0
  248. package/dist/api/resources/runs/index.d.ts +1 -0
  249. package/dist/api/resources/runs/index.js +17 -0
  250. package/dist/api/resources/sources/client/Client.d.ts +2 -0
  251. package/dist/api/resources/sources/client/Client.js +43 -33
  252. package/dist/api/resources/sources/resources/files/client/Client.d.ts +2 -1
  253. package/dist/api/resources/sources/resources/files/client/Client.js +28 -18
  254. package/dist/api/resources/sources/resources/index.js +17 -7
  255. package/dist/api/resources/sources/resources/passages/client/Client.d.ts +2 -0
  256. package/dist/api/resources/sources/resources/passages/client/Client.js +20 -10
  257. package/dist/api/resources/tag/client/Client.d.ts +44 -0
  258. package/dist/api/resources/tag/client/Client.js +146 -0
  259. package/dist/api/resources/tag/client/index.d.ts +1 -0
  260. package/dist/api/resources/tag/client/index.js +17 -0
  261. package/dist/api/resources/tag/client/requests/ListTagsRequest.d.ts +12 -0
  262. package/dist/api/resources/tag/client/requests/ListTagsRequest.js +5 -0
  263. package/dist/api/resources/tag/client/requests/index.d.ts +1 -0
  264. package/dist/api/resources/tag/client/requests/index.js +2 -0
  265. package/dist/api/resources/tag/index.d.ts +1 -0
  266. package/dist/api/resources/tag/index.js +17 -0
  267. package/dist/api/resources/tools/client/Client.d.ts +2 -0
  268. package/dist/api/resources/tools/client/Client.js +57 -47
  269. package/dist/api/resources/tools/client/requests/ToolRunFromSource.d.ts +1 -1
  270. package/dist/api/resources/tools/client/requests/ToolUpdate.d.ts +0 -2
  271. package/dist/api/types/AgentStateToolRulesItem.d.ts +1 -1
  272. package/dist/api/types/AgentType.d.ts +1 -1
  273. package/dist/api/types/AppAuthSchemeAuthMode.d.ts +1 -1
  274. package/dist/api/types/ChatCompletionRequestFunctionCall.d.ts +1 -1
  275. package/dist/api/types/ChatCompletionRequestMessagesItem.d.ts +1 -1
  276. package/dist/api/types/ChatCompletionRequestStop.d.ts +1 -1
  277. package/dist/api/types/ChatCompletionRequestToolChoice.d.ts +1 -1
  278. package/dist/api/types/EmbeddingConfigEmbeddingEndpointType.d.ts +1 -1
  279. package/dist/api/types/Job.d.ts +2 -0
  280. package/dist/api/types/JobStatus.d.ts +1 -1
  281. package/dist/api/types/JobType.d.ts +8 -0
  282. package/dist/api/types/JobType.js +10 -0
  283. package/dist/api/types/LettaResponseMessagesItem.d.ts +1 -1
  284. package/dist/api/types/LettaSchemasToolTool.d.ts +0 -2
  285. package/dist/api/types/LlmConfigModelEndpointType.d.ts +1 -1
  286. package/dist/api/types/MessageCreateRole.d.ts +1 -1
  287. package/dist/api/types/MessageRole.d.ts +1 -1
  288. package/dist/api/types/NotFoundErrorBodyMessage.d.ts +1 -1
  289. package/dist/api/types/Run.d.ts +34 -0
  290. package/dist/api/types/Run.js +5 -0
  291. package/dist/api/types/SandboxConfigCreateConfig.d.ts +1 -1
  292. package/dist/api/types/SandboxConfigUpdateConfig.d.ts +1 -1
  293. package/dist/api/types/SandboxType.d.ts +1 -1
  294. package/dist/api/types/ToolCallMessageToolCall.d.ts +1 -1
  295. package/dist/api/types/ToolCreate.d.ts +0 -2
  296. package/dist/api/types/ToolReturnMessageStatus.d.ts +1 -1
  297. package/dist/api/types/ToolRuleType.d.ts +1 -1
  298. package/dist/api/types/ToolType.d.ts +1 -1
  299. package/dist/api/types/UserMessageInputContent.d.ts +1 -1
  300. package/dist/api/types/ValidationErrorLocItem.d.ts +1 -1
  301. package/dist/api/types/index.d.ts +2 -0
  302. package/dist/api/types/index.js +2 -0
  303. package/dist/core/fetcher/APIResponse.d.ts +1 -1
  304. package/dist/core/fetcher/Fetcher.d.ts +1 -1
  305. package/dist/core/fetcher/Fetcher.js +2 -2
  306. package/dist/core/fetcher/Supplier.d.ts +1 -1
  307. package/dist/core/fetcher/createRequestUrl.js +1 -2
  308. package/dist/core/fetcher/getFetchFn.js +18 -9
  309. package/dist/core/fetcher/getHeader.js +1 -2
  310. package/dist/core/fetcher/getRequestBody.js +3 -4
  311. package/dist/core/fetcher/getResponseBody.js +1 -2
  312. package/dist/core/fetcher/makeRequest.d.ts +1 -1
  313. package/dist/core/fetcher/requestWithRetries.js +3 -4
  314. package/dist/core/fetcher/signals.d.ts +0 -1
  315. package/dist/core/fetcher/signals.js +2 -3
  316. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
  317. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
  318. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
  319. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
  320. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
  321. package/dist/core/form-data-utils/FormDataWrapper.d.ts +4 -4
  322. package/dist/core/form-data-utils/FormDataWrapper.js +22 -12
  323. package/dist/core/index.js +17 -7
  324. package/dist/core/runtime/runtime.d.ts +1 -1
  325. package/dist/core/runtime/runtime.js +51 -41
  326. package/dist/core/schemas/Schema.d.ts +5 -5
  327. package/dist/core/schemas/builders/bigint/bigint.js +1 -2
  328. package/dist/core/schemas/builders/date/date.js +1 -2
  329. package/dist/core/schemas/builders/enum/enum.js +1 -2
  330. package/dist/core/schemas/builders/lazy/lazy.d.ts +1 -1
  331. package/dist/core/schemas/builders/lazy/lazy.js +3 -4
  332. package/dist/core/schemas/builders/lazy/lazyObject.js +1 -2
  333. package/dist/core/schemas/builders/list/list.js +1 -2
  334. package/dist/core/schemas/builders/literals/booleanLiteral.js +1 -2
  335. package/dist/core/schemas/builders/literals/stringLiteral.js +1 -2
  336. package/dist/core/schemas/builders/object/object.d.ts +1 -1
  337. package/dist/core/schemas/builders/object/object.js +2 -3
  338. package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
  339. package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
  340. package/dist/core/schemas/builders/object/property.js +2 -3
  341. package/dist/core/schemas/builders/object/types.d.ts +11 -11
  342. package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
  343. package/dist/core/schemas/builders/object-like/types.d.ts +1 -1
  344. package/dist/core/schemas/builders/record/record.js +1 -2
  345. package/dist/core/schemas/builders/record/types.d.ts +2 -2
  346. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +3 -4
  347. package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
  348. package/dist/core/schemas/builders/set/set.js +1 -2
  349. package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
  350. package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
  351. package/dist/core/schemas/builders/union/discriminant.js +1 -2
  352. package/dist/core/schemas/builders/union/types.d.ts +6 -6
  353. package/dist/core/schemas/builders/union/union.d.ts +1 -1
  354. package/dist/core/schemas/builders/union/union.js +1 -2
  355. package/dist/core/schemas/utils/MaybePromise.d.ts +1 -1
  356. package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +3 -3
  357. package/dist/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
  358. package/dist/core/schemas/utils/entries.d.ts +1 -1
  359. package/dist/core/schemas/utils/entries.js +1 -2
  360. package/dist/core/schemas/utils/filterObject.d.ts +1 -1
  361. package/dist/core/schemas/utils/filterObject.js +1 -2
  362. package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
  363. package/dist/core/schemas/utils/isPlainObject.js +1 -2
  364. package/dist/core/schemas/utils/keys.d.ts +1 -1
  365. package/dist/core/schemas/utils/keys.js +1 -2
  366. package/dist/core/schemas/utils/maybeSkipValidation.js +1 -2
  367. package/dist/core/schemas/utils/partition.js +1 -2
  368. package/dist/core/streaming-fetcher/Stream.d.ts +0 -1
  369. package/dist/core/streaming-fetcher/Stream.js +20 -21
  370. package/dist/environments.d.ts +1 -1
  371. package/dist/index.d.ts +1 -0
  372. package/dist/index.js +19 -8
  373. package/dist/serialization/resources/agents/client/index.js +17 -7
  374. package/dist/serialization/resources/agents/client/list.js +17 -7
  375. package/dist/serialization/resources/agents/client/requests/AgentsSearchRequest.js +17 -7
  376. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +3 -2
  377. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +20 -9
  378. package/dist/serialization/resources/agents/client/requests/UpdateAgent.js +17 -7
  379. package/dist/serialization/resources/agents/resources/archivalMemory/client/create.js +17 -7
  380. package/dist/serialization/resources/agents/resources/archivalMemory/client/index.js +17 -7
  381. package/dist/serialization/resources/agents/resources/archivalMemory/client/list.js +17 -7
  382. package/dist/serialization/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.js +17 -7
  383. package/dist/serialization/resources/agents/resources/coreMemory/client/getBlocks.js +17 -7
  384. package/dist/serialization/resources/agents/resources/coreMemory/client/index.js +17 -7
  385. package/dist/serialization/resources/agents/resources/coreMemory/client/listInContext.js +17 -7
  386. package/dist/serialization/resources/agents/resources/index.js +17 -7
  387. package/dist/serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.js +17 -7
  388. package/dist/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.js +17 -7
  389. package/dist/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.js +17 -7
  390. package/dist/serialization/resources/agents/resources/messages/types/LettaStreamingResponse.js +17 -7
  391. package/dist/serialization/resources/agents/resources/messages/types/MessagesListResponse.js +17 -7
  392. package/dist/serialization/resources/agents/resources/messages/types/MessagesListResponseItem.js +17 -7
  393. package/dist/serialization/resources/agents/resources/sources/client/get.js +17 -7
  394. package/dist/serialization/resources/agents/resources/sources/client/index.js +17 -7
  395. package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +1 -1
  396. package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.js +18 -8
  397. package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateVersionRequest.js +17 -7
  398. package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.js +17 -7
  399. package/dist/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.js +17 -7
  400. package/dist/serialization/resources/agents/resources/tools/client/index.js +17 -7
  401. package/dist/serialization/resources/agents/resources/tools/client/list.js +17 -7
  402. package/dist/serialization/resources/agents/types/AgentsSearchRequestCombinator.js +17 -7
  403. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +17 -7
  404. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.js +17 -7
  405. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.js +17 -7
  406. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.js +17 -7
  407. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.js +17 -7
  408. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js +17 -7
  409. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemVersion.js +17 -7
  410. package/dist/serialization/resources/agents/types/CreateAgentRequestToolRulesItem.js +17 -7
  411. package/dist/serialization/resources/agents/types/UpdateAgentToolRulesItem.js +17 -7
  412. package/dist/serialization/resources/blocks/client/index.js +17 -7
  413. package/dist/serialization/resources/blocks/client/list.js +17 -7
  414. package/dist/serialization/resources/index.d.ts +2 -0
  415. package/dist/serialization/resources/index.js +20 -8
  416. package/dist/serialization/resources/jobs/client/index.js +17 -7
  417. package/dist/serialization/resources/jobs/client/list.js +17 -7
  418. package/dist/serialization/resources/jobs/client/listActive.js +17 -7
  419. package/dist/serialization/resources/models/client/index.js +17 -7
  420. package/dist/serialization/resources/models/client/listEmbeddingModels.js +17 -7
  421. package/dist/serialization/resources/models/client/listLlms.js +17 -7
  422. package/dist/serialization/resources/providers/client/index.js +17 -7
  423. package/dist/serialization/resources/providers/client/listProviders.js +17 -7
  424. package/dist/serialization/resources/providers/client/requests/ProviderCreate.js +17 -7
  425. package/dist/serialization/resources/providers/client/requests/ProviderUpdate.js +17 -7
  426. package/dist/serialization/resources/runs/client/getRunMessages.d.ts +11 -0
  427. package/dist/serialization/resources/runs/client/getRunMessages.js +42 -0
  428. package/dist/serialization/resources/runs/client/index.d.ts +3 -0
  429. package/dist/serialization/resources/runs/client/index.js +39 -0
  430. package/dist/serialization/resources/runs/client/listActiveRuns.d.ts +11 -0
  431. package/dist/serialization/resources/runs/client/listActiveRuns.js +42 -0
  432. package/dist/serialization/resources/runs/client/listRuns.d.ts +11 -0
  433. package/dist/serialization/resources/runs/client/listRuns.js +42 -0
  434. package/dist/serialization/resources/runs/index.d.ts +1 -0
  435. package/dist/serialization/resources/runs/index.js +17 -0
  436. package/dist/serialization/resources/sources/client/getByName.js +17 -7
  437. package/dist/serialization/resources/sources/client/index.js +17 -7
  438. package/dist/serialization/resources/sources/client/list.js +17 -7
  439. package/dist/serialization/resources/sources/client/requests/SourceCreate.js +17 -7
  440. package/dist/serialization/resources/sources/client/requests/SourceUpdate.js +17 -7
  441. package/dist/serialization/resources/sources/resources/files/client/index.js +17 -7
  442. package/dist/serialization/resources/sources/resources/files/client/list.js +17 -7
  443. package/dist/serialization/resources/sources/resources/index.js +17 -7
  444. package/dist/serialization/resources/sources/resources/passages/client/index.js +17 -7
  445. package/dist/serialization/resources/sources/resources/passages/client/list.js +17 -7
  446. package/dist/serialization/resources/tag/client/index.d.ts +1 -0
  447. package/dist/serialization/resources/tag/client/index.js +37 -0
  448. package/dist/serialization/resources/tag/client/listTags.d.ts +9 -0
  449. package/dist/serialization/resources/tag/client/listTags.js +41 -0
  450. package/dist/serialization/resources/tag/index.d.ts +1 -0
  451. package/dist/serialization/resources/tag/index.js +17 -0
  452. package/dist/serialization/resources/tools/client/addBaseTool.js +17 -7
  453. package/dist/serialization/resources/tools/client/getByName.js +17 -7
  454. package/dist/serialization/resources/tools/client/index.js +17 -7
  455. package/dist/serialization/resources/tools/client/list.js +17 -7
  456. package/dist/serialization/resources/tools/client/listComposioActionsByApp.js +17 -7
  457. package/dist/serialization/resources/tools/client/listComposioApps.js +17 -7
  458. package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +1 -1
  459. package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.js +18 -8
  460. package/dist/serialization/resources/tools/client/requests/ToolUpdate.d.ts +0 -1
  461. package/dist/serialization/resources/tools/client/requests/ToolUpdate.js +17 -8
  462. package/dist/serialization/types/ActionModel.js +17 -7
  463. package/dist/serialization/types/ActionParametersModel.js +17 -7
  464. package/dist/serialization/types/ActionResponseModel.js +17 -7
  465. package/dist/serialization/types/AgentEnvironmentVariable.js +17 -7
  466. package/dist/serialization/types/AgentState.js +17 -7
  467. package/dist/serialization/types/AgentStateToolRulesItem.js +17 -7
  468. package/dist/serialization/types/AgentType.js +17 -7
  469. package/dist/serialization/types/AppAuthScheme.js +17 -7
  470. package/dist/serialization/types/AppAuthSchemeAuthMode.js +17 -7
  471. package/dist/serialization/types/AppModel.js +17 -7
  472. package/dist/serialization/types/ArchivalMemorySummary.js +17 -7
  473. package/dist/serialization/types/AssistantFile.js +17 -7
  474. package/dist/serialization/types/AssistantMessageInput.js +17 -7
  475. package/dist/serialization/types/AssistantMessageOutput.js +17 -7
  476. package/dist/serialization/types/AuthRequest.js +17 -7
  477. package/dist/serialization/types/AuthResponse.js +17 -7
  478. package/dist/serialization/types/AuthSchemeField.js +17 -7
  479. package/dist/serialization/types/Block.js +17 -7
  480. package/dist/serialization/types/BlockUpdate.js +17 -7
  481. package/dist/serialization/types/ChatCompletionRequest.js +17 -7
  482. package/dist/serialization/types/ChatCompletionRequestFunctionCall.js +17 -7
  483. package/dist/serialization/types/ChatCompletionRequestMessagesItem.js +17 -7
  484. package/dist/serialization/types/ChatCompletionRequestStop.js +17 -7
  485. package/dist/serialization/types/ChatCompletionRequestToolChoice.js +17 -7
  486. package/dist/serialization/types/ChatCompletionResponse.js +17 -7
  487. package/dist/serialization/types/ChildToolRule.js +17 -7
  488. package/dist/serialization/types/Choice.js +17 -7
  489. package/dist/serialization/types/ConditionalToolRule.js +17 -7
  490. package/dist/serialization/types/ConflictErrorBody.js +17 -7
  491. package/dist/serialization/types/ContextWindowOverview.js +17 -7
  492. package/dist/serialization/types/CreateAssistantFileRequest.js +17 -7
  493. package/dist/serialization/types/CreateAssistantRequest.js +17 -7
  494. package/dist/serialization/types/CreateBlock.js +17 -7
  495. package/dist/serialization/types/DeleteAssistantFileResponse.js +17 -7
  496. package/dist/serialization/types/DeleteAssistantResponse.js +17 -7
  497. package/dist/serialization/types/E2BSandboxConfig.js +17 -7
  498. package/dist/serialization/types/EmbeddingConfig.js +17 -7
  499. package/dist/serialization/types/EmbeddingConfigEmbeddingEndpointType.js +17 -7
  500. package/dist/serialization/types/FileMetadata.js +17 -7
  501. package/dist/serialization/types/FunctionCallInput.js +17 -7
  502. package/dist/serialization/types/FunctionCallOutput.js +17 -7
  503. package/dist/serialization/types/FunctionSchema.js +17 -7
  504. package/dist/serialization/types/Health.js +17 -7
  505. package/dist/serialization/types/HttpValidationError.js +17 -7
  506. package/dist/serialization/types/InitToolRule.js +17 -7
  507. package/dist/serialization/types/InternalServerErrorBody.js +17 -7
  508. package/dist/serialization/types/Job.d.ts +2 -0
  509. package/dist/serialization/types/Job.js +19 -7
  510. package/dist/serialization/types/JobStatus.js +17 -7
  511. package/dist/serialization/types/JobType.d.ts +10 -0
  512. package/dist/serialization/types/JobType.js +44 -0
  513. package/dist/serialization/types/LettaRequest.js +17 -7
  514. package/dist/serialization/types/LettaResponse.js +17 -7
  515. package/dist/serialization/types/LettaResponseMessagesItem.js +17 -7
  516. package/dist/serialization/types/LettaSchemasLettaMessageToolCall.js +17 -7
  517. package/dist/serialization/types/LettaSchemasMessageMessage.js +17 -7
  518. package/dist/serialization/types/LettaSchemasOpenaiChatCompletionRequestTool.js +17 -7
  519. package/dist/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCall.js +17 -7
  520. package/dist/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.js +17 -7
  521. package/dist/serialization/types/LettaSchemasOpenaiChatCompletionResponseMessage.js +17 -7
  522. package/dist/serialization/types/LettaSchemasOpenaiChatCompletionResponseToolCall.js +17 -7
  523. package/dist/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.js +17 -7
  524. package/dist/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallInput.js +17 -7
  525. package/dist/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.js +17 -7
  526. package/dist/serialization/types/LettaSchemasToolTool.d.ts +0 -1
  527. package/dist/serialization/types/LettaSchemasToolTool.js +17 -8
  528. package/dist/serialization/types/LettaUsageStatistics.js +17 -7
  529. package/dist/serialization/types/LlmConfig.js +17 -7
  530. package/dist/serialization/types/LlmConfigModelEndpointType.js +17 -7
  531. package/dist/serialization/types/LocalSandboxConfig.js +17 -7
  532. package/dist/serialization/types/LogProbToken.js +17 -7
  533. package/dist/serialization/types/Memory.js +17 -7
  534. package/dist/serialization/types/MessageContentLogProb.js +17 -7
  535. package/dist/serialization/types/MessageCreate.js +17 -7
  536. package/dist/serialization/types/MessageCreateRole.js +17 -7
  537. package/dist/serialization/types/MessageRole.js +17 -7
  538. package/dist/serialization/types/NotFoundErrorBody.js +17 -7
  539. package/dist/serialization/types/NotFoundErrorBodyMessage.js +17 -7
  540. package/dist/serialization/types/OpenAiAssistant.js +17 -7
  541. package/dist/serialization/types/Organization.js +17 -7
  542. package/dist/serialization/types/OrganizationCreate.js +17 -7
  543. package/dist/serialization/types/Passage.js +17 -7
  544. package/dist/serialization/types/Provider.js +17 -7
  545. package/dist/serialization/types/ReasoningMessage.js +17 -7
  546. package/dist/serialization/types/RecallMemorySummary.js +17 -7
  547. package/dist/serialization/types/ResponseFormat.js +17 -7
  548. package/dist/serialization/types/Run.d.ts +22 -0
  549. package/dist/serialization/types/Run.js +53 -0
  550. package/dist/serialization/types/SandboxConfig.js +17 -7
  551. package/dist/serialization/types/SandboxConfigCreate.js +17 -7
  552. package/dist/serialization/types/SandboxConfigCreateConfig.js +17 -7
  553. package/dist/serialization/types/SandboxConfigUpdate.js +17 -7
  554. package/dist/serialization/types/SandboxConfigUpdateConfig.js +17 -7
  555. package/dist/serialization/types/SandboxEnvironmentVariable.js +17 -7
  556. package/dist/serialization/types/SandboxEnvironmentVariableCreate.js +17 -7
  557. package/dist/serialization/types/SandboxEnvironmentVariableUpdate.js +17 -7
  558. package/dist/serialization/types/SandboxType.js +17 -7
  559. package/dist/serialization/types/Source.js +17 -7
  560. package/dist/serialization/types/SystemMessageInput.js +17 -7
  561. package/dist/serialization/types/SystemMessageOutput.js +17 -7
  562. package/dist/serialization/types/TerminalToolRule.js +17 -7
  563. package/dist/serialization/types/ToolCallDelta.js +17 -7
  564. package/dist/serialization/types/ToolCallFunctionOutput.js +17 -7
  565. package/dist/serialization/types/ToolCallMessage.js +17 -7
  566. package/dist/serialization/types/ToolCallMessageToolCall.js +17 -7
  567. package/dist/serialization/types/ToolCreate.d.ts +0 -1
  568. package/dist/serialization/types/ToolCreate.js +17 -8
  569. package/dist/serialization/types/ToolFunctionChoice.js +17 -7
  570. package/dist/serialization/types/ToolInput.js +17 -7
  571. package/dist/serialization/types/ToolMessage.js +17 -7
  572. package/dist/serialization/types/ToolReturnMessage.js +17 -7
  573. package/dist/serialization/types/ToolReturnMessageStatus.js +17 -7
  574. package/dist/serialization/types/ToolRuleType.js +17 -7
  575. package/dist/serialization/types/ToolType.js +17 -7
  576. package/dist/serialization/types/UsageStatistics.js +17 -7
  577. package/dist/serialization/types/User.js +17 -7
  578. package/dist/serialization/types/UserCreate.js +17 -7
  579. package/dist/serialization/types/UserMessageInput.js +17 -7
  580. package/dist/serialization/types/UserMessageInputContent.js +17 -7
  581. package/dist/serialization/types/UserMessageOutput.js +17 -7
  582. package/dist/serialization/types/UserUpdate.js +17 -7
  583. package/dist/serialization/types/ValidationError.js +17 -7
  584. package/dist/serialization/types/ValidationErrorLocItem.js +17 -7
  585. package/dist/serialization/types/index.d.ts +2 -0
  586. package/dist/serialization/types/index.js +2 -0
  587. package/dist/version.d.ts +1 -1
  588. package/dist/version.js +1 -1
  589. package/environments.d.ts +1 -1
  590. package/index.d.ts +1 -0
  591. package/index.js +19 -8
  592. package/{jest.config.js → jest.config.mjs} +4 -1
  593. package/package.json +17 -16
  594. package/reference.md +524 -9
  595. package/scripts/rename-to-esm-files.js +115 -0
  596. package/serialization/resources/agents/client/index.js +17 -7
  597. package/serialization/resources/agents/client/list.js +17 -7
  598. package/serialization/resources/agents/client/requests/AgentsSearchRequest.js +17 -7
  599. package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +3 -2
  600. package/serialization/resources/agents/client/requests/CreateAgentRequest.js +20 -9
  601. package/serialization/resources/agents/client/requests/UpdateAgent.js +17 -7
  602. package/serialization/resources/agents/resources/archivalMemory/client/create.js +17 -7
  603. package/serialization/resources/agents/resources/archivalMemory/client/index.js +17 -7
  604. package/serialization/resources/agents/resources/archivalMemory/client/list.js +17 -7
  605. package/serialization/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.js +17 -7
  606. package/serialization/resources/agents/resources/coreMemory/client/getBlocks.js +17 -7
  607. package/serialization/resources/agents/resources/coreMemory/client/index.js +17 -7
  608. package/serialization/resources/agents/resources/coreMemory/client/listInContext.js +17 -7
  609. package/serialization/resources/agents/resources/index.js +17 -7
  610. package/serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.js +17 -7
  611. package/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.js +17 -7
  612. package/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.js +17 -7
  613. package/serialization/resources/agents/resources/messages/types/LettaStreamingResponse.js +17 -7
  614. package/serialization/resources/agents/resources/messages/types/MessagesListResponse.js +17 -7
  615. package/serialization/resources/agents/resources/messages/types/MessagesListResponseItem.js +17 -7
  616. package/serialization/resources/agents/resources/sources/client/get.js +17 -7
  617. package/serialization/resources/agents/resources/sources/client/index.js +17 -7
  618. package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +1 -1
  619. package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.js +18 -8
  620. package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateVersionRequest.js +17 -7
  621. package/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.js +17 -7
  622. package/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.js +17 -7
  623. package/serialization/resources/agents/resources/tools/client/index.js +17 -7
  624. package/serialization/resources/agents/resources/tools/client/list.js +17 -7
  625. package/serialization/resources/agents/types/AgentsSearchRequestCombinator.js +17 -7
  626. package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +17 -7
  627. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.js +17 -7
  628. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.js +17 -7
  629. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.js +17 -7
  630. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.js +17 -7
  631. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js +17 -7
  632. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemVersion.js +17 -7
  633. package/serialization/resources/agents/types/CreateAgentRequestToolRulesItem.js +17 -7
  634. package/serialization/resources/agents/types/UpdateAgentToolRulesItem.js +17 -7
  635. package/serialization/resources/blocks/client/index.js +17 -7
  636. package/serialization/resources/blocks/client/list.js +17 -7
  637. package/serialization/resources/index.d.ts +2 -0
  638. package/serialization/resources/index.js +20 -8
  639. package/serialization/resources/jobs/client/index.js +17 -7
  640. package/serialization/resources/jobs/client/list.js +17 -7
  641. package/serialization/resources/jobs/client/listActive.js +17 -7
  642. package/serialization/resources/models/client/index.js +17 -7
  643. package/serialization/resources/models/client/listEmbeddingModels.js +17 -7
  644. package/serialization/resources/models/client/listLlms.js +17 -7
  645. package/serialization/resources/providers/client/index.js +17 -7
  646. package/serialization/resources/providers/client/listProviders.js +17 -7
  647. package/serialization/resources/providers/client/requests/ProviderCreate.js +17 -7
  648. package/serialization/resources/providers/client/requests/ProviderUpdate.js +17 -7
  649. package/serialization/resources/runs/client/getRunMessages.d.ts +11 -0
  650. package/serialization/resources/runs/client/getRunMessages.js +42 -0
  651. package/serialization/resources/runs/client/index.d.ts +3 -0
  652. package/serialization/resources/runs/client/index.js +39 -0
  653. package/serialization/resources/runs/client/listActiveRuns.d.ts +11 -0
  654. package/serialization/resources/runs/client/listActiveRuns.js +42 -0
  655. package/serialization/resources/runs/client/listRuns.d.ts +11 -0
  656. package/serialization/resources/runs/client/listRuns.js +42 -0
  657. package/serialization/resources/runs/index.d.ts +1 -0
  658. package/serialization/resources/runs/index.js +17 -0
  659. package/serialization/resources/sources/client/getByName.js +17 -7
  660. package/serialization/resources/sources/client/index.js +17 -7
  661. package/serialization/resources/sources/client/list.js +17 -7
  662. package/serialization/resources/sources/client/requests/SourceCreate.js +17 -7
  663. package/serialization/resources/sources/client/requests/SourceUpdate.js +17 -7
  664. package/serialization/resources/sources/resources/files/client/index.js +17 -7
  665. package/serialization/resources/sources/resources/files/client/list.js +17 -7
  666. package/serialization/resources/sources/resources/index.js +17 -7
  667. package/serialization/resources/sources/resources/passages/client/index.js +17 -7
  668. package/serialization/resources/sources/resources/passages/client/list.js +17 -7
  669. package/serialization/resources/tag/client/index.d.ts +1 -0
  670. package/serialization/resources/tag/client/index.js +37 -0
  671. package/serialization/resources/tag/client/listTags.d.ts +9 -0
  672. package/serialization/resources/tag/client/listTags.js +41 -0
  673. package/serialization/resources/tag/index.d.ts +1 -0
  674. package/serialization/resources/tag/index.js +17 -0
  675. package/serialization/resources/tools/client/addBaseTool.js +17 -7
  676. package/serialization/resources/tools/client/getByName.js +17 -7
  677. package/serialization/resources/tools/client/index.js +17 -7
  678. package/serialization/resources/tools/client/list.js +17 -7
  679. package/serialization/resources/tools/client/listComposioActionsByApp.js +17 -7
  680. package/serialization/resources/tools/client/listComposioApps.js +17 -7
  681. package/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +1 -1
  682. package/serialization/resources/tools/client/requests/ToolRunFromSource.js +18 -8
  683. package/serialization/resources/tools/client/requests/ToolUpdate.d.ts +0 -1
  684. package/serialization/resources/tools/client/requests/ToolUpdate.js +17 -8
  685. package/serialization/types/ActionModel.js +17 -7
  686. package/serialization/types/ActionParametersModel.js +17 -7
  687. package/serialization/types/ActionResponseModel.js +17 -7
  688. package/serialization/types/AgentEnvironmentVariable.js +17 -7
  689. package/serialization/types/AgentState.js +17 -7
  690. package/serialization/types/AgentStateToolRulesItem.js +17 -7
  691. package/serialization/types/AgentType.js +17 -7
  692. package/serialization/types/AppAuthScheme.js +17 -7
  693. package/serialization/types/AppAuthSchemeAuthMode.js +17 -7
  694. package/serialization/types/AppModel.js +17 -7
  695. package/serialization/types/ArchivalMemorySummary.js +17 -7
  696. package/serialization/types/AssistantFile.js +17 -7
  697. package/serialization/types/AssistantMessageInput.js +17 -7
  698. package/serialization/types/AssistantMessageOutput.js +17 -7
  699. package/serialization/types/AuthRequest.js +17 -7
  700. package/serialization/types/AuthResponse.js +17 -7
  701. package/serialization/types/AuthSchemeField.js +17 -7
  702. package/serialization/types/Block.js +17 -7
  703. package/serialization/types/BlockUpdate.js +17 -7
  704. package/serialization/types/ChatCompletionRequest.js +17 -7
  705. package/serialization/types/ChatCompletionRequestFunctionCall.js +17 -7
  706. package/serialization/types/ChatCompletionRequestMessagesItem.js +17 -7
  707. package/serialization/types/ChatCompletionRequestStop.js +17 -7
  708. package/serialization/types/ChatCompletionRequestToolChoice.js +17 -7
  709. package/serialization/types/ChatCompletionResponse.js +17 -7
  710. package/serialization/types/ChildToolRule.js +17 -7
  711. package/serialization/types/Choice.js +17 -7
  712. package/serialization/types/ConditionalToolRule.js +17 -7
  713. package/serialization/types/ConflictErrorBody.js +17 -7
  714. package/serialization/types/ContextWindowOverview.js +17 -7
  715. package/serialization/types/CreateAssistantFileRequest.js +17 -7
  716. package/serialization/types/CreateAssistantRequest.js +17 -7
  717. package/serialization/types/CreateBlock.js +17 -7
  718. package/serialization/types/DeleteAssistantFileResponse.js +17 -7
  719. package/serialization/types/DeleteAssistantResponse.js +17 -7
  720. package/serialization/types/E2BSandboxConfig.js +17 -7
  721. package/serialization/types/EmbeddingConfig.js +17 -7
  722. package/serialization/types/EmbeddingConfigEmbeddingEndpointType.js +17 -7
  723. package/serialization/types/FileMetadata.js +17 -7
  724. package/serialization/types/FunctionCallInput.js +17 -7
  725. package/serialization/types/FunctionCallOutput.js +17 -7
  726. package/serialization/types/FunctionSchema.js +17 -7
  727. package/serialization/types/Health.js +17 -7
  728. package/serialization/types/HttpValidationError.js +17 -7
  729. package/serialization/types/InitToolRule.js +17 -7
  730. package/serialization/types/InternalServerErrorBody.js +17 -7
  731. package/serialization/types/Job.d.ts +2 -0
  732. package/serialization/types/Job.js +19 -7
  733. package/serialization/types/JobStatus.js +17 -7
  734. package/serialization/types/JobType.d.ts +10 -0
  735. package/serialization/types/JobType.js +44 -0
  736. package/serialization/types/LettaRequest.js +17 -7
  737. package/serialization/types/LettaResponse.js +17 -7
  738. package/serialization/types/LettaResponseMessagesItem.js +17 -7
  739. package/serialization/types/LettaSchemasLettaMessageToolCall.js +17 -7
  740. package/serialization/types/LettaSchemasMessageMessage.js +17 -7
  741. package/serialization/types/LettaSchemasOpenaiChatCompletionRequestTool.js +17 -7
  742. package/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCall.js +17 -7
  743. package/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.js +17 -7
  744. package/serialization/types/LettaSchemasOpenaiChatCompletionResponseMessage.js +17 -7
  745. package/serialization/types/LettaSchemasOpenaiChatCompletionResponseToolCall.js +17 -7
  746. package/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.js +17 -7
  747. package/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallInput.js +17 -7
  748. package/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.js +17 -7
  749. package/serialization/types/LettaSchemasToolTool.d.ts +0 -1
  750. package/serialization/types/LettaSchemasToolTool.js +17 -8
  751. package/serialization/types/LettaUsageStatistics.js +17 -7
  752. package/serialization/types/LlmConfig.js +17 -7
  753. package/serialization/types/LlmConfigModelEndpointType.js +17 -7
  754. package/serialization/types/LocalSandboxConfig.js +17 -7
  755. package/serialization/types/LogProbToken.js +17 -7
  756. package/serialization/types/Memory.js +17 -7
  757. package/serialization/types/MessageContentLogProb.js +17 -7
  758. package/serialization/types/MessageCreate.js +17 -7
  759. package/serialization/types/MessageCreateRole.js +17 -7
  760. package/serialization/types/MessageRole.js +17 -7
  761. package/serialization/types/NotFoundErrorBody.js +17 -7
  762. package/serialization/types/NotFoundErrorBodyMessage.js +17 -7
  763. package/serialization/types/OpenAiAssistant.js +17 -7
  764. package/serialization/types/Organization.js +17 -7
  765. package/serialization/types/OrganizationCreate.js +17 -7
  766. package/serialization/types/Passage.js +17 -7
  767. package/serialization/types/Provider.js +17 -7
  768. package/serialization/types/ReasoningMessage.js +17 -7
  769. package/serialization/types/RecallMemorySummary.js +17 -7
  770. package/serialization/types/ResponseFormat.js +17 -7
  771. package/serialization/types/Run.d.ts +22 -0
  772. package/serialization/types/Run.js +53 -0
  773. package/serialization/types/SandboxConfig.js +17 -7
  774. package/serialization/types/SandboxConfigCreate.js +17 -7
  775. package/serialization/types/SandboxConfigCreateConfig.js +17 -7
  776. package/serialization/types/SandboxConfigUpdate.js +17 -7
  777. package/serialization/types/SandboxConfigUpdateConfig.js +17 -7
  778. package/serialization/types/SandboxEnvironmentVariable.js +17 -7
  779. package/serialization/types/SandboxEnvironmentVariableCreate.js +17 -7
  780. package/serialization/types/SandboxEnvironmentVariableUpdate.js +17 -7
  781. package/serialization/types/SandboxType.js +17 -7
  782. package/serialization/types/Source.js +17 -7
  783. package/serialization/types/SystemMessageInput.js +17 -7
  784. package/serialization/types/SystemMessageOutput.js +17 -7
  785. package/serialization/types/TerminalToolRule.js +17 -7
  786. package/serialization/types/ToolCallDelta.js +17 -7
  787. package/serialization/types/ToolCallFunctionOutput.js +17 -7
  788. package/serialization/types/ToolCallMessage.js +17 -7
  789. package/serialization/types/ToolCallMessageToolCall.js +17 -7
  790. package/serialization/types/ToolCreate.d.ts +0 -1
  791. package/serialization/types/ToolCreate.js +17 -8
  792. package/serialization/types/ToolFunctionChoice.js +17 -7
  793. package/serialization/types/ToolInput.js +17 -7
  794. package/serialization/types/ToolMessage.js +17 -7
  795. package/serialization/types/ToolReturnMessage.js +17 -7
  796. package/serialization/types/ToolReturnMessageStatus.js +17 -7
  797. package/serialization/types/ToolRuleType.js +17 -7
  798. package/serialization/types/ToolType.js +17 -7
  799. package/serialization/types/UsageStatistics.js +17 -7
  800. package/serialization/types/User.js +17 -7
  801. package/serialization/types/UserCreate.js +17 -7
  802. package/serialization/types/UserMessageInput.js +17 -7
  803. package/serialization/types/UserMessageInputContent.js +17 -7
  804. package/serialization/types/UserMessageOutput.js +17 -7
  805. package/serialization/types/UserUpdate.js +17 -7
  806. package/serialization/types/ValidationError.js +17 -7
  807. package/serialization/types/ValidationErrorLocItem.js +17 -7
  808. package/serialization/types/index.d.ts +2 -0
  809. package/serialization/types/index.js +2 -0
  810. package/version.d.ts +1 -1
  811. package/version.js +1 -1
@@ -19,8 +19,9 @@ var __await = (this && this.__await) || function (v) { return this instanceof __
19
19
  var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
20
20
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
21
21
  var g = generator.apply(thisArg, _arguments || []), i, q = [];
22
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
23
- function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
22
+ return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
23
+ function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
24
+ function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
24
25
  function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
25
26
  function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
26
27
  function fulfill(value) { resume("next", value); }
@@ -28,7 +29,8 @@ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _ar
28
29
  function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
29
30
  };
30
31
  Object.defineProperty(exports, "__esModule", { value: true });
31
- exports.readableStreamAsyncIterable = exports.Stream = void 0;
32
+ exports.Stream = void 0;
33
+ exports.readableStreamAsyncIterable = readableStreamAsyncIterable;
32
34
  const runtime_1 = require("../runtime");
33
35
  const DATA_PREFIX = "data:";
34
36
  class Stream {
@@ -48,26 +50,24 @@ class Stream {
48
50
  }
49
51
  iterMessages() {
50
52
  return __asyncGenerator(this, arguments, function* iterMessages_1() {
51
- var e_1, _a;
53
+ var _a, e_1, _b, _c;
52
54
  this.controller.signal;
53
55
  const stream = readableStreamAsyncIterable(this.stream);
54
56
  let buf = "";
55
57
  let prefixSeen = false;
56
58
  try {
57
- for (var stream_1 = __asyncValues(stream), stream_1_1; stream_1_1 = yield __await(stream_1.next()), !stream_1_1.done;) {
58
- const chunk = stream_1_1.value;
59
+ for (var _d = true, stream_1 = __asyncValues(stream), stream_1_1; stream_1_1 = yield __await(stream_1.next()), _a = stream_1_1.done, !_a; _d = true) {
60
+ _c = stream_1_1.value;
61
+ _d = false;
62
+ const chunk = _c;
59
63
  buf += this.decodeChunk(chunk);
60
64
  let terminatorIndex;
61
- // Parse the chunk into as many messages as possible
62
65
  while ((terminatorIndex = buf.indexOf(this.messageTerminator)) >= 0) {
63
- // Extract the line from the buffer
64
66
  let line = buf.slice(0, terminatorIndex + 1);
65
- buf = buf.slice(terminatorIndex + 1);
66
- // Skip empty lines
67
- if (line.length === 0) {
67
+ buf = buf.slice(terminatorIndex + this.messageTerminator.length);
68
+ if (!line.trim()) {
68
69
  continue;
69
70
  }
70
- // Skip the chunk until the prefix is found
71
71
  if (!prefixSeen && this.prefix != null) {
72
72
  const prefixIndex = line.indexOf(this.prefix);
73
73
  if (prefixIndex === -1) {
@@ -76,11 +76,9 @@ class Stream {
76
76
  prefixSeen = true;
77
77
  line = line.slice(prefixIndex + this.prefix.length);
78
78
  }
79
- // If the stream terminator is present, return
80
79
  if (this.streamTerminator != null && line.includes(this.streamTerminator)) {
81
80
  return yield __await(void 0);
82
81
  }
83
- // Otherwise, yield message from the prefix to the terminator
84
82
  const message = yield __await(this.parse(JSON.parse(line)));
85
83
  yield yield __await(message);
86
84
  prefixSeen = false;
@@ -90,7 +88,7 @@ class Stream {
90
88
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
91
89
  finally {
92
90
  try {
93
- if (stream_1_1 && !stream_1_1.done && (_a = stream_1.return)) yield __await(_a.call(stream_1));
91
+ if (!_d && !_a && (_b = stream_1.return)) yield __await(_b.call(stream_1));
94
92
  }
95
93
  finally { if (e_1) throw e_1.error; }
96
94
  }
@@ -98,17 +96,19 @@ class Stream {
98
96
  }
99
97
  [Symbol.asyncIterator]() {
100
98
  return __asyncGenerator(this, arguments, function* _a() {
101
- var e_2, _b;
99
+ var _b, e_2, _c, _d;
102
100
  try {
103
- for (var _c = __asyncValues(this.iterMessages()), _d; _d = yield __await(_c.next()), !_d.done;) {
104
- const message = _d.value;
101
+ for (var _e = true, _f = __asyncValues(this.iterMessages()), _g; _g = yield __await(_f.next()), _b = _g.done, !_b; _e = true) {
102
+ _d = _g.value;
103
+ _e = false;
104
+ const message = _d;
105
105
  yield yield __await(message);
106
106
  }
107
107
  }
108
108
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
109
109
  finally {
110
110
  try {
111
- if (_d && !_d.done && (_b = _c.return)) yield __await(_b.call(_c));
111
+ if (!_e && !_b && (_c = _f.return)) yield __await(_c.call(_f));
112
112
  }
113
113
  finally { if (e_2) throw e_2.error; }
114
114
  }
@@ -122,7 +122,7 @@ class Stream {
122
122
  decoded += decoder.decode(chunk);
123
123
  }
124
124
  // Buffer is present in Node.js environment
125
- else if (runtime_1.RUNTIME.type === "node" && typeof chunk != "undefined") {
125
+ else if (runtime_1.RUNTIME.type === "node" && typeof chunk !== "undefined") {
126
126
  decoded += Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
127
127
  }
128
128
  return decoded;
@@ -167,4 +167,3 @@ function readableStreamAsyncIterable(stream) {
167
167
  },
168
168
  };
169
169
  }
170
- exports.readableStreamAsyncIterable = readableStreamAsyncIterable;
package/dist/Client.d.ts CHANGED
@@ -11,9 +11,13 @@ import { Blocks } from "./api/resources/blocks/client/Client";
11
11
  import { Jobs } from "./api/resources/jobs/client/Client";
12
12
  import { Health } from "./api/resources/health/client/Client";
13
13
  import { Providers } from "./api/resources/providers/client/Client";
14
+ import { Runs } from "./api/resources/runs/client/Client";
15
+ import { Tag } from "./api/resources/tag/client/Client";
14
16
  export declare namespace LettaClient {
15
17
  interface Options {
16
18
  environment?: core.Supplier<environments.LettaEnvironment | string>;
19
+ /** Specify a custom URL to connect the client to. */
20
+ baseUrl?: core.Supplier<string>;
17
21
  token?: core.Supplier<string | undefined>;
18
22
  fetcher?: core.FetchFunction;
19
23
  }
@@ -38,6 +42,8 @@ export declare class LettaClient {
38
42
  protected _jobs: Jobs | undefined;
39
43
  protected _health: Health | undefined;
40
44
  protected _providers: Providers | undefined;
45
+ protected _runs: Runs | undefined;
46
+ protected _tag: Tag | undefined;
41
47
  constructor(_options?: LettaClient.Options);
42
48
  get tools(): Tools;
43
49
  get sources(): Sources;
@@ -47,4 +53,6 @@ export declare class LettaClient {
47
53
  get jobs(): Jobs;
48
54
  get health(): Health;
49
55
  get providers(): Providers;
56
+ get runs(): Runs;
57
+ get tag(): Tag;
50
58
  }
package/dist/Client.js CHANGED
@@ -12,6 +12,8 @@ const Client_5 = require("./api/resources/blocks/client/Client");
12
12
  const Client_6 = require("./api/resources/jobs/client/Client");
13
13
  const Client_7 = require("./api/resources/health/client/Client");
14
14
  const Client_8 = require("./api/resources/providers/client/Client");
15
+ const Client_9 = require("./api/resources/runs/client/Client");
16
+ const Client_10 = require("./api/resources/tag/client/Client");
15
17
  class LettaClient {
16
18
  constructor(_options = {}) {
17
19
  this._options = _options;
@@ -48,5 +50,13 @@ class LettaClient {
48
50
  var _a;
49
51
  return ((_a = this._providers) !== null && _a !== void 0 ? _a : (this._providers = new Client_8.Providers(this._options)));
50
52
  }
53
+ get runs() {
54
+ var _a;
55
+ return ((_a = this._runs) !== null && _a !== void 0 ? _a : (this._runs = new Client_9.Runs(this._options)));
56
+ }
57
+ get tag() {
58
+ var _a;
59
+ return ((_a = this._tag) !== null && _a !== void 0 ? _a : (this._tag = new Client_10.Tag(this._options)));
60
+ }
51
61
  }
52
62
  exports.LettaClient = LettaClient;
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.ConflictError = void 0;
30
40
  const errors = __importStar(require("../../errors/index"));
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.InternalServerError = void 0;
30
40
  const errors = __importStar(require("../../errors/index"));
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.NotFoundError = void 0;
30
40
  const errors = __importStar(require("../../errors/index"));
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.UnprocessableEntityError = void 0;
30
40
  const errors = __importStar(require("../../errors/index"));
@@ -16,6 +16,8 @@ import { MemoryVariables } from "../resources/memoryVariables/client/Client";
16
16
  export declare namespace Agents {
17
17
  interface Options {
18
18
  environment?: core.Supplier<environments.LettaEnvironment | string>;
19
+ /** Specify a custom URL to connect the client to. */
20
+ baseUrl?: core.Supplier<string>;
19
21
  token?: core.Supplier<string | undefined>;
20
22
  fetcher?: core.FetchFunction;
21
23
  }
@@ -73,14 +75,9 @@ export declare class Agents {
73
75
  * @throws {@link Letta.UnprocessableEntityError}
74
76
  *
75
77
  * @example
76
- * await client.agents.create({
77
- * memoryBlocks: [{
78
- * value: "value",
79
- * label: "label"
80
- * }]
81
- * })
78
+ * await client.agents.create()
82
79
  */
83
- create(request: Letta.CreateAgentRequest, requestOptions?: Agents.RequestOptions): Promise<Letta.AgentState>;
80
+ create(request?: Letta.CreateAgentRequest, requestOptions?: Agents.RequestOptions): Promise<Letta.AgentState>;
84
81
  /**
85
82
  * Get the state of the agent.
86
83
  *
@@ -118,6 +115,19 @@ export declare class Agents {
118
115
  * await client.agents.update("agent_id")
119
116
  */
120
117
  update(agentId: string, request?: Letta.UpdateAgent, requestOptions?: Agents.RequestOptions): Promise<Letta.AgentState>;
118
+ /**
119
+ * Resets the messages for an agent
120
+ *
121
+ * @param {string} agentId
122
+ * @param {Letta.ResetMessagesRequest} request
123
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
124
+ *
125
+ * @throws {@link Letta.UnprocessableEntityError}
126
+ *
127
+ * @example
128
+ * await client.agents.resetMessages("agent_id")
129
+ */
130
+ resetMessages(agentId: string, request?: Letta.ResetMessagesRequest, requestOptions?: Agents.RequestOptions): Promise<Letta.AgentState>;
121
131
  /**
122
132
  * <Note>This endpoint is only available on Letta Cloud.</Note>
123
133
  *
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
39
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
40
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -106,9 +116,9 @@ class Agents {
106
116
  * @example
107
117
  * await client.agents.list()
108
118
  */
109
- list(request = {}, requestOptions) {
110
- var _a, _b;
111
- return __awaiter(this, void 0, void 0, function* () {
119
+ list() {
120
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
121
+ var _a, _b, _c;
112
122
  const { name, tags, matchAllTags, cursor, limit } = request;
113
123
  const _queryParams = {};
114
124
  if (name != null) {
@@ -132,9 +142,9 @@ class Agents {
132
142
  _queryParams["limit"] = limit.toString();
133
143
  }
134
144
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
135
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/agents/"),
145
+ 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/"),
136
146
  method: "GET",
137
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
147
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.9", "User-Agent": "@letta-ai/letta-client/0.1.9", "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),
138
148
  contentType: "application/json",
139
149
  queryParameters: _queryParams,
140
150
  requestType: "json",
@@ -192,20 +202,15 @@ class Agents {
192
202
  * @throws {@link Letta.UnprocessableEntityError}
193
203
  *
194
204
  * @example
195
- * await client.agents.create({
196
- * memoryBlocks: [{
197
- * value: "value",
198
- * label: "label"
199
- * }]
200
- * })
205
+ * await client.agents.create()
201
206
  */
202
- create(request, requestOptions) {
203
- var _a, _b;
204
- return __awaiter(this, void 0, void 0, function* () {
207
+ create() {
208
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
209
+ var _a, _b, _c;
205
210
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
206
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/agents/"),
211
+ 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/"),
207
212
  method: "POST",
208
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
213
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.9", "User-Agent": "@letta-ai/letta-client/0.1.9", "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),
209
214
  contentType: "application/json",
210
215
  requestType: "json",
211
216
  body: serializers.CreateAgentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -266,12 +271,12 @@ class Agents {
266
271
  * await client.agents.get("agent_id")
267
272
  */
268
273
  get(agentId, requestOptions) {
269
- var _a, _b;
270
274
  return __awaiter(this, void 0, void 0, function* () {
275
+ var _a, _b, _c;
271
276
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
272
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
277
+ 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)}`),
273
278
  method: "GET",
274
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
279
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.9", "User-Agent": "@letta-ai/letta-client/0.1.9", "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),
275
280
  contentType: "application/json",
276
281
  requestType: "json",
277
282
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -331,12 +336,12 @@ class Agents {
331
336
  * await client.agents.delete("agent_id")
332
337
  */
333
338
  delete(agentId, requestOptions) {
334
- var _a, _b;
335
339
  return __awaiter(this, void 0, void 0, function* () {
340
+ var _a, _b, _c;
336
341
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
337
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
342
+ 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)}`),
338
343
  method: "DELETE",
339
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
344
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.9", "User-Agent": "@letta-ai/letta-client/0.1.9", "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),
340
345
  contentType: "application/json",
341
346
  requestType: "json",
342
347
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -390,13 +395,13 @@ class Agents {
390
395
  * @example
391
396
  * await client.agents.update("agent_id")
392
397
  */
393
- update(agentId, request = {}, requestOptions) {
394
- var _a, _b;
395
- return __awaiter(this, void 0, void 0, function* () {
398
+ update(agentId_1) {
399
+ return __awaiter(this, arguments, void 0, function* (agentId, request = {}, requestOptions) {
400
+ var _a, _b, _c;
396
401
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
397
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
402
+ 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)}`),
398
403
  method: "PATCH",
399
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
404
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.9", "User-Agent": "@letta-ai/letta-client/0.1.9", "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),
400
405
  contentType: "application/json",
401
406
  requestType: "json",
402
407
  body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -445,6 +450,78 @@ class Agents {
445
450
  }
446
451
  });
447
452
  }
453
+ /**
454
+ * Resets the messages for an agent
455
+ *
456
+ * @param {string} agentId
457
+ * @param {Letta.ResetMessagesRequest} request
458
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
459
+ *
460
+ * @throws {@link Letta.UnprocessableEntityError}
461
+ *
462
+ * @example
463
+ * await client.agents.resetMessages("agent_id")
464
+ */
465
+ resetMessages(agentId_1) {
466
+ return __awaiter(this, arguments, void 0, function* (agentId, request = {}, requestOptions) {
467
+ var _a, _b, _c;
468
+ const { addDefaultInitialMessages } = request;
469
+ const _queryParams = {};
470
+ if (addDefaultInitialMessages != null) {
471
+ _queryParams["add_default_initial_messages"] = addDefaultInitialMessages.toString();
472
+ }
473
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
474
+ 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`),
475
+ method: "PATCH",
476
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.9", "User-Agent": "@letta-ai/letta-client/0.1.9", "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),
477
+ contentType: "application/json",
478
+ queryParameters: _queryParams,
479
+ requestType: "json",
480
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
481
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
482
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
483
+ });
484
+ if (_response.ok) {
485
+ return serializers.AgentState.parseOrThrow(_response.body, {
486
+ unrecognizedObjectKeys: "passthrough",
487
+ allowUnrecognizedUnionMembers: true,
488
+ allowUnrecognizedEnumValues: true,
489
+ skipValidation: true,
490
+ breadcrumbsPrefix: ["response"],
491
+ });
492
+ }
493
+ if (_response.error.reason === "status-code") {
494
+ switch (_response.error.statusCode) {
495
+ case 422:
496
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
497
+ unrecognizedObjectKeys: "passthrough",
498
+ allowUnrecognizedUnionMembers: true,
499
+ allowUnrecognizedEnumValues: true,
500
+ skipValidation: true,
501
+ breadcrumbsPrefix: ["response"],
502
+ }));
503
+ default:
504
+ throw new errors.LettaError({
505
+ statusCode: _response.error.statusCode,
506
+ body: _response.error.body,
507
+ });
508
+ }
509
+ }
510
+ switch (_response.error.reason) {
511
+ case "non-json":
512
+ throw new errors.LettaError({
513
+ statusCode: _response.error.statusCode,
514
+ body: _response.error.rawBody,
515
+ });
516
+ case "timeout":
517
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/agents/{agent_id}/reset-messages.");
518
+ case "unknown":
519
+ throw new errors.LettaError({
520
+ message: _response.error.errorMessage,
521
+ });
522
+ }
523
+ });
524
+ }
448
525
  /**
449
526
  * <Note>This endpoint is only available on Letta Cloud.</Note>
450
527
  *
@@ -456,13 +533,13 @@ class Agents {
456
533
  * @example
457
534
  * await client.agents.search()
458
535
  */
459
- search(request = {}, requestOptions) {
460
- var _a, _b;
461
- return __awaiter(this, void 0, void 0, function* () {
536
+ search() {
537
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
538
+ var _a, _b, _c;
462
539
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
463
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/agents/search"),
540
+ 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"),
464
541
  method: "POST",
465
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
542
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.9", "User-Agent": "@letta-ai/letta-client/0.1.9", "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),
466
543
  contentType: "application/json",
467
544
  requestType: "json",
468
545
  body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -4,18 +4,13 @@
4
4
  import * as Letta from "../../../../index";
5
5
  /**
6
6
  * @example
7
- * {
8
- * memoryBlocks: [{
9
- * value: "value",
10
- * label: "label"
11
- * }]
12
- * }
7
+ * {}
13
8
  */
14
9
  export interface CreateAgentRequest {
15
10
  /** The name of the agent. */
16
11
  name?: string;
17
12
  /** The blocks to create in the agent's in-context memory. */
18
- memoryBlocks: Letta.CreateBlock[];
13
+ memoryBlocks?: Letta.CreateBlock[];
19
14
  /** The tools used by the agent. */
20
15
  tools?: string[];
21
16
  /** The ids of the tools used by the agent. */
@@ -54,8 +49,10 @@ export interface CreateAgentRequest {
54
49
  embeddingChunkSize?: number;
55
50
  /** The template id used to configure the agent */
56
51
  fromTemplate?: string;
57
- /** The project id that the agent will be associated with. */
58
- projectId?: string;
52
+ /** Whether the agent is a template */
53
+ template?: boolean;
54
+ /** The project slug that the agent will be associated with. */
55
+ project?: string;
59
56
  /** The environment variables for tool execution specific to this agent. */
60
57
  toolExecEnvironmentVariables?: Record<string, string | undefined>;
61
58
  /** The variables that should be set for the agent. */
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface ResetMessagesRequest {
9
+ /**
10
+ * If true, adds the default initial messages after resetting.
11
+ */
12
+ addDefaultInitialMessages?: boolean;
13
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });