@letta-ai/letta-client 0.1.163 → 0.1.165

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 (240) hide show
  1. package/api/resources/agents/client/Client.d.ts +1 -1
  2. package/api/resources/agents/client/Client.js +11 -17
  3. package/api/resources/agents/resources/blocks/client/Client.js +5 -5
  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/files/client/Client.js +3 -3
  7. package/api/resources/agents/resources/folders/client/Client.js +3 -3
  8. package/api/resources/agents/resources/groups/client/Client.js +1 -1
  9. package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  10. package/api/resources/agents/resources/messages/client/Client.js +8 -8
  11. package/api/resources/agents/resources/passages/client/Client.js +4 -4
  12. package/api/resources/agents/resources/sources/client/Client.js +3 -3
  13. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  14. package/api/resources/agents/resources/tools/client/Client.js +3 -3
  15. package/api/resources/batches/client/Client.js +4 -4
  16. package/api/resources/blocks/client/Client.js +10 -7
  17. package/api/resources/blocks/client/requests/BlocksListRequest.d.ts +4 -0
  18. package/api/resources/blocks/resources/agents/client/Client.js +1 -1
  19. package/api/resources/clientSideAccessTokens/client/Client.js +3 -3
  20. package/api/resources/embeddingModels/client/Client.js +1 -1
  21. package/api/resources/folders/client/Client.d.ts +5 -5
  22. package/api/resources/folders/client/Client.js +16 -16
  23. package/api/resources/folders/client/requests/index.d.ts +0 -2
  24. package/api/resources/folders/resources/files/client/Client.js +3 -3
  25. package/api/resources/folders/resources/passages/client/Client.js +1 -1
  26. package/api/resources/groups/client/Client.js +6 -6
  27. package/api/resources/groups/client/requests/GroupCreate.d.ts +2 -0
  28. package/api/resources/groups/client/requests/GroupUpdate.d.ts +2 -0
  29. package/api/resources/groups/resources/messages/client/Client.js +5 -5
  30. package/api/resources/health/client/Client.js +1 -1
  31. package/api/resources/identities/client/Client.js +7 -7
  32. package/api/resources/identities/resources/properties/client/Client.js +1 -1
  33. package/api/resources/jobs/client/Client.js +5 -5
  34. package/api/resources/messages/client/Client.js +1 -1
  35. package/api/resources/models/client/Client.js +1 -1
  36. package/api/resources/projects/client/Client.js +1 -1
  37. package/api/resources/providers/client/Client.js +5 -5
  38. package/api/resources/runs/client/Client.js +4 -4
  39. package/api/resources/runs/resources/messages/client/Client.js +1 -1
  40. package/api/resources/runs/resources/steps/client/Client.js +1 -1
  41. package/api/resources/runs/resources/usage/client/Client.js +1 -1
  42. package/api/resources/sources/client/Client.d.ts +2 -2
  43. package/api/resources/sources/client/Client.js +13 -13
  44. package/api/resources/sources/client/requests/index.d.ts +0 -2
  45. package/api/resources/sources/resources/files/client/Client.js +3 -3
  46. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  47. package/api/resources/steps/client/Client.js +2 -2
  48. package/api/resources/steps/resources/feedback/client/Client.js +1 -1
  49. package/api/resources/tags/client/Client.js +1 -1
  50. package/api/resources/telemetry/client/Client.js +1 -1
  51. package/api/resources/templates/client/Client.js +1 -1
  52. package/api/resources/templates/resources/agents/client/Client.js +1 -1
  53. package/api/resources/tools/client/Client.d.ts +32 -2
  54. package/api/resources/tools/client/Client.js +165 -27
  55. package/api/resources/tools/client/requests/McpOauthCallbackRequest.d.ts +25 -0
  56. package/api/resources/tools/client/requests/index.d.ts +1 -0
  57. package/api/resources/tools/types/ConnectMcpServerRequest.d.ts +5 -0
  58. package/api/resources/tools/types/index.d.ts +1 -0
  59. package/api/resources/tools/types/index.js +1 -0
  60. package/api/resources/voice/client/Client.js +1 -1
  61. package/api/types/Block.d.ts +2 -0
  62. package/api/types/BlockUpdate.d.ts +2 -0
  63. package/api/types/CreateBlock.d.ts +2 -0
  64. package/api/types/FileBlock.d.ts +2 -0
  65. package/api/types/Folder.d.ts +1 -1
  66. package/api/types/Group.d.ts +2 -0
  67. package/{dist/api/resources/sources/client/requests → api/types}/SourceCreate.d.ts +2 -5
  68. package/{dist/api/resources/sources/client/requests → api/types}/SourceUpdate.d.ts +2 -3
  69. package/api/types/index.d.ts +2 -0
  70. package/api/types/index.js +2 -0
  71. package/dist/api/resources/agents/client/Client.d.ts +1 -1
  72. package/dist/api/resources/agents/client/Client.js +11 -17
  73. package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
  74. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  75. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  76. package/dist/api/resources/agents/resources/files/client/Client.js +3 -3
  77. package/dist/api/resources/agents/resources/folders/client/Client.js +3 -3
  78. package/dist/api/resources/agents/resources/groups/client/Client.js +1 -1
  79. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  80. package/dist/api/resources/agents/resources/messages/client/Client.js +8 -8
  81. package/dist/api/resources/agents/resources/passages/client/Client.js +4 -4
  82. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  83. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  84. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  85. package/dist/api/resources/batches/client/Client.js +4 -4
  86. package/dist/api/resources/blocks/client/Client.js +10 -7
  87. package/dist/api/resources/blocks/client/requests/BlocksListRequest.d.ts +4 -0
  88. package/dist/api/resources/blocks/resources/agents/client/Client.js +1 -1
  89. package/dist/api/resources/clientSideAccessTokens/client/Client.js +3 -3
  90. package/dist/api/resources/embeddingModels/client/Client.js +1 -1
  91. package/dist/api/resources/folders/client/Client.d.ts +5 -5
  92. package/dist/api/resources/folders/client/Client.js +16 -16
  93. package/dist/api/resources/folders/client/requests/index.d.ts +0 -2
  94. package/dist/api/resources/folders/resources/files/client/Client.js +3 -3
  95. package/dist/api/resources/folders/resources/passages/client/Client.js +1 -1
  96. package/dist/api/resources/groups/client/Client.js +6 -6
  97. package/dist/api/resources/groups/client/requests/GroupCreate.d.ts +2 -0
  98. package/dist/api/resources/groups/client/requests/GroupUpdate.d.ts +2 -0
  99. package/dist/api/resources/groups/resources/messages/client/Client.js +5 -5
  100. package/dist/api/resources/health/client/Client.js +1 -1
  101. package/dist/api/resources/identities/client/Client.js +7 -7
  102. package/dist/api/resources/identities/resources/properties/client/Client.js +1 -1
  103. package/dist/api/resources/jobs/client/Client.js +5 -5
  104. package/dist/api/resources/messages/client/Client.js +1 -1
  105. package/dist/api/resources/models/client/Client.js +1 -1
  106. package/dist/api/resources/projects/client/Client.js +1 -1
  107. package/dist/api/resources/providers/client/Client.js +5 -5
  108. package/dist/api/resources/runs/client/Client.js +4 -4
  109. package/dist/api/resources/runs/resources/messages/client/Client.js +1 -1
  110. package/dist/api/resources/runs/resources/steps/client/Client.js +1 -1
  111. package/dist/api/resources/runs/resources/usage/client/Client.js +1 -1
  112. package/dist/api/resources/sources/client/Client.d.ts +2 -2
  113. package/dist/api/resources/sources/client/Client.js +13 -13
  114. package/dist/api/resources/sources/client/requests/index.d.ts +0 -2
  115. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  116. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  117. package/dist/api/resources/steps/client/Client.js +2 -2
  118. package/dist/api/resources/steps/resources/feedback/client/Client.js +1 -1
  119. package/dist/api/resources/tags/client/Client.js +1 -1
  120. package/dist/api/resources/telemetry/client/Client.js +1 -1
  121. package/dist/api/resources/templates/client/Client.js +1 -1
  122. package/dist/api/resources/templates/resources/agents/client/Client.js +1 -1
  123. package/dist/api/resources/tools/client/Client.d.ts +32 -2
  124. package/dist/api/resources/tools/client/Client.js +165 -27
  125. package/dist/api/resources/tools/client/requests/McpOauthCallbackRequest.d.ts +25 -0
  126. package/dist/api/resources/tools/client/requests/index.d.ts +1 -0
  127. package/dist/api/resources/tools/types/ConnectMcpServerRequest.d.ts +5 -0
  128. package/dist/api/resources/tools/types/index.d.ts +1 -0
  129. package/dist/api/resources/tools/types/index.js +1 -0
  130. package/dist/api/resources/voice/client/Client.js +1 -1
  131. package/dist/api/types/Block.d.ts +2 -0
  132. package/dist/api/types/BlockUpdate.d.ts +2 -0
  133. package/dist/api/types/CreateBlock.d.ts +2 -0
  134. package/dist/api/types/FileBlock.d.ts +2 -0
  135. package/dist/api/types/Folder.d.ts +1 -1
  136. package/dist/api/types/Group.d.ts +2 -0
  137. package/{api/resources/sources/client/requests → dist/api/types}/SourceCreate.d.ts +2 -5
  138. package/{api/resources/sources/client/requests → dist/api/types}/SourceUpdate.d.ts +2 -3
  139. package/dist/api/types/index.d.ts +2 -0
  140. package/dist/api/types/index.js +2 -0
  141. package/dist/serialization/resources/folders/client/index.d.ts +0 -1
  142. package/dist/serialization/resources/folders/client/index.js +0 -4
  143. package/dist/serialization/resources/groups/client/requests/GroupCreate.d.ts +1 -0
  144. package/dist/serialization/resources/groups/client/requests/GroupCreate.js +1 -0
  145. package/dist/serialization/resources/groups/client/requests/GroupUpdate.d.ts +1 -0
  146. package/dist/serialization/resources/groups/client/requests/GroupUpdate.js +1 -0
  147. package/dist/serialization/resources/index.d.ts +0 -2
  148. package/dist/serialization/resources/index.js +0 -2
  149. package/dist/serialization/resources/sources/client/index.d.ts +0 -1
  150. package/dist/serialization/resources/sources/client/index.js +0 -4
  151. package/dist/serialization/resources/tools/client/index.d.ts +0 -1
  152. package/dist/serialization/resources/tools/client/index.js +1 -2
  153. package/dist/serialization/resources/tools/types/ConnectMcpServerRequest.d.ts +13 -0
  154. package/dist/serialization/resources/tools/{client/testMcpServer.js → types/ConnectMcpServerRequest.js} +5 -3
  155. package/dist/serialization/resources/tools/types/index.d.ts +1 -0
  156. package/dist/serialization/resources/tools/types/index.js +1 -0
  157. package/dist/serialization/types/Block.d.ts +1 -0
  158. package/dist/serialization/types/Block.js +1 -0
  159. package/dist/serialization/types/BlockUpdate.d.ts +1 -0
  160. package/dist/serialization/types/BlockUpdate.js +1 -0
  161. package/dist/serialization/types/CreateBlock.d.ts +1 -0
  162. package/dist/serialization/types/CreateBlock.js +1 -0
  163. package/dist/serialization/types/FileBlock.d.ts +1 -0
  164. package/dist/serialization/types/FileBlock.js +1 -0
  165. package/dist/serialization/types/Group.d.ts +1 -0
  166. package/dist/serialization/types/Group.js +1 -0
  167. package/dist/serialization/{resources/sources/client/requests → types}/SourceCreate.d.ts +5 -5
  168. package/dist/serialization/{resources/sources/client/requests → types}/SourceCreate.js +2 -2
  169. package/{serialization/resources/sources/client/requests → dist/serialization/types}/SourceUpdate.d.ts +5 -5
  170. package/dist/serialization/{resources/sources/client/requests → types}/SourceUpdate.js +2 -2
  171. package/dist/serialization/types/index.d.ts +2 -0
  172. package/dist/serialization/types/index.js +2 -0
  173. package/dist/version.d.ts +1 -1
  174. package/dist/version.js +1 -1
  175. package/package.json +1 -1
  176. package/reference.md +146 -7
  177. package/serialization/resources/folders/client/index.d.ts +0 -1
  178. package/serialization/resources/folders/client/index.js +0 -4
  179. package/serialization/resources/groups/client/requests/GroupCreate.d.ts +1 -0
  180. package/serialization/resources/groups/client/requests/GroupCreate.js +1 -0
  181. package/serialization/resources/groups/client/requests/GroupUpdate.d.ts +1 -0
  182. package/serialization/resources/groups/client/requests/GroupUpdate.js +1 -0
  183. package/serialization/resources/index.d.ts +0 -2
  184. package/serialization/resources/index.js +0 -2
  185. package/serialization/resources/sources/client/index.d.ts +0 -1
  186. package/serialization/resources/sources/client/index.js +0 -4
  187. package/serialization/resources/tools/client/index.d.ts +0 -1
  188. package/serialization/resources/tools/client/index.js +1 -2
  189. package/serialization/resources/tools/types/ConnectMcpServerRequest.d.ts +13 -0
  190. package/serialization/resources/tools/{client/testMcpServer.js → types/ConnectMcpServerRequest.js} +5 -3
  191. package/serialization/resources/tools/types/index.d.ts +1 -0
  192. package/serialization/resources/tools/types/index.js +1 -0
  193. package/serialization/types/Block.d.ts +1 -0
  194. package/serialization/types/Block.js +1 -0
  195. package/serialization/types/BlockUpdate.d.ts +1 -0
  196. package/serialization/types/BlockUpdate.js +1 -0
  197. package/serialization/types/CreateBlock.d.ts +1 -0
  198. package/serialization/types/CreateBlock.js +1 -0
  199. package/serialization/types/FileBlock.d.ts +1 -0
  200. package/serialization/types/FileBlock.js +1 -0
  201. package/serialization/types/Group.d.ts +1 -0
  202. package/serialization/types/Group.js +1 -0
  203. package/serialization/{resources/sources/client/requests → types}/SourceCreate.d.ts +5 -5
  204. package/serialization/{resources/sources/client/requests → types}/SourceCreate.js +2 -2
  205. package/{dist/serialization/resources/sources/client/requests → serialization/types}/SourceUpdate.d.ts +5 -5
  206. package/serialization/{resources/sources/client/requests → types}/SourceUpdate.js +2 -2
  207. package/serialization/types/index.d.ts +2 -0
  208. package/serialization/types/index.js +2 -0
  209. package/version.d.ts +1 -1
  210. package/version.js +1 -1
  211. package/api/resources/folders/client/requests/FolderCreate.d.ts +0 -26
  212. package/api/resources/folders/client/requests/FolderUpdate.d.ts +0 -20
  213. package/dist/api/resources/folders/client/requests/FolderCreate.d.ts +0 -26
  214. package/dist/api/resources/folders/client/requests/FolderUpdate.d.ts +0 -20
  215. package/dist/serialization/resources/folders/client/requests/FolderCreate.d.ts +0 -19
  216. package/dist/serialization/resources/folders/client/requests/FolderCreate.js +0 -50
  217. package/dist/serialization/resources/folders/client/requests/FolderUpdate.d.ts +0 -17
  218. package/dist/serialization/resources/folders/client/requests/FolderUpdate.js +0 -48
  219. package/dist/serialization/resources/folders/client/requests/index.d.ts +0 -2
  220. package/dist/serialization/resources/folders/client/requests/index.js +0 -7
  221. package/dist/serialization/resources/sources/client/requests/index.d.ts +0 -2
  222. package/dist/serialization/resources/sources/client/requests/index.js +0 -7
  223. package/dist/serialization/resources/tools/client/testMcpServer.d.ts +0 -11
  224. package/serialization/resources/folders/client/requests/FolderCreate.d.ts +0 -19
  225. package/serialization/resources/folders/client/requests/FolderCreate.js +0 -50
  226. package/serialization/resources/folders/client/requests/FolderUpdate.d.ts +0 -17
  227. package/serialization/resources/folders/client/requests/FolderUpdate.js +0 -48
  228. package/serialization/resources/folders/client/requests/index.d.ts +0 -2
  229. package/serialization/resources/folders/client/requests/index.js +0 -7
  230. package/serialization/resources/sources/client/requests/index.d.ts +0 -2
  231. package/serialization/resources/sources/client/requests/index.js +0 -7
  232. package/serialization/resources/tools/client/testMcpServer.d.ts +0 -11
  233. /package/api/resources/{folders/client/requests/FolderCreate.js → tools/client/requests/McpOauthCallbackRequest.js} +0 -0
  234. /package/api/resources/{folders/client/requests/FolderUpdate.js → tools/types/ConnectMcpServerRequest.js} +0 -0
  235. /package/api/{resources/sources/client/requests → types}/SourceCreate.js +0 -0
  236. /package/api/{resources/sources/client/requests → types}/SourceUpdate.js +0 -0
  237. /package/dist/api/resources/{folders/client/requests/FolderCreate.js → tools/client/requests/McpOauthCallbackRequest.js} +0 -0
  238. /package/dist/api/resources/{folders/client/requests/FolderUpdate.js → tools/types/ConnectMcpServerRequest.js} +0 -0
  239. /package/dist/api/{resources/sources/client/requests → types}/SourceCreate.js +0 -0
  240. /package/dist/api/{resources/sources/client/requests → types}/SourceUpdate.js +0 -0
