@letta-ai/letta-client 0.1.13 → 0.1.15

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 (262) hide show
  1. package/api/resources/agents/client/Client.d.ts +6 -125
  2. package/api/resources/agents/client/Client.js +28 -629
  3. package/api/resources/agents/client/requests/AgentsListRequest.d.ts +5 -1
  4. package/api/resources/agents/client/requests/index.d.ts +0 -2
  5. package/api/resources/agents/resources/archivalMemory/client/Client.d.ts +21 -4
  6. package/api/resources/agents/resources/archivalMemory/client/Client.js +104 -28
  7. package/api/resources/agents/resources/archivalMemory/client/index.d.ts +1 -1
  8. package/api/resources/agents/resources/archivalMemory/client/index.js +15 -0
  9. package/api/resources/agents/{client/requests/ListArchivalMemoryRequest.d.ts → resources/archivalMemory/client/requests/ArchivalMemoryListRequest.d.ts} +1 -1
  10. package/api/resources/agents/resources/archivalMemory/client/requests/index.d.ts +2 -0
  11. package/api/resources/agents/resources/archivalMemory/client/requests/index.js +2 -0
  12. package/api/resources/agents/resources/context/client/Client.js +1 -1
  13. package/api/resources/agents/resources/coreMemory/client/Client.d.ts +42 -15
  14. package/api/resources/agents/resources/coreMemory/client/Client.js +195 -64
  15. package/api/resources/agents/resources/index.d.ts +1 -0
  16. package/api/resources/agents/resources/index.js +1 -0
  17. package/api/resources/agents/resources/memoryVariables/client/Client.js +3 -3
  18. package/api/resources/agents/resources/messages/client/Client.d.ts +2 -2
  19. package/api/resources/agents/resources/messages/client/Client.js +7 -7
  20. package/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +1 -1
  21. package/api/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +2 -2
  22. package/api/resources/agents/resources/messages/types/MessageUpdateContent.d.ts +8 -0
  23. package/api/resources/agents/resources/messages/types/index.d.ts +1 -0
  24. package/api/resources/agents/resources/messages/types/index.js +1 -0
  25. package/api/resources/agents/resources/sources/client/Client.js +3 -3
  26. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  27. package/api/resources/agents/resources/tools/client/Client.js +3 -3
  28. package/api/resources/blocks/client/Client.d.ts +13 -0
  29. package/api/resources/blocks/client/Client.js +71 -5
  30. package/api/resources/health/client/Client.js +1 -1
  31. package/api/resources/jobs/client/Client.js +4 -4
  32. package/api/resources/models/client/Client.js +2 -2
  33. package/api/resources/providers/client/Client.js +7 -7
  34. package/api/resources/providers/client/requests/ListProvidersRequest.d.ts +1 -1
  35. package/api/resources/runs/client/Client.d.ts +3 -2
  36. package/api/resources/runs/client/Client.js +17 -13
  37. package/api/resources/runs/client/requests/ListRunMessagesRequest.d.ts +7 -3
  38. package/api/resources/sources/client/Client.js +6 -6
  39. package/api/resources/sources/resources/files/client/Client.js +6 -6
  40. package/api/resources/sources/resources/files/client/requests/FilesListRequest.d.ts +1 -1
  41. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  42. package/api/resources/tag/client/Client.js +4 -4
  43. package/api/resources/tag/client/requests/ListTagsRequest.d.ts +1 -1
  44. package/api/resources/tools/client/Client.js +14 -14
  45. package/api/resources/tools/client/requests/ToolsListRequest.d.ts +1 -1
  46. package/api/types/AssistantMessage.d.ts +2 -1
  47. package/api/types/AssistantMessageContent.d.ts +5 -0
  48. package/api/types/LlmConfig.d.ts +3 -0
  49. package/api/types/Message.d.ts +2 -2
  50. package/api/types/MessageCreate.d.ts +2 -2
  51. package/api/types/MessageCreateContent.d.ts +8 -0
  52. package/api/types/MessageCreateContent.js +5 -0
  53. package/api/types/SystemMessage.d.ts +3 -2
  54. package/api/types/SystemMessageContent.d.ts +5 -0
  55. package/api/types/SystemMessageContent.js +5 -0
  56. package/api/types/TextContent.d.ts +8 -0
  57. package/api/types/TextContent.js +5 -0
  58. package/api/types/UserMessage.d.ts +3 -2
  59. package/api/types/UserMessageContent.d.ts +5 -0
  60. package/api/types/UserMessageContent.js +5 -0
  61. package/api/types/index.d.ts +5 -0
  62. package/api/types/index.js +5 -0
  63. package/dist/api/resources/agents/client/Client.d.ts +6 -125
  64. package/dist/api/resources/agents/client/Client.js +28 -629
  65. package/dist/api/resources/agents/client/requests/AgentsListRequest.d.ts +5 -1
  66. package/dist/api/resources/agents/client/requests/index.d.ts +0 -2
  67. package/dist/api/resources/agents/resources/archivalMemory/client/Client.d.ts +21 -4
  68. package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +104 -28
  69. package/dist/api/resources/agents/resources/archivalMemory/client/index.d.ts +1 -1
  70. package/dist/api/resources/agents/resources/archivalMemory/client/index.js +15 -0
  71. package/dist/api/resources/agents/{client/requests/ListArchivalMemoryRequest.d.ts → resources/archivalMemory/client/requests/ArchivalMemoryListRequest.d.ts} +1 -1
  72. package/dist/api/resources/agents/resources/archivalMemory/client/requests/ArchivalMemoryListRequest.js +5 -0
  73. package/dist/api/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.js +5 -0
  74. package/dist/api/resources/agents/resources/archivalMemory/client/requests/index.d.ts +2 -0
  75. package/dist/api/resources/agents/resources/archivalMemory/client/requests/index.js +2 -0
  76. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  77. package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +42 -15
  78. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +195 -64
  79. package/dist/api/resources/agents/resources/index.d.ts +1 -0
  80. package/dist/api/resources/agents/resources/index.js +1 -0
  81. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +3 -3
  82. package/dist/api/resources/agents/resources/messages/client/Client.d.ts +2 -2
  83. package/dist/api/resources/agents/resources/messages/client/Client.js +7 -7
  84. package/dist/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +1 -1
  85. package/dist/api/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +2 -2
  86. package/dist/api/resources/agents/resources/messages/types/MessageUpdateContent.d.ts +8 -0
  87. package/dist/api/resources/agents/resources/messages/types/MessageUpdateContent.js +5 -0
  88. package/dist/api/resources/agents/resources/messages/types/index.d.ts +1 -0
  89. package/dist/api/resources/agents/resources/messages/types/index.js +1 -0
  90. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  91. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  92. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  93. package/dist/api/resources/blocks/client/Client.d.ts +13 -0
  94. package/dist/api/resources/blocks/client/Client.js +71 -5
  95. package/dist/api/resources/health/client/Client.js +1 -1
  96. package/dist/api/resources/jobs/client/Client.js +4 -4
  97. package/dist/api/resources/models/client/Client.js +2 -2
  98. package/dist/api/resources/providers/client/Client.js +7 -7
  99. package/dist/api/resources/providers/client/requests/ListProvidersRequest.d.ts +1 -1
  100. package/dist/api/resources/runs/client/Client.d.ts +3 -2
  101. package/dist/api/resources/runs/client/Client.js +17 -13
  102. package/dist/api/resources/runs/client/requests/ListRunMessagesRequest.d.ts +7 -3
  103. package/dist/api/resources/sources/client/Client.js +6 -6
  104. package/dist/api/resources/sources/resources/files/client/Client.js +6 -6
  105. package/dist/api/resources/sources/resources/files/client/requests/FilesListRequest.d.ts +1 -1
  106. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  107. package/dist/api/resources/tag/client/Client.js +4 -4
  108. package/dist/api/resources/tag/client/requests/ListTagsRequest.d.ts +1 -1
  109. package/dist/api/resources/tools/client/Client.js +14 -14
  110. package/dist/api/resources/tools/client/requests/ToolsListRequest.d.ts +1 -1
  111. package/dist/api/types/AssistantMessage.d.ts +2 -1
  112. package/dist/api/types/AssistantMessageContent.d.ts +5 -0
  113. package/dist/api/types/AssistantMessageContent.js +5 -0
  114. package/dist/api/types/LlmConfig.d.ts +3 -0
  115. package/dist/api/types/Message.d.ts +2 -2
  116. package/dist/api/types/MessageCreate.d.ts +2 -2
  117. package/dist/api/types/MessageCreateContent.d.ts +8 -0
  118. package/dist/api/types/MessageCreateContent.js +5 -0
  119. package/dist/api/types/SystemMessage.d.ts +3 -2
  120. package/dist/api/types/SystemMessageContent.d.ts +5 -0
  121. package/dist/api/types/SystemMessageContent.js +5 -0
  122. package/dist/api/types/TextContent.d.ts +8 -0
  123. package/dist/api/types/TextContent.js +5 -0
  124. package/dist/api/types/UserMessage.d.ts +3 -2
  125. package/dist/api/types/UserMessageContent.d.ts +5 -0
  126. package/dist/api/types/UserMessageContent.js +5 -0
  127. package/dist/api/types/index.d.ts +5 -0
  128. package/dist/api/types/index.js +5 -0
  129. package/dist/serialization/resources/agents/client/index.d.ts +0 -3
  130. package/dist/serialization/resources/agents/client/index.js +1 -4
  131. package/dist/serialization/resources/agents/client/requests/index.d.ts +0 -1
  132. package/dist/serialization/resources/agents/client/requests/index.js +1 -3
  133. package/dist/serialization/resources/agents/resources/archivalMemory/client/create.d.ts +11 -0
  134. package/dist/serialization/resources/agents/{client/createArchivalMemory.js → resources/archivalMemory/client/create.js} +2 -2
  135. package/dist/serialization/resources/agents/resources/archivalMemory/client/index.d.ts +3 -0
  136. package/dist/serialization/resources/agents/resources/archivalMemory/client/index.js +42 -0
  137. package/dist/serialization/resources/agents/resources/archivalMemory/client/list.d.ts +11 -0
  138. package/dist/serialization/resources/agents/{client/listArchivalMemory.js → resources/archivalMemory/client/list.js} +2 -2
  139. package/dist/serialization/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.d.ts +12 -0
  140. package/{serialization/resources/agents → dist/serialization/resources/agents/resources/archivalMemory}/client/requests/CreateArchivalMemory.js +1 -1
  141. package/dist/serialization/resources/agents/resources/archivalMemory/client/requests/index.d.ts +1 -0
  142. package/dist/serialization/resources/agents/resources/archivalMemory/client/requests/index.js +5 -0
  143. package/dist/serialization/resources/agents/resources/archivalMemory/index.d.ts +1 -0
  144. package/dist/serialization/resources/agents/resources/archivalMemory/index.js +17 -0
  145. package/dist/serialization/resources/agents/resources/coreMemory/client/index.d.ts +1 -0
  146. package/dist/serialization/resources/agents/resources/coreMemory/client/index.js +37 -0
  147. package/dist/serialization/resources/agents/resources/coreMemory/client/listBlocks.d.ts +11 -0
  148. package/{serialization/resources/agents/client/listCoreMemoryBlocks.js → dist/serialization/resources/agents/resources/coreMemory/client/listBlocks.js} +2 -2
  149. package/dist/serialization/resources/agents/resources/coreMemory/index.d.ts +1 -0
  150. package/dist/serialization/resources/agents/resources/coreMemory/index.js +17 -0
  151. package/dist/serialization/resources/agents/resources/index.d.ts +3 -0
  152. package/dist/serialization/resources/agents/resources/index.js +4 -1
  153. package/dist/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +2 -1
  154. package/dist/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.js +2 -1
  155. package/dist/serialization/resources/agents/resources/messages/types/MessageUpdateContent.d.ts +11 -0
  156. package/dist/serialization/resources/agents/resources/messages/types/MessageUpdateContent.js +42 -0
  157. package/dist/serialization/resources/agents/resources/messages/types/index.d.ts +1 -0
  158. package/dist/serialization/resources/agents/resources/messages/types/index.js +1 -0
  159. package/dist/serialization/resources/blocks/client/index.d.ts +1 -0
  160. package/dist/serialization/resources/blocks/client/index.js +2 -1
  161. package/dist/serialization/resources/{agents/client/createArchivalMemory.d.ts → blocks/client/listAgentsForBlock.d.ts} +3 -3
  162. package/dist/serialization/resources/blocks/client/listAgentsForBlock.js +42 -0
  163. package/dist/serialization/types/AssistantMessage.d.ts +2 -1
  164. package/dist/serialization/types/AssistantMessage.js +2 -1
  165. package/dist/serialization/types/AssistantMessageContent.d.ts +11 -0
  166. package/dist/serialization/types/AssistantMessageContent.js +42 -0
  167. package/dist/serialization/types/LlmConfig.d.ts +1 -0
  168. package/dist/serialization/types/LlmConfig.js +1 -0
  169. package/dist/serialization/types/Message.d.ts +2 -1
  170. package/dist/serialization/types/Message.js +2 -1
  171. package/dist/serialization/types/MessageCreate.d.ts +2 -1
  172. package/dist/serialization/types/MessageCreate.js +2 -1
  173. package/dist/serialization/types/MessageCreateContent.d.ts +11 -0
  174. package/dist/serialization/types/MessageCreateContent.js +42 -0
  175. package/dist/serialization/types/SystemMessage.d.ts +2 -1
  176. package/dist/serialization/types/SystemMessage.js +2 -1
  177. package/dist/serialization/types/SystemMessageContent.d.ts +11 -0
  178. package/dist/serialization/types/SystemMessageContent.js +42 -0
  179. package/dist/serialization/types/TextContent.d.ts +13 -0
  180. package/dist/serialization/types/TextContent.js +44 -0
  181. package/dist/serialization/types/UserMessage.d.ts +2 -1
  182. package/dist/serialization/types/UserMessage.js +2 -1
  183. package/dist/serialization/types/UserMessageContent.d.ts +11 -0
  184. package/dist/serialization/types/UserMessageContent.js +42 -0
  185. package/dist/serialization/types/index.d.ts +5 -0
  186. package/dist/serialization/types/index.js +5 -0
  187. package/dist/version.d.ts +1 -1
  188. package/dist/version.js +1 -1
  189. package/package.json +1 -1
  190. package/reference.md +488 -895
  191. package/serialization/resources/agents/client/index.d.ts +0 -3
  192. package/serialization/resources/agents/client/index.js +1 -4
  193. package/serialization/resources/agents/client/requests/index.d.ts +0 -1
  194. package/serialization/resources/agents/client/requests/index.js +1 -3
  195. package/serialization/resources/agents/resources/archivalMemory/client/create.d.ts +11 -0
  196. package/serialization/resources/agents/{client/listArchivalMemory.js → resources/archivalMemory/client/create.js} +2 -2
  197. package/serialization/resources/agents/resources/archivalMemory/client/index.d.ts +3 -0
  198. package/serialization/resources/agents/resources/archivalMemory/client/index.js +42 -0
  199. package/serialization/resources/agents/resources/archivalMemory/client/list.d.ts +11 -0
  200. package/serialization/resources/agents/{client/createArchivalMemory.js → resources/archivalMemory/client/list.js} +2 -2
  201. package/serialization/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.d.ts +12 -0
  202. package/{dist/serialization/resources/agents → serialization/resources/agents/resources/archivalMemory}/client/requests/CreateArchivalMemory.js +1 -1
  203. package/serialization/resources/agents/resources/archivalMemory/client/requests/index.d.ts +1 -0
  204. package/serialization/resources/agents/resources/archivalMemory/client/requests/index.js +5 -0
  205. package/serialization/resources/agents/resources/archivalMemory/index.d.ts +1 -0
  206. package/serialization/resources/agents/resources/archivalMemory/index.js +17 -0
  207. package/serialization/resources/agents/resources/coreMemory/client/index.d.ts +1 -0
  208. package/serialization/resources/agents/resources/coreMemory/client/index.js +37 -0
  209. package/serialization/resources/agents/resources/coreMemory/client/listBlocks.d.ts +11 -0
  210. package/{dist/serialization/resources/agents/client/listCoreMemoryBlocks.js → serialization/resources/agents/resources/coreMemory/client/listBlocks.js} +2 -2
  211. package/serialization/resources/agents/resources/coreMemory/index.d.ts +1 -0
  212. package/serialization/resources/agents/resources/coreMemory/index.js +17 -0
  213. package/serialization/resources/agents/resources/index.d.ts +3 -0
  214. package/serialization/resources/agents/resources/index.js +4 -1
  215. package/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +2 -1
  216. package/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.js +2 -1
  217. package/serialization/resources/agents/resources/messages/types/MessageUpdateContent.d.ts +11 -0
  218. package/serialization/resources/agents/resources/messages/types/MessageUpdateContent.js +42 -0
  219. package/serialization/resources/agents/resources/messages/types/index.d.ts +1 -0
  220. package/serialization/resources/agents/resources/messages/types/index.js +1 -0
  221. package/serialization/resources/blocks/client/index.d.ts +1 -0
  222. package/serialization/resources/blocks/client/index.js +2 -1
  223. package/{dist/serialization/resources/agents/client/listArchivalMemory.d.ts → serialization/resources/blocks/client/listAgentsForBlock.d.ts} +3 -3
  224. package/serialization/resources/blocks/client/listAgentsForBlock.js +42 -0
  225. package/serialization/types/AssistantMessage.d.ts +2 -1
  226. package/serialization/types/AssistantMessage.js +2 -1
  227. package/serialization/types/AssistantMessageContent.d.ts +11 -0
  228. package/serialization/types/AssistantMessageContent.js +42 -0
  229. package/serialization/types/LlmConfig.d.ts +1 -0
  230. package/serialization/types/LlmConfig.js +1 -0
  231. package/serialization/types/Message.d.ts +2 -1
  232. package/serialization/types/Message.js +2 -1
  233. package/serialization/types/MessageCreate.d.ts +2 -1
  234. package/serialization/types/MessageCreate.js +2 -1
  235. package/serialization/types/MessageCreateContent.d.ts +11 -0
  236. package/serialization/types/MessageCreateContent.js +42 -0
  237. package/serialization/types/SystemMessage.d.ts +2 -1
  238. package/serialization/types/SystemMessage.js +2 -1
  239. package/serialization/types/SystemMessageContent.d.ts +11 -0
  240. package/serialization/types/SystemMessageContent.js +42 -0
  241. package/serialization/types/TextContent.d.ts +13 -0
  242. package/serialization/types/TextContent.js +44 -0
  243. package/serialization/types/UserMessage.d.ts +2 -1
  244. package/serialization/types/UserMessage.js +2 -1
  245. package/serialization/types/UserMessageContent.d.ts +11 -0
  246. package/serialization/types/UserMessageContent.js +42 -0
  247. package/serialization/types/index.d.ts +5 -0
  248. package/serialization/types/index.js +5 -0
  249. package/version.d.ts +1 -1
  250. package/version.js +1 -1
  251. package/dist/serialization/resources/agents/client/listCoreMemoryBlocks.d.ts +0 -11
  252. package/dist/serialization/resources/agents/client/requests/CreateArchivalMemory.d.ts +0 -12
  253. package/serialization/resources/agents/client/createArchivalMemory.d.ts +0 -11
  254. package/serialization/resources/agents/client/listArchivalMemory.d.ts +0 -11
  255. package/serialization/resources/agents/client/listCoreMemoryBlocks.d.ts +0 -11
  256. package/serialization/resources/agents/client/requests/CreateArchivalMemory.d.ts +0 -12
  257. /package/api/resources/agents/{client/requests/CreateArchivalMemory.js → resources/archivalMemory/client/requests/ArchivalMemoryListRequest.js} +0 -0
  258. /package/api/resources/agents/{client → resources/archivalMemory/client}/requests/CreateArchivalMemory.d.ts +0 -0
  259. /package/{dist/api/resources/agents → api/resources/agents/resources/archivalMemory}/client/requests/CreateArchivalMemory.js +0 -0
  260. /package/api/resources/agents/{client/requests/ListArchivalMemoryRequest.js → resources/messages/types/MessageUpdateContent.js} +0 -0
  261. /package/{dist/api/resources/agents/client/requests/ListArchivalMemoryRequest.js → api/types/AssistantMessageContent.js} +0 -0
  262. /package/dist/api/resources/agents/{client → resources/archivalMemory/client}/requests/CreateArchivalMemory.d.ts +0 -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 });
