@letta-ai/letta-client 0.1.7 → 0.1.8

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 (172) hide show
  1. package/Client.d.ts +3 -0
  2. package/Client.js +5 -0
  3. package/api/resources/agents/client/Client.d.ts +13 -0
  4. package/api/resources/agents/client/Client.js +78 -6
  5. package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -2
  6. package/api/resources/agents/client/requests/ResetMessagesRequest.d.ts +13 -0
  7. package/api/resources/agents/client/requests/ResetMessagesRequest.js +5 -0
  8. package/api/resources/agents/client/requests/index.d.ts +1 -0
  9. package/api/resources/agents/resources/archivalMemory/client/Client.js +4 -4
  10. package/api/resources/agents/resources/context/client/Client.js +1 -1
  11. package/api/resources/agents/resources/coreMemory/client/Client.js +7 -7
  12. package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  13. package/api/resources/agents/resources/messages/client/Client.d.ts +1 -1
  14. package/api/resources/agents/resources/messages/client/Client.js +6 -6
  15. package/api/resources/agents/resources/recallMemory/client/Client.js +1 -1
  16. package/api/resources/agents/resources/sources/client/Client.js +1 -1
  17. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  18. package/api/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +1 -1
  19. package/api/resources/agents/resources/tools/client/Client.js +3 -3
  20. package/api/resources/blocks/client/Client.js +7 -7
  21. package/api/resources/health/client/Client.js +1 -1
  22. package/api/resources/index.d.ts +2 -0
  23. package/api/resources/index.js +3 -1
  24. package/api/resources/jobs/client/Client.js +4 -4
  25. package/api/resources/models/client/Client.js +2 -2
  26. package/api/resources/providers/client/Client.js +4 -4
  27. package/api/resources/runs/client/Client.d.ts +115 -0
  28. package/api/resources/runs/client/Client.js +500 -0
  29. package/api/resources/runs/client/index.d.ts +1 -0
  30. package/api/resources/runs/client/index.js +17 -0
  31. package/api/resources/runs/client/requests/GetRunMessagesRequest.d.ts +50 -0
  32. package/api/resources/runs/client/requests/GetRunMessagesRequest.js +5 -0
  33. package/api/resources/runs/client/requests/index.d.ts +1 -0
  34. package/api/resources/runs/client/requests/index.js +2 -0
  35. package/api/resources/runs/index.d.ts +1 -0
  36. package/api/resources/runs/index.js +17 -0
  37. package/api/resources/sources/client/Client.js +8 -8
  38. package/api/resources/sources/resources/files/client/Client.js +3 -3
  39. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  40. package/api/resources/tools/client/Client.js +12 -12
  41. package/api/resources/tools/client/requests/ToolRunFromSource.d.ts +1 -1
  42. package/api/resources/tools/client/requests/ToolUpdate.d.ts +0 -2
  43. package/api/types/Job.d.ts +2 -0
  44. package/api/types/JobType.d.ts +8 -0
  45. package/api/types/JobType.js +10 -0
  46. package/api/types/LettaSchemasToolTool.d.ts +0 -2
  47. package/api/types/Run.d.ts +34 -0
  48. package/api/types/Run.js +5 -0
  49. package/api/types/ToolCreate.d.ts +0 -2
  50. package/api/types/index.d.ts +2 -0
  51. package/api/types/index.js +2 -0
  52. package/dist/Client.d.ts +3 -0
  53. package/dist/Client.js +5 -0
  54. package/dist/api/resources/agents/client/Client.d.ts +13 -0
  55. package/dist/api/resources/agents/client/Client.js +78 -6
  56. package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -2
  57. package/dist/api/resources/agents/client/requests/ResetMessagesRequest.d.ts +13 -0
  58. package/dist/api/resources/agents/client/requests/ResetMessagesRequest.js +5 -0
  59. package/dist/api/resources/agents/client/requests/index.d.ts +1 -0
  60. package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +4 -4
  61. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  62. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +7 -7
  63. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  64. package/dist/api/resources/agents/resources/messages/client/Client.d.ts +1 -1
  65. package/dist/api/resources/agents/resources/messages/client/Client.js +6 -6
  66. package/dist/api/resources/agents/resources/recallMemory/client/Client.js +1 -1
  67. package/dist/api/resources/agents/resources/sources/client/Client.js +1 -1
  68. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  69. package/dist/api/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +1 -1
  70. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  71. package/dist/api/resources/blocks/client/Client.js +7 -7
  72. package/dist/api/resources/health/client/Client.js +1 -1
  73. package/dist/api/resources/index.d.ts +2 -0
  74. package/dist/api/resources/index.js +3 -1
  75. package/dist/api/resources/jobs/client/Client.js +4 -4
  76. package/dist/api/resources/models/client/Client.js +2 -2
  77. package/dist/api/resources/providers/client/Client.js +4 -4
  78. package/dist/api/resources/runs/client/Client.d.ts +115 -0
  79. package/dist/api/resources/runs/client/Client.js +500 -0
  80. package/dist/api/resources/runs/client/index.d.ts +1 -0
  81. package/dist/api/resources/runs/client/index.js +17 -0
  82. package/dist/api/resources/runs/client/requests/GetRunMessagesRequest.d.ts +50 -0
  83. package/dist/api/resources/runs/client/requests/GetRunMessagesRequest.js +5 -0
  84. package/dist/api/resources/runs/client/requests/index.d.ts +1 -0
  85. package/dist/api/resources/runs/client/requests/index.js +2 -0
  86. package/dist/api/resources/runs/index.d.ts +1 -0
  87. package/dist/api/resources/runs/index.js +17 -0
  88. package/dist/api/resources/sources/client/Client.js +8 -8
  89. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  90. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  91. package/dist/api/resources/tools/client/Client.js +12 -12
  92. package/dist/api/resources/tools/client/requests/ToolRunFromSource.d.ts +1 -1
  93. package/dist/api/resources/tools/client/requests/ToolUpdate.d.ts +0 -2
  94. package/dist/api/types/Job.d.ts +2 -0
  95. package/dist/api/types/JobType.d.ts +8 -0
  96. package/dist/api/types/JobType.js +10 -0
  97. package/dist/api/types/LettaSchemasToolTool.d.ts +0 -2
  98. package/dist/api/types/Run.d.ts +34 -0
  99. package/dist/api/types/Run.js +5 -0
  100. package/dist/api/types/ToolCreate.d.ts +0 -2
  101. package/dist/api/types/index.d.ts +2 -0
  102. package/dist/api/types/index.js +2 -0
  103. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
  104. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -1
  105. package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +1 -1
  106. package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.js +1 -1
  107. package/dist/serialization/resources/index.d.ts +1 -0
  108. package/dist/serialization/resources/index.js +2 -1
  109. package/dist/serialization/resources/runs/client/getRunMessages.d.ts +11 -0
  110. package/dist/serialization/resources/runs/client/getRunMessages.js +32 -0
  111. package/dist/serialization/resources/runs/client/index.d.ts +3 -0
  112. package/dist/serialization/resources/runs/client/index.js +29 -0
  113. package/dist/serialization/resources/runs/client/listActiveRuns.d.ts +11 -0
  114. package/dist/serialization/resources/runs/client/listActiveRuns.js +32 -0
  115. package/dist/serialization/resources/runs/client/listRuns.d.ts +11 -0
  116. package/dist/serialization/resources/runs/client/listRuns.js +32 -0
  117. package/dist/serialization/resources/runs/index.d.ts +1 -0
  118. package/dist/serialization/resources/runs/index.js +17 -0
  119. package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +1 -1
  120. package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.js +1 -1
  121. package/dist/serialization/resources/tools/client/requests/ToolUpdate.d.ts +0 -1
  122. package/dist/serialization/resources/tools/client/requests/ToolUpdate.js +0 -1
  123. package/dist/serialization/types/Job.d.ts +2 -0
  124. package/dist/serialization/types/Job.js +2 -0
  125. package/dist/serialization/types/JobType.d.ts +10 -0
  126. package/dist/serialization/types/JobType.js +34 -0
  127. package/dist/serialization/types/LettaSchemasToolTool.d.ts +0 -1
  128. package/dist/serialization/types/LettaSchemasToolTool.js +0 -1
  129. package/dist/serialization/types/Run.d.ts +22 -0
  130. package/dist/serialization/types/Run.js +43 -0
  131. package/dist/serialization/types/ToolCreate.d.ts +0 -1
  132. package/dist/serialization/types/ToolCreate.js +0 -1
  133. package/dist/serialization/types/index.d.ts +2 -0
  134. package/dist/serialization/types/index.js +2 -0
  135. package/dist/version.d.ts +1 -1
  136. package/dist/version.js +1 -1
  137. package/package.json +1 -1
  138. package/reference.md +458 -1
  139. package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
  140. package/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -1
  141. package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +1 -1
  142. package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.js +1 -1
  143. package/serialization/resources/index.d.ts +1 -0
  144. package/serialization/resources/index.js +2 -1
  145. package/serialization/resources/runs/client/getRunMessages.d.ts +11 -0
  146. package/serialization/resources/runs/client/getRunMessages.js +32 -0
  147. package/serialization/resources/runs/client/index.d.ts +3 -0
  148. package/serialization/resources/runs/client/index.js +29 -0
  149. package/serialization/resources/runs/client/listActiveRuns.d.ts +11 -0
  150. package/serialization/resources/runs/client/listActiveRuns.js +32 -0
  151. package/serialization/resources/runs/client/listRuns.d.ts +11 -0
  152. package/serialization/resources/runs/client/listRuns.js +32 -0
  153. package/serialization/resources/runs/index.d.ts +1 -0
  154. package/serialization/resources/runs/index.js +17 -0
  155. package/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +1 -1
  156. package/serialization/resources/tools/client/requests/ToolRunFromSource.js +1 -1
  157. package/serialization/resources/tools/client/requests/ToolUpdate.d.ts +0 -1
  158. package/serialization/resources/tools/client/requests/ToolUpdate.js +0 -1
  159. package/serialization/types/Job.d.ts +2 -0
  160. package/serialization/types/Job.js +2 -0
  161. package/serialization/types/JobType.d.ts +10 -0
  162. package/serialization/types/JobType.js +34 -0
  163. package/serialization/types/LettaSchemasToolTool.d.ts +0 -1
  164. package/serialization/types/LettaSchemasToolTool.js +0 -1
  165. package/serialization/types/Run.d.ts +22 -0
  166. package/serialization/types/Run.js +43 -0
  167. package/serialization/types/ToolCreate.d.ts +0 -1
  168. package/serialization/types/ToolCreate.js +0 -1
  169. package/serialization/types/index.d.ts +2 -0
  170. package/serialization/types/index.js +2 -0
  171. package/version.d.ts +1 -1
  172. package/version.js +1 -1
