@letta-ai/letta-client 0.0.1 → 0.1.0

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 (1056) hide show
  1. package/Client.d.ts +47 -0
  2. package/Client.js +47 -0
  3. package/README.md +153 -1
  4. package/api/errors/ConflictError.d.ts +8 -0
  5. package/api/errors/ConflictError.js +41 -0
  6. package/api/errors/InternalServerError.d.ts +7 -0
  7. package/api/errors/InternalServerError.js +41 -0
  8. package/api/errors/NotFoundError.d.ts +7 -0
  9. package/api/errors/NotFoundError.js +41 -0
  10. package/api/errors/UnprocessableEntityError.d.ts +8 -0
  11. package/api/errors/UnprocessableEntityError.js +41 -0
  12. package/api/errors/index.d.ts +4 -0
  13. package/api/errors/index.js +20 -0
  14. package/api/index.d.ts +3 -0
  15. package/api/index.js +19 -0
  16. package/api/resources/agents/client/Client.d.ts +209 -0
  17. package/api/resources/agents/client/Client.js +751 -0
  18. package/api/resources/agents/client/index.d.ts +1 -0
  19. package/api/resources/agents/client/index.js +17 -0
  20. package/api/resources/agents/client/requests/AgentsCreateVersionRequest.d.ts +11 -0
  21. package/api/resources/agents/client/requests/AgentsCreateVersionRequest.js +5 -0
  22. package/api/resources/agents/client/requests/AgentsListRequest.d.ts +21 -0
  23. package/api/resources/agents/client/requests/AgentsListRequest.js +5 -0
  24. package/api/resources/agents/client/requests/AgentsMigrateRequest.d.ts +16 -0
  25. package/api/resources/agents/client/requests/AgentsMigrateRequest.js +5 -0
  26. package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +56 -0
  27. package/api/resources/agents/client/requests/CreateAgentRequest.js +5 -0
  28. package/api/resources/agents/client/requests/UpdateAgent.d.ts +34 -0
  29. package/api/resources/agents/client/requests/UpdateAgent.js +5 -0
  30. package/api/resources/agents/client/requests/index.d.ts +5 -0
  31. package/api/resources/agents/client/requests/index.js +2 -0
  32. package/api/resources/agents/index.d.ts +3 -0
  33. package/api/resources/agents/index.js +19 -0
  34. package/api/resources/agents/resources/archivalMemory/client/Client.d.ts +81 -0
  35. package/api/resources/agents/resources/archivalMemory/client/Client.js +287 -0
  36. package/api/resources/agents/resources/archivalMemory/client/index.d.ts +1 -0
  37. package/api/resources/agents/resources/archivalMemory/client/index.js +17 -0
  38. package/api/resources/agents/resources/archivalMemory/client/requests/ArchivalMemoryListRequest.d.ts +21 -0
  39. package/api/resources/agents/resources/archivalMemory/client/requests/ArchivalMemoryListRequest.js +5 -0
  40. package/api/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.d.ts +13 -0
  41. package/api/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.js +5 -0
  42. package/api/resources/agents/resources/archivalMemory/client/requests/index.d.ts +2 -0
  43. package/api/resources/agents/resources/archivalMemory/client/requests/index.js +2 -0
  44. package/api/resources/agents/resources/archivalMemory/index.d.ts +1 -0
  45. package/api/resources/agents/resources/archivalMemory/index.js +17 -0
  46. package/api/resources/agents/resources/context/client/Client.d.ts +40 -0
  47. package/api/resources/agents/resources/context/client/Client.js +110 -0
  48. package/api/resources/agents/resources/context/client/index.d.ts +1 -0
  49. package/api/resources/agents/resources/context/client/index.js +2 -0
  50. package/api/resources/agents/resources/context/index.d.ts +1 -0
  51. package/api/resources/agents/resources/context/index.js +17 -0
  52. package/api/resources/agents/resources/index.d.ts +11 -0
  53. package/api/resources/agents/resources/index.js +40 -0
  54. package/api/resources/agents/resources/memory/client/Client.d.ts +44 -0
  55. package/api/resources/agents/resources/memory/client/Client.js +116 -0
  56. package/api/resources/agents/resources/memory/client/index.d.ts +1 -0
  57. package/api/resources/agents/resources/memory/client/index.js +2 -0
  58. package/api/resources/agents/resources/memory/index.d.ts +2 -0
  59. package/api/resources/agents/resources/memory/index.js +18 -0
  60. package/api/resources/agents/resources/memory/resources/index.d.ts +1 -0
  61. package/api/resources/agents/resources/memory/resources/index.js +27 -0
  62. package/api/resources/agents/resources/memory/resources/messages/client/Client.d.ts +40 -0
  63. package/api/resources/agents/resources/memory/resources/messages/client/Client.js +110 -0
  64. package/api/resources/agents/resources/memory/resources/messages/client/index.d.ts +1 -0
  65. package/api/resources/agents/resources/memory/resources/messages/client/index.js +2 -0
  66. package/api/resources/agents/resources/memory/resources/messages/index.d.ts +1 -0
  67. package/api/resources/agents/resources/memory/resources/messages/index.js +17 -0
  68. package/api/resources/agents/resources/memoryBlocks/client/Client.d.ts +57 -0
  69. package/api/resources/agents/resources/memoryBlocks/client/Client.js +169 -0
  70. package/api/resources/agents/resources/memoryBlocks/client/index.d.ts +1 -0
  71. package/api/resources/agents/resources/memoryBlocks/client/index.js +2 -0
  72. package/api/resources/agents/resources/memoryBlocks/index.d.ts +1 -0
  73. package/api/resources/agents/resources/memoryBlocks/index.js +17 -0
  74. package/api/resources/agents/resources/messages/client/Client.d.ts +80 -0
  75. package/api/resources/agents/resources/messages/client/Client.js +303 -0
  76. package/api/resources/agents/resources/messages/client/index.d.ts +1 -0
  77. package/api/resources/agents/resources/messages/client/index.js +17 -0
  78. package/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +14 -0
  79. package/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.js +5 -0
  80. package/api/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +20 -0
  81. package/api/resources/agents/resources/messages/client/requests/MessageUpdate.js +5 -0
  82. package/api/resources/agents/resources/messages/client/requests/MessagesListRequest.d.ts +29 -0
  83. package/api/resources/agents/resources/messages/client/requests/MessagesListRequest.js +5 -0
  84. package/api/resources/agents/resources/messages/client/requests/index.d.ts +3 -0
  85. package/api/resources/agents/resources/messages/client/requests/index.js +2 -0
  86. package/api/resources/agents/resources/messages/index.d.ts +2 -0
  87. package/api/resources/agents/resources/messages/index.js +18 -0
  88. package/api/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +8 -0
  89. package/api/resources/agents/resources/messages/types/LettaStreamingResponse.js +5 -0
  90. package/api/resources/agents/resources/messages/types/MessagesListResponse.d.ts +5 -0
  91. package/api/resources/agents/resources/messages/types/MessagesListResponse.js +5 -0
  92. package/api/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +5 -0
  93. package/api/resources/agents/resources/messages/types/MessagesListResponseItem.js +5 -0
  94. package/api/resources/agents/resources/messages/types/index.d.ts +3 -0
  95. package/api/resources/agents/resources/messages/types/index.js +19 -0
  96. package/api/resources/agents/resources/recallMemory/client/Client.d.ts +40 -0
  97. package/api/resources/agents/resources/recallMemory/client/Client.js +110 -0
  98. package/api/resources/agents/resources/recallMemory/client/index.d.ts +1 -0
  99. package/api/resources/agents/resources/recallMemory/client/index.js +2 -0
  100. package/api/resources/agents/resources/recallMemory/index.d.ts +1 -0
  101. package/api/resources/agents/resources/recallMemory/index.js +17 -0
  102. package/api/resources/agents/resources/sources/client/Client.d.ts +40 -0
  103. package/api/resources/agents/resources/sources/client/Client.js +110 -0
  104. package/api/resources/agents/resources/sources/client/index.d.ts +1 -0
  105. package/api/resources/agents/resources/sources/client/index.js +2 -0
  106. package/api/resources/agents/resources/sources/index.d.ts +1 -0
  107. package/api/resources/agents/resources/sources/index.js +17 -0
  108. package/api/resources/agents/resources/tools/client/Client.d.ts +66 -0
  109. package/api/resources/agents/resources/tools/client/Client.js +218 -0
  110. package/api/resources/agents/resources/tools/client/index.d.ts +1 -0
  111. package/api/resources/agents/resources/tools/client/index.js +2 -0
  112. package/api/resources/agents/resources/tools/index.d.ts +1 -0
  113. package/api/resources/agents/resources/tools/index.js +17 -0
  114. package/api/resources/agents/types/AgentsCreateVersionResponse.d.ts +7 -0
  115. package/api/resources/agents/types/AgentsCreateVersionResponse.js +5 -0
  116. package/api/resources/agents/types/AgentsMigrateResponse.d.ts +6 -0
  117. package/api/resources/agents/types/AgentsMigrateResponse.js +5 -0
  118. package/api/resources/agents/types/CreateAgentRequestToolRulesItem.d.ts +5 -0
  119. package/api/resources/agents/types/CreateAgentRequestToolRulesItem.js +5 -0
  120. package/api/resources/agents/types/UpdateAgentToolRulesItem.d.ts +5 -0
  121. package/api/resources/agents/types/UpdateAgentToolRulesItem.js +5 -0
  122. package/api/resources/agents/types/index.d.ts +4 -0
  123. package/api/resources/agents/types/index.js +20 -0
  124. package/api/resources/blocks/client/Client.d.ts +112 -0
  125. package/api/resources/blocks/client/Client.js +450 -0
  126. package/api/resources/blocks/client/index.d.ts +1 -0
  127. package/api/resources/blocks/client/index.js +17 -0
  128. package/api/resources/blocks/client/requests/BlocksListRequest.d.ts +21 -0
  129. package/api/resources/blocks/client/requests/BlocksListRequest.js +5 -0
  130. package/api/resources/blocks/client/requests/LinkAgentMemoryBlockRequest.d.ts +15 -0
  131. package/api/resources/blocks/client/requests/LinkAgentMemoryBlockRequest.js +5 -0
  132. package/api/resources/blocks/client/requests/UnlinkAgentMemoryBlockRequest.d.ts +15 -0
  133. package/api/resources/blocks/client/requests/UnlinkAgentMemoryBlockRequest.js +5 -0
  134. package/api/resources/blocks/client/requests/index.d.ts +3 -0
  135. package/api/resources/blocks/client/requests/index.js +2 -0
  136. package/api/resources/blocks/index.d.ts +1 -0
  137. package/api/resources/blocks/index.js +17 -0
  138. package/api/resources/health/client/Client.d.ts +35 -0
  139. package/api/resources/health/client/Client.js +99 -0
  140. package/api/resources/health/client/index.d.ts +1 -0
  141. package/api/resources/health/client/index.js +2 -0
  142. package/api/resources/health/index.d.ts +1 -0
  143. package/api/resources/health/index.js +17 -0
  144. package/api/resources/index.d.ts +13 -0
  145. package/api/resources/index.js +42 -0
  146. package/api/resources/jobs/client/Client.d.ts +75 -0
  147. package/api/resources/jobs/client/Client.js +274 -0
  148. package/api/resources/jobs/client/index.d.ts +1 -0
  149. package/api/resources/jobs/client/index.js +17 -0
  150. package/api/resources/jobs/client/requests/JobsListRequest.d.ts +13 -0
  151. package/api/resources/jobs/client/requests/JobsListRequest.js +5 -0
  152. package/api/resources/jobs/client/requests/index.d.ts +1 -0
  153. package/api/resources/jobs/client/requests/index.js +2 -0
  154. package/api/resources/jobs/index.d.ts +1 -0
  155. package/api/resources/jobs/index.js +17 -0
  156. package/api/resources/models/client/Client.d.ts +42 -0
  157. package/api/resources/models/client/Client.js +142 -0
  158. package/api/resources/models/client/index.d.ts +1 -0
  159. package/api/resources/models/client/index.js +2 -0
  160. package/api/resources/models/index.d.ts +1 -0
  161. package/api/resources/models/index.js +17 -0
  162. package/api/resources/sources/client/Client.d.ts +138 -0
  163. package/api/resources/sources/client/Client.js +509 -0
  164. package/api/resources/sources/client/index.d.ts +1 -0
  165. package/api/resources/sources/client/index.js +17 -0
  166. package/api/resources/sources/client/requests/SourceCreate.d.ts +20 -0
  167. package/api/resources/sources/client/requests/SourceCreate.js +5 -0
  168. package/api/resources/sources/client/requests/SourceUpdate.d.ts +18 -0
  169. package/api/resources/sources/client/requests/SourceUpdate.js +5 -0
  170. package/api/resources/sources/client/requests/SourcesAttachRequest.d.ts +15 -0
  171. package/api/resources/sources/client/requests/SourcesAttachRequest.js +5 -0
  172. package/api/resources/sources/client/requests/SourcesDetachRequest.d.ts +15 -0
  173. package/api/resources/sources/client/requests/SourcesDetachRequest.js +5 -0
  174. package/api/resources/sources/client/requests/index.d.ts +4 -0
  175. package/api/resources/sources/client/requests/index.js +2 -0
  176. package/api/resources/sources/index.d.ts +2 -0
  177. package/api/resources/sources/index.js +18 -0
  178. package/api/resources/sources/resources/files/client/Client.d.ts +70 -0
  179. package/api/resources/sources/resources/files/client/Client.js +232 -0
  180. package/api/resources/sources/resources/files/client/index.d.ts +1 -0
  181. package/api/resources/sources/resources/files/client/index.js +17 -0
  182. package/api/resources/sources/resources/files/client/requests/BodyUploadFileToSource.d.ts +9 -0
  183. package/api/resources/sources/resources/files/client/requests/BodyUploadFileToSource.js +5 -0
  184. package/api/resources/sources/resources/files/client/requests/FilesListRequest.d.ts +17 -0
  185. package/api/resources/sources/resources/files/client/requests/FilesListRequest.js +5 -0
  186. package/api/resources/sources/resources/files/client/requests/index.d.ts +2 -0
  187. package/api/resources/sources/resources/files/client/requests/index.js +2 -0
  188. package/api/resources/sources/resources/files/index.d.ts +1 -0
  189. package/api/resources/sources/resources/files/index.js +17 -0
  190. package/api/resources/sources/resources/index.d.ts +3 -0
  191. package/api/resources/sources/resources/index.js +32 -0
  192. package/api/resources/sources/resources/passages/client/Client.d.ts +40 -0
  193. package/api/resources/sources/resources/passages/client/Client.js +110 -0
  194. package/api/resources/sources/resources/passages/client/index.d.ts +1 -0
  195. package/api/resources/sources/resources/passages/client/index.js +2 -0
  196. package/api/resources/sources/resources/passages/index.d.ts +1 -0
  197. package/api/resources/sources/resources/passages/index.js +17 -0
  198. package/api/resources/tools/client/Client.d.ts +178 -0
  199. package/api/resources/tools/client/Client.js +712 -0
  200. package/api/resources/tools/client/index.d.ts +1 -0
  201. package/api/resources/tools/client/index.js +17 -0
  202. package/api/resources/tools/client/requests/ToolRunFromSource.d.ts +20 -0
  203. package/api/resources/tools/client/requests/ToolRunFromSource.js +5 -0
  204. package/api/resources/tools/client/requests/ToolUpdate.d.ts +23 -0
  205. package/api/resources/tools/client/requests/ToolUpdate.js +5 -0
  206. package/api/resources/tools/client/requests/ToolsListRequest.d.ts +11 -0
  207. package/api/resources/tools/client/requests/ToolsListRequest.js +5 -0
  208. package/api/resources/tools/client/requests/index.d.ts +3 -0
  209. package/api/resources/tools/client/requests/index.js +2 -0
  210. package/api/resources/tools/index.d.ts +1 -0
  211. package/api/resources/tools/index.js +17 -0
  212. package/api/types/ActionModel.d.ts +19 -0
  213. package/api/types/ActionModel.js +5 -0
  214. package/api/types/ActionParametersModel.d.ts +12 -0
  215. package/api/types/ActionParametersModel.js +5 -0
  216. package/api/types/ActionResponseModel.d.ts +12 -0
  217. package/api/types/ActionResponseModel.js +5 -0
  218. package/api/types/AgentState.d.ts +58 -0
  219. package/api/types/AgentState.js +5 -0
  220. package/api/types/AgentStateToolRulesItem.d.ts +5 -0
  221. package/api/types/AgentStateToolRulesItem.js +5 -0
  222. package/api/types/AgentType.d.ts +14 -0
  223. package/api/types/AgentType.js +13 -0
  224. package/api/types/AppAuthScheme.d.ts +19 -0
  225. package/api/types/AppAuthScheme.js +5 -0
  226. package/api/types/AppAuthSchemeAuthMode.d.ts +12 -0
  227. package/api/types/AppAuthSchemeAuthMode.js +14 -0
  228. package/api/types/AppModel.d.ts +25 -0
  229. package/api/types/AppModel.js +5 -0
  230. package/api/types/ArchivalMemorySummary.d.ts +7 -0
  231. package/api/types/ArchivalMemorySummary.js +5 -0
  232. package/api/types/AssistantFile.d.ts +12 -0
  233. package/api/types/AssistantFile.js +5 -0
  234. package/api/types/AssistantMessageInput.d.ts +10 -0
  235. package/api/types/AssistantMessageInput.js +5 -0
  236. package/api/types/AssistantMessageOutput.d.ts +9 -0
  237. package/api/types/AssistantMessageOutput.js +5 -0
  238. package/api/types/AuthRequest.d.ts +7 -0
  239. package/api/types/AuthRequest.js +5 -0
  240. package/api/types/AuthResponse.d.ts +9 -0
  241. package/api/types/AuthResponse.js +5 -0
  242. package/api/types/AuthSchemeField.d.ts +16 -0
  243. package/api/types/AuthSchemeField.js +5 -0
  244. package/api/types/Block.d.ts +41 -0
  245. package/api/types/Block.js +5 -0
  246. package/api/types/BlockUpdate.d.ts +22 -0
  247. package/api/types/BlockUpdate.js +5 -0
  248. package/api/types/ChatCompletionRequest.d.ts +29 -0
  249. package/api/types/ChatCompletionRequest.js +5 -0
  250. package/api/types/ChatCompletionRequestFunctionCall.d.ts +5 -0
  251. package/api/types/ChatCompletionRequestFunctionCall.js +5 -0
  252. package/api/types/ChatCompletionRequestMessagesItem.d.ts +5 -0
  253. package/api/types/ChatCompletionRequestMessagesItem.js +5 -0
  254. package/api/types/ChatCompletionRequestStop.d.ts +4 -0
  255. package/api/types/ChatCompletionRequestStop.js +5 -0
  256. package/api/types/ChatCompletionRequestToolChoice.d.ts +5 -0
  257. package/api/types/ChatCompletionRequestToolChoice.js +5 -0
  258. package/api/types/ChatCompletionResponse.d.ts +16 -0
  259. package/api/types/ChatCompletionResponse.js +5 -0
  260. package/api/types/ChildToolRule.d.ts +14 -0
  261. package/api/types/ChildToolRule.js +5 -0
  262. package/api/types/Choice.d.ts +11 -0
  263. package/api/types/Choice.js +5 -0
  264. package/api/types/ConditionalToolRule.d.ts +18 -0
  265. package/api/types/ConditionalToolRule.js +5 -0
  266. package/api/types/ConflictErrorBody.d.ts +6 -0
  267. package/api/types/ConflictErrorBody.js +5 -0
  268. package/api/types/ContextWindowOverview.d.ts +41 -0
  269. package/api/types/ContextWindowOverview.js +5 -0
  270. package/api/types/CreateAssistantFileRequest.d.ts +7 -0
  271. package/api/types/CreateAssistantFileRequest.js +5 -0
  272. package/api/types/CreateAssistantRequest.d.ts +21 -0
  273. package/api/types/CreateAssistantRequest.js +5 -0
  274. package/api/types/CreateBlock.d.ts +21 -0
  275. package/api/types/CreateBlock.js +5 -0
  276. package/api/types/DeleteAssistantFileResponse.d.ts +10 -0
  277. package/api/types/DeleteAssistantFileResponse.js +5 -0
  278. package/api/types/DeleteAssistantResponse.d.ts +10 -0
  279. package/api/types/DeleteAssistantResponse.js +5 -0
  280. package/api/types/E2BSandboxConfig.d.ts +11 -0
  281. package/api/types/E2BSandboxConfig.js +5 -0
  282. package/api/types/EmbeddingConfig.d.ts +37 -0
  283. package/api/types/EmbeddingConfig.js +5 -0
  284. package/api/types/EmbeddingConfigEmbeddingEndpointType.d.ts +26 -0
  285. package/api/types/EmbeddingConfigEmbeddingEndpointType.js +25 -0
  286. package/api/types/FileMetadata.d.ts +32 -0
  287. package/api/types/FileMetadata.js +5 -0
  288. package/api/types/FunctionCallInput.d.ts +6 -0
  289. package/api/types/FunctionCallInput.js +5 -0
  290. package/api/types/FunctionCallOutput.d.ts +7 -0
  291. package/api/types/FunctionCallOutput.js +5 -0
  292. package/api/types/FunctionSchema.d.ts +8 -0
  293. package/api/types/FunctionSchema.js +5 -0
  294. package/api/types/Health.d.ts +10 -0
  295. package/api/types/Health.js +5 -0
  296. package/api/types/HttpValidationError.d.ts +7 -0
  297. package/api/types/HttpValidationError.js +5 -0
  298. package/api/types/InitToolRule.d.ts +12 -0
  299. package/api/types/InitToolRule.js +5 -0
  300. package/api/types/InternalServerErrorBody.d.ts +6 -0
  301. package/api/types/InternalServerErrorBody.js +5 -0
  302. package/api/types/Job.d.ts +34 -0
  303. package/api/types/Job.js +5 -0
  304. package/api/types/JobStatus.d.ts +14 -0
  305. package/api/types/JobStatus.js +13 -0
  306. package/api/types/LettaRequest.d.ts +12 -0
  307. package/api/types/LettaRequest.js +5 -0
  308. package/api/types/LettaResponse.d.ts +68 -0
  309. package/api/types/LettaResponse.js +5 -0
  310. package/api/types/LettaResponseAssistantMessage.d.ts +9 -0
  311. package/api/types/LettaResponseAssistantMessage.js +5 -0
  312. package/api/types/LettaResponseLettaUsageStatistics.d.ts +22 -0
  313. package/api/types/LettaResponseLettaUsageStatistics.js +5 -0
  314. package/api/types/LettaResponseReasoningMessage.d.ts +17 -0
  315. package/api/types/LettaResponseReasoningMessage.js +5 -0
  316. package/api/types/LettaResponseSystemMessage.d.ts +17 -0
  317. package/api/types/LettaResponseSystemMessage.js +5 -0
  318. package/api/types/LettaResponseToolCall.d.ts +8 -0
  319. package/api/types/LettaResponseToolCall.js +5 -0
  320. package/api/types/LettaResponseToolCallDelta.d.ts +8 -0
  321. package/api/types/LettaResponseToolCallDelta.js +5 -0
  322. package/api/types/LettaResponseToolCallMessage.d.ts +18 -0
  323. package/api/types/LettaResponseToolCallMessage.js +5 -0
  324. package/api/types/LettaResponseToolCallMessageToolCall.d.ts +5 -0
  325. package/api/types/LettaResponseToolCallMessageToolCall.js +5 -0
  326. package/api/types/LettaResponseToolCallMessageToolCallOne.d.ts +8 -0
  327. package/api/types/LettaResponseToolCallMessageToolCallOne.js +5 -0
  328. package/api/types/LettaResponseToolCallMessageToolCallZero.d.ts +8 -0
  329. package/api/types/LettaResponseToolCallMessageToolCallZero.js +5 -0
  330. package/api/types/LettaResponseToolReturnMessage.d.ts +26 -0
  331. package/api/types/LettaResponseToolReturnMessage.js +5 -0
  332. package/api/types/LettaResponseToolReturnMessageStatus.d.ts +8 -0
  333. package/api/types/LettaResponseToolReturnMessageStatus.js +10 -0
  334. package/api/types/LettaResponseUserMessage.d.ts +17 -0
  335. package/api/types/LettaResponseUserMessage.js +5 -0
  336. package/api/types/LettaSchemasLettaMessageToolCall.d.ts +8 -0
  337. package/api/types/LettaSchemasLettaMessageToolCall.js +5 -0
  338. package/api/types/LettaSchemasMessageMessage.d.ts +47 -0
  339. package/api/types/LettaSchemasMessageMessage.js +5 -0
  340. package/api/types/LettaSchemasOpenaiChatCompletionRequestTool.d.ts +8 -0
  341. package/api/types/LettaSchemasOpenaiChatCompletionRequestTool.js +5 -0
  342. package/api/types/LettaSchemasOpenaiChatCompletionRequestToolCall.d.ts +9 -0
  343. package/api/types/LettaSchemasOpenaiChatCompletionRequestToolCall.js +5 -0
  344. package/api/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.d.ts +7 -0
  345. package/api/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.js +5 -0
  346. package/api/types/LettaSchemasOpenaiChatCompletionResponseMessage.d.ts +10 -0
  347. package/api/types/LettaSchemasOpenaiChatCompletionResponseMessage.js +5 -0
  348. package/api/types/LettaSchemasOpenaiChatCompletionResponseToolCall.d.ts +9 -0
  349. package/api/types/LettaSchemasOpenaiChatCompletionResponseToolCall.js +5 -0
  350. package/api/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.d.ts +9 -0
  351. package/api/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.js +5 -0
  352. package/api/types/LettaSchemasOpenaiChatCompletionsToolCallInput.d.ts +11 -0
  353. package/api/types/LettaSchemasOpenaiChatCompletionsToolCallInput.js +5 -0
  354. package/api/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.d.ts +11 -0
  355. package/api/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.js +5 -0
  356. package/api/types/LettaSchemasToolTool.d.ts +39 -0
  357. package/api/types/LettaSchemasToolTool.js +5 -0
  358. package/api/types/LettaUsageStatistics.d.ts +22 -0
  359. package/api/types/LettaUsageStatistics.js +5 -0
  360. package/api/types/LlmConfig.d.ts +31 -0
  361. package/api/types/LlmConfig.js +5 -0
  362. package/api/types/LlmConfigModelEndpointType.d.ts +26 -0
  363. package/api/types/LlmConfigModelEndpointType.js +25 -0
  364. package/api/types/LocalSandboxConfig.d.ts +11 -0
  365. package/api/types/LocalSandboxConfig.js +5 -0
  366. package/api/types/LogProbToken.d.ts +8 -0
  367. package/api/types/LogProbToken.js +5 -0
  368. package/api/types/Memory.d.ts +13 -0
  369. package/api/types/Memory.js +5 -0
  370. package/api/types/MessageContentLogProb.d.ts +10 -0
  371. package/api/types/MessageContentLogProb.js +5 -0
  372. package/api/types/MessageCreate.d.ts +15 -0
  373. package/api/types/MessageCreate.js +5 -0
  374. package/api/types/MessageCreateRole.d.ts +11 -0
  375. package/api/types/MessageCreateRole.js +10 -0
  376. package/api/types/MessageRole.d.ts +11 -0
  377. package/api/types/MessageRole.js +13 -0
  378. package/api/types/NotFoundErrorBody.d.ts +7 -0
  379. package/api/types/NotFoundErrorBody.js +5 -0
  380. package/api/types/NotFoundErrorBodyMessage.d.ts +8 -0
  381. package/api/types/NotFoundErrorBodyMessage.js +10 -0
  382. package/api/types/OpenAiAssistant.d.ts +27 -0
  383. package/api/types/OpenAiAssistant.js +5 -0
  384. package/api/types/Organization.d.ts +11 -0
  385. package/api/types/Organization.js +5 -0
  386. package/api/types/OrganizationCreate.d.ts +7 -0
  387. package/api/types/OrganizationCreate.js +5 -0
  388. package/api/types/Passage.d.ts +47 -0
  389. package/api/types/Passage.js +5 -0
  390. package/api/types/ReasoningMessage.d.ts +17 -0
  391. package/api/types/ReasoningMessage.js +5 -0
  392. package/api/types/RecallMemorySummary.d.ts +7 -0
  393. package/api/types/RecallMemorySummary.js +5 -0
  394. package/api/types/ResponseFormat.d.ts +6 -0
  395. package/api/types/ResponseFormat.js +5 -0
  396. package/api/types/SandboxConfig.d.ts +22 -0
  397. package/api/types/SandboxConfig.js +5 -0
  398. package/api/types/SandboxConfigCreate.d.ts +8 -0
  399. package/api/types/SandboxConfigCreate.js +5 -0
  400. package/api/types/SandboxConfigCreateConfig.d.ts +8 -0
  401. package/api/types/SandboxConfigCreateConfig.js +5 -0
  402. package/api/types/SandboxConfigUpdate.d.ts +11 -0
  403. package/api/types/SandboxConfigUpdate.js +5 -0
  404. package/api/types/SandboxConfigUpdateConfig.d.ts +8 -0
  405. package/api/types/SandboxConfigUpdateConfig.js +5 -0
  406. package/api/types/SandboxEnvironmentVariable.d.ts +25 -0
  407. package/api/types/SandboxEnvironmentVariable.js +5 -0
  408. package/api/types/SandboxEnvironmentVariableCreate.d.ts +11 -0
  409. package/api/types/SandboxEnvironmentVariableCreate.js +5 -0
  410. package/api/types/SandboxEnvironmentVariableUpdate.d.ts +14 -0
  411. package/api/types/SandboxEnvironmentVariableUpdate.js +5 -0
  412. package/api/types/SandboxType.d.ts +8 -0
  413. package/api/types/SandboxType.js +10 -0
  414. package/api/types/Source.d.ts +37 -0
  415. package/api/types/Source.js +5 -0
  416. package/api/types/SystemMessageInput.d.ts +8 -0
  417. package/api/types/SystemMessageInput.js +5 -0
  418. package/api/types/SystemMessageOutput.d.ts +17 -0
  419. package/api/types/SystemMessageOutput.js +5 -0
  420. package/api/types/TerminalToolRule.d.ts +12 -0
  421. package/api/types/TerminalToolRule.js +5 -0
  422. package/api/types/ToolCallDelta.d.ts +8 -0
  423. package/api/types/ToolCallDelta.js +5 -0
  424. package/api/types/ToolCallFunctionOutput.d.ts +9 -0
  425. package/api/types/ToolCallFunctionOutput.js +5 -0
  426. package/api/types/ToolCallMessage.d.ts +18 -0
  427. package/api/types/ToolCallMessage.js +5 -0
  428. package/api/types/ToolCallMessageToolCall.d.ts +5 -0
  429. package/api/types/ToolCallMessageToolCall.js +5 -0
  430. package/api/types/ToolCreate.d.ts +21 -0
  431. package/api/types/ToolCreate.js +5 -0
  432. package/api/types/ToolFunctionChoice.d.ts +8 -0
  433. package/api/types/ToolFunctionChoice.js +5 -0
  434. package/api/types/ToolInput.d.ts +8 -0
  435. package/api/types/ToolInput.js +5 -0
  436. package/api/types/ToolMessage.d.ts +8 -0
  437. package/api/types/ToolMessage.js +5 -0
  438. package/api/types/ToolReturnMessage.d.ts +26 -0
  439. package/api/types/ToolReturnMessage.js +5 -0
  440. package/api/types/ToolReturnMessageStatus.d.ts +8 -0
  441. package/api/types/ToolReturnMessageStatus.js +10 -0
  442. package/api/types/ToolRuleType.d.ts +15 -0
  443. package/api/types/ToolRuleType.js +14 -0
  444. package/api/types/UsageStatistics.d.ts +8 -0
  445. package/api/types/UsageStatistics.js +5 -0
  446. package/api/types/User.d.ts +25 -0
  447. package/api/types/User.js +5 -0
  448. package/api/types/UserCreate.d.ts +9 -0
  449. package/api/types/UserCreate.js +5 -0
  450. package/api/types/UserMessageInput.d.ts +9 -0
  451. package/api/types/UserMessageInput.js +5 -0
  452. package/api/types/UserMessageInputContent.d.ts +4 -0
  453. package/api/types/UserMessageInputContent.js +5 -0
  454. package/api/types/UserMessageOutput.d.ts +17 -0
  455. package/api/types/UserMessageOutput.js +5 -0
  456. package/api/types/UserUpdate.d.ts +11 -0
  457. package/api/types/UserUpdate.js +5 -0
  458. package/api/types/ValidationError.d.ts +9 -0
  459. package/api/types/ValidationError.js +5 -0
  460. package/api/types/ValidationErrorLocItem.d.ts +4 -0
  461. package/api/types/ValidationErrorLocItem.js +5 -0
  462. package/api/types/index.d.ts +125 -0
  463. package/api/types/index.js +141 -0
  464. package/core/auth/BasicAuth.d.ts +8 -0
  465. package/core/auth/BasicAuth.js +26 -0
  466. package/core/auth/BearerToken.d.ts +5 -0
  467. package/core/auth/BearerToken.js +15 -0
  468. package/core/auth/index.d.ts +2 -0
  469. package/core/auth/index.js +7 -0
  470. package/core/fetcher/APIResponse.d.ts +10 -0
  471. package/core/fetcher/APIResponse.js +2 -0
  472. package/core/fetcher/Fetcher.d.ts +39 -0
  473. package/core/fetcher/Fetcher.js +99 -0
  474. package/core/fetcher/Supplier.d.ts +4 -0
  475. package/core/fetcher/Supplier.js +22 -0
  476. package/core/fetcher/createRequestUrl.d.ts +1 -0
  477. package/core/fetcher/createRequestUrl.js +13 -0
  478. package/core/fetcher/getFetchFn.d.ts +4 -0
  479. package/core/fetcher/getFetchFn.js +59 -0
  480. package/core/fetcher/getHeader.d.ts +1 -0
  481. package/core/fetcher/getHeader.js +12 -0
  482. package/core/fetcher/getRequestBody.d.ts +7 -0
  483. package/core/fetcher/getRequestBody.js +23 -0
  484. package/core/fetcher/getResponseBody.d.ts +1 -0
  485. package/core/fetcher/getResponseBody.js +55 -0
  486. package/core/fetcher/index.d.ts +5 -0
  487. package/core/fetcher/index.js +9 -0
  488. package/core/fetcher/makeRequest.d.ts +1 -0
  489. package/core/fetcher/makeRequest.js +42 -0
  490. package/core/fetcher/requestWithRetries.d.ts +1 -0
  491. package/core/fetcher/requestWithRetries.js +41 -0
  492. package/core/fetcher/signals.d.ts +12 -0
  493. package/core/fetcher/signals.js +37 -0
  494. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
  495. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
  496. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
  497. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
  498. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
  499. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
  500. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  501. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +50 -0
  502. package/core/form-data-utils/FormDataWrapper.d.ts +60 -0
  503. package/core/form-data-utils/FormDataWrapper.js +174 -0
  504. package/core/form-data-utils/index.d.ts +1 -0
  505. package/core/form-data-utils/index.js +17 -0
  506. package/core/index.d.ts +5 -0
  507. package/core/index.js +21 -0
  508. package/core/runtime/index.d.ts +1 -0
  509. package/core/runtime/index.js +5 -0
  510. package/core/runtime/runtime.d.ts +9 -0
  511. package/core/runtime/runtime.js +93 -0
  512. package/core/streaming-fetcher/Stream.d.ts +48 -0
  513. package/core/streaming-fetcher/Stream.js +170 -0
  514. package/core/streaming-fetcher/index.d.ts +1 -0
  515. package/core/streaming-fetcher/index.js +5 -0
  516. package/dist/Client.d.ts +47 -0
  517. package/dist/Client.js +47 -0
  518. package/dist/api/errors/ConflictError.d.ts +8 -0
  519. package/dist/api/errors/ConflictError.js +41 -0
  520. package/dist/api/errors/InternalServerError.d.ts +7 -0
  521. package/dist/api/errors/InternalServerError.js +41 -0
  522. package/dist/api/errors/NotFoundError.d.ts +7 -0
  523. package/dist/api/errors/NotFoundError.js +41 -0
  524. package/dist/api/errors/UnprocessableEntityError.d.ts +8 -0
  525. package/dist/api/errors/UnprocessableEntityError.js +41 -0
  526. package/dist/api/errors/index.d.ts +4 -0
  527. package/dist/api/errors/index.js +20 -0
  528. package/dist/api/index.d.ts +3 -0
  529. package/dist/api/index.js +19 -0
  530. package/dist/api/resources/agents/client/Client.d.ts +209 -0
  531. package/dist/api/resources/agents/client/Client.js +751 -0
  532. package/dist/api/resources/agents/client/index.d.ts +1 -0
  533. package/dist/api/resources/agents/client/index.js +17 -0
  534. package/dist/api/resources/agents/client/requests/AgentsCreateVersionRequest.d.ts +11 -0
  535. package/dist/api/resources/agents/client/requests/AgentsCreateVersionRequest.js +5 -0
  536. package/dist/api/resources/agents/client/requests/AgentsListRequest.d.ts +21 -0
  537. package/dist/api/resources/agents/client/requests/AgentsListRequest.js +5 -0
  538. package/dist/api/resources/agents/client/requests/AgentsMigrateRequest.d.ts +16 -0
  539. package/dist/api/resources/agents/client/requests/AgentsMigrateRequest.js +5 -0
  540. package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +56 -0
  541. package/dist/api/resources/agents/client/requests/CreateAgentRequest.js +5 -0
  542. package/dist/api/resources/agents/client/requests/UpdateAgent.d.ts +34 -0
  543. package/dist/api/resources/agents/client/requests/UpdateAgent.js +5 -0
  544. package/dist/api/resources/agents/client/requests/index.d.ts +5 -0
  545. package/dist/api/resources/agents/client/requests/index.js +2 -0
  546. package/dist/api/resources/agents/index.d.ts +3 -0
  547. package/dist/api/resources/agents/index.js +19 -0
  548. package/dist/api/resources/agents/resources/archivalMemory/client/Client.d.ts +81 -0
  549. package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +287 -0
  550. package/dist/api/resources/agents/resources/archivalMemory/client/index.d.ts +1 -0
  551. package/dist/api/resources/agents/resources/archivalMemory/client/index.js +17 -0
  552. package/dist/api/resources/agents/resources/archivalMemory/client/requests/ArchivalMemoryListRequest.d.ts +21 -0
  553. package/dist/api/resources/agents/resources/archivalMemory/client/requests/ArchivalMemoryListRequest.js +5 -0
  554. package/dist/api/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.d.ts +13 -0
  555. package/dist/api/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.js +5 -0
  556. package/dist/api/resources/agents/resources/archivalMemory/client/requests/index.d.ts +2 -0
  557. package/dist/api/resources/agents/resources/archivalMemory/client/requests/index.js +2 -0
  558. package/dist/api/resources/agents/resources/archivalMemory/index.d.ts +1 -0
  559. package/dist/api/resources/agents/resources/archivalMemory/index.js +17 -0
  560. package/dist/api/resources/agents/resources/context/client/Client.d.ts +40 -0
  561. package/dist/api/resources/agents/resources/context/client/Client.js +110 -0
  562. package/dist/api/resources/agents/resources/context/client/index.d.ts +1 -0
  563. package/dist/api/resources/agents/resources/context/client/index.js +2 -0
  564. package/dist/api/resources/agents/resources/context/index.d.ts +1 -0
  565. package/dist/api/resources/agents/resources/context/index.js +17 -0
  566. package/dist/api/resources/agents/resources/index.d.ts +11 -0
  567. package/dist/api/resources/agents/resources/index.js +40 -0
  568. package/dist/api/resources/agents/resources/memory/client/Client.d.ts +44 -0
  569. package/dist/api/resources/agents/resources/memory/client/Client.js +116 -0
  570. package/dist/api/resources/agents/resources/memory/client/index.d.ts +1 -0
  571. package/dist/api/resources/agents/resources/memory/client/index.js +2 -0
  572. package/dist/api/resources/agents/resources/memory/index.d.ts +2 -0
  573. package/dist/api/resources/agents/resources/memory/index.js +18 -0
  574. package/dist/api/resources/agents/resources/memory/resources/index.d.ts +1 -0
  575. package/dist/api/resources/agents/resources/memory/resources/index.js +27 -0
  576. package/dist/api/resources/agents/resources/memory/resources/messages/client/Client.d.ts +40 -0
  577. package/dist/api/resources/agents/resources/memory/resources/messages/client/Client.js +110 -0
  578. package/dist/api/resources/agents/resources/memory/resources/messages/client/index.d.ts +1 -0
  579. package/dist/api/resources/agents/resources/memory/resources/messages/client/index.js +2 -0
  580. package/dist/api/resources/agents/resources/memory/resources/messages/index.d.ts +1 -0
  581. package/dist/api/resources/agents/resources/memory/resources/messages/index.js +17 -0
  582. package/dist/api/resources/agents/resources/memoryBlocks/client/Client.d.ts +57 -0
  583. package/dist/api/resources/agents/resources/memoryBlocks/client/Client.js +169 -0
  584. package/dist/api/resources/agents/resources/memoryBlocks/client/index.d.ts +1 -0
  585. package/dist/api/resources/agents/resources/memoryBlocks/client/index.js +2 -0
  586. package/dist/api/resources/agents/resources/memoryBlocks/index.d.ts +1 -0
  587. package/dist/api/resources/agents/resources/memoryBlocks/index.js +17 -0
  588. package/dist/api/resources/agents/resources/messages/client/Client.d.ts +80 -0
  589. package/dist/api/resources/agents/resources/messages/client/Client.js +303 -0
  590. package/dist/api/resources/agents/resources/messages/client/index.d.ts +1 -0
  591. package/dist/api/resources/agents/resources/messages/client/index.js +17 -0
  592. package/dist/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +14 -0
  593. package/dist/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.js +5 -0
  594. package/dist/api/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +20 -0
  595. package/dist/api/resources/agents/resources/messages/client/requests/MessageUpdate.js +5 -0
  596. package/dist/api/resources/agents/resources/messages/client/requests/MessagesListRequest.d.ts +29 -0
  597. package/dist/api/resources/agents/resources/messages/client/requests/MessagesListRequest.js +5 -0
  598. package/dist/api/resources/agents/resources/messages/client/requests/index.d.ts +3 -0
  599. package/dist/api/resources/agents/resources/messages/client/requests/index.js +2 -0
  600. package/dist/api/resources/agents/resources/messages/index.d.ts +2 -0
  601. package/dist/api/resources/agents/resources/messages/index.js +18 -0
  602. package/dist/api/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +8 -0
  603. package/dist/api/resources/agents/resources/messages/types/LettaStreamingResponse.js +5 -0
  604. package/dist/api/resources/agents/resources/messages/types/MessagesListResponse.d.ts +5 -0
  605. package/dist/api/resources/agents/resources/messages/types/MessagesListResponse.js +5 -0
  606. package/dist/api/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +5 -0
  607. package/dist/api/resources/agents/resources/messages/types/MessagesListResponseItem.js +5 -0
  608. package/dist/api/resources/agents/resources/messages/types/index.d.ts +3 -0
  609. package/dist/api/resources/agents/resources/messages/types/index.js +19 -0
  610. package/dist/api/resources/agents/resources/recallMemory/client/Client.d.ts +40 -0
  611. package/dist/api/resources/agents/resources/recallMemory/client/Client.js +110 -0
  612. package/dist/api/resources/agents/resources/recallMemory/client/index.d.ts +1 -0
  613. package/dist/api/resources/agents/resources/recallMemory/client/index.js +2 -0
  614. package/dist/api/resources/agents/resources/recallMemory/index.d.ts +1 -0
  615. package/dist/api/resources/agents/resources/recallMemory/index.js +17 -0
  616. package/dist/api/resources/agents/resources/sources/client/Client.d.ts +40 -0
  617. package/dist/api/resources/agents/resources/sources/client/Client.js +110 -0
  618. package/dist/api/resources/agents/resources/sources/client/index.d.ts +1 -0
  619. package/dist/api/resources/agents/resources/sources/client/index.js +2 -0
  620. package/dist/api/resources/agents/resources/sources/index.d.ts +1 -0
  621. package/dist/api/resources/agents/resources/sources/index.js +17 -0
  622. package/dist/api/resources/agents/resources/tools/client/Client.d.ts +66 -0
  623. package/dist/api/resources/agents/resources/tools/client/Client.js +218 -0
  624. package/dist/api/resources/agents/resources/tools/client/index.d.ts +1 -0
  625. package/dist/api/resources/agents/resources/tools/client/index.js +2 -0
  626. package/dist/api/resources/agents/resources/tools/index.d.ts +1 -0
  627. package/dist/api/resources/agents/resources/tools/index.js +17 -0
  628. package/dist/api/resources/agents/types/AgentsCreateVersionResponse.d.ts +7 -0
  629. package/dist/api/resources/agents/types/AgentsCreateVersionResponse.js +5 -0
  630. package/dist/api/resources/agents/types/AgentsMigrateResponse.d.ts +6 -0
  631. package/dist/api/resources/agents/types/AgentsMigrateResponse.js +5 -0
  632. package/dist/api/resources/agents/types/CreateAgentRequestToolRulesItem.d.ts +5 -0
  633. package/dist/api/resources/agents/types/CreateAgentRequestToolRulesItem.js +5 -0
  634. package/dist/api/resources/agents/types/UpdateAgentToolRulesItem.d.ts +5 -0
  635. package/dist/api/resources/agents/types/UpdateAgentToolRulesItem.js +5 -0
  636. package/dist/api/resources/agents/types/index.d.ts +4 -0
  637. package/dist/api/resources/agents/types/index.js +20 -0
  638. package/dist/api/resources/blocks/client/Client.d.ts +112 -0
  639. package/dist/api/resources/blocks/client/Client.js +450 -0
  640. package/dist/api/resources/blocks/client/index.d.ts +1 -0
  641. package/dist/api/resources/blocks/client/index.js +17 -0
  642. package/dist/api/resources/blocks/client/requests/BlocksListRequest.d.ts +21 -0
  643. package/dist/api/resources/blocks/client/requests/BlocksListRequest.js +5 -0
  644. package/dist/api/resources/blocks/client/requests/LinkAgentMemoryBlockRequest.d.ts +15 -0
  645. package/dist/api/resources/blocks/client/requests/LinkAgentMemoryBlockRequest.js +5 -0
  646. package/dist/api/resources/blocks/client/requests/UnlinkAgentMemoryBlockRequest.d.ts +15 -0
  647. package/dist/api/resources/blocks/client/requests/UnlinkAgentMemoryBlockRequest.js +5 -0
  648. package/dist/api/resources/blocks/client/requests/index.d.ts +3 -0
  649. package/dist/api/resources/blocks/client/requests/index.js +2 -0
  650. package/dist/api/resources/blocks/index.d.ts +1 -0
  651. package/dist/api/resources/blocks/index.js +17 -0
  652. package/dist/api/resources/health/client/Client.d.ts +35 -0
  653. package/dist/api/resources/health/client/Client.js +99 -0
  654. package/dist/api/resources/health/client/index.d.ts +1 -0
  655. package/dist/api/resources/health/client/index.js +2 -0
  656. package/dist/api/resources/health/index.d.ts +1 -0
  657. package/dist/api/resources/health/index.js +17 -0
  658. package/dist/api/resources/index.d.ts +13 -0
  659. package/dist/api/resources/index.js +42 -0
  660. package/dist/api/resources/jobs/client/Client.d.ts +75 -0
  661. package/dist/api/resources/jobs/client/Client.js +274 -0
  662. package/dist/api/resources/jobs/client/index.d.ts +1 -0
  663. package/dist/api/resources/jobs/client/index.js +17 -0
  664. package/dist/api/resources/jobs/client/requests/JobsListRequest.d.ts +13 -0
  665. package/dist/api/resources/jobs/client/requests/JobsListRequest.js +5 -0
  666. package/dist/api/resources/jobs/client/requests/index.d.ts +1 -0
  667. package/dist/api/resources/jobs/client/requests/index.js +2 -0
  668. package/dist/api/resources/jobs/index.d.ts +1 -0
  669. package/dist/api/resources/jobs/index.js +17 -0
  670. package/dist/api/resources/models/client/Client.d.ts +42 -0
  671. package/dist/api/resources/models/client/Client.js +142 -0
  672. package/dist/api/resources/models/client/index.d.ts +1 -0
  673. package/dist/api/resources/models/client/index.js +2 -0
  674. package/dist/api/resources/models/index.d.ts +1 -0
  675. package/dist/api/resources/models/index.js +17 -0
  676. package/dist/api/resources/sources/client/Client.d.ts +138 -0
  677. package/dist/api/resources/sources/client/Client.js +509 -0
  678. package/dist/api/resources/sources/client/index.d.ts +1 -0
  679. package/dist/api/resources/sources/client/index.js +17 -0
  680. package/dist/api/resources/sources/client/requests/SourceCreate.d.ts +20 -0
  681. package/dist/api/resources/sources/client/requests/SourceCreate.js +5 -0
  682. package/dist/api/resources/sources/client/requests/SourceUpdate.d.ts +18 -0
  683. package/dist/api/resources/sources/client/requests/SourceUpdate.js +5 -0
  684. package/dist/api/resources/sources/client/requests/SourcesAttachRequest.d.ts +15 -0
  685. package/dist/api/resources/sources/client/requests/SourcesAttachRequest.js +5 -0
  686. package/dist/api/resources/sources/client/requests/SourcesDetachRequest.d.ts +15 -0
  687. package/dist/api/resources/sources/client/requests/SourcesDetachRequest.js +5 -0
  688. package/dist/api/resources/sources/client/requests/index.d.ts +4 -0
  689. package/dist/api/resources/sources/client/requests/index.js +2 -0
  690. package/dist/api/resources/sources/index.d.ts +2 -0
  691. package/dist/api/resources/sources/index.js +18 -0
  692. package/dist/api/resources/sources/resources/files/client/Client.d.ts +70 -0
  693. package/dist/api/resources/sources/resources/files/client/Client.js +232 -0
  694. package/dist/api/resources/sources/resources/files/client/index.d.ts +1 -0
  695. package/dist/api/resources/sources/resources/files/client/index.js +17 -0
  696. package/dist/api/resources/sources/resources/files/client/requests/BodyUploadFileToSource.d.ts +9 -0
  697. package/dist/api/resources/sources/resources/files/client/requests/BodyUploadFileToSource.js +5 -0
  698. package/dist/api/resources/sources/resources/files/client/requests/FilesListRequest.d.ts +17 -0
  699. package/dist/api/resources/sources/resources/files/client/requests/FilesListRequest.js +5 -0
  700. package/dist/api/resources/sources/resources/files/client/requests/index.d.ts +2 -0
  701. package/dist/api/resources/sources/resources/files/client/requests/index.js +2 -0
  702. package/dist/api/resources/sources/resources/files/index.d.ts +1 -0
  703. package/dist/api/resources/sources/resources/files/index.js +17 -0
  704. package/dist/api/resources/sources/resources/index.d.ts +3 -0
  705. package/dist/api/resources/sources/resources/index.js +32 -0
  706. package/dist/api/resources/sources/resources/passages/client/Client.d.ts +40 -0
  707. package/dist/api/resources/sources/resources/passages/client/Client.js +110 -0
  708. package/dist/api/resources/sources/resources/passages/client/index.d.ts +1 -0
  709. package/dist/api/resources/sources/resources/passages/client/index.js +2 -0
  710. package/dist/api/resources/sources/resources/passages/index.d.ts +1 -0
  711. package/dist/api/resources/sources/resources/passages/index.js +17 -0
  712. package/dist/api/resources/tools/client/Client.d.ts +178 -0
  713. package/dist/api/resources/tools/client/Client.js +712 -0
  714. package/dist/api/resources/tools/client/index.d.ts +1 -0
  715. package/dist/api/resources/tools/client/index.js +17 -0
  716. package/dist/api/resources/tools/client/requests/ToolRunFromSource.d.ts +20 -0
  717. package/dist/api/resources/tools/client/requests/ToolRunFromSource.js +5 -0
  718. package/dist/api/resources/tools/client/requests/ToolUpdate.d.ts +23 -0
  719. package/dist/api/resources/tools/client/requests/ToolUpdate.js +5 -0
  720. package/dist/api/resources/tools/client/requests/ToolsListRequest.d.ts +11 -0
  721. package/dist/api/resources/tools/client/requests/ToolsListRequest.js +5 -0
  722. package/dist/api/resources/tools/client/requests/index.d.ts +3 -0
  723. package/dist/api/resources/tools/client/requests/index.js +2 -0
  724. package/dist/api/resources/tools/index.d.ts +1 -0
  725. package/dist/api/resources/tools/index.js +17 -0
  726. package/dist/api/types/ActionModel.d.ts +19 -0
  727. package/dist/api/types/ActionModel.js +5 -0
  728. package/dist/api/types/ActionParametersModel.d.ts +12 -0
  729. package/dist/api/types/ActionParametersModel.js +5 -0
  730. package/dist/api/types/ActionResponseModel.d.ts +12 -0
  731. package/dist/api/types/ActionResponseModel.js +5 -0
  732. package/dist/api/types/AgentState.d.ts +58 -0
  733. package/dist/api/types/AgentState.js +5 -0
  734. package/dist/api/types/AgentStateToolRulesItem.d.ts +5 -0
  735. package/dist/api/types/AgentStateToolRulesItem.js +5 -0
  736. package/dist/api/types/AgentType.d.ts +14 -0
  737. package/dist/api/types/AgentType.js +13 -0
  738. package/dist/api/types/AppAuthScheme.d.ts +19 -0
  739. package/dist/api/types/AppAuthScheme.js +5 -0
  740. package/dist/api/types/AppAuthSchemeAuthMode.d.ts +12 -0
  741. package/dist/api/types/AppAuthSchemeAuthMode.js +14 -0
  742. package/dist/api/types/AppModel.d.ts +25 -0
  743. package/dist/api/types/AppModel.js +5 -0
  744. package/dist/api/types/ArchivalMemorySummary.d.ts +7 -0
  745. package/dist/api/types/ArchivalMemorySummary.js +5 -0
  746. package/dist/api/types/AssistantFile.d.ts +12 -0
  747. package/dist/api/types/AssistantFile.js +5 -0
  748. package/dist/api/types/AssistantMessageInput.d.ts +10 -0
  749. package/dist/api/types/AssistantMessageInput.js +5 -0
  750. package/dist/api/types/AssistantMessageOutput.d.ts +9 -0
  751. package/dist/api/types/AssistantMessageOutput.js +5 -0
  752. package/dist/api/types/AuthRequest.d.ts +7 -0
  753. package/dist/api/types/AuthRequest.js +5 -0
  754. package/dist/api/types/AuthResponse.d.ts +9 -0
  755. package/dist/api/types/AuthResponse.js +5 -0
  756. package/dist/api/types/AuthSchemeField.d.ts +16 -0
  757. package/dist/api/types/AuthSchemeField.js +5 -0
  758. package/dist/api/types/Block.d.ts +41 -0
  759. package/dist/api/types/Block.js +5 -0
  760. package/dist/api/types/BlockUpdate.d.ts +22 -0
  761. package/dist/api/types/BlockUpdate.js +5 -0
  762. package/dist/api/types/ChatCompletionRequest.d.ts +29 -0
  763. package/dist/api/types/ChatCompletionRequest.js +5 -0
  764. package/dist/api/types/ChatCompletionRequestFunctionCall.d.ts +5 -0
  765. package/dist/api/types/ChatCompletionRequestFunctionCall.js +5 -0
  766. package/dist/api/types/ChatCompletionRequestMessagesItem.d.ts +5 -0
  767. package/dist/api/types/ChatCompletionRequestMessagesItem.js +5 -0
  768. package/dist/api/types/ChatCompletionRequestStop.d.ts +4 -0
  769. package/dist/api/types/ChatCompletionRequestStop.js +5 -0
  770. package/dist/api/types/ChatCompletionRequestToolChoice.d.ts +5 -0
  771. package/dist/api/types/ChatCompletionRequestToolChoice.js +5 -0
  772. package/dist/api/types/ChatCompletionResponse.d.ts +16 -0
  773. package/dist/api/types/ChatCompletionResponse.js +5 -0
  774. package/dist/api/types/ChildToolRule.d.ts +14 -0
  775. package/dist/api/types/ChildToolRule.js +5 -0
  776. package/dist/api/types/Choice.d.ts +11 -0
  777. package/dist/api/types/Choice.js +5 -0
  778. package/dist/api/types/ConditionalToolRule.d.ts +18 -0
  779. package/dist/api/types/ConditionalToolRule.js +5 -0
  780. package/dist/api/types/ConflictErrorBody.d.ts +6 -0
  781. package/dist/api/types/ConflictErrorBody.js +5 -0
  782. package/dist/api/types/ContextWindowOverview.d.ts +41 -0
  783. package/dist/api/types/ContextWindowOverview.js +5 -0
  784. package/dist/api/types/CreateAssistantFileRequest.d.ts +7 -0
  785. package/dist/api/types/CreateAssistantFileRequest.js +5 -0
  786. package/dist/api/types/CreateAssistantRequest.d.ts +21 -0
  787. package/dist/api/types/CreateAssistantRequest.js +5 -0
  788. package/dist/api/types/CreateBlock.d.ts +21 -0
  789. package/dist/api/types/CreateBlock.js +5 -0
  790. package/dist/api/types/DeleteAssistantFileResponse.d.ts +10 -0
  791. package/dist/api/types/DeleteAssistantFileResponse.js +5 -0
  792. package/dist/api/types/DeleteAssistantResponse.d.ts +10 -0
  793. package/dist/api/types/DeleteAssistantResponse.js +5 -0
  794. package/dist/api/types/E2BSandboxConfig.d.ts +11 -0
  795. package/dist/api/types/E2BSandboxConfig.js +5 -0
  796. package/dist/api/types/EmbeddingConfig.d.ts +37 -0
  797. package/dist/api/types/EmbeddingConfig.js +5 -0
  798. package/dist/api/types/EmbeddingConfigEmbeddingEndpointType.d.ts +26 -0
  799. package/dist/api/types/EmbeddingConfigEmbeddingEndpointType.js +25 -0
  800. package/dist/api/types/FileMetadata.d.ts +32 -0
  801. package/dist/api/types/FileMetadata.js +5 -0
  802. package/dist/api/types/FunctionCallInput.d.ts +6 -0
  803. package/dist/api/types/FunctionCallInput.js +5 -0
  804. package/dist/api/types/FunctionCallOutput.d.ts +7 -0
  805. package/dist/api/types/FunctionCallOutput.js +5 -0
  806. package/dist/api/types/FunctionSchema.d.ts +8 -0
  807. package/dist/api/types/FunctionSchema.js +5 -0
  808. package/dist/api/types/Health.d.ts +10 -0
  809. package/dist/api/types/Health.js +5 -0
  810. package/dist/api/types/HttpValidationError.d.ts +7 -0
  811. package/dist/api/types/HttpValidationError.js +5 -0
  812. package/dist/api/types/InitToolRule.d.ts +12 -0
  813. package/dist/api/types/InitToolRule.js +5 -0
  814. package/dist/api/types/InternalServerErrorBody.d.ts +6 -0
  815. package/dist/api/types/InternalServerErrorBody.js +5 -0
  816. package/dist/api/types/Job.d.ts +34 -0
  817. package/dist/api/types/Job.js +5 -0
  818. package/dist/api/types/JobStatus.d.ts +14 -0
  819. package/dist/api/types/JobStatus.js +13 -0
  820. package/dist/api/types/LettaRequest.d.ts +12 -0
  821. package/dist/api/types/LettaRequest.js +5 -0
  822. package/dist/api/types/LettaResponse.d.ts +68 -0
  823. package/dist/api/types/LettaResponse.js +5 -0
  824. package/dist/api/types/LettaResponseAssistantMessage.d.ts +9 -0
  825. package/dist/api/types/LettaResponseAssistantMessage.js +5 -0
  826. package/dist/api/types/LettaResponseLettaUsageStatistics.d.ts +22 -0
  827. package/dist/api/types/LettaResponseLettaUsageStatistics.js +5 -0
  828. package/dist/api/types/LettaResponseReasoningMessage.d.ts +17 -0
  829. package/dist/api/types/LettaResponseReasoningMessage.js +5 -0
  830. package/dist/api/types/LettaResponseSystemMessage.d.ts +17 -0
  831. package/dist/api/types/LettaResponseSystemMessage.js +5 -0
  832. package/dist/api/types/LettaResponseToolCall.d.ts +8 -0
  833. package/dist/api/types/LettaResponseToolCall.js +5 -0
  834. package/dist/api/types/LettaResponseToolCallDelta.d.ts +8 -0
  835. package/dist/api/types/LettaResponseToolCallDelta.js +5 -0
  836. package/dist/api/types/LettaResponseToolCallMessage.d.ts +18 -0
  837. package/dist/api/types/LettaResponseToolCallMessage.js +5 -0
  838. package/dist/api/types/LettaResponseToolCallMessageToolCall.d.ts +5 -0
  839. package/dist/api/types/LettaResponseToolCallMessageToolCall.js +5 -0
  840. package/dist/api/types/LettaResponseToolCallMessageToolCallOne.d.ts +8 -0
  841. package/dist/api/types/LettaResponseToolCallMessageToolCallOne.js +5 -0
  842. package/dist/api/types/LettaResponseToolCallMessageToolCallZero.d.ts +8 -0
  843. package/dist/api/types/LettaResponseToolCallMessageToolCallZero.js +5 -0
  844. package/dist/api/types/LettaResponseToolReturnMessage.d.ts +26 -0
  845. package/dist/api/types/LettaResponseToolReturnMessage.js +5 -0
  846. package/dist/api/types/LettaResponseToolReturnMessageStatus.d.ts +8 -0
  847. package/dist/api/types/LettaResponseToolReturnMessageStatus.js +10 -0
  848. package/dist/api/types/LettaResponseUserMessage.d.ts +17 -0
  849. package/dist/api/types/LettaResponseUserMessage.js +5 -0
  850. package/dist/api/types/LettaSchemasLettaMessageToolCall.d.ts +8 -0
  851. package/dist/api/types/LettaSchemasLettaMessageToolCall.js +5 -0
  852. package/dist/api/types/LettaSchemasMessageMessage.d.ts +47 -0
  853. package/dist/api/types/LettaSchemasMessageMessage.js +5 -0
  854. package/dist/api/types/LettaSchemasOpenaiChatCompletionRequestTool.d.ts +8 -0
  855. package/dist/api/types/LettaSchemasOpenaiChatCompletionRequestTool.js +5 -0
  856. package/dist/api/types/LettaSchemasOpenaiChatCompletionRequestToolCall.d.ts +9 -0
  857. package/dist/api/types/LettaSchemasOpenaiChatCompletionRequestToolCall.js +5 -0
  858. package/dist/api/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.d.ts +7 -0
  859. package/dist/api/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.js +5 -0
  860. package/dist/api/types/LettaSchemasOpenaiChatCompletionResponseMessage.d.ts +10 -0
  861. package/dist/api/types/LettaSchemasOpenaiChatCompletionResponseMessage.js +5 -0
  862. package/dist/api/types/LettaSchemasOpenaiChatCompletionResponseToolCall.d.ts +9 -0
  863. package/dist/api/types/LettaSchemasOpenaiChatCompletionResponseToolCall.js +5 -0
  864. package/dist/api/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.d.ts +9 -0
  865. package/dist/api/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.js +5 -0
  866. package/dist/api/types/LettaSchemasOpenaiChatCompletionsToolCallInput.d.ts +11 -0
  867. package/dist/api/types/LettaSchemasOpenaiChatCompletionsToolCallInput.js +5 -0
  868. package/dist/api/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.d.ts +11 -0
  869. package/dist/api/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.js +5 -0
  870. package/dist/api/types/LettaSchemasToolTool.d.ts +39 -0
  871. package/dist/api/types/LettaSchemasToolTool.js +5 -0
  872. package/dist/api/types/LettaUsageStatistics.d.ts +22 -0
  873. package/dist/api/types/LettaUsageStatistics.js +5 -0
  874. package/dist/api/types/LlmConfig.d.ts +31 -0
  875. package/dist/api/types/LlmConfig.js +5 -0
  876. package/dist/api/types/LlmConfigModelEndpointType.d.ts +26 -0
  877. package/dist/api/types/LlmConfigModelEndpointType.js +25 -0
  878. package/dist/api/types/LocalSandboxConfig.d.ts +11 -0
  879. package/dist/api/types/LocalSandboxConfig.js +5 -0
  880. package/dist/api/types/LogProbToken.d.ts +8 -0
  881. package/dist/api/types/LogProbToken.js +5 -0
  882. package/dist/api/types/Memory.d.ts +13 -0
  883. package/dist/api/types/Memory.js +5 -0
  884. package/dist/api/types/MessageContentLogProb.d.ts +10 -0
  885. package/dist/api/types/MessageContentLogProb.js +5 -0
  886. package/dist/api/types/MessageCreate.d.ts +15 -0
  887. package/dist/api/types/MessageCreate.js +5 -0
  888. package/dist/api/types/MessageCreateRole.d.ts +11 -0
  889. package/dist/api/types/MessageCreateRole.js +10 -0
  890. package/dist/api/types/MessageRole.d.ts +11 -0
  891. package/dist/api/types/MessageRole.js +13 -0
  892. package/dist/api/types/NotFoundErrorBody.d.ts +7 -0
  893. package/dist/api/types/NotFoundErrorBody.js +5 -0
  894. package/dist/api/types/NotFoundErrorBodyMessage.d.ts +8 -0
  895. package/dist/api/types/NotFoundErrorBodyMessage.js +10 -0
  896. package/dist/api/types/OpenAiAssistant.d.ts +27 -0
  897. package/dist/api/types/OpenAiAssistant.js +5 -0
  898. package/dist/api/types/Organization.d.ts +11 -0
  899. package/dist/api/types/Organization.js +5 -0
  900. package/dist/api/types/OrganizationCreate.d.ts +7 -0
  901. package/dist/api/types/OrganizationCreate.js +5 -0
  902. package/dist/api/types/Passage.d.ts +47 -0
  903. package/dist/api/types/Passage.js +5 -0
  904. package/dist/api/types/ReasoningMessage.d.ts +17 -0
  905. package/dist/api/types/ReasoningMessage.js +5 -0
  906. package/dist/api/types/RecallMemorySummary.d.ts +7 -0
  907. package/dist/api/types/RecallMemorySummary.js +5 -0
  908. package/dist/api/types/ResponseFormat.d.ts +6 -0
  909. package/dist/api/types/ResponseFormat.js +5 -0
  910. package/dist/api/types/SandboxConfig.d.ts +22 -0
  911. package/dist/api/types/SandboxConfig.js +5 -0
  912. package/dist/api/types/SandboxConfigCreate.d.ts +8 -0
  913. package/dist/api/types/SandboxConfigCreate.js +5 -0
  914. package/dist/api/types/SandboxConfigCreateConfig.d.ts +8 -0
  915. package/dist/api/types/SandboxConfigCreateConfig.js +5 -0
  916. package/dist/api/types/SandboxConfigUpdate.d.ts +11 -0
  917. package/dist/api/types/SandboxConfigUpdate.js +5 -0
  918. package/dist/api/types/SandboxConfigUpdateConfig.d.ts +8 -0
  919. package/dist/api/types/SandboxConfigUpdateConfig.js +5 -0
  920. package/dist/api/types/SandboxEnvironmentVariable.d.ts +25 -0
  921. package/dist/api/types/SandboxEnvironmentVariable.js +5 -0
  922. package/dist/api/types/SandboxEnvironmentVariableCreate.d.ts +11 -0
  923. package/dist/api/types/SandboxEnvironmentVariableCreate.js +5 -0
  924. package/dist/api/types/SandboxEnvironmentVariableUpdate.d.ts +14 -0
  925. package/dist/api/types/SandboxEnvironmentVariableUpdate.js +5 -0
  926. package/dist/api/types/SandboxType.d.ts +8 -0
  927. package/dist/api/types/SandboxType.js +10 -0
  928. package/dist/api/types/Source.d.ts +37 -0
  929. package/dist/api/types/Source.js +5 -0
  930. package/dist/api/types/SystemMessageInput.d.ts +8 -0
  931. package/dist/api/types/SystemMessageInput.js +5 -0
  932. package/dist/api/types/SystemMessageOutput.d.ts +17 -0
  933. package/dist/api/types/SystemMessageOutput.js +5 -0
  934. package/dist/api/types/TerminalToolRule.d.ts +12 -0
  935. package/dist/api/types/TerminalToolRule.js +5 -0
  936. package/dist/api/types/ToolCallDelta.d.ts +8 -0
  937. package/dist/api/types/ToolCallDelta.js +5 -0
  938. package/dist/api/types/ToolCallFunctionOutput.d.ts +9 -0
  939. package/dist/api/types/ToolCallFunctionOutput.js +5 -0
  940. package/dist/api/types/ToolCallMessage.d.ts +18 -0
  941. package/dist/api/types/ToolCallMessage.js +5 -0
  942. package/dist/api/types/ToolCallMessageToolCall.d.ts +5 -0
  943. package/dist/api/types/ToolCallMessageToolCall.js +5 -0
  944. package/dist/api/types/ToolCreate.d.ts +21 -0
  945. package/dist/api/types/ToolCreate.js +5 -0
  946. package/dist/api/types/ToolFunctionChoice.d.ts +8 -0
  947. package/dist/api/types/ToolFunctionChoice.js +5 -0
  948. package/dist/api/types/ToolInput.d.ts +8 -0
  949. package/dist/api/types/ToolInput.js +5 -0
  950. package/dist/api/types/ToolMessage.d.ts +8 -0
  951. package/dist/api/types/ToolMessage.js +5 -0
  952. package/dist/api/types/ToolReturnMessage.d.ts +26 -0
  953. package/dist/api/types/ToolReturnMessage.js +5 -0
  954. package/dist/api/types/ToolReturnMessageStatus.d.ts +8 -0
  955. package/dist/api/types/ToolReturnMessageStatus.js +10 -0
  956. package/dist/api/types/ToolRuleType.d.ts +15 -0
  957. package/dist/api/types/ToolRuleType.js +14 -0
  958. package/dist/api/types/UsageStatistics.d.ts +8 -0
  959. package/dist/api/types/UsageStatistics.js +5 -0
  960. package/dist/api/types/User.d.ts +25 -0
  961. package/dist/api/types/User.js +5 -0
  962. package/dist/api/types/UserCreate.d.ts +9 -0
  963. package/dist/api/types/UserCreate.js +5 -0
  964. package/dist/api/types/UserMessageInput.d.ts +9 -0
  965. package/dist/api/types/UserMessageInput.js +5 -0
  966. package/dist/api/types/UserMessageInputContent.d.ts +4 -0
  967. package/dist/api/types/UserMessageInputContent.js +5 -0
  968. package/dist/api/types/UserMessageOutput.d.ts +17 -0
  969. package/dist/api/types/UserMessageOutput.js +5 -0
  970. package/dist/api/types/UserUpdate.d.ts +11 -0
  971. package/dist/api/types/UserUpdate.js +5 -0
  972. package/dist/api/types/ValidationError.d.ts +9 -0
  973. package/dist/api/types/ValidationError.js +5 -0
  974. package/dist/api/types/ValidationErrorLocItem.d.ts +4 -0
  975. package/dist/api/types/ValidationErrorLocItem.js +5 -0
  976. package/dist/api/types/index.d.ts +125 -0
  977. package/dist/api/types/index.js +141 -0
  978. package/dist/core/auth/BasicAuth.d.ts +8 -0
  979. package/dist/core/auth/BasicAuth.js +26 -0
  980. package/dist/core/auth/BearerToken.d.ts +5 -0
  981. package/dist/core/auth/BearerToken.js +15 -0
  982. package/dist/core/auth/index.d.ts +2 -0
  983. package/dist/core/auth/index.js +7 -0
  984. package/dist/core/fetcher/APIResponse.d.ts +10 -0
  985. package/dist/core/fetcher/APIResponse.js +2 -0
  986. package/dist/core/fetcher/Fetcher.d.ts +39 -0
  987. package/dist/core/fetcher/Fetcher.js +99 -0
  988. package/dist/core/fetcher/Supplier.d.ts +4 -0
  989. package/dist/core/fetcher/Supplier.js +22 -0
  990. package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
  991. package/dist/core/fetcher/createRequestUrl.js +13 -0
  992. package/dist/core/fetcher/getFetchFn.d.ts +4 -0
  993. package/dist/core/fetcher/getFetchFn.js +59 -0
  994. package/dist/core/fetcher/getHeader.d.ts +1 -0
  995. package/dist/core/fetcher/getHeader.js +12 -0
  996. package/dist/core/fetcher/getRequestBody.d.ts +7 -0
  997. package/dist/core/fetcher/getRequestBody.js +23 -0
  998. package/dist/core/fetcher/getResponseBody.d.ts +1 -0
  999. package/dist/core/fetcher/getResponseBody.js +55 -0
  1000. package/dist/core/fetcher/index.d.ts +5 -0
  1001. package/dist/core/fetcher/index.js +9 -0
  1002. package/dist/core/fetcher/makeRequest.d.ts +1 -0
  1003. package/dist/core/fetcher/makeRequest.js +42 -0
  1004. package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
  1005. package/dist/core/fetcher/requestWithRetries.js +41 -0
  1006. package/dist/core/fetcher/signals.d.ts +12 -0
  1007. package/dist/core/fetcher/signals.js +37 -0
  1008. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
  1009. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
  1010. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
  1011. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
  1012. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
  1013. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
  1014. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  1015. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +50 -0
  1016. package/dist/core/form-data-utils/FormDataWrapper.d.ts +60 -0
  1017. package/dist/core/form-data-utils/FormDataWrapper.js +174 -0
  1018. package/dist/core/form-data-utils/index.d.ts +1 -0
  1019. package/dist/core/form-data-utils/index.js +17 -0
  1020. package/dist/core/index.d.ts +5 -0
  1021. package/dist/core/index.js +21 -0
  1022. package/dist/core/runtime/index.d.ts +1 -0
  1023. package/dist/core/runtime/index.js +5 -0
  1024. package/dist/core/runtime/runtime.d.ts +9 -0
  1025. package/dist/core/runtime/runtime.js +93 -0
  1026. package/dist/core/streaming-fetcher/Stream.d.ts +48 -0
  1027. package/dist/core/streaming-fetcher/Stream.js +170 -0
  1028. package/dist/core/streaming-fetcher/index.d.ts +1 -0
  1029. package/dist/core/streaming-fetcher/index.js +5 -0
  1030. package/dist/environments.d.ts +8 -0
  1031. package/dist/environments.js +10 -0
  1032. package/dist/errors/LettaError.d.ts +12 -0
  1033. package/dist/errors/LettaError.js +32 -0
  1034. package/dist/errors/LettaTimeoutError.d.ts +6 -0
  1035. package/dist/errors/LettaTimeoutError.js +13 -0
  1036. package/dist/errors/index.d.ts +2 -0
  1037. package/dist/errors/index.js +7 -0
  1038. package/dist/index.d.ts +4 -0
  1039. package/dist/index.js +34 -0
  1040. package/dist/version.d.ts +1 -0
  1041. package/dist/version.js +4 -0
  1042. package/environments.d.ts +8 -0
  1043. package/environments.js +10 -0
  1044. package/errors/LettaError.d.ts +12 -0
  1045. package/errors/LettaError.js +32 -0
  1046. package/errors/LettaTimeoutError.d.ts +6 -0
  1047. package/errors/LettaTimeoutError.js +13 -0
  1048. package/errors/index.d.ts +2 -0
  1049. package/errors/index.js +7 -0
  1050. package/index.d.ts +4 -0
  1051. package/index.js +34 -0
  1052. package/jest.config.js +5 -0
  1053. package/package.json +42 -10
  1054. package/reference.md +4296 -0
  1055. package/version.d.ts +1 -0
  1056. package/version.js +4 -0
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Letta from "../../../index";
5
+ export declare type CreateAgentRequestToolRulesItem = Letta.ChildToolRule | Letta.InitToolRule | Letta.TerminalToolRule | Letta.ConditionalToolRule;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Letta from "../../../index";
5
+ export declare type UpdateAgentToolRulesItem = Letta.ChildToolRule | Letta.InitToolRule | Letta.TerminalToolRule | Letta.ConditionalToolRule;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export * from "./CreateAgentRequestToolRulesItem";
2
+ export * from "./UpdateAgentToolRulesItem";
3
+ export * from "./AgentsCreateVersionResponse";
4
+ export * from "./AgentsMigrateResponse";
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./CreateAgentRequestToolRulesItem"), exports);
18
+ __exportStar(require("./UpdateAgentToolRulesItem"), exports);
19
+ __exportStar(require("./AgentsCreateVersionResponse"), exports);
20
+ __exportStar(require("./AgentsMigrateResponse"), exports);
@@ -0,0 +1,112 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../environments";
5
+ import * as core from "../../../../core";
6
+ import * as Letta from "../../../index";
7
+ export declare namespace Blocks {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.LettaEnvironment | string>;
10
+ token: core.Supplier<core.BearerToken>;
11
+ fetcher?: core.FetchFunction;
12
+ }
13
+ interface RequestOptions {
14
+ /** The maximum time to wait for a response in seconds. */
15
+ timeoutInSeconds?: number;
16
+ /** The number of times to retry the request. Defaults to 2. */
17
+ maxRetries?: number;
18
+ /** A hook to abort the request. */
19
+ abortSignal?: AbortSignal;
20
+ /** Additional headers to include in the request. */
21
+ headers?: Record<string, string>;
22
+ }
23
+ }
24
+ export declare class Blocks {
25
+ protected readonly _options: Blocks.Options;
26
+ constructor(_options: Blocks.Options);
27
+ /**
28
+ * @param {Letta.BlocksListRequest} request
29
+ * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
30
+ *
31
+ * @throws {@link Letta.UnprocessableEntityError}
32
+ *
33
+ * @example
34
+ * await client.blocks.list()
35
+ */
36
+ list(request?: Letta.BlocksListRequest, requestOptions?: Blocks.RequestOptions): Promise<Letta.Block[]>;
37
+ /**
38
+ * @param {Letta.CreateBlock} request
39
+ * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
40
+ *
41
+ * @throws {@link Letta.UnprocessableEntityError}
42
+ *
43
+ * @example
44
+ * await client.blocks.create({
45
+ * value: "value",
46
+ * label: "label"
47
+ * })
48
+ */
49
+ create(request: Letta.CreateBlock, requestOptions?: Blocks.RequestOptions): Promise<Letta.Block>;
50
+ /**
51
+ * @param {string} blockId
52
+ * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
53
+ *
54
+ * @throws {@link Letta.UnprocessableEntityError}
55
+ *
56
+ * @example
57
+ * await client.blocks.get("block_id")
58
+ */
59
+ get(blockId: string, requestOptions?: Blocks.RequestOptions): Promise<Letta.Block>;
60
+ /**
61
+ * @param {string} blockId
62
+ * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
63
+ *
64
+ * @throws {@link Letta.UnprocessableEntityError}
65
+ *
66
+ * @example
67
+ * await client.blocks.delete("block_id")
68
+ */
69
+ delete(blockId: string, requestOptions?: Blocks.RequestOptions): Promise<Letta.Block>;
70
+ /**
71
+ * @param {string} blockId
72
+ * @param {Letta.BlockUpdate} request
73
+ * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
74
+ *
75
+ * @throws {@link Letta.UnprocessableEntityError}
76
+ *
77
+ * @example
78
+ * await client.blocks.update("block_id", {})
79
+ */
80
+ update(blockId: string, request: Letta.BlockUpdate, requestOptions?: Blocks.RequestOptions): Promise<Letta.Block>;
81
+ /**
82
+ * Link a memory block to an agent.
83
+ *
84
+ * @param {string} blockId
85
+ * @param {Letta.LinkAgentMemoryBlockRequest} request
86
+ * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
87
+ *
88
+ * @throws {@link Letta.UnprocessableEntityError}
89
+ *
90
+ * @example
91
+ * await client.blocks.linkAgentMemoryBlock("block_id", {
92
+ * agent_id: "agent_id"
93
+ * })
94
+ */
95
+ linkAgentMemoryBlock(blockId: string, request: Letta.LinkAgentMemoryBlockRequest, requestOptions?: Blocks.RequestOptions): Promise<void>;
96
+ /**
97
+ * Unlink a memory block from an agent
98
+ *
99
+ * @param {string} blockId
100
+ * @param {Letta.UnlinkAgentMemoryBlockRequest} request
101
+ * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
102
+ *
103
+ * @throws {@link Letta.UnprocessableEntityError}
104
+ *
105
+ * @example
106
+ * await client.blocks.unlinkAgentMemoryBlock("block_id", {
107
+ * agent_id: "agent_id"
108
+ * })
109
+ */
110
+ unlinkAgentMemoryBlock(blockId: string, request: Letta.UnlinkAgentMemoryBlockRequest, requestOptions?: Blocks.RequestOptions): Promise<void>;
111
+ protected _getAuthorizationHeader(): Promise<string>;
112
+ }
@@ -0,0 +1,450 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
37
+ var __importDefault = (this && this.__importDefault) || function (mod) {
38
+ return (mod && mod.__esModule) ? mod : { "default": mod };
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.Blocks = void 0;
42
+ const environments = __importStar(require("../../../../environments"));
43
+ const core = __importStar(require("../../../../core"));
44
+ const Letta = __importStar(require("../../../index"));
45
+ const url_join_1 = __importDefault(require("url-join"));
46
+ const errors = __importStar(require("../../../../errors/index"));
47
+ class Blocks {
48
+ constructor(_options) {
49
+ this._options = _options;
50
+ }
51
+ /**
52
+ * @param {Letta.BlocksListRequest} request
53
+ * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
54
+ *
55
+ * @throws {@link Letta.UnprocessableEntityError}
56
+ *
57
+ * @example
58
+ * await client.blocks.list()
59
+ */
60
+ list(request = {}, requestOptions) {
61
+ var _a, _b;
62
+ return __awaiter(this, void 0, void 0, function* () {
63
+ const { label, templates_only: templatesOnly, name } = request;
64
+ const _queryParams = {};
65
+ if (label != null) {
66
+ _queryParams["label"] = label;
67
+ }
68
+ if (templatesOnly != null) {
69
+ _queryParams["templates_only"] = templatesOnly.toString();
70
+ }
71
+ if (name != null) {
72
+ _queryParams["name"] = name;
73
+ }
74
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
75
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/blocks/"),
76
+ method: "GET",
77
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
78
+ contentType: "application/json",
79
+ queryParameters: _queryParams,
80
+ requestType: "json",
81
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
82
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
83
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
84
+ });
85
+ if (_response.ok) {
86
+ return _response.body;
87
+ }
88
+ if (_response.error.reason === "status-code") {
89
+ switch (_response.error.statusCode) {
90
+ case 422:
91
+ throw new Letta.UnprocessableEntityError(_response.error.body);
92
+ default:
93
+ throw new errors.LettaError({
94
+ statusCode: _response.error.statusCode,
95
+ body: _response.error.body,
96
+ });
97
+ }
98
+ }
99
+ switch (_response.error.reason) {
100
+ case "non-json":
101
+ throw new errors.LettaError({
102
+ statusCode: _response.error.statusCode,
103
+ body: _response.error.rawBody,
104
+ });
105
+ case "timeout":
106
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/blocks/.");
107
+ case "unknown":
108
+ throw new errors.LettaError({
109
+ message: _response.error.errorMessage,
110
+ });
111
+ }
112
+ });
113
+ }
114
+ /**
115
+ * @param {Letta.CreateBlock} request
116
+ * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
117
+ *
118
+ * @throws {@link Letta.UnprocessableEntityError}
119
+ *
120
+ * @example
121
+ * await client.blocks.create({
122
+ * value: "value",
123
+ * label: "label"
124
+ * })
125
+ */
126
+ create(request, requestOptions) {
127
+ var _a, _b;
128
+ return __awaiter(this, void 0, void 0, function* () {
129
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
130
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/blocks/"),
131
+ method: "POST",
132
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
133
+ contentType: "application/json",
134
+ requestType: "json",
135
+ body: request,
136
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
137
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
138
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
139
+ });
140
+ if (_response.ok) {
141
+ return _response.body;
142
+ }
143
+ if (_response.error.reason === "status-code") {
144
+ switch (_response.error.statusCode) {
145
+ case 422:
146
+ throw new Letta.UnprocessableEntityError(_response.error.body);
147
+ default:
148
+ throw new errors.LettaError({
149
+ statusCode: _response.error.statusCode,
150
+ body: _response.error.body,
151
+ });
152
+ }
153
+ }
154
+ switch (_response.error.reason) {
155
+ case "non-json":
156
+ throw new errors.LettaError({
157
+ statusCode: _response.error.statusCode,
158
+ body: _response.error.rawBody,
159
+ });
160
+ case "timeout":
161
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/blocks/.");
162
+ case "unknown":
163
+ throw new errors.LettaError({
164
+ message: _response.error.errorMessage,
165
+ });
166
+ }
167
+ });
168
+ }
169
+ /**
170
+ * @param {string} blockId
171
+ * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
172
+ *
173
+ * @throws {@link Letta.UnprocessableEntityError}
174
+ *
175
+ * @example
176
+ * await client.blocks.get("block_id")
177
+ */
178
+ get(blockId, requestOptions) {
179
+ var _a, _b;
180
+ return __awaiter(this, void 0, void 0, function* () {
181
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
182
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/blocks/${encodeURIComponent(blockId)}`),
183
+ method: "GET",
184
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
185
+ contentType: "application/json",
186
+ requestType: "json",
187
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
188
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
189
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
190
+ });
191
+ if (_response.ok) {
192
+ return _response.body;
193
+ }
194
+ if (_response.error.reason === "status-code") {
195
+ switch (_response.error.statusCode) {
196
+ case 422:
197
+ throw new Letta.UnprocessableEntityError(_response.error.body);
198
+ default:
199
+ throw new errors.LettaError({
200
+ statusCode: _response.error.statusCode,
201
+ body: _response.error.body,
202
+ });
203
+ }
204
+ }
205
+ switch (_response.error.reason) {
206
+ case "non-json":
207
+ throw new errors.LettaError({
208
+ statusCode: _response.error.statusCode,
209
+ body: _response.error.rawBody,
210
+ });
211
+ case "timeout":
212
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/blocks/{block_id}.");
213
+ case "unknown":
214
+ throw new errors.LettaError({
215
+ message: _response.error.errorMessage,
216
+ });
217
+ }
218
+ });
219
+ }
220
+ /**
221
+ * @param {string} blockId
222
+ * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
223
+ *
224
+ * @throws {@link Letta.UnprocessableEntityError}
225
+ *
226
+ * @example
227
+ * await client.blocks.delete("block_id")
228
+ */
229
+ delete(blockId, requestOptions) {
230
+ var _a, _b;
231
+ return __awaiter(this, void 0, void 0, function* () {
232
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
233
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/blocks/${encodeURIComponent(blockId)}`),
234
+ method: "DELETE",
235
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
236
+ contentType: "application/json",
237
+ requestType: "json",
238
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
239
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
240
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
241
+ });
242
+ if (_response.ok) {
243
+ return _response.body;
244
+ }
245
+ if (_response.error.reason === "status-code") {
246
+ switch (_response.error.statusCode) {
247
+ case 422:
248
+ throw new Letta.UnprocessableEntityError(_response.error.body);
249
+ default:
250
+ throw new errors.LettaError({
251
+ statusCode: _response.error.statusCode,
252
+ body: _response.error.body,
253
+ });
254
+ }
255
+ }
256
+ switch (_response.error.reason) {
257
+ case "non-json":
258
+ throw new errors.LettaError({
259
+ statusCode: _response.error.statusCode,
260
+ body: _response.error.rawBody,
261
+ });
262
+ case "timeout":
263
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling DELETE /v1/blocks/{block_id}.");
264
+ case "unknown":
265
+ throw new errors.LettaError({
266
+ message: _response.error.errorMessage,
267
+ });
268
+ }
269
+ });
270
+ }
271
+ /**
272
+ * @param {string} blockId
273
+ * @param {Letta.BlockUpdate} request
274
+ * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
275
+ *
276
+ * @throws {@link Letta.UnprocessableEntityError}
277
+ *
278
+ * @example
279
+ * await client.blocks.update("block_id", {})
280
+ */
281
+ update(blockId, request, requestOptions) {
282
+ var _a, _b;
283
+ return __awaiter(this, void 0, void 0, function* () {
284
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
285
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/blocks/${encodeURIComponent(blockId)}`),
286
+ method: "PATCH",
287
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
288
+ contentType: "application/json",
289
+ requestType: "json",
290
+ body: request,
291
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
292
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
293
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
294
+ });
295
+ if (_response.ok) {
296
+ return _response.body;
297
+ }
298
+ if (_response.error.reason === "status-code") {
299
+ switch (_response.error.statusCode) {
300
+ case 422:
301
+ throw new Letta.UnprocessableEntityError(_response.error.body);
302
+ default:
303
+ throw new errors.LettaError({
304
+ statusCode: _response.error.statusCode,
305
+ body: _response.error.body,
306
+ });
307
+ }
308
+ }
309
+ switch (_response.error.reason) {
310
+ case "non-json":
311
+ throw new errors.LettaError({
312
+ statusCode: _response.error.statusCode,
313
+ body: _response.error.rawBody,
314
+ });
315
+ case "timeout":
316
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/blocks/{block_id}.");
317
+ case "unknown":
318
+ throw new errors.LettaError({
319
+ message: _response.error.errorMessage,
320
+ });
321
+ }
322
+ });
323
+ }
324
+ /**
325
+ * Link a memory block to an agent.
326
+ *
327
+ * @param {string} blockId
328
+ * @param {Letta.LinkAgentMemoryBlockRequest} request
329
+ * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
330
+ *
331
+ * @throws {@link Letta.UnprocessableEntityError}
332
+ *
333
+ * @example
334
+ * await client.blocks.linkAgentMemoryBlock("block_id", {
335
+ * agent_id: "agent_id"
336
+ * })
337
+ */
338
+ linkAgentMemoryBlock(blockId, request, requestOptions) {
339
+ var _a, _b;
340
+ return __awaiter(this, void 0, void 0, function* () {
341
+ const { agent_id: agentId } = request;
342
+ const _queryParams = {};
343
+ _queryParams["agent_id"] = agentId;
344
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
345
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/blocks/${encodeURIComponent(blockId)}/attach`),
346
+ method: "PATCH",
347
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
348
+ contentType: "application/json",
349
+ queryParameters: _queryParams,
350
+ requestType: "json",
351
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
352
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
353
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
354
+ });
355
+ if (_response.ok) {
356
+ return;
357
+ }
358
+ if (_response.error.reason === "status-code") {
359
+ switch (_response.error.statusCode) {
360
+ case 422:
361
+ throw new Letta.UnprocessableEntityError(_response.error.body);
362
+ default:
363
+ throw new errors.LettaError({
364
+ statusCode: _response.error.statusCode,
365
+ body: _response.error.body,
366
+ });
367
+ }
368
+ }
369
+ switch (_response.error.reason) {
370
+ case "non-json":
371
+ throw new errors.LettaError({
372
+ statusCode: _response.error.statusCode,
373
+ body: _response.error.rawBody,
374
+ });
375
+ case "timeout":
376
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/blocks/{block_id}/attach.");
377
+ case "unknown":
378
+ throw new errors.LettaError({
379
+ message: _response.error.errorMessage,
380
+ });
381
+ }
382
+ });
383
+ }
384
+ /**
385
+ * Unlink a memory block from an agent
386
+ *
387
+ * @param {string} blockId
388
+ * @param {Letta.UnlinkAgentMemoryBlockRequest} request
389
+ * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
390
+ *
391
+ * @throws {@link Letta.UnprocessableEntityError}
392
+ *
393
+ * @example
394
+ * await client.blocks.unlinkAgentMemoryBlock("block_id", {
395
+ * agent_id: "agent_id"
396
+ * })
397
+ */
398
+ unlinkAgentMemoryBlock(blockId, request, requestOptions) {
399
+ var _a, _b;
400
+ return __awaiter(this, void 0, void 0, function* () {
401
+ const { agent_id: agentId } = request;
402
+ const _queryParams = {};
403
+ _queryParams["agent_id"] = agentId;
404
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
405
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/blocks/${encodeURIComponent(blockId)}/detach`),
406
+ method: "PATCH",
407
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
408
+ contentType: "application/json",
409
+ queryParameters: _queryParams,
410
+ requestType: "json",
411
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
412
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
413
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
414
+ });
415
+ if (_response.ok) {
416
+ return;
417
+ }
418
+ if (_response.error.reason === "status-code") {
419
+ switch (_response.error.statusCode) {
420
+ case 422:
421
+ throw new Letta.UnprocessableEntityError(_response.error.body);
422
+ default:
423
+ throw new errors.LettaError({
424
+ statusCode: _response.error.statusCode,
425
+ body: _response.error.body,
426
+ });
427
+ }
428
+ }
429
+ switch (_response.error.reason) {
430
+ case "non-json":
431
+ throw new errors.LettaError({
432
+ statusCode: _response.error.statusCode,
433
+ body: _response.error.rawBody,
434
+ });
435
+ case "timeout":
436
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/blocks/{block_id}/detach.");
437
+ case "unknown":
438
+ throw new errors.LettaError({
439
+ message: _response.error.errorMessage,
440
+ });
441
+ }
442
+ });
443
+ }
444
+ _getAuthorizationHeader() {
445
+ return __awaiter(this, void 0, void 0, function* () {
446
+ return `Bearer ${yield core.Supplier.get(this._options.token)}`;
447
+ });
448
+ }
449
+ }
450
+ exports.Blocks = Blocks;
@@ -0,0 +1 @@
1
+ export * from "./requests";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests"), exports);
@@ -0,0 +1,21 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface BlocksListRequest {
9
+ /**
10
+ * Labels to include (e.g. human, persona)
11
+ */
12
+ label?: string;
13
+ /**
14
+ * Whether to include only templates
15
+ */
16
+ templates_only?: boolean;
17
+ /**
18
+ * Name of the block
19
+ */
20
+ name?: string;
21
+ }