@letta-ai/letta-client 0.1.51 → 0.1.52

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 (193) hide show
  1. package/api/resources/agents/client/Client.js +10 -10
  2. package/api/resources/agents/resources/blocks/client/Client.js +5 -5
  3. package/api/resources/agents/resources/context/client/Client.js +1 -1
  4. package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  5. package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  6. package/api/resources/agents/resources/messages/client/Client.d.ts +6 -3
  7. package/api/resources/agents/resources/messages/client/Client.js +14 -11
  8. package/api/resources/agents/resources/messages/client/requests/index.d.ts +0 -1
  9. package/api/resources/agents/resources/messages/types/MessagesModifyRequest.d.ts +5 -0
  10. package/api/resources/agents/resources/messages/types/MessagesModifyResponse.d.ts +5 -0
  11. package/api/resources/agents/resources/messages/types/index.d.ts +2 -1
  12. package/api/resources/agents/resources/messages/types/index.js +2 -1
  13. package/api/resources/agents/resources/passages/client/Client.js +3 -3
  14. package/api/resources/agents/resources/sources/client/Client.js +3 -3
  15. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  16. package/api/resources/agents/resources/tools/client/Client.js +3 -3
  17. package/api/resources/blocks/client/Client.js +6 -6
  18. package/api/resources/health/client/Client.js +1 -1
  19. package/api/resources/identities/client/Client.js +6 -6
  20. package/api/resources/jobs/client/Client.js +4 -4
  21. package/api/resources/models/client/Client.js +2 -2
  22. package/api/resources/providers/client/Client.js +4 -4
  23. package/api/resources/runs/client/Client.js +7 -7
  24. package/api/resources/sources/client/Client.js +6 -6
  25. package/api/resources/sources/resources/files/client/Client.js +3 -3
  26. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  27. package/api/resources/steps/client/Client.js +2 -2
  28. package/api/resources/tag/client/Client.js +1 -1
  29. package/api/resources/templates/client/Client.js +1 -1
  30. package/api/resources/tools/client/Client.js +11 -11
  31. package/api/resources/voice/client/Client.js +1 -1
  32. package/{dist/api/types/ChatCompletionMessageToolCallOutput.d.ts → api/types/ChatCompletionMessageToolCall.d.ts} +1 -1
  33. package/api/types/Message.d.ts +1 -1
  34. package/api/types/UpdateAssistantMessage.d.ts +8 -0
  35. package/api/types/UpdateAssistantMessageContent.d.ts +5 -0
  36. package/api/types/UpdateReasoningMessage.d.ts +8 -0
  37. package/api/types/UpdateReasoningMessageReasoning.d.ts +5 -0
  38. package/api/types/UpdateSystemMessage.d.ts +8 -0
  39. package/api/types/UpdateSystemMessageContent.d.ts +5 -0
  40. package/api/types/UpdateUserMessage.d.ts +8 -0
  41. package/api/types/UpdateUserMessageContent.d.ts +5 -0
  42. package/api/types/UpdateUserMessageContent.js +5 -0
  43. package/api/types/index.d.ts +9 -3
  44. package/api/types/index.js +9 -3
  45. package/dist/api/resources/agents/client/Client.js +10 -10
  46. package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
  47. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  48. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  49. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  50. package/dist/api/resources/agents/resources/messages/client/Client.d.ts +6 -3
  51. package/dist/api/resources/agents/resources/messages/client/Client.js +14 -11
  52. package/dist/api/resources/agents/resources/messages/client/requests/index.d.ts +0 -1
  53. package/dist/api/resources/agents/resources/messages/types/MessagesModifyRequest.d.ts +5 -0
  54. package/dist/api/resources/agents/resources/messages/types/MessagesModifyRequest.js +5 -0
  55. package/dist/api/resources/agents/resources/messages/types/MessagesModifyResponse.d.ts +5 -0
  56. package/dist/api/resources/agents/resources/messages/types/MessagesModifyResponse.js +5 -0
  57. package/dist/api/resources/agents/resources/messages/types/index.d.ts +2 -1
  58. package/dist/api/resources/agents/resources/messages/types/index.js +2 -1
  59. package/dist/api/resources/agents/resources/passages/client/Client.js +3 -3
  60. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  61. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  62. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  63. package/dist/api/resources/blocks/client/Client.js +6 -6
  64. package/dist/api/resources/health/client/Client.js +1 -1
  65. package/dist/api/resources/identities/client/Client.js +6 -6
  66. package/dist/api/resources/jobs/client/Client.js +4 -4
  67. package/dist/api/resources/models/client/Client.js +2 -2
  68. package/dist/api/resources/providers/client/Client.js +4 -4
  69. package/dist/api/resources/runs/client/Client.js +7 -7
  70. package/dist/api/resources/sources/client/Client.js +6 -6
  71. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  72. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  73. package/dist/api/resources/steps/client/Client.js +2 -2
  74. package/dist/api/resources/tag/client/Client.js +1 -1
  75. package/dist/api/resources/templates/client/Client.js +1 -1
  76. package/dist/api/resources/tools/client/Client.js +11 -11
  77. package/dist/api/resources/voice/client/Client.js +1 -1
  78. package/{api/types/ChatCompletionMessageToolCallOutput.d.ts → dist/api/types/ChatCompletionMessageToolCall.d.ts} +1 -1
  79. package/dist/api/types/ChatCompletionMessageToolCall.js +5 -0
  80. package/dist/api/types/Message.d.ts +1 -1
  81. package/dist/api/types/UpdateAssistantMessage.d.ts +8 -0
  82. package/dist/api/types/UpdateAssistantMessage.js +5 -0
  83. package/dist/api/types/UpdateAssistantMessageContent.d.ts +5 -0
  84. package/dist/api/types/UpdateAssistantMessageContent.js +5 -0
  85. package/dist/api/types/UpdateReasoningMessage.d.ts +8 -0
  86. package/dist/api/types/UpdateReasoningMessage.js +5 -0
  87. package/dist/api/types/UpdateReasoningMessageReasoning.d.ts +5 -0
  88. package/dist/api/types/UpdateReasoningMessageReasoning.js +5 -0
  89. package/dist/api/types/UpdateSystemMessage.d.ts +8 -0
  90. package/dist/api/types/UpdateSystemMessage.js +5 -0
  91. package/dist/api/types/UpdateSystemMessageContent.d.ts +5 -0
  92. package/dist/api/types/UpdateSystemMessageContent.js +5 -0
  93. package/dist/api/types/UpdateUserMessage.d.ts +8 -0
  94. package/dist/api/types/UpdateUserMessage.js +5 -0
  95. package/dist/api/types/UpdateUserMessageContent.d.ts +5 -0
  96. package/dist/api/types/UpdateUserMessageContent.js +5 -0
  97. package/dist/api/types/index.d.ts +9 -3
  98. package/dist/api/types/index.js +9 -3
  99. package/dist/serialization/resources/agents/resources/messages/client/requests/index.d.ts +0 -1
  100. package/dist/serialization/resources/agents/resources/messages/client/requests/index.js +1 -3
  101. package/dist/serialization/resources/agents/resources/messages/types/MessagesModifyRequest.d.ts +14 -0
  102. package/dist/serialization/{types/ChatCompletionMessageToolCallInput.js → resources/agents/resources/messages/types/MessagesModifyRequest.js} +12 -10
  103. package/dist/serialization/resources/agents/resources/messages/types/MessagesModifyResponse.d.ts +14 -0
  104. package/dist/serialization/resources/agents/resources/messages/types/MessagesModifyResponse.js +50 -0
  105. package/dist/serialization/resources/agents/resources/messages/types/index.d.ts +2 -1
  106. package/dist/serialization/resources/agents/resources/messages/types/index.js +2 -1
  107. package/{serialization/types/ChatCompletionMessageToolCallOutput.d.ts → dist/serialization/types/ChatCompletionMessageToolCall.d.ts} +2 -2
  108. package/{serialization/types/ChatCompletionMessageToolCallOutput.js → dist/serialization/types/ChatCompletionMessageToolCall.js} +2 -2
  109. package/dist/serialization/types/Message.d.ts +2 -2
  110. package/dist/serialization/types/Message.js +2 -2
  111. package/dist/serialization/types/UpdateAssistantMessage.d.ts +14 -0
  112. package/dist/serialization/types/UpdateAssistantMessage.js +45 -0
  113. package/dist/serialization/types/UpdateAssistantMessageContent.d.ts +11 -0
  114. package/{serialization/types/OpenaiTypesChatChatCompletionMessageToolCallFunction.js → dist/serialization/types/UpdateAssistantMessageContent.js} +3 -7
  115. package/dist/serialization/types/UpdateReasoningMessage.d.ts +14 -0
  116. package/dist/serialization/types/UpdateReasoningMessage.js +45 -0
  117. package/dist/serialization/types/UpdateReasoningMessageReasoning.d.ts +11 -0
  118. package/dist/serialization/types/{OpenaiTypesChatChatCompletionMessageToolCallFunction.js → UpdateReasoningMessageReasoning.js} +3 -7
  119. package/dist/serialization/types/UpdateSystemMessage.d.ts +14 -0
  120. package/dist/serialization/types/UpdateSystemMessage.js +45 -0
  121. package/dist/serialization/types/UpdateSystemMessageContent.d.ts +11 -0
  122. package/dist/serialization/{resources/agents/resources/messages/types/MessageUpdateContent.js → types/UpdateSystemMessageContent.js} +4 -4
  123. package/dist/serialization/types/UpdateUserMessage.d.ts +14 -0
  124. package/dist/serialization/types/UpdateUserMessage.js +45 -0
  125. package/dist/serialization/types/UpdateUserMessageContent.d.ts +11 -0
  126. package/{serialization/resources/agents/resources/messages/types/MessageUpdateContent.js → dist/serialization/types/UpdateUserMessageContent.js} +4 -4
  127. package/dist/serialization/types/index.d.ts +9 -3
  128. package/dist/serialization/types/index.js +9 -3
  129. package/dist/version.d.ts +1 -1
  130. package/dist/version.js +1 -1
  131. package/package.json +1 -1
  132. package/reference.md +6 -3
  133. package/serialization/resources/agents/resources/messages/client/requests/index.d.ts +0 -1
  134. package/serialization/resources/agents/resources/messages/client/requests/index.js +1 -3
  135. package/serialization/resources/agents/resources/messages/types/MessagesModifyRequest.d.ts +14 -0
  136. package/serialization/resources/agents/resources/messages/types/MessagesModifyRequest.js +50 -0
  137. package/serialization/resources/agents/resources/messages/types/MessagesModifyResponse.d.ts +14 -0
  138. package/serialization/resources/agents/resources/messages/types/MessagesModifyResponse.js +50 -0
  139. package/serialization/resources/agents/resources/messages/types/index.d.ts +2 -1
  140. package/serialization/resources/agents/resources/messages/types/index.js +2 -1
  141. package/{dist/serialization/types/ChatCompletionMessageToolCallOutput.d.ts → serialization/types/ChatCompletionMessageToolCall.d.ts} +2 -2
  142. package/{dist/serialization/types/ChatCompletionMessageToolCallOutput.js → serialization/types/ChatCompletionMessageToolCall.js} +2 -2
  143. package/serialization/types/Message.d.ts +2 -2
  144. package/serialization/types/Message.js +2 -2
  145. package/serialization/types/UpdateAssistantMessage.d.ts +14 -0
  146. package/serialization/types/UpdateAssistantMessage.js +45 -0
  147. package/serialization/types/UpdateAssistantMessageContent.d.ts +11 -0
  148. package/serialization/types/UpdateAssistantMessageContent.js +42 -0
  149. package/serialization/types/UpdateReasoningMessage.d.ts +14 -0
  150. package/serialization/types/UpdateReasoningMessage.js +45 -0
  151. package/serialization/types/UpdateReasoningMessageReasoning.d.ts +11 -0
  152. package/serialization/types/UpdateReasoningMessageReasoning.js +42 -0
  153. package/serialization/types/UpdateSystemMessage.d.ts +14 -0
  154. package/serialization/types/UpdateSystemMessage.js +45 -0
  155. package/serialization/types/UpdateSystemMessageContent.d.ts +11 -0
  156. package/serialization/types/UpdateSystemMessageContent.js +42 -0
  157. package/serialization/types/UpdateUserMessage.d.ts +14 -0
  158. package/serialization/types/UpdateUserMessage.js +45 -0
  159. package/serialization/types/UpdateUserMessageContent.d.ts +11 -0
  160. package/serialization/types/UpdateUserMessageContent.js +42 -0
  161. package/serialization/types/index.d.ts +9 -3
  162. package/serialization/types/index.js +9 -3
  163. package/version.d.ts +1 -1
  164. package/version.js +1 -1
  165. package/api/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +0 -20
  166. package/api/resources/agents/resources/messages/types/MessageUpdateContent.d.ts +0 -8
  167. package/api/types/ChatCompletionMessageToolCallInput.d.ts +0 -11
  168. package/api/types/OpenaiTypesChatChatCompletionMessageToolCallFunction.d.ts +0 -9
  169. package/dist/api/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +0 -20
  170. package/dist/api/resources/agents/resources/messages/types/MessageUpdateContent.d.ts +0 -8
  171. package/dist/api/types/ChatCompletionMessageToolCallInput.d.ts +0 -11
  172. package/dist/api/types/OpenaiTypesChatChatCompletionMessageToolCallFunction.d.ts +0 -9
  173. package/dist/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +0 -19
  174. package/dist/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.js +0 -50
  175. package/dist/serialization/resources/agents/resources/messages/types/MessageUpdateContent.d.ts +0 -11
  176. package/dist/serialization/types/ChatCompletionMessageToolCallInput.d.ts +0 -16
  177. package/dist/serialization/types/OpenaiTypesChatChatCompletionMessageToolCallFunction.d.ts +0 -14
  178. package/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +0 -19
  179. package/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.js +0 -50
  180. package/serialization/resources/agents/resources/messages/types/MessageUpdateContent.d.ts +0 -11
  181. package/serialization/types/ChatCompletionMessageToolCallInput.d.ts +0 -16
  182. package/serialization/types/ChatCompletionMessageToolCallInput.js +0 -48
  183. package/serialization/types/OpenaiTypesChatChatCompletionMessageToolCallFunction.d.ts +0 -14
  184. /package/api/resources/agents/resources/messages/{client/requests/MessageUpdate.js → types/MessagesModifyRequest.js} +0 -0
  185. /package/api/resources/agents/resources/messages/types/{MessageUpdateContent.js → MessagesModifyResponse.js} +0 -0
  186. /package/api/types/{ChatCompletionMessageToolCallInput.js → ChatCompletionMessageToolCall.js} +0 -0
  187. /package/api/types/{ChatCompletionMessageToolCallOutput.js → UpdateAssistantMessage.js} +0 -0
  188. /package/api/types/{OpenaiTypesChatChatCompletionMessageToolCallFunction.js → UpdateAssistantMessageContent.js} +0 -0
  189. /package/{dist/api/resources/agents/resources/messages/client/requests/MessageUpdate.js → api/types/UpdateReasoningMessage.js} +0 -0
  190. /package/{dist/api/resources/agents/resources/messages/types/MessageUpdateContent.js → api/types/UpdateReasoningMessageReasoning.js} +0 -0
  191. /package/{dist/api/types/ChatCompletionMessageToolCallInput.js → api/types/UpdateSystemMessage.js} +0 -0
  192. /package/{dist/api/types/ChatCompletionMessageToolCallOutput.js → api/types/UpdateSystemMessageContent.js} +0 -0
  193. /package/{dist/api/types/OpenaiTypesChatChatCompletionMessageToolCallFunction.js → api/types/UpdateUserMessage.js} +0 -0
