@letta-ai/letta-client 0.1.129 → 0.1.131
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.js +10 -10
- 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/groups/client/Client.js +1 -1
- package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
- package/api/resources/agents/resources/messages/client/Client.d.ts +11 -9
- package/api/resources/agents/resources/messages/client/Client.js +23 -15
- package/api/resources/agents/resources/messages/client/requests/MessagesCreateAsyncRequest.d.ts +25 -0
- package/api/resources/agents/resources/messages/client/requests/index.d.ts +1 -0
- package/api/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +1 -1
- package/api/resources/agents/resources/passages/client/Client.js +4 -4
- package/api/resources/agents/resources/sources/client/Client.js +3 -3
- package/api/resources/agents/resources/templates/client/Client.js +3 -3
- package/api/resources/agents/resources/tools/client/Client.js +3 -3
- package/api/resources/batches/client/Client.js +4 -4
- package/api/resources/blocks/client/Client.js +6 -6
- package/api/resources/blocks/resources/agents/client/Client.js +1 -1
- package/api/resources/clientSideAccessTokens/client/Client.js +2 -2
- package/api/resources/embeddingModels/client/Client.js +1 -1
- package/api/resources/groups/client/Client.js +6 -6
- package/api/resources/groups/resources/messages/client/Client.js +5 -5
- package/api/resources/health/client/Client.js +1 -1
- package/api/resources/identities/client/Client.js +7 -7
- package/api/resources/identities/resources/properties/client/Client.js +1 -1
- package/api/resources/index.d.ts +1 -2
- package/api/resources/index.js +2 -3
- package/api/resources/jobs/client/Client.js +4 -4
- package/api/resources/messages/client/Client.js +1 -1
- package/api/resources/models/client/Client.js +1 -1
- package/api/resources/projects/client/Client.js +1 -1
- package/api/resources/providers/client/Client.js +5 -5
- package/api/resources/runs/client/Client.js +4 -4
- package/api/resources/runs/resources/messages/client/Client.js +1 -1
- package/api/resources/runs/resources/steps/client/Client.js +1 -1
- package/api/resources/runs/resources/usage/client/Client.js +1 -1
- package/api/resources/sources/client/Client.js +7 -7
- 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/tags/client/Client.js +1 -1
- package/api/resources/telemetry/client/Client.js +1 -1
- package/api/resources/templates/client/Client.js +1 -1
- package/api/resources/templates/resources/agents/client/Client.js +1 -1
- package/api/resources/tools/client/Client.js +17 -17
- package/api/resources/tools/client/requests/ToolRunFromSource.d.ts +3 -0
- package/api/resources/tools/client/requests/ToolUpdate.d.ts +3 -0
- package/api/resources/voice/client/Client.d.ts +1 -5
- package/api/resources/voice/client/Client.js +3 -7
- package/api/resources/voice/client/requests/CreateVoiceChatCompletionsRequest.d.ts +2 -7
- package/api/resources/voice/index.d.ts +0 -1
- package/api/resources/voice/index.js +0 -1
- package/api/types/BatchJob.d.ts +2 -0
- package/api/types/Job.d.ts +2 -0
- package/api/types/LettaResponse.d.ts +1 -0
- package/api/types/LettaStopReason.d.ts +13 -0
- package/api/types/McpServerType.d.ts +2 -1
- package/api/types/McpServerType.js +1 -0
- package/api/types/McpTool.d.ts +2 -0
- package/api/types/Run.d.ts +2 -0
- package/api/types/SseServerConfig.d.ts +16 -0
- package/api/types/StopReasonType.d.ts +12 -0
- package/api/types/StopReasonType.js +14 -0
- package/api/types/Tool.d.ts +2 -0
- package/api/types/ToolAnnotations.d.ts +22 -0
- package/api/types/ToolAnnotations.js +5 -0
- package/api/types/ToolCreate.d.ts +3 -0
- package/api/types/index.d.ts +3 -0
- package/api/types/index.js +3 -0
- package/dist/api/resources/agents/client/Client.js +10 -10
- 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/groups/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/messages/client/Client.d.ts +11 -9
- package/dist/api/resources/agents/resources/messages/client/Client.js +23 -15
- package/dist/api/resources/agents/resources/messages/client/requests/MessagesCreateAsyncRequest.d.ts +25 -0
- package/dist/api/resources/agents/resources/messages/client/requests/MessagesCreateAsyncRequest.js +5 -0
- package/dist/api/resources/agents/resources/messages/client/requests/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +1 -1
- package/dist/api/resources/agents/resources/passages/client/Client.js +4 -4
- package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
- package/dist/api/resources/batches/client/Client.js +4 -4
- package/dist/api/resources/blocks/client/Client.js +6 -6
- package/dist/api/resources/blocks/resources/agents/client/Client.js +1 -1
- package/dist/api/resources/clientSideAccessTokens/client/Client.js +2 -2
- package/dist/api/resources/embeddingModels/client/Client.js +1 -1
- package/dist/api/resources/groups/client/Client.js +6 -6
- package/dist/api/resources/groups/resources/messages/client/Client.js +5 -5
- package/dist/api/resources/health/client/Client.js +1 -1
- package/dist/api/resources/identities/client/Client.js +7 -7
- package/dist/api/resources/identities/resources/properties/client/Client.js +1 -1
- package/dist/api/resources/index.d.ts +1 -2
- package/dist/api/resources/index.js +2 -3
- package/dist/api/resources/jobs/client/Client.js +4 -4
- package/dist/api/resources/messages/client/Client.js +1 -1
- package/dist/api/resources/models/client/Client.js +1 -1
- package/dist/api/resources/projects/client/Client.js +1 -1
- package/dist/api/resources/providers/client/Client.js +5 -5
- package/dist/api/resources/runs/client/Client.js +4 -4
- package/dist/api/resources/runs/resources/messages/client/Client.js +1 -1
- package/dist/api/resources/runs/resources/steps/client/Client.js +1 -1
- package/dist/api/resources/runs/resources/usage/client/Client.js +1 -1
- package/dist/api/resources/sources/client/Client.js +7 -7
- 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/tags/client/Client.js +1 -1
- package/dist/api/resources/telemetry/client/Client.js +1 -1
- package/dist/api/resources/templates/client/Client.js +1 -1
- package/dist/api/resources/templates/resources/agents/client/Client.js +1 -1
- package/dist/api/resources/tools/client/Client.js +17 -17
- package/dist/api/resources/tools/client/requests/ToolRunFromSource.d.ts +3 -0
- package/dist/api/resources/tools/client/requests/ToolUpdate.d.ts +3 -0
- package/dist/api/resources/voice/client/Client.d.ts +1 -5
- package/dist/api/resources/voice/client/Client.js +3 -7
- package/dist/api/resources/voice/client/requests/CreateVoiceChatCompletionsRequest.d.ts +2 -7
- package/dist/api/resources/voice/index.d.ts +0 -1
- package/dist/api/resources/voice/index.js +0 -1
- package/dist/api/types/BatchJob.d.ts +2 -0
- package/dist/api/types/Job.d.ts +2 -0
- package/dist/api/types/LettaResponse.d.ts +1 -0
- package/dist/api/types/LettaStopReason.d.ts +13 -0
- package/dist/api/types/LettaStopReason.js +5 -0
- package/dist/api/types/McpServerType.d.ts +2 -1
- package/dist/api/types/McpServerType.js +1 -0
- package/dist/api/types/McpTool.d.ts +2 -0
- package/dist/api/types/Run.d.ts +2 -0
- package/dist/api/types/SseServerConfig.d.ts +16 -0
- package/dist/api/types/StopReasonType.d.ts +12 -0
- package/dist/api/types/StopReasonType.js +14 -0
- package/dist/api/types/Tool.d.ts +2 -0
- package/dist/api/types/ToolAnnotations.d.ts +22 -0
- package/dist/api/types/ToolAnnotations.js +5 -0
- package/dist/api/types/ToolCreate.d.ts +3 -0
- package/dist/api/types/index.d.ts +3 -0
- package/dist/api/types/index.js +3 -0
- package/dist/serialization/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +2 -1
- package/dist/serialization/resources/agents/resources/messages/types/LettaStreamingResponse.js +2 -0
- package/dist/serialization/resources/index.d.ts +1 -2
- package/dist/serialization/resources/index.js +2 -3
- package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -0
- package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.js +2 -0
- package/dist/serialization/resources/tools/client/requests/ToolUpdate.d.ts +2 -0
- package/dist/serialization/resources/tools/client/requests/ToolUpdate.js +2 -0
- package/dist/serialization/resources/voice/client/createVoiceChatCompletions.d.ts +9 -0
- package/dist/serialization/resources/voice/{types/CreateVoiceChatCompletionsRequestBody.js → client/createVoiceChatCompletions.js} +2 -4
- package/dist/serialization/resources/voice/client/index.d.ts +1 -0
- package/dist/serialization/resources/voice/client/index.js +37 -0
- package/dist/serialization/resources/voice/index.d.ts +1 -1
- package/dist/serialization/resources/voice/index.js +1 -1
- package/dist/serialization/types/BatchJob.d.ts +1 -0
- package/dist/serialization/types/BatchJob.js +1 -0
- package/dist/serialization/types/Job.d.ts +1 -0
- package/dist/serialization/types/Job.js +1 -0
- package/dist/serialization/types/LettaResponse.d.ts +2 -0
- package/dist/serialization/types/LettaResponse.js +2 -0
- package/dist/serialization/types/LettaStopReason.d.ts +14 -0
- package/dist/serialization/types/LettaStopReason.js +45 -0
- package/dist/serialization/types/McpServerType.d.ts +1 -1
- package/dist/serialization/types/McpServerType.js +1 -1
- package/dist/serialization/types/McpTool.d.ts +2 -0
- package/dist/serialization/types/McpTool.js +2 -0
- package/dist/serialization/types/Run.d.ts +1 -0
- package/dist/serialization/types/Run.js +1 -0
- package/dist/serialization/types/SseServerConfig.d.ts +3 -0
- package/dist/serialization/types/SseServerConfig.js +3 -0
- package/dist/serialization/types/StopReasonType.d.ts +10 -0
- package/dist/serialization/types/StopReasonType.js +41 -0
- package/dist/serialization/types/Tool.d.ts +2 -0
- package/dist/serialization/types/Tool.js +2 -0
- package/dist/serialization/types/ToolAnnotations.d.ts +17 -0
- package/dist/serialization/types/ToolAnnotations.js +49 -0
- package/dist/serialization/types/ToolCreate.d.ts +2 -0
- package/dist/serialization/types/ToolCreate.js +2 -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 +15 -19
- package/serialization/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +2 -1
- package/serialization/resources/agents/resources/messages/types/LettaStreamingResponse.js +2 -0
- package/serialization/resources/index.d.ts +1 -2
- package/serialization/resources/index.js +2 -3
- package/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -0
- package/serialization/resources/tools/client/requests/ToolRunFromSource.js +2 -0
- package/serialization/resources/tools/client/requests/ToolUpdate.d.ts +2 -0
- package/serialization/resources/tools/client/requests/ToolUpdate.js +2 -0
- package/serialization/resources/voice/client/createVoiceChatCompletions.d.ts +9 -0
- package/serialization/resources/voice/{types/CreateVoiceChatCompletionsRequestBody.js → client/createVoiceChatCompletions.js} +2 -4
- package/serialization/resources/voice/client/index.d.ts +1 -0
- package/serialization/resources/voice/client/index.js +37 -0
- package/serialization/resources/voice/index.d.ts +1 -1
- package/serialization/resources/voice/index.js +1 -1
- package/serialization/types/BatchJob.d.ts +1 -0
- package/serialization/types/BatchJob.js +1 -0
- package/serialization/types/Job.d.ts +1 -0
- package/serialization/types/Job.js +1 -0
- package/serialization/types/LettaResponse.d.ts +2 -0
- package/serialization/types/LettaResponse.js +2 -0
- package/serialization/types/LettaStopReason.d.ts +14 -0
- package/serialization/types/LettaStopReason.js +45 -0
- package/serialization/types/McpServerType.d.ts +1 -1
- package/serialization/types/McpServerType.js +1 -1
- package/serialization/types/McpTool.d.ts +2 -0
- package/serialization/types/McpTool.js +2 -0
- package/serialization/types/Run.d.ts +1 -0
- package/serialization/types/Run.js +1 -0
- package/serialization/types/SseServerConfig.d.ts +3 -0
- package/serialization/types/SseServerConfig.js +3 -0
- package/serialization/types/StopReasonType.d.ts +10 -0
- package/serialization/types/StopReasonType.js +41 -0
- package/serialization/types/Tool.d.ts +2 -0
- package/serialization/types/Tool.js +2 -0
- package/serialization/types/ToolAnnotations.d.ts +17 -0
- package/serialization/types/ToolAnnotations.js +49 -0
- package/serialization/types/ToolCreate.d.ts +2 -0
- package/serialization/types/ToolCreate.js +2 -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
- package/api/resources/voice/types/CreateVoiceChatCompletionsRequestBody.d.ts +0 -5
- package/api/resources/voice/types/index.d.ts +0 -1
- package/api/resources/voice/types/index.js +0 -17
- package/dist/api/resources/voice/types/CreateVoiceChatCompletionsRequestBody.d.ts +0 -5
- package/dist/api/resources/voice/types/index.d.ts +0 -1
- package/dist/api/resources/voice/types/index.js +0 -17
- package/dist/serialization/resources/voice/types/CreateVoiceChatCompletionsRequestBody.d.ts +0 -12
- package/dist/serialization/resources/voice/types/index.d.ts +0 -1
- package/dist/serialization/resources/voice/types/index.js +0 -17
- package/serialization/resources/voice/types/CreateVoiceChatCompletionsRequestBody.d.ts +0 -12
- package/serialization/resources/voice/types/index.d.ts +0 -1
- package/serialization/resources/voice/types/index.js +0 -17
- /package/api/resources/{voice/types/CreateVoiceChatCompletionsRequestBody.js → agents/resources/messages/client/requests/MessagesCreateAsyncRequest.js} +0 -0
- /package/{dist/api/resources/voice/types/CreateVoiceChatCompletionsRequestBody.js → api/types/LettaStopReason.js} +0 -0
package/api/types/Run.d.ts
CHANGED
|
@@ -35,6 +35,8 @@ export interface Run {
|
|
|
35
35
|
callbackSentAt?: Date;
|
|
36
36
|
/** HTTP status code returned by the callback endpoint. */
|
|
37
37
|
callbackStatusCode?: number;
|
|
38
|
+
/** Optional error message from attempting to POST the callback endpoint. */
|
|
39
|
+
callbackError?: string;
|
|
38
40
|
/** The human-friendly ID of the Run */
|
|
39
41
|
id?: string;
|
|
40
42
|
/** The request configuration for the run. */
|
|
@@ -2,10 +2,26 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Letta from "../index";
|
|
5
|
+
/**
|
|
6
|
+
* Configuration for an MCP server using SSE
|
|
7
|
+
*
|
|
8
|
+
* Authentication can be provided in multiple ways:
|
|
9
|
+
* 1. Using auth_header + auth_token: Will add a specific header with the token
|
|
10
|
+
* Example: auth_header="Authorization", auth_token="Bearer abc123"
|
|
11
|
+
*
|
|
12
|
+
* 2. Using the custom_headers dict: For more complex authentication scenarios
|
|
13
|
+
* Example: custom_headers={"X-API-Key": "abc123", "X-Custom-Header": "value"}
|
|
14
|
+
*/
|
|
5
15
|
export interface SseServerConfig {
|
|
6
16
|
/** The name of the server */
|
|
7
17
|
serverName: string;
|
|
8
18
|
type?: Letta.McpServerType;
|
|
9
19
|
/** The URL of the server (MCP SSE client will connect to this URL) */
|
|
10
20
|
serverUrl: string;
|
|
21
|
+
/** The name of the authentication header (e.g., 'Authorization') */
|
|
22
|
+
authHeader?: string;
|
|
23
|
+
/** The authentication token or API key value */
|
|
24
|
+
authToken?: string;
|
|
25
|
+
/** Custom HTTP headers to include with SSE requests */
|
|
26
|
+
customHeaders?: Record<string, string | undefined>;
|
|
11
27
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export type StopReasonType = "end_turn" | "error" | "invalid_tool_call" | "max_steps" | "no_tool_call" | "tool_rule";
|
|
5
|
+
export declare const StopReasonType: {
|
|
6
|
+
readonly EndTurn: "end_turn";
|
|
7
|
+
readonly Error: "error";
|
|
8
|
+
readonly InvalidToolCall: "invalid_tool_call";
|
|
9
|
+
readonly MaxSteps: "max_steps";
|
|
10
|
+
readonly NoToolCall: "no_tool_call";
|
|
11
|
+
readonly ToolRule: "tool_rule";
|
|
12
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
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.StopReasonType = void 0;
|
|
7
|
+
exports.StopReasonType = {
|
|
8
|
+
EndTurn: "end_turn",
|
|
9
|
+
Error: "error",
|
|
10
|
+
InvalidToolCall: "invalid_tool_call",
|
|
11
|
+
MaxSteps: "max_steps",
|
|
12
|
+
NoToolCall: "no_tool_call",
|
|
13
|
+
ToolRule: "tool_rule",
|
|
14
|
+
};
|
package/api/types/Tool.d.ts
CHANGED
|
@@ -33,6 +33,8 @@ export interface Tool {
|
|
|
33
33
|
argsJsonSchema?: Record<string, unknown>;
|
|
34
34
|
/** The maximum number of characters in the response. */
|
|
35
35
|
returnCharLimit?: number;
|
|
36
|
+
/** Optional list of pip packages required by this tool. */
|
|
37
|
+
pipRequirements?: Letta.PipRequirement[];
|
|
36
38
|
/** The id of the user that made this Tool. */
|
|
37
39
|
createdById?: string;
|
|
38
40
|
/** The id of the user that made this Tool. */
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Additional properties describing a Tool to clients.
|
|
6
|
+
*
|
|
7
|
+
* NOTE: all properties in ToolAnnotations are **hints**.
|
|
8
|
+
* They are not guaranteed to provide a faithful description of
|
|
9
|
+
* tool behavior (including descriptive properties like `title`).
|
|
10
|
+
*
|
|
11
|
+
* Clients should never make tool use decisions based on ToolAnnotations
|
|
12
|
+
* received from untrusted servers.
|
|
13
|
+
*/
|
|
14
|
+
export interface ToolAnnotations {
|
|
15
|
+
title?: string;
|
|
16
|
+
readOnlyHint?: boolean;
|
|
17
|
+
destructiveHint?: boolean;
|
|
18
|
+
idempotentHint?: boolean;
|
|
19
|
+
openWorldHint?: boolean;
|
|
20
|
+
/** Accepts any additional properties */
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as Letta from "../index";
|
|
4
5
|
export interface ToolCreate {
|
|
5
6
|
/** The description of the tool. */
|
|
6
7
|
description?: string;
|
|
@@ -16,4 +17,6 @@ export interface ToolCreate {
|
|
|
16
17
|
argsJsonSchema?: Record<string, unknown>;
|
|
17
18
|
/** The maximum number of characters in the response. */
|
|
18
19
|
returnCharLimit?: number;
|
|
20
|
+
/** Optional list of pip packages required by this tool. */
|
|
21
|
+
pipRequirements?: Letta.PipRequirement[];
|
|
19
22
|
}
|
package/api/types/index.d.ts
CHANGED
|
@@ -130,6 +130,7 @@ export * from "./LettaImage";
|
|
|
130
130
|
export * from "./LettaRequest";
|
|
131
131
|
export * from "./LettaRequestConfig";
|
|
132
132
|
export * from "./LettaResponse";
|
|
133
|
+
export * from "./LettaStopReason";
|
|
133
134
|
export * from "./LettaStreamingRequest";
|
|
134
135
|
export * from "./LettaUsageStatistics";
|
|
135
136
|
export * from "./LocalSandboxConfig";
|
|
@@ -185,6 +186,7 @@ export * from "./SleeptimeManagerUpdate";
|
|
|
185
186
|
export * from "./Source";
|
|
186
187
|
export * from "./StdioServerConfig";
|
|
187
188
|
export * from "./Step";
|
|
189
|
+
export * from "./StopReasonType";
|
|
188
190
|
export * from "./SupervisorManager";
|
|
189
191
|
export * from "./SupervisorManagerUpdate";
|
|
190
192
|
export * from "./SystemMessage";
|
|
@@ -193,6 +195,7 @@ export * from "./TerminalToolRule";
|
|
|
193
195
|
export * from "./TextContent";
|
|
194
196
|
export * from "./TextResponseFormat";
|
|
195
197
|
export * from "./Tool";
|
|
198
|
+
export * from "./ToolAnnotations";
|
|
196
199
|
export * from "./ToolCall";
|
|
197
200
|
export * from "./ToolCallContent";
|
|
198
201
|
export * from "./ToolCallDelta";
|
package/api/types/index.js
CHANGED
|
@@ -146,6 +146,7 @@ __exportStar(require("./LettaImage"), exports);
|
|
|
146
146
|
__exportStar(require("./LettaRequest"), exports);
|
|
147
147
|
__exportStar(require("./LettaRequestConfig"), exports);
|
|
148
148
|
__exportStar(require("./LettaResponse"), exports);
|
|
149
|
+
__exportStar(require("./LettaStopReason"), exports);
|
|
149
150
|
__exportStar(require("./LettaStreamingRequest"), exports);
|
|
150
151
|
__exportStar(require("./LettaUsageStatistics"), exports);
|
|
151
152
|
__exportStar(require("./LocalSandboxConfig"), exports);
|
|
@@ -201,6 +202,7 @@ __exportStar(require("./SleeptimeManagerUpdate"), exports);
|
|
|
201
202
|
__exportStar(require("./Source"), exports);
|
|
202
203
|
__exportStar(require("./StdioServerConfig"), exports);
|
|
203
204
|
__exportStar(require("./Step"), exports);
|
|
205
|
+
__exportStar(require("./StopReasonType"), exports);
|
|
204
206
|
__exportStar(require("./SupervisorManager"), exports);
|
|
205
207
|
__exportStar(require("./SupervisorManagerUpdate"), exports);
|
|
206
208
|
__exportStar(require("./SystemMessage"), exports);
|
|
@@ -209,6 +211,7 @@ __exportStar(require("./TerminalToolRule"), exports);
|
|
|
209
211
|
__exportStar(require("./TextContent"), exports);
|
|
210
212
|
__exportStar(require("./TextResponseFormat"), exports);
|
|
211
213
|
__exportStar(require("./Tool"), exports);
|
|
214
|
+
__exportStar(require("./ToolAnnotations"), exports);
|
|
212
215
|
__exportStar(require("./ToolCall"), exports);
|
|
213
216
|
__exportStar(require("./ToolCallContent"), exports);
|
|
214
217
|
__exportStar(require("./ToolCallDelta"), exports);
|
|
@@ -199,7 +199,7 @@ class Agents {
|
|
|
199
199
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
200
200
|
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/"),
|
|
201
201
|
method: "GET",
|
|
202
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
202
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "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),
|
|
203
203
|
contentType: "application/json",
|
|
204
204
|
queryParameters: _queryParams,
|
|
205
205
|
requestType: "json",
|
|
@@ -266,7 +266,7 @@ class Agents {
|
|
|
266
266
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
267
267
|
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/"),
|
|
268
268
|
method: "POST",
|
|
269
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
269
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "X-Project": project != null ? project : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
270
270
|
contentType: "application/json",
|
|
271
271
|
requestType: "json",
|
|
272
272
|
body: serializers.CreateAgentRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -331,7 +331,7 @@ class Agents {
|
|
|
331
331
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
332
332
|
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/count"),
|
|
333
333
|
method: "GET",
|
|
334
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
334
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
335
335
|
contentType: "application/json",
|
|
336
336
|
requestType: "json",
|
|
337
337
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -396,7 +396,7 @@ class Agents {
|
|
|
396
396
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
397
397
|
url: (0, url_join_1.default)((_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)}/export`),
|
|
398
398
|
method: "GET",
|
|
399
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
399
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
400
400
|
contentType: "application/json",
|
|
401
401
|
requestType: "json",
|
|
402
402
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -478,7 +478,7 @@ class Agents {
|
|
|
478
478
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
479
479
|
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/import"),
|
|
480
480
|
method: "POST",
|
|
481
|
-
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.
|
|
481
|
+
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.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "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),
|
|
482
482
|
queryParameters: _queryParams,
|
|
483
483
|
requestType: "file",
|
|
484
484
|
duplex: _maybeEncodedRequest.duplex,
|
|
@@ -556,7 +556,7 @@ class Agents {
|
|
|
556
556
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
557
557
|
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)}`),
|
|
558
558
|
method: "GET",
|
|
559
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
559
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "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),
|
|
560
560
|
contentType: "application/json",
|
|
561
561
|
queryParameters: _queryParams,
|
|
562
562
|
requestType: "json",
|
|
@@ -622,7 +622,7 @@ class Agents {
|
|
|
622
622
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
623
623
|
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)}`),
|
|
624
624
|
method: "DELETE",
|
|
625
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
625
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "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),
|
|
626
626
|
contentType: "application/json",
|
|
627
627
|
requestType: "json",
|
|
628
628
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -682,7 +682,7 @@ class Agents {
|
|
|
682
682
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
683
683
|
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)}`),
|
|
684
684
|
method: "PATCH",
|
|
685
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
685
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "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),
|
|
686
686
|
contentType: "application/json",
|
|
687
687
|
requestType: "json",
|
|
688
688
|
body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -757,7 +757,7 @@ class Agents {
|
|
|
757
757
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
758
758
|
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)}/summarize`),
|
|
759
759
|
method: "POST",
|
|
760
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
760
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "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),
|
|
761
761
|
contentType: "application/json",
|
|
762
762
|
queryParameters: _queryParams,
|
|
763
763
|
requestType: "json",
|
|
@@ -823,7 +823,7 @@ class Agents {
|
|
|
823
823
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
824
824
|
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"),
|
|
825
825
|
method: "POST",
|
|
826
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
826
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "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),
|
|
827
827
|
contentType: "application/json",
|
|
828
828
|
requestType: "json",
|
|
829
829
|
body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -77,7 +77,7 @@ class Blocks {
|
|
|
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/blocks/${encodeURIComponent(blockLabel)}`),
|
|
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.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "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,
|
|
@@ -144,7 +144,7 @@ class Blocks {
|
|
|
144
144
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
145
145
|
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)}`),
|
|
146
146
|
method: "PATCH",
|
|
147
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
147
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
148
148
|
contentType: "application/json",
|
|
149
149
|
requestType: "json",
|
|
150
150
|
body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -210,7 +210,7 @@ class Blocks {
|
|
|
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`),
|
|
212
212
|
method: "GET",
|
|
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.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "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
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -276,7 +276,7 @@ class Blocks {
|
|
|
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/attach/${encodeURIComponent(blockId)}`),
|
|
278
278
|
method: "PATCH",
|
|
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.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "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 Blocks {
|
|
|
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/detach/${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.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "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,
|
|
@@ -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.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "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.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "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,
|
|
@@ -82,7 +82,7 @@ class Groups {
|
|
|
82
82
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
83
83
|
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)}/groups`),
|
|
84
84
|
method: "GET",
|
|
85
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
85
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
86
86
|
contentType: "application/json",
|
|
87
87
|
queryParameters: _queryParams,
|
|
88
88
|
requestType: "json",
|
|
@@ -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.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "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,
|
|
@@ -88,23 +88,25 @@ export declare class Messages {
|
|
|
88
88
|
* The actual processing happens in the background, and the status can be checked using the run ID.
|
|
89
89
|
*
|
|
90
90
|
* @param {string} agentId
|
|
91
|
-
* @param {Letta.
|
|
91
|
+
* @param {Letta.agents.MessagesCreateAsyncRequest} request
|
|
92
92
|
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
93
93
|
*
|
|
94
94
|
* @throws {@link Letta.UnprocessableEntityError}
|
|
95
95
|
*
|
|
96
96
|
* @example
|
|
97
97
|
* await client.agents.messages.createAsync("agent_id", {
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
98
|
+
* body: {
|
|
99
|
+
* messages: [{
|
|
100
|
+
* role: "user",
|
|
101
|
+
* content: [{
|
|
102
|
+
* type: "text",
|
|
103
|
+
* text: "text"
|
|
104
|
+
* }]
|
|
105
|
+
* }]
|
|
106
|
+
* }
|
|
105
107
|
* })
|
|
106
108
|
*/
|
|
107
|
-
createAsync(agentId: string, request: Letta.
|
|
109
|
+
createAsync(agentId: string, request: Letta.agents.MessagesCreateAsyncRequest, requestOptions?: Messages.RequestOptions): Promise<Letta.Run>;
|
|
108
110
|
/**
|
|
109
111
|
* Resets the messages for an agent
|
|
110
112
|
*
|
|
@@ -100,7 +100,7 @@ class Messages {
|
|
|
100
100
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
101
101
|
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`),
|
|
102
102
|
method: "GET",
|
|
103
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
103
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "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),
|
|
104
104
|
contentType: "application/json",
|
|
105
105
|
queryParameters: _queryParams,
|
|
106
106
|
requestType: "json",
|
|
@@ -176,7 +176,7 @@ class Messages {
|
|
|
176
176
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
177
177
|
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`),
|
|
178
178
|
method: "POST",
|
|
179
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
179
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "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),
|
|
180
180
|
contentType: "application/json",
|
|
181
181
|
requestType: "json",
|
|
182
182
|
body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -246,7 +246,7 @@ class Messages {
|
|
|
246
246
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
247
247
|
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)}`),
|
|
248
248
|
method: "PATCH",
|
|
249
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
249
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "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),
|
|
250
250
|
contentType: "application/json",
|
|
251
251
|
requestType: "json",
|
|
252
252
|
body: serializers.agents.MessagesModifyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -306,7 +306,7 @@ class Messages {
|
|
|
306
306
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
307
307
|
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`),
|
|
308
308
|
method: "POST",
|
|
309
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
309
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "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),
|
|
310
310
|
contentType: "application/json",
|
|
311
311
|
requestType: "json",
|
|
312
312
|
body: serializers.LettaStreamingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -371,32 +371,40 @@ class Messages {
|
|
|
371
371
|
* The actual processing happens in the background, and the status can be checked using the run ID.
|
|
372
372
|
*
|
|
373
373
|
* @param {string} agentId
|
|
374
|
-
* @param {Letta.
|
|
374
|
+
* @param {Letta.agents.MessagesCreateAsyncRequest} request
|
|
375
375
|
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
376
376
|
*
|
|
377
377
|
* @throws {@link Letta.UnprocessableEntityError}
|
|
378
378
|
*
|
|
379
379
|
* @example
|
|
380
380
|
* await client.agents.messages.createAsync("agent_id", {
|
|
381
|
-
*
|
|
382
|
-
*
|
|
383
|
-
*
|
|
384
|
-
*
|
|
385
|
-
*
|
|
386
|
-
*
|
|
387
|
-
*
|
|
381
|
+
* body: {
|
|
382
|
+
* messages: [{
|
|
383
|
+
* role: "user",
|
|
384
|
+
* content: [{
|
|
385
|
+
* type: "text",
|
|
386
|
+
* text: "text"
|
|
387
|
+
* }]
|
|
388
|
+
* }]
|
|
389
|
+
* }
|
|
388
390
|
* })
|
|
389
391
|
*/
|
|
390
392
|
createAsync(agentId, request, requestOptions) {
|
|
391
393
|
return __awaiter(this, void 0, void 0, function* () {
|
|
392
394
|
var _a, _b, _c;
|
|
395
|
+
const { callbackUrl, body: _body } = request;
|
|
396
|
+
const _queryParams = {};
|
|
397
|
+
if (callbackUrl != null) {
|
|
398
|
+
_queryParams["callback_url"] = callbackUrl;
|
|
399
|
+
}
|
|
393
400
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
394
401
|
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`),
|
|
395
402
|
method: "POST",
|
|
396
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
403
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "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),
|
|
397
404
|
contentType: "application/json",
|
|
405
|
+
queryParameters: _queryParams,
|
|
398
406
|
requestType: "json",
|
|
399
|
-
body: serializers.LettaRequest.jsonOrThrow(
|
|
407
|
+
body: serializers.LettaRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
400
408
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
401
409
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
402
410
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -465,7 +473,7 @@ class Messages {
|
|
|
465
473
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
466
474
|
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`),
|
|
467
475
|
method: "PATCH",
|
|
468
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
476
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
469
477
|
contentType: "application/json",
|
|
470
478
|
queryParameters: _queryParams,
|
|
471
479
|
requestType: "json",
|
package/dist/api/resources/agents/resources/messages/client/requests/MessagesCreateAsyncRequest.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Letta from "../../../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* body: {
|
|
9
|
+
* messages: [{
|
|
10
|
+
* role: "user",
|
|
11
|
+
* content: [{
|
|
12
|
+
* type: "text",
|
|
13
|
+
* text: "text"
|
|
14
|
+
* }]
|
|
15
|
+
* }]
|
|
16
|
+
* }
|
|
17
|
+
* }
|
|
18
|
+
*/
|
|
19
|
+
export interface MessagesCreateAsyncRequest {
|
|
20
|
+
/**
|
|
21
|
+
* Optional callback URL to POST to when the job completes
|
|
22
|
+
*/
|
|
23
|
+
callbackUrl?: string;
|
|
24
|
+
body: Letta.LettaRequest;
|
|
25
|
+
}
|
|
@@ -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 LettaStreamingResponse = Letta.SystemMessage | Letta.UserMessage | Letta.ReasoningMessage | Letta.ToolCallMessage | Letta.ToolReturnMessage | Letta.AssistantMessage | Letta.LettaUsageStatistics;
|
|
5
|
+
export type LettaStreamingResponse = Letta.SystemMessage | Letta.UserMessage | Letta.ReasoningMessage | Letta.ToolCallMessage | Letta.ToolReturnMessage | Letta.AssistantMessage | Letta.LettaStopReason | Letta.LettaUsageStatistics;
|