@@ -78,7 +78,7 @@ class Tools {
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.163", "User-Agent": "@letta-ai/letta-client/0.1.163", "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.165", "User-Agent": "@letta-ai/letta-client/0.1.165", "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,
@@ -145,7 +145,7 @@ class Tools {
145
145
  method: "DELETE",
146
146
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
147
147
  ? yield core.Supplier.get(this._options.project)
148
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.163", "User-Agent": "@letta-ai/letta-client/0.1.163", "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),
148
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.165", "User-Agent": "@letta-ai/letta-client/0.1.165", "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
149
  contentType: "application/json",
150
150
  requestType: "json",
151
151
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -207,7 +207,7 @@ class Tools {
207
207
  method: "PATCH",
208
208
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
209
209
  ? yield core.Supplier.get(this._options.project)
210
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.163", "User-Agent": "@letta-ai/letta-client/0.1.163", "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),
210
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.165", "User-Agent": "@letta-ai/letta-client/0.1.165", "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
211
  contentType: "application/json",
212
212
  requestType: "json",
213
213
  body: serializers.ToolUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -280,7 +280,7 @@ class Tools {
280
280
  method: "GET",
281
281
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
282
282
  ? yield core.Supplier.get(this._options.project)
283
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.163", "User-Agent": "@letta-ai/letta-client/0.1.163", "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
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.165", "User-Agent": "@letta-ai/letta-client/0.1.165", "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),
284
284
  contentType: "application/json",
285
285
  queryParameters: _queryParams,
286
286
  requestType: "json",
@@ -359,7 +359,7 @@ class Tools {
359
359
  method: "GET",
360
360
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
361
361
  ? yield core.Supplier.get(this._options.project)
362
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.163", "User-Agent": "@letta-ai/letta-client/0.1.163", "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),
362
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.165", "User-Agent": "@letta-ai/letta-client/0.1.165", "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),
363
363
  contentType: "application/json",