@@ -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 UpdateAssistantMessageContent = string | Letta.TextContent[];
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Letta from "../index";
5
+ export interface UpdateReasoningMessage {
6
+ reasoning: Letta.UpdateReasoningMessageReasoning;
7
+ messageType: "reasoning_message";
8
+ }
@@ -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 UpdateReasoningMessageReasoning = string | Letta.TextContent[];
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Letta from "../index";
5
+ export interface UpdateSystemMessage {
6
+ content: Letta.UpdateSystemMessageContent;
7
+ messageType: "system_message";
8
+ }
@@ -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 UpdateSystemMessageContent = string | Letta.TextContent[];
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Letta from "../index";
5
+ export interface UpdateUserMessage {
6
+ content: Letta.UpdateUserMessageContent;
7
+ messageType: "user_message";
8
+ }
@@ -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 UpdateUserMessageContent = string | Letta.TextContent[];
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -34,8 +34,7 @@ export * from "./ChatCompletionDeveloperMessageParamContent";
34
34
  export * from "./ChatCompletionDeveloperMessageParam";
35
35
  export * from "./ChatCompletionFunctionCallOptionParam";
36
36
  export * from "./ChatCompletionFunctionMessageParam";
37
- export * from "./ChatCompletionMessageToolCallInput";
38
- export * from "./ChatCompletionMessageToolCallOutput";
37
+ export * from "./ChatCompletionMessageToolCall";
39
38
  export * from "./ChatCompletionMessageToolCallParam";
