@letta-ai/letta-client 0.1.169 → 0.1.172

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 (330) 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/resources/blocks/client/Client.d.ts +10 -5
  17. package/api/resources/agents/resources/blocks/client/Client.js +90 -45
  18. package/api/resources/agents/resources/context/client/Client.d.ts +2 -1
  19. package/api/resources/agents/resources/context/client/Client.js +18 -9
  20. package/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -1
  21. package/api/resources/agents/resources/coreMemory/client/Client.js +18 -9
  22. package/api/resources/agents/resources/files/client/Client.d.ts +6 -3
  23. package/api/resources/agents/resources/files/client/Client.js +45 -21
  24. package/api/resources/agents/resources/folders/client/Client.d.ts +6 -3
  25. package/api/resources/agents/resources/folders/client/Client.js +54 -27
  26. package/api/resources/agents/resources/groups/client/Client.d.ts +2 -1
  27. package/api/resources/agents/resources/groups/client/Client.js +19 -10
  28. package/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -1
  29. package/api/resources/agents/resources/memoryVariables/client/Client.js +18 -9
  30. package/api/resources/agents/resources/messages/client/Client.d.ts +16 -8
  31. package/api/resources/agents/resources/messages/client/Client.js +155 -83
  32. package/api/resources/agents/resources/passages/client/Client.d.ts +8 -4
  33. package/api/resources/agents/resources/passages/client/Client.js +64 -31
  34. package/api/resources/agents/resources/sources/client/Client.d.ts +6 -3
  35. package/api/resources/agents/resources/sources/client/Client.js +54 -27
  36. package/api/resources/agents/resources/templates/client/Client.d.ts +6 -3
  37. package/api/resources/agents/resources/templates/client/Client.js +54 -27
  38. package/api/resources/agents/resources/tools/client/Client.d.ts +6 -3
  39. package/api/resources/agents/resources/tools/client/Client.js +54 -27
  40. package/api/resources/batches/client/Client.d.ts +8 -4
  41. package/api/resources/batches/client/Client.js +63 -30
  42. package/api/resources/blocks/client/Client.d.ts +12 -6
  43. package/api/resources/blocks/client/Client.js +100 -49
  44. package/api/resources/blocks/resources/agents/client/Client.d.ts +2 -1
  45. package/api/resources/blocks/resources/agents/client/Client.js +19 -10
  46. package/api/resources/clientSideAccessTokens/client/Client.d.ts +6 -3
  47. package/api/resources/clientSideAccessTokens/client/Client.js +46 -22
  48. package/api/resources/embeddingModels/client/Client.d.ts +2 -1
  49. package/api/resources/embeddingModels/client/Client.js +18 -9
  50. package/api/resources/folders/client/Client.d.ts +18 -9
  51. package/api/resources/folders/client/Client.js +154 -76
  52. package/api/resources/folders/resources/files/client/Client.d.ts +6 -3
  53. package/api/resources/folders/resources/files/client/Client.js +48 -24
  54. package/api/resources/folders/resources/passages/client/Client.d.ts +2 -1
  55. package/api/resources/folders/resources/passages/client/Client.js +19 -10
  56. package/api/resources/groups/client/Client.d.ts +12 -6
  57. package/api/resources/groups/client/Client.js +105 -52
  58. package/api/resources/groups/resources/messages/client/Client.d.ts +10 -5
  59. package/api/resources/groups/resources/messages/client/Client.js +91 -49
  60. package/api/resources/health/client/Client.d.ts +2 -1
  61. package/api/resources/health/client/Client.js +17 -8
  62. package/api/resources/identities/client/Client.d.ts +14 -7
  63. package/api/resources/identities/client/Client.js +123 -61
  64. package/api/resources/identities/resources/properties/client/Client.d.ts +2 -1
  65. package/api/resources/identities/resources/properties/client/Client.js +9 -3
  66. package/api/resources/jobs/client/Client.d.ts +10 -5
  67. package/api/resources/jobs/client/Client.js +92 -47
  68. package/api/resources/messages/client/Client.d.ts +2 -1
  69. package/api/resources/messages/client/Client.js +19 -10
  70. package/api/resources/models/client/Client.d.ts +2 -1
  71. package/api/resources/models/client/Client.js +27 -14
  72. package/api/resources/projects/client/Client.d.ts +2 -1
  73. package/api/resources/projects/client/Client.js +18 -9
  74. package/api/resources/providers/client/Client.d.ts +10 -5
  75. package/api/resources/providers/client/Client.js +77 -36
  76. package/api/resources/runs/client/Client.d.ts +8 -4
  77. package/api/resources/runs/client/Client.js +74 -38
  78. package/api/resources/runs/resources/messages/client/Client.d.ts +2 -1
  79. package/api/resources/runs/resources/messages/client/Client.js +21 -12
  80. package/api/resources/runs/resources/steps/client/Client.d.ts +2 -1
  81. package/api/resources/runs/resources/steps/client/Client.js +19 -10
  82. package/api/resources/runs/resources/usage/client/Client.d.ts +2 -1
  83. package/api/resources/runs/resources/usage/client/Client.js +18 -9
  84. package/api/resources/sources/client/Client.d.ts +20 -10
  85. package/api/resources/sources/client/Client.js +173 -86
  86. package/api/resources/sources/resources/files/client/Client.d.ts +6 -3
  87. package/api/resources/sources/resources/files/client/Client.js +48 -24
  88. package/api/resources/sources/resources/passages/client/Client.d.ts +2 -1
  89. package/api/resources/sources/resources/passages/client/Client.js +19 -10
  90. package/api/resources/steps/client/Client.d.ts +4 -2
  91. package/api/resources/steps/client/Client.js +41 -21
  92. package/api/resources/steps/resources/feedback/client/Client.d.ts +2 -1
  93. package/api/resources/steps/resources/feedback/client/Client.js +23 -12
  94. package/api/resources/tags/client/Client.d.ts +2 -1
  95. package/api/resources/tags/client/Client.js +19 -10
  96. package/api/resources/telemetry/client/Client.d.ts +2 -1
  97. package/api/resources/telemetry/client/Client.js +18 -9
  98. package/api/resources/templates/client/Client.d.ts +2 -1
  99. package/api/resources/templates/client/Client.js +18 -9
  100. package/api/resources/templates/resources/agents/client/Client.d.ts +2 -1
  101. package/api/resources/templates/resources/agents/client/Client.js +19 -10
  102. package/api/resources/tools/client/Client.d.ts +40 -20
  103. package/api/resources/tools/client/Client.js +356 -182
  104. package/api/resources/voice/client/Client.d.ts +2 -1
  105. package/api/resources/voice/client/Client.js +9 -3
  106. package/api/types/LettaStreamingRequest.d.ts +2 -0
  107. package/api/types/ModalSandboxConfig.d.ts +9 -0
  108. package/api/types/ModalSandboxConfig.js +5 -0
  109. package/api/types/SandboxConfigCreateConfig.d.ts +1 -1
  110. package/api/types/SandboxConfigUpdateConfig.d.ts +1 -1
  111. package/api/types/SandboxType.d.ts +2 -1
  112. package/api/types/SandboxType.js +1 -0
  113. package/api/types/ToolType.d.ts +1 -2
  114. package/api/types/ToolType.js +0 -1
  115. package/api/types/index.d.ts +1 -0
  116. package/api/types/index.js +1 -0
  117. package/core/fetcher/APIResponse.d.ts +10 -0
  118. package/core/fetcher/Fetcher.d.ts +1 -1
  119. package/core/fetcher/Fetcher.js +11 -3
  120. package/core/fetcher/Headers.d.ts +2 -0
  121. package/core/fetcher/Headers.js +84 -0
  122. package/core/fetcher/HttpResponsePromise.d.ts +58 -0
  123. package/core/fetcher/HttpResponsePromise.js +103 -0
  124. package/core/fetcher/RawResponse.d.ts +29 -0
  125. package/core/fetcher/RawResponse.js +44 -0
  126. package/core/fetcher/createRequestUrl.d.ts +1 -1
  127. package/core/fetcher/getRequestBody.js +2 -1
  128. package/core/fetcher/index.d.ts +3 -0
  129. package/core/fetcher/index.js +7 -1
  130. package/core/fetcher/requestWithRetries.js +1 -1
  131. package/core/form-data-utils/FormDataWrapper.d.ts +3 -0
  132. package/core/form-data-utils/FormDataWrapper.js +53 -10
  133. package/core/form-data-utils/encodeAsFormParameter.d.ts +4 -0
  134. package/core/form-data-utils/encodeAsFormParameter.js +18 -0
  135. package/core/form-data-utils/index.d.ts +1 -0
  136. package/core/form-data-utils/index.js +3 -0
  137. package/core/json.d.ts +15 -0
  138. package/core/json.js +24 -0
  139. package/core/schemas/Schema.d.ts +2 -0
  140. package/core/schemas/Schema.js +2 -0
  141. package/core/schemas/builders/bigint/bigint.d.ts +1 -1
  142. package/core/schemas/builders/bigint/bigint.js +21 -17
  143. package/core/schemas/builders/object/object.js +1 -0
  144. package/core/schemas/builders/record/record.js +1 -2
  145. package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
  146. package/core/schemas/builders/schema-utils/getSchemaUtils.js +64 -0
  147. package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +1 -1
  148. package/dist/api/errors/BadRequestError.d.ts +2 -1
  149. package/dist/api/errors/BadRequestError.js +2 -1
  150. package/dist/api/errors/ConflictError.d.ts +2 -1
  151. package/dist/api/errors/ConflictError.js +2 -1
  152. package/dist/api/errors/InternalServerError.d.ts +2 -1
  153. package/dist/api/errors/InternalServerError.js +2 -1
  154. package/dist/api/errors/NotFoundError.d.ts +2 -1
  155. package/dist/api/errors/NotFoundError.js +2 -1
  156. package/dist/api/errors/PaymentRequiredError.d.ts +2 -1
  157. package/dist/api/errors/PaymentRequiredError.js +2 -1
  158. package/dist/api/errors/UnprocessableEntityError.d.ts +2 -1
  159. package/dist/api/errors/UnprocessableEntityError.js +2 -1
  160. package/dist/api/resources/agents/client/Client.d.ts +20 -10
  161. package/dist/api/resources/agents/client/Client.js +166 -82
  162. package/dist/api/resources/agents/resources/blocks/client/Client.d.ts +10 -5
  163. package/dist/api/resources/agents/resources/blocks/client/Client.js +90 -45
  164. package/dist/api/resources/agents/resources/context/client/Client.d.ts +2 -1
  165. package/dist/api/resources/agents/resources/context/client/Client.js +18 -9
  166. package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -1
  167. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +18 -9
  168. package/dist/api/resources/agents/resources/files/client/Client.d.ts +6 -3
  169. package/dist/api/resources/agents/resources/files/client/Client.js +45 -21
  170. package/dist/api/resources/agents/resources/folders/client/Client.d.ts +6 -3
  171. package/dist/api/resources/agents/resources/folders/client/Client.js +54 -27
  172. package/dist/api/resources/agents/resources/groups/client/Client.d.ts +2 -1
  173. package/dist/api/resources/agents/resources/groups/client/Client.js +19 -10
  174. package/dist/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -1
  175. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +18 -9
  176. package/dist/api/resources/agents/resources/messages/client/Client.d.ts +16 -8
  177. package/dist/api/resources/agents/resources/messages/client/Client.js +155 -83
  178. package/dist/api/resources/agents/resources/passages/client/Client.d.ts +8 -4
  179. package/dist/api/resources/agents/resources/passages/client/Client.js +64 -31
  180. package/dist/api/resources/agents/resources/sources/client/Client.d.ts +6 -3
  181. package/dist/api/resources/agents/resources/sources/client/Client.js +54 -27
  182. package/dist/api/resources/agents/resources/templates/client/Client.d.ts +6 -3
  183. package/dist/api/resources/agents/resources/templates/client/Client.js +54 -27
  184. package/dist/api/resources/agents/resources/tools/client/Client.d.ts +6 -3
  185. package/dist/api/resources/agents/resources/tools/client/Client.js +54 -27
  186. package/dist/api/resources/batches/client/Client.d.ts +8 -4
  187. package/dist/api/resources/batches/client/Client.js +63 -30
  188. package/dist/api/resources/blocks/client/Client.d.ts +12 -6
  189. package/dist/api/resources/blocks/client/Client.js +100 -49
  190. package/dist/api/resources/blocks/resources/agents/client/Client.d.ts +2 -1
  191. package/dist/api/resources/blocks/resources/agents/client/Client.js +19 -10
  192. package/dist/api/resources/clientSideAccessTokens/client/Client.d.ts +6 -3
  193. package/dist/api/resources/clientSideAccessTokens/client/Client.js +46 -22
  194. package/dist/api/resources/embeddingModels/client/Client.d.ts +2 -1
  195. package/dist/api/resources/embeddingModels/client/Client.js +18 -9
  196. package/dist/api/resources/folders/client/Client.d.ts +18 -9
  197. package/dist/api/resources/folders/client/Client.js +154 -76
  198. package/dist/api/resources/folders/resources/files/client/Client.d.ts +6 -3
  199. package/dist/api/resources/folders/resources/files/client/Client.js +48 -24
  200. package/dist/api/resources/folders/resources/passages/client/Client.d.ts +2 -1
  201. package/dist/api/resources/folders/resources/passages/client/Client.js +19 -10
  202. package/dist/api/resources/groups/client/Client.d.ts +12 -6
  203. package/dist/api/resources/groups/client/Client.js +105 -52
  204. package/dist/api/resources/groups/resources/messages/client/Client.d.ts +10 -5
  205. package/dist/api/resources/groups/resources/messages/client/Client.js +91 -49
  206. package/dist/api/resources/health/client/Client.d.ts +2 -1
  207. package/dist/api/resources/health/client/Client.js +17 -8
  208. package/dist/api/resources/identities/client/Client.d.ts +14 -7
  209. package/dist/api/resources/identities/client/Client.js +123 -61
  210. package/dist/api/resources/identities/resources/properties/client/Client.d.ts +2 -1
  211. package/dist/api/resources/identities/resources/properties/client/Client.js +9 -3
  212. package/dist/api/resources/jobs/client/Client.d.ts +10 -5
  213. package/dist/api/resources/jobs/client/Client.js +92 -47
  214. package/dist/api/resources/messages/client/Client.d.ts +2 -1
  215. package/dist/api/resources/messages/client/Client.js +19 -10
  216. package/dist/api/resources/models/client/Client.d.ts +2 -1
  217. package/dist/api/resources/models/client/Client.js +27 -14
  218. package/dist/api/resources/projects/client/Client.d.ts +2 -1
  219. package/dist/api/resources/projects/client/Client.js +18 -9
  220. package/dist/api/resources/providers/client/Client.d.ts +10 -5
  221. package/dist/api/resources/providers/client/Client.js +77 -36
  222. package/dist/api/resources/runs/client/Client.d.ts +8 -4
  223. package/dist/api/resources/runs/client/Client.js +74 -38
  224. package/dist/api/resources/runs/resources/messages/client/Client.d.ts +2 -1
  225. package/dist/api/resources/runs/resources/messages/client/Client.js +21 -12
  226. package/dist/api/resources/runs/resources/steps/client/Client.d.ts +2 -1
  227. package/dist/api/resources/runs/resources/steps/client/Client.js +19 -10
  228. package/dist/api/resources/runs/resources/usage/client/Client.d.ts +2 -1
  229. package/dist/api/resources/runs/resources/usage/client/Client.js +18 -9
  230. package/dist/api/resources/sources/client/Client.d.ts +20 -10
  231. package/dist/api/resources/sources/client/Client.js +173 -86
  232. package/dist/api/resources/sources/resources/files/client/Client.d.ts +6 -3
  233. package/dist/api/resources/sources/resources/files/client/Client.js +48 -24
  234. package/dist/api/resources/sources/resources/passages/client/Client.d.ts +2 -1
  235. package/dist/api/resources/sources/resources/passages/client/Client.js +19 -10
  236. package/dist/api/resources/steps/client/Client.d.ts +4 -2
  237. package/dist/api/resources/steps/client/Client.js +41 -21
  238. package/dist/api/resources/steps/resources/feedback/client/Client.d.ts +2 -1
  239. package/dist/api/resources/steps/resources/feedback/client/Client.js +23 -12
  240. package/dist/api/resources/tags/client/Client.d.ts +2 -1
  241. package/dist/api/resources/tags/client/Client.js +19 -10
  242. package/dist/api/resources/telemetry/client/Client.d.ts +2 -1
  243. package/dist/api/resources/telemetry/client/Client.js +18 -9
  244. package/dist/api/resources/templates/client/Client.d.ts +2 -1
  245. package/dist/api/resources/templates/client/Client.js +18 -9
  246. package/dist/api/resources/templates/resources/agents/client/Client.d.ts +2 -1
  247. package/dist/api/resources/templates/resources/agents/client/Client.js +19 -10
  248. package/dist/api/resources/tools/client/Client.d.ts +40 -20
  249. package/dist/api/resources/tools/client/Client.js +356 -182
  250. package/dist/api/resources/voice/client/Client.d.ts +2 -1
  251. package/dist/api/resources/voice/client/Client.js +9 -3
  252. package/dist/api/types/LettaStreamingRequest.d.ts +2 -0
  253. package/dist/api/types/ModalSandboxConfig.d.ts +9 -0
  254. package/dist/api/types/ModalSandboxConfig.js +5 -0
  255. package/dist/api/types/SandboxConfigCreateConfig.d.ts +1 -1
  256. package/dist/api/types/SandboxConfigUpdateConfig.d.ts +1 -1
  257. package/dist/api/types/SandboxType.d.ts +2 -1
  258. package/dist/api/types/SandboxType.js +1 -0
  259. package/dist/api/types/ToolType.d.ts +1 -2
  260. package/dist/api/types/ToolType.js +0 -1
  261. package/dist/api/types/index.d.ts +1 -0
  262. package/dist/api/types/index.js +1 -0
  263. package/dist/core/fetcher/APIResponse.d.ts +10 -0
  264. package/dist/core/fetcher/Fetcher.d.ts +1 -1
  265. package/dist/core/fetcher/Fetcher.js +11 -3
  266. package/dist/core/fetcher/Headers.d.ts +2 -0
  267. package/dist/core/fetcher/Headers.js +84 -0
  268. package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
  269. package/dist/core/fetcher/HttpResponsePromise.js +103 -0
  270. package/dist/core/fetcher/RawResponse.d.ts +29 -0
  271. package/dist/core/fetcher/RawResponse.js +44 -0
  272. package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
  273. package/dist/core/fetcher/getRequestBody.js +2 -1
  274. package/dist/core/fetcher/index.d.ts +3 -0
  275. package/dist/core/fetcher/index.js +7 -1
  276. package/dist/core/fetcher/requestWithRetries.js +1 -1
  277. package/dist/core/form-data-utils/FormDataWrapper.d.ts +3 -0
  278. package/dist/core/form-data-utils/FormDataWrapper.js +53 -10
  279. package/dist/core/form-data-utils/encodeAsFormParameter.d.ts +4 -0
  280. package/dist/core/form-data-utils/encodeAsFormParameter.js +18 -0
  281. package/dist/core/form-data-utils/index.d.ts +1 -0
  282. package/dist/core/form-data-utils/index.js +3 -0
  283. package/dist/core/json.d.ts +15 -0
  284. package/dist/core/json.js +24 -0
  285. package/dist/core/schemas/Schema.d.ts +2 -0
  286. package/dist/core/schemas/Schema.js +2 -0
  287. package/dist/core/schemas/builders/bigint/bigint.d.ts +1 -1
  288. package/dist/core/schemas/builders/bigint/bigint.js +21 -17
  289. package/dist/core/schemas/builders/object/object.js +1 -0
  290. package/dist/core/schemas/builders/record/record.js +1 -2
  291. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
  292. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +64 -0
  293. package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +1 -1
  294. package/dist/errors/LettaError.d.ts +4 -1
  295. package/dist/errors/LettaError.js +6 -8
  296. package/dist/serialization/types/LettaStreamingRequest.d.ts +1 -0
  297. package/dist/serialization/types/LettaStreamingRequest.js +1 -0
  298. package/dist/serialization/types/ModalSandboxConfig.d.ts +13 -0
  299. package/dist/serialization/types/ModalSandboxConfig.js +44 -0
  300. package/dist/serialization/types/SandboxConfigCreateConfig.d.ts +2 -1
  301. package/dist/serialization/types/SandboxConfigCreateConfig.js +2 -1
  302. package/dist/serialization/types/SandboxConfigUpdateConfig.d.ts +2 -1
  303. package/dist/serialization/types/SandboxConfigUpdateConfig.js +2 -1
  304. package/dist/serialization/types/SandboxType.d.ts +1 -1
  305. package/dist/serialization/types/SandboxType.js +1 -1
  306. package/dist/serialization/types/ToolType.d.ts +1 -1
  307. package/dist/serialization/types/ToolType.js +0 -1
  308. package/dist/serialization/types/index.d.ts +1 -0
  309. package/dist/serialization/types/index.js +1 -0
  310. package/dist/version.d.ts +1 -1
  311. package/dist/version.js +1 -1
  312. package/errors/LettaError.d.ts +4 -1
  313. package/errors/LettaError.js +6 -8
  314. package/package.json +4 -4
  315. package/serialization/types/LettaStreamingRequest.d.ts +1 -0
  316. package/serialization/types/LettaStreamingRequest.js +1 -0
  317. package/serialization/types/ModalSandboxConfig.d.ts +13 -0
  318. package/serialization/types/ModalSandboxConfig.js +44 -0
  319. package/serialization/types/SandboxConfigCreateConfig.d.ts +2 -1
  320. package/serialization/types/SandboxConfigCreateConfig.js +2 -1
  321. package/serialization/types/SandboxConfigUpdateConfig.d.ts +2 -1
  322. package/serialization/types/SandboxConfigUpdateConfig.js +2 -1
  323. package/serialization/types/SandboxType.d.ts +1 -1
  324. package/serialization/types/SandboxType.js +1 -1
  325. package/serialization/types/ToolType.d.ts +1 -1
  326. package/serialization/types/ToolType.js +0 -1
  327. package/serialization/types/index.d.ts +1 -0
  328. package/serialization/types/index.js +1 -0
  329. package/version.d.ts +1 -1
  330. package/version.js +1 -1
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.1.169";
4
+ exports.SDK_VERSION = "0.1.172";
@@ -1,12 +1,15 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as core from "../core";
4
5
  export declare class LettaError extends Error {
5
6
  readonly statusCode?: number;
6
7
  readonly body?: unknown;
7
- constructor({ message, statusCode, body }: {
8
+ readonly rawResponse?: core.RawResponse;
9
+ constructor({ message, statusCode, body, rawResponse, }: {
8
10
  message?: string;
9
11
  statusCode?: number;
10
12
  body?: unknown;
13
+ rawResponse?: core.RawResponse;
11
14
  });
12
15
  }
@@ -4,16 +4,14 @@
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.LettaError = void 0;
7
+ const json_1 = require("../core/json");
7
8
  class LettaError extends Error {
8
- constructor({ message, statusCode, body }) {
9
+ constructor({ message, statusCode, body, rawResponse, }) {
9
10
  super(buildMessage({ message, statusCode, body }));
10
11
  Object.setPrototypeOf(this, LettaError.prototype);
11
- if (statusCode != null) {
12
- this.statusCode = statusCode;
13
- }
14
- if (body !== undefined) {
15
- this.body = body;
16
- }
12
+ this.statusCode = statusCode;
13
+ this.body = body;
14
+ this.rawResponse = rawResponse;
17
15
  }
18
16
  }
19
17
  exports.LettaError = LettaError;
@@ -26,7 +24,7 @@ function buildMessage({ message, statusCode, body, }) {
26
24
  lines.push(`Status code: ${statusCode.toString()}`);
27
25
  }
28
26
  if (body != null) {
29
- lines.push(`Body: ${JSON.stringify(body, undefined, 2)}`);
27
+ lines.push(`Body: ${(0, json_1.toJson)(body, undefined, 2)}`);
30
28
  }
31
29
  return lines.join("\n");
32
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letta-ai/letta-client",
3
- "version": "0.1.169",
3
+ "version": "0.1.172",
4
4
  "private": false,
5
5
  "repository": "https://github.com/letta-ai/letta-node",
6
6
  "main": "./index.js",
@@ -18,8 +18,7 @@
18
18
  "node-fetch": "^2.7.0",
19
19
  "qs": "^6.13.1",
20
20
  "readable-stream": "^4.5.2",
21
- "form-data-encoder": "^4.0.2",
22
- "dedent": "^1.0.0"
21
+ "form-data-encoder": "^4.0.2"
23
22
  },
24
23
  "devDependencies": {
25
24
  "@types/url-join": "4.0.1",
@@ -40,5 +39,6 @@
40
39
  "fs": false,
41
40
  "os": false,
42
41
  "path": false
43
- }
42
+ },
43
+ "packageManager": "yarn@1.22.22"
44
44
  }