364
364
  queryParameters: _queryParams,
365
365
  requestType: "json",
@@ -429,7 +429,7 @@ class Tools {
429
429
  method: "POST",
430
430
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
431
431
  ? yield core.Supplier.get(this._options.project)
432
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.163", "User-Agent": "@letta-ai/letta-client/0.1.163", "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),
432
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.165", "User-Agent": "@letta-ai/letta-client/0.1.165", "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),
433
433
  contentType: "application/json",
434
434
  requestType: "json",
435
435
  body: serializers.ToolCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -499,7 +499,7 @@ class Tools {
499
499
  method: "PUT",
500
500
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
501
501
  ? yield core.Supplier.get(this._options.project)
502
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.163", "User-Agent": "@letta-ai/letta-client/0.1.163", "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),
502
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.165", "User-Agent": "@letta-ai/letta-client/0.1.165", "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),
503
503
  contentType: "application/json",
504
504
  requestType: "json",
505
505
  body: serializers.ToolCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -566,7 +566,7 @@ class Tools {
566
566
  method: "POST",
567
567
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
568
568
  ? yield core.Supplier.get(this._options.project)
569
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.163", "User-Agent": "@letta-ai/letta-client/0.1.163", "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),
569
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.165", "User-Agent": "@letta-ai/letta-client/0.1.165", "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),
570
570
  contentType: "application/json",