40
39
  export * from "./ChatCompletionNamedToolChoiceParam";
41
40
  export * from "./ChatCompletionPredictionContentParamContent";
@@ -149,6 +148,14 @@ export * from "./ToolReturn";
149
148
  export * from "./ToolReturnMessageStatus";
150
149
  export * from "./ToolReturnMessage";
151
150
  export * from "./ToolType";
151
+ export * from "./UpdateAssistantMessageContent";
152
+ export * from "./UpdateAssistantMessage";
153
+ export * from "./UpdateReasoningMessageReasoning";
154
+ export * from "./UpdateReasoningMessage";
155
+ export * from "./UpdateSystemMessageContent";
156
+ export * from "./UpdateSystemMessage";
157
+ export * from "./UpdateUserMessageContent";
158
+ export * from "./UpdateUserMessage";
152
159
  export * from "./UsageStatistics";
153
160
  export * from "./User";
154
161
  export * from "./UserCreate";
@@ -157,7 +164,6 @@ export * from "./UserMessage";
157
164
  export * from "./UserUpdate";
158
165
  export * from "./ValidationErrorLocItem";
159
166
  export * from "./ValidationError";
160
- export * from "./OpenaiTypesChatChatCompletionMessageToolCallFunction";
161
167
  export * from "./OpenaiTypesChatChatCompletionMessageToolCallParamFunction";