@@ -17,5 +17,6 @@ export declare namespace LettaStreamingRequest {
17
17
  include_return_message_types?: MessageType.Raw[] | null;
18
18
  enable_thinking?: string | null;
19
19
  stream_tokens?: boolean | null;
20
+ include_pings?: boolean | null;
20
21
  }
21
22
  }
@@ -49,4 +49,5 @@ exports.LettaStreamingRequest = core.serialization.object({
49
49
  includeReturnMessageTypes: core.serialization.property("include_return_message_types", core.serialization.list(MessageType_1.MessageType).optional()),
50
50
  enableThinking: core.serialization.property("enable_thinking", core.serialization.string().optional()),
51
51
  streamTokens: core.serialization.property("stream_tokens", core.serialization.boolean().optional()),
52
+ includePings: core.serialization.property("include_pings", core.serialization.boolean().optional()),
52
53
  });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../index";
5
+ import * as Letta from "../../api/index";
6
+ import * as core from "../../core";
7
+ export declare const ModalSandboxConfig: core.serialization.ObjectSchema<serializers.ModalSandboxConfig.Raw, Letta.ModalSandboxConfig>;
8
+ export declare namespace ModalSandboxConfig {
9
+ interface Raw {
10
+ timeout?: number | null;
11
+ pip_requirements?: string[] | null;
12
+ }
13
+ }
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
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
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.ModalSandboxConfig = void 0;
40
+ const core = __importStar(require("../../core"));
41
+ exports.ModalSandboxConfig = core.serialization.object({
42
+ timeout: core.serialization.number().optional(),
43
+ pipRequirements: core.serialization.property("pip_requirements", core.serialization.list(core.serialization.string()).optional()),
44
+ });
@@ -6,7 +6,8 @@ import * as Letta from "../../api/index";
6
6
  import * as core from "../../core";
