@letta-ai/letta-client 0.1.170 → 0.1.173

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 (384) hide show
  1. package/README.md +16 -3
  2. package/api/errors/BadRequestError.d.ts +2 -1
  3. package/api/errors/BadRequestError.js +2 -1
  4. package/api/errors/ConflictError.d.ts +2 -1
  5. package/api/errors/ConflictError.js +2 -1
  6. package/api/errors/InternalServerError.d.ts +2 -1
  7. package/api/errors/InternalServerError.js +2 -1
  8. package/api/errors/NotFoundError.d.ts +2 -1
  9. package/api/errors/NotFoundError.js +2 -1
  10. package/api/errors/PaymentRequiredError.d.ts +2 -1
  11. package/api/errors/PaymentRequiredError.js +2 -1
  12. package/api/errors/UnprocessableEntityError.d.ts +2 -1
  13. package/api/errors/UnprocessableEntityError.js +2 -1
  14. package/api/resources/agents/client/Client.d.ts +20 -10
  15. package/api/resources/agents/client/Client.js +166 -82
  16. package/api/resources/agents/client/requests/AgentsListRequest.d.ts +1 -1
  17. package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
  18. package/api/resources/agents/client/requests/UpdateAgent.d.ts +2 -0
  19. package/api/resources/agents/resources/blocks/client/Client.d.ts +10 -5
  20. package/api/resources/agents/resources/blocks/client/Client.js +90 -45
  21. package/api/resources/agents/resources/context/client/Client.d.ts +2 -1
  22. package/api/resources/agents/resources/context/client/Client.js +18 -9
  23. package/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -1
  24. package/api/resources/agents/resources/coreMemory/client/Client.js +18 -9
  25. package/api/resources/agents/resources/files/client/Client.d.ts +6 -3
  26. package/api/resources/agents/resources/files/client/Client.js +45 -21
  27. package/api/resources/agents/resources/folders/client/Client.d.ts +6 -3
  28. package/api/resources/agents/resources/folders/client/Client.js +54 -27
  29. package/api/resources/agents/resources/groups/client/Client.d.ts +2 -1
  30. package/api/resources/agents/resources/groups/client/Client.js +19 -10
  31. package/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -1
  32. package/api/resources/agents/resources/memoryVariables/client/Client.js +18 -9
  33. package/api/resources/agents/resources/messages/client/Client.d.ts +16 -8
  34. package/api/resources/agents/resources/messages/client/Client.js +155 -83
  35. package/api/resources/agents/resources/passages/client/Client.d.ts +8 -4
  36. package/api/resources/agents/resources/passages/client/Client.js +64 -31
  37. package/api/resources/agents/resources/passages/client/requests/PassageUpdate.d.ts +2 -2
  38. package/api/resources/agents/resources/sources/client/Client.d.ts +6 -3
  39. package/api/resources/agents/resources/sources/client/Client.js +54 -27
  40. package/api/resources/agents/resources/templates/client/Client.d.ts +6 -3
  41. package/api/resources/agents/resources/templates/client/Client.js +54 -27
  42. package/api/resources/agents/resources/tools/client/Client.d.ts +6 -3
  43. package/api/resources/agents/resources/tools/client/Client.js +54 -27
  44. package/api/resources/batches/client/Client.d.ts +8 -4
  45. package/api/resources/batches/client/Client.js +63 -30
  46. package/api/resources/blocks/client/Client.d.ts +12 -6
  47. package/api/resources/blocks/client/Client.js +100 -49
  48. package/api/resources/blocks/resources/agents/client/Client.d.ts +2 -1
  49. package/api/resources/blocks/resources/agents/client/Client.js +19 -10
  50. package/api/resources/clientSideAccessTokens/client/Client.d.ts +6 -3
  51. package/api/resources/clientSideAccessTokens/client/Client.js +46 -22
  52. package/api/resources/embeddingModels/client/Client.d.ts +2 -1
  53. package/api/resources/embeddingModels/client/Client.js +18 -9
  54. package/api/resources/folders/client/Client.d.ts +18 -9
  55. package/api/resources/folders/client/Client.js +154 -76
  56. package/api/resources/folders/resources/files/client/Client.d.ts +6 -3
  57. package/api/resources/folders/resources/files/client/Client.js +48 -24
  58. package/api/resources/folders/resources/passages/client/Client.d.ts +2 -1
  59. package/api/resources/folders/resources/passages/client/Client.js +19 -10
  60. package/api/resources/groups/client/Client.d.ts +12 -6
  61. package/api/resources/groups/client/Client.js +105 -52
  62. package/api/resources/groups/resources/messages/client/Client.d.ts +10 -5
  63. package/api/resources/groups/resources/messages/client/Client.js +91 -49
  64. package/api/resources/health/client/Client.d.ts +2 -1
  65. package/api/resources/health/client/Client.js +17 -8
  66. package/api/resources/identities/client/Client.d.ts +14 -7
  67. package/api/resources/identities/client/Client.js +123 -61
  68. package/api/resources/identities/resources/properties/client/Client.d.ts +2 -1
  69. package/api/resources/identities/resources/properties/client/Client.js +9 -3
  70. package/api/resources/jobs/client/Client.d.ts +10 -5
  71. package/api/resources/jobs/client/Client.js +92 -47
  72. package/api/resources/messages/client/Client.d.ts +2 -1
  73. package/api/resources/messages/client/Client.js +19 -10
  74. package/api/resources/models/client/Client.d.ts +2 -1
  75. package/api/resources/models/client/Client.js +27 -14
  76. package/api/resources/projects/client/Client.d.ts +2 -1
  77. package/api/resources/projects/client/Client.js +18 -9
  78. package/api/resources/providers/client/Client.d.ts +10 -5
  79. package/api/resources/providers/client/Client.js +77 -36
  80. package/api/resources/runs/client/Client.d.ts +8 -4
  81. package/api/resources/runs/client/Client.js +74 -38
  82. package/api/resources/runs/resources/messages/client/Client.d.ts +2 -1
  83. package/api/resources/runs/resources/messages/client/Client.js +21 -12
  84. package/api/resources/runs/resources/steps/client/Client.d.ts +2 -1
  85. package/api/resources/runs/resources/steps/client/Client.js +19 -10
  86. package/api/resources/runs/resources/usage/client/Client.d.ts +2 -1
  87. package/api/resources/runs/resources/usage/client/Client.js +18 -9
  88. package/api/resources/sources/client/Client.d.ts +20 -10
  89. package/api/resources/sources/client/Client.js +173 -86
  90. package/api/resources/sources/resources/files/client/Client.d.ts +6 -3
  91. package/api/resources/sources/resources/files/client/Client.js +48 -24
  92. package/api/resources/sources/resources/passages/client/Client.d.ts +2 -1
  93. package/api/resources/sources/resources/passages/client/Client.js +19 -10
  94. package/api/resources/steps/client/Client.d.ts +4 -2
  95. package/api/resources/steps/client/Client.js +41 -21
  96. package/api/resources/steps/resources/feedback/client/Client.d.ts +2 -1
  97. package/api/resources/steps/resources/feedback/client/Client.js +23 -12
  98. package/api/resources/tags/client/Client.d.ts +2 -1
  99. package/api/resources/tags/client/Client.js +19 -10
  100. package/api/resources/telemetry/client/Client.d.ts +2 -1
  101. package/api/resources/telemetry/client/Client.js +18 -9
  102. package/api/resources/templates/client/Client.d.ts +2 -1
  103. package/api/resources/templates/client/Client.js +18 -9
  104. package/api/resources/templates/resources/agents/client/Client.d.ts +2 -1
  105. package/api/resources/templates/resources/agents/client/Client.js +19 -10
  106. package/api/resources/tools/client/Client.d.ts +40 -20
  107. package/api/resources/tools/client/Client.js +356 -182
  108. package/api/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -0
  109. package/api/resources/tools/client/requests/ToolUpdate.d.ts +2 -0
  110. package/api/resources/voice/client/Client.d.ts +2 -1
  111. package/api/resources/voice/client/Client.js +9 -3
  112. package/api/types/AgentState.d.ts +2 -0
  113. package/api/types/EmbeddingConfig.d.ts +1 -11
  114. package/api/types/LettaStreamingRequest.d.ts +2 -0
  115. package/api/types/LlmConfig.d.ts +1 -11
  116. package/api/types/ModalSandboxConfig.d.ts +4 -0
  117. package/api/types/ModalSandboxConfigLanguage.d.ts +8 -0
  118. package/api/types/ModalSandboxConfigLanguage.js +10 -0
  119. package/api/types/NpmRequirement.d.ts +9 -0
  120. package/api/types/NpmRequirement.js +5 -0
  121. package/api/types/Passage.d.ts +4 -4
  122. package/api/types/Tool.d.ts +2 -0
  123. package/api/types/ToolCreate.d.ts +2 -0
  124. package/api/types/ToolType.d.ts +2 -1
  125. package/api/types/ToolType.js +1 -0
  126. package/api/types/index.d.ts +2 -0
  127. package/api/types/index.js +2 -0
  128. package/core/fetcher/APIResponse.d.ts +10 -0
  129. package/core/fetcher/Fetcher.d.ts +1 -1
  130. package/core/fetcher/Fetcher.js +11 -3
  131. package/core/fetcher/Headers.d.ts +2 -0
  132. package/core/fetcher/Headers.js +84 -0
  133. package/core/fetcher/HttpResponsePromise.d.ts +58 -0
  134. package/core/fetcher/HttpResponsePromise.js +103 -0
  135. package/core/fetcher/RawResponse.d.ts +29 -0
  136. package/core/fetcher/RawResponse.js +44 -0
  137. package/core/fetcher/createRequestUrl.d.ts +1 -1
  138. package/core/fetcher/getRequestBody.js +2 -1
  139. package/core/fetcher/index.d.ts +3 -0
  140. package/core/fetcher/index.js +7 -1
  141. package/core/fetcher/requestWithRetries.js +1 -1
  142. package/core/form-data-utils/FormDataWrapper.d.ts +3 -0
  143. package/core/form-data-utils/FormDataWrapper.js +53 -10
  144. package/core/form-data-utils/encodeAsFormParameter.d.ts +4 -0
  145. package/core/form-data-utils/encodeAsFormParameter.js +18 -0
  146. package/core/form-data-utils/index.d.ts +1 -0
  147. package/core/form-data-utils/index.js +3 -0
  148. package/core/json.d.ts +15 -0
  149. package/core/json.js +24 -0
  150. package/core/schemas/Schema.d.ts +2 -0
  151. package/core/schemas/Schema.js +2 -0
  152. package/core/schemas/builders/bigint/bigint.d.ts +1 -1
  153. package/core/schemas/builders/bigint/bigint.js +21 -17
  154. package/core/schemas/builders/object/object.js +1 -0
  155. package/core/schemas/builders/record/record.js +1 -2
  156. package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
  157. package/core/schemas/builders/schema-utils/getSchemaUtils.js +64 -0
  158. package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +1 -1
  159. package/dist/api/errors/BadRequestError.d.ts +2 -1
  160. package/dist/api/errors/BadRequestError.js +2 -1
  161. package/dist/api/errors/ConflictError.d.ts +2 -1
  162. package/dist/api/errors/ConflictError.js +2 -1
  163. package/dist/api/errors/InternalServerError.d.ts +2 -1
  164. package/dist/api/errors/InternalServerError.js +2 -1
  165. package/dist/api/errors/NotFoundError.d.ts +2 -1
  166. package/dist/api/errors/NotFoundError.js +2 -1
  167. package/dist/api/errors/PaymentRequiredError.d.ts +2 -1
  168. package/dist/api/errors/PaymentRequiredError.js +2 -1
  169. package/dist/api/errors/UnprocessableEntityError.d.ts +2 -1
  170. package/dist/api/errors/UnprocessableEntityError.js +2 -1
  171. package/dist/api/resources/agents/client/Client.d.ts +20 -10
  172. package/dist/api/resources/agents/client/Client.js +166 -82
  173. package/dist/api/resources/agents/client/requests/AgentsListRequest.d.ts +1 -1
  174. package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
  175. package/dist/api/resources/agents/client/requests/UpdateAgent.d.ts +2 -0
  176. package/dist/api/resources/agents/resources/blocks/client/Client.d.ts +10 -5
  177. package/dist/api/resources/agents/resources/blocks/client/Client.js +90 -45
  178. package/dist/api/resources/agents/resources/context/client/Client.d.ts +2 -1
  179. package/dist/api/resources/agents/resources/context/client/Client.js +18 -9
  180. package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -1
  181. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +18 -9
  182. package/dist/api/resources/agents/resources/files/client/Client.d.ts +6 -3
  183. package/dist/api/resources/agents/resources/files/client/Client.js +45 -21
  184. package/dist/api/resources/agents/resources/folders/client/Client.d.ts +6 -3
  185. package/dist/api/resources/agents/resources/folders/client/Client.js +54 -27
  186. package/dist/api/resources/agents/resources/groups/client/Client.d.ts +2 -1
  187. package/dist/api/resources/agents/resources/groups/client/Client.js +19 -10
  188. package/dist/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -1
  189. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +18 -9
  190. package/dist/api/resources/agents/resources/messages/client/Client.d.ts +16 -8
  191. package/dist/api/resources/agents/resources/messages/client/Client.js +155 -83
  192. package/dist/api/resources/agents/resources/passages/client/Client.d.ts +8 -4
  193. package/dist/api/resources/agents/resources/passages/client/Client.js +64 -31
  194. package/dist/api/resources/agents/resources/passages/client/requests/PassageUpdate.d.ts +2 -2
  195. package/dist/api/resources/agents/resources/sources/client/Client.d.ts +6 -3
  196. package/dist/api/resources/agents/resources/sources/client/Client.js +54 -27
  197. package/dist/api/resources/agents/resources/templates/client/Client.d.ts +6 -3
  198. package/dist/api/resources/agents/resources/templates/client/Client.js +54 -27
  199. package/dist/api/resources/agents/resources/tools/client/Client.d.ts +6 -3
  200. package/dist/api/resources/agents/resources/tools/client/Client.js +54 -27
  201. package/dist/api/resources/batches/client/Client.d.ts +8 -4
  202. package/dist/api/resources/batches/client/Client.js +63 -30
  203. package/dist/api/resources/blocks/client/Client.d.ts +12 -6
  204. package/dist/api/resources/blocks/client/Client.js +100 -49
  205. package/dist/api/resources/blocks/resources/agents/client/Client.d.ts +2 -1
  206. package/dist/api/resources/blocks/resources/agents/client/Client.js +19 -10
  207. package/dist/api/resources/clientSideAccessTokens/client/Client.d.ts +6 -3
  208. package/dist/api/resources/clientSideAccessTokens/client/Client.js +46 -22
  209. package/dist/api/resources/embeddingModels/client/Client.d.ts +2 -1
  210. package/dist/api/resources/embeddingModels/client/Client.js +18 -9
  211. package/dist/api/resources/folders/client/Client.d.ts +18 -9
  212. package/dist/api/resources/folders/client/Client.js +154 -76
  213. package/dist/api/resources/folders/resources/files/client/Client.d.ts +6 -3
  214. package/dist/api/resources/folders/resources/files/client/Client.js +48 -24
  215. package/dist/api/resources/folders/resources/passages/client/Client.d.ts +2 -1
  216. package/dist/api/resources/folders/resources/passages/client/Client.js +19 -10
  217. package/dist/api/resources/groups/client/Client.d.ts +12 -6
  218. package/dist/api/resources/groups/client/Client.js +105 -52
  219. package/dist/api/resources/groups/resources/messages/client/Client.d.ts +10 -5
  220. package/dist/api/resources/groups/resources/messages/client/Client.js +91 -49
  221. package/dist/api/resources/health/client/Client.d.ts +2 -1
  222. package/dist/api/resources/health/client/Client.js +17 -8
  223. package/dist/api/resources/identities/client/Client.d.ts +14 -7
  224. package/dist/api/resources/identities/client/Client.js +123 -61
  225. package/dist/api/resources/identities/resources/properties/client/Client.d.ts +2 -1
  226. package/dist/api/resources/identities/resources/properties/client/Client.js +9 -3
  227. package/dist/api/resources/jobs/client/Client.d.ts +10 -5
  228. package/dist/api/resources/jobs/client/Client.js +92 -47
  229. package/dist/api/resources/messages/client/Client.d.ts +2 -1
  230. package/dist/api/resources/messages/client/Client.js +19 -10
  231. package/dist/api/resources/models/client/Client.d.ts +2 -1
  232. package/dist/api/resources/models/client/Client.js +27 -14
  233. package/dist/api/resources/projects/client/Client.d.ts +2 -1
  234. package/dist/api/resources/projects/client/Client.js +18 -9
  235. package/dist/api/resources/providers/client/Client.d.ts +10 -5
  236. package/dist/api/resources/providers/client/Client.js +77 -36
  237. package/dist/api/resources/runs/client/Client.d.ts +8 -4
  238. package/dist/api/resources/runs/client/Client.js +74 -38
  239. package/dist/api/resources/runs/resources/messages/client/Client.d.ts +2 -1
  240. package/dist/api/resources/runs/resources/messages/client/Client.js +21 -12
  241. package/dist/api/resources/runs/resources/steps/client/Client.d.ts +2 -1
  242. package/dist/api/resources/runs/resources/steps/client/Client.js +19 -10
  243. package/dist/api/resources/runs/resources/usage/client/Client.d.ts +2 -1
  244. package/dist/api/resources/runs/resources/usage/client/Client.js +18 -9
  245. package/dist/api/resources/sources/client/Client.d.ts +20 -10
  246. package/dist/api/resources/sources/client/Client.js +173 -86
  247. package/dist/api/resources/sources/resources/files/client/Client.d.ts +6 -3
  248. package/dist/api/resources/sources/resources/files/client/Client.js +48 -24
  249. package/dist/api/resources/sources/resources/passages/client/Client.d.ts +2 -1
  250. package/dist/api/resources/sources/resources/passages/client/Client.js +19 -10
  251. package/dist/api/resources/steps/client/Client.d.ts +4 -2
  252. package/dist/api/resources/steps/client/Client.js +41 -21
  253. package/dist/api/resources/steps/resources/feedback/client/Client.d.ts +2 -1
  254. package/dist/api/resources/steps/resources/feedback/client/Client.js +23 -12
  255. package/dist/api/resources/tags/client/Client.d.ts +2 -1
  256. package/dist/api/resources/tags/client/Client.js +19 -10
  257. package/dist/api/resources/telemetry/client/Client.d.ts +2 -1
  258. package/dist/api/resources/telemetry/client/Client.js +18 -9
  259. package/dist/api/resources/templates/client/Client.d.ts +2 -1
  260. package/dist/api/resources/templates/client/Client.js +18 -9
  261. package/dist/api/resources/templates/resources/agents/client/Client.d.ts +2 -1
  262. package/dist/api/resources/templates/resources/agents/client/Client.js +19 -10
  263. package/dist/api/resources/tools/client/Client.d.ts +40 -20
  264. package/dist/api/resources/tools/client/Client.js +356 -182
  265. package/dist/api/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -0
  266. package/dist/api/resources/tools/client/requests/ToolUpdate.d.ts +2 -0
  267. package/dist/api/resources/voice/client/Client.d.ts +2 -1
  268. package/dist/api/resources/voice/client/Client.js +9 -3
  269. package/dist/api/types/AgentState.d.ts +2 -0
  270. package/dist/api/types/EmbeddingConfig.d.ts +1 -11
  271. package/dist/api/types/LettaStreamingRequest.d.ts +2 -0
  272. package/dist/api/types/LlmConfig.d.ts +1 -11
  273. package/dist/api/types/ModalSandboxConfig.d.ts +4 -0
  274. package/dist/api/types/ModalSandboxConfigLanguage.d.ts +8 -0
  275. package/dist/api/types/ModalSandboxConfigLanguage.js +10 -0
  276. package/dist/api/types/NpmRequirement.d.ts +9 -0
  277. package/dist/api/types/NpmRequirement.js +5 -0
  278. package/dist/api/types/Passage.d.ts +4 -4
  279. package/dist/api/types/Tool.d.ts +2 -0
  280. package/dist/api/types/ToolCreate.d.ts +2 -0
  281. package/dist/api/types/ToolType.d.ts +2 -1
  282. package/dist/api/types/ToolType.js +1 -0
  283. package/dist/api/types/index.d.ts +2 -0
  284. package/dist/api/types/index.js +2 -0
  285. package/dist/core/fetcher/APIResponse.d.ts +10 -0
  286. package/dist/core/fetcher/Fetcher.d.ts +1 -1
  287. package/dist/core/fetcher/Fetcher.js +11 -3
  288. package/dist/core/fetcher/Headers.d.ts +2 -0
  289. package/dist/core/fetcher/Headers.js +84 -0
  290. package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
  291. package/dist/core/fetcher/HttpResponsePromise.js +103 -0
  292. package/dist/core/fetcher/RawResponse.d.ts +29 -0
  293. package/dist/core/fetcher/RawResponse.js +44 -0
  294. package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
  295. package/dist/core/fetcher/getRequestBody.js +2 -1
  296. package/dist/core/fetcher/index.d.ts +3 -0
  297. package/dist/core/fetcher/index.js +7 -1
  298. package/dist/core/fetcher/requestWithRetries.js +1 -1
  299. package/dist/core/form-data-utils/FormDataWrapper.d.ts +3 -0
  300. package/dist/core/form-data-utils/FormDataWrapper.js +53 -10
  301. package/dist/core/form-data-utils/encodeAsFormParameter.d.ts +4 -0
  302. package/dist/core/form-data-utils/encodeAsFormParameter.js +18 -0
  303. package/dist/core/form-data-utils/index.d.ts +1 -0
  304. package/dist/core/form-data-utils/index.js +3 -0
  305. package/dist/core/json.d.ts +15 -0
  306. package/dist/core/json.js +24 -0
  307. package/dist/core/schemas/Schema.d.ts +2 -0
  308. package/dist/core/schemas/Schema.js +2 -0
  309. package/dist/core/schemas/builders/bigint/bigint.d.ts +1 -1
  310. package/dist/core/schemas/builders/bigint/bigint.js +21 -17
  311. package/dist/core/schemas/builders/object/object.js +1 -0
  312. package/dist/core/schemas/builders/record/record.js +1 -2
  313. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
  314. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +64 -0
  315. package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +1 -1
  316. package/dist/errors/LettaError.d.ts +4 -1
  317. package/dist/errors/LettaError.js +6 -8
  318. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -0
  319. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -0
  320. package/dist/serialization/resources/agents/client/requests/UpdateAgent.d.ts +1 -0
  321. package/dist/serialization/resources/agents/client/requests/UpdateAgent.js +1 -0
  322. package/dist/serialization/resources/agents/resources/passages/client/requests/PassageUpdate.d.ts +1 -1
  323. package/dist/serialization/resources/agents/resources/passages/client/requests/PassageUpdate.js +1 -1
  324. package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -0
  325. package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.js +2 -0
  326. package/dist/serialization/resources/tools/client/requests/ToolUpdate.d.ts +2 -0
  327. package/dist/serialization/resources/tools/client/requests/ToolUpdate.js +2 -0
  328. package/dist/serialization/types/AgentState.d.ts +1 -0
  329. package/dist/serialization/types/AgentState.js +1 -0
  330. package/dist/serialization/types/LettaStreamingRequest.d.ts +1 -0
  331. package/dist/serialization/types/LettaStreamingRequest.js +1 -0
  332. package/dist/serialization/types/ModalSandboxConfig.d.ts +3 -0
  333. package/dist/serialization/types/ModalSandboxConfig.js +3 -0
  334. package/dist/serialization/types/ModalSandboxConfigLanguage.d.ts +10 -0
  335. package/dist/serialization/types/ModalSandboxConfigLanguage.js +41 -0
  336. package/dist/serialization/types/NpmRequirement.d.ts +13 -0
  337. package/dist/serialization/types/NpmRequirement.js +44 -0
  338. package/dist/serialization/types/Passage.d.ts +1 -1
  339. package/dist/serialization/types/Passage.js +1 -1
  340. package/dist/serialization/types/Tool.d.ts +2 -0
  341. package/dist/serialization/types/Tool.js +2 -0
  342. package/dist/serialization/types/ToolCreate.d.ts +2 -0
  343. package/dist/serialization/types/ToolCreate.js +2 -0
  344. package/dist/serialization/types/ToolType.d.ts +1 -1
  345. package/dist/serialization/types/ToolType.js +1 -0
  346. package/dist/serialization/types/index.d.ts +2 -0
  347. package/dist/serialization/types/index.js +2 -0
  348. package/dist/version.d.ts +1 -1
  349. package/dist/version.js +1 -1
  350. package/errors/LettaError.d.ts +4 -1
  351. package/errors/LettaError.js +6 -8
  352. package/package.json +4 -4
  353. package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -0
  354. package/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -0
  355. package/serialization/resources/agents/client/requests/UpdateAgent.d.ts +1 -0
  356. package/serialization/resources/agents/client/requests/UpdateAgent.js +1 -0
  357. package/serialization/resources/agents/resources/passages/client/requests/PassageUpdate.d.ts +1 -1
  358. package/serialization/resources/agents/resources/passages/client/requests/PassageUpdate.js +1 -1
  359. package/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -0
  360. package/serialization/resources/tools/client/requests/ToolRunFromSource.js +2 -0
  361. package/serialization/resources/tools/client/requests/ToolUpdate.d.ts +2 -0
  362. package/serialization/resources/tools/client/requests/ToolUpdate.js +2 -0
  363. package/serialization/types/AgentState.d.ts +1 -0
  364. package/serialization/types/AgentState.js +1 -0
  365. package/serialization/types/LettaStreamingRequest.d.ts +1 -0
  366. package/serialization/types/LettaStreamingRequest.js +1 -0
  367. package/serialization/types/ModalSandboxConfig.d.ts +3 -0
  368. package/serialization/types/ModalSandboxConfig.js +3 -0
  369. package/serialization/types/ModalSandboxConfigLanguage.d.ts +10 -0
  370. package/serialization/types/ModalSandboxConfigLanguage.js +41 -0
  371. package/serialization/types/NpmRequirement.d.ts +13 -0
  372. package/serialization/types/NpmRequirement.js +44 -0
  373. package/serialization/types/Passage.d.ts +1 -1
  374. package/serialization/types/Passage.js +1 -1
  375. package/serialization/types/Tool.d.ts +2 -0
  376. package/serialization/types/Tool.js +2 -0
  377. package/serialization/types/ToolCreate.d.ts +2 -0
  378. package/serialization/types/ToolCreate.js +2 -0
  379. package/serialization/types/ToolType.d.ts +1 -1
  380. package/serialization/types/ToolType.js +1 -0
  381. package/serialization/types/index.d.ts +2 -0
  382. package/serialization/types/index.js +2 -0
  383. package/version.d.ts +1 -1
  384. package/version.js +1 -1
