@letta-ai/letta-client 0.1.32 → 0.1.34
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/Client.d.ts +3 -0
- package/Client.js +23 -18
- package/api/resources/agents/client/Client.js +20 -8
- package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -1
- package/api/resources/agents/resources/archivalMemory/client/Client.js +3 -3
- package/api/resources/agents/resources/context/client/Client.js +1 -1
- package/api/resources/agents/resources/coreMemory/client/Client.js +6 -6
- package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
- package/api/resources/agents/resources/messages/client/Client.js +5 -5
- 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.js +3 -3
- package/api/resources/blocks/client/Client.js +6 -6
- package/api/resources/health/client/Client.js +1 -1
- package/api/resources/identities/client/Client.d.ts +109 -0
- package/api/resources/identities/client/Client.js +484 -0
- package/api/resources/identities/client/index.d.ts +1 -0
- package/api/resources/identities/client/index.js +17 -0
- package/api/resources/identities/client/requests/CreateIdentityRequest.d.ts +18 -0
- package/api/resources/identities/client/requests/CreateIdentityRequest.js +5 -0
- package/api/resources/identities/client/requests/IdentityUpdate.d.ts +16 -0
- package/api/resources/identities/client/requests/IdentityUpdate.js +5 -0
- package/api/resources/identities/client/requests/ListIdentitiesRequest.d.ts +16 -0
- package/api/resources/identities/client/requests/ListIdentitiesRequest.js +5 -0
- package/api/resources/identities/client/requests/UpsertIdentityRequest.d.ts +18 -0
- package/api/resources/identities/client/requests/UpsertIdentityRequest.js +5 -0
- package/api/resources/identities/client/requests/index.d.ts +4 -0
- package/api/resources/identities/client/requests/index.js +2 -0
- package/api/resources/identities/index.d.ts +1 -0
- package/api/resources/identities/index.js +17 -0
- package/api/resources/index.d.ts +2 -0
- package/api/resources/index.js +3 -1
- package/api/resources/jobs/client/Client.js +4 -4
- package/api/resources/models/client/Client.js +2 -2
- package/api/resources/providers/client/Client.js +4 -4
- package/api/resources/runs/client/Client.js +6 -6
- package/api/resources/sources/client/Client.js +6 -6
- 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 +2 -2
- package/api/resources/tag/client/Client.js +1 -1
- package/api/resources/templates/client/Client.js +1 -1
- package/api/resources/tools/client/Client.js +11 -11
- package/api/types/ActionParametersModel.d.ts +1 -0
- package/api/types/ActionResponseModel.d.ts +1 -0
- package/api/types/AppAuthSchemeAuthMode.d.ts +2 -1
- package/api/types/AppAuthSchemeAuthMode.js +1 -0
- package/api/types/Identity.d.ts +18 -0
- package/api/types/Identity.js +5 -0
- package/api/types/IdentityCreate.d.ts +16 -0
- package/api/types/IdentityCreate.js +5 -0
- package/api/types/IdentityType.d.ts +12 -0
- package/api/types/IdentityType.js +11 -0
- package/api/types/index.d.ts +3 -0
- package/api/types/index.js +3 -0
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +23 -18
- package/dist/api/resources/agents/client/Client.js +20 -8
- package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -1
- package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +6 -6
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/messages/client/Client.js +5 -5
- 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.js +3 -3
- package/dist/api/resources/blocks/client/Client.js +6 -6
- package/dist/api/resources/health/client/Client.js +1 -1
- package/dist/api/resources/identities/client/Client.d.ts +109 -0
- package/dist/api/resources/identities/client/Client.js +484 -0
- package/dist/api/resources/identities/client/index.d.ts +1 -0
- package/dist/api/resources/identities/client/index.js +17 -0
- package/dist/api/resources/identities/client/requests/CreateIdentityRequest.d.ts +18 -0
- package/dist/api/resources/identities/client/requests/CreateIdentityRequest.js +5 -0
- package/dist/api/resources/identities/client/requests/IdentityUpdate.d.ts +16 -0
- package/dist/api/resources/identities/client/requests/IdentityUpdate.js +5 -0
- package/dist/api/resources/identities/client/requests/ListIdentitiesRequest.d.ts +16 -0
- package/dist/api/resources/identities/client/requests/ListIdentitiesRequest.js +5 -0
- package/dist/api/resources/identities/client/requests/UpsertIdentityRequest.d.ts +18 -0
- package/dist/api/resources/identities/client/requests/UpsertIdentityRequest.js +5 -0
- package/dist/api/resources/identities/client/requests/index.d.ts +4 -0
- package/dist/api/resources/identities/client/requests/index.js +2 -0
- package/dist/api/resources/identities/index.d.ts +1 -0
- package/dist/api/resources/identities/index.js +17 -0
- package/dist/api/resources/index.d.ts +2 -0
- package/dist/api/resources/index.js +3 -1
- package/dist/api/resources/jobs/client/Client.js +4 -4
- package/dist/api/resources/models/client/Client.js +2 -2
- package/dist/api/resources/providers/client/Client.js +4 -4
- package/dist/api/resources/runs/client/Client.js +6 -6
- package/dist/api/resources/sources/client/Client.js +6 -6
- 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 +2 -2
- package/dist/api/resources/tag/client/Client.js +1 -1
- package/dist/api/resources/templates/client/Client.js +1 -1
- package/dist/api/resources/tools/client/Client.js +11 -11
- package/dist/api/types/ActionParametersModel.d.ts +1 -0
- package/dist/api/types/ActionResponseModel.d.ts +1 -0
- package/dist/api/types/AppAuthSchemeAuthMode.d.ts +2 -1
- package/dist/api/types/AppAuthSchemeAuthMode.js +1 -0
- package/dist/api/types/Identity.d.ts +18 -0
- package/dist/api/types/Identity.js +5 -0
- package/dist/api/types/IdentityCreate.d.ts +16 -0
- package/dist/api/types/IdentityCreate.js +5 -0
- package/dist/api/types/IdentityType.d.ts +12 -0
- package/dist/api/types/IdentityType.js +11 -0
- package/dist/api/types/index.d.ts +3 -0
- package/dist/api/types/index.js +3 -0
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
- package/dist/serialization/resources/identities/client/index.d.ts +2 -0
- package/dist/serialization/resources/identities/client/index.js +41 -0
- package/dist/serialization/resources/identities/client/listIdentities.d.ts +11 -0
- package/dist/serialization/resources/identities/client/listIdentities.js +42 -0
- package/dist/serialization/resources/identities/client/requests/IdentityUpdate.d.ts +15 -0
- package/dist/serialization/resources/identities/client/requests/IdentityUpdate.js +46 -0
- package/dist/serialization/resources/identities/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/identities/client/requests/index.js +5 -0
- package/dist/serialization/resources/identities/index.d.ts +1 -0
- package/dist/serialization/resources/identities/index.js +17 -0
- package/dist/serialization/resources/index.d.ts +2 -0
- package/dist/serialization/resources/index.js +3 -1
- package/dist/serialization/types/ActionParametersModel.d.ts +1 -0
- package/dist/serialization/types/ActionParametersModel.js +1 -0
- package/dist/serialization/types/ActionResponseModel.d.ts +1 -0
- package/dist/serialization/types/ActionResponseModel.js +1 -0
- package/dist/serialization/types/AppAuthSchemeAuthMode.d.ts +1 -1
- package/dist/serialization/types/AppAuthSchemeAuthMode.js +1 -1
- package/dist/serialization/types/Identity.d.ts +19 -0
- package/dist/serialization/types/Identity.js +50 -0
- package/dist/serialization/types/IdentityCreate.d.ts +17 -0
- package/dist/serialization/types/IdentityCreate.js +48 -0
- package/dist/serialization/types/IdentityType.d.ts +10 -0
- package/dist/serialization/types/IdentityType.js +41 -0
- package/dist/serialization/types/index.d.ts +3 -0
- package/dist/serialization/types/index.js +3 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +340 -0
- package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
- package/serialization/resources/identities/client/index.d.ts +2 -0
- package/serialization/resources/identities/client/index.js +41 -0
- package/serialization/resources/identities/client/listIdentities.d.ts +11 -0
- package/serialization/resources/identities/client/listIdentities.js +42 -0
- package/serialization/resources/identities/client/requests/IdentityUpdate.d.ts +15 -0
- package/serialization/resources/identities/client/requests/IdentityUpdate.js +46 -0
- package/serialization/resources/identities/client/requests/index.d.ts +1 -0
- package/serialization/resources/identities/client/requests/index.js +5 -0
- package/serialization/resources/identities/index.d.ts +1 -0
- package/serialization/resources/identities/index.js +17 -0
- package/serialization/resources/index.d.ts +2 -0
- package/serialization/resources/index.js +3 -1
- package/serialization/types/ActionParametersModel.d.ts +1 -0
- package/serialization/types/ActionParametersModel.js +1 -0
- package/serialization/types/ActionResponseModel.d.ts +1 -0
- package/serialization/types/ActionResponseModel.js +1 -0
- package/serialization/types/AppAuthSchemeAuthMode.d.ts +1 -1
- package/serialization/types/AppAuthSchemeAuthMode.js +1 -1
- package/serialization/types/Identity.d.ts +19 -0
- package/serialization/types/Identity.js +50 -0
- package/serialization/types/IdentityCreate.d.ts +17 -0
- package/serialization/types/IdentityCreate.js +48 -0
- package/serialization/types/IdentityType.d.ts +10 -0
- package/serialization/types/IdentityType.js +41 -0
- package/serialization/types/index.d.ts +3 -0
- package/serialization/types/index.js +3 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type AppAuthSchemeAuthMode = "OAUTH2" | "OAUTH1" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BASIC_WITH_JWT";
|
|
4
|
+
export type AppAuthSchemeAuthMode = "OAUTH2" | "OAUTH1" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BASIC_WITH_JWT" | "NO_AUTH";
|
|
5
5
|
export declare const AppAuthSchemeAuthMode: {
|
|
6
6
|
readonly Oauth2: "OAUTH2";
|
|
7
7
|
readonly Oauth1: "OAUTH1";
|
|
@@ -9,4 +9,5 @@ export declare const AppAuthSchemeAuthMode: {
|
|
|
9
9
|
readonly Basic: "BASIC";
|
|
10
10
|
readonly BearerToken: "BEARER_TOKEN";
|
|
11
11
|
readonly BasicWithJwt: "BASIC_WITH_JWT";
|
|
12
|
+
readonly NoAuth: "NO_AUTH";
|
|
12
13
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Letta from "../index";
|
|
5
|
+
export interface Identity {
|
|
6
|
+
/** The internal id of the identity. */
|
|
7
|
+
id: string;
|
|
8
|
+
/** External, user-generated identifier key of the identity. */
|
|
9
|
+
identifierKey: string;
|
|
10
|
+
/** The name of the identity. */
|
|
11
|
+
name: string;
|
|
12
|
+
/** The type of the identity. */
|
|
13
|
+
identityType: Letta.IdentityType;
|
|
14
|
+
/** The project id of the identity, if applicable. */
|
|
15
|
+
projectId?: string;
|
|
16
|
+
/** The agents associated with the identity. */
|
|
17
|
+
agents: Letta.AgentState[];
|
|
18
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Letta from "../index";
|
|
5
|
+
export interface IdentityCreate {
|
|
6
|
+
/** External, user-generated identifier key of the identity. */
|
|
7
|
+
identifierKey: string;
|
|
8
|
+
/** The name of the identity. */
|
|
9
|
+
name: string;
|
|
10
|
+
/** The type of the identity. */
|
|
11
|
+
identityType: Letta.IdentityType;
|
|
12
|
+
/** The project id of the identity, if applicable. */
|
|
13
|
+
projectId?: string;
|
|
14
|
+
/** The agent ids that are associated with the identity. */
|
|
15
|
+
agentIds?: string[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Enum to represent the type of the identity.
|
|
6
|
+
*/
|
|
7
|
+
export type IdentityType = "org" | "user" | "other";
|
|
8
|
+
export declare const IdentityType: {
|
|
9
|
+
readonly Org: "org";
|
|
10
|
+
readonly User: "user";
|
|
11
|
+
readonly Other: "other";
|
|
12
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.IdentityType = void 0;
|
|
7
|
+
exports.IdentityType = {
|
|
8
|
+
Org: "org",
|
|
9
|
+
User: "user",
|
|
10
|
+
Other: "other",
|
|
11
|
+
};
|
package/api/types/index.d.ts
CHANGED
|
@@ -84,6 +84,9 @@ export * from "./FunctionDefinitionOutput";
|
|
|
84
84
|
export * from "./FunctionTool";
|
|
85
85
|
export * from "./HttpValidationError";
|
|
86
86
|
export * from "./Health";
|
|
87
|
+
export * from "./Identity";
|
|
88
|
+
export * from "./IdentityCreate";
|
|
89
|
+
export * from "./IdentityType";
|
|
87
90
|
export * from "./ImageUrlDetail";
|
|
88
91
|
export * from "./ImageUrl";
|
|
89
92
|
export * from "./InitToolRule";
|
package/api/types/index.js
CHANGED
|
@@ -100,6 +100,9 @@ __exportStar(require("./FunctionDefinitionOutput"), exports);
|
|
|
100
100
|
__exportStar(require("./FunctionTool"), exports);
|
|
101
101
|
__exportStar(require("./HttpValidationError"), exports);
|
|
102
102
|
__exportStar(require("./Health"), exports);
|
|
103
|
+
__exportStar(require("./Identity"), exports);
|
|
104
|
+
__exportStar(require("./IdentityCreate"), exports);
|
|
105
|
+
__exportStar(require("./IdentityType"), exports);
|
|
103
106
|
__exportStar(require("./ImageUrlDetail"), exports);
|
|
104
107
|
__exportStar(require("./ImageUrl"), exports);
|
|
105
108
|
__exportStar(require("./InitToolRule"), exports);
|
package/dist/Client.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import * as core from "./core";
|
|
|
6
6
|
import { Tools } from "./api/resources/tools/client/Client";
|
|
7
7
|
import { Sources } from "./api/resources/sources/client/Client";
|
|
8
8
|
import { Agents } from "./api/resources/agents/client/Client";
|
|
9
|
+
import { Identities } from "./api/resources/identities/client/Client";
|
|
9
10
|
import { Models } from "./api/resources/models/client/Client";
|
|
10
11
|
import { Blocks } from "./api/resources/blocks/client/Client";
|
|
11
12
|
import { Jobs } from "./api/resources/jobs/client/Client";
|
|
@@ -39,6 +40,7 @@ export declare class LettaClient {
|
|
|
39
40
|
protected _tools: Tools | undefined;
|
|
40
41
|
protected _sources: Sources | undefined;
|
|
41
42
|
protected _agents: Agents | undefined;
|
|
43
|
+
protected _identities: Identities | undefined;
|
|
42
44
|
protected _models: Models | undefined;
|
|
43
45
|
protected _blocks: Blocks | undefined;
|
|
44
46
|
protected _jobs: Jobs | undefined;
|
|
@@ -52,6 +54,7 @@ export declare class LettaClient {
|
|
|
52
54
|
get tools(): Tools;
|
|
53
55
|
get sources(): Sources;
|
|
54
56
|
get agents(): Agents;
|
|
57
|
+
get identities(): Identities;
|
|
55
58
|
get models(): Models;
|
|
56
59
|
get blocks(): Blocks;
|
|
57
60
|
get jobs(): Jobs;
|
package/dist/Client.js
CHANGED
|
@@ -7,15 +7,16 @@ exports.LettaClient = void 0;
|
|
|
7
7
|
const Client_1 = require("./api/resources/tools/client/Client");
|
|
8
8
|
const Client_2 = require("./api/resources/sources/client/Client");
|
|
9
9
|
const Client_3 = require("./api/resources/agents/client/Client");
|
|
10
|
-
const Client_4 = require("./api/resources/
|
|
11
|
-
const Client_5 = require("./api/resources/
|
|
12
|
-
const Client_6 = require("./api/resources/
|
|
13
|
-
const Client_7 = require("./api/resources/
|
|
14
|
-
const Client_8 = require("./api/resources/
|
|
15
|
-
const Client_9 = require("./api/resources/
|
|
16
|
-
const Client_10 = require("./api/resources/
|
|
17
|
-
const Client_11 = require("./api/resources/
|
|
18
|
-
const Client_12 = require("./api/resources/
|
|
10
|
+
const Client_4 = require("./api/resources/identities/client/Client");
|
|
11
|
+
const Client_5 = require("./api/resources/models/client/Client");
|
|
12
|
+
const Client_6 = require("./api/resources/blocks/client/Client");
|
|
13
|
+
const Client_7 = require("./api/resources/jobs/client/Client");
|
|
14
|
+
const Client_8 = require("./api/resources/health/client/Client");
|
|
15
|
+
const Client_9 = require("./api/resources/providers/client/Client");
|
|
16
|
+
const Client_10 = require("./api/resources/runs/client/Client");
|
|
17
|
+
const Client_11 = require("./api/resources/steps/client/Client");
|
|
18
|
+
const Client_12 = require("./api/resources/tag/client/Client");
|
|
19
|
+
const Client_13 = require("./api/resources/templates/client/Client");
|
|
19
20
|
class LettaClient {
|
|
20
21
|
constructor(_options = {}) {
|
|
21
22
|
this._options = _options;
|
|
@@ -32,41 +33,45 @@ class LettaClient {
|
|
|
32
33
|
var _a;
|
|
33
34
|
return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Client_3.Agents(this._options)));
|
|
34
35
|
}
|
|
36
|
+
get identities() {
|
|
37
|
+
var _a;
|
|
38
|
+
return ((_a = this._identities) !== null && _a !== void 0 ? _a : (this._identities = new Client_4.Identities(this._options)));
|
|
39
|
+
}
|
|
35
40
|
get models() {
|
|
36
41
|
var _a;
|
|
37
|
-
return ((_a = this._models) !== null && _a !== void 0 ? _a : (this._models = new
|
|
42
|
+
return ((_a = this._models) !== null && _a !== void 0 ? _a : (this._models = new Client_5.Models(this._options)));
|
|
38
43
|
}
|
|
39
44
|
get blocks() {
|
|
40
45
|
var _a;
|
|
41
|
-
return ((_a = this._blocks) !== null && _a !== void 0 ? _a : (this._blocks = new
|
|
46
|
+
return ((_a = this._blocks) !== null && _a !== void 0 ? _a : (this._blocks = new Client_6.Blocks(this._options)));
|
|
42
47
|
}
|
|
43
48
|
get jobs() {
|
|
44
49
|
var _a;
|
|
45
|
-
return ((_a = this._jobs) !== null && _a !== void 0 ? _a : (this._jobs = new
|
|
50
|
+
return ((_a = this._jobs) !== null && _a !== void 0 ? _a : (this._jobs = new Client_7.Jobs(this._options)));
|
|
46
51
|
}
|
|
47
52
|
get health() {
|
|
48
53
|
var _a;
|
|
49
|
-
return ((_a = this._health) !== null && _a !== void 0 ? _a : (this._health = new
|
|
54
|
+
return ((_a = this._health) !== null && _a !== void 0 ? _a : (this._health = new Client_8.Health(this._options)));
|
|
50
55
|
}
|
|
51
56
|
get providers() {
|
|
52
57
|
var _a;
|
|
53
|
-
return ((_a = this._providers) !== null && _a !== void 0 ? _a : (this._providers = new
|
|
58
|
+
return ((_a = this._providers) !== null && _a !== void 0 ? _a : (this._providers = new Client_9.Providers(this._options)));
|
|
54
59
|
}
|
|
55
60
|
get runs() {
|
|
56
61
|
var _a;
|
|
57
|
-
return ((_a = this._runs) !== null && _a !== void 0 ? _a : (this._runs = new
|
|
62
|
+
return ((_a = this._runs) !== null && _a !== void 0 ? _a : (this._runs = new Client_10.Runs(this._options)));
|
|
58
63
|
}
|
|
59
64
|
get steps() {
|
|
60
65
|
var _a;
|
|
61
|
-
return ((_a = this._steps) !== null && _a !== void 0 ? _a : (this._steps = new
|
|
66
|
+
return ((_a = this._steps) !== null && _a !== void 0 ? _a : (this._steps = new Client_11.Steps(this._options)));
|
|
62
67
|
}
|
|
63
68
|
get tag() {
|
|
64
69
|
var _a;
|
|
65
|
-
return ((_a = this._tag) !== null && _a !== void 0 ? _a : (this._tag = new
|
|
70
|
+
return ((_a = this._tag) !== null && _a !== void 0 ? _a : (this._tag = new Client_12.Tag(this._options)));
|
|
66
71
|
}
|
|
67
72
|
get templates() {
|
|
68
73
|
var _a;
|
|
69
|
-
return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new
|
|
74
|
+
return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new Client_13.Templates(this._options)));
|
|
70
75
|
}
|
|
71
76
|
}
|
|
72
77
|
exports.LettaClient = LettaClient;
|
|
@@ -44,6 +44,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
44
44
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
48
|
+
var t = {};
|
|
49
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
50
|
+
t[p] = s[p];
|
|
51
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
52
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
53
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
54
|
+
t[p[i]] = s[p[i]];
|
|
55
|
+
}
|
|
56
|
+
return t;
|
|
57
|
+
};
|
|
47
58
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
59
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
60
|
};
|
|
@@ -157,7 +168,7 @@ class Agents {
|
|
|
157
168
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
158
169
|
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/"),
|
|
159
170
|
method: "GET",
|
|
160
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
171
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "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
172
|
contentType: "application/json",
|
|
162
173
|
queryParameters: _queryParams,
|
|
163
174
|
requestType: "json",
|
|
@@ -220,13 +231,14 @@ class Agents {
|
|
|
220
231
|
create() {
|
|
221
232
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
222
233
|
var _a, _b, _c;
|
|
234
|
+
const { projectSlug } = request, _body = __rest(request, ["projectSlug"]);
|
|
223
235
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
224
236
|
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/"),
|
|
225
237
|
method: "POST",
|
|
226
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
238
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "project-slug": projectSlug != null ? projectSlug : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
227
239
|
contentType: "application/json",
|
|
228
240
|
requestType: "json",
|
|
229
|
-
body: serializers.CreateAgentRequest.jsonOrThrow(
|
|
241
|
+
body: serializers.CreateAgentRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
230
242
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
231
243
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
232
244
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -289,7 +301,7 @@ class Agents {
|
|
|
289
301
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
290
302
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
|
|
291
303
|
method: "GET",
|
|
292
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
304
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "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),
|
|
293
305
|
contentType: "application/json",
|
|
294
306
|
requestType: "json",
|
|
295
307
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -354,7 +366,7 @@ class Agents {
|
|
|
354
366
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
355
367
|
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)}`),
|
|
356
368
|
method: "DELETE",
|
|
357
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
369
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "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),
|
|
358
370
|
contentType: "application/json",
|
|
359
371
|
requestType: "json",
|
|
360
372
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -414,7 +426,7 @@ class Agents {
|
|
|
414
426
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
415
427
|
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)}`),
|
|
416
428
|
method: "PATCH",
|
|
417
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
429
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "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),
|
|
418
430
|
contentType: "application/json",
|
|
419
431
|
requestType: "json",
|
|
420
432
|
body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -486,7 +498,7 @@ class Agents {
|
|
|
486
498
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
487
499
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/reset-messages`),
|
|
488
500
|
method: "PATCH",
|
|
489
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
501
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "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),
|
|
490
502
|
contentType: "application/json",
|
|
491
503
|
queryParameters: _queryParams,
|
|
492
504
|
requestType: "json",
|
|
@@ -552,7 +564,7 @@ class Agents {
|
|
|
552
564
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
553
565
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/agents/search"),
|
|
554
566
|
method: "POST",
|
|
555
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
567
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "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),
|
|
556
568
|
contentType: "application/json",
|
|
557
569
|
requestType: "json",
|
|
558
570
|
body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -7,6 +7,7 @@ import * as Letta from "../../../../index";
|
|
|
7
7
|
* {}
|
|
8
8
|
*/
|
|
9
9
|
export interface CreateAgentRequest {
|
|
10
|
+
projectSlug?: string;
|
|
10
11
|
/** The name of the agent. */
|
|
11
12
|
name?: string;
|
|
12
13
|
/** The blocks to create in the agent's in-context memory. */
|
|
@@ -53,7 +54,7 @@ export interface CreateAgentRequest {
|
|
|
53
54
|
fromTemplate?: string;
|
|
54
55
|
/** Whether the agent is a template */
|
|
55
56
|
template?: boolean;
|
|
56
|
-
/**
|
|
57
|
+
/** Deprecated: Project should now be passed via the project-slug header instead of in the request body. If using the sdk, this can be done via the new project_slug field below. */
|
|
57
58
|
project?: string;
|
|
58
59
|
/** The environment variables for tool execution specific to this agent. */
|
|
59
60
|
toolExecEnvironmentVariables?: Record<string, string | undefined>;
|
|
@@ -88,7 +88,7 @@ class ArchivalMemory {
|
|
|
88
88
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
89
89
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/archival-memory`),
|
|
90
90
|
method: "GET",
|
|
91
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
91
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
92
92
|
contentType: "application/json",
|
|
93
93
|
queryParameters: _queryParams,
|
|
94
94
|
requestType: "json",
|
|
@@ -157,7 +157,7 @@ class ArchivalMemory {
|
|
|
157
157
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
158
158
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/archival-memory`),
|
|
159
159
|
method: "POST",
|
|
160
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
160
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
161
161
|
contentType: "application/json",
|
|
162
162
|
requestType: "json",
|
|
163
163
|
body: serializers.agents.CreateArchivalMemory.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -224,7 +224,7 @@ class ArchivalMemory {
|
|
|
224
224
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
225
225
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/archival-memory/${encodeURIComponent(memoryId)}`),
|
|
226
226
|
method: "DELETE",
|
|
227
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
227
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
228
228
|
contentType: "application/json",
|
|
229
229
|
requestType: "json",
|
|
230
230
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -76,7 +76,7 @@ class Context {
|
|
|
76
76
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
77
77
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/context`),
|
|
78
78
|
method: "GET",
|
|
79
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
79
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
80
80
|
contentType: "application/json",
|
|
81
81
|
requestType: "json",
|
|
82
82
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -77,7 +77,7 @@ class CoreMemory {
|
|
|
77
77
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
78
78
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory`),
|
|
79
79
|
method: "GET",
|
|
80
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
80
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
81
81
|
contentType: "application/json",
|
|
82
82
|
requestType: "json",
|
|
83
83
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -143,7 +143,7 @@ class CoreMemory {
|
|
|
143
143
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
144
144
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks/${encodeURIComponent(blockLabel)}`),
|
|
145
145
|
method: "GET",
|
|
146
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
146
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
147
147
|
contentType: "application/json",
|
|
148
148
|
requestType: "json",
|
|
149
149
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -210,7 +210,7 @@ class CoreMemory {
|
|
|
210
210
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
211
211
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks/${encodeURIComponent(blockLabel)}`),
|
|
212
212
|
method: "PATCH",
|
|
213
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
213
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
214
214
|
contentType: "application/json",
|
|
215
215
|
requestType: "json",
|
|
216
216
|
body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -276,7 +276,7 @@ class CoreMemory {
|
|
|
276
276
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
277
277
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks`),
|
|
278
278
|
method: "GET",
|
|
279
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
279
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
280
280
|
contentType: "application/json",
|
|
281
281
|
requestType: "json",
|
|
282
282
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -342,7 +342,7 @@ class CoreMemory {
|
|
|
342
342
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
343
343
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks/attach/${encodeURIComponent(blockId)}`),
|
|
344
344
|
method: "PATCH",
|
|
345
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
345
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
346
346
|
contentType: "application/json",
|
|
347
347
|
requestType: "json",
|
|
348
348
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -408,7 +408,7 @@ class CoreMemory {
|
|
|
408
408
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
409
409
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks/detach/${encodeURIComponent(blockId)}`),
|
|
410
410
|
method: "PATCH",
|
|
411
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
411
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "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),
|
|
412
412
|
contentType: "application/json",
|
|
413
413
|
requestType: "json",
|
|
414
414
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -78,7 +78,7 @@ class MemoryVariables {
|
|
|
78
78
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
79
79
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/variables`),
|
|
80
80
|
method: "GET",
|
|
81
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
81
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
82
82
|
contentType: "application/json",
|
|
83
83
|
requestType: "json",
|
|
84
84
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -97,7 +97,7 @@ class Messages {
|
|
|
97
97
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
98
98
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages`),
|
|
99
99
|
method: "GET",
|
|
100
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
100
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
101
101
|
contentType: "application/json",
|
|
102
102
|
queryParameters: _queryParams,
|
|
103
103
|
requestType: "json",
|
|
@@ -170,7 +170,7 @@ class Messages {
|
|
|
170
170
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
171
171
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages`),
|
|
172
172
|
method: "POST",
|
|
173
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
173
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
174
174
|
contentType: "application/json",
|
|
175
175
|
requestType: "json",
|
|
176
176
|
body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -238,7 +238,7 @@ class Messages {
|
|
|
238
238
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
239
239
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/${encodeURIComponent(messageId)}`),
|
|
240
240
|
method: "PATCH",
|
|
241
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
241
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
242
242
|
contentType: "application/json",
|
|
243
243
|
requestType: "json",
|
|
244
244
|
body: serializers.agents.MessageUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -298,7 +298,7 @@ class Messages {
|
|
|
298
298
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
299
299
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/stream`),
|
|
300
300
|
method: "POST",
|
|
301
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
301
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
302
302
|
contentType: "application/json",
|
|
303
303
|
requestType: "json",
|
|
304
304
|
body: serializers.agents.LettaStreamingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -382,7 +382,7 @@ class Messages {
|
|
|
382
382
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
383
383
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/async`),
|
|
384
384
|
method: "POST",
|
|
385
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
385
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
386
386
|
contentType: "application/json",
|
|
387
387
|
requestType: "json",
|
|
388
388
|
body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -77,7 +77,7 @@ class Sources {
|
|
|
77
77
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
78
78
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/sources/attach/${encodeURIComponent(sourceId)}`),
|
|
79
79
|
method: "PATCH",
|
|
80
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
80
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
81
81
|
contentType: "application/json",
|
|
82
82
|
requestType: "json",
|
|
83
83
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -143,7 +143,7 @@ class Sources {
|
|
|
143
143
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
144
144
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/sources/detach/${encodeURIComponent(sourceId)}`),
|
|
145
145
|
method: "PATCH",
|
|
146
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
146
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
147
147
|
contentType: "application/json",
|
|
148
148
|
requestType: "json",
|
|
149
149
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -208,7 +208,7 @@ class Sources {
|
|
|
208
208
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
209
209
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/sources`),
|
|
210
210
|
method: "GET",
|
|
211
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
211
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.34", "User-Agent": "@letta-ai/letta-client/0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
212
212
|
contentType: "application/json",
|
|
213
213
|
requestType: "json",
|
|
214
214
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|