7
7
  import { LocalSandboxConfig } from "./LocalSandboxConfig";
8
8
  import { E2BSandboxConfig } from "./E2BSandboxConfig";
9
+ import { ModalSandboxConfig } from "./ModalSandboxConfig";
9
10
  export declare const SandboxConfigCreateConfig: core.serialization.Schema<serializers.SandboxConfigCreateConfig.Raw, Letta.SandboxConfigCreateConfig>;
10
11
  export declare namespace SandboxConfigCreateConfig {
11
- type Raw = LocalSandboxConfig.Raw | E2BSandboxConfig.Raw;
12
+ type Raw = LocalSandboxConfig.Raw | E2BSandboxConfig.Raw | ModalSandboxConfig.Raw;
12
13
  }
@@ -40,4 +40,5 @@ exports.SandboxConfigCreateConfig = void 0;
40
40
  const core = __importStar(require("../../core"));
41
41
  const LocalSandboxConfig_1 = require("./LocalSandboxConfig");
42
42
  const E2BSandboxConfig_1 = require("./E2BSandboxConfig");
43
- exports.SandboxConfigCreateConfig = core.serialization.undiscriminatedUnion([LocalSandboxConfig_1.LocalSandboxConfig, E2BSandboxConfig_1.E2BSandboxConfig]);
43
+ const ModalSandboxConfig_1 = require("./ModalSandboxConfig");
44
+ exports.SandboxConfigCreateConfig = core.serialization.undiscriminatedUnion([LocalSandboxConfig_1.LocalSandboxConfig, E2BSandboxConfig_1.E2BSandboxConfig, ModalSandboxConfig_1.ModalSandboxConfig]);
@@ -6,7 +6,8 @@ import * as Letta from "../../api/index";
6
6
  import * as core from "../../core";
