@letta-ai/letta-client 0.1.143 → 0.1.145

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 (213) hide show
  1. package/Client.d.ts +4 -0
  2. package/README.md +1 -1
  3. package/api/resources/agents/client/Client.d.ts +4 -0
  4. package/api/resources/agents/client/Client.js +31 -23
  5. package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -2
  6. package/api/resources/agents/resources/blocks/client/Client.d.ts +4 -0
  7. package/api/resources/agents/resources/blocks/client/Client.js +15 -5
  8. package/api/resources/agents/resources/context/client/Client.d.ts +4 -0
  9. package/api/resources/agents/resources/context/client/Client.js +3 -1
  10. package/api/resources/agents/resources/coreMemory/client/Client.d.ts +4 -0
  11. package/api/resources/agents/resources/coreMemory/client/Client.js +3 -1
  12. package/api/resources/agents/resources/groups/client/Client.d.ts +4 -0
  13. package/api/resources/agents/resources/groups/client/Client.js +3 -1
  14. package/api/resources/agents/resources/memoryVariables/client/Client.d.ts +4 -0
  15. package/api/resources/agents/resources/memoryVariables/client/Client.js +3 -1
  16. package/api/resources/agents/resources/messages/client/Client.d.ts +4 -0
  17. package/api/resources/agents/resources/messages/client/Client.js +18 -6
  18. package/api/resources/agents/resources/passages/client/Client.d.ts +4 -0
  19. package/api/resources/agents/resources/passages/client/Client.js +12 -4
  20. package/api/resources/agents/resources/sources/client/Client.d.ts +4 -0
  21. package/api/resources/agents/resources/sources/client/Client.js +9 -3
  22. package/api/resources/agents/resources/templates/client/Client.d.ts +4 -0
  23. package/api/resources/agents/resources/templates/client/Client.js +9 -3
  24. package/api/resources/agents/resources/tools/client/Client.d.ts +4 -0
  25. package/api/resources/agents/resources/tools/client/Client.js +9 -3
  26. package/api/resources/batches/client/Client.d.ts +4 -0
  27. package/api/resources/batches/client/Client.js +12 -4
  28. package/api/resources/blocks/client/Client.d.ts +4 -0
  29. package/api/resources/blocks/client/Client.js +18 -6
  30. package/api/resources/blocks/resources/agents/client/Client.d.ts +4 -0
  31. package/api/resources/blocks/resources/agents/client/Client.js +3 -1
  32. package/api/resources/clientSideAccessTokens/client/Client.d.ts +4 -0
  33. package/api/resources/clientSideAccessTokens/client/Client.js +6 -2
  34. package/api/resources/embeddingModels/client/Client.d.ts +4 -0
  35. package/api/resources/embeddingModels/client/Client.js +3 -1
  36. package/api/resources/groups/client/Client.d.ts +4 -0
  37. package/api/resources/groups/client/Client.js +20 -21
  38. package/api/resources/groups/client/requests/GroupCreate.d.ts +0 -1
  39. package/api/resources/groups/client/requests/GroupUpdate.d.ts +0 -1
  40. package/api/resources/groups/resources/messages/client/Client.d.ts +4 -0
  41. package/api/resources/groups/resources/messages/client/Client.js +15 -5
  42. package/api/resources/health/client/Client.d.ts +4 -0
  43. package/api/resources/health/client/Client.js +3 -1
  44. package/api/resources/identities/client/Client.d.ts +4 -0
  45. package/api/resources/identities/client/Client.js +23 -22
  46. package/api/resources/identities/client/requests/IdentityCreate.d.ts +0 -1
  47. package/api/resources/identities/client/requests/IdentityUpsert.d.ts +0 -1
  48. package/api/resources/identities/resources/properties/client/Client.d.ts +4 -0
  49. package/api/resources/identities/resources/properties/client/Client.js +3 -1
  50. package/api/resources/jobs/client/Client.d.ts +4 -0
  51. package/api/resources/jobs/client/Client.js +12 -4
  52. package/api/resources/messages/client/Client.d.ts +4 -0
  53. package/api/resources/messages/client/Client.js +3 -1
  54. package/api/resources/models/client/Client.d.ts +4 -0
  55. package/api/resources/models/client/Client.js +3 -1
  56. package/api/resources/projects/client/Client.d.ts +4 -0
  57. package/api/resources/projects/client/Client.js +3 -1
  58. package/api/resources/providers/client/Client.d.ts +4 -0
  59. package/api/resources/providers/client/Client.js +15 -5
  60. package/api/resources/runs/client/Client.d.ts +4 -0
  61. package/api/resources/runs/client/Client.js +12 -4
  62. package/api/resources/runs/resources/messages/client/Client.d.ts +4 -0
  63. package/api/resources/runs/resources/messages/client/Client.js +3 -1
  64. package/api/resources/runs/resources/steps/client/Client.d.ts +4 -0
  65. package/api/resources/runs/resources/steps/client/Client.js +3 -1
  66. package/api/resources/runs/resources/usage/client/Client.d.ts +4 -0
  67. package/api/resources/runs/resources/usage/client/Client.js +3 -1
  68. package/api/resources/sources/client/Client.d.ts +4 -0
  69. package/api/resources/sources/client/Client.js +24 -8
  70. package/api/resources/sources/resources/files/client/Client.d.ts +4 -0
  71. package/api/resources/sources/resources/files/client/Client.js +9 -3
  72. package/api/resources/sources/resources/passages/client/Client.d.ts +4 -0
  73. package/api/resources/sources/resources/passages/client/Client.js +3 -1
  74. package/api/resources/steps/client/Client.d.ts +4 -13
  75. package/api/resources/steps/client/Client.js +6 -74
  76. package/api/resources/steps/client/requests/index.d.ts +0 -1
  77. package/api/resources/steps/resources/feedback/client/Client.d.ts +12 -2
  78. package/api/resources/steps/resources/feedback/client/Client.js +43 -11
  79. package/api/resources/steps/resources/feedback/client/index.d.ts +1 -1
  80. package/api/resources/steps/resources/feedback/client/index.js +15 -0
  81. package/api/resources/steps/{client/requests/AddFeedbackRequest.d.ts → resources/feedback/client/requests/FeedbackCreateRequest.d.ts} +2 -2
  82. package/api/resources/steps/resources/feedback/client/requests/index.d.ts +1 -0
  83. package/api/resources/steps/resources/feedback/client/requests/index.js +2 -0
  84. package/api/resources/steps/resources/index.d.ts +1 -0
  85. package/api/resources/steps/resources/index.js +4 -0
  86. package/api/resources/tags/client/Client.d.ts +4 -0
  87. package/api/resources/tags/client/Client.js +3 -1
  88. package/api/resources/telemetry/client/Client.d.ts +4 -0
  89. package/api/resources/telemetry/client/Client.js +3 -1
  90. package/api/resources/templates/client/Client.d.ts +4 -0
  91. package/api/resources/templates/client/Client.js +3 -1
  92. package/api/resources/templates/resources/agents/client/Client.d.ts +4 -0
  93. package/api/resources/templates/resources/agents/client/Client.js +3 -1
  94. package/api/resources/tools/client/Client.d.ts +4 -0
  95. package/api/resources/tools/client/Client.js +57 -19
  96. package/api/resources/voice/client/Client.d.ts +4 -0
  97. package/api/resources/voice/client/Client.js +3 -1
  98. package/dist/Client.d.ts +4 -0
  99. package/dist/api/resources/agents/client/Client.d.ts +4 -0
  100. package/dist/api/resources/agents/client/Client.js +31 -23
  101. package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -2
  102. package/dist/api/resources/agents/resources/blocks/client/Client.d.ts +4 -0
  103. package/dist/api/resources/agents/resources/blocks/client/Client.js +15 -5
  104. package/dist/api/resources/agents/resources/context/client/Client.d.ts +4 -0
  105. package/dist/api/resources/agents/resources/context/client/Client.js +3 -1
  106. package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +4 -0
  107. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +3 -1
  108. package/dist/api/resources/agents/resources/groups/client/Client.d.ts +4 -0
  109. package/dist/api/resources/agents/resources/groups/client/Client.js +3 -1
  110. package/dist/api/resources/agents/resources/memoryVariables/client/Client.d.ts +4 -0
  111. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +3 -1
  112. package/dist/api/resources/agents/resources/messages/client/Client.d.ts +4 -0
  113. package/dist/api/resources/agents/resources/messages/client/Client.js +18 -6
  114. package/dist/api/resources/agents/resources/passages/client/Client.d.ts +4 -0
  115. package/dist/api/resources/agents/resources/passages/client/Client.js +12 -4
  116. package/dist/api/resources/agents/resources/sources/client/Client.d.ts +4 -0
  117. package/dist/api/resources/agents/resources/sources/client/Client.js +9 -3
  118. package/dist/api/resources/agents/resources/templates/client/Client.d.ts +4 -0
  119. package/dist/api/resources/agents/resources/templates/client/Client.js +9 -3
  120. package/dist/api/resources/agents/resources/tools/client/Client.d.ts +4 -0
  121. package/dist/api/resources/agents/resources/tools/client/Client.js +9 -3
  122. package/dist/api/resources/batches/client/Client.d.ts +4 -0
  123. package/dist/api/resources/batches/client/Client.js +12 -4
  124. package/dist/api/resources/blocks/client/Client.d.ts +4 -0
  125. package/dist/api/resources/blocks/client/Client.js +18 -6
  126. package/dist/api/resources/blocks/resources/agents/client/Client.d.ts +4 -0
  127. package/dist/api/resources/blocks/resources/agents/client/Client.js +3 -1
  128. package/dist/api/resources/clientSideAccessTokens/client/Client.d.ts +4 -0
  129. package/dist/api/resources/clientSideAccessTokens/client/Client.js +6 -2
  130. package/dist/api/resources/embeddingModels/client/Client.d.ts +4 -0
  131. package/dist/api/resources/embeddingModels/client/Client.js +3 -1
  132. package/dist/api/resources/groups/client/Client.d.ts +4 -0
  133. package/dist/api/resources/groups/client/Client.js +20 -21
  134. package/dist/api/resources/groups/client/requests/GroupCreate.d.ts +0 -1
  135. package/dist/api/resources/groups/client/requests/GroupUpdate.d.ts +0 -1
  136. package/dist/api/resources/groups/resources/messages/client/Client.d.ts +4 -0
  137. package/dist/api/resources/groups/resources/messages/client/Client.js +15 -5
  138. package/dist/api/resources/health/client/Client.d.ts +4 -0
  139. package/dist/api/resources/health/client/Client.js +3 -1
  140. package/dist/api/resources/identities/client/Client.d.ts +4 -0
  141. package/dist/api/resources/identities/client/Client.js +23 -22
  142. package/dist/api/resources/identities/client/requests/IdentityCreate.d.ts +0 -1
  143. package/dist/api/resources/identities/client/requests/IdentityUpsert.d.ts +0 -1
  144. package/dist/api/resources/identities/resources/properties/client/Client.d.ts +4 -0
  145. package/dist/api/resources/identities/resources/properties/client/Client.js +3 -1
  146. package/dist/api/resources/jobs/client/Client.d.ts +4 -0
  147. package/dist/api/resources/jobs/client/Client.js +12 -4
  148. package/dist/api/resources/messages/client/Client.d.ts +4 -0
  149. package/dist/api/resources/messages/client/Client.js +3 -1
  150. package/dist/api/resources/models/client/Client.d.ts +4 -0
  151. package/dist/api/resources/models/client/Client.js +3 -1
  152. package/dist/api/resources/projects/client/Client.d.ts +4 -0
  153. package/dist/api/resources/projects/client/Client.js +3 -1
  154. package/dist/api/resources/providers/client/Client.d.ts +4 -0
  155. package/dist/api/resources/providers/client/Client.js +15 -5
  156. package/dist/api/resources/runs/client/Client.d.ts +4 -0
  157. package/dist/api/resources/runs/client/Client.js +12 -4
  158. package/dist/api/resources/runs/resources/messages/client/Client.d.ts +4 -0
  159. package/dist/api/resources/runs/resources/messages/client/Client.js +3 -1
  160. package/dist/api/resources/runs/resources/steps/client/Client.d.ts +4 -0
  161. package/dist/api/resources/runs/resources/steps/client/Client.js +3 -1
  162. package/dist/api/resources/runs/resources/usage/client/Client.d.ts +4 -0
  163. package/dist/api/resources/runs/resources/usage/client/Client.js +3 -1
  164. package/dist/api/resources/sources/client/Client.d.ts +4 -0
  165. package/dist/api/resources/sources/client/Client.js +24 -8
  166. package/dist/api/resources/sources/resources/files/client/Client.d.ts +4 -0
  167. package/dist/api/resources/sources/resources/files/client/Client.js +9 -3
  168. package/dist/api/resources/sources/resources/passages/client/Client.d.ts +4 -0
  169. package/dist/api/resources/sources/resources/passages/client/Client.js +3 -1
  170. package/dist/api/resources/steps/client/Client.d.ts +4 -13
  171. package/dist/api/resources/steps/client/Client.js +6 -74
  172. package/dist/api/resources/steps/client/requests/index.d.ts +0 -1
  173. package/dist/api/resources/steps/resources/feedback/client/Client.d.ts +12 -2
  174. package/dist/api/resources/steps/resources/feedback/client/Client.js +43 -11
  175. package/dist/api/resources/steps/resources/feedback/client/index.d.ts +1 -1
  176. package/dist/api/resources/steps/resources/feedback/client/index.js +15 -0
  177. package/dist/api/resources/steps/{client/requests/AddFeedbackRequest.d.ts → resources/feedback/client/requests/FeedbackCreateRequest.d.ts} +2 -2
  178. package/dist/api/resources/steps/resources/feedback/client/requests/index.d.ts +1 -0
  179. package/dist/api/resources/steps/resources/feedback/client/requests/index.js +2 -0
  180. package/dist/api/resources/steps/resources/index.d.ts +1 -0
  181. package/dist/api/resources/steps/resources/index.js +4 -0
  182. package/dist/api/resources/tags/client/Client.d.ts +4 -0
  183. package/dist/api/resources/tags/client/Client.js +3 -1
  184. package/dist/api/resources/telemetry/client/Client.d.ts +4 -0
  185. package/dist/api/resources/telemetry/client/Client.js +3 -1
  186. package/dist/api/resources/templates/client/Client.d.ts +4 -0
  187. package/dist/api/resources/templates/client/Client.js +3 -1
  188. package/dist/api/resources/templates/resources/agents/client/Client.d.ts +4 -0
  189. package/dist/api/resources/templates/resources/agents/client/Client.js +3 -1
  190. package/dist/api/resources/tools/client/Client.d.ts +4 -0
  191. package/dist/api/resources/tools/client/Client.js +57 -19
  192. package/dist/api/resources/voice/client/Client.d.ts +4 -0
  193. package/dist/api/resources/voice/client/Client.js +3 -1
  194. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
  195. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -1
  196. package/dist/serialization/resources/groups/client/requests/GroupCreate.d.ts +1 -1
  197. package/dist/serialization/resources/groups/client/requests/GroupUpdate.d.ts +1 -1
  198. package/dist/serialization/resources/identities/client/requests/IdentityCreate.d.ts +1 -1
  199. package/dist/serialization/resources/identities/client/requests/IdentityUpsert.d.ts +1 -1
  200. package/dist/version.d.ts +1 -1
  201. package/dist/version.js +1 -1
  202. package/package.json +1 -1
  203. package/reference.md +25 -73
  204. package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
  205. package/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -1
  206. package/serialization/resources/groups/client/requests/GroupCreate.d.ts +1 -1
  207. package/serialization/resources/groups/client/requests/GroupUpdate.d.ts +1 -1
  208. package/serialization/resources/identities/client/requests/IdentityCreate.d.ts +1 -1
  209. package/serialization/resources/identities/client/requests/IdentityUpsert.d.ts +1 -1
  210. package/version.d.ts +1 -1
  211. package/version.js +1 -1
  212. /package/api/resources/steps/{client/requests/AddFeedbackRequest.js → resources/feedback/client/requests/FeedbackCreateRequest.js} +0 -0
  213. /package/dist/api/resources/steps/{client/requests/AddFeedbackRequest.js → resources/feedback/client/requests/FeedbackCreateRequest.js} +0 -0