162
168
  export * from "./OpenaiTypesChatChatCompletionNamedToolChoiceParamFunction";
163
169
  export * from "./OpenaiTypesChatCompletionCreateParamsFunction";
@@ -50,8 +50,7 @@ __exportStar(require("./ChatCompletionDeveloperMessageParamContent"), exports);
50
50
  __exportStar(require("./ChatCompletionDeveloperMessageParam"), exports);
51
51
  __exportStar(require("./ChatCompletionFunctionCallOptionParam"), exports);
52
52
  __exportStar(require("./ChatCompletionFunctionMessageParam"), exports);
53
- __exportStar(require("./ChatCompletionMessageToolCallInput"), exports);
54
- __exportStar(require("./ChatCompletionMessageToolCallOutput"), exports);
53
+ __exportStar(require("./ChatCompletionMessageToolCall"), exports);
55
54
  __exportStar(require("./ChatCompletionMessageToolCallParam"), exports);
56
55
  __exportStar(require("./ChatCompletionNamedToolChoiceParam"), exports);
57
56
  __exportStar(require("./ChatCompletionPredictionContentParamContent"), exports);
@@ -165,6 +164,14 @@ __exportStar(require("./ToolReturn"), exports);
165
164
  __exportStar(require("./ToolReturnMessageStatus"), exports);