@@ -76,7 +76,7 @@ class Sources {
76
76
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
77
77
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}`),
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.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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,
@@ -141,7 +141,7 @@ class Sources {
141
141
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
142
142
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}`),
143
143
  method: "DELETE",
144
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
144
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
145
145
  contentType: "application/json",
146
146
  requestType: "json",
147
147
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -201,7 +201,7 @@ class Sources {
201
201
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
202
202
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}`),
203
203
  method: "PATCH",
204
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
204
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
205
205
  contentType: "application/json",
206
206
  requestType: "json",
207
207
  body: serializers.SourceUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -267,7 +267,7 @@ class Sources {
267
267
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
268
268
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/name/${encodeURIComponent(sourceName)}`),
269
269
  method: "GET",
270
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
270
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
271
271
  contentType: "application/json",
272
272
  requestType: "json",
273
273
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -331,7 +331,7 @@ class Sources {
331
331
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
332
332
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/sources/"),
333
333
  method: "GET",
334
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
334
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
335
335
  contentType: "application/json",
336
336
  requestType: "json",
337
337
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -398,7 +398,7 @@ class Sources {
398
398
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
399
399
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/sources/"),
400
400
  method: "POST",
401
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
401
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
402
402
  contentType: "application/json",
403
403
  requestType: "json",
404
404
  body: serializers.SourceCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -470,7 +470,7 @@ class Sources {
470
470
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
471
471
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/attach`),
472
472
  method: "POST",
473
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
473
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
474
474
  contentType: "application/json",
475
475
  queryParameters: _queryParams,
476
476
  requestType: "json",
@@ -542,7 +542,7 @@ class Sources {
542
542
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
543
543
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/detach`),
544
544
  method: "POST",
545
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
545
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
546
546
  contentType: "application/json",
547
547
  queryParameters: _queryParams,
548
548
  requestType: "json",
@@ -70,7 +70,7 @@ class Files {
70
70
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
71
71
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/upload`),
72
72
  method: "POST",
73
- 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.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
73
+ 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.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
74
74
  requestType: "file",
75
75
  duplex: _maybeEncodedRequest.duplex,
76
76
  body: _maybeEncodedRequest.body,
@@ -145,7 +145,7 @@ class Files {
145
145
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
146
146
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/files`),
147
147
  method: "GET",
148
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
149
149
  contentType: "application/json",
150
150
  queryParameters: _queryParams,
151
151
  requestType: "json",
@@ -212,7 +212,7 @@ class Files {
212
212
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
213
213
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/${encodeURIComponent(fileId)}`),
214
214
  method: "DELETE",
215
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
215
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
216
216
  contentType: "application/json",
217
217
  requestType: "json",
218
218
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -66,7 +66,7 @@ class Passages {
66
66
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
67
67
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/sources/${encodeURIComponent(sourceId)}/passages`),
68
68
  method: "GET",
69
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
69
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
70
70
  contentType: "application/json",
71
71
  requestType: "json",
72
72
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -66,7 +66,7 @@ class Tools {
66
66
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
67
67
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/tools/${encodeURIComponent(toolId)}`),
68
68
  method: "GET",
69
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
69
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
70
70
  contentType: "application/json",
71
71
  requestType: "json",
72
72
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -131,7 +131,7 @@ class Tools {
131
131
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
132
132
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/tools/${encodeURIComponent(toolId)}`),
133
133
  method: "DELETE",
134
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
134
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
135
135
  contentType: "application/json",
136
136
  requestType: "json",
137
137
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -191,7 +191,7 @@ class Tools {
191
191
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
192
192
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/tools/${encodeURIComponent(toolId)}`),
193
193
  method: "PATCH",
194
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
194
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
195
195
  contentType: "application/json",
196
196
  requestType: "json",
197
197
  body: serializers.ToolUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -257,7 +257,7 @@ class Tools {
257
257
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
258
258
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/tools/name/${encodeURIComponent(toolName)}`),
259
259
  method: "GET",
260
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
260
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
261
261
  contentType: "application/json",
262
262
  requestType: "json",
263
263
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -330,7 +330,7 @@ class Tools {
330
330
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
331
331
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/tools/"),
332
332
  method: "GET",
333
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
333
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
334
334
  contentType: "application/json",
335
335
  queryParameters: _queryParams,
336
336
  requestType: "json",
@@ -398,7 +398,7 @@ class Tools {
398
398
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
399
399
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/tools/"),
400
400
  method: "POST",
401
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
401
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
402
402
  contentType: "application/json",
403
403
  requestType: "json",
404
404
  body: serializers.ToolCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -466,7 +466,7 @@ class Tools {
466
466
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
467
467
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/tools/"),
468
468
  method: "PUT",
469
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
469
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
470
470
  contentType: "application/json",
471
471
  requestType: "json",
472
472
  body: serializers.ToolCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -531,7 +531,7 @@ class Tools {
531
531
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
532
532
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/tools/add-base-tools"),
533
533
  method: "POST",
534
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
534
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
535
535
  contentType: "application/json",
536
536
  requestType: "json",
537
537
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -601,7 +601,7 @@ class Tools {
601
601
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
602
602
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/tools/run"),
603
603
  method: "POST",
604
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
604
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
605
605
  contentType: "application/json",
606
606
  requestType: "json",
607
607
  body: serializers.ToolRunFromSource.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -666,7 +666,7 @@ class Tools {
666
666
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
667
667
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/tools/composio/apps"),
668
668
  method: "GET",
669
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
669
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
670
670
  contentType: "application/json",
671
671
  requestType: "json",
672
672
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -731,7 +731,7 @@ class Tools {
731
731
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
732
732
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/tools/composio/apps/${encodeURIComponent(composioAppName)}/actions`),
733
733
  method: "GET",
734
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
734
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
735
735
  contentType: "application/json",
736
736
  requestType: "json",
737
737
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -796,7 +796,7 @@ class Tools {
796
796
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
797
797
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/tools/composio/${encodeURIComponent(composioActionName)}`),
798
798
  method: "POST",
799
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
799
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
800
800
  contentType: "application/json",
801
801
  requestType: "json",
802
802
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -14,7 +14,7 @@ export interface ToolRunFromSource {
14
14
  /** The source code of the function. */
15
15
  sourceCode: string;
16
16
  /** The arguments to pass to the tool. */
17
- args: Record<string, string>;
17
+ args: Record<string, unknown>;
18
18
  /** The environment variables to pass to the tool. */
19
19
  envVars?: Record<string, string>;
20
20
  /** The name of the tool to run. */
@@ -13,8 +13,6 @@ export interface ToolUpdate {
13
13
  /** Metadata tags. */
14
14
  tags?: string[];
15
15
  /** The source code of the function. */
16
- module?: string;
17
- /** The source code of the function. */
18
16
  sourceCode?: string;
19
17
  /** The type of the source code. */
20
18
  sourceType?: string;
@@ -27,6 +27,8 @@ export interface Job {
27
27
  completedAt?: Date;
28
28
  /** The metadata of the job. */
29
29
  metadata?: Record<string, unknown>;
30
+ /** The type of the job. */
31
+ jobType?: Letta.JobType;
30
32
  /** The human-friendly ID of the Job */
31
33
  id?: string;
32
34
  }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type JobType = "job" | "run";
5
+ export declare const JobType: {
6
+ readonly Job: "job";
7
+ readonly Run: "run";
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.JobType = void 0;
7
+ exports.JobType = {
8
+ Job: "job",
9
+ Run: "run",
10
+ };
@@ -21,8 +21,6 @@ export interface LettaSchemasToolTool {
21
21
  description?: string;
22
22
  /** The type of the source code. */
23
23
  sourceType?: string;
24
- /** The module of the function. */
25
- module?: string;
26
24
  /** The name of the function. */
27
25
  name?: string;
28
26
  /** Metadata tags. */
@@ -0,0 +1,34 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Letta from "../index";
5
+ /**
6
+ * Representation of a run, which is a job with a 'run' prefix in its ID.
7
+ * Inherits all fields and behavior from Job except for the ID prefix.
8
+ *
9
+ * Parameters:
10
+ * id (str): The unique identifier of the run (prefixed with 'run-').
11
+ * status (JobStatus): The status of the run.
12
+ * created_at (datetime): The unix timestamp of when the run was created.
13
+ * completed_at (datetime): The unix timestamp of when the run was completed.
14
+ * user_id (str): The unique identifier of the user associated with the run.
15
+ */
16
+ export interface Run {
17
+ /** The id of the user that made this object. */
18
+ createdById?: string;
19
+ /** The id of the user that made this object. */
20
+ lastUpdatedById?: string;
21
+ /** The timestamp when the object was created. */
22
+ createdAt?: Date;
23
+ /** The timestamp when the object was last updated. */
24
+ updatedAt?: Date;
25
+ /** The status of the job. */
26
+ status?: Letta.JobStatus;
27
+ /** The unix timestamp of when the job was completed. */
28
+ completedAt?: Date;
29
+ /** The metadata of the job. */
30
+ metadata?: Record<string, unknown>;
31
+ jobType?: Letta.JobType;
32
+ /** The human-friendly ID of the Run */
33
+ id?: string;
34
+ }
@@ -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 });
@@ -9,8 +9,6 @@ export interface ToolCreate {
9
9
  /** Metadata tags. */
10
10
  tags?: string[];
11
11
  /** The source code of the function. */
12
- module?: string;
13
- /** The source code of the function. */
14
12
  sourceCode: string;
15
13
  /** The source type of the function. */
16
14
  sourceType?: string;
@@ -48,6 +48,7 @@ export * from "./Health";
48
48
  export * from "./InitToolRule";
49
49
  export * from "./Job";
50
50
  export * from "./JobStatus";
51
+ export * from "./JobType";
51
52
  export * from "./LlmConfigModelEndpointType";
52
53
  export * from "./LlmConfig";
53
54
  export * from "./LettaRequest";
@@ -69,6 +70,7 @@ export * from "./Provider";
69
70
  export * from "./ReasoningMessage";
70
71
  export * from "./RecallMemorySummary";
71
72
  export * from "./ResponseFormat";
73
+ export * from "./Run";
72
74
  export * from "./SandboxConfig";
73
75
  export * from "./SandboxConfigCreateConfig";
74
76
  export * from "./SandboxConfigCreate";
@@ -64,6 +64,7 @@ __exportStar(require("./Health"), exports);
64
64
  __exportStar(require("./InitToolRule"), exports);
65
65
  __exportStar(require("./Job"), exports);
66
66
  __exportStar(require("./JobStatus"), exports);
67
+ __exportStar(require("./JobType"), exports);
67
68
  __exportStar(require("./LlmConfigModelEndpointType"), exports);
68
69
  __exportStar(require("./LlmConfig"), exports);
69
70
  __exportStar(require("./LettaRequest"), exports);
@@ -85,6 +86,7 @@ __exportStar(require("./Provider"), exports);
85
86
  __exportStar(require("./ReasoningMessage"), exports);
86
87
  __exportStar(require("./RecallMemorySummary"), exports);
87
88
  __exportStar(require("./ResponseFormat"), exports);
89
+ __exportStar(require("./Run"), exports);
88
90
  __exportStar(require("./SandboxConfig"), exports);
89
91
  __exportStar(require("./SandboxConfigCreateConfig"), exports);
90
92
  __exportStar(require("./SandboxConfigCreate"), exports);
package/dist/Client.d.ts CHANGED
@@ -11,6 +11,7 @@ import { Blocks } from "./api/resources/blocks/client/Client";
11
11
  import { Jobs } from "./api/resources/jobs/client/Client";
12
12
  import { Health } from "./api/resources/health/client/Client";
13
13
  import { Providers } from "./api/resources/providers/client/Client";
14
+ import { Runs } from "./api/resources/runs/client/Client";
14
15
  export declare namespace LettaClient {
15
16
  interface Options {
16
17
  environment?: core.Supplier<environments.LettaEnvironment | string>;
@@ -38,6 +39,7 @@ export declare class LettaClient {
38
39
  protected _jobs: Jobs | undefined;
39
40
  protected _health: Health | undefined;
40
41
  protected _providers: Providers | undefined;
42
+ protected _runs: Runs | undefined;
41
43
  constructor(_options?: LettaClient.Options);
42
44
  get tools(): Tools;
43
45
  get sources(): Sources;
@@ -47,4 +49,5 @@ export declare class LettaClient {
47
49
  get jobs(): Jobs;
48
50
  get health(): Health;
49
51
  get providers(): Providers;
52
+ get runs(): Runs;
50
53
  }
package/dist/Client.js CHANGED
@@ -12,6 +12,7 @@ const Client_5 = require("./api/resources/blocks/client/Client");
12
12
  const Client_6 = require("./api/resources/jobs/client/Client");
13
13
  const Client_7 = require("./api/resources/health/client/Client");
14
14
  const Client_8 = require("./api/resources/providers/client/Client");
15
+ const Client_9 = require("./api/resources/runs/client/Client");
15
16
  class LettaClient {
16
17
  constructor(_options = {}) {
17
18
  this._options = _options;
@@ -48,5 +49,9 @@ class LettaClient {
48
49
  var _a;
49
50
  return ((_a = this._providers) !== null && _a !== void 0 ? _a : (this._providers = new Client_8.Providers(this._options)));
50
51
  }
52
+ get runs() {
53
+ var _a;
54
+ return ((_a = this._runs) !== null && _a !== void 0 ? _a : (this._runs = new Client_9.Runs(this._options)));
55
+ }
51
56
  }
52
57
  exports.LettaClient = LettaClient;
@@ -118,6 +118,19 @@ export declare class Agents {
118
118
  * await client.agents.update("agent_id")
119
119
  */
120
120
  update(agentId: string, request?: Letta.UpdateAgent, requestOptions?: Agents.RequestOptions): Promise<Letta.AgentState>;
121
+ /**
122
+ * Resets the messages for an agent
123
+ *
124
+ * @param {string} agentId
125
+ * @param {Letta.ResetMessagesRequest} request
126
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
127
+ *
128
+ * @throws {@link Letta.UnprocessableEntityError}
129
+ *
130
+ * @example
131
+ * await client.agents.resetMessages("agent_id")
132
+ */
133
+ resetMessages(agentId: string, request?: Letta.ResetMessagesRequest, requestOptions?: Agents.RequestOptions): Promise<Letta.AgentState>;
121
134
  /**
122
135
  * <Note>This endpoint is only available on Letta Cloud.</Note>
123
136
  *
@@ -134,7 +134,7 @@ class Agents {
134
134
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
135
135
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/agents/"),
136
136
  method: "GET",
137
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
137
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
138
138
  contentType: "application/json",
139
139
  queryParameters: _queryParams,
140
140
  requestType: "json",
@@ -205,7 +205,7 @@ class Agents {
205
205
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
206
206
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/agents/"),
207
207
  method: "POST",
208
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
208
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
209
209
  contentType: "application/json",
210
210
  requestType: "json",
211
211
  body: serializers.CreateAgentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -271,7 +271,7 @@ class Agents {
271
271
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
272
272
  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)}`),
273
273
  method: "GET",
274
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
274
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
275
275
  contentType: "application/json",
276
276
  requestType: "json",
277
277
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -336,7 +336,7 @@ class Agents {
336
336
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
337
337
  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)}`),
338
338
  method: "DELETE",
339
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
339
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
340
340
  contentType: "application/json",
341
341
  requestType: "json",
342
342
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -396,7 +396,7 @@ class Agents {
396
396
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
397
397
  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)}`),
398
398
  method: "PATCH",
399
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
399
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
400
400
  contentType: "application/json",
401
401
  requestType: "json",
402
402
  body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -445,6 +445,78 @@ class Agents {
445
445
  }
446
446
  });
447
447
  }
448
+ /**
449
+ * Resets the messages for an agent
450
+ *
451
+ * @param {string} agentId
452
+ * @param {Letta.ResetMessagesRequest} request
453
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
454
+ *
455
+ * @throws {@link Letta.UnprocessableEntityError}
456
+ *
457
+ * @example
458
+ * await client.agents.resetMessages("agent_id")
459
+ */
460
+ resetMessages(agentId, request = {}, requestOptions) {
461
+ var _a, _b;
462
+ return __awaiter(this, void 0, void 0, function* () {
463
+ const { addDefaultInitialMessages } = request;
464
+ const _queryParams = {};
465
+ if (addDefaultInitialMessages != null) {
466
+ _queryParams["add_default_initial_messages"] = addDefaultInitialMessages.toString();
467
+ }
468
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
469
+ 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)}/reset-messages`),
470
+ method: "PATCH",
471
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
472
+ contentType: "application/json",
473
+ queryParameters: _queryParams,
474
+ requestType: "json",
475
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
476
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
477
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
478
+ });
479
+ if (_response.ok) {
480
+ return serializers.AgentState.parseOrThrow(_response.body, {
481
+ unrecognizedObjectKeys: "passthrough",
482
+ allowUnrecognizedUnionMembers: true,
483
+ allowUnrecognizedEnumValues: true,
484
+ skipValidation: true,
485
+ breadcrumbsPrefix: ["response"],
486
+ });
487
+ }
488
+ if (_response.error.reason === "status-code") {
489
+ switch (_response.error.statusCode) {
490
+ case 422:
491
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
492
+ unrecognizedObjectKeys: "passthrough",
493
+ allowUnrecognizedUnionMembers: true,
494
+ allowUnrecognizedEnumValues: true,
495
+ skipValidation: true,
496
+ breadcrumbsPrefix: ["response"],
497
+ }));
498
+ default:
499
+ throw new errors.LettaError({
500
+ statusCode: _response.error.statusCode,
501
+ body: _response.error.body,
502
+ });
503
+ }
504
+ }
505
+ switch (_response.error.reason) {
506
+ case "non-json":
507
+ throw new errors.LettaError({
508
+ statusCode: _response.error.statusCode,
509
+ body: _response.error.rawBody,
510
+ });
511
+ case "timeout":
512
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/agents/{agent_id}/reset-messages.");
513
+ case "unknown":
514
+ throw new errors.LettaError({
515
+ message: _response.error.errorMessage,
516
+ });
517
+ }
518
+ });
519
+ }
448
520
  /**
449
521
  * <Note>This endpoint is only available on Letta Cloud.</Note>
450
522
  *
@@ -462,7 +534,7 @@ class Agents {
462
534
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
463
535
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/agents/search"),
464
536
  method: "POST",
465
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
537
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
466
538
  contentType: "application/json",
467
539
  requestType: "json",
468
540
  body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),