@@ -76,7 +76,9 @@ class Tools {
76
76
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
77
77
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/tools/${encodeURIComponent(toolId)}`),
78
78
  method: "GET",
79
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
79
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
80
82
  contentType: "application/json",
81
83
  requestType: "json",
82
84
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -141,7 +143,9 @@ class Tools {
141
143
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
142
144
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/tools/${encodeURIComponent(toolId)}`),
143
145
  method: "DELETE",
144
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
146
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
145
149
  contentType: "application/json",
146
150
  requestType: "json",
147
151
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -201,7 +205,9 @@ class Tools {
201
205
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
202
206
  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/${encodeURIComponent(toolId)}`),
203
207
  method: "PATCH",
204
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
208
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
205
211
  contentType: "application/json",
206
212
  requestType: "json",
207
213
  body: serializers.ToolUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -272,7 +278,9 @@ class Tools {
272
278
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
273
279
  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/count"),
274
280
  method: "GET",
275
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
281
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
276
284
  contentType: "application/json",
277
285
  queryParameters: _queryParams,
278
286
  requestType: "json",
@@ -349,7 +357,9 @@ class Tools {
349
357
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
350
358
  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/"),
351
359
  method: "GET",
352
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
360
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
353
363
  contentType: "application/json",
354
364
  queryParameters: _queryParams,
355
365
  requestType: "json",
@@ -417,7 +427,9 @@ class Tools {
417
427
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
418
428
  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/"),
419
429
  method: "POST",
420
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
430
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
421
433
  contentType: "application/json",
422
434
  requestType: "json",
423
435
  body: serializers.ToolCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -485,7 +497,9 @@ class Tools {
485
497
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
486
498
  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/"),
487
499
  method: "PUT",
488
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
500
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
489
503
  contentType: "application/json",
490
504
  requestType: "json",
491
505
  body: serializers.ToolCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -550,7 +564,9 @@ class Tools {
550
564
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
551
565
  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/add-base-tools"),
552
566
  method: "POST",
553
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
567
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
554
570
  contentType: "application/json",
555
571
  requestType: "json",
556
572
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -620,7 +636,9 @@ class Tools {
620
636
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
621
637
  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/run"),
622
638
  method: "POST",
623
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
639
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
624
642
  contentType: "application/json",
625
643
  requestType: "json",
626
644
  body: serializers.ToolRunFromSource.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -687,7 +705,9 @@ class Tools {
687
705
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
688
706
  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/composio/apps"),
689
707
  method: "GET",
690
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
708
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
691
711
  contentType: "application/json",
692
712
  requestType: "json",
693
713
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -752,7 +772,9 @@ class Tools {
752
772
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
753
773
  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/composio/apps/${encodeURIComponent(composioAppName)}/actions`),
