@letta-ai/letta-client 0.0.68643 → 0.0.68644

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 (124) hide show
  1. package/api/resources/agents/client/Client.d.ts +0 -14
  2. package/api/resources/agents/client/Client.js +10 -99
  3. package/api/resources/agents/client/requests/index.d.ts +0 -1
  4. package/api/resources/agents/resources/blocks/client/Client.js +5 -5
  5. package/api/resources/agents/resources/context/client/Client.js +1 -1
  6. package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  7. package/api/resources/agents/resources/files/client/Client.d.ts +7 -1
  8. package/api/resources/agents/resources/files/client/Client.js +53 -16
  9. package/api/resources/agents/resources/files/client/index.d.ts +1 -1
  10. package/api/resources/agents/resources/files/client/index.js +15 -0
  11. package/api/resources/agents/{client/requests/ListAgentFilesRequest.d.ts → resources/files/client/requests/FilesListRequest.d.ts} +1 -1
  12. package/api/resources/agents/resources/files/client/requests/index.d.ts +1 -0
  13. package/api/resources/agents/resources/files/client/requests/index.js +2 -0
  14. package/api/resources/agents/resources/folders/client/Client.js +3 -3
  15. package/api/resources/agents/resources/groups/client/Client.js +1 -1
  16. package/api/resources/agents/resources/index.d.ts +1 -0
  17. package/api/resources/agents/resources/index.js +1 -0
  18. package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  19. package/api/resources/agents/resources/messages/client/Client.js +9 -9
  20. package/api/resources/agents/resources/passages/client/Client.js +5 -5
  21. package/api/resources/agents/resources/sources/client/Client.js +3 -3
  22. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  23. package/api/resources/agents/resources/tools/client/Client.js +4 -4
  24. package/api/resources/batches/client/Client.js +4 -4
  25. package/api/resources/batches/resources/messages/client/Client.js +1 -1
  26. package/api/resources/blocks/client/Client.js +6 -6
  27. package/api/resources/blocks/resources/agents/client/Client.js +1 -1
  28. package/api/resources/clientSideAccessTokens/client/Client.js +3 -3
  29. package/api/resources/embeddingModels/client/Client.js +1 -1
  30. package/api/resources/folders/client/Client.js +9 -9
  31. package/api/resources/folders/resources/files/client/Client.js +3 -3
  32. package/api/resources/folders/resources/passages/client/Client.js +1 -1
  33. package/api/resources/groups/client/Client.js +6 -6
  34. package/api/resources/groups/resources/messages/client/Client.js +5 -5
  35. package/api/resources/health/client/Client.js +1 -1
  36. package/api/resources/identities/client/Client.js +7 -7
  37. package/api/resources/identities/resources/properties/client/Client.js +1 -1
  38. package/api/resources/jobs/client/Client.js +5 -5
  39. package/api/resources/models/client/Client.js +2 -2
  40. package/api/resources/projects/client/Client.js +1 -1
  41. package/api/resources/providers/client/Client.js +5 -5
  42. package/api/resources/runs/client/Client.js +5 -5
  43. package/api/resources/runs/resources/messages/client/Client.js +1 -1
  44. package/api/resources/runs/resources/steps/client/Client.js +1 -1
  45. package/api/resources/runs/resources/usage/client/Client.js +1 -1
  46. package/api/resources/sources/client/Client.js +10 -10
  47. package/api/resources/sources/resources/files/client/Client.js +3 -3
  48. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  49. package/api/resources/steps/client/Client.js +2 -2
  50. package/api/resources/steps/resources/feedback/client/Client.js +1 -1
  51. package/api/resources/steps/resources/metrics/client/Client.js +1 -1
  52. package/api/resources/steps/resources/trace/client/Client.js +1 -1
  53. package/api/resources/tags/client/Client.js +1 -1
  54. package/api/resources/telemetry/client/Client.js +1 -1
  55. package/api/resources/templates/client/Client.js +9 -9
  56. package/api/resources/templates/resources/agents/client/Client.js +1 -1
  57. package/api/resources/tools/client/Client.js +20 -20
  58. package/api/resources/voice/client/Client.js +1 -1
  59. package/dist/api/resources/agents/client/Client.d.ts +0 -14
  60. package/dist/api/resources/agents/client/Client.js +10 -99
  61. package/dist/api/resources/agents/client/requests/index.d.ts +0 -1
  62. package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
  63. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  64. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  65. package/dist/api/resources/agents/resources/files/client/Client.d.ts +7 -1
  66. package/dist/api/resources/agents/resources/files/client/Client.js +53 -16
  67. package/dist/api/resources/agents/resources/files/client/index.d.ts +1 -1
  68. package/dist/api/resources/agents/resources/files/client/index.js +15 -0
  69. package/dist/api/resources/agents/{client/requests/ListAgentFilesRequest.d.ts → resources/files/client/requests/FilesListRequest.d.ts} +1 -1
  70. package/dist/api/resources/agents/resources/files/client/requests/index.d.ts +1 -0
  71. package/dist/api/resources/agents/resources/files/client/requests/index.js +2 -0
  72. package/dist/api/resources/agents/resources/folders/client/Client.js +3 -3
  73. package/dist/api/resources/agents/resources/groups/client/Client.js +1 -1
  74. package/dist/api/resources/agents/resources/index.d.ts +1 -0
  75. package/dist/api/resources/agents/resources/index.js +1 -0
  76. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  77. package/dist/api/resources/agents/resources/messages/client/Client.js +9 -9
  78. package/dist/api/resources/agents/resources/passages/client/Client.js +5 -5
  79. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  80. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  81. package/dist/api/resources/agents/resources/tools/client/Client.js +4 -4
  82. package/dist/api/resources/batches/client/Client.js +4 -4
  83. package/dist/api/resources/batches/resources/messages/client/Client.js +1 -1
  84. package/dist/api/resources/blocks/client/Client.js +6 -6
  85. package/dist/api/resources/blocks/resources/agents/client/Client.js +1 -1
  86. package/dist/api/resources/clientSideAccessTokens/client/Client.js +3 -3
  87. package/dist/api/resources/embeddingModels/client/Client.js +1 -1
  88. package/dist/api/resources/folders/client/Client.js +9 -9
  89. package/dist/api/resources/folders/resources/files/client/Client.js +3 -3
  90. package/dist/api/resources/folders/resources/passages/client/Client.js +1 -1
  91. package/dist/api/resources/groups/client/Client.js +6 -6
  92. package/dist/api/resources/groups/resources/messages/client/Client.js +5 -5
  93. package/dist/api/resources/health/client/Client.js +1 -1
  94. package/dist/api/resources/identities/client/Client.js +7 -7
  95. package/dist/api/resources/identities/resources/properties/client/Client.js +1 -1
  96. package/dist/api/resources/jobs/client/Client.js +5 -5
  97. package/dist/api/resources/models/client/Client.js +2 -2
  98. package/dist/api/resources/projects/client/Client.js +1 -1
  99. package/dist/api/resources/providers/client/Client.js +5 -5
  100. package/dist/api/resources/runs/client/Client.js +5 -5
  101. package/dist/api/resources/runs/resources/messages/client/Client.js +1 -1
  102. package/dist/api/resources/runs/resources/steps/client/Client.js +1 -1
  103. package/dist/api/resources/runs/resources/usage/client/Client.js +1 -1
  104. package/dist/api/resources/sources/client/Client.js +10 -10
  105. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  106. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  107. package/dist/api/resources/steps/client/Client.js +2 -2
  108. package/dist/api/resources/steps/resources/feedback/client/Client.js +1 -1
  109. package/dist/api/resources/steps/resources/metrics/client/Client.js +1 -1
  110. package/dist/api/resources/steps/resources/trace/client/Client.js +1 -1
  111. package/dist/api/resources/tags/client/Client.js +1 -1
  112. package/dist/api/resources/telemetry/client/Client.js +1 -1
  113. package/dist/api/resources/templates/client/Client.js +9 -9
  114. package/dist/api/resources/templates/resources/agents/client/Client.js +1 -1
  115. package/dist/api/resources/tools/client/Client.js +20 -20
  116. package/dist/api/resources/voice/client/Client.js +1 -1
  117. package/dist/version.d.ts +1 -1
  118. package/dist/version.js +1 -1
  119. package/package.json +1 -1
  120. package/reference.md +24 -72
  121. package/version.d.ts +1 -1
  122. package/version.js +1 -1
  123. /package/api/resources/agents/{client/requests/ListAgentFilesRequest.js → resources/files/client/requests/FilesListRequest.js} +0 -0
  124. /package/dist/api/resources/agents/{client/requests/ListAgentFilesRequest.js → resources/files/client/requests/FilesListRequest.js} +0 -0
