@letta-ai/letta-client 0.1.62 → 0.1.64
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 +7 -7
- package/api/resources/agents/client/Client.js +28 -22
- package/api/resources/agents/client/requests/{BodyUploadAgentSerialized.d.ts → BodyImportAgentSerialized.d.ts} +1 -1
- package/api/resources/agents/client/requests/index.d.ts +1 -1
- 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/memoryVariables/client/Client.js +1 -1
- package/api/resources/agents/resources/messages/client/Client.js +5 -5
- package/api/resources/agents/resources/passages/client/Client.js +3 -3
- 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/groups/client/Client.js +7 -7
- package/api/resources/health/client/Client.js +1 -1
- package/api/resources/identities/client/Client.js +6 -6
- 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 +7 -7
- 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.d.ts +29 -1
- package/api/resources/tools/client/Client.js +150 -15
- package/api/resources/tools/types/AddMcpServerRequest.d.ts +5 -0
- package/api/resources/tools/types/AddMcpServerResponseItem.d.ts +5 -0
- package/api/resources/tools/types/DeleteMcpServerResponseItem.d.ts +5 -0
- package/api/resources/tools/types/ListMcpServersResponseValue.d.ts +1 -1
- package/api/resources/tools/types/index.d.ts +3 -0
- package/api/resources/tools/types/index.js +3 -0
- package/api/resources/voice/client/Client.js +1 -1
- package/api/types/AgentSchema.d.ts +27 -0
- package/api/types/AgentSchema.js +5 -0
- package/api/types/CoreMemoryBlockSchema.d.ts +16 -0
- package/api/types/CoreMemoryBlockSchema.js +5 -0
- package/api/types/McpServerType.d.ts +2 -2
- package/api/types/McpServerType.js +1 -1
- package/api/types/MessageSchema.d.ts +16 -0
- package/api/types/MessageSchema.js +5 -0
- package/api/types/ParameterProperties.d.ts +7 -0
- package/api/types/ParameterProperties.js +5 -0
- package/api/types/ParametersSchema.d.ts +9 -0
- package/api/types/ParametersSchema.js +5 -0
- package/api/types/{LocalServerConfig.d.ts → StdioServerConfig.d.ts} +3 -1
- package/api/types/StdioServerConfig.js +5 -0
- package/api/types/TagSchema.d.ts +6 -0
- package/api/types/TagSchema.js +5 -0
- package/api/types/ToolEnvVarSchema.d.ts +11 -0
- package/api/types/ToolEnvVarSchema.js +5 -0
- package/api/types/ToolJsonSchema.d.ts +11 -0
- package/api/types/ToolJsonSchema.js +5 -0
- package/api/types/ToolRuleSchema.d.ts +7 -0
- package/api/types/ToolRuleSchema.js +5 -0
- package/api/types/ToolSchema.d.ts +18 -0
- package/api/types/ToolSchema.js +5 -0
- package/api/types/index.d.ts +11 -1
- package/api/types/index.js +11 -1
- package/dist/api/resources/agents/client/Client.d.ts +7 -7
- package/dist/api/resources/agents/client/Client.js +28 -22
- package/dist/api/resources/agents/client/requests/{BodyUploadAgentSerialized.d.ts → BodyImportAgentSerialized.d.ts} +1 -1
- package/dist/api/resources/agents/client/requests/BodyImportAgentSerialized.js +5 -0
- package/dist/api/resources/agents/client/requests/index.d.ts +1 -1
- 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/memoryVariables/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/messages/client/Client.js +5 -5
- package/dist/api/resources/agents/resources/passages/client/Client.js +3 -3
- 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/groups/client/Client.js +7 -7
- package/dist/api/resources/health/client/Client.js +1 -1
- package/dist/api/resources/identities/client/Client.js +6 -6
- 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 +7 -7
- 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.d.ts +29 -1
- package/dist/api/resources/tools/client/Client.js +150 -15
- package/dist/api/resources/tools/types/AddMcpServerRequest.d.ts +5 -0
- package/dist/api/resources/tools/types/AddMcpServerRequest.js +5 -0
- package/dist/api/resources/tools/types/AddMcpServerResponseItem.d.ts +5 -0
- package/dist/api/resources/tools/types/AddMcpServerResponseItem.js +5 -0
- package/dist/api/resources/tools/types/DeleteMcpServerResponseItem.d.ts +5 -0
- package/dist/api/resources/tools/types/DeleteMcpServerResponseItem.js +5 -0
- package/dist/api/resources/tools/types/ListMcpServersResponseValue.d.ts +1 -1
- package/dist/api/resources/tools/types/index.d.ts +3 -0
- package/dist/api/resources/tools/types/index.js +3 -0
- package/dist/api/resources/voice/client/Client.js +1 -1
- package/dist/api/types/AgentSchema.d.ts +27 -0
- package/dist/api/types/AgentSchema.js +5 -0
- package/dist/api/types/CoreMemoryBlockSchema.d.ts +16 -0
- package/dist/api/types/CoreMemoryBlockSchema.js +5 -0
- package/dist/api/types/McpServerType.d.ts +2 -2
- package/dist/api/types/McpServerType.js +1 -1
- package/dist/api/types/MessageSchema.d.ts +16 -0
- package/dist/api/types/MessageSchema.js +5 -0
- package/dist/api/types/ParameterProperties.d.ts +7 -0
- package/dist/api/types/ParameterProperties.js +5 -0
- package/dist/api/types/ParametersSchema.d.ts +9 -0
- package/dist/api/types/ParametersSchema.js +5 -0
- package/dist/api/types/{LocalServerConfig.d.ts → StdioServerConfig.d.ts} +3 -1
- package/dist/api/types/StdioServerConfig.js +5 -0
- package/dist/api/types/TagSchema.d.ts +6 -0
- package/dist/api/types/TagSchema.js +5 -0
- package/dist/api/types/ToolEnvVarSchema.d.ts +11 -0
- package/dist/api/types/ToolEnvVarSchema.js +5 -0
- package/dist/api/types/ToolJsonSchema.d.ts +11 -0
- package/dist/api/types/ToolJsonSchema.js +5 -0
- package/dist/api/types/ToolRuleSchema.d.ts +7 -0
- package/dist/api/types/ToolRuleSchema.js +5 -0
- package/dist/api/types/ToolSchema.d.ts +18 -0
- package/dist/api/types/ToolSchema.js +5 -0
- package/dist/api/types/index.d.ts +11 -1
- package/dist/api/types/index.js +11 -1
- package/dist/serialization/resources/tools/client/addMcpServer.d.ts +11 -0
- package/dist/serialization/resources/tools/client/addMcpServer.js +42 -0
- package/dist/serialization/resources/tools/client/deleteMcpServer.d.ts +11 -0
- package/dist/serialization/resources/tools/client/deleteMcpServer.js +42 -0
- package/dist/serialization/resources/tools/client/index.d.ts +2 -0
- package/dist/serialization/resources/tools/client/index.js +3 -1
- package/dist/serialization/resources/tools/types/AddMcpServerRequest.d.ts +12 -0
- package/dist/serialization/resources/tools/types/AddMcpServerRequest.js +43 -0
- package/dist/serialization/resources/tools/types/AddMcpServerResponseItem.d.ts +12 -0
- package/dist/serialization/resources/tools/types/AddMcpServerResponseItem.js +43 -0
- package/dist/serialization/resources/tools/types/DeleteMcpServerResponseItem.d.ts +12 -0
- package/dist/serialization/resources/tools/types/DeleteMcpServerResponseItem.js +43 -0
- package/dist/serialization/resources/tools/types/ListMcpServersResponseValue.d.ts +2 -2
- package/dist/serialization/resources/tools/types/ListMcpServersResponseValue.js +2 -2
- package/dist/serialization/resources/tools/types/index.d.ts +3 -0
- package/dist/serialization/resources/tools/types/index.js +3 -0
- package/dist/serialization/types/AgentSchema.d.ts +40 -0
- package/dist/serialization/types/AgentSchema.js +71 -0
- package/dist/serialization/types/CoreMemoryBlockSchema.d.ts +22 -0
- package/dist/serialization/types/CoreMemoryBlockSchema.js +53 -0
- package/dist/serialization/types/McpServerType.d.ts +1 -1
- package/dist/serialization/types/McpServerType.js +1 -1
- package/dist/serialization/types/MessageSchema.d.ts +22 -0
- package/dist/serialization/types/MessageSchema.js +53 -0
- package/dist/serialization/types/ParameterProperties.d.ts +13 -0
- package/dist/serialization/types/ParameterProperties.js +44 -0
- package/dist/serialization/types/ParametersSchema.d.ts +15 -0
- package/dist/serialization/types/ParametersSchema.js +46 -0
- package/dist/serialization/types/{LocalServerConfig.d.ts → StdioServerConfig.d.ts} +3 -2
- package/dist/serialization/types/{LocalServerConfig.js → StdioServerConfig.js} +3 -2
- package/dist/serialization/types/TagSchema.d.ts +12 -0
- package/dist/serialization/types/TagSchema.js +43 -0
- package/dist/serialization/types/ToolEnvVarSchema.d.ts +17 -0
- package/dist/serialization/types/ToolEnvVarSchema.js +48 -0
- package/dist/serialization/types/ToolJsonSchema.d.ts +17 -0
- package/dist/serialization/types/ToolJsonSchema.js +48 -0
- package/dist/serialization/types/ToolRuleSchema.d.ts +13 -0
- package/dist/serialization/types/ToolRuleSchema.js +44 -0
- package/dist/serialization/types/ToolSchema.d.ts +24 -0
- package/dist/serialization/types/ToolSchema.js +55 -0
- package/dist/serialization/types/index.d.ts +11 -1
- package/dist/serialization/types/index.js +11 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +138 -8
- package/serialization/resources/tools/client/addMcpServer.d.ts +11 -0
- package/serialization/resources/tools/client/addMcpServer.js +42 -0
- package/serialization/resources/tools/client/deleteMcpServer.d.ts +11 -0
- package/serialization/resources/tools/client/deleteMcpServer.js +42 -0
- package/serialization/resources/tools/client/index.d.ts +2 -0
- package/serialization/resources/tools/client/index.js +3 -1
- package/serialization/resources/tools/types/AddMcpServerRequest.d.ts +12 -0
- package/serialization/resources/tools/types/AddMcpServerRequest.js +43 -0
- package/serialization/resources/tools/types/AddMcpServerResponseItem.d.ts +12 -0
- package/serialization/resources/tools/types/AddMcpServerResponseItem.js +43 -0
- package/serialization/resources/tools/types/DeleteMcpServerResponseItem.d.ts +12 -0
- package/serialization/resources/tools/types/DeleteMcpServerResponseItem.js +43 -0
- package/serialization/resources/tools/types/ListMcpServersResponseValue.d.ts +2 -2
- package/serialization/resources/tools/types/ListMcpServersResponseValue.js +2 -2
- package/serialization/resources/tools/types/index.d.ts +3 -0
- package/serialization/resources/tools/types/index.js +3 -0
- package/serialization/types/AgentSchema.d.ts +40 -0
- package/serialization/types/AgentSchema.js +71 -0
- package/serialization/types/CoreMemoryBlockSchema.d.ts +22 -0
- package/serialization/types/CoreMemoryBlockSchema.js +53 -0
- package/serialization/types/McpServerType.d.ts +1 -1
- package/serialization/types/McpServerType.js +1 -1
- package/serialization/types/MessageSchema.d.ts +22 -0
- package/serialization/types/MessageSchema.js +53 -0
- package/serialization/types/ParameterProperties.d.ts +13 -0
- package/serialization/types/ParameterProperties.js +44 -0
- package/serialization/types/ParametersSchema.d.ts +15 -0
- package/serialization/types/ParametersSchema.js +46 -0
- package/serialization/types/{LocalServerConfig.d.ts → StdioServerConfig.d.ts} +3 -2
- package/serialization/types/{LocalServerConfig.js → StdioServerConfig.js} +3 -2
- package/serialization/types/TagSchema.d.ts +12 -0
- package/serialization/types/TagSchema.js +43 -0
- package/serialization/types/ToolEnvVarSchema.d.ts +17 -0
- package/serialization/types/ToolEnvVarSchema.js +48 -0
- package/serialization/types/ToolJsonSchema.d.ts +17 -0
- package/serialization/types/ToolJsonSchema.js +48 -0
- package/serialization/types/ToolRuleSchema.d.ts +13 -0
- package/serialization/types/ToolRuleSchema.js +44 -0
- package/serialization/types/ToolSchema.d.ts +24 -0
- package/serialization/types/ToolSchema.js +55 -0
- package/serialization/types/index.d.ts +11 -1
- package/serialization/types/index.js +11 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- /package/api/resources/agents/client/requests/{BodyUploadAgentSerialized.js → BodyImportAgentSerialized.js} +0 -0
- /package/api/{types/LocalServerConfig.js → resources/tools/types/AddMcpServerRequest.js} +0 -0
- /package/{dist/api/resources/agents/client/requests/BodyUploadAgentSerialized.js → api/resources/tools/types/AddMcpServerResponseItem.js} +0 -0
- /package/{dist/api/types/LocalServerConfig.js → api/resources/tools/types/DeleteMcpServerResponseItem.js} +0 -0
|
@@ -80,7 +80,7 @@ class Files {
|
|
|
80
80
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
81
81
|
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/sources/${encodeURIComponent(sourceId)}/upload`),
|
|
82
82
|
method: "POST",
|
|
83
|
-
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
83
|
+
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.64", "User-Agent": "@letta-ai/letta-client/0.1.64", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
84
84
|
requestType: "file",
|
|
85
85
|
duplex: _maybeEncodedRequest.duplex,
|
|
86
86
|
body: _maybeEncodedRequest.body,
|
|
@@ -155,7 +155,7 @@ class Files {
|
|
|
155
155
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
156
156
|
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/sources/${encodeURIComponent(sourceId)}/files`),
|
|
157
157
|
method: "GET",
|
|
158
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
158
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.64", "User-Agent": "@letta-ai/letta-client/0.1.64", "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),
|
|
159
159
|
contentType: "application/json",
|
|
160
160
|
queryParameters: _queryParams,
|
|
161
161
|
requestType: "json",
|
|
@@ -222,7 +222,7 @@ class Files {
|
|
|
222
222
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
223
223
|
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/sources/${encodeURIComponent(sourceId)}/${encodeURIComponent(fileId)}`),
|
|
224
224
|
method: "DELETE",
|
|
225
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
225
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.64", "User-Agent": "@letta-ai/letta-client/0.1.64", "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),
|
|
226
226
|
contentType: "application/json",
|
|
227
227
|
requestType: "json",
|
|
228
228
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -76,7 +76,7 @@ class Passages {
|
|
|
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/sources/${encodeURIComponent(sourceId)}/passages`),
|
|
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.64", "User-Agent": "@letta-ai/letta-client/0.1.64", "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,
|
|
@@ -103,7 +103,7 @@ class Steps {
|
|
|
103
103
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
104
104
|
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/steps"),
|
|
105
105
|
method: "GET",
|
|
106
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
106
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.64", "User-Agent": "@letta-ai/letta-client/0.1.64", "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),
|
|
107
107
|
contentType: "application/json",
|
|
108
108
|
queryParameters: _queryParams,
|
|
109
109
|
requestType: "json",
|
|
@@ -169,7 +169,7 @@ class Steps {
|
|
|
169
169
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
170
170
|
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/steps/${encodeURIComponent(stepId)}`),
|
|
171
171
|
method: "GET",
|
|
172
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
172
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.64", "User-Agent": "@letta-ai/letta-client/0.1.64", "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),
|
|
173
173
|
contentType: "application/json",
|
|
174
174
|
requestType: "json",
|
|
175
175
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -87,7 +87,7 @@ class Tag {
|
|
|
87
87
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
88
88
|
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/tags/"),
|
|
89
89
|
method: "GET",
|
|
90
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
90
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.64", "User-Agent": "@letta-ai/letta-client/0.1.64", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
91
91
|
contentType: "application/json",
|
|
92
92
|
queryParameters: _queryParams,
|
|
93
93
|
requestType: "json",
|
|
@@ -75,7 +75,7 @@ class Templates {
|
|
|
75
75
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
76
76
|
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/templates/${encodeURIComponent(project)}/${encodeURIComponent(templateVersion)}/agents`),
|
|
77
77
|
method: "POST",
|
|
78
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
78
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.64", "User-Agent": "@letta-ai/letta-client/0.1.64", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
79
79
|
contentType: "application/json",
|
|
80
80
|
requestType: "json",
|
|
81
81
|
body: serializers.TemplatesCreateAgentsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -177,6 +177,22 @@ export declare class Tools {
|
|
|
177
177
|
* await client.tools.listMcpServers()
|
|
178
178
|
*/
|
|
179
179
|
listMcpServers(requestOptions?: Tools.RequestOptions): Promise<Record<string, Letta.ListMcpServersResponseValue>>;
|
|
180
|
+
/**
|
|
181
|
+
* Add a new MCP server to the Letta MCP server config
|
|
182
|
+
*
|
|
183
|
+
* @param {Letta.AddMcpServerRequest} request
|
|
184
|
+
* @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
|
|
185
|
+
*
|
|
186
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
187
|
+
*
|
|
188
|
+
* @example
|
|
189
|
+
* await client.tools.addMcpServer({
|
|
190
|
+
* serverName: "server_name",
|
|
191
|
+
* command: "command",
|
|
192
|
+
* args: ["args"]
|
|
193
|
+
* })
|
|
194
|
+
*/
|
|
195
|
+
addMcpServer(request: Letta.AddMcpServerRequest, requestOptions?: Tools.RequestOptions): Promise<Letta.AddMcpServerResponseItem[]>;
|
|
180
196
|
/**
|
|
181
197
|
* Get a list of all tools for a specific MCP server
|
|
182
198
|
*
|
|
@@ -190,7 +206,7 @@ export declare class Tools {
|
|
|
190
206
|
*/
|
|
191
207
|
listMcpToolsByServer(mcpServerName: string, requestOptions?: Tools.RequestOptions): Promise<Letta.McpTool[]>;
|
|
192
208
|
/**
|
|
193
|
-
*
|
|
209
|
+
* Register a new MCP tool as a Letta server by MCP server + tool name
|
|
194
210
|
*
|
|
195
211
|
* @param {string} mcpServerName
|
|
196
212
|
* @param {string} mcpToolName
|
|
@@ -202,6 +218,18 @@ export declare class Tools {
|
|
|
202
218
|
* await client.tools.addMcpTool("mcp_server_name", "mcp_tool_name")
|
|
203
219
|
*/
|
|
204
220
|
addMcpTool(mcpServerName: string, mcpToolName: string, requestOptions?: Tools.RequestOptions): Promise<Letta.Tool>;
|
|
221
|
+
/**
|
|
222
|
+
* Add a new MCP server to the Letta MCP server config
|
|
223
|
+
*
|
|
224
|
+
* @param {string} mcpServerName
|
|
225
|
+
* @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
|
|
226
|
+
*
|
|
227
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
228
|
+
*
|
|
229
|
+
* @example
|
|
230
|
+
* await client.tools.deleteMcpServer("mcp_server_name")
|
|
231
|
+
*/
|
|
232
|
+
deleteMcpServer(mcpServerName: string, requestOptions?: Tools.RequestOptions): Promise<Letta.DeleteMcpServerResponseItem[]>;
|
|
205
233
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
206
234
|
Authorization: string;
|
|
207
235
|
}>;
|
|
@@ -76,7 +76,7 @@ class Tools {
|
|
|
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/tools/${encodeURIComponent(toolId)}`),
|
|
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.64", "User-Agent": "@letta-ai/letta-client/0.1.64", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
80
80
|
contentType: "application/json",
|
|
81
81
|
requestType: "json",
|
|
82
82
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -141,7 +141,7 @@ class Tools {
|
|
|
141
141
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
142
142
|
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/tools/${encodeURIComponent(toolId)}`),
|
|
143
143
|
method: "DELETE",
|
|
144
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
144
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.64", "User-Agent": "@letta-ai/letta-client/0.1.64", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
145
145
|
contentType: "application/json",
|
|
146
146
|
requestType: "json",
|
|
147
147
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -201,7 +201,7 @@ class Tools {
|
|
|
201
201
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
202
202
|
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/tools/${encodeURIComponent(toolId)}`),
|
|
203
203
|
method: "PATCH",
|
|
204
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
204
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.64", "User-Agent": "@letta-ai/letta-client/0.1.64", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
205
205
|
contentType: "application/json",
|
|
206
206
|
requestType: "json",
|
|
207
207
|
body: serializers.ToolUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -278,7 +278,7 @@ class Tools {
|
|
|
278
278
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
279
279
|
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/tools/"),
|
|
280
280
|
method: "GET",
|
|
281
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
281
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.64", "User-Agent": "@letta-ai/letta-client/0.1.64", "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),
|
|
282
282
|
contentType: "application/json",
|
|
283
283
|
queryParameters: _queryParams,
|
|
284
284
|
requestType: "json",
|
|
@@ -346,7 +346,7 @@ class Tools {
|
|
|
346
346
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
347
347
|
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/tools/"),
|
|
348
348
|
method: "POST",
|
|
349
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
349
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.64", "User-Agent": "@letta-ai/letta-client/0.1.64", "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),
|
|
350
350
|
contentType: "application/json",
|
|
351
351
|
requestType: "json",
|
|
352
352
|
body: serializers.ToolCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -414,7 +414,7 @@ class Tools {
|
|
|
414
414
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
415
415
|
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/tools/"),
|
|
416
416
|
method: "PUT",
|
|
417
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
417
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.64", "User-Agent": "@letta-ai/letta-client/0.1.64", "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
418
|
contentType: "application/json",
|
|
419
419
|
requestType: "json",
|
|
420
420
|
body: serializers.ToolCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -479,7 +479,7 @@ class Tools {
|
|
|
479
479
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
480
480
|
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/tools/add-base-tools"),
|
|
481
481
|
method: "POST",
|
|
482
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
482
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.64", "User-Agent": "@letta-ai/letta-client/0.1.64", "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),
|
|
483
483
|
contentType: "application/json",
|
|
484
484
|
requestType: "json",
|
|
485
485
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -549,7 +549,7 @@ class Tools {
|
|
|
549
549
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
550
550
|
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/tools/run"),
|
|
551
551
|
method: "POST",
|
|
552
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
552
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.64", "User-Agent": "@letta-ai/letta-client/0.1.64", "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),
|
|
553
553
|
contentType: "application/json",
|
|
554
554
|
requestType: "json",
|
|
555
555
|
body: serializers.ToolRunFromSource.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -614,7 +614,7 @@ class Tools {
|
|
|
614
614
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
615
615
|
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/tools/composio/apps"),
|
|
616
616
|
method: "GET",
|
|
617
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
617
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.64", "User-Agent": "@letta-ai/letta-client/0.1.64", "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),
|
|
618
618
|
contentType: "application/json",
|
|
619
619
|
requestType: "json",
|
|
620
620
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -679,7 +679,7 @@ class Tools {
|
|
|
679
679
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
680
680
|
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/tools/composio/apps/${encodeURIComponent(composioAppName)}/actions`),
|
|
681
681
|
method: "GET",
|
|
682
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
682
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.64", "User-Agent": "@letta-ai/letta-client/0.1.64", "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),
|
|
683
683
|
contentType: "application/json",
|
|
684
684
|
requestType: "json",
|
|
685
685
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -744,7 +744,7 @@ class Tools {
|
|
|
744
744
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
745
745
|
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/tools/composio/${encodeURIComponent(composioActionName)}`),
|
|
746
746
|
method: "POST",
|
|
747
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
747
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.64", "User-Agent": "@letta-ai/letta-client/0.1.64", "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),
|
|
748
748
|
contentType: "application/json",
|
|
749
749
|
requestType: "json",
|
|
750
750
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -808,7 +808,7 @@ class Tools {
|
|
|
808
808
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
809
809
|
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/tools/mcp/servers"),
|
|
810
810
|
method: "GET",
|
|
811
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
811
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.64", "User-Agent": "@letta-ai/letta-client/0.1.64", "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),
|
|
812
812
|
contentType: "application/json",
|
|
813
813
|
requestType: "json",
|
|
814
814
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -856,6 +856,76 @@ class Tools {
|
|
|
856
856
|
}
|
|
857
857
|
});
|
|
858
858
|
}
|
|
859
|
+
/**
|
|
860
|
+
* Add a new MCP server to the Letta MCP server config
|
|
861
|
+
*
|
|
862
|
+
* @param {Letta.AddMcpServerRequest} request
|
|
863
|
+
* @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
|
|
864
|
+
*
|
|
865
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
866
|
+
*
|
|
867
|
+
* @example
|
|
868
|
+
* await client.tools.addMcpServer({
|
|
869
|
+
* serverName: "server_name",
|
|
870
|
+
* command: "command",
|
|
871
|
+
* args: ["args"]
|
|
872
|
+
* })
|
|
873
|
+
*/
|
|
874
|
+
addMcpServer(request, requestOptions) {
|
|
875
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
876
|
+
var _a, _b, _c;
|
|
877
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
878
|
+
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/tools/mcp/servers"),
|
|
879
|
+
method: "PUT",
|
|
880
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.64", "User-Agent": "@letta-ai/letta-client/0.1.64", "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),
|
|
881
|
+
contentType: "application/json",
|
|
882
|
+
requestType: "json",
|
|
883
|
+
body: serializers.AddMcpServerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
884
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
885
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
886
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
887
|
+
});
|
|
888
|
+
if (_response.ok) {
|
|
889
|
+
return serializers.tools.addMcpServer.Response.parseOrThrow(_response.body, {
|
|
890
|
+
unrecognizedObjectKeys: "passthrough",
|
|
891
|
+
allowUnrecognizedUnionMembers: true,
|
|
892
|
+
allowUnrecognizedEnumValues: true,
|
|
893
|
+
skipValidation: true,
|
|
894
|
+
breadcrumbsPrefix: ["response"],
|
|
895
|
+
});
|
|
896
|
+
}
|
|
897
|
+
if (_response.error.reason === "status-code") {
|
|
898
|
+
switch (_response.error.statusCode) {
|
|
899
|
+
case 422:
|
|
900
|
+
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
901
|
+
unrecognizedObjectKeys: "passthrough",
|
|
902
|
+
allowUnrecognizedUnionMembers: true,
|
|
903
|
+
allowUnrecognizedEnumValues: true,
|
|
904
|
+
skipValidation: true,
|
|
905
|
+
breadcrumbsPrefix: ["response"],
|
|
906
|
+
}));
|
|
907
|
+
default:
|
|
908
|
+
throw new errors.LettaError({
|
|
909
|
+
statusCode: _response.error.statusCode,
|
|
910
|
+
body: _response.error.body,
|
|
911
|
+
});
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
switch (_response.error.reason) {
|
|
915
|
+
case "non-json":
|
|
916
|
+
throw new errors.LettaError({
|
|
917
|
+
statusCode: _response.error.statusCode,
|
|
918
|
+
body: _response.error.rawBody,
|
|
919
|
+
});
|
|
920
|
+
case "timeout":
|
|
921
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling PUT /v1/tools/mcp/servers.");
|
|
922
|
+
case "unknown":
|
|
923
|
+
throw new errors.LettaError({
|
|
924
|
+
message: _response.error.errorMessage,
|
|
925
|
+
});
|
|
926
|
+
}
|
|
927
|
+
});
|
|
928
|
+
}
|
|
859
929
|
/**
|
|
860
930
|
* Get a list of all tools for a specific MCP server
|
|
861
931
|
*
|
|
@@ -873,7 +943,7 @@ class Tools {
|
|
|
873
943
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
874
944
|
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/tools/mcp/servers/${encodeURIComponent(mcpServerName)}/tools`),
|
|
875
945
|
method: "GET",
|
|
876
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
946
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.64", "User-Agent": "@letta-ai/letta-client/0.1.64", "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),
|
|
877
947
|
contentType: "application/json",
|
|
878
948
|
requestType: "json",
|
|
879
949
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -922,7 +992,7 @@ class Tools {
|
|
|
922
992
|
});
|
|
923
993
|
}
|
|
924
994
|
/**
|
|
925
|
-
*
|
|
995
|
+
* Register a new MCP tool as a Letta server by MCP server + tool name
|
|
926
996
|
*
|
|
927
997
|
* @param {string} mcpServerName
|
|
928
998
|
* @param {string} mcpToolName
|
|
@@ -939,7 +1009,7 @@ class Tools {
|
|
|
939
1009
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
940
1010
|
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/tools/mcp/servers/${encodeURIComponent(mcpServerName)}/${encodeURIComponent(mcpToolName)}`),
|
|
941
1011
|
method: "POST",
|
|
942
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
1012
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.64", "User-Agent": "@letta-ai/letta-client/0.1.64", "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),
|
|
943
1013
|
contentType: "application/json",
|
|
944
1014
|
requestType: "json",
|
|
945
1015
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -987,6 +1057,71 @@ class Tools {
|
|
|
987
1057
|
}
|
|
988
1058
|
});
|
|
989
1059
|
}
|
|
1060
|
+
/**
|
|
1061
|
+
* Add a new MCP server to the Letta MCP server config
|
|
1062
|
+
*
|
|
1063
|
+
* @param {string} mcpServerName
|
|
1064
|
+
* @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
|
|
1065
|
+
*
|
|
1066
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
1067
|
+
*
|
|
1068
|
+
* @example
|
|
1069
|
+
* await client.tools.deleteMcpServer("mcp_server_name")
|
|
1070
|
+
*/
|
|
1071
|
+
deleteMcpServer(mcpServerName, requestOptions) {
|
|
1072
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1073
|
+
var _a, _b, _c;
|
|
1074
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1075
|
+
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/tools/mcp/servers/${encodeURIComponent(mcpServerName)}`),
|
|
1076
|
+
method: "DELETE",
|
|
1077
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.64", "User-Agent": "@letta-ai/letta-client/0.1.64", "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),
|
|
1078
|
+
contentType: "application/json",
|
|
1079
|
+
requestType: "json",
|
|
1080
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1081
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1082
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1083
|
+
});
|
|
1084
|
+
if (_response.ok) {
|
|
1085
|
+
return serializers.tools.deleteMcpServer.Response.parseOrThrow(_response.body, {
|
|
1086
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1087
|
+
allowUnrecognizedUnionMembers: true,
|
|
1088
|
+
allowUnrecognizedEnumValues: true,
|
|
1089
|
+
skipValidation: true,
|
|
1090
|
+
breadcrumbsPrefix: ["response"],
|
|
1091
|
+
});
|
|
1092
|
+
}
|
|
1093
|
+
if (_response.error.reason === "status-code") {
|
|
1094
|
+
switch (_response.error.statusCode) {
|
|
1095
|
+
case 422:
|
|
1096
|
+
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
1097
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1098
|
+
allowUnrecognizedUnionMembers: true,
|
|
1099
|
+
allowUnrecognizedEnumValues: true,
|
|
1100
|
+
skipValidation: true,
|
|
1101
|
+
breadcrumbsPrefix: ["response"],
|
|
1102
|
+
}));
|
|
1103
|
+
default:
|
|
1104
|
+
throw new errors.LettaError({
|
|
1105
|
+
statusCode: _response.error.statusCode,
|
|
1106
|
+
body: _response.error.body,
|
|
1107
|
+
});
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
switch (_response.error.reason) {
|
|
1111
|
+
case "non-json":
|
|
1112
|
+
throw new errors.LettaError({
|
|
1113
|
+
statusCode: _response.error.statusCode,
|
|
1114
|
+
body: _response.error.rawBody,
|
|
1115
|
+
});
|
|
1116
|
+
case "timeout":
|
|
1117
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling DELETE /v1/tools/mcp/servers/{mcp_server_name}.");
|
|
1118
|
+
case "unknown":
|
|
1119
|
+
throw new errors.LettaError({
|
|
1120
|
+
message: _response.error.errorMessage,
|
|
1121
|
+
});
|
|
1122
|
+
}
|
|
1123
|
+
});
|
|
1124
|
+
}
|
|
990
1125
|
_getCustomAuthorizationHeaders() {
|
|
991
1126
|
return __awaiter(this, void 0, void 0, function* () {
|
|
992
1127
|
const tokenValue = yield core.Supplier.get(this._options.token);
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Letta from "../../../index";
|
|
5
|
-
export type ListMcpServersResponseValue = Letta.SseServerConfig | Letta.
|
|
5
|
+
export type ListMcpServersResponseValue = Letta.SseServerConfig | Letta.StdioServerConfig;
|
|
@@ -15,3 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./ListMcpServersResponseValue"), exports);
|
|
18
|
+
__exportStar(require("./AddMcpServerRequest"), exports);
|
|
19
|
+
__exportStar(require("./AddMcpServerResponseItem"), exports);
|
|
20
|
+
__exportStar(require("./DeleteMcpServerResponseItem"), exports);
|
|
@@ -81,7 +81,7 @@ class Voice {
|
|
|
81
81
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
82
82
|
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/voice/${encodeURIComponent(agentId)}/chat/completions`),
|
|
83
83
|
method: "POST",
|
|
84
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
84
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.64", "User-Agent": "@letta-ai/letta-client/0.1.64", "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
|
body: serializers.CreateVoiceChatCompletionsRequest.jsonOrThrow(request, {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Letta from "../index";
|
|
5
|
+
export interface AgentSchema {
|
|
6
|
+
agentType: string;
|
|
7
|
+
coreMemory: Letta.CoreMemoryBlockSchema[];
|
|
8
|
+
createdAt: string;
|
|
9
|
+
description: string;
|
|
10
|
+
embeddingConfig: Letta.EmbeddingConfig;
|
|
11
|
+
groups: unknown[];
|
|
12
|
+
identities: unknown[];
|
|
13
|
+
isDeleted: boolean;
|
|
14
|
+
llmConfig: Letta.LlmConfig;
|
|
15
|
+
messageBufferAutoclear: boolean;
|
|
16
|
+
messages: Letta.MessageSchema[];
|
|
17
|
+
metadata: Record<string, unknown>;
|
|
18
|
+
multiAgentGroup?: unknown;
|
|
19
|
+
name: string;
|
|
20
|
+
system: string;
|
|
21
|
+
tags: Letta.TagSchema[];
|
|
22
|
+
toolExecEnvironmentVariables: Letta.ToolEnvVarSchema[];
|
|
23
|
+
toolRules: Letta.ToolRuleSchema[];
|
|
24
|
+
tools: Letta.ToolSchema[];
|
|
25
|
+
updatedAt: string;
|
|
26
|
+
version: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface CoreMemoryBlockSchema {
|
|
5
|
+
createdAt: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
identities: unknown[];
|
|
8
|
+
isDeleted: boolean;
|
|
9
|
+
isTemplate: boolean;
|
|
10
|
+
label: string;
|
|
11
|
+
limit: number;
|
|
12
|
+
metadata?: Record<string, unknown>;
|
|
13
|
+
templateName?: string;
|
|
14
|
+
updatedAt: string;
|
|
15
|
+
value: string;
|
|
16
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type McpServerType = "sse" | "
|
|
4
|
+
export type McpServerType = "sse" | "stdio";
|
|
5
5
|
export declare const McpServerType: {
|
|
6
6
|
readonly Sse: "sse";
|
|
7
|
-
readonly
|
|
7
|
+
readonly Stdio: "stdio";
|
|
8
8
|
};
|