754
774
  method: "GET",
755
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
775
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
756
778
  contentType: "application/json",
757
779
  requestType: "json",
758
780
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -817,7 +839,9 @@ class Tools {
817
839
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
818
840
  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/composio/${encodeURIComponent(composioActionName)}`),
819
841
  method: "POST",
820
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
842
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
821
845
  contentType: "application/json",
822
846
  requestType: "json",
823
847
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -883,7 +907,9 @@ class Tools {
883
907
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
884
908
  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"),
885
909
  method: "GET",
886
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
910
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
887
913
  contentType: "application/json",
888
914
  requestType: "json",
889
915
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -952,7 +978,9 @@ class Tools {
952
978
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
953
979
  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"),
954
980
  method: "PUT",
955
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
981
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
956
984
  contentType: "application/json",
957
985
  requestType: "json",
958
986
  body: serializers.AddMcpServerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1018,7 +1046,9 @@ class Tools {
1018
1046
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1019
1047
  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/${encodeURIComponent(mcpServerName)}/tools`),
1020
1048
  method: "GET",
1021
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
1049
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
1022
1052
  contentType: "application/json",
1023
1053
  requestType: "json",
1024
1054
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1084,7 +1114,9 @@ class Tools {
1084
1114
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1085
1115
  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/${encodeURIComponent(mcpServerName)}/${encodeURIComponent(mcpToolName)}`),
1086
1116
  method: "POST",
1087
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
1117
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
1088
1120
  contentType: "application/json",
1089
1121
  requestType: "json",
1090
1122
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1149,7 +1181,9 @@ class Tools {
1149
1181
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1150
1182
  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/${encodeURIComponent(mcpServerName)}`),