571
571
  requestType: "json",
572
572
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -638,7 +638,7 @@ class Tools {
638
638
  method: "POST",
639
639
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
640
640
  ? yield core.Supplier.get(this._options.project)
641
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.163", "User-Agent": "@letta-ai/letta-client/0.1.163", "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),
641
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.165", "User-Agent": "@letta-ai/letta-client/0.1.165", "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),
642
642
  contentType: "application/json",
643
643
  requestType: "json",
644
644
  body: serializers.ToolRunFromSource.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -707,7 +707,7 @@ class Tools {
707
707
  method: "GET",
708
708
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
709
709
  ? yield core.Supplier.get(this._options.project)
710
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.163", "User-Agent": "@letta-ai/letta-client/0.1.163", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
710
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.165", "User-Agent": "@letta-ai/letta-client/0.1.165", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
711
711
  contentType: "application/json",
712
712
  requestType: "json",
713
713
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -774,7 +774,7 @@ class Tools {
774
774
  method: "GET",
775
775
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
776
776
  ? yield core.Supplier.get(this._options.project)
777
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.163", "User-Agent": "@letta-ai/letta-client/0.1.163", "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),
777
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.165", "User-Agent": "@letta-ai/letta-client/0.1.165", "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),
778
778
  contentType: "application/json",
