@letta-ai/letta-client 0.1.0 → 0.1.2

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 (156) hide show
  1. package/api/resources/agents/client/Client.d.ts +38 -2
  2. package/api/resources/agents/client/Client.js +184 -26
  3. package/api/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.d.ts +10 -0
  4. package/api/resources/agents/client/requests/AgentsCreateVersionRequest.d.ts +1 -1
  5. package/api/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.d.ts +15 -0
  6. package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +4 -0
  7. package/api/resources/agents/client/requests/index.d.ts +2 -0
  8. package/api/resources/agents/resources/archivalMemory/client/Client.js +8 -8
  9. package/api/resources/agents/resources/context/client/Client.js +2 -2
  10. package/api/resources/agents/resources/memory/client/Client.js +2 -2
  11. package/api/resources/agents/resources/memory/resources/messages/client/Client.js +2 -2
  12. package/api/resources/agents/resources/memoryBlocks/client/Client.js +4 -4
  13. package/api/resources/agents/resources/messages/client/Client.js +8 -8
  14. package/api/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +0 -3
  15. package/api/resources/agents/resources/recallMemory/client/Client.js +2 -2
  16. package/api/resources/agents/resources/sources/client/Client.js +2 -2
  17. package/api/resources/agents/resources/tools/client/Client.js +6 -6
  18. package/api/resources/agents/types/AgentsGetAgentVariablesResponse.d.ts +6 -0
  19. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.d.ts +8 -0
  20. package/api/{types/LettaResponseToolReturnMessageStatus.js → resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.js} +4 -4
  21. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.d.ts +5 -0
  22. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirection.d.ts +9 -0
  23. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirectionDirection.d.ts +8 -0
  24. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirectionDirection.js +10 -0
  25. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirectionValue.d.ts +8 -0
  26. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirectionValue.js +10 -0
  27. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOperator.d.ts +9 -0
  28. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOperatorOperator.d.ts +9 -0
  29. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOperatorOperator.js +11 -0
  30. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemZero.d.ts +7 -0
  31. package/api/resources/agents/types/index.d.ts +9 -1
  32. package/api/resources/agents/types/index.js +9 -1
  33. package/api/resources/blocks/client/Client.js +14 -14
  34. package/api/resources/health/client/Client.js +2 -2
  35. package/api/resources/jobs/client/Client.js +8 -8
  36. package/api/resources/models/client/Client.js +4 -4
  37. package/api/resources/sources/client/Client.js +16 -16
  38. package/api/resources/sources/resources/files/client/Client.js +6 -6
  39. package/api/resources/sources/resources/passages/client/Client.js +2 -2
  40. package/api/resources/tools/client/Client.js +24 -24
  41. package/api/types/InternalServerErrorBody.d.ts +1 -1
  42. package/api/types/LettaResponse.d.ts +12 -62
  43. package/api/types/LettaUsageStatistics.d.ts +1 -0
  44. package/api/types/NotFoundErrorBody.d.ts +1 -2
  45. package/api/types/index.d.ts +0 -13
  46. package/api/types/index.js +0 -13
  47. package/dist/api/resources/agents/client/Client.d.ts +38 -2
  48. package/dist/api/resources/agents/client/Client.js +184 -26
  49. package/dist/api/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.d.ts +10 -0
  50. package/dist/api/resources/agents/client/requests/AgentsCreateVersionRequest.d.ts +1 -1
  51. package/dist/api/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.d.ts +15 -0
  52. package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +4 -0
  53. package/dist/api/resources/agents/client/requests/index.d.ts +2 -0
  54. package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +8 -8
  55. package/dist/api/resources/agents/resources/context/client/Client.js +2 -2
  56. package/dist/api/resources/agents/resources/memory/client/Client.js +2 -2
  57. package/dist/api/resources/agents/resources/memory/resources/messages/client/Client.js +2 -2
  58. package/dist/api/resources/agents/resources/memoryBlocks/client/Client.js +4 -4
  59. package/dist/api/resources/agents/resources/messages/client/Client.js +8 -8
  60. package/dist/api/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +0 -3
  61. package/dist/api/resources/agents/resources/recallMemory/client/Client.js +2 -2
  62. package/dist/api/resources/agents/resources/sources/client/Client.js +2 -2
  63. package/dist/api/resources/agents/resources/tools/client/Client.js +6 -6
  64. package/dist/api/resources/agents/types/AgentsGetAgentVariablesResponse.d.ts +6 -0
  65. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.d.ts +8 -0
  66. package/dist/api/{types/LettaResponseToolReturnMessageStatus.js → resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.js} +4 -4
  67. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.d.ts +5 -0
  68. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirection.d.ts +9 -0
  69. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirectionDirection.d.ts +8 -0
  70. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirectionDirection.js +10 -0
  71. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirectionValue.d.ts +8 -0
  72. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirectionValue.js +10 -0
  73. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOperator.d.ts +9 -0
  74. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOperatorOperator.d.ts +9 -0
  75. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOperatorOperator.js +11 -0
  76. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemZero.d.ts +7 -0
  77. package/dist/api/resources/agents/types/index.d.ts +9 -1
  78. package/dist/api/resources/agents/types/index.js +9 -1
  79. package/dist/api/resources/blocks/client/Client.js +14 -14
  80. package/dist/api/resources/health/client/Client.js +2 -2
  81. package/dist/api/resources/jobs/client/Client.js +8 -8
  82. package/dist/api/resources/models/client/Client.js +4 -4
  83. package/dist/api/resources/sources/client/Client.js +16 -16
  84. package/dist/api/resources/sources/resources/files/client/Client.js +6 -6
  85. package/dist/api/resources/sources/resources/passages/client/Client.js +2 -2
  86. package/dist/api/resources/tools/client/Client.js +24 -24
  87. package/dist/api/types/InternalServerErrorBody.d.ts +1 -1
  88. package/dist/api/types/LettaResponse.d.ts +12 -62
  89. package/dist/api/types/LettaUsageStatistics.d.ts +1 -0
  90. package/dist/api/types/NotFoundErrorBody.d.ts +1 -2
  91. package/dist/api/types/index.d.ts +0 -13
  92. package/dist/api/types/index.js +0 -13
  93. package/dist/environments.d.ts +2 -2
  94. package/dist/environments.js +1 -1
  95. package/dist/version.d.ts +1 -1
  96. package/dist/version.js +1 -1
  97. package/environments.d.ts +2 -2
  98. package/environments.js +1 -1
  99. package/package.json +1 -1
  100. package/reference.md +199 -2
  101. package/version.d.ts +1 -1
  102. package/version.js +1 -1
  103. package/api/resources/agents/types/AgentsCreateVersionResponse.d.ts +0 -7
  104. package/api/types/LettaResponseAssistantMessage.d.ts +0 -9
  105. package/api/types/LettaResponseLettaUsageStatistics.d.ts +0 -22
  106. package/api/types/LettaResponseReasoningMessage.d.ts +0 -17
  107. package/api/types/LettaResponseSystemMessage.d.ts +0 -17
  108. package/api/types/LettaResponseToolCall.d.ts +0 -8
  109. package/api/types/LettaResponseToolCallDelta.d.ts +0 -8
  110. package/api/types/LettaResponseToolCallMessage.d.ts +0 -18
  111. package/api/types/LettaResponseToolCallMessageToolCall.d.ts +0 -5
  112. package/api/types/LettaResponseToolCallMessageToolCallOne.d.ts +0 -8
  113. package/api/types/LettaResponseToolCallMessageToolCallZero.d.ts +0 -8
  114. package/api/types/LettaResponseToolReturnMessage.d.ts +0 -26
  115. package/api/types/LettaResponseToolReturnMessageStatus.d.ts +0 -8
  116. package/api/types/LettaResponseUserMessage.d.ts +0 -17
  117. package/dist/api/resources/agents/types/AgentsCreateVersionResponse.d.ts +0 -7
  118. package/dist/api/types/LettaResponseAssistantMessage.d.ts +0 -9
  119. package/dist/api/types/LettaResponseAssistantMessage.js +0 -5
  120. package/dist/api/types/LettaResponseLettaUsageStatistics.d.ts +0 -22
  121. package/dist/api/types/LettaResponseLettaUsageStatistics.js +0 -5
  122. package/dist/api/types/LettaResponseReasoningMessage.d.ts +0 -17
  123. package/dist/api/types/LettaResponseReasoningMessage.js +0 -5
  124. package/dist/api/types/LettaResponseSystemMessage.d.ts +0 -17
  125. package/dist/api/types/LettaResponseSystemMessage.js +0 -5
  126. package/dist/api/types/LettaResponseToolCall.d.ts +0 -8
  127. package/dist/api/types/LettaResponseToolCall.js +0 -5
  128. package/dist/api/types/LettaResponseToolCallDelta.d.ts +0 -8
  129. package/dist/api/types/LettaResponseToolCallDelta.js +0 -5
  130. package/dist/api/types/LettaResponseToolCallMessage.d.ts +0 -18
  131. package/dist/api/types/LettaResponseToolCallMessage.js +0 -5
  132. package/dist/api/types/LettaResponseToolCallMessageToolCall.d.ts +0 -5
  133. package/dist/api/types/LettaResponseToolCallMessageToolCall.js +0 -5
  134. package/dist/api/types/LettaResponseToolCallMessageToolCallOne.d.ts +0 -8
  135. package/dist/api/types/LettaResponseToolCallMessageToolCallOne.js +0 -5
  136. package/dist/api/types/LettaResponseToolCallMessageToolCallZero.d.ts +0 -8
  137. package/dist/api/types/LettaResponseToolCallMessageToolCallZero.js +0 -5
  138. package/dist/api/types/LettaResponseToolReturnMessage.d.ts +0 -26
  139. package/dist/api/types/LettaResponseToolReturnMessage.js +0 -5
  140. package/dist/api/types/LettaResponseToolReturnMessageStatus.d.ts +0 -8
  141. package/dist/api/types/LettaResponseUserMessage.d.ts +0 -17
  142. package/dist/api/types/LettaResponseUserMessage.js +0 -5
  143. /package/api/resources/agents/{types/AgentsCreateVersionResponse.js → client/requests/AgentsCreateTemplateFromAgentRequest.js} +0 -0
  144. /package/api/{types/LettaResponseAssistantMessage.js → resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.js} +0 -0
  145. /package/api/{types/LettaResponseLettaUsageStatistics.js → resources/agents/types/AgentsGetAgentVariablesResponse.js} +0 -0
  146. /package/api/{types/LettaResponseReasoningMessage.js → resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.js} +0 -0
  147. /package/api/{types/LettaResponseSystemMessage.js → resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirection.js} +0 -0
  148. /package/api/{types/LettaResponseToolCall.js → resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOperator.js} +0 -0
  149. /package/api/{types/LettaResponseToolCallDelta.js → resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemZero.js} +0 -0
  150. /package/{api/types/LettaResponseToolCallMessage.js → dist/api/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.js} +0 -0
  151. /package/{api/types/LettaResponseToolCallMessageToolCall.js → dist/api/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.js} +0 -0
  152. /package/{api/types/LettaResponseToolCallMessageToolCallOne.js → dist/api/resources/agents/types/AgentsGetAgentVariablesResponse.js} +0 -0
  153. /package/{api/types/LettaResponseToolCallMessageToolCallZero.js → dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.js} +0 -0
  154. /package/{api/types/LettaResponseToolReturnMessage.js → dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirection.js} +0 -0
  155. /package/{api/types/LettaResponseUserMessage.js → dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOperator.js} +0 -0
  156. /package/dist/api/resources/agents/types/{AgentsCreateVersionResponse.js → AgentsSearchDeployedAgentsRequestSearchItemZero.js} +0 -0
