@letta-ai/letta-client 0.1.196 → 0.1.197
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.
- package/api/resources/agents/client/Client.d.ts +17 -0
- package/api/resources/agents/client/Client.js +95 -11
- package/api/resources/agents/client/requests/ModifyApprovalRequest.d.ts +12 -0
- package/api/resources/agents/client/requests/ModifyApprovalRequest.js +5 -0
- package/api/resources/agents/client/requests/index.d.ts +1 -0
- package/api/resources/agents/resources/blocks/client/Client.js +5 -5
- package/api/resources/agents/resources/context/client/Client.js +1 -1
- package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
- package/api/resources/agents/resources/files/client/Client.js +4 -4
- package/api/resources/agents/resources/folders/client/Client.js +3 -3
- package/api/resources/agents/resources/groups/client/Client.js +1 -1
- package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
- package/api/resources/agents/resources/messages/client/Client.js +8 -8
- package/api/resources/agents/resources/passages/client/Client.js +4 -4
- package/api/resources/agents/resources/sources/client/Client.js +3 -3
- package/api/resources/agents/resources/templates/client/Client.js +3 -3
- package/api/resources/agents/resources/tools/client/Client.d.ts +10 -0
- package/api/resources/agents/resources/tools/client/Client.js +56 -3
- package/api/resources/batches/client/Client.js +4 -4
- package/api/resources/blocks/client/Client.js +6 -6
- package/api/resources/blocks/resources/agents/client/Client.js +1 -1
- package/api/resources/clientSideAccessTokens/client/Client.js +3 -3
- package/api/resources/embeddingModels/client/Client.js +1 -1
- package/api/resources/folders/client/Client.js +9 -9
- package/api/resources/folders/resources/files/client/Client.js +3 -3
- package/api/resources/folders/resources/passages/client/Client.js +1 -1
- package/api/resources/groups/client/Client.js +6 -6
- package/api/resources/groups/resources/messages/client/Client.js +5 -5
- package/api/resources/health/client/Client.js +1 -1
- package/api/resources/identities/client/Client.js +7 -7
- package/api/resources/identities/resources/properties/client/Client.js +1 -1
- package/api/resources/jobs/client/Client.js +5 -5
- package/api/resources/messages/client/Client.js +1 -1
- package/api/resources/models/client/Client.js +2 -2
- package/api/resources/projects/client/Client.js +1 -1
- package/api/resources/providers/client/Client.js +6 -6
- package/api/resources/runs/client/Client.js +5 -5
- package/api/resources/runs/resources/messages/client/Client.js +1 -1
- package/api/resources/runs/resources/steps/client/Client.js +1 -1
- package/api/resources/runs/resources/usage/client/Client.js +1 -1
- package/api/resources/sources/client/Client.js +10 -10
- package/api/resources/sources/resources/files/client/Client.js +3 -3
- package/api/resources/sources/resources/passages/client/Client.js +1 -1
- package/api/resources/steps/client/Client.js +3 -3
- package/api/resources/steps/resources/feedback/client/Client.js +1 -1
- package/api/resources/tags/client/Client.js +1 -1
- package/api/resources/telemetry/client/Client.js +1 -1
- package/api/resources/templates/client/Client.js +8 -8
- package/api/resources/templates/resources/agents/client/Client.js +1 -1
- package/api/resources/tools/client/Client.js +20 -20
- package/api/resources/voice/client/Client.js +1 -1
- package/api/types/MessageType.d.ts +3 -1
- package/api/types/MessageType.js +2 -0
- package/dist/api/resources/agents/client/Client.d.ts +17 -0
- package/dist/api/resources/agents/client/Client.js +95 -11
- package/dist/api/resources/agents/client/requests/ModifyApprovalRequest.d.ts +12 -0
- package/dist/api/resources/agents/client/requests/ModifyApprovalRequest.js +5 -0
- package/dist/api/resources/agents/client/requests/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
- package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/files/client/Client.js +4 -4
- package/dist/api/resources/agents/resources/folders/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/groups/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/messages/client/Client.js +8 -8
- package/dist/api/resources/agents/resources/passages/client/Client.js +4 -4
- package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/tools/client/Client.d.ts +10 -0
- package/dist/api/resources/agents/resources/tools/client/Client.js +56 -3
- package/dist/api/resources/batches/client/Client.js +4 -4
- package/dist/api/resources/blocks/client/Client.js +6 -6
- package/dist/api/resources/blocks/resources/agents/client/Client.js +1 -1
- package/dist/api/resources/clientSideAccessTokens/client/Client.js +3 -3
- package/dist/api/resources/embeddingModels/client/Client.js +1 -1
- package/dist/api/resources/folders/client/Client.js +9 -9
- package/dist/api/resources/folders/resources/files/client/Client.js +3 -3
- package/dist/api/resources/folders/resources/passages/client/Client.js +1 -1
- package/dist/api/resources/groups/client/Client.js +6 -6
- package/dist/api/resources/groups/resources/messages/client/Client.js +5 -5
- package/dist/api/resources/health/client/Client.js +1 -1
- package/dist/api/resources/identities/client/Client.js +7 -7
- package/dist/api/resources/identities/resources/properties/client/Client.js +1 -1
- package/dist/api/resources/jobs/client/Client.js +5 -5
- package/dist/api/resources/messages/client/Client.js +1 -1
- package/dist/api/resources/models/client/Client.js +2 -2
- package/dist/api/resources/projects/client/Client.js +1 -1
- package/dist/api/resources/providers/client/Client.js +6 -6
- package/dist/api/resources/runs/client/Client.js +5 -5
- package/dist/api/resources/runs/resources/messages/client/Client.js +1 -1
- package/dist/api/resources/runs/resources/steps/client/Client.js +1 -1
- package/dist/api/resources/runs/resources/usage/client/Client.js +1 -1
- package/dist/api/resources/sources/client/Client.js +10 -10
- package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
- package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
- package/dist/api/resources/steps/client/Client.js +3 -3
- package/dist/api/resources/steps/resources/feedback/client/Client.js +1 -1
- package/dist/api/resources/tags/client/Client.js +1 -1
- package/dist/api/resources/telemetry/client/Client.js +1 -1
- package/dist/api/resources/templates/client/Client.js +8 -8
- package/dist/api/resources/templates/resources/agents/client/Client.js +1 -1
- package/dist/api/resources/tools/client/Client.js +20 -20
- package/dist/api/resources/voice/client/Client.js +1 -1
- package/dist/api/types/MessageType.d.ts +3 -1
- package/dist/api/types/MessageType.js +2 -0
- package/dist/serialization/types/MessageType.d.ts +1 -1
- package/dist/serialization/types/MessageType.js +2 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +137 -0
- package/serialization/types/MessageType.d.ts +1 -1
- package/serialization/types/MessageType.js +2 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -112,7 +112,7 @@ class Templates {
|
|
|
112
112
|
method: "GET",
|
|
113
113
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
114
114
|
? yield core.Supplier.get(this._options.project)
|
|
115
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
115
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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),
|
|
116
116
|
contentType: "application/json",
|
|
117
117
|
queryParameters: _queryParams,
|
|
118
118
|
requestType: "json",
|
|
@@ -180,7 +180,7 @@ class Templates {
|
|
|
180
180
|
method: "POST",
|
|
181
181
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
182
182
|
? yield core.Supplier.get(this._options.project)
|
|
183
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
183
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
184
184
|
contentType: "application/json",
|
|
185
185
|
requestType: "json",
|
|
186
186
|
body: serializers.TemplatesSaveTemplateVersionRequest.jsonOrThrow(request, {
|
|
@@ -255,7 +255,7 @@ class Templates {
|
|
|
255
255
|
method: "DELETE",
|
|
256
256
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
257
257
|
? yield core.Supplier.get(this._options.project)
|
|
258
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
258
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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),
|
|
259
259
|
contentType: "application/json",
|
|
260
260
|
requestType: "json",
|
|
261
261
|
body: serializers.TemplatesDeleteTemplateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -325,7 +325,7 @@ class Templates {
|
|
|
325
325
|
method: "GET",
|
|
326
326
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
327
327
|
? yield core.Supplier.get(this._options.project)
|
|
328
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
328
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
329
329
|
contentType: "application/json",
|
|
330
330
|
requestType: "json",
|
|
331
331
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -392,7 +392,7 @@ class Templates {
|
|
|
392
392
|
method: "POST",
|
|
393
393
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
394
394
|
? yield core.Supplier.get(this._options.project)
|
|
395
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
395
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
396
396
|
contentType: "application/json",
|
|
397
397
|
requestType: "json",
|
|
398
398
|
body: serializers.TemplatesForkTemplateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -466,7 +466,7 @@ class Templates {
|
|
|
466
466
|
method: "POST",
|
|
467
467
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
468
468
|
? yield core.Supplier.get(this._options.project)
|
|
469
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
469
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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: Object.assign(Object.assign({}, serializers.TemplatesCreateTemplateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" })), { type: "agent" }),
|
|
@@ -543,7 +543,7 @@ class Templates {
|
|
|
543
543
|
method: "PATCH",
|
|
544
544
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
545
545
|
? yield core.Supplier.get(this._options.project)
|
|
546
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
546
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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),
|
|
547
547
|
contentType: "application/json",
|
|
548
548
|
requestType: "json",
|
|
549
549
|
body: serializers.TemplatesRenameTemplateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -634,7 +634,7 @@ class Templates {
|
|
|
634
634
|
method: "GET",
|
|
635
635
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
636
636
|
? yield core.Supplier.get(this._options.project)
|
|
637
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
637
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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),
|
|
638
638
|
contentType: "application/json",
|
|
639
639
|
queryParameters: _queryParams,
|
|
640
640
|
requestType: "json",
|
|
@@ -83,7 +83,7 @@ class Agents {
|
|
|
83
83
|
method: "POST",
|
|
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.1.
|
|
86
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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
|
body: serializers.templates.AgentsCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -81,7 +81,7 @@ class Tools {
|
|
|
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.1.
|
|
84
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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,
|
|
@@ -157,7 +157,7 @@ class Tools {
|
|
|
157
157
|
method: "DELETE",
|
|
158
158
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
159
159
|
? yield core.Supplier.get(this._options.project)
|
|
160
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
160
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
161
161
|
contentType: "application/json",
|
|
162
162
|
requestType: "json",
|
|
163
163
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -225,7 +225,7 @@ class Tools {
|
|
|
225
225
|
method: "PATCH",
|
|
226
226
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
227
227
|
? yield core.Supplier.get(this._options.project)
|
|
228
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
228
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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),
|
|
229
229
|
contentType: "application/json",
|
|
230
230
|
requestType: "json",
|
|
231
231
|
body: serializers.ToolUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -307,7 +307,7 @@ class Tools {
|
|
|
307
307
|
method: "GET",
|
|
308
308
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
309
309
|
? yield core.Supplier.get(this._options.project)
|
|
310
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
310
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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),
|
|
311
311
|
contentType: "application/json",
|
|
312
312
|
queryParameters: _queryParams,
|
|
313
313
|
requestType: "json",
|
|
@@ -395,7 +395,7 @@ class Tools {
|
|
|
395
395
|
method: "GET",
|
|
396
396
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
397
397
|
? yield core.Supplier.get(this._options.project)
|
|
398
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
398
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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
399
|
contentType: "application/json",
|
|
400
400
|
queryParameters: _queryParams,
|
|
401
401
|
requestType: "json",
|
|
@@ -474,7 +474,7 @@ class Tools {
|
|
|
474
474
|
method: "POST",
|
|
475
475
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
476
476
|
? yield core.Supplier.get(this._options.project)
|
|
477
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
477
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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),
|
|
478
478
|
contentType: "application/json",
|
|
479
479
|
requestType: "json",
|
|
480
480
|
body: serializers.ToolCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -553,7 +553,7 @@ class Tools {
|
|
|
553
553
|
method: "PUT",
|
|
554
554
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
555
555
|
? yield core.Supplier.get(this._options.project)
|
|
556
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
556
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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),
|
|
557
557
|
contentType: "application/json",
|
|
558
558
|
requestType: "json",
|
|
559
559
|
body: serializers.ToolCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -629,7 +629,7 @@ class Tools {
|
|
|
629
629
|
method: "POST",
|
|
630
630
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
631
631
|
? yield core.Supplier.get(this._options.project)
|
|
632
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
632
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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),
|
|
633
633
|
contentType: "application/json",
|
|
634
634
|
requestType: "json",
|
|
635
635
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -710,7 +710,7 @@ class Tools {
|
|
|
710
710
|
method: "POST",
|
|
711
711
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
712
712
|
? yield core.Supplier.get(this._options.project)
|
|
713
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
713
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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),
|
|
714
714
|
contentType: "application/json",
|
|
715
715
|
requestType: "json",
|
|
716
716
|
body: serializers.ToolRunFromSource.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -788,7 +788,7 @@ class Tools {
|
|
|
788
788
|
method: "GET",
|
|
789
789
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
790
790
|
? yield core.Supplier.get(this._options.project)
|
|
791
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
791
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
792
792
|
contentType: "application/json",
|
|
793
793
|
requestType: "json",
|
|
794
794
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -864,7 +864,7 @@ class Tools {
|
|
|
864
864
|
method: "GET",
|
|
865
865
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
866
866
|
? yield core.Supplier.get(this._options.project)
|
|
867
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
867
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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),
|
|
868
868
|
contentType: "application/json",
|
|
869
869
|
requestType: "json",
|
|
870
870
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -940,7 +940,7 @@ class Tools {
|
|
|
940
940
|
method: "POST",
|
|
941
941
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
942
942
|
? yield core.Supplier.get(this._options.project)
|
|
943
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
943
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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),
|
|
944
944
|
contentType: "application/json",
|
|
945
945
|
requestType: "json",
|
|
946
946
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1017,7 +1017,7 @@ class Tools {
|
|
|
1017
1017
|
method: "GET",
|
|
1018
1018
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
1019
1019
|
? yield core.Supplier.get(this._options.project)
|
|
1020
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
1020
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1021
1021
|
contentType: "application/json",
|
|
1022
1022
|
requestType: "json",
|
|
1023
1023
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1097,7 +1097,7 @@ class Tools {
|
|
|
1097
1097
|
method: "PUT",
|
|
1098
1098
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
1099
1099
|
? yield core.Supplier.get(this._options.project)
|
|
1100
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
1100
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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),
|
|
1101
1101
|
contentType: "application/json",
|
|
1102
1102
|
requestType: "json",
|
|
1103
1103
|
body: serializers.AddMcpServerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -1174,7 +1174,7 @@ class Tools {
|
|
|
1174
1174
|
method: "GET",
|
|
1175
1175
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
1176
1176
|
? yield core.Supplier.get(this._options.project)
|
|
1177
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
1177
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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),
|
|
1178
1178
|
contentType: "application/json",
|
|
1179
1179
|
requestType: "json",
|
|
1180
1180
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1251,7 +1251,7 @@ class Tools {
|
|
|
1251
1251
|
method: "POST",
|
|
1252
1252
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
1253
1253
|
? yield core.Supplier.get(this._options.project)
|
|
1254
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
1254
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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),
|
|
1255
1255
|
contentType: "application/json",
|
|
1256
1256
|
requestType: "json",
|
|
1257
1257
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1327,7 +1327,7 @@ class Tools {
|
|
|
1327
1327
|
method: "DELETE",
|
|
1328
1328
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
1329
1329
|
? yield core.Supplier.get(this._options.project)
|
|
1330
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
1330
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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),
|
|
1331
1331
|
contentType: "application/json",
|
|
1332
1332
|
requestType: "json",
|
|
1333
1333
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1404,7 +1404,7 @@ class Tools {
|
|
|
1404
1404
|
method: "PATCH",
|
|
1405
1405
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
1406
1406
|
? yield core.Supplier.get(this._options.project)
|
|
1407
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
1407
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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),
|
|
1408
1408
|
contentType: "application/json",
|
|
1409
1409
|
requestType: "json",
|
|
1410
1410
|
body: serializers.UpdateMcpServerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -1486,7 +1486,7 @@ class Tools {
|
|
|
1486
1486
|
method: "POST",
|
|
1487
1487
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
1488
1488
|
? yield core.Supplier.get(this._options.project)
|
|
1489
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
1489
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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),
|
|
1490
1490
|
contentType: "application/json",
|
|
1491
1491
|
requestType: "json",
|
|
1492
1492
|
body: serializers.TestMcpServerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -1547,7 +1547,7 @@ class Tools {
|
|
|
1547
1547
|
method: "POST",
|
|
1548
1548
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
1549
1549
|
? yield core.Supplier.get(this._options.project)
|
|
1550
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
1550
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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),
|
|
1551
1551
|
contentType: "application/json",
|
|
1552
1552
|
requestType: "json",
|
|
1553
1553
|
body: serializers.ConnectMcpServerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -85,7 +85,7 @@ class Voice {
|
|
|
85
85
|
method: "POST",
|
|
86
86
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
87
87
|
? yield core.Supplier.get(this._options.project)
|
|
88
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
88
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
89
89
|
contentType: "application/json",
|
|
90
90
|
requestType: "json",
|
|
91
91
|
body: serializers.voice.createVoiceChatCompletions.Request.jsonOrThrow(_body, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type MessageType = "system_message" | "user_message" | "assistant_message" | "reasoning_message" | "hidden_reasoning_message" | "tool_call_message" | "tool_return_message";
|
|
4
|
+
export type MessageType = "system_message" | "user_message" | "assistant_message" | "reasoning_message" | "hidden_reasoning_message" | "tool_call_message" | "tool_return_message" | "approval_request_message" | "approval_response_message";
|
|
5
5
|
export declare const MessageType: {
|
|
6
6
|
readonly SystemMessage: "system_message";
|
|
7
7
|
readonly UserMessage: "user_message";
|
|
@@ -10,4 +10,6 @@ export declare const MessageType: {
|
|
|
10
10
|
readonly HiddenReasoningMessage: "hidden_reasoning_message";
|
|
11
11
|
readonly ToolCallMessage: "tool_call_message";
|
|
12
12
|
readonly ToolReturnMessage: "tool_return_message";
|
|
13
|
+
readonly ApprovalRequestMessage: "approval_request_message";
|
|
14
|
+
readonly ApprovalResponseMessage: "approval_response_message";
|
|
13
15
|
};
|
package/api/types/MessageType.js
CHANGED
|
@@ -12,4 +12,6 @@ exports.MessageType = {
|
|
|
12
12
|
HiddenReasoningMessage: "hidden_reasoning_message",
|
|
13
13
|
ToolCallMessage: "tool_call_message",
|
|
14
14
|
ToolReturnMessage: "tool_return_message",
|
|
15
|
+
ApprovalRequestMessage: "approval_request_message",
|
|
16
|
+
ApprovalResponseMessage: "approval_response_message",
|
|
15
17
|
};
|
|
@@ -183,6 +183,23 @@ 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
|
+
* Attach a tool to an agent.
|
|
188
|
+
*
|
|
189
|
+
* @param {string} agentId
|
|
190
|
+
* @param {string} toolName
|
|
191
|
+
* @param {Letta.ModifyApprovalRequest} request
|
|
192
|
+
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
193
|
+
*
|
|
194
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
195
|
+
*
|
|
196
|
+
* @example
|
|
197
|
+
* await client.agents.modifyApproval("agent_id", "tool_name", {
|
|
198
|
+
* requiresApproval: true
|
|
199
|
+
* })
|
|
200
|
+
*/
|
|
201
|
+
modifyApproval(agentId: string, toolName: string, request: Letta.ModifyApprovalRequest, requestOptions?: Agents.RequestOptions): core.HttpResponsePromise<Letta.AgentState>;
|
|
202
|
+
private __modifyApproval;
|
|
186
203
|
/**
|
|
187
204
|
* Get the files attached to an agent with their open/closed status (paginated).
|
|
188
205
|
*
|
|
@@ -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.1.
|
|
209
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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.1.
|
|
286
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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.1.
|
|
362
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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.1.
|
|
451
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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.1.
|
|
551
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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.1.
|
|
639
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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.1.
|
|
716
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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.1.
|
|
784
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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,6 +836,90 @@ class Agents {
|
|
|
836
836
|
}
|
|
837
837
|
});
|
|
838
838
|
}
|
|
839
|
+
/**
|
|
840
|
+
* Attach a tool to an agent.
|
|
841
|
+
*
|
|
842
|
+
* @param {string} agentId
|
|
843
|
+
* @param {string} toolName
|
|
844
|
+
* @param {Letta.ModifyApprovalRequest} request
|
|
845
|
+
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
846
|
+
*
|
|
847
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
848
|
+
*
|
|
849
|
+
* @example
|
|
850
|
+
* await client.agents.modifyApproval("agent_id", "tool_name", {
|
|
851
|
+
* requiresApproval: true
|
|
852
|
+
* })
|
|
853
|
+
*/
|
|
854
|
+
modifyApproval(agentId, toolName, request, requestOptions) {
|
|
855
|
+
return core.HttpResponsePromise.fromPromise(this.__modifyApproval(agentId, toolName, request, requestOptions));
|
|
856
|
+
}
|
|
857
|
+
__modifyApproval(agentId, toolName, request, requestOptions) {
|
|
858
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
859
|
+
var _a, _b, _c;
|
|
860
|
+
const { requiresApproval } = request;
|
|
861
|
+
const _queryParams = {};
|
|
862
|
+
_queryParams["requires_approval"] = requiresApproval.toString();
|
|
863
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
864
|
+
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)}/tools/approval/${encodeURIComponent(toolName)}`),
|
|
865
|
+
method: "PATCH",
|
|
866
|
+
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
867
|
+
? yield core.Supplier.get(this._options.project)
|
|
868
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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),
|
|
869
|
+
contentType: "application/json",
|
|
870
|
+
queryParameters: _queryParams,
|
|
871
|
+
requestType: "json",
|
|
872
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
873
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
874
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
875
|
+
});
|
|
876
|
+
if (_response.ok) {
|
|
877
|
+
return {
|
|
878
|
+
data: serializers.AgentState.parseOrThrow(_response.body, {
|
|
879
|
+
unrecognizedObjectKeys: "passthrough",
|
|
880
|
+
allowUnrecognizedUnionMembers: true,
|
|
881
|
+
allowUnrecognizedEnumValues: true,
|
|
882
|
+
skipValidation: true,
|
|
883
|
+
breadcrumbsPrefix: ["response"],
|
|
884
|
+
}),
|
|
885
|
+
rawResponse: _response.rawResponse,
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
if (_response.error.reason === "status-code") {
|
|
889
|
+
switch (_response.error.statusCode) {
|
|
890
|
+
case 422:
|
|
891
|
+
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
892
|
+
unrecognizedObjectKeys: "passthrough",
|
|
893
|
+
allowUnrecognizedUnionMembers: true,
|
|
894
|
+
allowUnrecognizedEnumValues: true,
|
|
895
|
+
skipValidation: true,
|
|
896
|
+
breadcrumbsPrefix: ["response"],
|
|
897
|
+
}), _response.rawResponse);
|
|
898
|
+
default:
|
|
899
|
+
throw new errors.LettaError({
|
|
900
|
+
statusCode: _response.error.statusCode,
|
|
901
|
+
body: _response.error.body,
|
|
902
|
+
rawResponse: _response.rawResponse,
|
|
903
|
+
});
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
switch (_response.error.reason) {
|
|
907
|
+
case "non-json":
|
|
908
|
+
throw new errors.LettaError({
|
|
909
|
+
statusCode: _response.error.statusCode,
|
|
910
|
+
body: _response.error.rawBody,
|
|
911
|
+
rawResponse: _response.rawResponse,
|
|
912
|
+
});
|
|
913
|
+
case "timeout":
|
|
914
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/agents/{agent_id}/tools/approval/{tool_name}.");
|
|
915
|
+
case "unknown":
|
|
916
|
+
throw new errors.LettaError({
|
|
917
|
+
message: _response.error.errorMessage,
|
|
918
|
+
rawResponse: _response.rawResponse,
|
|
919
|
+
});
|
|
920
|
+
}
|
|
921
|
+
});
|
|
922
|
+
}
|
|
839
923
|
/**
|
|
840
924
|
* Get the files attached to an agent with their open/closed status (paginated).
|
|
841
925
|
*
|
|
@@ -870,7 +954,7 @@ class Agents {
|
|
|
870
954
|
method: "GET",
|
|
871
955
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
872
956
|
? 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.1.
|
|
957
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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
958
|
contentType: "application/json",
|
|
875
959
|
queryParameters: _queryParams,
|
|
876
960
|
requestType: "json",
|
|
@@ -956,7 +1040,7 @@ class Agents {
|
|
|
956
1040
|
method: "POST",
|
|
957
1041
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
958
1042
|
? 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.1.
|
|
1043
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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
1044
|
contentType: "application/json",
|
|
961
1045
|
queryParameters: _queryParams,
|
|
962
1046
|
requestType: "json",
|
|
@@ -1024,7 +1108,7 @@ class Agents {
|
|
|
1024
1108
|
method: "POST",
|
|
1025
1109
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
1026
1110
|
? 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.1.
|
|
1111
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.197", "User-Agent": "@letta-ai/letta-client/0.1.197", "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
1112
|
contentType: "application/json",
|
|
1029
1113
|
requestType: "json",
|
|
1030
1114
|
body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -4,6 +4,7 @@ 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 ModifyApprovalRequest } from "./ModifyApprovalRequest";
|
|
7
8
|
export { type ListAgentFilesRequest } from "./ListAgentFilesRequest";
|
|
8
9
|
export { type SummarizeAgentConversationRequest } from "./SummarizeAgentConversationRequest";
|
|
9
10
|
export { type AgentsSearchRequest } from "./AgentsSearchRequest";
|