779
779
  requestType: "json",
780
780
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -841,7 +841,7 @@ class Tools {
841
841
  method: "POST",
842
842
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
843
843
  ? yield core.Supplier.get(this._options.project)
844
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.163", "User-Agent": "@letta-ai/letta-client/0.1.163", "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),
844
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.165", "User-Agent": "@letta-ai/letta-client/0.1.165", "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),
845
845
  contentType: "application/json",
846
846
  requestType: "json",
847
847
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -909,7 +909,7 @@ class Tools {
909
909
  method: "GET",
910
910
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
911
911
  ? yield core.Supplier.get(this._options.project)
912
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.163", "User-Agent": "@letta-ai/letta-client/0.1.163", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
912
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.165", "User-Agent": "@letta-ai/letta-client/0.1.165", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
913
913
  contentType: "application/json",
914
914
  requestType: "json",
915
915
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -980,7 +980,7 @@ class Tools {
980
980
  method: "PUT",
981
981
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
982
982
  ? yield core.Supplier.get(this._options.project)
983
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.163", "User-Agent": "@letta-ai/letta-client/0.1.163", "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),
983
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.165", "User-Agent": "@letta-ai/letta-client/0.1.165", "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),
984
984
  contentType: "application/json",
985
985
  requestType: "json",
986
986
  body: serializers.AddMcpServerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1048,7 +1048,7 @@ class Tools {
1048
1048
  method: "GET",
1049
1049
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
1050
1050
  ? yield core.Supplier.get(this._options.project)
1051
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.163", "User-Agent": "@letta-ai/letta-client/0.1.163", "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),
1051
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.165", "User-Agent": "@letta-ai/letta-client/0.1.165", "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),
1052
1052
  contentType: "application/json",
1053
1053
  requestType: "json",
1054
1054
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1116,7 +1116,7 @@ class Tools {
1116
1116
  method: "POST",
1117
1117
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
1118
1118
  ? yield core.Supplier.get(this._options.project)
1119
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.163", "User-Agent": "@letta-ai/letta-client/0.1.163", "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),
1119
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.165", "User-Agent": "@letta-ai/letta-client/0.1.165", "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),
1120
1120
  contentType: "application/json",
1121
1121
  requestType: "json",
1122
1122
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1183,7 +1183,7 @@ class Tools {
1183
1183
  method: "DELETE",
1184
1184
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
1185
1185
  ? yield core.Supplier.get(this._options.project)
1186
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.163", "User-Agent": "@letta-ai/letta-client/0.1.163", "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),
1186
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.165", "User-Agent": "@letta-ai/letta-client/0.1.165", "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),
1187
1187
  contentType: "application/json",