@@ -1,2 +1,3 @@
1
1
  export * from "./MessagesListResponse";
2
+ export * from "./MessageUpdateContent";
2
3
  export * from "./LettaStreamingResponse";
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./MessagesListResponse"), exports);
18
+ __exportStar(require("./MessageUpdateContent"), exports);
18
19
  __exportStar(require("./LettaStreamingResponse"), exports);
@@ -77,7 +77,7 @@ class Sources {
77
77
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
78
78
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/sources/attach/${encodeURIComponent(sourceId)}`),
79
79
  method: "PATCH",
80
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
81
81
  contentType: "application/json",
82
82
  requestType: "json",
83
83
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -143,7 +143,7 @@ class Sources {
143
143
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
144
144
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/sources/detach/${encodeURIComponent(sourceId)}`),
145
145
  method: "PATCH",
146
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
146
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
147
147
  contentType: "application/json",
148
148
  requestType: "json",
149
149
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -208,7 +208,7 @@ class Sources {
208
208
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
209
209
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/sources`),
210
210
  method: "GET",
211
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
211
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
212
212
  contentType: "application/json",
213
213
  requestType: "json",
214
214
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -96,7 +96,7 @@ class Templates {
96
96
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
97
97
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/version-template`),
98
98
  method: "POST",
99
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
99
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
100
100
  contentType: "application/json",