1151
1183
  method: "DELETE",
1152
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
1184
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
1153
1187
  contentType: "application/json",
1154
1188
  requestType: "json",
1155
1189
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1215,7 +1249,9 @@ class Tools {
1215
1249
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1216
1250
  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/${encodeURIComponent(mcpServerName)}`),
1217
1251
  method: "PATCH",
1218
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
1252
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
1219
1255
  contentType: "application/json",
1220
1256
  requestType: "json",
1221
1257
  body: serializers.UpdateMcpServerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1286,7 +1322,9 @@ class Tools {
1286
1322
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1287
1323
  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/test"),
1288
1324
  method: "POST",
1289
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
1325
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
1290
1328
  contentType: "application/json",
1291
1329
  requestType: "json",
1292
1330
  body: serializers.TestMcpServerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -10,6 +10,8 @@ export declare namespace Voice {
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
12
  token?: core.Supplier<string | undefined>;
13
+ /** Override the X-Project header */
14
+ project?: core.Supplier<string | undefined>;
13
15
  fetcher?: core.FetchFunction;
14
16
  }
15
17
  interface RequestOptions {
@@ -19,6 +21,8 @@ export declare namespace Voice {
19
21
  maxRetries?: number;
20
22
  /** A hook to abort the request. */
21
23
  abortSignal?: AbortSignal;
24
+ /** Override the X-Project header */
25
+ project?: string | undefined;
22
26
  /** Additional headers to include in the request. */
23
27
  headers?: Record<string, string>;
24
28
  }
@@ -80,7 +80,9 @@ class Voice {
80
80
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
81
81
  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/voice-beta/${encodeURIComponent(agentId)}/chat/completions`),