166
165
  __exportStar(require("./ToolReturnMessage"), exports);
167
166
  __exportStar(require("./ToolType"), exports);
167
+ __exportStar(require("./UpdateAssistantMessageContent"), exports);
168
+ __exportStar(require("./UpdateAssistantMessage"), exports);
169
+ __exportStar(require("./UpdateReasoningMessageReasoning"), exports);
170
+ __exportStar(require("./UpdateReasoningMessage"), exports);
171
+ __exportStar(require("./UpdateSystemMessageContent"), exports);
172
+ __exportStar(require("./UpdateSystemMessage"), exports);
173
+ __exportStar(require("./UpdateUserMessageContent"), exports);
174
+ __exportStar(require("./UpdateUserMessage"), exports);
168
175
  __exportStar(require("./UsageStatistics"), exports);
169
176
  __exportStar(require("./User"), exports);
170
177
  __exportStar(require("./UserCreate"), exports);
@@ -173,7 +180,6 @@ __exportStar(require("./UserMessage"), exports);
173
180
  __exportStar(require("./UserUpdate"), exports);
174
181
  __exportStar(require("./ValidationErrorLocItem"), exports);
175
182
  __exportStar(require("./ValidationError"), exports);
176
- __exportStar(require("./OpenaiTypesChatChatCompletionMessageToolCallFunction"), exports);
177
183
  __exportStar(require("./OpenaiTypesChatChatCompletionMessageToolCallParamFunction"), exports);