101
101
  queryParameters: _queryParams,
102
102
  requestType: "json",
@@ -163,7 +163,7 @@ class Templates {
163
163
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
164
164
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/migrate`),
165
165
  method: "POST",
166
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
166
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
167
167
  contentType: "application/json",
168
168
  requestType: "json",
169
169
  body: serializers.agents.TemplatesMigrateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -237,7 +237,7 @@ class Templates {
237
237
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
238
238
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/template`),
239
239
  method: "POST",
240
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
240
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
241
241
  contentType: "application/json",
242
242
  requestType: "json",
243
243
  body: serializers.agents.TemplatesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -76,7 +76,7 @@ class Tools {
76
76
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
77
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/agents/${encodeURIComponent(agentId)}/tools`),
78
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.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
79
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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
80
  contentType: "application/json",
81
81
  requestType: "json",
82
82
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -142,7 +142,7 @@ class Tools {
142
142
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
143
143
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/tools/attach/${encodeURIComponent(toolId)}`),
144
144
  method: "PATCH",
145
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
145
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
146
146
  contentType: "application/json",
147
147
  requestType: "json",
148
148
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -208,7 +208,7 @@ class Tools {
208
208
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
209
209
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/tools/detach/${encodeURIComponent(toolId)}`),
210
210
  method: "PATCH",
211
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
211
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
212
212
  contentType: "application/json",
213
213
  requestType: "json",
214
214
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -80,6 +80,19 @@ export declare class Blocks {
80
80
  * await client.blocks.modify("block_id", {})
81
81
  */
82
82
  modify(blockId: string, request: Letta.BlockUpdate, requestOptions?: Blocks.RequestOptions): Promise<Letta.Block>;
83
+ /**
84
+ * Retrieves all agents associated with the specified block.
85
+ * Raises a 404 if the block does not exist.
86
+ *
87
+ * @param {string} blockId
88
+ * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
89
+ *
90
+ * @throws {@link Letta.UnprocessableEntityError}
91
+ *
92
+ * @example
93
+ * await client.blocks.listAgentsForBlock("block_id")
94
+ */
95
+ listAgentsForBlock(blockId: string, requestOptions?: Blocks.RequestOptions): Promise<Letta.AgentState[]>;
83
96
  protected _getCustomAuthorizationHeaders(): Promise<{
84
97
  Authorization: string;
85
98
  }>;
@@ -85,7 +85,7 @@ class Blocks {
85
85
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
86
86
  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/blocks/"),
87
87
  method: "GET",
88
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
88
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
89
89
  contentType: "application/json",
90
90
  queryParameters: _queryParams,
91
91
  requestType: "json",
@@ -152,7 +152,7 @@ class Blocks {
152
152
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
153
153
  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/blocks/"),
154
154
  method: "POST",
155
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
155
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
156
156
  contentType: "application/json",
157
157
  requestType: "json",
158
158
  body: serializers.CreateBlock.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -216,7 +216,7 @@ class Blocks {
216
216
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
217
217
  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/blocks/${encodeURIComponent(blockId)}`),