82
82
  method: "POST",
83
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
83
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
84
86
  contentType: "application/json",
85
87
  requestType: "json",
86
88
  body: serializers.voice.createVoiceChatCompletions.Request.jsonOrThrow(_body, {
package/dist/Client.d.ts CHANGED
@@ -30,6 +30,8 @@ export declare namespace LettaClient {
30
30
  /** Specify a custom URL to connect the client to. */
31
31
  baseUrl?: core.Supplier<string>;
32
32
  token?: core.Supplier<string | undefined>;
33
+ /** Override the X-Project header */
34
+ project?: core.Supplier<string | undefined>;
33
35
  fetcher?: core.FetchFunction;
34
36
  }
35
37
  interface RequestOptions {
@@ -39,6 +41,8 @@ export declare namespace LettaClient {
39
41
  maxRetries?: number;
40
42
  /** A hook to abort the request. */
41
43
  abortSignal?: AbortSignal;
44
+ /** Override the X-Project header */
45
+ project?: string | undefined;
42
46
  /** Additional headers to include in the request. */
43
47
  headers?: Record<string, string>;
44
48
  }
@@ -22,6 +22,8 @@ export declare namespace Agents {
22
22
  /** Specify a custom URL to connect the client to. */
23
23
  baseUrl?: core.Supplier<string>;
24
24
  token?: core.Supplier<string | undefined>;
25
+ /** Override the X-Project header */
26
+ project?: core.Supplier<string | undefined>;
25
27
  fetcher?: core.FetchFunction;
26
28
  }
27
29
  interface RequestOptions {
@@ -31,6 +33,8 @@ export declare namespace Agents {
31
33
  maxRetries?: number;
32
34
  /** A hook to abort the request. */
33
35
  abortSignal?: AbortSignal;
36
+ /** Override the X-Project header */
37
+ project?: string | undefined;
34
38
  /** Additional headers to include in the request. */
35
39
  headers?: Record<string, string>;
36
40
  }
@@ -44,17 +44,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
44
44
  step((generator = generator.apply(thisArg, _arguments || [])).next());
45
45
  });
46
46
  };
47
- var __rest = (this && this.__rest) || function (s, e) {
48
- var t = {};
49
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
50
- t[p] = s[p];
51
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
52
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
53
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
54
- t[p[i]] = s[p[i]];
55
- }
56
- return t;
57
- };
58
47
  var __importDefault = (this && this.__importDefault) || function (mod) {
59
48
  return (mod && mod.__esModule) ? mod : { "default": mod };
60
49
  };
