@letta-ai/letta-client 0.1.97 → 0.1.99

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 (606) hide show
  1. package/Client.d.ts +9 -0
  2. package/Client.js +39 -24
  3. package/api/resources/agents/client/Client.d.ts +13 -44
  4. package/api/resources/agents/client/Client.js +63 -228
  5. package/api/resources/agents/client/requests/index.d.ts +0 -3
  6. package/api/resources/agents/resources/blocks/client/Client.js +5 -5
  7. package/api/resources/agents/resources/context/client/Client.js +1 -1
  8. package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  9. package/api/resources/agents/resources/groups/client/Client.d.ts +45 -0
  10. package/api/resources/agents/resources/groups/client/Client.js +141 -0
  11. package/api/resources/agents/{client/requests/ListAgentGroupsRequest.d.ts → resources/groups/client/requests/GroupsListRequest.d.ts} +1 -1
  12. package/api/resources/agents/resources/groups/client/requests/index.d.ts +1 -0
  13. package/api/resources/agents/resources/index.d.ts +2 -0
  14. package/api/resources/agents/resources/index.js +3 -1
  15. package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  16. package/api/resources/agents/resources/messages/client/Client.d.ts +13 -0
  17. package/api/resources/agents/resources/messages/client/Client.js +77 -5
  18. package/{dist/api/resources/agents/client/requests/ResetMessagesRequest.d.ts → api/resources/agents/resources/messages/client/requests/MessagesResetRequest.d.ts} +1 -1
  19. package/api/resources/agents/resources/messages/client/requests/index.d.ts +1 -0
  20. package/api/resources/agents/resources/passages/client/Client.d.ts +16 -0
  21. package/api/resources/agents/resources/passages/client/Client.js +73 -3
  22. package/api/resources/agents/{client → resources/passages/client}/requests/PassageUpdate.d.ts +1 -1
  23. package/api/resources/agents/resources/passages/client/requests/index.d.ts +1 -0
  24. package/api/resources/agents/resources/sources/client/Client.js +3 -3
  25. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  26. package/api/resources/agents/resources/tools/client/Client.js +3 -3
  27. package/api/resources/{messages/resources/batches → batches}/client/Client.d.ts +9 -9
  28. package/api/resources/{messages/resources/batches → batches}/client/Client.js +16 -16
  29. package/api/resources/{messages/resources/batches → batches}/client/requests/CreateBatch.d.ts +1 -1
  30. package/api/resources/blocks/client/Client.d.ts +3 -13
  31. package/api/resources/blocks/client/Client.js +10 -71
  32. package/api/resources/blocks/index.d.ts +1 -0
  33. package/api/resources/blocks/index.js +1 -0
  34. package/api/resources/blocks/resources/agents/client/Client.d.ts +45 -0
  35. package/api/resources/blocks/resources/agents/client/Client.js +135 -0
  36. package/api/resources/blocks/resources/agents/client/index.d.ts +1 -0
  37. package/api/resources/blocks/resources/agents/client/index.js +2 -0
  38. package/api/resources/blocks/resources/index.d.ts +1 -0
  39. package/api/resources/blocks/resources/index.js +37 -0
  40. package/api/resources/clientSideAccessTokens/client/Client.js +2 -2
  41. package/api/resources/embeddings/client/Client.d.ts +39 -0
  42. package/api/resources/embeddings/client/Client.js +117 -0
  43. package/api/resources/embeddings/client/index.d.ts +1 -0
  44. package/api/resources/embeddings/client/index.js +2 -0
  45. package/api/resources/groups/client/Client.d.ts +0 -12
  46. package/api/resources/groups/client/Client.js +5 -64
  47. package/api/resources/groups/resources/messages/client/Client.d.ts +12 -0
  48. package/api/resources/groups/resources/messages/client/Client.js +63 -4
  49. package/api/resources/health/client/Client.js +1 -1
  50. package/api/resources/identities/client/Client.d.ts +3 -15
  51. package/api/resources/identities/client/Client.js +11 -71
  52. package/api/resources/identities/index.d.ts +1 -0
  53. package/api/resources/identities/index.js +1 -0
  54. package/api/resources/identities/resources/index.d.ts +1 -0
  55. package/api/resources/identities/resources/index.js +37 -0
  56. package/api/resources/identities/resources/properties/client/Client.d.ts +47 -0
  57. package/api/resources/identities/resources/properties/client/Client.js +134 -0
  58. package/api/resources/identities/resources/properties/client/index.d.ts +1 -0
  59. package/api/resources/identities/resources/properties/client/index.js +2 -0
  60. package/api/resources/identities/resources/properties/index.d.ts +1 -0
  61. package/api/resources/identities/resources/properties/index.js +17 -0
  62. package/api/resources/index.d.ts +4 -0
  63. package/api/resources/index.js +5 -1
  64. package/api/resources/jobs/client/Client.js +4 -4
  65. package/api/resources/messages/client/Client.d.ts +0 -3
  66. package/api/resources/messages/client/Client.js +1 -6
  67. package/api/resources/messages/index.d.ts +0 -1
  68. package/api/resources/messages/index.js +0 -1
  69. package/api/resources/models/client/Client.d.ts +2 -9
  70. package/api/resources/models/client/Client.js +4 -53
  71. package/api/resources/projects/client/Client.js +1 -1
  72. package/api/resources/providers/client/Client.d.ts +21 -5
  73. package/api/resources/providers/client/Client.js +98 -10
  74. package/api/resources/providers/client/requests/{ListProvidersRequest.d.ts → ProvidersListRequest.d.ts} +1 -1
  75. package/api/resources/providers/client/requests/index.d.ts +1 -1
  76. package/api/resources/runs/client/Client.d.ts +18 -63
  77. package/api/resources/runs/client/Client.js +36 -231
  78. package/{dist/api/resources/runs/client/requests/ListActiveRunsRequest.d.ts → api/resources/runs/client/requests/RunsListActiveRequest.d.ts} +1 -1
  79. package/api/resources/runs/client/requests/index.d.ts +1 -3
  80. package/api/resources/runs/index.d.ts +1 -0
  81. package/api/resources/runs/index.js +1 -0
  82. package/api/resources/runs/resources/index.d.ts +5 -0
  83. package/api/resources/runs/resources/index.js +44 -0
  84. package/api/resources/runs/resources/messages/client/Client.d.ts +58 -0
  85. package/api/resources/runs/resources/messages/client/Client.js +166 -0
  86. package/{dist/api/resources/runs/client/requests/ListRunMessagesRequest.d.ts → api/resources/runs/resources/messages/client/requests/MessagesListRequest.d.ts} +2 -2
  87. package/api/resources/runs/resources/messages/client/requests/index.d.ts +1 -0
  88. package/api/resources/runs/resources/messages/client/requests/index.js +2 -0
  89. package/api/resources/runs/resources/messages/index.d.ts +1 -0
  90. package/api/resources/runs/resources/messages/index.js +17 -0
  91. package/api/resources/runs/resources/steps/client/Client.d.ts +55 -0
  92. package/api/resources/runs/resources/steps/client/Client.js +160 -0
  93. package/api/resources/runs/{client/requests/ListRunStepsRequest.d.ts → resources/steps/client/requests/StepsListRequest.d.ts} +1 -1
  94. package/api/resources/runs/resources/steps/client/requests/index.d.ts +1 -0
  95. package/api/resources/runs/resources/steps/client/requests/index.js +2 -0
  96. package/api/resources/runs/resources/steps/index.d.ts +1 -0
  97. package/api/resources/runs/resources/steps/index.js +17 -0
  98. package/api/resources/runs/resources/usage/client/Client.d.ts +44 -0
  99. package/api/resources/runs/resources/usage/client/Client.js +134 -0
  100. package/api/resources/runs/resources/usage/client/index.d.ts +1 -0
  101. package/api/resources/runs/resources/usage/client/index.js +2 -0
  102. package/api/resources/runs/resources/usage/index.d.ts +1 -0
  103. package/api/resources/runs/resources/usage/index.js +17 -0
  104. package/api/resources/sources/client/Client.d.ts +2 -2
  105. package/api/resources/sources/client/Client.js +9 -9
  106. package/api/resources/sources/resources/files/client/Client.js +3 -3
  107. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  108. package/api/resources/steps/client/Client.d.ts +9 -2
  109. package/api/resources/steps/client/Client.js +47 -4
  110. package/api/resources/tag/client/Client.js +1 -1
  111. package/api/resources/tags/client/Client.d.ts +38 -0
  112. package/api/resources/tags/client/Client.js +110 -0
  113. package/api/resources/tags/client/index.d.ts +1 -0
  114. package/api/resources/tags/client/index.js +2 -0
  115. package/api/resources/tags/index.d.ts +1 -0
  116. package/api/resources/tags/index.js +17 -0
  117. package/api/resources/templates/client/Client.d.ts +3 -12
  118. package/api/resources/templates/client/Client.js +6 -56
  119. package/api/resources/templates/client/requests/index.d.ts +0 -1
  120. package/api/resources/templates/index.d.ts +1 -0
  121. package/api/resources/templates/index.js +1 -0
  122. package/api/resources/templates/resources/agents/client/Client.d.ts +44 -0
  123. package/api/resources/templates/resources/agents/client/Client.js +123 -0
  124. package/api/resources/templates/resources/agents/client/index.d.ts +1 -0
  125. package/api/resources/templates/resources/agents/client/index.js +17 -0
  126. package/{dist/api/resources/templates/client/requests/TemplatesCreateAgentsRequest.d.ts → api/resources/templates/resources/agents/client/requests/AgentsCreateRequest.d.ts} +1 -1
  127. package/api/resources/templates/resources/agents/client/requests/index.d.ts +1 -0
  128. package/api/resources/templates/resources/agents/client/requests/index.js +2 -0
  129. package/api/resources/templates/resources/agents/index.d.ts +2 -0
  130. package/api/resources/templates/resources/agents/index.js +18 -0
  131. package/api/resources/templates/{types/TemplatesCreateAgentsResponse.d.ts → resources/agents/types/AgentsCreateResponse.d.ts} +2 -2
  132. package/api/resources/templates/resources/agents/types/index.d.ts +1 -0
  133. package/api/resources/templates/resources/agents/types/index.js +17 -0
  134. package/api/resources/templates/resources/index.d.ts +3 -0
  135. package/api/resources/{messages → templates}/resources/index.js +4 -3
  136. package/api/resources/templates/types/index.d.ts +0 -1
  137. package/api/resources/templates/types/index.js +0 -1
  138. package/api/resources/tools/client/Client.d.ts +2 -2
  139. package/api/resources/tools/client/Client.js +19 -19
  140. package/api/resources/voice/client/Client.js +1 -1
  141. package/dist/Client.d.ts +9 -0
  142. package/dist/Client.js +39 -24
  143. package/dist/api/resources/agents/client/Client.d.ts +13 -44
  144. package/dist/api/resources/agents/client/Client.js +63 -228
  145. package/dist/api/resources/agents/client/requests/index.d.ts +0 -3
  146. package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
  147. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  148. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  149. package/dist/api/resources/agents/resources/groups/client/Client.d.ts +45 -0
  150. package/dist/api/resources/agents/resources/groups/client/Client.js +141 -0
  151. package/dist/api/resources/agents/resources/groups/client/index.d.ts +1 -0
  152. package/dist/api/resources/agents/resources/groups/client/index.js +17 -0
  153. package/dist/api/resources/agents/{client/requests/ListAgentGroupsRequest.d.ts → resources/groups/client/requests/GroupsListRequest.d.ts} +1 -1
  154. package/dist/api/resources/agents/resources/groups/client/requests/index.d.ts +1 -0
  155. package/dist/api/resources/agents/resources/groups/client/requests/index.js +2 -0
  156. package/dist/api/resources/agents/resources/groups/index.d.ts +1 -0
  157. package/dist/api/resources/agents/resources/groups/index.js +17 -0
  158. package/dist/api/resources/agents/resources/index.d.ts +2 -0
  159. package/dist/api/resources/agents/resources/index.js +3 -1
  160. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  161. package/dist/api/resources/agents/resources/messages/client/Client.d.ts +13 -0
  162. package/dist/api/resources/agents/resources/messages/client/Client.js +77 -5
  163. package/{api/resources/agents/client/requests/ResetMessagesRequest.d.ts → dist/api/resources/agents/resources/messages/client/requests/MessagesResetRequest.d.ts} +1 -1
  164. package/dist/api/resources/agents/resources/messages/client/requests/index.d.ts +1 -0
  165. package/dist/api/resources/agents/resources/passages/client/Client.d.ts +16 -0
  166. package/dist/api/resources/agents/resources/passages/client/Client.js +73 -3
  167. package/dist/api/resources/agents/{client → resources/passages/client}/requests/PassageUpdate.d.ts +1 -1
  168. package/dist/api/resources/agents/resources/passages/client/requests/index.d.ts +1 -0
  169. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  170. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  171. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  172. package/dist/api/resources/{messages/resources/batches → batches}/client/Client.d.ts +9 -9
  173. package/dist/api/resources/{messages/resources/batches → batches}/client/Client.js +16 -16
  174. package/dist/api/resources/batches/client/index.d.ts +1 -0
  175. package/dist/api/resources/batches/client/index.js +17 -0
  176. package/dist/api/resources/{messages/resources/batches → batches}/client/requests/CreateBatch.d.ts +1 -1
  177. package/dist/api/resources/batches/client/requests/index.js +2 -0
  178. package/dist/api/resources/batches/index.d.ts +1 -0
  179. package/dist/api/resources/batches/index.js +17 -0
  180. package/dist/api/resources/blocks/client/Client.d.ts +3 -13
  181. package/dist/api/resources/blocks/client/Client.js +10 -71
  182. package/dist/api/resources/blocks/index.d.ts +1 -0
  183. package/dist/api/resources/blocks/index.js +1 -0
  184. package/dist/api/resources/blocks/resources/agents/client/Client.d.ts +45 -0
  185. package/dist/api/resources/blocks/resources/agents/client/Client.js +135 -0
  186. package/dist/api/resources/blocks/resources/agents/client/index.d.ts +1 -0
  187. package/dist/api/resources/blocks/resources/agents/client/index.js +2 -0
  188. package/dist/api/resources/blocks/resources/agents/index.d.ts +1 -0
  189. package/dist/api/resources/blocks/resources/agents/index.js +17 -0
  190. package/dist/api/resources/blocks/resources/index.d.ts +1 -0
  191. package/dist/api/resources/blocks/resources/index.js +37 -0
  192. package/dist/api/resources/clientSideAccessTokens/client/Client.js +2 -2
  193. package/dist/api/resources/embeddings/client/Client.d.ts +39 -0
  194. package/dist/api/resources/embeddings/client/Client.js +117 -0
  195. package/dist/api/resources/embeddings/client/index.d.ts +1 -0
  196. package/dist/api/resources/embeddings/client/index.js +2 -0
  197. package/dist/api/resources/embeddings/index.d.ts +1 -0
  198. package/dist/api/resources/embeddings/index.js +17 -0
  199. package/dist/api/resources/groups/client/Client.d.ts +0 -12
  200. package/dist/api/resources/groups/client/Client.js +5 -64
  201. package/dist/api/resources/groups/resources/messages/client/Client.d.ts +12 -0
  202. package/dist/api/resources/groups/resources/messages/client/Client.js +63 -4
  203. package/dist/api/resources/health/client/Client.js +1 -1
  204. package/dist/api/resources/identities/client/Client.d.ts +3 -15
  205. package/dist/api/resources/identities/client/Client.js +11 -71
  206. package/dist/api/resources/identities/index.d.ts +1 -0
  207. package/dist/api/resources/identities/index.js +1 -0
  208. package/dist/api/resources/identities/resources/index.d.ts +1 -0
  209. package/dist/api/resources/identities/resources/index.js +37 -0
  210. package/dist/api/resources/identities/resources/properties/client/Client.d.ts +47 -0
  211. package/dist/api/resources/identities/resources/properties/client/Client.js +134 -0
  212. package/dist/api/resources/identities/resources/properties/client/index.d.ts +1 -0
  213. package/dist/api/resources/identities/resources/properties/client/index.js +2 -0
  214. package/dist/api/resources/identities/resources/properties/index.d.ts +1 -0
  215. package/dist/api/resources/identities/resources/properties/index.js +17 -0
  216. package/dist/api/resources/index.d.ts +4 -0
  217. package/dist/api/resources/index.js +5 -1
  218. package/dist/api/resources/jobs/client/Client.js +4 -4
  219. package/dist/api/resources/messages/client/Client.d.ts +0 -3
  220. package/dist/api/resources/messages/client/Client.js +1 -6
  221. package/dist/api/resources/messages/index.d.ts +0 -1
  222. package/dist/api/resources/messages/index.js +0 -1
  223. package/dist/api/resources/models/client/Client.d.ts +2 -9
  224. package/dist/api/resources/models/client/Client.js +4 -53
  225. package/dist/api/resources/projects/client/Client.js +1 -1
  226. package/dist/api/resources/providers/client/Client.d.ts +21 -5
  227. package/dist/api/resources/providers/client/Client.js +98 -10
  228. package/dist/api/resources/providers/client/requests/{ListProvidersRequest.d.ts → ProvidersListRequest.d.ts} +1 -1
  229. package/dist/api/resources/providers/client/requests/index.d.ts +1 -1
  230. package/dist/api/resources/runs/client/Client.d.ts +18 -63
  231. package/dist/api/resources/runs/client/Client.js +36 -231
  232. package/{api/resources/runs/client/requests/ListActiveRunsRequest.d.ts → dist/api/resources/runs/client/requests/RunsListActiveRequest.d.ts} +1 -1
  233. package/dist/api/resources/runs/client/requests/index.d.ts +1 -3
  234. package/dist/api/resources/runs/index.d.ts +1 -0
  235. package/dist/api/resources/runs/index.js +1 -0
  236. package/dist/api/resources/runs/resources/index.d.ts +5 -0
  237. package/dist/api/resources/runs/resources/index.js +44 -0
  238. package/dist/api/resources/runs/resources/messages/client/Client.d.ts +58 -0
  239. package/dist/api/resources/runs/resources/messages/client/Client.js +166 -0
  240. package/dist/api/resources/runs/resources/messages/client/index.d.ts +1 -0
  241. package/dist/api/resources/runs/resources/messages/client/index.js +17 -0
  242. package/{api/resources/runs/client/requests/ListRunMessagesRequest.d.ts → dist/api/resources/runs/resources/messages/client/requests/MessagesListRequest.d.ts} +2 -2
  243. package/dist/api/resources/runs/resources/messages/client/requests/index.d.ts +1 -0
  244. package/dist/api/resources/runs/resources/messages/client/requests/index.js +2 -0
  245. package/dist/api/resources/runs/resources/messages/index.d.ts +1 -0
  246. package/dist/api/resources/runs/resources/messages/index.js +17 -0
  247. package/dist/api/resources/runs/resources/steps/client/Client.d.ts +55 -0
  248. package/dist/api/resources/runs/resources/steps/client/Client.js +160 -0
  249. package/dist/api/resources/runs/resources/steps/client/index.d.ts +1 -0
  250. package/dist/api/resources/runs/resources/steps/client/index.js +17 -0
  251. package/dist/api/resources/runs/{client/requests/ListRunStepsRequest.d.ts → resources/steps/client/requests/StepsListRequest.d.ts} +1 -1
  252. package/dist/api/resources/runs/resources/steps/client/requests/index.d.ts +1 -0
  253. package/dist/api/resources/runs/resources/steps/client/requests/index.js +2 -0
  254. package/dist/api/resources/runs/resources/steps/index.d.ts +1 -0
  255. package/dist/api/resources/runs/resources/steps/index.js +17 -0
  256. package/dist/api/resources/runs/resources/usage/client/Client.d.ts +44 -0
  257. package/dist/api/resources/runs/resources/usage/client/Client.js +134 -0
  258. package/dist/api/resources/runs/resources/usage/client/index.d.ts +1 -0
  259. package/dist/api/resources/runs/resources/usage/client/index.js +2 -0
  260. package/dist/api/resources/runs/resources/usage/index.d.ts +1 -0
  261. package/dist/api/resources/runs/resources/usage/index.js +17 -0
  262. package/dist/api/resources/sources/client/Client.d.ts +2 -2
  263. package/dist/api/resources/sources/client/Client.js +9 -9
  264. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  265. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  266. package/dist/api/resources/steps/client/Client.d.ts +9 -2
  267. package/dist/api/resources/steps/client/Client.js +47 -4
  268. package/dist/api/resources/tag/client/Client.js +1 -1
  269. package/dist/api/resources/tags/client/Client.d.ts +38 -0
  270. package/dist/api/resources/tags/client/Client.js +110 -0
  271. package/dist/api/resources/tags/client/index.d.ts +1 -0
  272. package/dist/api/resources/tags/client/index.js +2 -0
  273. package/dist/api/resources/tags/index.d.ts +1 -0
  274. package/dist/api/resources/tags/index.js +17 -0
  275. package/dist/api/resources/templates/client/Client.d.ts +3 -12
  276. package/dist/api/resources/templates/client/Client.js +6 -56
  277. package/dist/api/resources/templates/client/requests/index.d.ts +0 -1
  278. package/dist/api/resources/templates/index.d.ts +1 -0
  279. package/dist/api/resources/templates/index.js +1 -0
  280. package/dist/api/resources/templates/resources/agents/client/Client.d.ts +44 -0
  281. package/dist/api/resources/templates/resources/agents/client/Client.js +123 -0
  282. package/dist/api/resources/templates/resources/agents/client/index.d.ts +1 -0
  283. package/dist/api/resources/templates/resources/agents/client/index.js +17 -0
  284. package/{api/resources/templates/client/requests/TemplatesCreateAgentsRequest.d.ts → dist/api/resources/templates/resources/agents/client/requests/AgentsCreateRequest.d.ts} +1 -1
  285. package/dist/api/resources/templates/resources/agents/client/requests/index.d.ts +1 -0
  286. package/dist/api/resources/templates/resources/agents/client/requests/index.js +2 -0
  287. package/dist/api/resources/templates/resources/agents/index.d.ts +2 -0
  288. package/dist/api/resources/templates/resources/agents/index.js +18 -0
  289. package/dist/api/resources/templates/{types/TemplatesCreateAgentsResponse.d.ts → resources/agents/types/AgentsCreateResponse.d.ts} +2 -2
  290. package/dist/api/resources/templates/resources/agents/types/index.d.ts +1 -0
  291. package/dist/api/resources/templates/resources/agents/types/index.js +17 -0
  292. package/dist/api/resources/templates/resources/index.d.ts +3 -0
  293. package/dist/{serialization/resources/messages → api/resources/templates}/resources/index.js +4 -3
  294. package/dist/api/resources/templates/types/index.d.ts +0 -1
  295. package/dist/api/resources/templates/types/index.js +0 -1
  296. package/dist/api/resources/tools/client/Client.d.ts +2 -2
  297. package/dist/api/resources/tools/client/Client.js +19 -19
  298. package/dist/api/resources/voice/client/Client.js +1 -1
  299. package/dist/serialization/resources/agents/client/index.d.ts +0 -2
  300. package/dist/serialization/resources/agents/client/index.js +1 -3
  301. package/dist/serialization/resources/agents/client/requests/index.d.ts +0 -1
  302. package/dist/serialization/resources/agents/client/requests/index.js +1 -3
  303. package/dist/serialization/resources/agents/resources/groups/client/index.d.ts +1 -0
  304. package/dist/serialization/resources/agents/resources/groups/client/index.js +37 -0
  305. package/{serialization/resources/messages/resources/batches → dist/serialization/resources/agents/resources/groups}/client/list.d.ts +3 -3
  306. package/{serialization/resources/agents/client/listAgentGroups.js → dist/serialization/resources/agents/resources/groups/client/list.js} +2 -2
  307. package/dist/serialization/resources/agents/resources/groups/index.d.ts +1 -0
  308. package/dist/serialization/resources/agents/resources/groups/index.js +17 -0
  309. package/dist/serialization/resources/agents/resources/index.d.ts +1 -0
  310. package/dist/serialization/resources/agents/resources/index.js +2 -1
  311. package/dist/serialization/resources/agents/resources/passages/client/index.d.ts +1 -0
  312. package/dist/serialization/resources/agents/resources/passages/client/index.js +2 -1
  313. package/dist/serialization/resources/agents/resources/passages/client/modify.d.ts +11 -0
  314. package/{serialization/resources/agents/client/modifyPassage.js → dist/serialization/resources/agents/resources/passages/client/modify.js} +2 -2
  315. package/dist/serialization/resources/agents/{client → resources/passages/client}/requests/PassageUpdate.d.ts +5 -5
  316. package/{serialization/resources/agents → dist/serialization/resources/agents/resources/passages}/client/requests/PassageUpdate.js +2 -2
  317. package/dist/serialization/resources/agents/resources/passages/client/requests/index.d.ts +1 -0
  318. package/dist/serialization/resources/agents/resources/passages/client/requests/index.js +3 -1
  319. package/dist/serialization/resources/{agents/client/listAgentGroups.d.ts → batches/client/list.d.ts} +3 -3
  320. package/dist/serialization/resources/{agents/client/modifyPassage.js → batches/client/list.js} +2 -2
  321. package/dist/serialization/resources/batches/client/requests/CreateBatch.d.ts +14 -0
  322. package/dist/serialization/resources/{messages/resources/batches → batches}/client/requests/CreateBatch.js +2 -2
  323. package/dist/serialization/resources/batches/index.d.ts +1 -0
  324. package/dist/serialization/resources/batches/index.js +17 -0
  325. package/dist/serialization/resources/blocks/client/index.d.ts +0 -1
  326. package/dist/serialization/resources/blocks/client/index.js +1 -2
  327. package/dist/serialization/resources/blocks/index.d.ts +1 -0
  328. package/dist/serialization/resources/blocks/index.js +1 -0
  329. package/dist/serialization/resources/blocks/resources/agents/client/index.d.ts +1 -0
  330. package/dist/serialization/resources/blocks/resources/agents/client/index.js +37 -0
  331. package/dist/serialization/resources/blocks/resources/agents/client/list.d.ts +11 -0
  332. package/dist/serialization/resources/blocks/{client/listAgentsForBlock.js → resources/agents/client/list.js} +2 -2
  333. package/dist/serialization/resources/blocks/resources/agents/index.d.ts +1 -0
  334. package/dist/serialization/resources/blocks/resources/agents/index.js +17 -0
  335. package/dist/serialization/resources/blocks/resources/index.d.ts +1 -0
  336. package/dist/serialization/resources/blocks/resources/index.js +37 -0
  337. package/dist/serialization/resources/embeddings/client/index.d.ts +1 -0
  338. package/dist/serialization/resources/embeddings/client/index.js +37 -0
  339. package/{serialization/resources/models/client/listEmbeddingModels.d.ts → dist/serialization/resources/embeddings/client/list.d.ts} +1 -1
  340. package/dist/serialization/resources/embeddings/index.d.ts +1 -0
  341. package/dist/serialization/resources/embeddings/index.js +17 -0
  342. package/dist/serialization/resources/identities/client/index.d.ts +0 -1
  343. package/dist/serialization/resources/identities/client/index.js +1 -2
  344. package/dist/serialization/resources/identities/index.d.ts +1 -0
  345. package/dist/serialization/resources/identities/index.js +1 -0
  346. package/dist/serialization/resources/identities/resources/index.d.ts +1 -0
  347. package/dist/serialization/resources/identities/resources/index.js +37 -0
  348. package/dist/serialization/resources/identities/resources/properties/client/index.d.ts +1 -0
  349. package/dist/serialization/resources/identities/resources/properties/client/index.js +37 -0
  350. package/dist/serialization/resources/identities/resources/properties/client/upsert.d.ts +11 -0
  351. package/dist/serialization/resources/identities/{client/upsertIdentityProperties.js → resources/properties/client/upsert.js} +2 -2
  352. package/dist/serialization/resources/identities/resources/properties/index.d.ts +1 -0
  353. package/dist/serialization/resources/identities/resources/properties/index.js +17 -0
  354. package/dist/serialization/resources/index.d.ts +3 -2
  355. package/dist/serialization/resources/index.js +4 -3
  356. package/dist/serialization/resources/models/client/index.d.ts +1 -2
  357. package/dist/serialization/resources/models/client/index.js +2 -3
  358. package/{serialization/resources/models/client/listLlms.d.ts → dist/serialization/resources/models/client/list.d.ts} +1 -1
  359. package/dist/serialization/resources/providers/client/index.d.ts +1 -1
  360. package/dist/serialization/resources/providers/client/index.js +2 -2
  361. package/{serialization/resources/providers/client/listProviders.d.ts → dist/serialization/resources/providers/client/list.d.ts} +1 -1
  362. package/dist/serialization/resources/runs/client/index.d.ts +1 -3
  363. package/dist/serialization/resources/runs/client/index.js +2 -4
  364. package/{serialization/resources/runs/client/listActiveRuns.d.ts → dist/serialization/resources/runs/client/listActive.d.ts} +1 -1
  365. package/dist/serialization/resources/runs/index.d.ts +1 -0
  366. package/dist/serialization/resources/runs/index.js +1 -0
  367. package/dist/serialization/resources/runs/resources/index.d.ts +2 -0
  368. package/dist/serialization/resources/runs/resources/index.js +38 -0
  369. package/dist/serialization/resources/runs/resources/messages/client/index.d.ts +1 -0
  370. package/dist/serialization/resources/runs/resources/messages/client/index.js +37 -0
  371. package/dist/serialization/resources/runs/resources/messages/client/list.d.ts +11 -0
  372. package/dist/serialization/resources/runs/{client/listRunMessages.js → resources/messages/client/list.js} +2 -2
  373. package/dist/serialization/resources/runs/resources/messages/index.d.ts +1 -0
  374. package/dist/serialization/resources/runs/resources/messages/index.js +17 -0
  375. package/dist/serialization/resources/runs/resources/steps/client/index.d.ts +1 -0
  376. package/dist/serialization/resources/runs/resources/steps/client/index.js +37 -0
  377. package/dist/serialization/resources/{messages/resources/batches → runs/resources/steps}/client/list.d.ts +3 -3
  378. package/dist/serialization/resources/runs/{client/listRunSteps.js → resources/steps/client/list.js} +2 -2
  379. package/dist/serialization/resources/runs/resources/steps/index.d.ts +1 -0
  380. package/dist/serialization/resources/runs/resources/steps/index.js +17 -0
  381. package/dist/serialization/resources/sources/client/index.d.ts +1 -1
  382. package/dist/serialization/resources/sources/client/index.js +2 -2
  383. package/dist/serialization/resources/sources/client/{getByName.d.ts → retrieveByName.d.ts} +1 -1
  384. package/dist/serialization/resources/templates/index.d.ts +1 -1
  385. package/dist/serialization/resources/templates/index.js +1 -1
  386. package/dist/serialization/resources/templates/resources/agents/client/index.d.ts +1 -0
  387. package/dist/serialization/resources/templates/resources/agents/client/index.js +17 -0
  388. package/dist/serialization/resources/templates/resources/agents/client/requests/AgentsCreateRequest.d.ts +16 -0
  389. package/{serialization/resources/templates/client/requests/TemplatesCreateAgentsRequest.js → dist/serialization/resources/templates/resources/agents/client/requests/AgentsCreateRequest.js} +3 -3
  390. package/dist/serialization/resources/templates/resources/agents/client/requests/index.d.ts +1 -0
  391. package/dist/serialization/resources/templates/resources/agents/client/requests/index.js +5 -0
  392. package/dist/serialization/resources/templates/resources/agents/index.d.ts +2 -0
  393. package/dist/serialization/resources/templates/resources/agents/index.js +18 -0
  394. package/dist/serialization/resources/templates/resources/agents/types/AgentsCreateResponse.d.ts +13 -0
  395. package/{serialization/resources/messages/resources/batches/client/list.js → dist/serialization/resources/templates/resources/agents/types/AgentsCreateResponse.js} +5 -3
  396. package/dist/serialization/resources/templates/resources/agents/types/index.d.ts +1 -0
  397. package/dist/serialization/resources/templates/resources/agents/types/index.js +17 -0
  398. package/dist/serialization/resources/templates/resources/index.d.ts +3 -0
  399. package/dist/{api/resources/messages → serialization/resources/templates}/resources/index.js +4 -3
  400. package/dist/serialization/resources/templates/types/index.d.ts +0 -1
  401. package/dist/serialization/resources/templates/types/index.js +0 -1
  402. package/dist/serialization/resources/tools/client/index.d.ts +1 -1
  403. package/dist/serialization/resources/tools/client/index.js +2 -2
  404. package/{serialization/resources/tools/client/addBaseTool.d.ts → dist/serialization/resources/tools/client/upsertBaseTools.d.ts} +1 -1
  405. package/dist/version.d.ts +1 -1
  406. package/dist/version.js +1 -1
  407. package/package.json +1 -1
  408. package/reference.md +910 -628
  409. package/serialization/resources/agents/client/index.d.ts +0 -2
  410. package/serialization/resources/agents/client/index.js +1 -3
  411. package/serialization/resources/agents/client/requests/index.d.ts +0 -1
  412. package/serialization/resources/agents/client/requests/index.js +1 -3
  413. package/serialization/resources/agents/resources/groups/client/index.d.ts +1 -0
  414. package/serialization/resources/agents/resources/groups/client/index.js +37 -0
  415. package/serialization/resources/agents/resources/groups/client/list.d.ts +11 -0
  416. package/{dist/serialization/resources/agents/client/listAgentGroups.js → serialization/resources/agents/resources/groups/client/list.js} +2 -2
  417. package/serialization/resources/agents/resources/groups/index.d.ts +1 -0
  418. package/serialization/resources/agents/resources/groups/index.js +17 -0
  419. package/serialization/resources/agents/resources/index.d.ts +1 -0
  420. package/serialization/resources/agents/resources/index.js +2 -1
  421. package/serialization/resources/agents/resources/passages/client/index.d.ts +1 -0
  422. package/serialization/resources/agents/resources/passages/client/index.js +2 -1
  423. package/serialization/resources/agents/resources/passages/client/modify.d.ts +11 -0
  424. package/{dist/serialization/resources/messages/resources/batches/client/list.js → serialization/resources/agents/resources/passages/client/modify.js} +2 -2
  425. package/serialization/resources/agents/{client → resources/passages/client}/requests/PassageUpdate.d.ts +5 -5
  426. package/{dist/serialization/resources/agents → serialization/resources/agents/resources/passages}/client/requests/PassageUpdate.js +2 -2
  427. package/serialization/resources/agents/resources/passages/client/requests/index.d.ts +1 -0
  428. package/serialization/resources/agents/resources/passages/client/requests/index.js +3 -1
  429. package/{dist/serialization/resources/runs/client/listRunSteps.d.ts → serialization/resources/batches/client/list.d.ts} +3 -3
  430. package/serialization/resources/batches/client/list.js +42 -0
  431. package/serialization/resources/batches/client/requests/CreateBatch.d.ts +14 -0
  432. package/serialization/resources/{messages/resources/batches → batches}/client/requests/CreateBatch.js +2 -2
  433. package/serialization/resources/batches/index.d.ts +1 -0
  434. package/serialization/resources/batches/index.js +17 -0
  435. package/serialization/resources/blocks/client/index.d.ts +0 -1
  436. package/serialization/resources/blocks/client/index.js +1 -2
  437. package/serialization/resources/blocks/index.d.ts +1 -0
  438. package/serialization/resources/blocks/index.js +1 -0
  439. package/serialization/resources/blocks/resources/agents/client/index.d.ts +1 -0
  440. package/serialization/resources/blocks/resources/agents/client/index.js +37 -0
  441. package/serialization/resources/blocks/resources/agents/client/list.d.ts +11 -0
  442. package/serialization/resources/blocks/{client/listAgentsForBlock.js → resources/agents/client/list.js} +2 -2
  443. package/serialization/resources/blocks/resources/agents/index.d.ts +1 -0
  444. package/serialization/resources/blocks/resources/agents/index.js +17 -0
  445. package/serialization/resources/blocks/resources/index.d.ts +1 -0
  446. package/serialization/resources/blocks/resources/index.js +37 -0
  447. package/serialization/resources/embeddings/client/index.d.ts +1 -0
  448. package/serialization/resources/embeddings/client/index.js +37 -0
  449. package/{dist/serialization/resources/models/client/listEmbeddingModels.d.ts → serialization/resources/embeddings/client/list.d.ts} +1 -1
  450. package/serialization/resources/embeddings/index.d.ts +1 -0
  451. package/serialization/resources/embeddings/index.js +17 -0
  452. package/serialization/resources/identities/client/index.d.ts +0 -1
  453. package/serialization/resources/identities/client/index.js +1 -2
  454. package/serialization/resources/identities/index.d.ts +1 -0
  455. package/serialization/resources/identities/index.js +1 -0
  456. package/serialization/resources/identities/resources/index.d.ts +1 -0
  457. package/serialization/resources/identities/resources/index.js +37 -0
  458. package/serialization/resources/identities/resources/properties/client/index.d.ts +1 -0
  459. package/serialization/resources/identities/resources/properties/client/index.js +37 -0
  460. package/serialization/resources/identities/resources/properties/client/upsert.d.ts +11 -0
  461. package/serialization/resources/identities/{client/upsertIdentityProperties.js → resources/properties/client/upsert.js} +2 -2
  462. package/serialization/resources/identities/resources/properties/index.d.ts +1 -0
  463. package/serialization/resources/identities/resources/properties/index.js +17 -0
  464. package/serialization/resources/index.d.ts +3 -2
  465. package/serialization/resources/index.js +4 -3
  466. package/serialization/resources/models/client/index.d.ts +1 -2
  467. package/serialization/resources/models/client/index.js +2 -3
  468. package/{dist/serialization/resources/models/client/listLlms.d.ts → serialization/resources/models/client/list.d.ts} +1 -1
  469. package/serialization/resources/providers/client/index.d.ts +1 -1
  470. package/serialization/resources/providers/client/index.js +2 -2
  471. package/{dist/serialization/resources/providers/client/listProviders.d.ts → serialization/resources/providers/client/list.d.ts} +1 -1
  472. package/serialization/resources/runs/client/index.d.ts +1 -3
  473. package/serialization/resources/runs/client/index.js +2 -4
  474. package/{dist/serialization/resources/runs/client/listActiveRuns.d.ts → serialization/resources/runs/client/listActive.d.ts} +1 -1
  475. package/serialization/resources/runs/index.d.ts +1 -0
  476. package/serialization/resources/runs/index.js +1 -0
  477. package/serialization/resources/runs/resources/index.d.ts +2 -0
  478. package/serialization/resources/runs/resources/index.js +38 -0
  479. package/serialization/resources/runs/resources/messages/client/index.d.ts +1 -0
  480. package/serialization/resources/runs/resources/messages/client/index.js +37 -0
  481. package/serialization/resources/runs/resources/messages/client/list.d.ts +11 -0
  482. package/serialization/resources/runs/{client/listRunMessages.js → resources/messages/client/list.js} +2 -2
  483. package/serialization/resources/runs/resources/messages/index.d.ts +1 -0
  484. package/serialization/resources/runs/resources/messages/index.js +17 -0
  485. package/serialization/resources/runs/resources/steps/client/index.d.ts +1 -0
  486. package/serialization/resources/runs/resources/steps/client/index.js +37 -0
  487. package/serialization/resources/runs/resources/steps/client/list.d.ts +11 -0
  488. package/serialization/resources/runs/{client/listRunSteps.js → resources/steps/client/list.js} +2 -2
  489. package/serialization/resources/runs/resources/steps/index.d.ts +1 -0
  490. package/serialization/resources/runs/resources/steps/index.js +17 -0
  491. package/serialization/resources/sources/client/index.d.ts +1 -1
  492. package/serialization/resources/sources/client/index.js +2 -2
  493. package/serialization/resources/sources/client/{getByName.d.ts → retrieveByName.d.ts} +1 -1
  494. package/serialization/resources/templates/index.d.ts +1 -1
  495. package/serialization/resources/templates/index.js +1 -1
  496. package/serialization/resources/templates/resources/agents/client/index.d.ts +1 -0
  497. package/serialization/resources/templates/resources/agents/client/index.js +17 -0
  498. package/serialization/resources/templates/resources/agents/client/requests/AgentsCreateRequest.d.ts +16 -0
  499. package/{dist/serialization/resources/templates/client/requests/TemplatesCreateAgentsRequest.js → serialization/resources/templates/resources/agents/client/requests/AgentsCreateRequest.js} +3 -3
  500. package/serialization/resources/templates/resources/agents/client/requests/index.d.ts +1 -0
  501. package/serialization/resources/templates/resources/agents/client/requests/index.js +5 -0
  502. package/serialization/resources/templates/resources/agents/index.d.ts +2 -0
  503. package/serialization/resources/templates/resources/agents/index.js +18 -0
  504. package/serialization/resources/templates/resources/agents/types/AgentsCreateResponse.d.ts +13 -0
  505. package/serialization/resources/templates/{types/TemplatesCreateAgentsResponse.js → resources/agents/types/AgentsCreateResponse.js} +4 -4
  506. package/serialization/resources/templates/resources/agents/types/index.d.ts +1 -0
  507. package/serialization/resources/templates/resources/agents/types/index.js +17 -0
  508. package/serialization/resources/templates/resources/index.d.ts +3 -0
  509. package/serialization/resources/templates/resources/index.js +42 -0
  510. package/serialization/resources/templates/types/index.d.ts +0 -1
  511. package/serialization/resources/templates/types/index.js +0 -1
  512. package/serialization/resources/tools/client/index.d.ts +1 -1
  513. package/serialization/resources/tools/client/index.js +2 -2
  514. package/{dist/serialization/resources/tools/client/addBaseTool.d.ts → serialization/resources/tools/client/upsertBaseTools.d.ts} +1 -1
  515. package/version.d.ts +1 -1
  516. package/version.js +1 -1
  517. package/api/resources/messages/resources/index.d.ts +0 -2
  518. package/dist/api/resources/messages/resources/index.d.ts +0 -2
  519. package/dist/serialization/resources/agents/client/modifyPassage.d.ts +0 -11
  520. package/dist/serialization/resources/blocks/client/listAgentsForBlock.d.ts +0 -11
  521. package/dist/serialization/resources/identities/client/upsertIdentityProperties.d.ts +0 -11
  522. package/dist/serialization/resources/messages/index.d.ts +0 -1
  523. package/dist/serialization/resources/messages/index.js +0 -17
  524. package/dist/serialization/resources/messages/resources/batches/client/requests/CreateBatch.d.ts +0 -14
  525. package/dist/serialization/resources/messages/resources/index.d.ts +0 -2
  526. package/dist/serialization/resources/runs/client/listRunMessages.d.ts +0 -11
  527. package/dist/serialization/resources/templates/client/requests/TemplatesCreateAgentsRequest.d.ts +0 -16
  528. package/dist/serialization/resources/templates/client/requests/index.d.ts +0 -1
  529. package/dist/serialization/resources/templates/client/requests/index.js +0 -5
  530. package/dist/serialization/resources/templates/types/TemplatesCreateAgentsResponse.d.ts +0 -13
  531. package/dist/serialization/resources/templates/types/TemplatesCreateAgentsResponse.js +0 -44
  532. package/serialization/resources/agents/client/listAgentGroups.d.ts +0 -11
  533. package/serialization/resources/agents/client/modifyPassage.d.ts +0 -11
  534. package/serialization/resources/blocks/client/listAgentsForBlock.d.ts +0 -11
  535. package/serialization/resources/identities/client/upsertIdentityProperties.d.ts +0 -11
  536. package/serialization/resources/messages/index.d.ts +0 -1
  537. package/serialization/resources/messages/index.js +0 -17
  538. package/serialization/resources/messages/resources/batches/client/requests/CreateBatch.d.ts +0 -14
  539. package/serialization/resources/messages/resources/index.d.ts +0 -2
  540. package/serialization/resources/messages/resources/index.js +0 -41
  541. package/serialization/resources/runs/client/listRunMessages.d.ts +0 -11
  542. package/serialization/resources/runs/client/listRunSteps.d.ts +0 -11
  543. package/serialization/resources/templates/client/requests/TemplatesCreateAgentsRequest.d.ts +0 -16
  544. package/serialization/resources/templates/client/requests/index.d.ts +0 -1
  545. package/serialization/resources/templates/client/requests/index.js +0 -5
  546. package/serialization/resources/templates/types/TemplatesCreateAgentsResponse.d.ts +0 -13
  547. /package/api/resources/{messages/resources/batches → agents/resources/groups}/client/index.d.ts +0 -0
  548. /package/api/resources/{messages/resources/batches → agents/resources/groups}/client/index.js +0 -0
  549. /package/api/resources/agents/{client/requests/ListAgentGroupsRequest.js → resources/groups/client/requests/GroupsListRequest.js} +0 -0
  550. /package/api/resources/{messages/resources/batches → agents/resources/groups}/client/requests/index.js +0 -0
  551. /package/api/resources/{messages/resources/batches → agents/resources/groups}/index.d.ts +0 -0
  552. /package/api/resources/{messages/resources/batches → agents/resources/groups}/index.js +0 -0
  553. /package/api/resources/agents/{client/requests/PassageUpdate.js → resources/messages/client/requests/MessagesResetRequest.js} +0 -0
  554. /package/{dist/api/resources/agents → api/resources/agents/resources/passages}/client/requests/PassageUpdate.js +0 -0
  555. /package/{dist/api/resources/messages → api}/resources/batches/client/index.d.ts +0 -0
  556. /package/{dist/api/resources/messages → api}/resources/batches/client/index.js +0 -0
  557. /package/api/resources/{messages/resources/batches → batches}/client/requests/CreateBatch.js +0 -0
  558. /package/api/resources/{messages/resources/batches → batches}/client/requests/index.d.ts +0 -0
  559. /package/{dist/api/resources/messages → api}/resources/batches/client/requests/index.js +0 -0
  560. /package/{dist/api/resources/messages → api}/resources/batches/index.d.ts +0 -0
  561. /package/{dist/api/resources/messages → api}/resources/batches/index.js +0 -0
  562. /package/{dist/serialization/resources/messages/resources/batches → api/resources/blocks/resources/agents}/index.d.ts +0 -0
  563. /package/{dist/serialization/resources/messages/resources/batches → api/resources/blocks/resources/agents}/index.js +0 -0
  564. /package/{serialization/resources/messages/resources/batches → api/resources/embeddings}/index.d.ts +0 -0
  565. /package/{serialization/resources/messages/resources/batches → api/resources/embeddings}/index.js +0 -0
  566. /package/api/resources/{agents/client/requests/ResetMessagesRequest.js → providers/client/requests/ProvidersListRequest.js} +0 -0
  567. /package/api/resources/{providers/client/requests/ListProvidersRequest.js → runs/client/requests/RunsListActiveRequest.js} +0 -0
  568. /package/{dist/serialization/resources/templates → api/resources/runs/resources/messages}/client/index.d.ts +0 -0
  569. /package/{dist/serialization/resources/templates → api/resources/runs/resources/messages}/client/index.js +0 -0
  570. /package/api/resources/runs/{client/requests/ListActiveRunsRequest.js → resources/messages/client/requests/MessagesListRequest.js} +0 -0
  571. /package/{serialization/resources/templates → api/resources/runs/resources/steps}/client/index.d.ts +0 -0
  572. /package/{serialization/resources/templates → api/resources/runs/resources/steps}/client/index.js +0 -0
  573. /package/api/resources/runs/{client/requests/ListRunMessagesRequest.js → resources/steps/client/requests/StepsListRequest.js} +0 -0
  574. /package/api/resources/{runs/client/requests/ListRunStepsRequest.js → templates/resources/agents/client/requests/AgentsCreateRequest.js} +0 -0
  575. /package/api/resources/templates/{client/requests/TemplatesCreateAgentsRequest.js → resources/agents/types/AgentsCreateResponse.js} +0 -0
  576. /package/{api/resources/templates/types/TemplatesCreateAgentsResponse.js → dist/api/resources/agents/resources/groups/client/requests/GroupsListRequest.js} +0 -0
  577. /package/dist/api/resources/agents/{client/requests/ListAgentGroupsRequest.js → resources/messages/client/requests/MessagesResetRequest.js} +0 -0
  578. /package/dist/api/resources/agents/{client/requests/ResetMessagesRequest.js → resources/passages/client/requests/PassageUpdate.js} +0 -0
  579. /package/dist/api/resources/{messages/resources/batches → batches}/client/requests/CreateBatch.js +0 -0
  580. /package/dist/api/resources/{messages/resources/batches → batches}/client/requests/index.d.ts +0 -0
  581. /package/dist/api/resources/providers/client/requests/{ListProvidersRequest.js → ProvidersListRequest.js} +0 -0
  582. /package/dist/api/resources/runs/client/requests/{ListActiveRunsRequest.js → RunsListActiveRequest.js} +0 -0
  583. /package/dist/api/resources/runs/{client/requests/ListRunMessagesRequest.js → resources/messages/client/requests/MessagesListRequest.js} +0 -0
  584. /package/dist/api/resources/runs/{client/requests/ListRunStepsRequest.js → resources/steps/client/requests/StepsListRequest.js} +0 -0
  585. /package/dist/api/resources/templates/{client/requests/TemplatesCreateAgentsRequest.js → resources/agents/client/requests/AgentsCreateRequest.js} +0 -0
  586. /package/dist/api/resources/templates/{types/TemplatesCreateAgentsResponse.js → resources/agents/types/AgentsCreateResponse.js} +0 -0
  587. /package/dist/serialization/resources/{messages/resources/batches → batches}/client/index.d.ts +0 -0
  588. /package/dist/serialization/resources/{messages/resources/batches → batches}/client/index.js +0 -0
  589. /package/dist/serialization/resources/{messages/resources/batches → batches}/client/requests/index.d.ts +0 -0
  590. /package/dist/serialization/resources/{messages/resources/batches → batches}/client/requests/index.js +0 -0
  591. /package/dist/serialization/resources/{models/client/listEmbeddingModels.js → embeddings/client/list.js} +0 -0
  592. /package/dist/serialization/resources/models/client/{listLlms.js → list.js} +0 -0
  593. /package/dist/serialization/resources/providers/client/{listProviders.js → list.js} +0 -0
  594. /package/dist/serialization/resources/runs/client/{listActiveRuns.js → listActive.js} +0 -0
  595. /package/dist/serialization/resources/sources/client/{getByName.js → retrieveByName.js} +0 -0
  596. /package/dist/serialization/resources/tools/client/{addBaseTool.js → upsertBaseTools.js} +0 -0
  597. /package/serialization/resources/{messages/resources/batches → batches}/client/index.d.ts +0 -0
  598. /package/serialization/resources/{messages/resources/batches → batches}/client/index.js +0 -0
  599. /package/serialization/resources/{messages/resources/batches → batches}/client/requests/index.d.ts +0 -0
  600. /package/serialization/resources/{messages/resources/batches → batches}/client/requests/index.js +0 -0
  601. /package/serialization/resources/{models/client/listEmbeddingModels.js → embeddings/client/list.js} +0 -0
  602. /package/serialization/resources/models/client/{listLlms.js → list.js} +0 -0
  603. /package/serialization/resources/providers/client/{listProviders.js → list.js} +0 -0
  604. /package/serialization/resources/runs/client/{listActiveRuns.js → listActive.js} +0 -0
  605. /package/serialization/resources/sources/client/{getByName.js → retrieveByName.js} +0 -0
  606. /package/serialization/resources/tools/client/{addBaseTool.js → upsertBaseTools.js} +0 -0
