@letta-ai/letta-client 0.1.149 → 0.1.152

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 (272) hide show
  1. package/api/resources/agents/client/Client.js +11 -11
  2. package/api/resources/agents/resources/blocks/client/Client.d.ts +1 -1
  3. package/api/resources/agents/resources/blocks/client/Client.js +6 -6
  4. package/api/resources/agents/resources/context/client/Client.js +1 -1
  5. package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  6. package/api/resources/agents/resources/groups/client/Client.js +1 -1
  7. package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  8. package/api/resources/agents/resources/messages/client/Client.d.ts +25 -0
  9. package/api/resources/agents/resources/messages/client/Client.js +90 -7
  10. package/api/resources/agents/resources/messages/types/MessagesPreviewRawPayloadRequest.d.ts +5 -0
  11. package/api/resources/agents/resources/messages/types/MessagesPreviewRawPayloadRequest.js +5 -0
  12. package/api/resources/agents/resources/messages/types/index.d.ts +1 -0
  13. package/api/resources/agents/resources/messages/types/index.js +1 -0
  14. package/api/resources/agents/resources/passages/client/Client.js +4 -4
  15. package/api/resources/agents/resources/sources/client/Client.js +3 -3
  16. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  17. package/api/resources/agents/resources/tools/client/Client.js +3 -3
  18. package/api/resources/batches/client/Client.js +4 -4
  19. package/api/resources/blocks/client/Client.js +6 -6
  20. package/api/resources/blocks/resources/agents/client/Client.js +1 -1
  21. package/api/resources/clientSideAccessTokens/client/Client.d.ts +12 -0
  22. package/api/resources/clientSideAccessTokens/client/Client.js +76 -3
  23. package/api/resources/clientSideAccessTokens/client/requests/ClientSideAccessTokensListClientSideAccessTokensRequest.d.ts +21 -0
  24. package/api/resources/clientSideAccessTokens/client/requests/ClientSideAccessTokensListClientSideAccessTokensRequest.js +5 -0
  25. package/api/resources/clientSideAccessTokens/client/requests/index.d.ts +1 -0
  26. package/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponse.d.ts +8 -0
  27. package/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponse.js +5 -0
  28. package/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItem.d.ts +10 -0
  29. package/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItem.js +5 -0
  30. package/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItemPolicy.d.ts +8 -0
  31. package/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItemPolicy.js +5 -0
  32. package/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItemPolicyDataItem.d.ts +9 -0
  33. package/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItemPolicyDataItem.js +5 -0
  34. package/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItemPolicyDataItemAccessItem.d.ts +10 -0
  35. package/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItemPolicyDataItemAccessItem.js +12 -0
  36. package/api/resources/clientSideAccessTokens/types/index.d.ts +5 -0
  37. package/api/resources/clientSideAccessTokens/types/index.js +5 -0
  38. package/api/resources/embeddingModels/client/Client.js +1 -1
  39. package/api/resources/groups/client/Client.js +6 -6
  40. package/api/resources/groups/resources/messages/client/Client.js +5 -5
  41. package/api/resources/health/client/Client.js +1 -1
  42. package/api/resources/identities/client/Client.js +7 -7
  43. package/api/resources/identities/resources/properties/client/Client.js +1 -1
  44. package/api/resources/jobs/client/Client.js +5 -5
  45. package/api/resources/messages/client/Client.js +1 -1
  46. package/api/resources/models/client/Client.js +1 -1
  47. package/api/resources/projects/client/Client.js +1 -1
  48. package/api/resources/providers/client/Client.js +5 -5
  49. package/api/resources/runs/client/Client.js +4 -4
  50. package/api/resources/runs/resources/messages/client/Client.js +1 -1
  51. package/api/resources/runs/resources/steps/client/Client.js +1 -1
  52. package/api/resources/runs/resources/usage/client/Client.js +1 -1
  53. package/api/resources/sources/client/Client.d.ts +15 -2
  54. package/api/resources/sources/client/Client.js +86 -12
  55. package/api/resources/sources/client/requests/GetSourcesMetadataRequest.d.ts +10 -0
  56. package/api/resources/sources/client/requests/GetSourcesMetadataRequest.js +5 -0
  57. package/api/resources/sources/client/requests/SourceCreate.d.ts +6 -6
  58. package/api/resources/sources/client/requests/index.d.ts +1 -0
  59. package/api/resources/sources/resources/files/client/Client.d.ts +3 -2
  60. package/api/resources/sources/resources/files/client/Client.js +11 -5
  61. package/api/resources/sources/resources/files/client/requests/BodyUploadFileToSource.d.ts +5 -0
  62. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  63. package/api/resources/steps/client/Client.js +2 -2
  64. package/api/resources/steps/resources/feedback/client/Client.js +1 -1
  65. package/api/resources/tags/client/Client.js +1 -1
  66. package/api/resources/telemetry/client/Client.js +1 -1
  67. package/api/resources/templates/client/Client.js +1 -1
  68. package/api/resources/templates/resources/agents/client/Client.js +1 -1
  69. package/api/resources/templates/resources/agents/client/requests/AgentsCreateRequest.d.ts +3 -0
  70. package/api/resources/templates/resources/agents/types/AgentsCreateRequestInitialMessageSequenceItem.d.ts +13 -0
  71. package/api/resources/templates/resources/agents/types/AgentsCreateRequestInitialMessageSequenceItem.js +5 -0
  72. package/api/resources/templates/resources/agents/types/AgentsCreateRequestInitialMessageSequenceItemRole.d.ts +9 -0
  73. package/api/resources/templates/resources/agents/types/AgentsCreateRequestInitialMessageSequenceItemRole.js +11 -0
  74. package/api/resources/templates/resources/agents/types/index.d.ts +2 -0
  75. package/api/resources/templates/resources/agents/types/index.js +2 -0
  76. package/api/resources/tools/client/Client.js +19 -19
  77. package/api/resources/tools/types/UpdateMcpServerRequest.d.ts +1 -1
  78. package/api/resources/voice/client/Client.js +1 -1
  79. package/api/types/DuplicateFileHandling.d.ts +12 -0
  80. package/api/types/DuplicateFileHandling.js +11 -0
  81. package/api/types/FileMetadata.d.ts +4 -4
  82. package/api/types/Message.d.ts +18 -17
  83. package/api/types/Source.d.ts +4 -4
  84. package/api/types/UpdateStdioMcpServer.d.ts +13 -0
  85. package/api/types/UpdateStdioMcpServer.js +5 -0
  86. package/api/types/index.d.ts +2 -0
  87. package/api/types/index.js +2 -0
  88. package/dist/api/resources/agents/client/Client.js +11 -11
  89. package/dist/api/resources/agents/resources/blocks/client/Client.d.ts +1 -1
  90. package/dist/api/resources/agents/resources/blocks/client/Client.js +6 -6
  91. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  92. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  93. package/dist/api/resources/agents/resources/groups/client/Client.js +1 -1
  94. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  95. package/dist/api/resources/agents/resources/messages/client/Client.d.ts +25 -0
  96. package/dist/api/resources/agents/resources/messages/client/Client.js +90 -7
  97. package/dist/api/resources/agents/resources/messages/types/MessagesPreviewRawPayloadRequest.d.ts +5 -0
  98. package/dist/api/resources/agents/resources/messages/types/MessagesPreviewRawPayloadRequest.js +5 -0
  99. package/dist/api/resources/agents/resources/messages/types/index.d.ts +1 -0
  100. package/dist/api/resources/agents/resources/messages/types/index.js +1 -0
  101. package/dist/api/resources/agents/resources/passages/client/Client.js +4 -4
  102. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  103. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  104. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  105. package/dist/api/resources/batches/client/Client.js +4 -4
  106. package/dist/api/resources/blocks/client/Client.js +6 -6
  107. package/dist/api/resources/blocks/resources/agents/client/Client.js +1 -1
  108. package/dist/api/resources/clientSideAccessTokens/client/Client.d.ts +12 -0
  109. package/dist/api/resources/clientSideAccessTokens/client/Client.js +76 -3
  110. package/dist/api/resources/clientSideAccessTokens/client/requests/ClientSideAccessTokensListClientSideAccessTokensRequest.d.ts +21 -0
  111. package/dist/api/resources/clientSideAccessTokens/client/requests/ClientSideAccessTokensListClientSideAccessTokensRequest.js +5 -0
  112. package/dist/api/resources/clientSideAccessTokens/client/requests/index.d.ts +1 -0
  113. package/dist/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponse.d.ts +8 -0
  114. package/dist/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponse.js +5 -0
  115. package/dist/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItem.d.ts +10 -0
  116. package/dist/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItem.js +5 -0
  117. package/dist/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItemPolicy.d.ts +8 -0
  118. package/dist/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItemPolicy.js +5 -0
  119. package/dist/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItemPolicyDataItem.d.ts +9 -0
  120. package/dist/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItemPolicyDataItem.js +5 -0
  121. package/dist/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItemPolicyDataItemAccessItem.d.ts +10 -0
  122. package/dist/api/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItemPolicyDataItemAccessItem.js +12 -0
  123. package/dist/api/resources/clientSideAccessTokens/types/index.d.ts +5 -0
  124. package/dist/api/resources/clientSideAccessTokens/types/index.js +5 -0
  125. package/dist/api/resources/embeddingModels/client/Client.js +1 -1
  126. package/dist/api/resources/groups/client/Client.js +6 -6
  127. package/dist/api/resources/groups/resources/messages/client/Client.js +5 -5
  128. package/dist/api/resources/health/client/Client.js +1 -1
  129. package/dist/api/resources/identities/client/Client.js +7 -7
  130. package/dist/api/resources/identities/resources/properties/client/Client.js +1 -1
  131. package/dist/api/resources/jobs/client/Client.js +5 -5
  132. package/dist/api/resources/messages/client/Client.js +1 -1
  133. package/dist/api/resources/models/client/Client.js +1 -1
  134. package/dist/api/resources/projects/client/Client.js +1 -1
  135. package/dist/api/resources/providers/client/Client.js +5 -5
  136. package/dist/api/resources/runs/client/Client.js +4 -4
  137. package/dist/api/resources/runs/resources/messages/client/Client.js +1 -1
  138. package/dist/api/resources/runs/resources/steps/client/Client.js +1 -1
  139. package/dist/api/resources/runs/resources/usage/client/Client.js +1 -1
  140. package/dist/api/resources/sources/client/Client.d.ts +15 -2
  141. package/dist/api/resources/sources/client/Client.js +86 -12
  142. package/dist/api/resources/sources/client/requests/GetSourcesMetadataRequest.d.ts +10 -0
  143. package/dist/api/resources/sources/client/requests/GetSourcesMetadataRequest.js +5 -0
  144. package/dist/api/resources/sources/client/requests/SourceCreate.d.ts +6 -6
  145. package/dist/api/resources/sources/client/requests/index.d.ts +1 -0
  146. package/dist/api/resources/sources/resources/files/client/Client.d.ts +3 -2
  147. package/dist/api/resources/sources/resources/files/client/Client.js +11 -5
  148. package/dist/api/resources/sources/resources/files/client/requests/BodyUploadFileToSource.d.ts +5 -0
  149. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  150. package/dist/api/resources/steps/client/Client.js +2 -2
  151. package/dist/api/resources/steps/resources/feedback/client/Client.js +1 -1
  152. package/dist/api/resources/tags/client/Client.js +1 -1
  153. package/dist/api/resources/telemetry/client/Client.js +1 -1
  154. package/dist/api/resources/templates/client/Client.js +1 -1
  155. package/dist/api/resources/templates/resources/agents/client/Client.js +1 -1
  156. package/dist/api/resources/templates/resources/agents/client/requests/AgentsCreateRequest.d.ts +3 -0
  157. package/dist/api/resources/templates/resources/agents/types/AgentsCreateRequestInitialMessageSequenceItem.d.ts +13 -0
  158. package/dist/api/resources/templates/resources/agents/types/AgentsCreateRequestInitialMessageSequenceItem.js +5 -0
  159. package/dist/api/resources/templates/resources/agents/types/AgentsCreateRequestInitialMessageSequenceItemRole.d.ts +9 -0
  160. package/dist/api/resources/templates/resources/agents/types/AgentsCreateRequestInitialMessageSequenceItemRole.js +11 -0
  161. package/dist/api/resources/templates/resources/agents/types/index.d.ts +2 -0
  162. package/dist/api/resources/templates/resources/agents/types/index.js +2 -0
  163. package/dist/api/resources/tools/client/Client.js +19 -19
  164. package/dist/api/resources/tools/types/UpdateMcpServerRequest.d.ts +1 -1
  165. package/dist/api/resources/voice/client/Client.js +1 -1
  166. package/dist/api/types/DuplicateFileHandling.d.ts +12 -0
  167. package/dist/api/types/DuplicateFileHandling.js +11 -0
  168. package/dist/api/types/FileMetadata.d.ts +4 -4
  169. package/dist/api/types/Message.d.ts +18 -17
  170. package/dist/api/types/Source.d.ts +4 -4
  171. package/dist/api/types/UpdateStdioMcpServer.d.ts +13 -0
  172. package/dist/api/types/UpdateStdioMcpServer.js +5 -0
  173. package/dist/api/types/index.d.ts +2 -0
  174. package/dist/api/types/index.js +2 -0
  175. package/dist/serialization/resources/agents/resources/messages/client/index.d.ts +1 -0
  176. package/dist/serialization/resources/agents/resources/messages/client/index.js +2 -1
  177. package/dist/serialization/resources/agents/resources/messages/client/previewRawPayload.d.ts +9 -0
  178. package/dist/serialization/resources/agents/resources/messages/client/previewRawPayload.js +41 -0
  179. package/dist/serialization/resources/agents/resources/messages/types/MessagesPreviewRawPayloadRequest.d.ts +12 -0
  180. package/dist/serialization/resources/agents/resources/messages/types/MessagesPreviewRawPayloadRequest.js +43 -0
  181. package/dist/serialization/resources/agents/resources/messages/types/index.d.ts +1 -0
  182. package/dist/serialization/resources/agents/resources/messages/types/index.js +1 -0
  183. package/dist/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponse.d.ts +14 -0
  184. package/dist/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponse.js +45 -0
  185. package/dist/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItem.d.ts +16 -0
  186. package/dist/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItem.js +47 -0
  187. package/dist/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItemPolicy.d.ts +14 -0
  188. package/dist/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItemPolicy.js +45 -0
  189. package/dist/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItemPolicyDataItem.d.ts +15 -0
  190. package/dist/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItemPolicyDataItem.js +46 -0
  191. package/dist/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItemPolicyDataItemAccessItem.d.ts +10 -0
  192. package/dist/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItemPolicyDataItemAccessItem.js +41 -0
  193. package/dist/serialization/resources/clientSideAccessTokens/types/index.d.ts +5 -0
  194. package/dist/serialization/resources/clientSideAccessTokens/types/index.js +5 -0
  195. package/dist/serialization/resources/sources/client/getAgentsForSource.d.ts +9 -0
  196. package/dist/serialization/resources/sources/client/getAgentsForSource.js +41 -0
  197. package/dist/serialization/resources/sources/client/index.d.ts +1 -0
  198. package/dist/serialization/resources/sources/client/index.js +2 -1
  199. package/dist/serialization/resources/sources/client/requests/SourceCreate.d.ts +3 -3
  200. package/dist/serialization/resources/sources/client/requests/SourceCreate.js +3 -3
  201. package/dist/serialization/resources/templates/resources/agents/client/requests/AgentsCreateRequest.d.ts +2 -0
  202. package/dist/serialization/resources/templates/resources/agents/client/requests/AgentsCreateRequest.js +2 -0
  203. package/dist/serialization/resources/templates/resources/agents/types/AgentsCreateRequestInitialMessageSequenceItem.d.ts +19 -0
  204. package/dist/serialization/resources/templates/resources/agents/types/AgentsCreateRequestInitialMessageSequenceItem.js +50 -0
  205. package/dist/serialization/resources/templates/resources/agents/types/AgentsCreateRequestInitialMessageSequenceItemRole.d.ts +10 -0
  206. package/dist/serialization/resources/templates/resources/agents/types/AgentsCreateRequestInitialMessageSequenceItemRole.js +41 -0
  207. package/dist/serialization/resources/templates/resources/agents/types/index.d.ts +2 -0
  208. package/dist/serialization/resources/templates/resources/agents/types/index.js +2 -0
  209. package/dist/serialization/resources/tools/types/UpdateMcpServerRequest.d.ts +2 -1
  210. package/dist/serialization/resources/tools/types/UpdateMcpServerRequest.js +2 -1
  211. package/dist/serialization/types/DuplicateFileHandling.d.ts +10 -0
  212. package/dist/serialization/types/DuplicateFileHandling.js +41 -0
  213. package/dist/serialization/types/FileMetadata.d.ts +2 -2
  214. package/dist/serialization/types/FileMetadata.js +2 -2
  215. package/dist/serialization/types/Source.d.ts +2 -2
  216. package/dist/serialization/types/Source.js +2 -2
  217. package/dist/serialization/types/UpdateStdioMcpServer.d.ts +14 -0
  218. package/dist/serialization/types/UpdateStdioMcpServer.js +45 -0
  219. package/dist/serialization/types/index.d.ts +2 -0
  220. package/dist/serialization/types/index.js +2 -0
  221. package/dist/version.d.ts +1 -1
  222. package/dist/version.js +1 -1
  223. package/package.json +1 -1
  224. package/reference.md +234 -5
  225. package/serialization/resources/agents/resources/messages/client/index.d.ts +1 -0
  226. package/serialization/resources/agents/resources/messages/client/index.js +2 -1
  227. package/serialization/resources/agents/resources/messages/client/previewRawPayload.d.ts +9 -0
  228. package/serialization/resources/agents/resources/messages/client/previewRawPayload.js +41 -0
  229. package/serialization/resources/agents/resources/messages/types/MessagesPreviewRawPayloadRequest.d.ts +12 -0
  230. package/serialization/resources/agents/resources/messages/types/MessagesPreviewRawPayloadRequest.js +43 -0
  231. package/serialization/resources/agents/resources/messages/types/index.d.ts +1 -0
  232. package/serialization/resources/agents/resources/messages/types/index.js +1 -0
  233. package/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponse.d.ts +14 -0
  234. package/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponse.js +45 -0
  235. package/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItem.d.ts +16 -0
  236. package/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItem.js +47 -0
  237. package/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItemPolicy.d.ts +14 -0
  238. package/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItemPolicy.js +45 -0
  239. package/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItemPolicyDataItem.d.ts +15 -0
  240. package/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItemPolicyDataItem.js +46 -0
  241. package/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItemPolicyDataItemAccessItem.d.ts +10 -0
  242. package/serialization/resources/clientSideAccessTokens/types/ClientSideAccessTokensListClientSideAccessTokensResponseTokensItemPolicyDataItemAccessItem.js +41 -0
  243. package/serialization/resources/clientSideAccessTokens/types/index.d.ts +5 -0
  244. package/serialization/resources/clientSideAccessTokens/types/index.js +5 -0
  245. package/serialization/resources/sources/client/getAgentsForSource.d.ts +9 -0
  246. package/serialization/resources/sources/client/getAgentsForSource.js +41 -0
  247. package/serialization/resources/sources/client/index.d.ts +1 -0
  248. package/serialization/resources/sources/client/index.js +2 -1
  249. package/serialization/resources/sources/client/requests/SourceCreate.d.ts +3 -3
  250. package/serialization/resources/sources/client/requests/SourceCreate.js +3 -3
  251. package/serialization/resources/templates/resources/agents/client/requests/AgentsCreateRequest.d.ts +2 -0
  252. package/serialization/resources/templates/resources/agents/client/requests/AgentsCreateRequest.js +2 -0
  253. package/serialization/resources/templates/resources/agents/types/AgentsCreateRequestInitialMessageSequenceItem.d.ts +19 -0
  254. package/serialization/resources/templates/resources/agents/types/AgentsCreateRequestInitialMessageSequenceItem.js +50 -0
  255. package/serialization/resources/templates/resources/agents/types/AgentsCreateRequestInitialMessageSequenceItemRole.d.ts +10 -0
  256. package/serialization/resources/templates/resources/agents/types/AgentsCreateRequestInitialMessageSequenceItemRole.js +41 -0
  257. package/serialization/resources/templates/resources/agents/types/index.d.ts +2 -0
  258. package/serialization/resources/templates/resources/agents/types/index.js +2 -0
  259. package/serialization/resources/tools/types/UpdateMcpServerRequest.d.ts +2 -1
  260. package/serialization/resources/tools/types/UpdateMcpServerRequest.js +2 -1
  261. package/serialization/types/DuplicateFileHandling.d.ts +10 -0
  262. package/serialization/types/DuplicateFileHandling.js +41 -0
  263. package/serialization/types/FileMetadata.d.ts +2 -2
  264. package/serialization/types/FileMetadata.js +2 -2
  265. package/serialization/types/Source.d.ts +2 -2
  266. package/serialization/types/Source.js +2 -2
  267. package/serialization/types/UpdateStdioMcpServer.d.ts +14 -0
  268. package/serialization/types/UpdateStdioMcpServer.js +45 -0
  269. package/serialization/types/index.d.ts +2 -0
  270. package/serialization/types/index.js +2 -0
  271. package/version.d.ts +1 -1
  272. package/version.js +1 -1