@@ -70,6 +70,9 @@ class Batches {
70
70
  * await client.batches.list()
71
71
  */
72
72
  list(requestOptions) {
73
+ return core.HttpResponsePromise.fromPromise(this.__list(requestOptions));
74
+ }
75
+ __list(requestOptions) {
73
76
  return __awaiter(this, void 0, void 0, function* () {
74
77
  var _a, _b, _c;
75
78
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
@@ -77,7 +80,7 @@ class Batches {
77
80
  method: "GET",
78
81
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
79
82
  ? yield core.Supplier.get(this._options.project)
80
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.170", "User-Agent": "@letta-ai/letta-client/0.1.170", "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),
83
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "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),
81
84
  contentType: "application/json",
82
85
  requestType: "json",
83
86
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -85,13 +88,16 @@ class Batches {
85
88
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
86
89
  });
87
90
  if (_response.ok) {
88
- return serializers.batches.list.Response.parseOrThrow(_response.body, {
89
- unrecognizedObjectKeys: "passthrough",
90
- allowUnrecognizedUnionMembers: true,
91
- allowUnrecognizedEnumValues: true,
92
- skipValidation: true,
93
- breadcrumbsPrefix: ["response"],
94
- });
91
+ return {
92
+ data: serializers.batches.list.Response.parseOrThrow(_response.body, {
93
+ unrecognizedObjectKeys: "passthrough",
94
+ allowUnrecognizedUnionMembers: true,
95
+ allowUnrecognizedEnumValues: true,
96
+ skipValidation: true,
97
+ breadcrumbsPrefix: ["response"],
98
+ }),
99
+ rawResponse: _response.rawResponse,
100
+ };
95
101
  }
96
102
  if (_response.error.reason === "status-code") {
97
103
  switch (_response.error.statusCode) {
@@ -102,11 +108,12 @@ class Batches {
102
108
  allowUnrecognizedEnumValues: true,
103
109
  skipValidation: true,
104
110
  breadcrumbsPrefix: ["response"],
105
- }));
111
+ }), _response.rawResponse);
106
112
  default:
107
113
  throw new errors.LettaError({
108
114
  statusCode: _response.error.statusCode,
109
115
  body: _response.error.body,
116
+ rawResponse: _response.rawResponse,
110
117
  });
111
118
  }
112
119
  }
@@ -115,12 +122,14 @@ class Batches {
115
122
  throw new errors.LettaError({
116
123
  statusCode: _response.error.statusCode,
117
124
  body: _response.error.rawBody,
125
+ rawResponse: _response.rawResponse,
118
126
  });
119
127
  case "timeout":
120
128
  throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/messages/batches.");
121
129
  case "unknown":
122
130
  throw new errors.LettaError({
123
131
  message: _response.error.errorMessage,
132
+ rawResponse: _response.rawResponse,
124
133
  });
125
134
  }
126
135
  });
@@ -149,6 +158,9 @@ class Batches {
149
158
  * })
150
159
  */
151
160
  create(request, requestOptions) {
161
+ return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
162
+ }
163
+ __create(request, requestOptions) {
152
164
  return __awaiter(this, void 0, void 0, function* () {
153
165
  var _a, _b, _c;
154
166
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
@@ -156,7 +168,7 @@ class Batches {
156
168
  method: "POST",
157
169
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
158
170
  ? yield core.Supplier.get(this._options.project)
159
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.170", "User-Agent": "@letta-ai/letta-client/0.1.170", "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),
171
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "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),
160
172
  contentType: "application/json",
161
173
  requestType: "json",
162
174
  body: serializers.CreateBatch.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -165,13 +177,16 @@ class Batches {
165
177
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
166
178
  });
167
179
  if (_response.ok) {
168
- return serializers.BatchJob.parseOrThrow(_response.body, {
169
- unrecognizedObjectKeys: "passthrough",
170
- allowUnrecognizedUnionMembers: true,
171
- allowUnrecognizedEnumValues: true,
172
- skipValidation: true,
173
- breadcrumbsPrefix: ["response"],
174
- });
180
+ return {
181
+ data: serializers.BatchJob.parseOrThrow(_response.body, {
182
+ unrecognizedObjectKeys: "passthrough",
183
+ allowUnrecognizedUnionMembers: true,
184
+ allowUnrecognizedEnumValues: true,
185
+ skipValidation: true,
186
+ breadcrumbsPrefix: ["response"],
187
+ }),
188
+ rawResponse: _response.rawResponse,
189
+ };
175
190
  }
176
191
  if (_response.error.reason === "status-code") {
177
192
  switch (_response.error.statusCode) {
@@ -182,11 +197,12 @@ class Batches {
182
197
  allowUnrecognizedEnumValues: true,
183
198
  skipValidation: true,
184
199
  breadcrumbsPrefix: ["response"],
185
- }));
200
+ }), _response.rawResponse);
186
201
  default:
187
202
  throw new errors.LettaError({
188
203
  statusCode: _response.error.statusCode,
189
204
  body: _response.error.body,
205
+ rawResponse: _response.rawResponse,
190
206
  });
191
207
  }
192
208
  }
@@ -195,12 +211,14 @@ class Batches {
195
211
  throw new errors.LettaError({
196
212
  statusCode: _response.error.statusCode,
197
213
  body: _response.error.rawBody,
214
+ rawResponse: _response.rawResponse,
198
215
  });
199
216
  case "timeout":
200
217
  throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/messages/batches.");
201
218
  case "unknown":
202
219
  throw new errors.LettaError({
203
220
  message: _response.error.errorMessage,
221
+ rawResponse: _response.rawResponse,
204
222
  });
205
223
  }
206
224
  });
@@ -217,6 +235,9 @@ class Batches {
217
235
  * await client.batches.retrieve("batch_id")
218
236
  */
219
237
  retrieve(batchId, requestOptions) {
238
+ return core.HttpResponsePromise.fromPromise(this.__retrieve(batchId, requestOptions));
239
+ }
240
+ __retrieve(batchId, requestOptions) {
220
241
  return __awaiter(this, void 0, void 0, function* () {
221
242
  var _a, _b, _c;
222
243
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
@@ -224,7 +245,7 @@ class Batches {
224
245
  method: "GET",
225
246
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
226
247
  ? yield core.Supplier.get(this._options.project)
227
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.170", "User-Agent": "@letta-ai/letta-client/0.1.170", "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),
248
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "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),
228
249
  contentType: "application/json",
229
250
  requestType: "json",
230
251
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -232,13 +253,16 @@ class Batches {
232
253
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
233
254
  });
234
255
  if (_response.ok) {
235
- return serializers.BatchJob.parseOrThrow(_response.body, {
236
- unrecognizedObjectKeys: "passthrough",
237
- allowUnrecognizedUnionMembers: true,
238
- allowUnrecognizedEnumValues: true,
239
- skipValidation: true,
240
- breadcrumbsPrefix: ["response"],
241
- });
256
+ return {
257
+ data: serializers.BatchJob.parseOrThrow(_response.body, {
258
+ unrecognizedObjectKeys: "passthrough",
259
+ allowUnrecognizedUnionMembers: true,
260
+ allowUnrecognizedEnumValues: true,
261
+ skipValidation: true,
262
+ breadcrumbsPrefix: ["response"],
263
+ }),
264
+ rawResponse: _response.rawResponse,
265
+ };
242
266
  }
243
267
  if (_response.error.reason === "status-code") {
244
268
  switch (_response.error.statusCode) {
@@ -249,11 +273,12 @@ class Batches {
249
273
  allowUnrecognizedEnumValues: true,
250
274
  skipValidation: true,
251
275
  breadcrumbsPrefix: ["response"],
252
- }));
276
+ }), _response.rawResponse);
253
277
  default:
254
278
  throw new errors.LettaError({
255
279
  statusCode: _response.error.statusCode,
256
280
  body: _response.error.body,
281
+ rawResponse: _response.rawResponse,
257
282
  });
258
283
  }
259
284
  }
@@ -262,12 +287,14 @@ class Batches {
262
287
  throw new errors.LettaError({
263
288
  statusCode: _response.error.statusCode,
264
289
  body: _response.error.rawBody,
290
+ rawResponse: _response.rawResponse,
265
291
  });
266
292
  case "timeout":
267
293
  throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/messages/batches/{batch_id}.");
268
294
  case "unknown":
269
295
  throw new errors.LettaError({
270
296
  message: _response.error.errorMessage,
297
+ rawResponse: _response.rawResponse,
271
298
  });
272
299
  }
273
300
  });
@@ -284,6 +311,9 @@ class Batches {
284
311
  * await client.batches.cancel("batch_id")
285
312
  */
286
313
  cancel(batchId, requestOptions) {
314
+ return core.HttpResponsePromise.fromPromise(this.__cancel(batchId, requestOptions));
315
+ }
316
+ __cancel(batchId, requestOptions) {
287
317
  return __awaiter(this, void 0, void 0, function* () {
288
318
  var _a, _b, _c;
289
319
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
@@ -291,7 +321,7 @@ class Batches {
291
321
  method: "PATCH",
292
322
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
293
323
  ? yield core.Supplier.get(this._options.project)
294
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.170", "User-Agent": "@letta-ai/letta-client/0.1.170", "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),
324
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "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),
295
325
  contentType: "application/json",
296
326
  requestType: "json",
297
327
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -299,7 +329,7 @@ class Batches {
299
329
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
300
330
  });
301
331
  if (_response.ok) {
302
- return _response.body;
332
+ return { data: _response.body, rawResponse: _response.rawResponse };
303
333
  }
304
334
  if (_response.error.reason === "status-code") {
305
335
  switch (_response.error.statusCode) {
@@ -310,11 +340,12 @@ class Batches {
310
340
  allowUnrecognizedEnumValues: true,
311
341
  skipValidation: true,
312
342
  breadcrumbsPrefix: ["response"],
313
- }));
343
+ }), _response.rawResponse);
314
344
  default:
315
345
  throw new errors.LettaError({
316
346
  statusCode: _response.error.statusCode,
317
347
  body: _response.error.body,
348
+ rawResponse: _response.rawResponse,
318
349
  });
319
350
  }
320
351
  }
@@ -323,12 +354,14 @@ class Batches {
323
354
  throw new errors.LettaError({
324
355
  statusCode: _response.error.statusCode,
325
356
  body: _response.error.rawBody,
357
+ rawResponse: _response.rawResponse,
326
358
  });
327
359
  case "timeout":
328
360
  throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/messages/batches/{batch_id}/cancel.");
329
361
  case "unknown":
330
362
  throw new errors.LettaError({
331
363
  message: _response.error.errorMessage,
364
+ rawResponse: _response.rawResponse,
332
365
  });
333
366
  }
334
367
  });
@@ -42,7 +42,8 @@ export declare class Blocks {
42
42
  * @example
43
43
  * await client.blocks.list()
44
44
  */
45
- list(request?: Letta.BlocksListRequest, requestOptions?: Blocks.RequestOptions): Promise<Letta.Block[]>;
45
+ list(request?: Letta.BlocksListRequest, requestOptions?: Blocks.RequestOptions): core.HttpResponsePromise<Letta.Block[]>;
46
+ private __list;
46
47
  /**
47
48
  * @param {Letta.CreateBlock} request
48
49
  * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
@@ -55,7 +56,8 @@ export declare class Blocks {
55
56
  * label: "label"
56
57
  * })
57
58
  */
58
- create(request: Letta.CreateBlock, requestOptions?: Blocks.RequestOptions): Promise<Letta.Block>;
59
+ create(request: Letta.CreateBlock, requestOptions?: Blocks.RequestOptions): core.HttpResponsePromise<Letta.Block>;
60
+ private __create;
59
61
  /**
60
62
  * Count all blocks created by a user.
61
63
  *
@@ -66,7 +68,8 @@ export declare class Blocks {
66
68
  * @example
67
69
  * await client.blocks.count()
68
70
  */
69
- count(requestOptions?: Blocks.RequestOptions): Promise<number>;
71
+ count(requestOptions?: Blocks.RequestOptions): core.HttpResponsePromise<number>;
72
+ private __count;
70
73
  /**
71
74
  * @param {string} blockId
72
75
  * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
@@ -76,7 +79,8 @@ export declare class Blocks {
76
79
  * @example
77
80
  * await client.blocks.retrieve("block_id")
78
81
  */
79
- retrieve(blockId: string, requestOptions?: Blocks.RequestOptions): Promise<Letta.Block>;
82
+ retrieve(blockId: string, requestOptions?: Blocks.RequestOptions): core.HttpResponsePromise<Letta.Block>;
83
+ private __retrieve;
80
84
  /**
81
85
  * @param {string} blockId
82
86
  * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
@@ -86,7 +90,8 @@ export declare class Blocks {
86
90
  * @example
87
91
  * await client.blocks.delete("block_id")
88
92
  */
89
- delete(blockId: string, requestOptions?: Blocks.RequestOptions): Promise<unknown>;
93
+ delete(blockId: string, requestOptions?: Blocks.RequestOptions): core.HttpResponsePromise<unknown>;
94
+ private __delete;
90
95
  /**
91
96
  * @param {string} blockId
92
97
  * @param {Letta.BlockUpdate} request
@@ -97,7 +102,8 @@ export declare class Blocks {
97
102
  * @example
98
103
  * await client.blocks.modify("block_id", {})
99
104
  */
100
- modify(blockId: string, request: Letta.BlockUpdate, requestOptions?: Blocks.RequestOptions): Promise<Letta.Block>;
105
+ modify(blockId: string, request: Letta.BlockUpdate, requestOptions?: Blocks.RequestOptions): core.HttpResponsePromise<Letta.Block>;
106
+ private __modify;
101
107
  protected _getCustomAuthorizationHeaders(): Promise<{
102
108
  Authorization: string;
103
109
  }>;