178
184
  __exportStar(require("./OpenaiTypesChatChatCompletionNamedToolChoiceParamFunction"), exports);
179
185
  __exportStar(require("./OpenaiTypesChatCompletionCreateParamsFunction"), exports);
@@ -181,7 +181,7 @@ class Agents {
181
181
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
182
182
  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/"),
183
183
  method: "GET",
184
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
184
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "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),
185
185
  contentType: "application/json",
186
186
  queryParameters: _queryParams,
187
187
  requestType: "json",
@@ -248,7 +248,7 @@ class Agents {
248
248
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
249
249
  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/"),
250
250
  method: "POST",
251
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "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),
251
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "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),
252
252
  contentType: "application/json",
253
253
  requestType: "json",
254
254
  body: serializers.CreateAgentRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -314,7 +314,7 @@ class Agents {
314
314
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
315
315
  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)}/download`),
316
316
  method: "GET",
317
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
317
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
318
318
  contentType: "application/json",
319
319
  requestType: "json",
320
320
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -384,7 +384,7 @@ class Agents {
384
384
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
385
385
  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/upload"),
386
386
  method: "POST",
387
- 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.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "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),
387
+ 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.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "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),
388
388
  queryParameters: _queryParams,
389
389
  requestType: "file",
390
390
  duplex: _maybeEncodedRequest.duplex,
@@ -451,7 +451,7 @@ class Agents {
451
451
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
452
452
  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)}`),
453
453
  method: "GET",
454
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "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),
454
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "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),
455
455
  contentType: "application/json",
456
456
  requestType: "json",
457
457
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -516,7 +516,7 @@ class Agents {
516
516
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
517
517
  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)}`),
518
518
  method: "DELETE",
519
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "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),
519
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "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),
520
520
  contentType: "application/json",
521
521
  requestType: "json",
522
522
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -576,7 +576,7 @@ class Agents {
576
576
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
577
577
  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)}`),
578
578
  method: "PATCH",
579
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "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),
579
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "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),
580
580
  contentType: "application/json",
581
581
  requestType: "json",
582
582
  body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -646,7 +646,7 @@ class Agents {
646
646
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
647
647
  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)}/archival-memory/${encodeURIComponent(memoryId)}`),
648
648
  method: "PATCH",
649
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "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),
649
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "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),
650
650
  contentType: "application/json",
651
651
  requestType: "json",
652
652
  body: serializers.PassageUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -718,7 +718,7 @@ class Agents {
718
718
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
719
719
  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)}/reset-messages`),
720
720
  method: "PATCH",
721
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "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),
721
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "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),
722
722
  contentType: "application/json",
723
723
  queryParameters: _queryParams,
724
724
  requestType: "json",