@@ -81,9 +81,9 @@ class Messages {
81
81
  _queryParams["assistant_message_tool_kwarg"] = assistantMessageToolKwarg;
82
82
  }
83
83
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
84
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/messages`),
84
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages`),
85
85
  method: "GET",
86
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
86
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
87
87
  contentType: "application/json",
88
88
  queryParameters: _queryParams,
89
89
  requestType: "json",
@@ -142,9 +142,9 @@ class Messages {
142
142
  var _a, _b;
143
143
  return __awaiter(this, void 0, void 0, function* () {
144
144
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
145
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/messages`),
145
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages`),
146
146
  method: "POST",
147
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
147
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
148
148
  contentType: "application/json",
149
149
  requestType: "json",
150
150
  body: request,
@@ -198,9 +198,9 @@ class Messages {
198
198
  var _a, _b;
199
199
  return __awaiter(this, void 0, void 0, function* () {
200
200
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
201
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/messages/${encodeURIComponent(messageId)}`),
201
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/${encodeURIComponent(messageId)}`),
202
202
  method: "PATCH",
203
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
203
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
204
204
  contentType: "application/json",
205
205
  requestType: "json",
206
206
  body: request,
@@ -246,9 +246,9 @@ class Messages {
246
246
  var _a, _b;
247
247
  return __awaiter(this, void 0, void 0, function* () {
248
248
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
249
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/messages/stream`),
249
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/stream`),
250
250
  method: "POST",
251
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
251
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
252
252
  contentType: "application/json",
253
253
  requestType: "json",
254
254
  body: request,
@@ -2,7 +2,4 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Letta from "../../../../../index";
5
- /**
6
- * Server-Sent Events stream
7
- */
8
5
  export declare type LettaStreamingResponse = Letta.SystemMessageOutput | Letta.UserMessageOutput | Letta.ReasoningMessage | Letta.ToolCallMessage | Letta.ToolReturnMessage | Letta.AssistantMessageOutput | Letta.LettaUsageStatistics;
@@ -63,9 +63,9 @@ class RecallMemory {
63
63
  var _a, _b;
64
64
  return __awaiter(this, void 0, void 0, function* () {
65
65
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
66
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/memory/recall`),
66
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/memory/recall`),
67
67
  method: "GET",
68
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
68
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
69
69
  contentType: "application/json",
70
70
  requestType: "json",
71
71
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -63,9 +63,9 @@ class Sources {
63
63
  var _a, _b;
64
64
  return __awaiter(this, void 0, void 0, function* () {
65
65
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
66
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/sources`),
66
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/sources`),
67
67
  method: "GET",
68
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
68
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
69
69
  contentType: "application/json",
70
70
  requestType: "json",
71
71
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -63,9 +63,9 @@ class Tools {
63
63
  var _a, _b;
64
64
  return __awaiter(this, void 0, void 0, function* () {
65
65
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
66
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/tools`),
66
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/tools`),
67
67
  method: "GET",
68
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
68
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
69
69
  contentType: "application/json",
70
70
  requestType: "json",
71
71
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -117,9 +117,9 @@ class Tools {
117
117
  var _a, _b;
118
118
  return __awaiter(this, void 0, void 0, function* () {
119
119
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
120
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/add-tool/${encodeURIComponent(toolId)}`),
120
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/add-tool/${encodeURIComponent(toolId)}`),
121
121
  method: "PATCH",
122
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
122
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
123
123
  contentType: "application/json",
124
124
  requestType: "json",
125
125
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -171,9 +171,9 @@ class Tools {
171
171
  var _a, _b;
172
172
  return __awaiter(this, void 0, void 0, function* () {
173
173
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
174
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/remove-tool/${encodeURIComponent(toolId)}`),
174
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/remove-tool/${encodeURIComponent(toolId)}`),
175
175
  method: "PATCH",
176
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
176
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
177
177
  contentType: "application/json",
178
178
  requestType: "json",
179
179
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface AgentsGetAgentVariablesResponse {
5
+ variables: Record<string, string>;
6
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type AgentsSearchDeployedAgentsRequestCombinator = "AND" | "OR";
5
+ export declare const AgentsSearchDeployedAgentsRequestCombinator: {
6
+ readonly And: "AND";
7
+ readonly Or: "OR";
8
+ };
@@ -3,8 +3,8 @@
3
3
  * This file was auto-generated by Fern from our API Definition.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.LettaResponseToolReturnMessageStatus = void 0;
7
- exports.LettaResponseToolReturnMessageStatus = {
8
- Success: "success",
9
- Error: "error",
6
+ exports.AgentsSearchDeployedAgentsRequestCombinator = void 0;
7
+ exports.AgentsSearchDeployedAgentsRequestCombinator = {
8
+ And: "AND",
9
+ Or: "OR",
10
10
  };
@@ -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 declare type AgentsSearchDeployedAgentsRequestSearchItem = Letta.AgentsSearchDeployedAgentsRequestSearchItemZero | Letta.AgentsSearchDeployedAgentsRequestSearchItemOperator | Letta.AgentsSearchDeployedAgentsRequestSearchItemDirection;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Letta from "../../../index";
5
+ export interface AgentsSearchDeployedAgentsRequestSearchItemDirection {
6
+ field: "order_by";
7
+ value: Letta.AgentsSearchDeployedAgentsRequestSearchItemDirectionValue;
8
+ direction: Letta.AgentsSearchDeployedAgentsRequestSearchItemDirectionDirection;
9
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type AgentsSearchDeployedAgentsRequestSearchItemDirectionDirection = "asc" | "desc";
5
+ export declare const AgentsSearchDeployedAgentsRequestSearchItemDirectionDirection: {
6
+ readonly Asc: "asc";
7
+ readonly Desc: "desc";
8
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.AgentsSearchDeployedAgentsRequestSearchItemDirectionDirection = void 0;
7
+ exports.AgentsSearchDeployedAgentsRequestSearchItemDirectionDirection = {
8
+ Asc: "asc",
9
+ Desc: "desc",
10
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type AgentsSearchDeployedAgentsRequestSearchItemDirectionValue = "created_at" | "updated_at";
5
+ export declare const AgentsSearchDeployedAgentsRequestSearchItemDirectionValue: {
6
+ readonly CreatedAt: "created_at";
7
+ readonly UpdatedAt: "updated_at";
8
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.AgentsSearchDeployedAgentsRequestSearchItemDirectionValue = void 0;
7
+ exports.AgentsSearchDeployedAgentsRequestSearchItemDirectionValue = {
8
+ CreatedAt: "created_at",
9
+ UpdatedAt: "updated_at",
10
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Letta from "../../../index";
5
+ export interface AgentsSearchDeployedAgentsRequestSearchItemOperator {
6
+ field: "name";
7
+ operator: Letta.AgentsSearchDeployedAgentsRequestSearchItemOperatorOperator;
8
+ value: string;
9
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type AgentsSearchDeployedAgentsRequestSearchItemOperatorOperator = "eq" | "neq" | "contains";
5
+ export declare const AgentsSearchDeployedAgentsRequestSearchItemOperatorOperator: {
6
+ readonly Eq: "eq";
7
+ readonly Neq: "neq";
8
+ readonly Contains: "contains";
9
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.AgentsSearchDeployedAgentsRequestSearchItemOperatorOperator = void 0;
7
+ exports.AgentsSearchDeployedAgentsRequestSearchItemOperatorOperator = {
8
+ Eq: "eq",
9
+ Neq: "neq",
10
+ Contains: "contains",
11
+ };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface AgentsSearchDeployedAgentsRequestSearchItemZero {
5
+ field: "version";
6
+ value: string;
7
+ }
@@ -1,4 +1,12 @@
1
1
  export * from "./CreateAgentRequestToolRulesItem";
2
2
  export * from "./UpdateAgentToolRulesItem";
3
- export * from "./AgentsCreateVersionResponse";
3
+ export * from "./AgentsSearchDeployedAgentsRequestSearchItemZero";
4
+ export * from "./AgentsSearchDeployedAgentsRequestSearchItemOperatorOperator";
5
+ export * from "./AgentsSearchDeployedAgentsRequestSearchItemOperator";
6
+ export * from "./AgentsSearchDeployedAgentsRequestSearchItemDirectionValue";
7
+ export * from "./AgentsSearchDeployedAgentsRequestSearchItemDirectionDirection";
8
+ export * from "./AgentsSearchDeployedAgentsRequestSearchItemDirection";
9
+ export * from "./AgentsSearchDeployedAgentsRequestSearchItem";
10
+ export * from "./AgentsSearchDeployedAgentsRequestCombinator";
4
11
  export * from "./AgentsMigrateResponse";
12
+ export * from "./AgentsGetAgentVariablesResponse";
@@ -16,5 +16,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./CreateAgentRequestToolRulesItem"), exports);
18
18
  __exportStar(require("./UpdateAgentToolRulesItem"), exports);
19
- __exportStar(require("./AgentsCreateVersionResponse"), exports);
19
+ __exportStar(require("./AgentsSearchDeployedAgentsRequestSearchItemZero"), exports);
20
+ __exportStar(require("./AgentsSearchDeployedAgentsRequestSearchItemOperatorOperator"), exports);
21
+ __exportStar(require("./AgentsSearchDeployedAgentsRequestSearchItemOperator"), exports);
22
+ __exportStar(require("./AgentsSearchDeployedAgentsRequestSearchItemDirectionValue"), exports);
23
+ __exportStar(require("./AgentsSearchDeployedAgentsRequestSearchItemDirectionDirection"), exports);
24
+ __exportStar(require("./AgentsSearchDeployedAgentsRequestSearchItemDirection"), exports);
25
+ __exportStar(require("./AgentsSearchDeployedAgentsRequestSearchItem"), exports);
26
+ __exportStar(require("./AgentsSearchDeployedAgentsRequestCombinator"), exports);
20
27
  __exportStar(require("./AgentsMigrateResponse"), exports);
28
+ __exportStar(require("./AgentsGetAgentVariablesResponse"), exports);
@@ -72,9 +72,9 @@ class Blocks {
72
72
  _queryParams["name"] = name;
73
73
  }
74
74
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
75
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/blocks/"),
75
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/blocks/"),
76
76
  method: "GET",
77
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
77
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
78
78
  contentType: "application/json",
79
79
  queryParameters: _queryParams,
80
80
  requestType: "json",
@@ -127,9 +127,9 @@ class Blocks {
127
127
  var _a, _b;
128
128
  return __awaiter(this, void 0, void 0, function* () {
129
129
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
130
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/blocks/"),
130
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/blocks/"),
131
131
  method: "POST",
132
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
132
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
133
133
  contentType: "application/json",
134
134
  requestType: "json",
135
135
  body: request,
@@ -179,9 +179,9 @@ class Blocks {
179
179
  var _a, _b;
180
180
  return __awaiter(this, void 0, void 0, function* () {
181
181
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
182
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/blocks/${encodeURIComponent(blockId)}`),
182
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/blocks/${encodeURIComponent(blockId)}`),
183
183
  method: "GET",
184
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
184
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
185
185
  contentType: "application/json",
186
186
  requestType: "json",
187
187
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -230,9 +230,9 @@ class Blocks {
230
230
  var _a, _b;
231
231
  return __awaiter(this, void 0, void 0, function* () {
232
232
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
233
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/blocks/${encodeURIComponent(blockId)}`),
233
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/blocks/${encodeURIComponent(blockId)}`),
234
234
  method: "DELETE",
235
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
235
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
236
236
  contentType: "application/json",
237
237
  requestType: "json",
238
238
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -282,9 +282,9 @@ class Blocks {
282
282
  var _a, _b;
283
283
  return __awaiter(this, void 0, void 0, function* () {
284
284
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
285
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/blocks/${encodeURIComponent(blockId)}`),
285
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/blocks/${encodeURIComponent(blockId)}`),
286
286
  method: "PATCH",
287
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
287
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
288
288
  contentType: "application/json",
289
289
  requestType: "json",
290
290
  body: request,
@@ -342,9 +342,9 @@ class Blocks {
342
342
  const _queryParams = {};
343
343
  _queryParams["agent_id"] = agentId;
344
344
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
345
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/blocks/${encodeURIComponent(blockId)}/attach`),
345
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/blocks/${encodeURIComponent(blockId)}/attach`),
346
346
  method: "PATCH",
347
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
347
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
348
348
  contentType: "application/json",
349
349
  queryParameters: _queryParams,
350
350
  requestType: "json",
@@ -402,9 +402,9 @@ class Blocks {
402
402
  const _queryParams = {};
403
403
  _queryParams["agent_id"] = agentId;
404
404
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
405
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/blocks/${encodeURIComponent(blockId)}/detach`),
405
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/blocks/${encodeURIComponent(blockId)}/detach`),
406
406
  method: "PATCH",
407
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
407
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
408
408
  contentType: "application/json",
409
409
  queryParameters: _queryParams,
410
410
  requestType: "json",
@@ -57,9 +57,9 @@ class Health {
57
57
  var _a, _b;
58
58
  return __awaiter(this, void 0, void 0, function* () {
59
59
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
60
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/health/"),
60
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/health/"),
61
61
  method: "GET",
62
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
62
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
63
63
  contentType: "application/json",
64
64
  requestType: "json",
65
65
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -68,9 +68,9 @@ class Jobs {
68
68
  _queryParams["source_id"] = sourceId;
69
69
  }
70
70
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
71
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/jobs/"),
71
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/jobs/"),
72
72
  method: "GET",
73
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
73
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
74
74
  contentType: "application/json",
75
75
  queryParameters: _queryParams,
76
76
  requestType: "json",
@@ -121,9 +121,9 @@ class Jobs {
121
121
  var _a, _b;
122
122
  return __awaiter(this, void 0, void 0, function* () {
123
123
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
124
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/jobs/active"),
124
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/jobs/active"),
125
125
  method: "GET",
126
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
126
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
127
127
  contentType: "application/json",
128
128
  requestType: "json",
129
129
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -174,9 +174,9 @@ class Jobs {
174
174
  var _a, _b;
175
175
  return __awaiter(this, void 0, void 0, function* () {
176
176
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
177
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/jobs/${encodeURIComponent(jobId)}`),
177
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/jobs/${encodeURIComponent(jobId)}`),
178
178
  method: "GET",
179
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
179
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
180
180
  contentType: "application/json",
181
181
  requestType: "json",
182
182
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -227,9 +227,9 @@ class Jobs {
227
227
  var _a, _b;
228
228
  return __awaiter(this, void 0, void 0, function* () {
229
229
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
230
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/jobs/${encodeURIComponent(jobId)}`),
230
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/jobs/${encodeURIComponent(jobId)}`),
231
231
  method: "DELETE",
232
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
232
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
233
233
  contentType: "application/json",
234
234
  requestType: "json",
235
235
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -57,9 +57,9 @@ class Models {
57
57
  var _a, _b;
58
58
  return __awaiter(this, void 0, void 0, function* () {
59
59
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
60
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/models/"),
60
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/models/"),
61
61
  method: "GET",
62
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
62
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
63
63
  contentType: "application/json",
64
64
  requestType: "json",
65
65
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -100,9 +100,9 @@ class Models {
100
100
  var _a, _b;
101
101
  return __awaiter(this, void 0, void 0, function* () {
102
102
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
103
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/models/embedding"),
103
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/models/embedding"),
104
104
  method: "GET",
105
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0", "User-Agent": "@letta-ai/letta-client/0.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
105
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
106
106
  contentType: "application/json",
107
107
  requestType: "json",
108
108
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,