218
218
  method: "GET",
219
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
219
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
220
220
  contentType: "application/json",
221
221
  requestType: "json",
222
222
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -279,7 +279,7 @@ class Blocks {
279
279
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
280
280
  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/blocks/${encodeURIComponent(blockId)}`),
281
281
  method: "DELETE",
282
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
282
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
283
283
  contentType: "application/json",
284
284
  requestType: "json",
285
285
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -343,7 +343,7 @@ class Blocks {
343
343
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
344
344
  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/blocks/${encodeURIComponent(blockId)}`),
345
345
  method: "PATCH",
346
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
346
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
347
347
  contentType: "application/json",
348
348
  requestType: "json",
349
349
  body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -392,6 +392,72 @@ class Blocks {
392
392
  }
393
393
  });
394
394
  }
395
+ /**
396
+ * Retrieves all agents associated with the specified block.
397
+ * Raises a 404 if the block does not exist.
398
+ *
399
+ * @param {string} blockId
400
+ * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
401
+ *
402
+ * @throws {@link Letta.UnprocessableEntityError}
403
+ *
404
+ * @example
405
+ * await client.blocks.listAgentsForBlock("block_id")
406
+ */
407
+ listAgentsForBlock(blockId, requestOptions) {
408
+ return __awaiter(this, void 0, void 0, function* () {
409
+ var _a, _b, _c;
410
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
411
+ 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/blocks/${encodeURIComponent(blockId)}/agents`),
412
+ method: "GET",
413
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
414
+ contentType: "application/json",
415
+ requestType: "json",
416
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
417
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
418
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
419
+ });
420
+ if (_response.ok) {
421
+ return serializers.blocks.listAgentsForBlock.Response.parseOrThrow(_response.body, {
422
+ unrecognizedObjectKeys: "passthrough",
423
+ allowUnrecognizedUnionMembers: true,
424
+ allowUnrecognizedEnumValues: true,
425
+ skipValidation: true,
426
+ breadcrumbsPrefix: ["response"],
427
+ });
428
+ }
429
+ if (_response.error.reason === "status-code") {
430
+ switch (_response.error.statusCode) {
431
+ case 422:
432
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
433
+ unrecognizedObjectKeys: "passthrough",
434
+ allowUnrecognizedUnionMembers: true,
435
+ allowUnrecognizedEnumValues: true,
436
+ skipValidation: true,
437
+ breadcrumbsPrefix: ["response"],
438
+ }));
439
+ default:
440
+ throw new errors.LettaError({
441
+ statusCode: _response.error.statusCode,
442
+ body: _response.error.body,
443
+ });
444
+ }
445
+ }
446
+ switch (_response.error.reason) {
447
+ case "non-json":
448
+ throw new errors.LettaError({
449
+ statusCode: _response.error.statusCode,
450
+ body: _response.error.rawBody,
451
+ });
452
+ case "timeout":
453
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/blocks/{block_id}/agents.");
454
+ case "unknown":
455
+ throw new errors.LettaError({
456
+ message: _response.error.errorMessage,
457
+ });
458
+ }
459
+ });
460
+ }
395
461
  _getCustomAuthorizationHeaders() {
396
462
  return __awaiter(this, void 0, void 0, function* () {
397
463
  const tokenValue = yield core.Supplier.get(this._options.token);
@@ -70,7 +70,7 @@ class Health {
70
70
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
71
71
  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/health/"),
72
72
  method: "GET",
73
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
73
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
74
74
  contentType: "application/json",
75
75
  requestType: "json",
76
76
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -81,7 +81,7 @@ class Jobs {
81
81
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
82
82
  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/jobs/"),
83
83
  method: "GET",
84
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
84
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
85
85
  contentType: "application/json",
86
86
  queryParameters: _queryParams,
87
87
  requestType: "json",
@@ -146,7 +146,7 @@ class Jobs {
146
146
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
147
147
  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/jobs/active"),
148
148
  method: "GET",
149
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
149
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
150
150
  contentType: "application/json",
151
151
  requestType: "json",
152
152
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -211,7 +211,7 @@ class Jobs {
211
211
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
212
212
  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/jobs/${encodeURIComponent(jobId)}`),
213
213
  method: "GET",
214
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
214
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
215
215
  contentType: "application/json",
216
216
  requestType: "json",
217
217
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -276,7 +276,7 @@ class Jobs {
276
276
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
277
277
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/jobs/${encodeURIComponent(jobId)}`),
278
278
  method: "DELETE",
279
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
279
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
280
280
  contentType: "application/json",
281
281
  requestType: "json",
282
282
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -70,7 +70,7 @@ class Models {
70
70
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
71
71
  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/models/"),
72
72
  method: "GET",
73
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
73
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
74
74
  contentType: "application/json",
75
75
  requestType: "json",
76
76
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -119,7 +119,7 @@ class Models {
119
119
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
120
120
  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/models/embedding"),
121
121
  method: "GET",
122
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
122
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
123
123
  contentType: "application/json",
124
124
  requestType: "json",
125
125
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -73,10 +73,10 @@ class Providers {
73
73
  listProviders() {
74
74
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
75
75
  var _a, _b, _c;
76
- const { cursor, limit } = request;
76
+ const { after, limit } = request;
77
77
  const _queryParams = {};
78
- if (cursor != null) {
79
- _queryParams["cursor"] = cursor;
78
+ if (after != null) {
79
+ _queryParams["after"] = after;
80
80
  }
81
81
  if (limit != null) {
82
82
  _queryParams["limit"] = limit.toString();
@@ -84,7 +84,7 @@ class Providers {
84
84
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
85
85
  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/providers/"),
86
86
  method: "GET",
87
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
87
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
88
88
  contentType: "application/json",
89
89
  queryParameters: _queryParams,
90
90
  requestType: "json",
@@ -153,7 +153,7 @@ class Providers {
153
153
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
154
154
  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/providers/"),
155
155
  method: "POST",
156
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
156
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
157
157
  contentType: "application/json",
158
158
  requestType: "json",
159
159
  body: serializers.ProviderCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -224,7 +224,7 @@ class Providers {
224
224
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
225
225
  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/providers/"),
226
226
  method: "DELETE",
227
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
227
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
228
228
  contentType: "application/json",
229
229
  queryParameters: _queryParams,
230
230
  requestType: "json",
@@ -287,7 +287,7 @@ class Providers {
287
287
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
288
288
  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/providers/"),
289
289
  method: "PATCH",
290
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
290
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
291
291
  contentType: "application/json",
292
292
  requestType: "json",
293
293
  body: serializers.ProviderUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -6,6 +6,6 @@
6
6
  * {}
7
7
  */
8
8
  export interface ListProvidersRequest {
9
- cursor?: string;
9
+ after?: string;
10
10
  limit?: number;
11
11
  }
@@ -77,9 +77,10 @@ export declare class Runs {
77
77
  *
78
78
  * Args:
79
79
  * run_id: ID of the run
80
- * cursor: Cursor for pagination
80
+ * 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.
81
+ * 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.
81
82
  * limit: Maximum number of messages to return
82
- * ascending: Sort order by creation time
83
+ * order: Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
83
84
  * role: Filter by role (user/assistant/system/tool)
84
85
  * return_message_object: Whether to return Message objects or LettaMessage objects
85
86
  * user_id: ID of the user making the request
@@ -75,7 +75,7 @@ class Runs {
75
75
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
76
76
  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/"),
77
77
  method: "GET",
78
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
78
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
79
79
  contentType: "application/json",
80
80
  requestType: "json",
81
81
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -139,7 +139,7 @@ class Runs {
139
139
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
140
140
  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/active"),
141
141
  method: "GET",
142
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
142
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
143
143
  contentType: "application/json",
144
144
  requestType: "json",
145
145
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -204,7 +204,7 @@ class Runs {
204
204
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
205
205
  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)}`),
206
206
  method: "GET",
207
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
207
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
208
208
  contentType: "application/json",
209
209
  requestType: "json",
210
210
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -269,7 +269,7 @@ class Runs {
269
269
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
270
270
  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)}`),
271
271
  method: "DELETE",
272
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
272
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
273
273
  contentType: "application/json",
274
274
  requestType: "json",
275
275
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -322,9 +322,10 @@ class Runs {
322
322
  *
323
323
  * Args:
324
324
  * run_id: ID of the run
325
- * cursor: Cursor for pagination
325
+ * 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.
326
+ * 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.
326
327
  * limit: Maximum number of messages to return
327
- * ascending: Sort order by creation time
328
+ * order: Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
328
329
  * role: Filter by role (user/assistant/system/tool)
329
330
  * return_message_object: Whether to return Message objects or LettaMessage objects
330
331
  * user_id: ID of the user making the request
@@ -344,16 +345,19 @@ class Runs {
344
345
  listRunMessages(runId_1) {
345
346
  return __awaiter(this, arguments, void 0, function* (runId, request = {}, requestOptions) {
346
347
  var _a, _b, _c;
347
- const { cursor, limit, ascending, role } = request;
348
+ const { before, after, limit, order, role } = request;
348
349
  const _queryParams = {};
349
- if (cursor != null) {
350
- _queryParams["cursor"] = cursor;
350
+ if (before != null) {
351
+ _queryParams["before"] = before;
352
+ }
353
+ if (after != null) {
354
+ _queryParams["after"] = after;
351
355
  }
352
356
  if (limit != null) {
353
357
  _queryParams["limit"] = limit.toString();
354
358
  }
355
- if (ascending != null) {
356
- _queryParams["ascending"] = ascending.toString();
359
+ if (order != null) {
360
+ _queryParams["order"] = order;
357
361
  }
358
362
  if (role != null) {
359
363
  _queryParams["role"] = role;
@@ -361,7 +365,7 @@ class Runs {
361
365
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
362
366
  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`),
363
367
  method: "GET",
364
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
368
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
365
369
  contentType: "application/json",
366
370
  queryParameters: _queryParams,
367
371
  requestType: "json",
@@ -427,7 +431,7 @@ class Runs {
427
431
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
428
432
  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`),
429
433
  method: "GET",
430
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.13", "User-Agent": "@letta-ai/letta-client/0.1.13", "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),
434
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
431
435
  contentType: "application/json",
432
436
  requestType: "json",
433
437
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -10,15 +10,19 @@ export interface ListRunMessagesRequest {
10
10
  /**
11
11
  * Cursor for pagination
12
12
  */
13
- cursor?: string;
13
+ before?: string;
14
+ /**
15
+ * Cursor for pagination
16
+ */
17
+ after?: string;
14
18
  /**
15
19
  * Maximum number of messages to return
16
20
  */
17
21
  limit?: number;
18
22
  /**
19
- * Sort order by creation time
23
+ * Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
20
24
  */
21
- ascending?: boolean;
25
+ order?: string;
22
26
  /**
23
27
  * Filter by role
24
28
  */