1188
1188
  requestType: "json",
1189
1189
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1251,7 +1251,7 @@ class Tools {
1251
1251
  method: "PATCH",
1252
1252
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
1253
1253
  ? yield core.Supplier.get(this._options.project)
1254
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.163", "User-Agent": "@letta-ai/letta-client/0.1.163", "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),
1254
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.165", "User-Agent": "@letta-ai/letta-client/0.1.165", "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),
1255
1255
  contentType: "application/json",
1256
1256
  requestType: "json",
1257
1257
  body: serializers.UpdateMcpServerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1302,7 +1302,7 @@ class Tools {
1302
1302
  }
1303
1303
  /**
1304
1304
  * Test connection to an MCP server without adding it.
1305
- * Returns the list of available tools if successful.
1305
+ * Returns the list of available tools if successful, or OAuth information if OAuth is required.
1306
1306
  *
1307
1307
  * @param {Letta.TestMcpServerRequest} request
1308
1308
  * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
@@ -1324,7 +1324,7 @@ class Tools {
1324
1324
  method: "POST",
1325
1325
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
1326
1326
  ? yield core.Supplier.get(this._options.project)
1327
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.163", "User-Agent": "@letta-ai/letta-client/0.1.163", "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),
1327
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.165", "User-Agent": "@letta-ai/letta-client/0.1.165", "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),
1328
1328
  contentType: "application/json",
1329
1329
  requestType: "json",
1330
1330
  body: serializers.TestMcpServerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1333,13 +1333,7 @@ class Tools {
1333
1333
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1334
1334
  });
1335
1335
  if (_response.ok) {
1336
- return serializers.tools.testMcpServer.Response.parseOrThrow(_response.body, {
1337
- unrecognizedObjectKeys: "passthrough",
1338
- allowUnrecognizedUnionMembers: true,
1339
- allowUnrecognizedEnumValues: true,
1340
- skipValidation: true,
1341
- breadcrumbsPrefix: ["response"],
1342
- });
1336
+ return _response.body;
1343
1337
  }
1344
1338
  if (_response.error.reason === "status-code") {
1345
1339
  switch (_response.error.statusCode) {
@@ -1373,6 +1367,150 @@ class Tools {
1373
1367
  }
1374
1368
  });
1375
1369
  }
1370
+ /**
1371
+ * Connect to an MCP server with support for OAuth via SSE.
1372
+ * Returns a stream of events handling authorization state and exchange if OAuth is required.
1373
+ *
1374
+ * @param {Letta.ConnectMcpServerRequest} request
1375
+ * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
1376
+ *
1377
+ * @throws {@link Letta.UnprocessableEntityError}
1378
+ *
1379
+ * @example
1380
+ * await client.tools.connectMcpServer({
1381
+ * serverName: "server_name",
1382
+ * command: "command",
1383
+ * args: ["args"]
1384
+ * })
1385
+ */
1386
+ connectMcpServer(request, requestOptions) {
1387
+ return __awaiter(this, void 0, void 0, function* () {
1388
+ var _a, _b, _c;
1389
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1390
+ 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/tools/mcp/servers/connect"),
1391
+ method: "POST",
1392
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
1393
+ ? yield core.Supplier.get(this._options.project)
1394
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.165", "User-Agent": "@letta-ai/letta-client/0.1.165", "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),
1395
+ contentType: "application/json",
1396
+ requestType: "json",
1397
+ body: serializers.ConnectMcpServerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
1398
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1399
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1400
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1401
+ });
1402
+ if (_response.ok) {
1403
+ return _response.body;
1404
+ }
1405
+ if (_response.error.reason === "status-code") {
1406
+ switch (_response.error.statusCode) {
1407
+ case 422:
1408
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
1409
+ unrecognizedObjectKeys: "passthrough",
1410
+ allowUnrecognizedUnionMembers: true,
1411
+ allowUnrecognizedEnumValues: true,
1412
+ skipValidation: true,
1413
+ breadcrumbsPrefix: ["response"],
1414
+ }));
1415
+ default:
1416
+ throw new errors.LettaError({
1417
+ statusCode: _response.error.statusCode,
1418
+ body: _response.error.body,
1419
+ });
1420
+ }
1421
+ }
1422
+ switch (_response.error.reason) {
1423
+ case "non-json":
1424
+ throw new errors.LettaError({
1425
+ statusCode: _response.error.statusCode,
1426
+ body: _response.error.rawBody,
1427
+ });
1428
+ case "timeout":
1429
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/tools/mcp/servers/connect.");
1430
+ case "unknown":
1431
+ throw new errors.LettaError({
1432
+ message: _response.error.errorMessage,
1433
+ });
1434
+ }
1435
+ });
1436
+ }
1437
+ /**
1438
+ * Handle OAuth callback for MCP server authentication.
1439
+ *
1440
+ * @param {string} sessionId
1441
+ * @param {Letta.McpOauthCallbackRequest} request
1442
+ * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
1443
+ *
1444
+ * @throws {@link Letta.UnprocessableEntityError}
1445
+ *
1446
+ * @example
1447
+ * await client.tools.mcpOauthCallback("session_id")
1448
+ */
1449
+ mcpOauthCallback(sessionId_1) {
1450
+ return __awaiter(this, arguments, void 0, function* (sessionId, request = {}, requestOptions) {
1451
+ var _a, _b, _c;
1452
+ const { code, state, error, errorDescription } = request;
1453
+ const _queryParams = {};
1454
+ if (code != null) {
1455
+ _queryParams["code"] = code;
1456
+ }
1457
+ if (state != null) {
1458
+ _queryParams["state"] = state;
1459
+ }
1460
+ if (error != null) {
1461
+ _queryParams["error"] = error;
1462
+ }
1463
+ if (errorDescription != null) {
1464
+ _queryParams["error_description"] = errorDescription;
1465
+ }
1466
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1467
+ 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/tools/mcp/oauth/callback/${encodeURIComponent(sessionId)}`),
1468
+ method: "GET",
1469
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
1470
+ ? yield core.Supplier.get(this._options.project)
1471
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.165", "User-Agent": "@letta-ai/letta-client/0.1.165", "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),
1472
+ contentType: "application/json",
1473
+ queryParameters: _queryParams,
1474
+ requestType: "json",
1475
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1476
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1477
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1478
+ });
1479
+ if (_response.ok) {
1480
+ return;
1481
+ }
1482
+ if (_response.error.reason === "status-code") {
1483
+ switch (_response.error.statusCode) {
1484
+ case 422:
1485
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
1486
+ unrecognizedObjectKeys: "passthrough",
1487
+ allowUnrecognizedUnionMembers: true,
1488
+ allowUnrecognizedEnumValues: true,
1489
+ skipValidation: true,
1490
+ breadcrumbsPrefix: ["response"],
1491
+ }));
1492
+ default:
1493
+ throw new errors.LettaError({
1494
+ statusCode: _response.error.statusCode,
1495
+ body: _response.error.body,
1496
+ });
1497
+ }
1498
+ }
1499
+ switch (_response.error.reason) {
1500
+ case "non-json":
1501
+ throw new errors.LettaError({
1502
+ statusCode: _response.error.statusCode,
1503
+ body: _response.error.rawBody,
1504
+ });
1505
+ case "timeout":
1506
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/tools/mcp/oauth/callback/{session_id}.");
1507
+ case "unknown":
1508
+ throw new errors.LettaError({
1509
+ message: _response.error.errorMessage,
1510
+ });
1511
+ }
1512
+ });
1513
+ }
1376
1514
  _getCustomAuthorizationHeaders() {
1377
1515
  return __awaiter(this, void 0, void 0, function* () {
1378
1516
  const tokenValue = yield core.Supplier.get(this._options.token);
@@ -0,0 +1,25 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface McpOauthCallbackRequest {
9
+ /**
10
+ * OAuth authorization code
11
+ */
12
+ code?: string;
13
+ /**
14
+ * OAuth state parameter
15
+ */
16
+ state?: string;
17
+ /**
18
+ * OAuth error
19
+ */
20
+ error?: string;
21
+ /**
22
+ * OAuth error description
23
+ */
24
+ errorDescription?: string;
25
+ }
@@ -4,3 +4,4 @@ export { type ToolsListRequest } from "./ToolsListRequest";
4
4
  export { type ToolRunFromSource } from "./ToolRunFromSource";
5
5
  export { type ListComposioAppsRequest } from "./ListComposioAppsRequest";
6
6
  export { type ListMcpServersRequest } from "./ListMcpServersRequest";
7
+ export { type McpOauthCallbackRequest } from "./McpOauthCallbackRequest";
@@ -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 ConnectMcpServerRequest = Letta.StdioServerConfig | Letta.SseServerConfig | Letta.StreamableHttpServerConfig;
@@ -5,3 +5,4 @@ export * from "./DeleteMcpServerResponseItem";
5
5
  export * from "./UpdateMcpServerRequest";
6
6
  export * from "./UpdateMcpServerResponse";
7
7
  export * from "./TestMcpServerRequest";
8
+ export * from "./ConnectMcpServerRequest";
@@ -21,3 +21,4 @@ __exportStar(require("./DeleteMcpServerResponseItem"), exports);
21
21
  __exportStar(require("./UpdateMcpServerRequest"), exports);
22
22
  __exportStar(require("./UpdateMcpServerResponse"), exports);
23
23
  __exportStar(require("./TestMcpServerRequest"), exports);
24
+ __exportStar(require("./ConnectMcpServerRequest"), exports);
@@ -82,7 +82,7 @@ class Voice {
82
82
  method: "POST",
83
83
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
84
84
  ? yield core.Supplier.get(this._options.project)
85
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.163", "User-Agent": "@letta-ai/letta-client/0.1.163", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
85
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.165", "User-Agent": "@letta-ai/letta-client/0.1.165", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
86
86
  contentType: "application/json",
87
87
  requestType: "json",
88
88
  body: serializers.voice.createVoiceChatCompletions.Request.jsonOrThrow(_body, {
@@ -20,6 +20,8 @@ export interface Block {
20
20
  value: string;
21
21
  /** Character limit of the block. */
22
22
  limit?: number;
23
+ /** The associated project id. */
24
+ projectId?: string;
23
25
  /** Name of the block if it is a template. */
24
26
  name?: string;
25
27
  /** Whether the block is a template (e.g. saved human/persona options). */
@@ -9,6 +9,8 @@ export interface BlockUpdate {
9
9
  value?: string;
10
10
  /** Character limit of the block. */
11
11
  limit?: number;
12
+ /** The associated project id. */
13
+ projectId?: string;
12
14
  /** Name of the block if it is a template. */
13
15
  name?: string;
14
16
  /** Whether the block is a template (e.g. saved human/persona options). */
@@ -9,6 +9,8 @@ export interface CreateBlock {
9
9
  value: string;
10
10
  /** Character limit of the block. */
11
11
  limit?: number;
12
+ /** The associated project id. */
13
+ projectId?: string;
12
14
  /** Name of the block if it is a template. */
13
15
  name?: string;
14
16
  isTemplate?: boolean;
@@ -6,6 +6,8 @@ export interface FileBlock {
6
6
  value: string;
7
7
  /** Character limit of the block. */
8
8
  limit?: number;
9
+ /** The associated project id. */
10
+ projectId?: string;
9
11
  /** Name of the block if it is a template. */
10
12
  name?: string;
11
13
  /** Whether the block is a template (e.g. saved human/persona options). */
@@ -22,7 +22,7 @@ export interface Folder {
22
22
  instructions?: string;
23
23
  /** Metadata associated with the folder. */
24
24
  metadata?: Record<string, unknown>;
25
- /** The human-friendly ID of the Folder */
25
+ /** The human-friendly ID of the Source */
26
26
  id?: string;
27
27
  /** The embedding configuration used by the folder. */
28
28
  embeddingConfig: Letta.EmbeddingConfig;
@@ -11,6 +11,8 @@ export interface Group {
11
11
  agentIds: string[];
12
12
  /** */
13
13
  description: string;
14
+ /** The associated project id. */
15
+ projectId?: string;
14
16
  /** */
15
17
  sharedBlockIds?: string[];
16
18
  /** */
@@ -1,12 +1,9 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as Letta from "../../../../index";
4
+ import * as Letta from "../index";
5
5
  /**
6
- * @example
7
- * {
8
- * name: "name"
9
- * }
6
+ * Schema for creating a new Source.
10
7
  */
11
8
  export interface SourceCreate {
12
9
  /** The name of the source. */
@@ -1,10 +1,9 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as Letta from "../../../../index";
4
+ import * as Letta from "../index";
5
5
  /**
6
- * @example
7
- * {}
6
+ * Schema for updating an existing Source.
8
7
  */
9
8
  export interface SourceUpdate {
10
9
  /** The name of the source. */
@@ -195,7 +195,9 @@ export * from "./SandboxType";
195
195
  export * from "./SleeptimeManager";
196
196
  export * from "./SleeptimeManagerUpdate";
197
197
  export * from "./Source";
198
+ export * from "./SourceCreate";
198
199
  export * from "./SourceStats";
200
+ export * from "./SourceUpdate";
199
201
  export * from "./StdioServerConfig";
200
202
  export * from "./StepFeedback";
201
203
  export * from "./Step";
@@ -211,7 +211,9 @@ __exportStar(require("./SandboxType"), exports);
211
211
  __exportStar(require("./SleeptimeManager"), exports);
212
212
  __exportStar(require("./SleeptimeManagerUpdate"), exports);
213
213
  __exportStar(require("./Source"), exports);
214
+ __exportStar(require("./SourceCreate"), exports);
214
215
  __exportStar(require("./SourceStats"), exports);
216
+ __exportStar(require("./SourceUpdate"), exports);
215
217
  __exportStar(require("./StdioServerConfig"), exports);
216
218
  __exportStar(require("./StepFeedback"), exports);
217
219
  __exportStar(require("./Step"), exports);
@@ -186,7 +186,7 @@ export declare class Agents {
186
186
  * maxMessageLength: 1
187
187
  * })
188
188
  */
189
- summarizeAgentConversation(agentId: string, request: Letta.SummarizeAgentConversationRequest, requestOptions?: Agents.RequestOptions): Promise<Letta.AgentState>;
189
+ summarizeAgentConversation(agentId: string, request: Letta.SummarizeAgentConversationRequest, requestOptions?: Agents.RequestOptions): Promise<void>;
190
190
  /**
191
191
  * <Note>This endpoint is only available on Letta Cloud.</Note>
192
192
  *