@@ -183,20 +183,6 @@ export declare class Agents {
183
183
  */
184
184
  modify(agentId: string, request?: Letta.UpdateAgent, requestOptions?: Agents.RequestOptions): core.HttpResponsePromise<Letta.AgentState>;
185
185
  private __modify;
186
- /**
187
- * Get the files attached to an agent with their open/closed status (paginated).
188
- *
189
- * @param {string} agentId
190
- * @param {Letta.ListAgentFilesRequest} request
191
- * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
192
- *
193
- * @throws {@link Letta.UnprocessableEntityError}
194
- *
195
- * @example
196
- * await client.agents.listAgentFiles("agent_id")
197
- */
198
- listAgentFiles(agentId: string, request?: Letta.ListAgentFilesRequest, requestOptions?: Agents.RequestOptions): core.HttpResponsePromise<Letta.PaginatedAgentFiles>;
199
- private __listAgentFiles;
200
186
  /**
201
187
  * Summarize an agent's conversation history to a target message length.
202
188
  *
@@ -206,7 +206,7 @@ class Agents {
206
206
  method: "GET",
207
207
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
208
208
  ? yield core.Supplier.get(this._options.project)
209
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "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
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
210
210
  contentType: "application/json",
211
211
  queryParameters: _queryParams,
212
212
  requestType: "json",
@@ -283,7 +283,7 @@ class Agents {
283
283
  method: "POST",
284
284
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
285
285
  ? yield core.Supplier.get(this._options.project)
286
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "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),
286
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "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),
287
287
  contentType: "application/json",
288
288
  requestType: "json",
289
289
  body: serializers.CreateAgentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -359,7 +359,7 @@ class Agents {
359
359
  method: "GET",
360
360
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
361
361
  ? yield core.Supplier.get(this._options.project)
362
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
362
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
363
363
  contentType: "application/json",
364
364
  requestType: "json",
365
365
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -448,7 +448,7 @@ class Agents {
448
448
  method: "GET",
449
449
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
450
450
  ? yield core.Supplier.get(this._options.project)
451
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "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),
451
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "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),
452
452
  contentType: "application/json",
453
453
  queryParameters: _queryParams,
454
454
  requestType: "json",
@@ -548,7 +548,7 @@ class Agents {
548
548
  method: "POST",
549
549
  headers: Object.assign(Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
550
550
  ? yield core.Supplier.get(this._options.project)
551
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-override-embedding-model": request.overrideEmbeddingModel != null ? request.overrideEmbeddingModel : undefined }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
551
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-override-embedding-model": request.overrideEmbeddingModel != null ? request.overrideEmbeddingModel : undefined }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
552
552
  requestType: "file",
553
553
  duplex: _maybeEncodedRequest.duplex,
554
554
  body: _maybeEncodedRequest.body,
@@ -636,7 +636,7 @@ class Agents {
636
636
  method: "GET",
637
637
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
638
638
  ? yield core.Supplier.get(this._options.project)
639
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
639
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "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),
640
640
  contentType: "application/json",
641
641
  queryParameters: _queryParams,
642
642
  requestType: "json",
@@ -713,7 +713,7 @@ class Agents {
713
713
  method: "DELETE",
714
714
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
715
715
  ? yield core.Supplier.get(this._options.project)
716
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "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),
716
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "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),
717
717
  contentType: "application/json",
718
718
  requestType: "json",
719
719
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -781,7 +781,7 @@ class Agents {
781
781
  method: "PATCH",
782
782
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
783
783
  ? yield core.Supplier.get(this._options.project)
784
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "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),
784
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "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),
785
785
  contentType: "application/json",
786
786
  requestType: "json",
787
787
  body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -836,95 +836,6 @@ class Agents {
836
836
  }
837
837
  });
838
838
  }
839
- /**
840
- * Get the files attached to an agent with their open/closed status (paginated).
841
- *
842
- * @param {string} agentId
843
- * @param {Letta.ListAgentFilesRequest} request
844
- * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
845
- *
846
- * @throws {@link Letta.UnprocessableEntityError}
847
- *
848
- * @example
849
- * await client.agents.listAgentFiles("agent_id")
850
- */
851
- listAgentFiles(agentId, request = {}, requestOptions) {
852
- return core.HttpResponsePromise.fromPromise(this.__listAgentFiles(agentId, request, requestOptions));
853
- }
854
- __listAgentFiles(agentId_1) {
855
- return __awaiter(this, arguments, void 0, function* (agentId, request = {}, requestOptions) {
856
- var _a, _b, _c;
857
- const { cursor, limit, isOpen } = request;
858
- const _queryParams = {};
859
- if (cursor != null) {
860
- _queryParams["cursor"] = cursor;
861
- }
862
- if (limit != null) {
863
- _queryParams["limit"] = limit.toString();
864
- }
865
- if (isOpen != null) {
866
- _queryParams["is_open"] = isOpen.toString();
867
- }
868
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
869
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/files`),
870
- method: "GET",
871
- headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
872
- ? yield core.Supplier.get(this._options.project)
873
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "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),
874
- contentType: "application/json",
875
- queryParameters: _queryParams,
876
- requestType: "json",
877
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
878
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
879
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
880
- });
881
- if (_response.ok) {
882
- return {
883
- data: serializers.PaginatedAgentFiles.parseOrThrow(_response.body, {
884
- unrecognizedObjectKeys: "passthrough",
885
- allowUnrecognizedUnionMembers: true,
886
- allowUnrecognizedEnumValues: true,
887
- skipValidation: true,
888
- breadcrumbsPrefix: ["response"],
889
- }),
890
- rawResponse: _response.rawResponse,
891
- };
892
- }
893
- if (_response.error.reason === "status-code") {
894
- switch (_response.error.statusCode) {
895
- case 422:
896
- throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
897
- unrecognizedObjectKeys: "passthrough",
898
- allowUnrecognizedUnionMembers: true,
899
- allowUnrecognizedEnumValues: true,
900
- skipValidation: true,
901
- breadcrumbsPrefix: ["response"],
902
- }), _response.rawResponse);
903
- default:
904
- throw new errors.LettaError({
905
- statusCode: _response.error.statusCode,
906
- body: _response.error.body,
907
- rawResponse: _response.rawResponse,
908
- });
909
- }
910
- }
911
- switch (_response.error.reason) {
912
- case "non-json":
913
- throw new errors.LettaError({
914
- statusCode: _response.error.statusCode,
915
- body: _response.error.rawBody,
916
- rawResponse: _response.rawResponse,
917
- });
918
- case "timeout":
919
- throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/files.");
920
- case "unknown":
921
- throw new errors.LettaError({
922
- message: _response.error.errorMessage,
923
- rawResponse: _response.rawResponse,
924
- });
925
- }
926
- });
927
- }
928
839
  /**
929
840
  * Summarize an agent's conversation history to a target message length.
930
841
  *
@@ -956,7 +867,7 @@ class Agents {
956
867
  method: "POST",
957
868
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
958
869
  ? yield core.Supplier.get(this._options.project)
959
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "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),
870
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "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),
960
871
  contentType: "application/json",
961
872
  queryParameters: _queryParams,
962
873
  requestType: "json",
@@ -1024,7 +935,7 @@ class Agents {
1024
935
  method: "POST",
1025
936
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
1026
937
  ? yield core.Supplier.get(this._options.project)
1027
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "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),
938
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "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),
1028
939
  contentType: "application/json",
1029
940
  requestType: "json",
1030
941
  body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -4,6 +4,5 @@ export { type AgentsExportFileRequest } from "./AgentsExportFileRequest";
4
4
  export { type BodyImportAgentSerialized } from "./BodyImportAgentSerialized";
5
5
  export { type AgentsRetrieveRequest } from "./AgentsRetrieveRequest";
6
6
  export { type UpdateAgent } from "./UpdateAgent";
7
- export { type ListAgentFilesRequest } from "./ListAgentFilesRequest";
8
7
  export { type SummarizeAgentConversationRequest } from "./SummarizeAgentConversationRequest";
9
8
  export { type AgentsSearchRequest } from "./AgentsSearchRequest";
@@ -82,7 +82,7 @@ class Blocks {
82
82
  method: "GET",
83
83
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
84
84
  ? yield core.Supplier.get(this._options.project)
85
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "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),
85
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "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),
86
86
  contentType: "application/json",
87
87
  requestType: "json",
88
88
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -160,7 +160,7 @@ class Blocks {
160
160
  method: "PATCH",
161
161
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
162
162
  ? yield core.Supplier.get(this._options.project)
163
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "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),
163
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "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),
164
164
  contentType: "application/json",
165
165
  requestType: "json",
166
166
  body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -237,7 +237,7 @@ class Blocks {
237
237
  method: "GET",
238
238
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
239
239
  ? yield core.Supplier.get(this._options.project)
240
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "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),
240
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "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),
241
241
  contentType: "application/json",
242
242
  requestType: "json",
243
243
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -314,7 +314,7 @@ class Blocks {
314
314
  method: "PATCH",
315
315
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
316
316
  ? yield core.Supplier.get(this._options.project)
317
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
317
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
318
318
  contentType: "application/json",
319
319
  requestType: "json",
320
320
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -391,7 +391,7 @@ class Blocks {
391
391
  method: "PATCH",
392
392
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
393
393
  ? yield core.Supplier.get(this._options.project)
394
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "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),
394
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "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),
395
395
  contentType: "application/json",
396
396
  requestType: "json",
397
397
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -81,7 +81,7 @@ class Context {
81
81
  method: "GET",
82
82
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
83
83
  ? yield core.Supplier.get(this._options.project)
84
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "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),
84
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "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),
85
85
  contentType: "application/json",
86
86
  requestType: "json",
87
87
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -82,7 +82,7 @@ class CoreMemory {
82
82
  method: "GET",
83
83
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
84
84
  ? yield core.Supplier.get(this._options.project)
85
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "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),
85
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "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),
86
86
  contentType: "application/json",
87
87
  requestType: "json",
88
88
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as environments from "../../../../../../environments";
5
5
  import * as core from "../../../../../../core";
6
+ import * as Letta from "../../../../../index";
6
7
  export declare namespace Files {
7
8
  interface Options {
8
9
  environment?: core.Supplier<environments.LettaEnvironment | string>;
@@ -81,13 +82,18 @@ export declare class Files {
81
82
  close(agentId: string, fileId: string, requestOptions?: Files.RequestOptions): core.HttpResponsePromise<unknown>;
82
83
  private __close;
83
84
  /**
85
+ * Get the files attached to an agent with their open/closed status (paginated).
86
+ *
84
87
  * @param {string} agentId
88
+ * @param {Letta.agents.FilesListRequest} request
85
89
  * @param {Files.RequestOptions} requestOptions - Request-specific configuration.
86
90
  *
91
+ * @throws {@link Letta.UnprocessableEntityError}
92
+ *
87
93
  * @example
88
94
  * await client.agents.files.list("agent_id")
89
95
  */
90
- list(agentId: string, requestOptions?: Files.RequestOptions): core.HttpResponsePromise<void>;
96
+ list(agentId: string, request?: Letta.agents.FilesListRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise<Letta.PaginatedAgentFiles>;
91
97
  private __list;
92
98
  protected _getCustomAuthorizationHeaders(): Promise<{
93
99
  Authorization: string;
@@ -84,7 +84,7 @@ class Files {
84
84
  method: "PATCH",
85
85
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
86
86
  ? yield core.Supplier.get(this._options.project)
87
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "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),
87
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "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),
88
88
  contentType: "application/json",
89
89
  requestType: "json",
90
90
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -165,7 +165,7 @@ class Files {
165
165
  method: "PATCH",
166
166
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
167
167
  ? yield core.Supplier.get(this._options.project)
168
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "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),
168
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "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),
169
169
  contentType: "application/json",
170
170
  requestType: "json",
171
171
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -245,7 +245,7 @@ class Files {
245
245
  method: "PATCH",
246
246
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
247
247
  ? yield core.Supplier.get(this._options.project)
248
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "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),
248
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "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),
249
249
  contentType: "application/json",
250
250
  requestType: "json",
251
251
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -291,39 +291,76 @@ class Files {
291
291
  });
292
292
  }
293
293
  /**
294
+ * Get the files attached to an agent with their open/closed status (paginated).
295
+ *
294
296
  * @param {string} agentId
297
+ * @param {Letta.agents.FilesListRequest} request
295
298
  * @param {Files.RequestOptions} requestOptions - Request-specific configuration.
296
299
  *
300
+ * @throws {@link Letta.UnprocessableEntityError}
301
+ *
297
302
  * @example
298
303
  * await client.agents.files.list("agent_id")
299
304
  */
300
- list(agentId, requestOptions) {
301
- return core.HttpResponsePromise.fromPromise(this.__list(agentId, requestOptions));
305
+ list(agentId, request = {}, requestOptions) {
306
+ return core.HttpResponsePromise.fromPromise(this.__list(agentId, request, requestOptions));
302
307
  }
303
- __list(agentId, requestOptions) {
304
- return __awaiter(this, void 0, void 0, function* () {
308
+ __list(agentId_1) {
309
+ return __awaiter(this, arguments, void 0, function* (agentId, request = {}, requestOptions) {
305
310
  var _a, _b, _c;
311
+ const { cursor, limit, isOpen } = request;
312
+ const _queryParams = {};
313
+ if (cursor != null) {
314
+ _queryParams["cursor"] = cursor;
315
+ }
316
+ if (limit != null) {
317
+ _queryParams["limit"] = limit.toString();
318
+ }
319
+ if (isOpen != null) {
320
+ _queryParams["is_open"] = isOpen.toString();
321
+ }
306
322
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
307
323
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/files`),
308
- method: "PATCH",
324
+ method: "GET",
309
325
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
310
326
  ? yield core.Supplier.get(this._options.project)
311
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "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),
327
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "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),
312
328
  contentType: "application/json",
329
+ queryParameters: _queryParams,
313
330
  requestType: "json",
314
331
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
315
332
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
316
333
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
317
334
  });
318
335
  if (_response.ok) {
319
- return { data: undefined, rawResponse: _response.rawResponse };
336
+ return {
337
+ data: serializers.PaginatedAgentFiles.parseOrThrow(_response.body, {
338
+ unrecognizedObjectKeys: "passthrough",
339
+ allowUnrecognizedUnionMembers: true,
340
+ allowUnrecognizedEnumValues: true,
341
+ skipValidation: true,
342
+ breadcrumbsPrefix: ["response"],
343
+ }),
344
+ rawResponse: _response.rawResponse,
345
+ };
320
346
  }
321
347
  if (_response.error.reason === "status-code") {
322
- throw new errors.LettaError({
323
- statusCode: _response.error.statusCode,
324
- body: _response.error.body,
325
- rawResponse: _response.rawResponse,
326
- });
348
+ switch (_response.error.statusCode) {
349
+ case 422:
350
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
351
+ unrecognizedObjectKeys: "passthrough",
352
+ allowUnrecognizedUnionMembers: true,
353
+ allowUnrecognizedEnumValues: true,
354
+ skipValidation: true,
355
+ breadcrumbsPrefix: ["response"],
356
+ }), _response.rawResponse);
357
+ default:
358
+ throw new errors.LettaError({
359
+ statusCode: _response.error.statusCode,
360
+ body: _response.error.body,
361
+ rawResponse: _response.rawResponse,
362
+ });
363
+ }
327
364
  }