7
7
  import { LocalSandboxConfig } from "./LocalSandboxConfig";
8
8
  import { E2BSandboxConfig } from "./E2BSandboxConfig";
9
+ import { ModalSandboxConfig } from "./ModalSandboxConfig";
9
10
  export declare const SandboxConfigUpdateConfig: core.serialization.Schema<serializers.SandboxConfigUpdateConfig.Raw, Letta.SandboxConfigUpdateConfig>;
10
11
  export declare namespace SandboxConfigUpdateConfig {
11
- type Raw = LocalSandboxConfig.Raw | E2BSandboxConfig.Raw;
12
+ type Raw = LocalSandboxConfig.Raw | E2BSandboxConfig.Raw | ModalSandboxConfig.Raw;
12
13
  }
@@ -40,4 +40,5 @@ exports.SandboxConfigUpdateConfig = void 0;
40
40
  const core = __importStar(require("../../core"));
41
41
  const LocalSandboxConfig_1 = require("./LocalSandboxConfig");
42
42
  const E2BSandboxConfig_1 = require("./E2BSandboxConfig");
43
- exports.SandboxConfigUpdateConfig = core.serialization.undiscriminatedUnion([LocalSandboxConfig_1.LocalSandboxConfig, E2BSandboxConfig_1.E2BSandboxConfig]);
43
+ const ModalSandboxConfig_1 = require("./ModalSandboxConfig");
44
+ exports.SandboxConfigUpdateConfig = core.serialization.undiscriminatedUnion([LocalSandboxConfig_1.LocalSandboxConfig, E2BSandboxConfig_1.E2BSandboxConfig, ModalSandboxConfig_1.ModalSandboxConfig]);
@@ -6,5 +6,5 @@ import * as Letta from "../../api/index";
6
6
  import * as core from "../../core";