@@ -85,6 +85,7 @@ export * from "./ContextWindowOverview";
85
85
  export * from "./ContinueToolRule";
86
86
  export * from "./CoreMemoryBlockSchema";
87
87
  export * from "./CreateBlock";
88
+ export * from "./DuplicateFileHandling";
88
89
  export * from "./DynamicManager";
89
90
  export * from "./DynamicManagerUpdate";
90
91
  export * from "./E2BSandboxConfig";
@@ -224,6 +225,7 @@ export * from "./UpdateAssistantMessageContent";
224
225
  export * from "./UpdateAssistantMessage";
225
226
  export * from "./UpdateReasoningMessage";
226
227
  export * from "./UpdateSsemcpServer";
228
+ export * from "./UpdateStdioMcpServer";
227
229
  export * from "./UpdateStreamableHttpmcpServer";
228
230
  export * from "./UpdateSystemMessage";
229
231
  export * from "./UpdateUserMessageContent";
@@ -101,6 +101,7 @@ __exportStar(require("./ContextWindowOverview"), exports);
101
101
  __exportStar(require("./ContinueToolRule"), exports);
102
102
  __exportStar(require("./CoreMemoryBlockSchema"), exports);
103
103
  __exportStar(require("./CreateBlock"), exports);
104
+ __exportStar(require("./DuplicateFileHandling"), exports);
104
105
  __exportStar(require("./DynamicManager"), exports);