@@ -202,7 +191,9 @@ class Agents {
202
191
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
203
192
  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/"),
204
193
  method: "GET",
205
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
194
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
206
197
  contentType: "application/json",
207
198
  queryParameters: _queryParams,
208
199
  requestType: "json",
@@ -265,14 +256,15 @@ class Agents {
265
256
  create() {
266
257
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
267
258
  var _a, _b, _c;
268
- const { project } = request, _body = __rest(request, ["project"]);
269
259
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
270
260
  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/"),
271
261
  method: "POST",
272
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "X-Project": project != null ? project : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
262
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
273
265
  contentType: "application/json",
274
266
  requestType: "json",
275
- body: serializers.CreateAgentRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
267
+ body: serializers.CreateAgentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
276
268
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
277
269
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
278
270
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -334,7 +326,9 @@ class Agents {
334
326
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
335
327
  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/count"),
336
328
  method: "GET",
337
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
329
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
338
332
  contentType: "application/json",
339
333
  requestType: "json",
340
334
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -399,7 +393,9 @@ class Agents {
399
393
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
400
394
  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)}/export`),
401
395
  method: "GET",
402
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
396
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
403
399
  contentType: "application/json",
404
400
  requestType: "json",
405
401
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -481,7 +477,9 @@ class Agents {
481
477
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
482
478
  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/import"),
483
479
  method: "POST",
484
- headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
480
+ headers: Object.assign(Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
485
483
  queryParameters: _queryParams,
486
484
  requestType: "file",
487
485
  duplex: _maybeEncodedRequest.duplex,
@@ -559,7 +557,9 @@ class Agents {
559
557
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
560
558
  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)}`),
561
559
  method: "GET",
562
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
560
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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",
@@ -625,7 +625,9 @@ class Agents {
625
625
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
626
626
  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)}`),
627
627
  method: "DELETE",
628
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
628
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
629
631
  contentType: "application/json",
630
632
  requestType: "json",
631
633
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -685,7 +687,9 @@ class Agents {
685
687
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
686
688
  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)}`),