@@ -0,0 +1,166 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
+ return new (P || (P = Promise))(function (resolve, reject) {
41
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
45
+ });
46
+ };
47
+ var __importDefault = (this && this.__importDefault) || function (mod) {
48
+ return (mod && mod.__esModule) ? mod : { "default": mod };
49
+ };
50
+ Object.defineProperty(exports, "__esModule", { value: true });
51
+ exports.Messages = void 0;
52
+ const environments = __importStar(require("../../../../../../environments"));
53
+ const core = __importStar(require("../../../../../../core"));
54
+ const Letta = __importStar(require("../../../../../index"));
55
+ const url_join_1 = __importDefault(require("url-join"));
56
+ const serializers = __importStar(require("../../../../../../serialization/index"));
57
+ const errors = __importStar(require("../../../../../../errors/index"));
58
+ class Messages {
59
+ constructor(_options = {}) {
60
+ this._options = _options;
61
+ }
62
+ /**
63
+ * Get messages associated with a run with filtering options.
64
+ *
65
+ * Args:
66
+ * run_id: ID of the run
67
+ * before: A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
68
+ * after: A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
69
+ * limit: Maximum number of messages to return
70
+ * order: Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
71
+ * role: Filter by role (user/assistant/system/tool)
72
+ * return_message_object: Whether to return Message objects or LettaMessage objects
73
+ * user_id: ID of the user making the request
74
+ *
75
+ * Returns:
76
+ * A list of messages associated with the run. Default is List[LettaMessage].
77
+ *
78
+ * @param {string} runId
79
+ * @param {Letta.runs.MessagesListRequest} request
80
+ * @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
81
+ *
82
+ * @throws {@link Letta.UnprocessableEntityError}
83
+ *
84
+ * @example
85
+ * await client.runs.messages.list("run_id")
86
+ */
87
+ list(runId_1) {
88
+ return __awaiter(this, arguments, void 0, function* (runId, request = {}, requestOptions) {
89
+ var _a, _b, _c;
90
+ const { before, after, limit, order, role } = request;
91
+ const _queryParams = {};
92
+ if (before != null) {
93
+ _queryParams["before"] = before;
94
+ }
95
+ if (after != null) {
96
+ _queryParams["after"] = after;
97
+ }
98
+ if (limit != null) {
99
+ _queryParams["limit"] = limit.toString();
100
+ }
101
+ if (order != null) {
102
+ _queryParams["order"] = order;
103
+ }
104
+ if (role != null) {
105
+ _queryParams["role"] = role;
106
+ }
107
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
108
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/runs/${encodeURIComponent(runId)}/messages`),
109
+ method: "GET",
110
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.99", "User-Agent": "@letta-ai/letta-client/0.1.99", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
111
+ contentType: "application/json",
112
+ queryParameters: _queryParams,
113
+ requestType: "json",
114
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
115
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
116
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
117
+ });
118
+ if (_response.ok) {
119
+ return serializers.runs.messages.list.Response.parseOrThrow(_response.body, {
120
+ unrecognizedObjectKeys: "passthrough",
121
+ allowUnrecognizedUnionMembers: true,
122
+ allowUnrecognizedEnumValues: true,
123
+ skipValidation: true,
124
+ breadcrumbsPrefix: ["response"],
125
+ });
126
+ }
127
+ if (_response.error.reason === "status-code") {
128
+ switch (_response.error.statusCode) {
129
+ case 422:
130
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
131
+ unrecognizedObjectKeys: "passthrough",
132
+ allowUnrecognizedUnionMembers: true,
133
+ allowUnrecognizedEnumValues: true,
134
+ skipValidation: true,
135
+ breadcrumbsPrefix: ["response"],
136
+ }));
137
+ default:
138
+ throw new errors.LettaError({
139
+ statusCode: _response.error.statusCode,
140
+ body: _response.error.body,
141
+ });
142
+ }
143
+ }
144
+ switch (_response.error.reason) {
145
+ case "non-json":
146
+ throw new errors.LettaError({
147
+ statusCode: _response.error.statusCode,
148
+ body: _response.error.rawBody,
149
+ });
150
+ case "timeout":
151
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/runs/{run_id}/messages.");
152
+ case "unknown":
153
+ throw new errors.LettaError({
154
+ message: _response.error.errorMessage,
155
+ });
156
+ }
157
+ });
158
+ }
159
+ _getCustomAuthorizationHeaders() {
160
+ return __awaiter(this, void 0, void 0, function* () {
161
+ const tokenValue = yield core.Supplier.get(this._options.token);
162
+ return { Authorization: `Bearer ${tokenValue}` };
163
+ });
164
+ }
165
+ }
166
+ exports.Messages = Messages;
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as Letta from "../../../../index";
4
+ import * as Letta from "../../../../../../index";
5
5
  /**
6
6
  * @example
7
7
  * {}
8
8
  */
9
- export interface ListRunMessagesRequest {
9
+ export interface MessagesListRequest {
10
10
  /**
11
11
  * Cursor for pagination
12
12
  */
@@ -0,0 +1 @@
1
+ export { type MessagesListRequest } from "./MessagesListRequest";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./client";
@@ -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("./client"), exports);
@@ -0,0 +1,55 @@
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 Steps {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.LettaEnvironment | string>;
10
+ /** Specify a custom URL to connect the client to. */
11
+ baseUrl?: core.Supplier<string>;
12
+ token?: core.Supplier<string | undefined>;
13
+ fetcher?: core.FetchFunction;
14
+ }
15
+ interface RequestOptions {
16
+ /** The maximum time to wait for a response in seconds. */
17
+ timeoutInSeconds?: number;
18
+ /** The number of times to retry the request. Defaults to 2. */
19
+ maxRetries?: number;
20
+ /** A hook to abort the request. */
21
+ abortSignal?: AbortSignal;
22
+ /** Additional headers to include in the request. */
23
+ headers?: Record<string, string>;
24
+ }
25
+ }
26
+ export declare class Steps {
27
+ protected readonly _options: Steps.Options;
28
+ constructor(_options?: Steps.Options);
29
+ /**
30
+ * Get messages associated with a run with filtering options.
31
+ *
32
+ * Args:
33
+ * run_id: ID of the run
34
+ * before: A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
35
+ * after: A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
36
+ * limit: Maximum number of steps to return
37
+ * order: Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
38
+ *
39
+ * Returns:
40
+ * A list of steps associated with the run.
41
+ *
42
+ * @param {string} runId
43
+ * @param {Letta.runs.StepsListRequest} request
44
+ * @param {Steps.RequestOptions} requestOptions - Request-specific configuration.
45
+ *
46
+ * @throws {@link Letta.UnprocessableEntityError}
47
+ *
48
+ * @example
49
+ * await client.runs.steps.list("run_id")
50
+ */
51
+ list(runId: string, request?: Letta.runs.StepsListRequest, requestOptions?: Steps.RequestOptions): Promise<Letta.Step[]>;
52
+ protected _getCustomAuthorizationHeaders(): Promise<{
53
+ Authorization: string;
54
+ }>;
55
+ }
@@ -0,0 +1,160 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
+ return new (P || (P = Promise))(function (resolve, reject) {
41
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
45
+ });
46
+ };
47
+ var __importDefault = (this && this.__importDefault) || function (mod) {
48
+ return (mod && mod.__esModule) ? mod : { "default": mod };
49
+ };
50
+ Object.defineProperty(exports, "__esModule", { value: true });
51
+ exports.Steps = void 0;
52
+ const environments = __importStar(require("../../../../../../environments"));
53
+ const core = __importStar(require("../../../../../../core"));
54
+ const Letta = __importStar(require("../../../../../index"));
55
+ const url_join_1 = __importDefault(require("url-join"));
56
+ const serializers = __importStar(require("../../../../../../serialization/index"));
57
+ const errors = __importStar(require("../../../../../../errors/index"));
58
+ class Steps {
59
+ constructor(_options = {}) {
60
+ this._options = _options;
61
+ }
62
+ /**
63
+ * Get messages associated with a run with filtering options.
64
+ *
65
+ * Args:
66
+ * run_id: ID of the run
67
+ * before: A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
68
+ * after: A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
69
+ * limit: Maximum number of steps to return
70
+ * order: Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
71
+ *
72
+ * Returns:
73
+ * A list of steps associated with the run.
74
+ *
75
+ * @param {string} runId
76
+ * @param {Letta.runs.StepsListRequest} request
77
+ * @param {Steps.RequestOptions} requestOptions - Request-specific configuration.
78
+ *
79
+ * @throws {@link Letta.UnprocessableEntityError}
80
+ *
81
+ * @example
82
+ * await client.runs.steps.list("run_id")
83
+ */
84
+ list(runId_1) {
85
+ return __awaiter(this, arguments, void 0, function* (runId, request = {}, requestOptions) {
86
+ var _a, _b, _c;
87
+ const { before, after, limit, order } = request;
88
+ const _queryParams = {};
89
+ if (before != null) {
90
+ _queryParams["before"] = before;
91
+ }
92
+ if (after != null) {
93
+ _queryParams["after"] = after;
94
+ }
95
+ if (limit != null) {
96
+ _queryParams["limit"] = limit.toString();
97
+ }
98
+ if (order != null) {
99
+ _queryParams["order"] = order;
100
+ }
101
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
102
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/runs/${encodeURIComponent(runId)}/steps`),
103
+ method: "GET",
104
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.99", "User-Agent": "@letta-ai/letta-client/0.1.99", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
105
+ contentType: "application/json",
106
+ queryParameters: _queryParams,
107
+ requestType: "json",
108
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
109
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
110
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
111
+ });
112
+ if (_response.ok) {
113
+ return serializers.runs.steps.list.Response.parseOrThrow(_response.body, {
114
+ unrecognizedObjectKeys: "passthrough",
115
+ allowUnrecognizedUnionMembers: true,
116
+ allowUnrecognizedEnumValues: true,
117
+ skipValidation: true,
118
+ breadcrumbsPrefix: ["response"],
119
+ });
120
+ }
121
+ if (_response.error.reason === "status-code") {
122
+ switch (_response.error.statusCode) {
123
+ case 422:
124
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
125
+ unrecognizedObjectKeys: "passthrough",
126
+ allowUnrecognizedUnionMembers: true,
127
+ allowUnrecognizedEnumValues: true,
128
+ skipValidation: true,
129
+ breadcrumbsPrefix: ["response"],
130
+ }));
131
+ default:
132
+ throw new errors.LettaError({
133
+ statusCode: _response.error.statusCode,
134
+ body: _response.error.body,
135
+ });
136
+ }
137
+ }
138
+ switch (_response.error.reason) {
139
+ case "non-json":
140
+ throw new errors.LettaError({
141
+ statusCode: _response.error.statusCode,
142
+ body: _response.error.rawBody,
143
+ });
144
+ case "timeout":
145
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/runs/{run_id}/steps.");
146
+ case "unknown":
147
+ throw new errors.LettaError({
148
+ message: _response.error.errorMessage,
149
+ });
150
+ }
151
+ });
152
+ }
153
+ _getCustomAuthorizationHeaders() {
154
+ return __awaiter(this, void 0, void 0, function* () {
155
+ const tokenValue = yield core.Supplier.get(this._options.token);
156
+ return { Authorization: `Bearer ${tokenValue}` };
157
+ });
158
+ }
159
+ }
160
+ exports.Steps = Steps;
@@ -5,7 +5,7 @@
5
5
  * @example