105
106
  __exportStar(require("./DynamicManagerUpdate"), exports);
106
107
  __exportStar(require("./E2BSandboxConfig"), exports);
@@ -240,6 +241,7 @@ __exportStar(require("./UpdateAssistantMessageContent"), exports);
240
241
  __exportStar(require("./UpdateAssistantMessage"), exports);
241
242
  __exportStar(require("./UpdateReasoningMessage"), exports);
242
243
  __exportStar(require("./UpdateSsemcpServer"), exports);
244
+ __exportStar(require("./UpdateStdioMcpServer"), exports);
243
245
  __exportStar(require("./UpdateStreamableHttpmcpServer"), exports);
244
246
  __exportStar(require("./UpdateSystemMessage"), exports);
245
247
  __exportStar(require("./UpdateUserMessageContent"), exports);
@@ -193,7 +193,7 @@ class Agents {
193
193
  method: "GET",
194
194
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
195
195
  ? yield core.Supplier.get(this._options.project)
196
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
196
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
197
197
  contentType: "application/json",
198
198
  queryParameters: _queryParams,
199
199
  requestType: "json",
@@ -261,7 +261,7 @@ class Agents {
261
261
  method: "POST",
262
262
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
263
263
  ? yield core.Supplier.get(this._options.project)
264
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
264
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
265
265
  contentType: "application/json",
266
266
  requestType: "json",
267
267
  body: serializers.CreateAgentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -328,7 +328,7 @@ class Agents {
328
328
  method: "GET",
329
329
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
330
330
  ? yield core.Supplier.get(this._options.project)
331
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
331
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
332
332
  contentType: "application/json",
333
333
  requestType: "json",
334
334
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -395,7 +395,7 @@ class Agents {
395
395
  method: "GET",
396
396
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
397
397
  ? yield core.Supplier.get(this._options.project)
398
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
398
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
399
399
  contentType: "application/json",
400
400
  requestType: "json",
401
401
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -479,7 +479,7 @@ class Agents {
479
479
  method: "POST",
480
480
  headers: Object.assign(Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
481
481
  ? yield core.Supplier.get(this._options.project)
482
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
482
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
483
483
  queryParameters: _queryParams,
484
484
  requestType: "file",
485
485
  duplex: _maybeEncodedRequest.duplex,
@@ -559,7 +559,7 @@ class Agents {
559
559
  method: "GET",
560
560
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
561
561
  ? yield core.Supplier.get(this._options.project)
562
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
562
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
563
563
  contentType: "application/json",
564
564
  queryParameters: _queryParams,
565
565
  requestType: "json",
@@ -627,7 +627,7 @@ class Agents {
627
627
  method: "DELETE",
628
628
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
629
629
  ? yield core.Supplier.get(this._options.project)
630
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
630
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
631
631
  contentType: "application/json",
632
632
  requestType: "json",
633
633
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -689,7 +689,7 @@ class Agents {
689
689
  method: "PATCH",
690
690
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
691
691
  ? yield core.Supplier.get(this._options.project)
692
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
692
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
693
693
  contentType: "application/json",
694
694
  requestType: "json",
695
695
  body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -760,7 +760,7 @@ class Agents {
760
760
  method: "PATCH",
761
761
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
762
762
  ? yield core.Supplier.get(this._options.project)
763
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
763
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
764
764
  contentType: "application/json",
765
765
  requestType: "json",
766
766
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -836,7 +836,7 @@ class Agents {
836
836
  method: "POST",
837
837
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
838
838
  ? yield core.Supplier.get(this._options.project)
839
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
839
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
840
840
  contentType: "application/json",
841
841
  queryParameters: _queryParams,
842
842
  requestType: "json",
@@ -904,7 +904,7 @@ class Agents {
904
904
  method: "POST",
905
905
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
906
906
  ? yield core.Supplier.get(this._options.project)
907
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
907
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
908
908
  contentType: "application/json",
909
909
  requestType: "json",
910
910
  body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -70,7 +70,7 @@ export declare class Blocks {
70
70
  */
71
71
  list(agentId: string, requestOptions?: Blocks.RequestOptions): Promise<Letta.Block[]>;
72
72
  /**
73
- * Attach a core memoryblock to an agent.
73
+ * Attach a core memory block to an agent.
74
74
  *
75
75
  * @param {string} agentId
76
76
  * @param {string} blockId
@@ -79,7 +79,7 @@ class Blocks {
79
79
  method: "GET",
80
80
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
81
81
  ? yield core.Supplier.get(this._options.project)
82
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
82
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
83
  contentType: "application/json",
84
84
  requestType: "json",
85
85
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -148,7 +148,7 @@ class Blocks {
148
148
  method: "PATCH",
149
149
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
150
150
  ? yield core.Supplier.get(this._options.project)
151
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
151
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
152
152
  contentType: "application/json",
153
153
  requestType: "json",
154
154
  body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -216,7 +216,7 @@ class Blocks {
216
216
  method: "GET",
217
217
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
218
218
  ? yield core.Supplier.get(this._options.project)
219
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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,
@@ -265,7 +265,7 @@ class Blocks {
265
265
  });
266
266
  }
267
267
  /**
268
- * Attach a core memoryblock to an agent.
268
+ * Attach a core memory block to an agent.
269
269
  *
270
270
  * @param {string} agentId
271
271
  * @param {string} blockId
@@ -284,7 +284,7 @@ class Blocks {
284
284
  method: "PATCH",
285
285
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
286
286
  ? yield core.Supplier.get(this._options.project)
287
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
287
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
288
288
  contentType: "application/json",
289
289
  requestType: "json",
290
290
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -352,7 +352,7 @@ class Blocks {
352
352
  method: "PATCH",
353
353
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
354
354
  ? yield core.Supplier.get(this._options.project)
355
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
355
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
356
356
  contentType: "application/json",
357
357
  requestType: "json",
358
358
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -78,7 +78,7 @@ class Context {
78
78
  method: "GET",
79
79
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
80
80
  ? yield core.Supplier.get(this._options.project)
81
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
82
82
  contentType: "application/json",
83
83
  requestType: "json",
84
84
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -79,7 +79,7 @@ class CoreMemory {
79
79
  method: "GET",
80
80
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
81
81
  ? yield core.Supplier.get(this._options.project)
82
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
82
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
83
  contentType: "application/json",
84
84
  requestType: "json",
85
85
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -84,7 +84,7 @@ class Groups {
84
84
  method: "GET",
85
85
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
86
86
  ? yield core.Supplier.get(this._options.project)
87
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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",
@@ -80,7 +80,7 @@ class MemoryVariables {
80
80
  method: "GET",
81
81
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
82
82
  ? yield core.Supplier.get(this._options.project)
83
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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
84
  contentType: "application/json",
85
85
  requestType: "json",
86
86
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -140,6 +140,31 @@ export declare class Messages {
140
140
  * await client.agents.messages.reset("agent_id")
141
141
  */
142
142
  reset(agentId: string, request?: Letta.agents.MessagesResetRequest, requestOptions?: Messages.RequestOptions): Promise<Letta.AgentState>;
143
+ /**
144
+ * Inspect the raw LLM request payload without sending it.
145
+ *
146
+ * This endpoint processes the message through the agent loop up until
147
+ * the LLM request, then returns the raw request payload that would
148
+ * be sent to the LLM provider. Useful for debugging and inspection.
149
+ *
150
+ * @param {string} agentId
151
+ * @param {Letta.agents.MessagesPreviewRawPayloadRequest} request
152
+ * @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
153
+ *
154
+ * @throws {@link Letta.UnprocessableEntityError}
155
+ *
156
+ * @example
157
+ * await client.agents.messages.previewRawPayload("agent_id", {
158
+ * messages: [{
159
+ * role: "user",
160
+ * content: [{
161
+ * type: "text",
162
+ * text: "text"
163
+ * }]
164
+ * }]
165
+ * })
166
+ */
167
+ previewRawPayload(agentId: string, request: Letta.agents.MessagesPreviewRawPayloadRequest, requestOptions?: Messages.RequestOptions): Promise<Record<string, unknown>>;
143
168
  protected _getCustomAuthorizationHeaders(): Promise<{
144
169
  Authorization: string;
145
170
  }>;
@@ -102,7 +102,7 @@ class Messages {
102
102
  method: "GET",
103
103
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
104
104
  ? yield core.Supplier.get(this._options.project)
105
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
106
106
  contentType: "application/json",
107
107
  queryParameters: _queryParams,
108
108
  requestType: "json",
@@ -180,7 +180,7 @@ class Messages {
180
180
  method: "POST",
181
181
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
182
182
  ? yield core.Supplier.get(this._options.project)
183
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
183
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
184
184
  contentType: "application/json",
185
185
  requestType: "json",
186
186
  body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -252,7 +252,7 @@ class Messages {
252
252
  method: "PATCH",
253
253
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
254
254
  ? yield core.Supplier.get(this._options.project)
255
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
255
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
256
256
  contentType: "application/json",
257
257
  requestType: "json",
258
258
  body: serializers.agents.MessagesModifyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -314,7 +314,7 @@ class Messages {
314
314
  method: "POST",
315
315
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
316
316
  ? yield core.Supplier.get(this._options.project)
317
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
317
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
318
318
  contentType: "application/json",
319
319
  requestType: "json",
320
320
  body: serializers.LettaStreamingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -396,7 +396,7 @@ class Messages {
396
396
  method: "POST",
397
397
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
398
398
  ? yield core.Supplier.get(this._options.project)
399
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
399
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
400
400
  contentType: "application/json",
401
401
  requestType: "json",
402
402
  body: request != null
@@ -481,7 +481,7 @@ class Messages {
481
481
  method: "POST",
482
482
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
483
483
  ? yield core.Supplier.get(this._options.project)
484
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
484
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
485
485
  contentType: "application/json",
486
486
  requestType: "json",
487
487
  body: serializers.agents.LettaAsyncRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -555,7 +555,7 @@ class Messages {
555
555
  method: "PATCH",
556
556
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
557
557
  ? yield core.Supplier.get(this._options.project)
558
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
558
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
559
559
  contentType: "application/json",
560
560
  queryParameters: _queryParams,
561
561
  requestType: "json",
@@ -604,6 +604,89 @@ class Messages {
604
604
  }
605
605
  });
606
606
  }
607
+ /**
608
+ * Inspect the raw LLM request payload without sending it.
609
+ *
610
+ * This endpoint processes the message through the agent loop up until
611
+ * the LLM request, then returns the raw request payload that would
612
+ * be sent to the LLM provider. Useful for debugging and inspection.
613
+ *
614
+ * @param {string} agentId
615
+ * @param {Letta.agents.MessagesPreviewRawPayloadRequest} request
616
+ * @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
617
+ *
618
+ * @throws {@link Letta.UnprocessableEntityError}
619
+ *
620
+ * @example
621
+ * await client.agents.messages.previewRawPayload("agent_id", {
622
+ * messages: [{
623
+ * role: "user",
624
+ * content: [{
625
+ * type: "text",
626
+ * text: "text"
627
+ * }]
628
+ * }]
629
+ * })
630
+ */
631
+ previewRawPayload(agentId, request, requestOptions) {
632
+ return __awaiter(this, void 0, void 0, function* () {
633
+ var _a, _b, _c;
634
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
635
+ 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)}/messages/preview-raw-payload`),
636
+ method: "POST",
637
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
638
+ ? yield core.Supplier.get(this._options.project)
639
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
640
+ contentType: "application/json",
641
+ requestType: "json",
642
+ body: serializers.agents.MessagesPreviewRawPayloadRequest.jsonOrThrow(request, {
643
+ unrecognizedObjectKeys: "strip",
644
+ }),
645
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
646
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
647
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
648
+ });
649
+ if (_response.ok) {
650
+ return serializers.agents.messages.previewRawPayload.Response.parseOrThrow(_response.body, {
651
+ unrecognizedObjectKeys: "passthrough",
652
+ allowUnrecognizedUnionMembers: true,
653
+ allowUnrecognizedEnumValues: true,
654
+ skipValidation: true,
655
+ breadcrumbsPrefix: ["response"],
656
+ });
657
+ }
658
+ if (_response.error.reason === "status-code") {
659
+ switch (_response.error.statusCode) {
660
+ case 422:
661
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
662
+ unrecognizedObjectKeys: "passthrough",
663
+ allowUnrecognizedUnionMembers: true,
664
+ allowUnrecognizedEnumValues: true,
665
+ skipValidation: true,
666
+ breadcrumbsPrefix: ["response"],
667
+ }));
668
+ default:
669
+ throw new errors.LettaError({
670
+ statusCode: _response.error.statusCode,
671
+ body: _response.error.body,
672
+ });
673
+ }
674
+ }
675
+ switch (_response.error.reason) {
676
+ case "non-json":
677
+ throw new errors.LettaError({
678
+ statusCode: _response.error.statusCode,
679
+ body: _response.error.rawBody,
680
+ });
681
+ case "timeout":
682
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/messages/preview-raw-payload.");
683
+ case "unknown":
684
+ throw new errors.LettaError({
685
+ message: _response.error.errorMessage,
686
+ });
687
+ }
688
+ });
689
+ }
607
690
  _getCustomAuthorizationHeaders() {
608
691
  return __awaiter(this, void 0, void 0, function* () {
609
692
  const tokenValue = yield core.Supplier.get(this._options.token);
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Letta from "../../../../../index";
5
+ export type MessagesPreviewRawPayloadRequest = Letta.LettaRequest | Letta.LettaStreamingRequest;
@@ -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,3 +1,4 @@
1
1
  export * from "./MessagesModifyRequest";
2
2
  export * from "./MessagesModifyResponse";
3
3
  export * from "./LettaStreamingResponse";
4
+ export * from "./MessagesPreviewRawPayloadRequest";
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./MessagesModifyRequest"), exports);
18
18
  __exportStar(require("./MessagesModifyResponse"), exports);
19
19
  __exportStar(require("./LettaStreamingResponse"), exports);
20
+ __exportStar(require("./MessagesPreviewRawPayloadRequest"), exports);
@@ -96,7 +96,7 @@ class Passages {
96
96
  method: "GET",
97
97
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
98
98
  ? yield core.Supplier.get(this._options.project)
99
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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",
@@ -167,7 +167,7 @@ class Passages {
167
167
  method: "POST",
168
168
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
169
169
  ? yield core.Supplier.get(this._options.project)
170
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
170
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
171
171
  contentType: "application/json",
172
172
  requestType: "json",
173
173
  body: serializers.agents.CreateArchivalMemory.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -236,7 +236,7 @@ class Passages {
236
236
  method: "DELETE",
237
237
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
238
238
  ? yield core.Supplier.get(this._options.project)
239
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
239
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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
240
  contentType: "application/json",
241
241
  requestType: "json",
242
242
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -301,7 +301,7 @@ class Passages {
301
301
  method: "PATCH",
302
302
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
303
303
  ? yield core.Supplier.get(this._options.project)
304
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
304
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
305
305
  contentType: "application/json",
306
306
  requestType: "json",
307
307
  body: serializers.agents.PassageUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -79,7 +79,7 @@ class Sources {
79
79
  method: "PATCH",
80
80
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
81
81
  ? yield core.Supplier.get(this._options.project)
82
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
82
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
83
  contentType: "application/json",
84
84
  requestType: "json",
85
85
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -147,7 +147,7 @@ class Sources {
147
147
  method: "PATCH",
148
148
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
149
149
  ? yield core.Supplier.get(this._options.project)
150
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
151
151
  contentType: "application/json",
152
152
  requestType: "json",
153
153
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -214,7 +214,7 @@ class Sources {
214
214
  method: "GET",
215
215
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
216
216
  ? yield core.Supplier.get(this._options.project)
217
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
217
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
218
218
  contentType: "application/json",
219
219
  requestType: "json",
220
220
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -98,7 +98,7 @@ class Templates {
98
98
  method: "POST",
99
99
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
100
100
  ? yield core.Supplier.get(this._options.project)
101
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
101
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
102
102
  contentType: "application/json",
103
103
  queryParameters: _queryParams,
104
104
  requestType: "json",
@@ -167,7 +167,7 @@ class Templates {
167
167
  method: "POST",
168
168
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
169
169
  ? yield core.Supplier.get(this._options.project)
170
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
170
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
171
171
  contentType: "application/json",
172
172
  requestType: "json",
173
173
  body: serializers.agents.TemplatesMigrateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -242,7 +242,7 @@ class Templates {
242
242
  method: "POST",
243
243
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
244
244
  ? yield core.Supplier.get(this._options.project)
245
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.149", "User-Agent": "@letta-ai/letta-client/0.1.149", "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),
245
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.152", "User-Agent": "@letta-ai/letta-client/0.1.152", "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),
246
246
  contentType: "application/json",
247
247
  requestType: "json",
248
248
  body: serializers.agents.TemplatesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),