687
689
  method: "PATCH",
688
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
690
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
689
693
  contentType: "application/json",
690
694
  requestType: "json",
691
695
  body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -760,7 +764,9 @@ class Agents {
760
764
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
761
765
  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)}/summarize`),
762
766
  method: "POST",
763
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
767
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
768
+ ? yield core.Supplier.get(this._options.project)
769
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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
770
  contentType: "application/json",
765
771
  queryParameters: _queryParams,
766
772
  requestType: "json",
@@ -826,7 +832,9 @@ class Agents {
826
832
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
827
833
  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/search"),
828
834
  method: "POST",
829
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
835
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
836
+ ? yield core.Supplier.get(this._options.project)
837
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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),
830
838
  contentType: "application/json",
831
839
  requestType: "json",
832
840
  body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -7,7 +7,6 @@ import * as Letta from "../../../../index";
7
7
  * {}
8
8
  */
9
9
  export interface CreateAgentRequest {
10
- project?: string;
11
10
  /** The name of the agent. */
12
11
  name?: string;
13
12
  /** The blocks to create in the agent's in-context memory. */
@@ -65,7 +64,7 @@ export interface CreateAgentRequest {
65
64
  /** Whether the agent is a template */
66
65
  template?: boolean;
67
66
  /** Deprecated: Project should now be passed via the X-Project header instead of in the request body. If using the sdk, this can be done via the new x_project field below. */
68
- createAgentRequestProject?: string;
67
+ project?: string;
69
68
  /** The environment variables for tool execution specific to this agent. */
70
69
  toolExecEnvironmentVariables?: Record<string, string | undefined>;
71
70
  /** The variables that should be set for the agent. */
@@ -10,6 +10,8 @@ export declare namespace Blocks {
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
12
  token?: core.Supplier<string | undefined>;
13
+ /** Override the X-Project header */
14
+ project?: core.Supplier<string | undefined>;
13
15
  fetcher?: core.FetchFunction;
14
16
  }
15
17
  interface RequestOptions {
@@ -19,6 +21,8 @@ export declare namespace Blocks {
19
21
  maxRetries?: number;
20
22
  /** A hook to abort the request. */
21
23
  abortSignal?: AbortSignal;
24
+ /** Override the X-Project header */
25
+ project?: string | undefined;
22
26
  /** Additional headers to include in the request. */
23
27
  headers?: Record<string, string>;
24
28
  }
@@ -77,7 +77,9 @@ class Blocks {
77
77
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
78
78
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks/${encodeURIComponent(blockLabel)}`),
79
79
  method: "GET",