6
6
  * {}
7
7
  */
8
- export interface ListRunStepsRequest {
8
+ export interface StepsListRequest {
9
9
  /**
10
10
  * Cursor for pagination
11
11
  */
@@ -0,0 +1 @@
1
+ export { type StepsListRequest } from "./StepsListRequest";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./client";
@@ -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("./client"), exports);
@@ -0,0 +1,44 @@
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 Usage {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.LettaEnvironment | string>;
10
+ /** Specify a custom URL to connect the client to. */
11
+ baseUrl?: core.Supplier<string>;
12
+ token?: core.Supplier<string | undefined>;
13
+ fetcher?: core.FetchFunction;
14
+ }
15
+ interface RequestOptions {
16
+ /** The maximum time to wait for a response in seconds. */
17
+ timeoutInSeconds?: number;
18
+ /** The number of times to retry the request. Defaults to 2. */
19
+ maxRetries?: number;
20
+ /** A hook to abort the request. */
21
+ abortSignal?: AbortSignal;
22
+ /** Additional headers to include in the request. */
23
+ headers?: Record<string, string>;
24
+ }
25
+ }
26
+ export declare class Usage {
27
+ protected readonly _options: Usage.Options;
28
+ constructor(_options?: Usage.Options);
29
+ /**
30
+ * Get usage statistics for a run.
31
+ *
32
+ * @param {string} runId
33
+ * @param {Usage.RequestOptions} requestOptions - Request-specific configuration.
34
+ *
35
+ * @throws {@link Letta.UnprocessableEntityError}
36
+ *
37
+ * @example
38
+ * await client.runs.usage.retrieve("run_id")
39
+ */
40
+ retrieve(runId: string, requestOptions?: Usage.RequestOptions): Promise<Letta.UsageStatistics>;
41
+ protected _getCustomAuthorizationHeaders(): Promise<{
42
+ Authorization: string;
43
+ }>;
44
+ }
@@ -0,0 +1,134 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
+ return new (P || (P = Promise))(function (resolve, reject) {
41
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
45
+ });
46
+ };
47
+ var __importDefault = (this && this.__importDefault) || function (mod) {
48
+ return (mod && mod.__esModule) ? mod : { "default": mod };
49
+ };
50
+ Object.defineProperty(exports, "__esModule", { value: true });
51
+ exports.Usage = void 0;
52
+ const environments = __importStar(require("../../../../../../environments"));
53
+ const core = __importStar(require("../../../../../../core"));
54
+ const Letta = __importStar(require("../../../../../index"));
55
+ const url_join_1 = __importDefault(require("url-join"));
56
+ const serializers = __importStar(require("../../../../../../serialization/index"));
57
+ const errors = __importStar(require("../../../../../../errors/index"));
58
+ class Usage {
59
+ constructor(_options = {}) {
60
+ this._options = _options;
61
+ }
62
+ /**
63
+ * Get usage statistics for a run.
64
+ *
65
+ * @param {string} runId
66
+ * @param {Usage.RequestOptions} requestOptions - Request-specific configuration.
67
+ *
68
+ * @throws {@link Letta.UnprocessableEntityError}
69
+ *
70
+ * @example
71
+ * await client.runs.usage.retrieve("run_id")
72
+ */
73
+ retrieve(runId, requestOptions) {
74
+ return __awaiter(this, void 0, void 0, function* () {
75
+ var _a, _b, _c;
76
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
77
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/runs/${encodeURIComponent(runId)}/usage`),
78
+ method: "GET",
79
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.99", "User-Agent": "@letta-ai/letta-client/0.1.99", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
80
+ contentType: "application/json",
81
+ requestType: "json",
82
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
83
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
84
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
85
+ });
86
+ if (_response.ok) {
87
+ return serializers.UsageStatistics.parseOrThrow(_response.body, {
88
+ unrecognizedObjectKeys: "passthrough",
89
+ allowUnrecognizedUnionMembers: true,
90
+ allowUnrecognizedEnumValues: true,
91
+ skipValidation: true,
92
+ breadcrumbsPrefix: ["response"],
93
+ });
94
+ }
95
+ if (_response.error.reason === "status-code") {
96
+ switch (_response.error.statusCode) {
97
+ case 422:
98
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
99
+ unrecognizedObjectKeys: "passthrough",
100
+ allowUnrecognizedUnionMembers: true,
101
+ allowUnrecognizedEnumValues: true,
102
+ skipValidation: true,
103
+ breadcrumbsPrefix: ["response"],
104
+ }));
105
+ default:
106
+ throw new errors.LettaError({
107
+ statusCode: _response.error.statusCode,
108
+ body: _response.error.body,
109
+ });
110
+ }
111
+ }
112
+ switch (_response.error.reason) {
113
+ case "non-json":
114
+ throw new errors.LettaError({
115
+ statusCode: _response.error.statusCode,
116
+ body: _response.error.rawBody,
117
+ });
118
+ case "timeout":
119
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/runs/{run_id}/usage.");
120
+ case "unknown":
121
+ throw new errors.LettaError({
122
+ message: _response.error.errorMessage,
123
+ });
124
+ }
125
+ });
126
+ }
127
+ _getCustomAuthorizationHeaders() {
128
+ return __awaiter(this, void 0, void 0, function* () {
129
+ const tokenValue = yield core.Supplier.get(this._options.token);
130
+ return { Authorization: `Bearer ${tokenValue}` };
131
+ });
132
+ }
133
+ }
134
+ exports.Usage = Usage;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./client";