7
7
  export declare const SandboxType: core.serialization.Schema<serializers.SandboxType.Raw, Letta.SandboxType>;
8
8
  export declare namespace SandboxType {
9
- type Raw = "e2b" | "local";
9
+ type Raw = "e2b" | "modal" | "local";
10
10
  }
@@ -38,4 +38,4 @@ var __importStar = (this && this.__importStar) || (function () {
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.SandboxType = void 0;
40
40
  const core = __importStar(require("../../core"));
41
- exports.SandboxType = core.serialization.enum_(["e2b", "local"]);
41
+ exports.SandboxType = core.serialization.enum_(["e2b", "modal", "local"]);
@@ -6,5 +6,5 @@ import * as Letta from "../../api/index";
6
6
  import * as core from "../../core";
7
7
  export declare const ToolType: core.serialization.Schema<serializers.ToolType.Raw, Letta.ToolType>;
8
8
  export declare namespace ToolType {
9
- type Raw = "custom" | "letta_core" | "letta_memory_core" | "letta_multi_agent_core" | "letta_sleeptime_core" | "letta_voice_sleeptime_core" | "letta_builtin" | "letta_files_core" | "external_composio" | "external_langchain" | "external_mcp";
9
+ type Raw = "custom" | "letta_core" | "letta_memory_core" | "letta_multi_agent_core" | "letta_sleeptime_core" | "letta_voice_sleeptime_core" | "letta_builtin" | "letta_files_core" | "external_composio" | "external_mcp";
10
10
  }
@@ -48,6 +48,5 @@ exports.ToolType = core.serialization.enum_([
48
48
  "letta_builtin",
49
49
  "letta_files_core",
50
50
  "external_composio",
51
- "external_langchain",
52
51
  "external_mcp",
53
52
  ]);
@@ -157,6 +157,7 @@ export * from "./MessageCreate";
157
157
  export * from "./MessageRole";
158
158
  export * from "./MessageSchema";
159
159
  export * from "./MessageType";
160
+ export * from "./ModalSandboxConfig";
160
161
  export * from "./OmittedReasoningContent";
161
162
  export * from "./Organization";
162
163
  export * from "./OrganizationCreate";
@@ -173,6 +173,7 @@ __exportStar(require("./MessageCreate"), exports);
173
173
  __exportStar(require("./MessageRole"), exports);
174
174
  __exportStar(require("./MessageSchema"), exports);
175
175
  __exportStar(require("./MessageType"), exports);
176
+ __exportStar(require("./ModalSandboxConfig"), exports);
176
177
  __exportStar(require("./OmittedReasoningContent"), exports);
177
178
  __exportStar(require("./Organization"), exports);
178
179
  __exportStar(require("./OrganizationCreate"), exports);
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.1.169";
1
+ export declare const SDK_VERSION = "0.1.172";
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.1.169";
4
+ exports.SDK_VERSION = "0.1.172";