From 4860dda3b258e6d03d4eb7815eccbb2674d0ab70 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 19:14:59 +0000 Subject: [PATCH] Release 0.1.8 --- package.json | 2 +- reference.md | 459 +++++++++++++- src/Client.ts | 6 + src/api/resources/agents/client/Client.ts | 117 +++- .../client/requests/CreateAgentRequest.ts | 4 +- .../client/requests/ResetMessagesRequest.ts | 14 + .../resources/agents/client/requests/index.ts | 1 + .../resources/archivalMemory/client/Client.ts | 16 +- .../agents/resources/context/client/Client.ts | 4 +- .../resources/coreMemory/client/Client.ts | 28 +- .../memoryVariables/client/Client.ts | 4 +- .../resources/messages/client/Client.ts | 24 +- .../resources/recallMemory/client/Client.ts | 4 +- .../agents/resources/sources/client/Client.ts | 4 +- .../resources/templates/client/Client.ts | 12 +- .../client/requests/TemplatesCreateRequest.ts | 2 +- .../agents/resources/tools/client/Client.ts | 12 +- src/api/resources/blocks/client/Client.ts | 28 +- src/api/resources/health/client/Client.ts | 4 +- src/api/resources/index.ts | 2 + src/api/resources/jobs/client/Client.ts | 16 +- src/api/resources/models/client/Client.ts | 8 +- src/api/resources/providers/client/Client.ts | 16 +- src/api/resources/runs/client/Client.ts | 576 ++++++++++++++++++ src/api/resources/runs/client/index.ts | 1 + .../client/requests/GetRunMessagesRequest.ts | 52 ++ .../resources/runs/client/requests/index.ts | 1 + src/api/resources/runs/index.ts | 1 + src/api/resources/sources/client/Client.ts | 32 +- .../sources/resources/files/client/Client.ts | 12 +- .../resources/passages/client/Client.ts | 4 +- src/api/resources/tools/client/Client.ts | 48 +- .../client/requests/ToolRunFromSource.ts | 2 +- .../tools/client/requests/ToolUpdate.ts | 2 - src/api/types/Job.ts | 2 + src/api/types/JobType.ts | 9 + src/api/types/LettaSchemasToolTool.ts | 2 - src/api/types/Run.ts | 36 ++ src/api/types/ToolCreate.ts | 2 - src/api/types/index.ts | 2 + .../client/requests/CreateAgentRequest.ts | 4 +- .../client/requests/TemplatesCreateRequest.ts | 4 +- src/serialization/resources/index.ts | 1 + .../resources/runs/client/getRunMessages.ts | 17 + .../resources/runs/client/index.ts | 3 + .../resources/runs/client/listActiveRuns.ts | 15 + .../resources/runs/client/listRuns.ts | 15 + src/serialization/resources/runs/index.ts | 1 + .../client/requests/ToolRunFromSource.ts | 4 +- .../tools/client/requests/ToolUpdate.ts | 2 - src/serialization/types/Job.ts | 3 + src/serialization/types/JobType.ts | 16 + .../types/LettaSchemasToolTool.ts | 2 - src/serialization/types/Run.ts | 38 ++ src/serialization/types/ToolCreate.ts | 2 - src/serialization/types/index.ts | 2 + src/version.ts | 2 +- yarn.lock | 12 +- 58 files changed, 1533 insertions(+), 181 deletions(-) create mode 100644 src/api/resources/agents/client/requests/ResetMessagesRequest.ts create mode 100644 src/api/resources/runs/client/Client.ts create mode 100644 src/api/resources/runs/client/index.ts create mode 100644 src/api/resources/runs/client/requests/GetRunMessagesRequest.ts create mode 100644 src/api/resources/runs/client/requests/index.ts create mode 100644 src/api/resources/runs/index.ts create mode 100644 src/api/types/JobType.ts create mode 100644 src/api/types/Run.ts create mode 100644 src/serialization/resources/runs/client/getRunMessages.ts create mode 100644 src/serialization/resources/runs/client/index.ts create mode 100644 src/serialization/resources/runs/client/listActiveRuns.ts create mode 100644 src/serialization/resources/runs/client/listRuns.ts create mode 100644 src/serialization/resources/runs/index.ts create mode 100644 src/serialization/types/JobType.ts create mode 100644 src/serialization/types/Run.ts diff --git a/package.json b/package.json index 5be061e..3624cb7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@letta-ai/letta-client", - "version": "0.1.7", + "version": "0.1.8", "private": false, "repository": "https://github.com/letta-ai/letta-node", "main": "./index.js", diff --git a/reference.md b/reference.md index b4d6044..2eb189a 100644 --- a/reference.md +++ b/reference.md @@ -1620,6 +1620,77 @@ await client.agents.update("agent_id"); +
client.agents.resetMessages(agentId, { ...params }) -> Letta.AgentState +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Resets the messages for an agent + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.agents.resetMessages("agent_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**agentId:** `string` + +
+
+ +
+
+ +**request:** `Letta.ResetMessagesRequest` + +
+
+ +
+
+ +**requestOptions:** `Agents.RequestOptions` + +
+
+
+
+ +
+
+
+
client.agents.search({ ...params }) -> void
@@ -2716,6 +2787,392 @@ await client.providers.deleteProvider({
+## Runs + +
client.runs.listRuns() -> Letta.Run[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List all runs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.runs.listRuns(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Runs.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.runs.listActiveRuns() -> Letta.Run[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List all active runs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.runs.listActiveRuns(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Runs.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.runs.getRun(runId) -> Letta.Run +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get the status of a run. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.runs.getRun("run_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**runId:** `string` + +
+
+ +
+
+ +**requestOptions:** `Runs.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.runs.deleteRun(runId) -> Letta.Run +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a run by its run_id. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.runs.deleteRun("run_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**runId:** `string` + +
+
+ +
+
+ +**requestOptions:** `Runs.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.runs.getRunMessages(runId, { ...params }) -> Letta.LettaSchemasMessageMessage[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get messages associated with a run with filtering options. + +Args: +run_id: ID of the run +cursor: Cursor for pagination +start_date: Filter messages after this date +end_date: Filter messages before this date +limit: Maximum number of messages to return +query_text: Search text in message content +ascending: Sort order by creation time +tags: Filter by message tags +match_all_tags: If true, match all tags. If false, match any tag +role: Filter by message role (user/assistant/system/tool) +tool_name: Filter by tool call name +user_id: ID of the user making the request + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.runs.getRunMessages("run_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**runId:** `string` + +
+
+ +
+
+ +**request:** `Letta.GetRunMessagesRequest` + +
+
+ +
+
+ +**requestOptions:** `Runs.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.runs.getRunUsage(runId) -> Letta.UsageStatistics +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get usage statistics for a run. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.runs.getRunUsage("run_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**runId:** `string` + +
+
+ +
+
+ +**requestOptions:** `Runs.RequestOptions` + +
+
+
+
+ +
+
+
+ ## Agents Context
client.agents.context.get(agentId) -> Letta.ContextWindowOverview @@ -4199,7 +4656,7 @@ for await (const item of response) {
-
client.agents.messages.createAsync(agentId, { ...params }) -> Letta.Job +
client.agents.messages.createAsync(agentId, { ...params }) -> Letta.Run
diff --git a/src/Client.ts b/src/Client.ts index e618bcd..19a3e5c 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -12,6 +12,7 @@ import { Blocks } from "./api/resources/blocks/client/Client"; import { Jobs } from "./api/resources/jobs/client/Client"; import { Health } from "./api/resources/health/client/Client"; import { Providers } from "./api/resources/providers/client/Client"; +import { Runs } from "./api/resources/runs/client/Client"; export declare namespace LettaClient { interface Options { @@ -41,6 +42,7 @@ export class LettaClient { protected _jobs: Jobs | undefined; protected _health: Health | undefined; protected _providers: Providers | undefined; + protected _runs: Runs | undefined; constructor(protected readonly _options: LettaClient.Options = {}) {} @@ -75,4 +77,8 @@ export class LettaClient { public get providers(): Providers { return (this._providers ??= new Providers(this._options)); } + + public get runs(): Runs { + return (this._runs ??= new Runs(this._options)); + } } diff --git a/src/api/resources/agents/client/Client.ts b/src/api/resources/agents/client/Client.ts index 8afc280..6293ba3 100644 --- a/src/api/resources/agents/client/Client.ts +++ b/src/api/resources/agents/client/Client.ts @@ -137,8 +137,8 @@ export class Agents { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -225,8 +225,8 @@ export class Agents { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -305,8 +305,8 @@ export class Agents { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -384,8 +384,8 @@ export class Agents { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -462,8 +462,8 @@ export class Agents { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -521,6 +521,99 @@ export class Agents { } } + /** + * Resets the messages for an agent + * + * @param {string} agentId + * @param {Letta.ResetMessagesRequest} request + * @param {Agents.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Letta.UnprocessableEntityError} + * + * @example + * await client.agents.resetMessages("agent_id") + */ + public async resetMessages( + agentId: string, + request: Letta.ResetMessagesRequest = {}, + requestOptions?: Agents.RequestOptions + ): Promise { + const { addDefaultInitialMessages } = request; + const _queryParams: Record = {}; + if (addDefaultInitialMessages != null) { + _queryParams["add_default_initial_messages"] = addDefaultInitialMessages.toString(); + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.LettaCloud, + `v1/agents/${encodeURIComponent(agentId)}/reset-messages` + ), + method: "PATCH", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "@letta-ai/letta-client", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AgentState.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Letta.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.LettaError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.LettaError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.LettaTimeoutError( + "Timeout exceeded when calling PATCH /v1/agents/{agent_id}/reset-messages." + ); + case "unknown": + throw new errors.LettaError({ + message: _response.error.errorMessage, + }); + } + } + /** * This endpoint is only available on Letta Cloud. * @@ -545,8 +638,8 @@ export class Agents { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/agents/client/requests/CreateAgentRequest.ts b/src/api/resources/agents/client/requests/CreateAgentRequest.ts index 298a030..b81b748 100644 --- a/src/api/resources/agents/client/requests/CreateAgentRequest.ts +++ b/src/api/resources/agents/client/requests/CreateAgentRequest.ts @@ -56,8 +56,8 @@ export interface CreateAgentRequest { embeddingChunkSize?: number; /** The template id used to configure the agent */ fromTemplate?: string; - /** The project id that the agent will be associated with. */ - projectId?: string; + /** The project slug that the agent will be associated with. */ + project?: string; /** The environment variables for tool execution specific to this agent. */ toolExecEnvironmentVariables?: Record; /** The variables that should be set for the agent. */ diff --git a/src/api/resources/agents/client/requests/ResetMessagesRequest.ts b/src/api/resources/agents/client/requests/ResetMessagesRequest.ts new file mode 100644 index 0000000..250279c --- /dev/null +++ b/src/api/resources/agents/client/requests/ResetMessagesRequest.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * {} + */ +export interface ResetMessagesRequest { + /** + * If true, adds the default initial messages after resetting. + */ + addDefaultInitialMessages?: boolean; +} diff --git a/src/api/resources/agents/client/requests/index.ts b/src/api/resources/agents/client/requests/index.ts index 1af90c8..1284246 100644 --- a/src/api/resources/agents/client/requests/index.ts +++ b/src/api/resources/agents/client/requests/index.ts @@ -1,4 +1,5 @@ export { type AgentsListRequest } from "./AgentsListRequest"; export { type CreateAgentRequest } from "./CreateAgentRequest"; export { type UpdateAgent } from "./UpdateAgent"; +export { type ResetMessagesRequest } from "./ResetMessagesRequest"; export { type AgentsSearchRequest } from "./AgentsSearchRequest"; diff --git a/src/api/resources/agents/resources/archivalMemory/client/Client.ts b/src/api/resources/agents/resources/archivalMemory/client/Client.ts index 10d5552..46d6535 100644 --- a/src/api/resources/agents/resources/archivalMemory/client/Client.ts +++ b/src/api/resources/agents/resources/archivalMemory/client/Client.ts @@ -55,8 +55,8 @@ export class ArchivalMemory { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -155,8 +155,8 @@ export class ArchivalMemory { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -242,8 +242,8 @@ export class ArchivalMemory { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -329,8 +329,8 @@ export class ArchivalMemory { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/agents/resources/context/client/Client.ts b/src/api/resources/agents/resources/context/client/Client.ts index 2c963eb..a499bb1 100644 --- a/src/api/resources/agents/resources/context/client/Client.ts +++ b/src/api/resources/agents/resources/context/client/Client.ts @@ -52,8 +52,8 @@ export class Context { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/agents/resources/coreMemory/client/Client.ts b/src/api/resources/agents/resources/coreMemory/client/Client.ts index 7255321..f9c37be 100644 --- a/src/api/resources/agents/resources/coreMemory/client/Client.ts +++ b/src/api/resources/agents/resources/coreMemory/client/Client.ts @@ -55,8 +55,8 @@ export class CoreMemory { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -137,8 +137,8 @@ export class CoreMemory { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -221,8 +221,8 @@ export class CoreMemory { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -307,8 +307,8 @@ export class CoreMemory { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -395,8 +395,8 @@ export class CoreMemory { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -477,8 +477,8 @@ export class CoreMemory { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -566,8 +566,8 @@ export class CoreMemory { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/agents/resources/memoryVariables/client/Client.ts b/src/api/resources/agents/resources/memoryVariables/client/Client.ts index 1d955dd..3d95ac7 100644 --- a/src/api/resources/agents/resources/memoryVariables/client/Client.ts +++ b/src/api/resources/agents/resources/memoryVariables/client/Client.ts @@ -57,8 +57,8 @@ export class MemoryVariables { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/agents/resources/messages/client/Client.ts b/src/api/resources/agents/resources/messages/client/Client.ts index 94ef8d6..8d7e4fd 100644 --- a/src/api/resources/agents/resources/messages/client/Client.ts +++ b/src/api/resources/agents/resources/messages/client/Client.ts @@ -80,8 +80,8 @@ export class Messages { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -171,8 +171,8 @@ export class Messages { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -260,8 +260,8 @@ export class Messages { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -340,8 +340,8 @@ export class Messages { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -434,7 +434,7 @@ export class Messages { agentId: string, request: Letta.LettaRequest, requestOptions?: Messages.RequestOptions - ): Promise { + ): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.LettaCloud, @@ -444,8 +444,8 @@ export class Messages { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -459,7 +459,7 @@ export class Messages { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.Job.parseOrThrow(_response.body, { + return serializers.Run.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, diff --git a/src/api/resources/agents/resources/recallMemory/client/Client.ts b/src/api/resources/agents/resources/recallMemory/client/Client.ts index cf14f24..6ea202c 100644 --- a/src/api/resources/agents/resources/recallMemory/client/Client.ts +++ b/src/api/resources/agents/resources/recallMemory/client/Client.ts @@ -55,8 +55,8 @@ export class RecallMemory { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/agents/resources/sources/client/Client.ts b/src/api/resources/agents/resources/sources/client/Client.ts index bd59a59..e9fefc9 100644 --- a/src/api/resources/agents/resources/sources/client/Client.ts +++ b/src/api/resources/agents/resources/sources/client/Client.ts @@ -52,8 +52,8 @@ export class Sources { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/agents/resources/templates/client/Client.ts b/src/api/resources/agents/resources/templates/client/Client.ts index 17b04df..09ba5a9 100644 --- a/src/api/resources/agents/resources/templates/client/Client.ts +++ b/src/api/resources/agents/resources/templates/client/Client.ts @@ -66,8 +66,8 @@ export class Templates { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -151,8 +151,8 @@ export class Templates { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -243,8 +243,8 @@ export class Templates { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.ts b/src/api/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.ts index 7094542..62799ae 100644 --- a/src/api/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.ts +++ b/src/api/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.ts @@ -7,5 +7,5 @@ * {} */ export interface TemplatesCreateRequest { - projectId?: string; + project?: string; } diff --git a/src/api/resources/agents/resources/tools/client/Client.ts b/src/api/resources/agents/resources/tools/client/Client.ts index f55bfe6..91e90bc 100644 --- a/src/api/resources/agents/resources/tools/client/Client.ts +++ b/src/api/resources/agents/resources/tools/client/Client.ts @@ -52,8 +52,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -136,8 +136,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -222,8 +222,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/blocks/client/Client.ts b/src/api/resources/blocks/client/Client.ts index 6db1d9c..fff5c76 100644 --- a/src/api/resources/blocks/client/Client.ts +++ b/src/api/resources/blocks/client/Client.ts @@ -67,8 +67,8 @@ export class Blocks { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -148,8 +148,8 @@ export class Blocks { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -226,8 +226,8 @@ export class Blocks { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -303,8 +303,8 @@ export class Blocks { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -385,8 +385,8 @@ export class Blocks { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -475,8 +475,8 @@ export class Blocks { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -559,8 +559,8 @@ export class Blocks { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/health/client/Client.ts b/src/api/resources/health/client/Client.ts index 8d7e8e8..c938048 100644 --- a/src/api/resources/health/client/Client.ts +++ b/src/api/resources/health/client/Client.ts @@ -47,8 +47,8 @@ export class Health { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/index.ts b/src/api/resources/index.ts index f3a63a1..661d2b2 100644 --- a/src/api/resources/index.ts +++ b/src/api/resources/index.ts @@ -7,9 +7,11 @@ export * as blocks from "./blocks"; export * as jobs from "./jobs"; export * as health from "./health"; export * as providers from "./providers"; +export * as runs from "./runs"; export * from "./tools/client/requests"; export * from "./sources/client/requests"; export * from "./agents/client/requests"; export * from "./blocks/client/requests"; export * from "./jobs/client/requests"; export * from "./providers/client/requests"; +export * from "./runs/client/requests"; diff --git a/src/api/resources/jobs/client/Client.ts b/src/api/resources/jobs/client/Client.ts index 9a4b3d5..538f054 100644 --- a/src/api/resources/jobs/client/Client.ts +++ b/src/api/resources/jobs/client/Client.ts @@ -58,8 +58,8 @@ export class Jobs { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -137,8 +137,8 @@ export class Jobs { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -216,8 +216,8 @@ export class Jobs { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -295,8 +295,8 @@ export class Jobs { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/models/client/Client.ts b/src/api/resources/models/client/Client.ts index 1ddb881..be3d95c 100644 --- a/src/api/resources/models/client/Client.ts +++ b/src/api/resources/models/client/Client.ts @@ -47,8 +47,8 @@ export class Models { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -108,8 +108,8 @@ export class Models { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/providers/client/Client.ts b/src/api/resources/providers/client/Client.ts index 7c743e3..0d50f67 100644 --- a/src/api/resources/providers/client/Client.ts +++ b/src/api/resources/providers/client/Client.ts @@ -65,8 +65,8 @@ export class Providers { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -151,8 +151,8 @@ export class Providers { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -237,8 +237,8 @@ export class Providers { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -325,8 +325,8 @@ export class Providers { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/runs/client/Client.ts b/src/api/resources/runs/client/Client.ts new file mode 100644 index 0000000..75b5e1b --- /dev/null +++ b/src/api/resources/runs/client/Client.ts @@ -0,0 +1,576 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Letta from "../../../index"; +import urlJoin from "url-join"; +import * as serializers from "../../../../serialization/index"; +import * as errors from "../../../../errors/index"; + +export declare namespace Runs { + interface Options { + environment?: core.Supplier; + token?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Additional headers to include in the request. */ + headers?: Record; + } +} + +export class Runs { + constructor(protected readonly _options: Runs.Options = {}) {} + + /** + * List all runs. + * + * @param {Runs.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Letta.UnprocessableEntityError} + * + * @example + * await client.runs.listRuns() + */ + public async listRuns(requestOptions?: Runs.RequestOptions): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.LettaCloud, + "v1/runs/" + ), + method: "GET", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "@letta-ai/letta-client", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.runs.listRuns.Response.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Letta.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.LettaError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.LettaError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/runs/."); + case "unknown": + throw new errors.LettaError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * List all active runs. + * + * @param {Runs.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Letta.UnprocessableEntityError} + * + * @example + * await client.runs.listActiveRuns() + */ + public async listActiveRuns(requestOptions?: Runs.RequestOptions): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.LettaCloud, + "v1/runs/active" + ), + method: "GET", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "@letta-ai/letta-client", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.runs.listActiveRuns.Response.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Letta.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.LettaError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.LettaError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/runs/active."); + case "unknown": + throw new errors.LettaError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Get the status of a run. + * + * @param {string} runId + * @param {Runs.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Letta.UnprocessableEntityError} + * + * @example + * await client.runs.getRun("run_id") + */ + public async getRun(runId: string, requestOptions?: Runs.RequestOptions): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.LettaCloud, + `v1/runs/${encodeURIComponent(runId)}` + ), + method: "GET", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "@letta-ai/letta-client", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.Run.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Letta.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.LettaError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.LettaError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/runs/{run_id}."); + case "unknown": + throw new errors.LettaError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Delete a run by its run_id. + * + * @param {string} runId + * @param {Runs.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Letta.UnprocessableEntityError} + * + * @example + * await client.runs.deleteRun("run_id") + */ + public async deleteRun(runId: string, requestOptions?: Runs.RequestOptions): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.LettaCloud, + `v1/runs/${encodeURIComponent(runId)}` + ), + method: "DELETE", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "@letta-ai/letta-client", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.Run.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Letta.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.LettaError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.LettaError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.LettaTimeoutError("Timeout exceeded when calling DELETE /v1/runs/{run_id}."); + case "unknown": + throw new errors.LettaError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Get messages associated with a run with filtering options. + * + * Args: + * run_id: ID of the run + * cursor: Cursor for pagination + * start_date: Filter messages after this date + * end_date: Filter messages before this date + * limit: Maximum number of messages to return + * query_text: Search text in message content + * ascending: Sort order by creation time + * tags: Filter by message tags + * match_all_tags: If true, match all tags. If false, match any tag + * role: Filter by message role (user/assistant/system/tool) + * tool_name: Filter by tool call name + * user_id: ID of the user making the request + * + * @param {string} runId + * @param {Letta.GetRunMessagesRequest} request + * @param {Runs.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Letta.UnprocessableEntityError} + * + * @example + * await client.runs.getRunMessages("run_id") + */ + public async getRunMessages( + runId: string, + request: Letta.GetRunMessagesRequest = {}, + requestOptions?: Runs.RequestOptions + ): Promise { + const { cursor, startDate, endDate, limit, queryText, ascending, tags, matchAllTags, role, toolName } = request; + const _queryParams: Record = {}; + if (cursor != null) { + _queryParams["cursor"] = cursor; + } + + if (startDate != null) { + _queryParams["start_date"] = startDate.toISOString(); + } + + if (endDate != null) { + _queryParams["end_date"] = endDate.toISOString(); + } + + if (limit != null) { + _queryParams["limit"] = limit.toString(); + } + + if (queryText != null) { + _queryParams["query_text"] = queryText; + } + + if (ascending != null) { + _queryParams["ascending"] = ascending.toString(); + } + + if (tags != null) { + if (Array.isArray(tags)) { + _queryParams["tags"] = tags.map((item) => item); + } else { + _queryParams["tags"] = tags; + } + } + + if (matchAllTags != null) { + _queryParams["match_all_tags"] = matchAllTags.toString(); + } + + if (role != null) { + _queryParams["role"] = role; + } + + if (toolName != null) { + _queryParams["tool_name"] = toolName; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.LettaCloud, + `v1/runs/${encodeURIComponent(runId)}/messages` + ), + method: "GET", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "@letta-ai/letta-client", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.runs.getRunMessages.Response.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Letta.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.LettaError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.LettaError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/runs/{run_id}/messages."); + case "unknown": + throw new errors.LettaError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Get usage statistics for a run. + * + * @param {string} runId + * @param {Runs.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Letta.UnprocessableEntityError} + * + * @example + * await client.runs.getRunUsage("run_id") + */ + public async getRunUsage(runId: string, requestOptions?: Runs.RequestOptions): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.LettaEnvironment.LettaCloud, + `v1/runs/${encodeURIComponent(runId)}/usage` + ), + method: "GET", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "@letta-ai/letta-client", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.UsageStatistics.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Letta.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.LettaError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.LettaError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/runs/{run_id}/usage."); + case "unknown": + throw new errors.LettaError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getCustomAuthorizationHeaders() { + const tokenValue = await core.Supplier.get(this._options.token); + return { Authorization: `Bearer ${tokenValue}` }; + } +} diff --git a/src/api/resources/runs/client/index.ts b/src/api/resources/runs/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/runs/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/runs/client/requests/GetRunMessagesRequest.ts b/src/api/resources/runs/client/requests/GetRunMessagesRequest.ts new file mode 100644 index 0000000..19f393a --- /dev/null +++ b/src/api/resources/runs/client/requests/GetRunMessagesRequest.ts @@ -0,0 +1,52 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Letta from "../../../../index"; + +/** + * @example + * {} + */ +export interface GetRunMessagesRequest { + /** + * Cursor for pagination + */ + cursor?: string; + /** + * Filter messages after this date + */ + startDate?: Date; + /** + * Filter messages before this date + */ + endDate?: Date; + /** + * Maximum number of messages to return + */ + limit?: number; + /** + * Search text in message content + */ + queryText?: string; + /** + * Sort order by creation time + */ + ascending?: boolean; + /** + * Filter by message tags + */ + tags?: string | string[]; + /** + * If true, match all tags. If false, match any tag + */ + matchAllTags?: boolean; + /** + * Filter by message role + */ + role?: Letta.MessageRole; + /** + * Filter by tool call name + */ + toolName?: string; +} diff --git a/src/api/resources/runs/client/requests/index.ts b/src/api/resources/runs/client/requests/index.ts new file mode 100644 index 0000000..a335014 --- /dev/null +++ b/src/api/resources/runs/client/requests/index.ts @@ -0,0 +1 @@ +export { type GetRunMessagesRequest } from "./GetRunMessagesRequest"; diff --git a/src/api/resources/runs/index.ts b/src/api/resources/runs/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/runs/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/sources/client/Client.ts b/src/api/resources/sources/client/Client.ts index 242f29c..6fa1808 100644 --- a/src/api/resources/sources/client/Client.ts +++ b/src/api/resources/sources/client/Client.ts @@ -65,8 +65,8 @@ export class Sources { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -144,8 +144,8 @@ export class Sources { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -222,8 +222,8 @@ export class Sources { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -302,8 +302,8 @@ export class Sources { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -380,8 +380,8 @@ export class Sources { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -461,8 +461,8 @@ export class Sources { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -551,8 +551,8 @@ export class Sources { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -643,8 +643,8 @@ export class Sources { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/sources/resources/files/client/Client.ts b/src/api/resources/sources/resources/files/client/Client.ts index cccf959..d847d75 100644 --- a/src/api/resources/sources/resources/files/client/Client.ts +++ b/src/api/resources/sources/resources/files/client/Client.ts @@ -62,8 +62,8 @@ export class Files { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -160,8 +160,8 @@ export class Files { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -241,8 +241,8 @@ export class Files { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/sources/resources/passages/client/Client.ts b/src/api/resources/sources/resources/passages/client/Client.ts index 8e15015..2e6ddd0 100644 --- a/src/api/resources/sources/resources/passages/client/Client.ts +++ b/src/api/resources/sources/resources/passages/client/Client.ts @@ -52,8 +52,8 @@ export class Passages { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/tools/client/Client.ts b/src/api/resources/tools/client/Client.ts index b5e048f..05b9f0d 100644 --- a/src/api/resources/tools/client/Client.ts +++ b/src/api/resources/tools/client/Client.ts @@ -52,8 +52,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -131,8 +131,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -209,8 +209,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -289,8 +289,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -381,8 +381,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -466,8 +466,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -551,8 +551,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -630,8 +630,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -717,8 +717,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -796,8 +796,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -878,8 +878,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -962,8 +962,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", - "X-Fern-SDK-Version": "0.1.7", - "User-Agent": "@letta-ai/letta-client/0.1.7", + "X-Fern-SDK-Version": "0.1.8", + "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/tools/client/requests/ToolRunFromSource.ts b/src/api/resources/tools/client/requests/ToolRunFromSource.ts index fd4bdd3..0a8dba6 100644 --- a/src/api/resources/tools/client/requests/ToolRunFromSource.ts +++ b/src/api/resources/tools/client/requests/ToolRunFromSource.ts @@ -15,7 +15,7 @@ export interface ToolRunFromSource { /** The source code of the function. */ sourceCode: string; /** The arguments to pass to the tool. */ - args: Record; + args: Record; /** The environment variables to pass to the tool. */ envVars?: Record; /** The name of the tool to run. */ diff --git a/src/api/resources/tools/client/requests/ToolUpdate.ts b/src/api/resources/tools/client/requests/ToolUpdate.ts index 39ee2f3..79bead6 100644 --- a/src/api/resources/tools/client/requests/ToolUpdate.ts +++ b/src/api/resources/tools/client/requests/ToolUpdate.ts @@ -14,8 +14,6 @@ export interface ToolUpdate { /** Metadata tags. */ tags?: string[]; /** The source code of the function. */ - module?: string; - /** The source code of the function. */ sourceCode?: string; /** The type of the source code. */ sourceType?: string; diff --git a/src/api/types/Job.ts b/src/api/types/Job.ts index 31c0868..f4e9f84 100644 --- a/src/api/types/Job.ts +++ b/src/api/types/Job.ts @@ -29,6 +29,8 @@ export interface Job { completedAt?: Date; /** The metadata of the job. */ metadata?: Record; + /** The type of the job. */ + jobType?: Letta.JobType; /** The human-friendly ID of the Job */ id?: string; } diff --git a/src/api/types/JobType.ts b/src/api/types/JobType.ts new file mode 100644 index 0000000..05c012a --- /dev/null +++ b/src/api/types/JobType.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type JobType = "job" | "run"; +export const JobType = { + Job: "job", + Run: "run", +} as const; diff --git a/src/api/types/LettaSchemasToolTool.ts b/src/api/types/LettaSchemasToolTool.ts index 135ddfd..a3a9f4b 100644 --- a/src/api/types/LettaSchemasToolTool.ts +++ b/src/api/types/LettaSchemasToolTool.ts @@ -23,8 +23,6 @@ export interface LettaSchemasToolTool { description?: string; /** The type of the source code. */ sourceType?: string; - /** The module of the function. */ - module?: string; /** The name of the function. */ name?: string; /** Metadata tags. */ diff --git a/src/api/types/Run.ts b/src/api/types/Run.ts new file mode 100644 index 0000000..29c24b3 --- /dev/null +++ b/src/api/types/Run.ts @@ -0,0 +1,36 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Letta from "../index"; + +/** + * Representation of a run, which is a job with a 'run' prefix in its ID. + * Inherits all fields and behavior from Job except for the ID prefix. + * + * Parameters: + * id (str): The unique identifier of the run (prefixed with 'run-'). + * status (JobStatus): The status of the run. + * created_at (datetime): The unix timestamp of when the run was created. + * completed_at (datetime): The unix timestamp of when the run was completed. + * user_id (str): The unique identifier of the user associated with the run. + */ +export interface Run { + /** The id of the user that made this object. */ + createdById?: string; + /** The id of the user that made this object. */ + lastUpdatedById?: string; + /** The timestamp when the object was created. */ + createdAt?: Date; + /** The timestamp when the object was last updated. */ + updatedAt?: Date; + /** The status of the job. */ + status?: Letta.JobStatus; + /** The unix timestamp of when the job was completed. */ + completedAt?: Date; + /** The metadata of the job. */ + metadata?: Record; + jobType?: Letta.JobType; + /** The human-friendly ID of the Run */ + id?: string; +} diff --git a/src/api/types/ToolCreate.ts b/src/api/types/ToolCreate.ts index e572f71..5893798 100644 --- a/src/api/types/ToolCreate.ts +++ b/src/api/types/ToolCreate.ts @@ -10,8 +10,6 @@ export interface ToolCreate { /** Metadata tags. */ tags?: string[]; /** The source code of the function. */ - module?: string; - /** The source code of the function. */ sourceCode: string; /** The source type of the function. */ sourceType?: string; diff --git a/src/api/types/index.ts b/src/api/types/index.ts index 11eae78..9db0701 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -48,6 +48,7 @@ export * from "./Health"; export * from "./InitToolRule"; export * from "./Job"; export * from "./JobStatus"; +export * from "./JobType"; export * from "./LlmConfigModelEndpointType"; export * from "./LlmConfig"; export * from "./LettaRequest"; @@ -69,6 +70,7 @@ export * from "./Provider"; export * from "./ReasoningMessage"; export * from "./RecallMemorySummary"; export * from "./ResponseFormat"; +export * from "./Run"; export * from "./SandboxConfig"; export * from "./SandboxConfigCreateConfig"; export * from "./SandboxConfigCreate"; diff --git a/src/serialization/resources/agents/client/requests/CreateAgentRequest.ts b/src/serialization/resources/agents/client/requests/CreateAgentRequest.ts index 7e4a5f7..b66986d 100644 --- a/src/serialization/resources/agents/client/requests/CreateAgentRequest.ts +++ b/src/serialization/resources/agents/client/requests/CreateAgentRequest.ts @@ -49,7 +49,7 @@ export const CreateAgentRequest: core.serialization.Schema< contextWindowLimit: core.serialization.property("context_window_limit", core.serialization.number().optional()), embeddingChunkSize: core.serialization.property("embedding_chunk_size", core.serialization.number().optional()), fromTemplate: core.serialization.property("from_template", core.serialization.string().optional()), - projectId: core.serialization.property("project_id", core.serialization.string().optional()), + project: core.serialization.string().optional(), toolExecEnvironmentVariables: core.serialization.property( "tool_exec_environment_variables", core.serialization.record(core.serialization.string(), core.serialization.string().optional()).optional() @@ -82,7 +82,7 @@ export declare namespace CreateAgentRequest { context_window_limit?: number | null; embedding_chunk_size?: number | null; from_template?: string | null; - project_id?: string | null; + project?: string | null; tool_exec_environment_variables?: Record | null; variables?: Record | null; } diff --git a/src/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.ts b/src/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.ts index 76b17ab..03a6cf8 100644 --- a/src/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.ts +++ b/src/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.ts @@ -10,11 +10,11 @@ export const TemplatesCreateRequest: core.serialization.Schema< serializers.agents.TemplatesCreateRequest.Raw, Letta.agents.TemplatesCreateRequest > = core.serialization.object({ - projectId: core.serialization.property("project_id", core.serialization.string().optional()), + project: core.serialization.string().optional(), }); export declare namespace TemplatesCreateRequest { interface Raw { - project_id?: string | null; + project?: string | null; } } diff --git a/src/serialization/resources/index.ts b/src/serialization/resources/index.ts index 35be8a9..de87d9d 100644 --- a/src/serialization/resources/index.ts +++ b/src/serialization/resources/index.ts @@ -6,6 +6,7 @@ export * as models from "./models"; export * as blocks from "./blocks"; export * as jobs from "./jobs"; export * as providers from "./providers"; +export * as runs from "./runs"; export * from "./tools/client/requests"; export * from "./sources/client/requests"; export * from "./agents/client/requests"; diff --git a/src/serialization/resources/runs/client/getRunMessages.ts b/src/serialization/resources/runs/client/getRunMessages.ts new file mode 100644 index 0000000..ab5d58e --- /dev/null +++ b/src/serialization/resources/runs/client/getRunMessages.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Letta from "../../../../api/index"; +import * as core from "../../../../core"; +import { LettaSchemasMessageMessage } from "../../../types/LettaSchemasMessageMessage"; + +export const Response: core.serialization.Schema< + serializers.runs.getRunMessages.Response.Raw, + Letta.LettaSchemasMessageMessage[] +> = core.serialization.list(LettaSchemasMessageMessage); + +export declare namespace Response { + type Raw = LettaSchemasMessageMessage.Raw[]; +} diff --git a/src/serialization/resources/runs/client/index.ts b/src/serialization/resources/runs/client/index.ts new file mode 100644 index 0000000..fc3ac7a --- /dev/null +++ b/src/serialization/resources/runs/client/index.ts @@ -0,0 +1,3 @@ +export * as listRuns from "./listRuns"; +export * as listActiveRuns from "./listActiveRuns"; +export * as getRunMessages from "./getRunMessages"; diff --git a/src/serialization/resources/runs/client/listActiveRuns.ts b/src/serialization/resources/runs/client/listActiveRuns.ts new file mode 100644 index 0000000..75c9472 --- /dev/null +++ b/src/serialization/resources/runs/client/listActiveRuns.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Letta from "../../../../api/index"; +import * as core from "../../../../core"; +import { Run } from "../../../types/Run"; + +export const Response: core.serialization.Schema = + core.serialization.list(Run); + +export declare namespace Response { + type Raw = Run.Raw[]; +} diff --git a/src/serialization/resources/runs/client/listRuns.ts b/src/serialization/resources/runs/client/listRuns.ts new file mode 100644 index 0000000..75f6a34 --- /dev/null +++ b/src/serialization/resources/runs/client/listRuns.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Letta from "../../../../api/index"; +import * as core from "../../../../core"; +import { Run } from "../../../types/Run"; + +export const Response: core.serialization.Schema = + core.serialization.list(Run); + +export declare namespace Response { + type Raw = Run.Raw[]; +} diff --git a/src/serialization/resources/runs/index.ts b/src/serialization/resources/runs/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/serialization/resources/runs/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/serialization/resources/tools/client/requests/ToolRunFromSource.ts b/src/serialization/resources/tools/client/requests/ToolRunFromSource.ts index 35ceaed..4015984 100644 --- a/src/serialization/resources/tools/client/requests/ToolRunFromSource.ts +++ b/src/serialization/resources/tools/client/requests/ToolRunFromSource.ts @@ -9,7 +9,7 @@ import * as core from "../../../../../core"; export const ToolRunFromSource: core.serialization.Schema = core.serialization.object({ sourceCode: core.serialization.property("source_code", core.serialization.string()), - args: core.serialization.record(core.serialization.string(), core.serialization.string()), + args: core.serialization.record(core.serialization.string(), core.serialization.unknown()), envVars: core.serialization.property( "env_vars", core.serialization.record(core.serialization.string(), core.serialization.string()).optional() @@ -21,7 +21,7 @@ export const ToolRunFromSource: core.serialization.Schema; + args: Record; env_vars?: Record | null; name?: string | null; source_type?: string | null; diff --git a/src/serialization/resources/tools/client/requests/ToolUpdate.ts b/src/serialization/resources/tools/client/requests/ToolUpdate.ts index dcee786..a086de1 100644 --- a/src/serialization/resources/tools/client/requests/ToolUpdate.ts +++ b/src/serialization/resources/tools/client/requests/ToolUpdate.ts @@ -11,7 +11,6 @@ export const ToolUpdate: core.serialization.Schema | null; diff --git a/src/serialization/types/Job.ts b/src/serialization/types/Job.ts index c0f5937..fe3938e 100644 --- a/src/serialization/types/Job.ts +++ b/src/serialization/types/Job.ts @@ -6,6 +6,7 @@ import * as serializers from "../index"; import * as Letta from "../../api/index"; import * as core from "../../core"; import { JobStatus } from "./JobStatus"; +import { JobType } from "./JobType"; export const Job: core.serialization.ObjectSchema = core.serialization.object({ createdById: core.serialization.property("created_by_id", core.serialization.string().optional()), @@ -18,6 +19,7 @@ export const Job: core.serialization.ObjectSchema | null; + job_type?: JobType.Raw | null; id?: string | null; } } diff --git a/src/serialization/types/JobType.ts b/src/serialization/types/JobType.ts new file mode 100644 index 0000000..fa016a7 --- /dev/null +++ b/src/serialization/types/JobType.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Letta from "../../api/index"; +import * as core from "../../core"; + +export const JobType: core.serialization.Schema = core.serialization.enum_([ + "job", + "run", +]); + +export declare namespace JobType { + type Raw = "job" | "run"; +} diff --git a/src/serialization/types/LettaSchemasToolTool.ts b/src/serialization/types/LettaSchemasToolTool.ts index 210bc16..02ade56 100644 --- a/src/serialization/types/LettaSchemasToolTool.ts +++ b/src/serialization/types/LettaSchemasToolTool.ts @@ -15,7 +15,6 @@ export const LettaSchemasToolTool: core.serialization.ObjectSchema< toolType: core.serialization.property("tool_type", ToolType.optional()), description: core.serialization.string().optional(), sourceType: core.serialization.property("source_type", core.serialization.string().optional()), - module: core.serialization.string().optional(), name: core.serialization.string().optional(), tags: core.serialization.list(core.serialization.string()).optional(), sourceCode: core.serialization.property("source_code", core.serialization.string().optional()), @@ -34,7 +33,6 @@ export declare namespace LettaSchemasToolTool { tool_type?: ToolType.Raw | null; description?: string | null; source_type?: string | null; - module?: string | null; name?: string | null; tags?: string[] | null; source_code?: string | null; diff --git a/src/serialization/types/Run.ts b/src/serialization/types/Run.ts new file mode 100644 index 0000000..d14a851 --- /dev/null +++ b/src/serialization/types/Run.ts @@ -0,0 +1,38 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Letta from "../../api/index"; +import * as core from "../../core"; +import { JobStatus } from "./JobStatus"; +import { JobType } from "./JobType"; + +export const Run: core.serialization.ObjectSchema = core.serialization.object({ + createdById: core.serialization.property("created_by_id", core.serialization.string().optional()), + lastUpdatedById: core.serialization.property("last_updated_by_id", core.serialization.string().optional()), + createdAt: core.serialization.property("created_at", core.serialization.date().optional()), + updatedAt: core.serialization.property("updated_at", core.serialization.date().optional()), + status: JobStatus.optional(), + completedAt: core.serialization.property("completed_at", core.serialization.date().optional()), + metadata: core.serialization.property( + "metadata_", + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + ), + jobType: core.serialization.property("job_type", JobType.optional()), + id: core.serialization.string().optional(), +}); + +export declare namespace Run { + interface Raw { + created_by_id?: string | null; + last_updated_by_id?: string | null; + created_at?: string | null; + updated_at?: string | null; + status?: JobStatus.Raw | null; + completed_at?: string | null; + metadata_?: Record | null; + job_type?: JobType.Raw | null; + id?: string | null; + } +} diff --git a/src/serialization/types/ToolCreate.ts b/src/serialization/types/ToolCreate.ts index de0a3a0..5565ad6 100644 --- a/src/serialization/types/ToolCreate.ts +++ b/src/serialization/types/ToolCreate.ts @@ -11,7 +11,6 @@ export const ToolCreate: core.serialization.ObjectSchema | null; diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts index 11eae78..9db0701 100644 --- a/src/serialization/types/index.ts +++ b/src/serialization/types/index.ts @@ -48,6 +48,7 @@ export * from "./Health"; export * from "./InitToolRule"; export * from "./Job"; export * from "./JobStatus"; +export * from "./JobType"; export * from "./LlmConfigModelEndpointType"; export * from "./LlmConfig"; export * from "./LettaRequest"; @@ -69,6 +70,7 @@ export * from "./Provider"; export * from "./ReasoningMessage"; export * from "./RecallMemorySummary"; export * from "./ResponseFormat"; +export * from "./Run"; export * from "./SandboxConfig"; export * from "./SandboxConfigCreateConfig"; export * from "./SandboxConfigCreate"; diff --git a/src/version.ts b/src/version.ts index f7bdb79..cb17e05 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "0.1.7"; +export const SDK_VERSION = "0.1.8"; diff --git a/yarn.lock b/yarn.lock index df49d27..46452a6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -656,9 +656,9 @@ form-data "^4.0.0" "@types/node@*": - version "22.10.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.5.tgz#95af89a3fb74a2bb41ef9927f206e6472026e48b" - integrity sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ== + version "22.10.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.6.tgz#5c6795e71635876039f853cbccd59f523d9e4239" + integrity sha512-qNiuwC4ZDAUNcY47xgaSuS92cjf8JbSUoaKS77bmLG1rU7MlATVSiw/IlrjtIyyskXBZ8KkNfjK/P5na7rgXbQ== dependencies: undici-types "~6.20.0" @@ -2929,9 +2929,9 @@ ts-jest@29.1.1: yargs-parser "^21.0.1" ts-loader@^9.3.1: - version "9.5.1" - resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.5.1.tgz#63d5912a86312f1fbe32cef0859fb8b2193d9b89" - integrity sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg== + version "9.5.2" + resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.5.2.tgz#1f3d7f4bb709b487aaa260e8f19b301635d08020" + integrity sha512-Qo4piXvOTWcMGIgRiuFa6nHNm+54HbYaZCKqc9eeZCLRy3XqafQgwX2F7mofrbJG3g7EEb+lkiR+z2Lic2s3Zw== dependencies: chalk "^4.1.0" enhanced-resolve "^5.0.0"