80
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
80
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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
83
  contentType: "application/json",
82
84
  requestType: "json",
83
85
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -144,7 +146,9 @@ class Blocks {
144
146
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
145
147
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks/${encodeURIComponent(blockLabel)}`),
146
148
  method: "PATCH",
147
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
149
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "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
152
  contentType: "application/json",
149
153
  requestType: "json",
150
154
  body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -210,7 +214,9 @@ class Blocks {
210
214
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
211
215
  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)}/core-memory/blocks`),
212
216
  method: "GET",
213
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
214
220
  contentType: "application/json",
215
221
  requestType: "json",
216
222
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -276,7 +282,9 @@ class Blocks {
276
282
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
277
283
  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)}/core-memory/blocks/attach/${encodeURIComponent(blockId)}`),
278
284
  method: "PATCH",
279
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
285
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
280
288
  contentType: "application/json",
281
289
  requestType: "json",
282
290
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -342,7 +350,9 @@ class Blocks {
342
350
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
343
351
  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)}/core-memory/blocks/detach/${encodeURIComponent(blockId)}`),
344
352
  method: "PATCH",
345
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.143", "User-Agent": "@letta-ai/letta-client/0.1.143", "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),
353
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
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.145", "User-Agent": "@letta-ai/letta-client/0.1.145", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
346
356
  contentType: "application/json",
347
357
  requestType: "json",
348
358
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -10,6 +10,8 @@ export declare namespace Context {
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
12
  token?: core.Supplier<string | undefined>;
13
+ /** Override the X-Project header */
14
+ project?: core.Supplier<string | undefined>;
13
15
  fetcher?: core.FetchFunction;
14
16
  }
15
17
  interface RequestOptions {
@@ -19,6 +21,8 @@ export declare namespace Context {
19
21
  maxRetries?: number;
20
22
  /** A hook to abort the request. */
21
23
  abortSignal?: AbortSignal;
24
+ /** Override the X-Project header */
25
+ project?: string | undefined;
22
26
  /** Additional headers to include in the request. */
23
27
  headers?: Record<string, string>;
24
28
  }