@@ -784,7 +784,7 @@ class Agents {
784
784
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
785
785
  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"),
786
786
  method: "POST",
787
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "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),
787
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "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),
788
788
  contentType: "application/json",
789
789
  requestType: "json",
790
790
  body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -77,7 +77,7 @@ 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.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
80
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
81
81
  contentType: "application/json",
82
82
  requestType: "json",
83
83
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -144,7 +144,7 @@ class Blocks {
144
144
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
145
145
  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
146
  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.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
147
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "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
148
  contentType: "application/json",
149
149
  requestType: "json",
150
150
  body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -210,7 +210,7 @@ class Blocks {
210
210
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
211
211
  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
212
  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.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "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),
213
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "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
214
  contentType: "application/json",
215
215
  requestType: "json",
216
216
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -276,7 +276,7 @@ class Blocks {
276
276
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
277
277
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks/attach/${encodeURIComponent(blockId)}`),
278
278
  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.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
279
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
280
280
  contentType: "application/json",
281
281
  requestType: "json",
282
282
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -342,7 +342,7 @@ class Blocks {
342
342
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
343
343
  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
344
  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.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "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),
345
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "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
346
  contentType: "application/json",
347
347
  requestType: "json",
348
348
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -76,7 +76,7 @@ class Context {
76
76
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
77
77
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/context`),
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.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
79
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
80
80
  contentType: "application/json",
81
81
  requestType: "json",
82
82
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -77,7 +77,7 @@ class CoreMemory {
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`),
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.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
80
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
81
81
  contentType: "application/json",
82
82
  requestType: "json",
83
83
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -78,7 +78,7 @@ class MemoryVariables {
78
78
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
79
79
  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/variables`),
80
80
  method: "GET",
81
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "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,
@@ -63,15 +63,18 @@ export declare class Messages {
63
63
  *
64
64
  * @param {string} agentId
65
65
  * @param {string} messageId
66
- * @param {Letta.agents.MessageUpdate} request
66
+ * @param {Letta.agents.MessagesModifyRequest} request
67
67
  * @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
68
68
  *
69
69
  * @throws {@link Letta.UnprocessableEntityError}
70
70
  *
71
71
  * @example
72
- * await client.agents.messages.modify("agent_id", "message_id")
72
+ * await client.agents.messages.modify("agent_id", "message_id", {
73
+ * content: "content",
74
+ * messageType: "system_message"
75
+ * })
73
76
  */
74
- modify(agentId: string, messageId: string, request?: Letta.agents.MessageUpdate, requestOptions?: Messages.RequestOptions): Promise<Letta.Message>;
77
+ modify(agentId: string, messageId: string, request: Letta.agents.MessagesModifyRequest, requestOptions?: Messages.RequestOptions): Promise<Letta.agents.MessagesModifyResponse>;
75
78
  /**
76
79
  * Process a user message and return the agent's response.
77
80
  * This endpoint accepts a message from a user and processes it through the agent.
@@ -97,7 +97,7 @@ class Messages {
97
97
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
98
98
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages`),
99
99
  method: "GET",
100
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
100
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
101
101
  contentType: "application/json",
102
102
  queryParameters: _queryParams,
103
103
  requestType: "json",
@@ -170,7 +170,7 @@ class Messages {
170
170
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
171
171
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages`),
172
172
  method: "POST",
173
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "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),
173
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "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),
174
174
  contentType: "application/json",
175
175
  requestType: "json",
176
176
  body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -224,30 +224,33 @@ class Messages {
224
224
  *
225
225
  * @param {string} agentId
226
226
  * @param {string} messageId
227
- * @param {Letta.agents.MessageUpdate} request
227
+ * @param {Letta.agents.MessagesModifyRequest} request
228
228
  * @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
229
229
  *
230
230
  * @throws {@link Letta.UnprocessableEntityError}
231
231
  *
232
232
  * @example
233
- * await client.agents.messages.modify("agent_id", "message_id")
233
+ * await client.agents.messages.modify("agent_id", "message_id", {
234
+ * content: "content",
235
+ * messageType: "system_message"
236
+ * })
234
237
  */
235
- modify(agentId_1, messageId_1) {
236
- return __awaiter(this, arguments, void 0, function* (agentId, messageId, request = {}, requestOptions) {
238
+ modify(agentId, messageId, request, requestOptions) {
239
+ return __awaiter(this, void 0, void 0, function* () {
237
240
  var _a, _b, _c;
238
241
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
239
242
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/${encodeURIComponent(messageId)}`),
240
243
  method: "PATCH",
241
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "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),
244
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "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),
242
245
  contentType: "application/json",
243
246
  requestType: "json",
244
- body: serializers.agents.MessageUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
247
+ body: serializers.agents.MessagesModifyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
245
248
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
246
249
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
247
250
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
248
251
  });
249
252
  if (_response.ok) {
250
- return serializers.Message.parseOrThrow(_response.body, {
253
+ return serializers.agents.MessagesModifyResponse.parseOrThrow(_response.body, {
251
254
  unrecognizedObjectKeys: "passthrough",
252
255
  allowUnrecognizedUnionMembers: true,
253
256
  allowUnrecognizedEnumValues: true,
@@ -298,7 +301,7 @@ class Messages {
298
301
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
299
302
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/stream`),
300
303
  method: "POST",
301
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
304
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "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),
302
305
  contentType: "application/json",
303
306
  requestType: "json",
304
307
  body: serializers.agents.LettaStreamingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -382,7 +385,7 @@ class Messages {
382
385
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
383
386
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/async`),
384
387
  method: "POST",
385
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "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),
388
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "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),
386
389
  contentType: "application/json",
387
390
  requestType: "json",
388
391
  body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1,3 +1,2 @@
1
1
  export { type MessagesListRequest } from "./MessagesListRequest";
2
- export { type MessageUpdate } from "./MessageUpdate";
3
2
  export { type LettaStreamingRequest } from "./LettaStreamingRequest";
@@ -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 MessagesModifyRequest = Letta.UpdateSystemMessage | Letta.UpdateUserMessage | Letta.UpdateReasoningMessage | Letta.UpdateAssistantMessage;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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 MessagesModifyResponse = Letta.UpdateSystemMessage | Letta.UpdateUserMessage | Letta.UpdateReasoningMessage | Letta.UpdateAssistantMessage;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,3 @@
1
- export * from "./MessageUpdateContent";
1
+ export * from "./MessagesModifyRequest";
2
+ export * from "./MessagesModifyResponse";
2
3
  export * from "./LettaStreamingResponse";
@@ -14,5 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./MessageUpdateContent"), exports);
17
+ __exportStar(require("./MessagesModifyRequest"), exports);
18
+ __exportStar(require("./MessagesModifyResponse"), exports);
18
19
  __exportStar(require("./LettaStreamingResponse"), exports);
@@ -88,7 +88,7 @@ class Passages {
88
88
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
89
89
  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)}/archival-memory`),
90
90
  method: "GET",
91
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "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),
91
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "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),
92
92
  contentType: "application/json",
93
93
  queryParameters: _queryParams,
94
94
  requestType: "json",
@@ -157,7 +157,7 @@ class Passages {
157
157
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
158
158
  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)}/archival-memory`),
159
159
  method: "POST",
160
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "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),
160
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "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),
161
161
  contentType: "application/json",
162
162
  requestType: "json",
163
163
  body: serializers.agents.CreateArchivalMemory.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -224,7 +224,7 @@ class Passages {
224
224
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
225
225
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/archival-memory/${encodeURIComponent(memoryId)}`),
226
226
  method: "DELETE",
227
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
227
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
228
228
  contentType: "application/json",
229
229
  requestType: "json",
230
230
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -77,7 +77,7 @@ class Sources {
77
77
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
78
78
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/sources/attach/${encodeURIComponent(sourceId)}`),
79
79
  method: "PATCH",
80
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
80
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
81
81
  contentType: "application/json",
82
82
  requestType: "json",
83
83
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -143,7 +143,7 @@ class Sources {
143
143
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
144
144
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/sources/detach/${encodeURIComponent(sourceId)}`),
145
145
  method: "PATCH",
146
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
146
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
147
147
  contentType: "application/json",
148
148
  requestType: "json",
149
149
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -208,7 +208,7 @@ class Sources {
208
208
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
209
209
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/sources`),
210
210
  method: "GET",
211
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.51", "User-Agent": "@letta-ai/letta-client/0.1.51", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
211
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.52", "User-Agent": "@letta-ai/letta-client/0.1.52", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
212
212
  contentType: "application/json",
213
213
  requestType: "json",
214
214
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,