328
365
  switch (_response.error.reason) {
329
366
  case "non-json":
@@ -333,7 +370,7 @@ class Files {
333
370
  rawResponse: _response.rawResponse,
334
371
  });
335
372
  case "timeout":
336
- throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/agents/{agent_id}/files.");
373
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/files.");
337
374
  case "unknown":
338
375
  throw new errors.LettaError({
339
376
  message: _response.error.errorMessage,
@@ -1 +1 @@
1
- export {};
1
+ export * from "./requests";
@@ -1,2 +1,17 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests"), exports);
@@ -5,7 +5,7 @@
5
5
  * @example
6
6
  * {}
7
7
  */
8
- export interface ListAgentFilesRequest {
8
+ export interface FilesListRequest {
9
9
  /**
10
10
  * Pagination cursor from previous response
11
11
  */
@@ -0,0 +1 @@
1
+ export { type FilesListRequest } from "./FilesListRequest";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -82,7 +82,7 @@ class Folders {
82
82
  method: "PATCH",
83
83
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
84
84
  ? yield core.Supplier.get(this._options.project)
85
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "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),
85
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "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),
86
86
  contentType: "application/json",
87
87
  requestType: "json",
88
88
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -159,7 +159,7 @@ class Folders {
159
159
  method: "PATCH",
160
160
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
161
161
  ? yield core.Supplier.get(this._options.project)
162
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "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),
162
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "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),
163
163
  contentType: "application/json",
164
164
  requestType: "json",
165
165
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -235,7 +235,7 @@ class Folders {
235
235
  method: "GET",
236
236
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
237
237
  ? yield core.Supplier.get(this._options.project)
238
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "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),
238
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "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),
239
239
  contentType: "application/json",
240
240
  requestType: "json",
241
241
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -87,7 +87,7 @@ class Groups {
87
87
  method: "GET",
88
88
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
89
89
  ? yield core.Supplier.get(this._options.project)
90
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "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),
90
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
91
91
  contentType: "application/json",
92
92
  queryParameters: _queryParams,
93
93
  requestType: "json",
@@ -15,6 +15,7 @@ export * as coreMemory from "./coreMemory";
15
15
  export * as blocks from "./blocks";
16
16
  export * as groups from "./groups";
17
17
  export * from "./tools/client/requests";
18
+ export * from "./files/client/requests";
18
19
  export * from "./passages/client/requests";
19
20
  export * from "./messages/client/requests";
20
21
  export * from "./groups/client/requests";
@@ -54,6 +54,7 @@ exports.coreMemory = __importStar(require("./coreMemory"));
54
54
  exports.blocks = __importStar(require("./blocks"));
55
55
  exports.groups = __importStar(require("./groups"));
56
56
  __exportStar(require("./tools/client/requests"), exports);
57
+ __exportStar(require("./files/client/requests"), exports);
57
58
  __exportStar(require("./passages/client/requests"), exports);
58
59
  __exportStar(require("./messages/client/requests"), exports);
59
60
  __exportStar(require("./groups/client/requests"), exports);
@@ -83,7 +83,7 @@ class MemoryVariables {
83
83
  method: "GET",
84
84
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
85
85
  ? yield core.Supplier.get(this._options.project)
86
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68643", "User-Agent": "@letta-ai/letta-client/0.0.68643", "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),
86
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68644", "User-Agent": "@letta-ai/letta-client/0.0.68644", "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),
87
87
  contentType: "application/json",
88
88
  requestType: "json",
89
89
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,