@letta-ai/letta-client 0.0.1 → 0.1.0-alpha2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +47 -0
- package/Client.js +47 -0
- package/README.md +153 -1
- package/api/errors/ConflictError.d.ts +8 -0
- package/api/errors/ConflictError.js +41 -0
- package/api/errors/InternalServerError.d.ts +7 -0
- package/api/errors/InternalServerError.js +41 -0
- package/api/errors/NotFoundError.d.ts +7 -0
- package/api/errors/NotFoundError.js +41 -0
- package/api/errors/UnprocessableEntityError.d.ts +8 -0
- package/api/errors/UnprocessableEntityError.js +41 -0
- package/api/errors/index.d.ts +4 -0
- package/api/errors/index.js +20 -0
- package/api/index.d.ts +3 -0
- package/api/index.js +19 -0
- package/api/resources/agents/client/Client.d.ts +209 -0
- package/api/resources/agents/client/Client.js +751 -0
- package/api/resources/agents/client/index.d.ts +1 -0
- package/api/resources/agents/client/index.js +17 -0
- package/api/resources/agents/client/requests/AgentsCreateVersionRequest.d.ts +11 -0
- package/api/resources/agents/client/requests/AgentsCreateVersionRequest.js +5 -0
- package/api/resources/agents/client/requests/AgentsListRequest.d.ts +21 -0
- package/api/resources/agents/client/requests/AgentsListRequest.js +5 -0
- package/api/resources/agents/client/requests/AgentsMigrateRequest.d.ts +16 -0
- package/api/resources/agents/client/requests/AgentsMigrateRequest.js +5 -0
- package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +56 -0
- package/api/resources/agents/client/requests/CreateAgentRequest.js +5 -0
- package/api/resources/agents/client/requests/UpdateAgent.d.ts +34 -0
- package/api/resources/agents/client/requests/UpdateAgent.js +5 -0
- package/api/resources/agents/client/requests/index.d.ts +5 -0
- package/api/resources/agents/client/requests/index.js +2 -0
- package/api/resources/agents/index.d.ts +3 -0
- package/api/resources/agents/index.js +19 -0
- package/api/resources/agents/resources/archivalMemory/client/Client.d.ts +81 -0
- package/api/resources/agents/resources/archivalMemory/client/Client.js +287 -0
- package/api/resources/agents/resources/archivalMemory/client/index.d.ts +1 -0
- package/api/resources/agents/resources/archivalMemory/client/index.js +17 -0
- package/api/resources/agents/resources/archivalMemory/client/requests/ArchivalMemoryListRequest.d.ts +21 -0
- package/api/resources/agents/resources/archivalMemory/client/requests/ArchivalMemoryListRequest.js +5 -0
- package/api/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.d.ts +13 -0
- package/api/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.js +5 -0
- package/api/resources/agents/resources/archivalMemory/client/requests/index.d.ts +2 -0
- package/api/resources/agents/resources/archivalMemory/client/requests/index.js +2 -0
- package/api/resources/agents/resources/archivalMemory/index.d.ts +1 -0
- package/api/resources/agents/resources/archivalMemory/index.js +17 -0
- package/api/resources/agents/resources/context/client/Client.d.ts +40 -0
- package/api/resources/agents/resources/context/client/Client.js +110 -0
- package/api/resources/agents/resources/context/client/index.d.ts +1 -0
- package/api/resources/agents/resources/context/client/index.js +2 -0
- package/api/resources/agents/resources/context/index.d.ts +1 -0
- package/api/resources/agents/resources/context/index.js +17 -0
- package/api/resources/agents/resources/index.d.ts +11 -0
- package/api/resources/agents/resources/index.js +40 -0
- package/api/resources/agents/resources/memory/client/Client.d.ts +44 -0
- package/api/resources/agents/resources/memory/client/Client.js +116 -0
- package/api/resources/agents/resources/memory/client/index.d.ts +1 -0
- package/api/resources/agents/resources/memory/client/index.js +2 -0
- package/api/resources/agents/resources/memory/index.d.ts +2 -0
- package/api/resources/agents/resources/memory/index.js +18 -0
- package/api/resources/agents/resources/memory/resources/index.d.ts +1 -0
- package/api/resources/agents/resources/memory/resources/index.js +27 -0
- package/api/resources/agents/resources/memory/resources/messages/client/Client.d.ts +40 -0
- package/api/resources/agents/resources/memory/resources/messages/client/Client.js +110 -0
- package/api/resources/agents/resources/memory/resources/messages/client/index.d.ts +1 -0
- package/api/resources/agents/resources/memory/resources/messages/client/index.js +2 -0
- package/api/resources/agents/resources/memory/resources/messages/index.d.ts +1 -0
- package/api/resources/agents/resources/memory/resources/messages/index.js +17 -0
- package/api/resources/agents/resources/memoryBlocks/client/Client.d.ts +57 -0
- package/api/resources/agents/resources/memoryBlocks/client/Client.js +169 -0
- package/api/resources/agents/resources/memoryBlocks/client/index.d.ts +1 -0
- package/api/resources/agents/resources/memoryBlocks/client/index.js +2 -0
- package/api/resources/agents/resources/memoryBlocks/index.d.ts +1 -0
- package/api/resources/agents/resources/memoryBlocks/index.js +17 -0
- package/api/resources/agents/resources/messages/client/Client.d.ts +80 -0
- package/api/resources/agents/resources/messages/client/Client.js +303 -0
- package/api/resources/agents/resources/messages/client/index.d.ts +1 -0
- package/api/resources/agents/resources/messages/client/index.js +17 -0
- package/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +14 -0
- package/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.js +5 -0
- package/api/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +20 -0
- package/api/resources/agents/resources/messages/client/requests/MessageUpdate.js +5 -0
- package/api/resources/agents/resources/messages/client/requests/MessagesListRequest.d.ts +29 -0
- package/api/resources/agents/resources/messages/client/requests/MessagesListRequest.js +5 -0
- package/api/resources/agents/resources/messages/client/requests/index.d.ts +3 -0
- package/api/resources/agents/resources/messages/client/requests/index.js +2 -0
- package/api/resources/agents/resources/messages/index.d.ts +2 -0
- package/api/resources/agents/resources/messages/index.js +18 -0
- package/api/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +8 -0
- package/api/resources/agents/resources/messages/types/LettaStreamingResponse.js +5 -0
- package/api/resources/agents/resources/messages/types/MessagesListResponse.d.ts +5 -0
- package/api/resources/agents/resources/messages/types/MessagesListResponse.js +5 -0
- package/api/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +5 -0
- package/api/resources/agents/resources/messages/types/MessagesListResponseItem.js +5 -0
- package/api/resources/agents/resources/messages/types/index.d.ts +3 -0
- package/api/resources/agents/resources/messages/types/index.js +19 -0
- package/api/resources/agents/resources/recallMemory/client/Client.d.ts +40 -0
- package/api/resources/agents/resources/recallMemory/client/Client.js +110 -0
- package/api/resources/agents/resources/recallMemory/client/index.d.ts +1 -0
- package/api/resources/agents/resources/recallMemory/client/index.js +2 -0
- package/api/resources/agents/resources/recallMemory/index.d.ts +1 -0
- package/api/resources/agents/resources/recallMemory/index.js +17 -0
- package/api/resources/agents/resources/sources/client/Client.d.ts +40 -0
- package/api/resources/agents/resources/sources/client/Client.js +110 -0
- package/api/resources/agents/resources/sources/client/index.d.ts +1 -0
- package/api/resources/agents/resources/sources/client/index.js +2 -0
- package/api/resources/agents/resources/sources/index.d.ts +1 -0
- package/api/resources/agents/resources/sources/index.js +17 -0
- package/api/resources/agents/resources/tools/client/Client.d.ts +66 -0
- package/api/resources/agents/resources/tools/client/Client.js +218 -0
- package/api/resources/agents/resources/tools/client/index.d.ts +1 -0
- package/api/resources/agents/resources/tools/client/index.js +2 -0
- package/api/resources/agents/resources/tools/index.d.ts +1 -0
- package/api/resources/agents/resources/tools/index.js +17 -0
- package/api/resources/agents/types/AgentsCreateVersionResponse.d.ts +7 -0
- package/api/resources/agents/types/AgentsCreateVersionResponse.js +5 -0
- package/api/resources/agents/types/AgentsMigrateResponse.d.ts +6 -0
- package/api/resources/agents/types/AgentsMigrateResponse.js +5 -0
- package/api/resources/agents/types/CreateAgentRequestToolRulesItem.d.ts +5 -0
- package/api/resources/agents/types/CreateAgentRequestToolRulesItem.js +5 -0
- package/api/resources/agents/types/UpdateAgentToolRulesItem.d.ts +5 -0
- package/api/resources/agents/types/UpdateAgentToolRulesItem.js +5 -0
- package/api/resources/agents/types/index.d.ts +4 -0
- package/api/resources/agents/types/index.js +20 -0
- package/api/resources/blocks/client/Client.d.ts +112 -0
- package/api/resources/blocks/client/Client.js +450 -0
- package/api/resources/blocks/client/index.d.ts +1 -0
- package/api/resources/blocks/client/index.js +17 -0
- package/api/resources/blocks/client/requests/BlocksListRequest.d.ts +21 -0
- package/api/resources/blocks/client/requests/BlocksListRequest.js +5 -0
- package/api/resources/blocks/client/requests/LinkAgentMemoryBlockRequest.d.ts +15 -0
- package/api/resources/blocks/client/requests/LinkAgentMemoryBlockRequest.js +5 -0
- package/api/resources/blocks/client/requests/UnlinkAgentMemoryBlockRequest.d.ts +15 -0
- package/api/resources/blocks/client/requests/UnlinkAgentMemoryBlockRequest.js +5 -0
- package/api/resources/blocks/client/requests/index.d.ts +3 -0
- package/api/resources/blocks/client/requests/index.js +2 -0
- package/api/resources/blocks/index.d.ts +1 -0
- package/api/resources/blocks/index.js +17 -0
- package/api/resources/health/client/Client.d.ts +35 -0
- package/api/resources/health/client/Client.js +99 -0
- package/api/resources/health/client/index.d.ts +1 -0
- package/api/resources/health/client/index.js +2 -0
- package/api/resources/health/index.d.ts +1 -0
- package/api/resources/health/index.js +17 -0
- package/api/resources/index.d.ts +13 -0
- package/api/resources/index.js +42 -0
- package/api/resources/jobs/client/Client.d.ts +75 -0
- package/api/resources/jobs/client/Client.js +274 -0
- package/api/resources/jobs/client/index.d.ts +1 -0
- package/api/resources/jobs/client/index.js +17 -0
- package/api/resources/jobs/client/requests/JobsListRequest.d.ts +13 -0
- package/api/resources/jobs/client/requests/JobsListRequest.js +5 -0
- package/api/resources/jobs/client/requests/index.d.ts +1 -0
- package/api/resources/jobs/client/requests/index.js +2 -0
- package/api/resources/jobs/index.d.ts +1 -0
- package/api/resources/jobs/index.js +17 -0
- package/api/resources/models/client/Client.d.ts +42 -0
- package/api/resources/models/client/Client.js +142 -0
- package/api/resources/models/client/index.d.ts +1 -0
- package/api/resources/models/client/index.js +2 -0
- package/api/resources/models/index.d.ts +1 -0
- package/api/resources/models/index.js +17 -0
- package/api/resources/sources/client/Client.d.ts +138 -0
- package/api/resources/sources/client/Client.js +509 -0
- package/api/resources/sources/client/index.d.ts +1 -0
- package/api/resources/sources/client/index.js +17 -0
- package/api/resources/sources/client/requests/SourceCreate.d.ts +20 -0
- package/api/resources/sources/client/requests/SourceCreate.js +5 -0
- package/api/resources/sources/client/requests/SourceUpdate.d.ts +18 -0
- package/api/resources/sources/client/requests/SourceUpdate.js +5 -0
- package/api/resources/sources/client/requests/SourcesAttachRequest.d.ts +15 -0
- package/api/resources/sources/client/requests/SourcesAttachRequest.js +5 -0
- package/api/resources/sources/client/requests/SourcesDetachRequest.d.ts +15 -0
- package/api/resources/sources/client/requests/SourcesDetachRequest.js +5 -0
- package/api/resources/sources/client/requests/index.d.ts +4 -0
- package/api/resources/sources/client/requests/index.js +2 -0
- package/api/resources/sources/index.d.ts +2 -0
- package/api/resources/sources/index.js +18 -0
- package/api/resources/sources/resources/files/client/Client.d.ts +70 -0
- package/api/resources/sources/resources/files/client/Client.js +232 -0
- package/api/resources/sources/resources/files/client/index.d.ts +1 -0
- package/api/resources/sources/resources/files/client/index.js +17 -0
- package/api/resources/sources/resources/files/client/requests/BodyUploadFileToSource.d.ts +9 -0
- package/api/resources/sources/resources/files/client/requests/BodyUploadFileToSource.js +5 -0
- package/api/resources/sources/resources/files/client/requests/FilesListRequest.d.ts +17 -0
- package/api/resources/sources/resources/files/client/requests/FilesListRequest.js +5 -0
- package/api/resources/sources/resources/files/client/requests/index.d.ts +2 -0
- package/api/resources/sources/resources/files/client/requests/index.js +2 -0
- package/api/resources/sources/resources/files/index.d.ts +1 -0
- package/api/resources/sources/resources/files/index.js +17 -0
- package/api/resources/sources/resources/index.d.ts +3 -0
- package/api/resources/sources/resources/index.js +32 -0
- package/api/resources/sources/resources/passages/client/Client.d.ts +40 -0
- package/api/resources/sources/resources/passages/client/Client.js +110 -0
- package/api/resources/sources/resources/passages/client/index.d.ts +1 -0
- package/api/resources/sources/resources/passages/client/index.js +2 -0
- package/api/resources/sources/resources/passages/index.d.ts +1 -0
- package/api/resources/sources/resources/passages/index.js +17 -0
- package/api/resources/tools/client/Client.d.ts +178 -0
- package/api/resources/tools/client/Client.js +712 -0
- package/api/resources/tools/client/index.d.ts +1 -0
- package/api/resources/tools/client/index.js +17 -0
- package/api/resources/tools/client/requests/ToolRunFromSource.d.ts +20 -0
- package/api/resources/tools/client/requests/ToolRunFromSource.js +5 -0
- package/api/resources/tools/client/requests/ToolUpdate.d.ts +23 -0
- package/api/resources/tools/client/requests/ToolUpdate.js +5 -0
- package/api/resources/tools/client/requests/ToolsListRequest.d.ts +11 -0
- package/api/resources/tools/client/requests/ToolsListRequest.js +5 -0
- package/api/resources/tools/client/requests/index.d.ts +3 -0
- package/api/resources/tools/client/requests/index.js +2 -0
- package/api/resources/tools/index.d.ts +1 -0
- package/api/resources/tools/index.js +17 -0
- package/api/types/ActionModel.d.ts +19 -0
- package/api/types/ActionModel.js +5 -0
- package/api/types/ActionParametersModel.d.ts +12 -0
- package/api/types/ActionParametersModel.js +5 -0
- package/api/types/ActionResponseModel.d.ts +12 -0
- package/api/types/ActionResponseModel.js +5 -0
- package/api/types/AgentState.d.ts +58 -0
- package/api/types/AgentState.js +5 -0
- package/api/types/AgentStateToolRulesItem.d.ts +5 -0
- package/api/types/AgentStateToolRulesItem.js +5 -0
- package/api/types/AgentType.d.ts +14 -0
- package/api/types/AgentType.js +13 -0
- package/api/types/AppAuthScheme.d.ts +19 -0
- package/api/types/AppAuthScheme.js +5 -0
- package/api/types/AppAuthSchemeAuthMode.d.ts +12 -0
- package/api/types/AppAuthSchemeAuthMode.js +14 -0
- package/api/types/AppModel.d.ts +25 -0
- package/api/types/AppModel.js +5 -0
- package/api/types/ArchivalMemorySummary.d.ts +7 -0
- package/api/types/ArchivalMemorySummary.js +5 -0
- package/api/types/AssistantFile.d.ts +12 -0
- package/api/types/AssistantFile.js +5 -0
- package/api/types/AssistantMessageInput.d.ts +10 -0
- package/api/types/AssistantMessageInput.js +5 -0
- package/api/types/AssistantMessageOutput.d.ts +9 -0
- package/api/types/AssistantMessageOutput.js +5 -0
- package/api/types/AuthRequest.d.ts +7 -0
- package/api/types/AuthRequest.js +5 -0
- package/api/types/AuthResponse.d.ts +9 -0
- package/api/types/AuthResponse.js +5 -0
- package/api/types/AuthSchemeField.d.ts +16 -0
- package/api/types/AuthSchemeField.js +5 -0
- package/api/types/Block.d.ts +41 -0
- package/api/types/Block.js +5 -0
- package/api/types/BlockUpdate.d.ts +22 -0
- package/api/types/BlockUpdate.js +5 -0
- package/api/types/ChatCompletionRequest.d.ts +29 -0
- package/api/types/ChatCompletionRequest.js +5 -0
- package/api/types/ChatCompletionRequestFunctionCall.d.ts +5 -0
- package/api/types/ChatCompletionRequestFunctionCall.js +5 -0
- package/api/types/ChatCompletionRequestMessagesItem.d.ts +5 -0
- package/api/types/ChatCompletionRequestMessagesItem.js +5 -0
- package/api/types/ChatCompletionRequestStop.d.ts +4 -0
- package/api/types/ChatCompletionRequestStop.js +5 -0
- package/api/types/ChatCompletionRequestToolChoice.d.ts +5 -0
- package/api/types/ChatCompletionRequestToolChoice.js +5 -0
- package/api/types/ChatCompletionResponse.d.ts +16 -0
- package/api/types/ChatCompletionResponse.js +5 -0
- package/api/types/ChildToolRule.d.ts +14 -0
- package/api/types/ChildToolRule.js +5 -0
- package/api/types/Choice.d.ts +11 -0
- package/api/types/Choice.js +5 -0
- package/api/types/ConditionalToolRule.d.ts +18 -0
- package/api/types/ConditionalToolRule.js +5 -0
- package/api/types/ConflictErrorBody.d.ts +6 -0
- package/api/types/ConflictErrorBody.js +5 -0
- package/api/types/ContextWindowOverview.d.ts +41 -0
- package/api/types/ContextWindowOverview.js +5 -0
- package/api/types/CreateAssistantFileRequest.d.ts +7 -0
- package/api/types/CreateAssistantFileRequest.js +5 -0
- package/api/types/CreateAssistantRequest.d.ts +21 -0
- package/api/types/CreateAssistantRequest.js +5 -0
- package/api/types/CreateBlock.d.ts +21 -0
- package/api/types/CreateBlock.js +5 -0
- package/api/types/DeleteAssistantFileResponse.d.ts +10 -0
- package/api/types/DeleteAssistantFileResponse.js +5 -0
- package/api/types/DeleteAssistantResponse.d.ts +10 -0
- package/api/types/DeleteAssistantResponse.js +5 -0
- package/api/types/E2BSandboxConfig.d.ts +11 -0
- package/api/types/E2BSandboxConfig.js +5 -0
- package/api/types/EmbeddingConfig.d.ts +37 -0
- package/api/types/EmbeddingConfig.js +5 -0
- package/api/types/EmbeddingConfigEmbeddingEndpointType.d.ts +26 -0
- package/api/types/EmbeddingConfigEmbeddingEndpointType.js +25 -0
- package/api/types/FileMetadata.d.ts +32 -0
- package/api/types/FileMetadata.js +5 -0
- package/api/types/FunctionCallInput.d.ts +6 -0
- package/api/types/FunctionCallInput.js +5 -0
- package/api/types/FunctionCallOutput.d.ts +7 -0
- package/api/types/FunctionCallOutput.js +5 -0
- package/api/types/FunctionSchema.d.ts +8 -0
- package/api/types/FunctionSchema.js +5 -0
- package/api/types/Health.d.ts +10 -0
- package/api/types/Health.js +5 -0
- package/api/types/HttpValidationError.d.ts +7 -0
- package/api/types/HttpValidationError.js +5 -0
- package/api/types/InitToolRule.d.ts +12 -0
- package/api/types/InitToolRule.js +5 -0
- package/api/types/InternalServerErrorBody.d.ts +6 -0
- package/api/types/InternalServerErrorBody.js +5 -0
- package/api/types/Job.d.ts +34 -0
- package/api/types/Job.js +5 -0
- package/api/types/JobStatus.d.ts +14 -0
- package/api/types/JobStatus.js +13 -0
- package/api/types/LettaRequest.d.ts +12 -0
- package/api/types/LettaRequest.js +5 -0
- package/api/types/LettaResponse.d.ts +68 -0
- package/api/types/LettaResponse.js +5 -0
- package/api/types/LettaResponseAssistantMessage.d.ts +9 -0
- package/api/types/LettaResponseAssistantMessage.js +5 -0
- package/api/types/LettaResponseLettaUsageStatistics.d.ts +22 -0
- package/api/types/LettaResponseLettaUsageStatistics.js +5 -0
- package/api/types/LettaResponseReasoningMessage.d.ts +17 -0
- package/api/types/LettaResponseReasoningMessage.js +5 -0
- package/api/types/LettaResponseSystemMessage.d.ts +17 -0
- package/api/types/LettaResponseSystemMessage.js +5 -0
- package/api/types/LettaResponseToolCall.d.ts +8 -0
- package/api/types/LettaResponseToolCall.js +5 -0
- package/api/types/LettaResponseToolCallDelta.d.ts +8 -0
- package/api/types/LettaResponseToolCallDelta.js +5 -0
- package/api/types/LettaResponseToolCallMessage.d.ts +18 -0
- package/api/types/LettaResponseToolCallMessage.js +5 -0
- package/api/types/LettaResponseToolCallMessageToolCall.d.ts +5 -0
- package/api/types/LettaResponseToolCallMessageToolCall.js +5 -0
- package/api/types/LettaResponseToolCallMessageToolCallOne.d.ts +8 -0
- package/api/types/LettaResponseToolCallMessageToolCallOne.js +5 -0
- package/api/types/LettaResponseToolCallMessageToolCallZero.d.ts +8 -0
- package/api/types/LettaResponseToolCallMessageToolCallZero.js +5 -0
- package/api/types/LettaResponseToolReturnMessage.d.ts +26 -0
- package/api/types/LettaResponseToolReturnMessage.js +5 -0
- package/api/types/LettaResponseToolReturnMessageStatus.d.ts +8 -0
- package/api/types/LettaResponseToolReturnMessageStatus.js +10 -0
- package/api/types/LettaResponseUserMessage.d.ts +17 -0
- package/api/types/LettaResponseUserMessage.js +5 -0
- package/api/types/LettaSchemasLettaMessageToolCall.d.ts +8 -0
- package/api/types/LettaSchemasLettaMessageToolCall.js +5 -0
- package/api/types/LettaSchemasMessageMessage.d.ts +47 -0
- package/api/types/LettaSchemasMessageMessage.js +5 -0
- package/api/types/LettaSchemasOpenaiChatCompletionRequestTool.d.ts +8 -0
- package/api/types/LettaSchemasOpenaiChatCompletionRequestTool.js +5 -0
- package/api/types/LettaSchemasOpenaiChatCompletionRequestToolCall.d.ts +9 -0
- package/api/types/LettaSchemasOpenaiChatCompletionRequestToolCall.js +5 -0
- package/api/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.d.ts +7 -0
- package/api/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.js +5 -0
- package/api/types/LettaSchemasOpenaiChatCompletionResponseMessage.d.ts +10 -0
- package/api/types/LettaSchemasOpenaiChatCompletionResponseMessage.js +5 -0
- package/api/types/LettaSchemasOpenaiChatCompletionResponseToolCall.d.ts +9 -0
- package/api/types/LettaSchemasOpenaiChatCompletionResponseToolCall.js +5 -0
- package/api/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.d.ts +9 -0
- package/api/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.js +5 -0
- package/api/types/LettaSchemasOpenaiChatCompletionsToolCallInput.d.ts +11 -0
- package/api/types/LettaSchemasOpenaiChatCompletionsToolCallInput.js +5 -0
- package/api/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.d.ts +11 -0
- package/api/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.js +5 -0
- package/api/types/LettaSchemasToolTool.d.ts +39 -0
- package/api/types/LettaSchemasToolTool.js +5 -0
- package/api/types/LettaUsageStatistics.d.ts +22 -0
- package/api/types/LettaUsageStatistics.js +5 -0
- package/api/types/LlmConfig.d.ts +31 -0
- package/api/types/LlmConfig.js +5 -0
- package/api/types/LlmConfigModelEndpointType.d.ts +26 -0
- package/api/types/LlmConfigModelEndpointType.js +25 -0
- package/api/types/LocalSandboxConfig.d.ts +11 -0
- package/api/types/LocalSandboxConfig.js +5 -0
- package/api/types/LogProbToken.d.ts +8 -0
- package/api/types/LogProbToken.js +5 -0
- package/api/types/Memory.d.ts +13 -0
- package/api/types/Memory.js +5 -0
- package/api/types/MessageContentLogProb.d.ts +10 -0
- package/api/types/MessageContentLogProb.js +5 -0
- package/api/types/MessageCreate.d.ts +15 -0
- package/api/types/MessageCreate.js +5 -0
- package/api/types/MessageCreateRole.d.ts +11 -0
- package/api/types/MessageCreateRole.js +10 -0
- package/api/types/MessageRole.d.ts +11 -0
- package/api/types/MessageRole.js +13 -0
- package/api/types/NotFoundErrorBody.d.ts +7 -0
- package/api/types/NotFoundErrorBody.js +5 -0
- package/api/types/NotFoundErrorBodyMessage.d.ts +8 -0
- package/api/types/NotFoundErrorBodyMessage.js +10 -0
- package/api/types/OpenAiAssistant.d.ts +27 -0
- package/api/types/OpenAiAssistant.js +5 -0
- package/api/types/Organization.d.ts +11 -0
- package/api/types/Organization.js +5 -0
- package/api/types/OrganizationCreate.d.ts +7 -0
- package/api/types/OrganizationCreate.js +5 -0
- package/api/types/Passage.d.ts +47 -0
- package/api/types/Passage.js +5 -0
- package/api/types/ReasoningMessage.d.ts +17 -0
- package/api/types/ReasoningMessage.js +5 -0
- package/api/types/RecallMemorySummary.d.ts +7 -0
- package/api/types/RecallMemorySummary.js +5 -0
- package/api/types/ResponseFormat.d.ts +6 -0
- package/api/types/ResponseFormat.js +5 -0
- package/api/types/SandboxConfig.d.ts +22 -0
- package/api/types/SandboxConfig.js +5 -0
- package/api/types/SandboxConfigCreate.d.ts +8 -0
- package/api/types/SandboxConfigCreate.js +5 -0
- package/api/types/SandboxConfigCreateConfig.d.ts +8 -0
- package/api/types/SandboxConfigCreateConfig.js +5 -0
- package/api/types/SandboxConfigUpdate.d.ts +11 -0
- package/api/types/SandboxConfigUpdate.js +5 -0
- package/api/types/SandboxConfigUpdateConfig.d.ts +8 -0
- package/api/types/SandboxConfigUpdateConfig.js +5 -0
- package/api/types/SandboxEnvironmentVariable.d.ts +25 -0
- package/api/types/SandboxEnvironmentVariable.js +5 -0
- package/api/types/SandboxEnvironmentVariableCreate.d.ts +11 -0
- package/api/types/SandboxEnvironmentVariableCreate.js +5 -0
- package/api/types/SandboxEnvironmentVariableUpdate.d.ts +14 -0
- package/api/types/SandboxEnvironmentVariableUpdate.js +5 -0
- package/api/types/SandboxType.d.ts +8 -0
- package/api/types/SandboxType.js +10 -0
- package/api/types/Source.d.ts +37 -0
- package/api/types/Source.js +5 -0
- package/api/types/SystemMessageInput.d.ts +8 -0
- package/api/types/SystemMessageInput.js +5 -0
- package/api/types/SystemMessageOutput.d.ts +17 -0
- package/api/types/SystemMessageOutput.js +5 -0
- package/api/types/TerminalToolRule.d.ts +12 -0
- package/api/types/TerminalToolRule.js +5 -0
- package/api/types/ToolCallDelta.d.ts +8 -0
- package/api/types/ToolCallDelta.js +5 -0
- package/api/types/ToolCallFunctionOutput.d.ts +9 -0
- package/api/types/ToolCallFunctionOutput.js +5 -0
- package/api/types/ToolCallMessage.d.ts +18 -0
- package/api/types/ToolCallMessage.js +5 -0
- package/api/types/ToolCallMessageToolCall.d.ts +5 -0
- package/api/types/ToolCallMessageToolCall.js +5 -0
- package/api/types/ToolCreate.d.ts +21 -0
- package/api/types/ToolCreate.js +5 -0
- package/api/types/ToolFunctionChoice.d.ts +8 -0
- package/api/types/ToolFunctionChoice.js +5 -0
- package/api/types/ToolInput.d.ts +8 -0
- package/api/types/ToolInput.js +5 -0
- package/api/types/ToolMessage.d.ts +8 -0
- package/api/types/ToolMessage.js +5 -0
- package/api/types/ToolReturnMessage.d.ts +26 -0
- package/api/types/ToolReturnMessage.js +5 -0
- package/api/types/ToolReturnMessageStatus.d.ts +8 -0
- package/api/types/ToolReturnMessageStatus.js +10 -0
- package/api/types/ToolRuleType.d.ts +15 -0
- package/api/types/ToolRuleType.js +14 -0
- package/api/types/UsageStatistics.d.ts +8 -0
- package/api/types/UsageStatistics.js +5 -0
- package/api/types/User.d.ts +25 -0
- package/api/types/User.js +5 -0
- package/api/types/UserCreate.d.ts +9 -0
- package/api/types/UserCreate.js +5 -0
- package/api/types/UserMessageInput.d.ts +9 -0
- package/api/types/UserMessageInput.js +5 -0
- package/api/types/UserMessageInputContent.d.ts +4 -0
- package/api/types/UserMessageInputContent.js +5 -0
- package/api/types/UserMessageOutput.d.ts +17 -0
- package/api/types/UserMessageOutput.js +5 -0
- package/api/types/UserUpdate.d.ts +11 -0
- package/api/types/UserUpdate.js +5 -0
- package/api/types/ValidationError.d.ts +9 -0
- package/api/types/ValidationError.js +5 -0
- package/api/types/ValidationErrorLocItem.d.ts +4 -0
- package/api/types/ValidationErrorLocItem.js +5 -0
- package/api/types/index.d.ts +125 -0
- package/api/types/index.js +141 -0
- package/core/auth/BasicAuth.d.ts +8 -0
- package/core/auth/BasicAuth.js +26 -0
- package/core/auth/BearerToken.d.ts +5 -0
- package/core/auth/BearerToken.js +15 -0
- package/core/auth/index.d.ts +2 -0
- package/core/auth/index.js +7 -0
- package/core/fetcher/APIResponse.d.ts +10 -0
- package/core/fetcher/APIResponse.js +2 -0
- package/core/fetcher/Fetcher.d.ts +39 -0
- package/core/fetcher/Fetcher.js +99 -0
- package/core/fetcher/Supplier.d.ts +4 -0
- package/core/fetcher/Supplier.js +22 -0
- package/core/fetcher/createRequestUrl.d.ts +1 -0
- package/core/fetcher/createRequestUrl.js +13 -0
- package/core/fetcher/getFetchFn.d.ts +4 -0
- package/core/fetcher/getFetchFn.js +59 -0
- package/core/fetcher/getHeader.d.ts +1 -0
- package/core/fetcher/getHeader.js +12 -0
- package/core/fetcher/getRequestBody.d.ts +7 -0
- package/core/fetcher/getRequestBody.js +23 -0
- package/core/fetcher/getResponseBody.d.ts +1 -0
- package/core/fetcher/getResponseBody.js +55 -0
- package/core/fetcher/index.d.ts +5 -0
- package/core/fetcher/index.js +9 -0
- package/core/fetcher/makeRequest.d.ts +1 -0
- package/core/fetcher/makeRequest.js +42 -0
- package/core/fetcher/requestWithRetries.d.ts +1 -0
- package/core/fetcher/requestWithRetries.js +41 -0
- package/core/fetcher/signals.d.ts +12 -0
- package/core/fetcher/signals.js +37 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +50 -0
- package/core/form-data-utils/FormDataWrapper.d.ts +60 -0
- package/core/form-data-utils/FormDataWrapper.js +174 -0
- package/core/form-data-utils/index.d.ts +1 -0
- package/core/form-data-utils/index.js +17 -0
- package/core/index.d.ts +5 -0
- package/core/index.js +21 -0
- package/core/runtime/index.d.ts +1 -0
- package/core/runtime/index.js +5 -0
- package/core/runtime/runtime.d.ts +9 -0
- package/core/runtime/runtime.js +93 -0
- package/core/streaming-fetcher/Stream.d.ts +48 -0
- package/core/streaming-fetcher/Stream.js +170 -0
- package/core/streaming-fetcher/index.d.ts +1 -0
- package/core/streaming-fetcher/index.js +5 -0
- package/dist/Client.d.ts +47 -0
- package/dist/Client.js +47 -0
- package/dist/api/errors/ConflictError.d.ts +8 -0
- package/dist/api/errors/ConflictError.js +41 -0
- package/dist/api/errors/InternalServerError.d.ts +7 -0
- package/dist/api/errors/InternalServerError.js +41 -0
- package/dist/api/errors/NotFoundError.d.ts +7 -0
- package/dist/api/errors/NotFoundError.js +41 -0
- package/dist/api/errors/UnprocessableEntityError.d.ts +8 -0
- package/dist/api/errors/UnprocessableEntityError.js +41 -0
- package/dist/api/errors/index.d.ts +4 -0
- package/dist/api/errors/index.js +20 -0
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.js +19 -0
- package/dist/api/resources/agents/client/Client.d.ts +209 -0
- package/dist/api/resources/agents/client/Client.js +751 -0
- package/dist/api/resources/agents/client/index.d.ts +1 -0
- package/dist/api/resources/agents/client/index.js +17 -0
- package/dist/api/resources/agents/client/requests/AgentsCreateVersionRequest.d.ts +11 -0
- package/dist/api/resources/agents/client/requests/AgentsCreateVersionRequest.js +5 -0
- package/dist/api/resources/agents/client/requests/AgentsListRequest.d.ts +21 -0
- package/dist/api/resources/agents/client/requests/AgentsListRequest.js +5 -0
- package/dist/api/resources/agents/client/requests/AgentsMigrateRequest.d.ts +16 -0
- package/dist/api/resources/agents/client/requests/AgentsMigrateRequest.js +5 -0
- package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +56 -0
- package/dist/api/resources/agents/client/requests/CreateAgentRequest.js +5 -0
- package/dist/api/resources/agents/client/requests/UpdateAgent.d.ts +34 -0
- package/dist/api/resources/agents/client/requests/UpdateAgent.js +5 -0
- package/dist/api/resources/agents/client/requests/index.d.ts +5 -0
- package/dist/api/resources/agents/client/requests/index.js +2 -0
- package/dist/api/resources/agents/index.d.ts +3 -0
- package/dist/api/resources/agents/index.js +19 -0
- package/dist/api/resources/agents/resources/archivalMemory/client/Client.d.ts +81 -0
- package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +287 -0
- package/dist/api/resources/agents/resources/archivalMemory/client/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/archivalMemory/client/index.js +17 -0
- package/dist/api/resources/agents/resources/archivalMemory/client/requests/ArchivalMemoryListRequest.d.ts +21 -0
- package/dist/api/resources/agents/resources/archivalMemory/client/requests/ArchivalMemoryListRequest.js +5 -0
- package/dist/api/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.d.ts +13 -0
- package/dist/api/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.js +5 -0
- package/dist/api/resources/agents/resources/archivalMemory/client/requests/index.d.ts +2 -0
- package/dist/api/resources/agents/resources/archivalMemory/client/requests/index.js +2 -0
- package/dist/api/resources/agents/resources/archivalMemory/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/archivalMemory/index.js +17 -0
- package/dist/api/resources/agents/resources/context/client/Client.d.ts +40 -0
- package/dist/api/resources/agents/resources/context/client/Client.js +110 -0
- package/dist/api/resources/agents/resources/context/client/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/context/client/index.js +2 -0
- package/dist/api/resources/agents/resources/context/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/context/index.js +17 -0
- package/dist/api/resources/agents/resources/index.d.ts +11 -0
- package/dist/api/resources/agents/resources/index.js +40 -0
- package/dist/api/resources/agents/resources/memory/client/Client.d.ts +44 -0
- package/dist/api/resources/agents/resources/memory/client/Client.js +116 -0
- package/dist/api/resources/agents/resources/memory/client/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/memory/client/index.js +2 -0
- package/dist/api/resources/agents/resources/memory/index.d.ts +2 -0
- package/dist/api/resources/agents/resources/memory/index.js +18 -0
- package/dist/api/resources/agents/resources/memory/resources/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/memory/resources/index.js +27 -0
- package/dist/api/resources/agents/resources/memory/resources/messages/client/Client.d.ts +40 -0
- package/dist/api/resources/agents/resources/memory/resources/messages/client/Client.js +110 -0
- package/dist/api/resources/agents/resources/memory/resources/messages/client/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/memory/resources/messages/client/index.js +2 -0
- package/dist/api/resources/agents/resources/memory/resources/messages/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/memory/resources/messages/index.js +17 -0
- package/dist/api/resources/agents/resources/memoryBlocks/client/Client.d.ts +57 -0
- package/dist/api/resources/agents/resources/memoryBlocks/client/Client.js +169 -0
- package/dist/api/resources/agents/resources/memoryBlocks/client/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/memoryBlocks/client/index.js +2 -0
- package/dist/api/resources/agents/resources/memoryBlocks/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/memoryBlocks/index.js +17 -0
- package/dist/api/resources/agents/resources/messages/client/Client.d.ts +80 -0
- package/dist/api/resources/agents/resources/messages/client/Client.js +303 -0
- package/dist/api/resources/agents/resources/messages/client/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/messages/client/index.js +17 -0
- package/dist/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +14 -0
- package/dist/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.js +5 -0
- package/dist/api/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +20 -0
- package/dist/api/resources/agents/resources/messages/client/requests/MessageUpdate.js +5 -0
- package/dist/api/resources/agents/resources/messages/client/requests/MessagesListRequest.d.ts +29 -0
- package/dist/api/resources/agents/resources/messages/client/requests/MessagesListRequest.js +5 -0
- package/dist/api/resources/agents/resources/messages/client/requests/index.d.ts +3 -0
- package/dist/api/resources/agents/resources/messages/client/requests/index.js +2 -0
- package/dist/api/resources/agents/resources/messages/index.d.ts +2 -0
- package/dist/api/resources/agents/resources/messages/index.js +18 -0
- package/dist/api/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +8 -0
- package/dist/api/resources/agents/resources/messages/types/LettaStreamingResponse.js +5 -0
- package/dist/api/resources/agents/resources/messages/types/MessagesListResponse.d.ts +5 -0
- package/dist/api/resources/agents/resources/messages/types/MessagesListResponse.js +5 -0
- package/dist/api/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +5 -0
- package/dist/api/resources/agents/resources/messages/types/MessagesListResponseItem.js +5 -0
- package/dist/api/resources/agents/resources/messages/types/index.d.ts +3 -0
- package/dist/api/resources/agents/resources/messages/types/index.js +19 -0
- package/dist/api/resources/agents/resources/recallMemory/client/Client.d.ts +40 -0
- package/dist/api/resources/agents/resources/recallMemory/client/Client.js +110 -0
- package/dist/api/resources/agents/resources/recallMemory/client/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/recallMemory/client/index.js +2 -0
- package/dist/api/resources/agents/resources/recallMemory/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/recallMemory/index.js +17 -0
- package/dist/api/resources/agents/resources/sources/client/Client.d.ts +40 -0
- package/dist/api/resources/agents/resources/sources/client/Client.js +110 -0
- package/dist/api/resources/agents/resources/sources/client/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/sources/client/index.js +2 -0
- package/dist/api/resources/agents/resources/sources/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/sources/index.js +17 -0
- package/dist/api/resources/agents/resources/tools/client/Client.d.ts +66 -0
- package/dist/api/resources/agents/resources/tools/client/Client.js +218 -0
- package/dist/api/resources/agents/resources/tools/client/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/tools/client/index.js +2 -0
- package/dist/api/resources/agents/resources/tools/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/tools/index.js +17 -0
- package/dist/api/resources/agents/types/AgentsCreateVersionResponse.d.ts +7 -0
- package/dist/api/resources/agents/types/AgentsCreateVersionResponse.js +5 -0
- package/dist/api/resources/agents/types/AgentsMigrateResponse.d.ts +6 -0
- package/dist/api/resources/agents/types/AgentsMigrateResponse.js +5 -0
- package/dist/api/resources/agents/types/CreateAgentRequestToolRulesItem.d.ts +5 -0
- package/dist/api/resources/agents/types/CreateAgentRequestToolRulesItem.js +5 -0
- package/dist/api/resources/agents/types/UpdateAgentToolRulesItem.d.ts +5 -0
- package/dist/api/resources/agents/types/UpdateAgentToolRulesItem.js +5 -0
- package/dist/api/resources/agents/types/index.d.ts +4 -0
- package/dist/api/resources/agents/types/index.js +20 -0
- package/dist/api/resources/blocks/client/Client.d.ts +112 -0
- package/dist/api/resources/blocks/client/Client.js +450 -0
- package/dist/api/resources/blocks/client/index.d.ts +1 -0
- package/dist/api/resources/blocks/client/index.js +17 -0
- package/dist/api/resources/blocks/client/requests/BlocksListRequest.d.ts +21 -0
- package/dist/api/resources/blocks/client/requests/BlocksListRequest.js +5 -0
- package/dist/api/resources/blocks/client/requests/LinkAgentMemoryBlockRequest.d.ts +15 -0
- package/dist/api/resources/blocks/client/requests/LinkAgentMemoryBlockRequest.js +5 -0
- package/dist/api/resources/blocks/client/requests/UnlinkAgentMemoryBlockRequest.d.ts +15 -0
- package/dist/api/resources/blocks/client/requests/UnlinkAgentMemoryBlockRequest.js +5 -0
- package/dist/api/resources/blocks/client/requests/index.d.ts +3 -0
- package/dist/api/resources/blocks/client/requests/index.js +2 -0
- package/dist/api/resources/blocks/index.d.ts +1 -0
- package/dist/api/resources/blocks/index.js +17 -0
- package/dist/api/resources/health/client/Client.d.ts +35 -0
- package/dist/api/resources/health/client/Client.js +99 -0
- package/dist/api/resources/health/client/index.d.ts +1 -0
- package/dist/api/resources/health/client/index.js +2 -0
- package/dist/api/resources/health/index.d.ts +1 -0
- package/dist/api/resources/health/index.js +17 -0
- package/dist/api/resources/index.d.ts +13 -0
- package/dist/api/resources/index.js +42 -0
- package/dist/api/resources/jobs/client/Client.d.ts +75 -0
- package/dist/api/resources/jobs/client/Client.js +274 -0
- package/dist/api/resources/jobs/client/index.d.ts +1 -0
- package/dist/api/resources/jobs/client/index.js +17 -0
- package/dist/api/resources/jobs/client/requests/JobsListRequest.d.ts +13 -0
- package/dist/api/resources/jobs/client/requests/JobsListRequest.js +5 -0
- package/dist/api/resources/jobs/client/requests/index.d.ts +1 -0
- package/dist/api/resources/jobs/client/requests/index.js +2 -0
- package/dist/api/resources/jobs/index.d.ts +1 -0
- package/dist/api/resources/jobs/index.js +17 -0
- package/dist/api/resources/models/client/Client.d.ts +42 -0
- package/dist/api/resources/models/client/Client.js +142 -0
- package/dist/api/resources/models/client/index.d.ts +1 -0
- package/dist/api/resources/models/client/index.js +2 -0
- package/dist/api/resources/models/index.d.ts +1 -0
- package/dist/api/resources/models/index.js +17 -0
- package/dist/api/resources/sources/client/Client.d.ts +138 -0
- package/dist/api/resources/sources/client/Client.js +509 -0
- package/dist/api/resources/sources/client/index.d.ts +1 -0
- package/dist/api/resources/sources/client/index.js +17 -0
- package/dist/api/resources/sources/client/requests/SourceCreate.d.ts +20 -0
- package/dist/api/resources/sources/client/requests/SourceCreate.js +5 -0
- package/dist/api/resources/sources/client/requests/SourceUpdate.d.ts +18 -0
- package/dist/api/resources/sources/client/requests/SourceUpdate.js +5 -0
- package/dist/api/resources/sources/client/requests/SourcesAttachRequest.d.ts +15 -0
- package/dist/api/resources/sources/client/requests/SourcesAttachRequest.js +5 -0
- package/dist/api/resources/sources/client/requests/SourcesDetachRequest.d.ts +15 -0
- package/dist/api/resources/sources/client/requests/SourcesDetachRequest.js +5 -0
- package/dist/api/resources/sources/client/requests/index.d.ts +4 -0
- package/dist/api/resources/sources/client/requests/index.js +2 -0
- package/dist/api/resources/sources/index.d.ts +2 -0
- package/dist/api/resources/sources/index.js +18 -0
- package/dist/api/resources/sources/resources/files/client/Client.d.ts +70 -0
- package/dist/api/resources/sources/resources/files/client/Client.js +232 -0
- package/dist/api/resources/sources/resources/files/client/index.d.ts +1 -0
- package/dist/api/resources/sources/resources/files/client/index.js +17 -0
- package/dist/api/resources/sources/resources/files/client/requests/BodyUploadFileToSource.d.ts +9 -0
- package/dist/api/resources/sources/resources/files/client/requests/BodyUploadFileToSource.js +5 -0
- package/dist/api/resources/sources/resources/files/client/requests/FilesListRequest.d.ts +17 -0
- package/dist/api/resources/sources/resources/files/client/requests/FilesListRequest.js +5 -0
- package/dist/api/resources/sources/resources/files/client/requests/index.d.ts +2 -0
- package/dist/api/resources/sources/resources/files/client/requests/index.js +2 -0
- package/dist/api/resources/sources/resources/files/index.d.ts +1 -0
- package/dist/api/resources/sources/resources/files/index.js +17 -0
- package/dist/api/resources/sources/resources/index.d.ts +3 -0
- package/dist/api/resources/sources/resources/index.js +32 -0
- package/dist/api/resources/sources/resources/passages/client/Client.d.ts +40 -0
- package/dist/api/resources/sources/resources/passages/client/Client.js +110 -0
- package/dist/api/resources/sources/resources/passages/client/index.d.ts +1 -0
- package/dist/api/resources/sources/resources/passages/client/index.js +2 -0
- package/dist/api/resources/sources/resources/passages/index.d.ts +1 -0
- package/dist/api/resources/sources/resources/passages/index.js +17 -0
- package/dist/api/resources/tools/client/Client.d.ts +178 -0
- package/dist/api/resources/tools/client/Client.js +712 -0
- package/dist/api/resources/tools/client/index.d.ts +1 -0
- package/dist/api/resources/tools/client/index.js +17 -0
- package/dist/api/resources/tools/client/requests/ToolRunFromSource.d.ts +20 -0
- package/dist/api/resources/tools/client/requests/ToolRunFromSource.js +5 -0
- package/dist/api/resources/tools/client/requests/ToolUpdate.d.ts +23 -0
- package/dist/api/resources/tools/client/requests/ToolUpdate.js +5 -0
- package/dist/api/resources/tools/client/requests/ToolsListRequest.d.ts +11 -0
- package/dist/api/resources/tools/client/requests/ToolsListRequest.js +5 -0
- package/dist/api/resources/tools/client/requests/index.d.ts +3 -0
- package/dist/api/resources/tools/client/requests/index.js +2 -0
- package/dist/api/resources/tools/index.d.ts +1 -0
- package/dist/api/resources/tools/index.js +17 -0
- package/dist/api/types/ActionModel.d.ts +19 -0
- package/dist/api/types/ActionModel.js +5 -0
- package/dist/api/types/ActionParametersModel.d.ts +12 -0
- package/dist/api/types/ActionParametersModel.js +5 -0
- package/dist/api/types/ActionResponseModel.d.ts +12 -0
- package/dist/api/types/ActionResponseModel.js +5 -0
- package/dist/api/types/AgentState.d.ts +58 -0
- package/dist/api/types/AgentState.js +5 -0
- package/dist/api/types/AgentStateToolRulesItem.d.ts +5 -0
- package/dist/api/types/AgentStateToolRulesItem.js +5 -0
- package/dist/api/types/AgentType.d.ts +14 -0
- package/dist/api/types/AgentType.js +13 -0
- package/dist/api/types/AppAuthScheme.d.ts +19 -0
- package/dist/api/types/AppAuthScheme.js +5 -0
- package/dist/api/types/AppAuthSchemeAuthMode.d.ts +12 -0
- package/dist/api/types/AppAuthSchemeAuthMode.js +14 -0
- package/dist/api/types/AppModel.d.ts +25 -0
- package/dist/api/types/AppModel.js +5 -0
- package/dist/api/types/ArchivalMemorySummary.d.ts +7 -0
- package/dist/api/types/ArchivalMemorySummary.js +5 -0
- package/dist/api/types/AssistantFile.d.ts +12 -0
- package/dist/api/types/AssistantFile.js +5 -0
- package/dist/api/types/AssistantMessageInput.d.ts +10 -0
- package/dist/api/types/AssistantMessageInput.js +5 -0
- package/dist/api/types/AssistantMessageOutput.d.ts +9 -0
- package/dist/api/types/AssistantMessageOutput.js +5 -0
- package/dist/api/types/AuthRequest.d.ts +7 -0
- package/dist/api/types/AuthRequest.js +5 -0
- package/dist/api/types/AuthResponse.d.ts +9 -0
- package/dist/api/types/AuthResponse.js +5 -0
- package/dist/api/types/AuthSchemeField.d.ts +16 -0
- package/dist/api/types/AuthSchemeField.js +5 -0
- package/dist/api/types/Block.d.ts +41 -0
- package/dist/api/types/Block.js +5 -0
- package/dist/api/types/BlockUpdate.d.ts +22 -0
- package/dist/api/types/BlockUpdate.js +5 -0
- package/dist/api/types/ChatCompletionRequest.d.ts +29 -0
- package/dist/api/types/ChatCompletionRequest.js +5 -0
- package/dist/api/types/ChatCompletionRequestFunctionCall.d.ts +5 -0
- package/dist/api/types/ChatCompletionRequestFunctionCall.js +5 -0
- package/dist/api/types/ChatCompletionRequestMessagesItem.d.ts +5 -0
- package/dist/api/types/ChatCompletionRequestMessagesItem.js +5 -0
- package/dist/api/types/ChatCompletionRequestStop.d.ts +4 -0
- package/dist/api/types/ChatCompletionRequestStop.js +5 -0
- package/dist/api/types/ChatCompletionRequestToolChoice.d.ts +5 -0
- package/dist/api/types/ChatCompletionRequestToolChoice.js +5 -0
- package/dist/api/types/ChatCompletionResponse.d.ts +16 -0
- package/dist/api/types/ChatCompletionResponse.js +5 -0
- package/dist/api/types/ChildToolRule.d.ts +14 -0
- package/dist/api/types/ChildToolRule.js +5 -0
- package/dist/api/types/Choice.d.ts +11 -0
- package/dist/api/types/Choice.js +5 -0
- package/dist/api/types/ConditionalToolRule.d.ts +18 -0
- package/dist/api/types/ConditionalToolRule.js +5 -0
- package/dist/api/types/ConflictErrorBody.d.ts +6 -0
- package/dist/api/types/ConflictErrorBody.js +5 -0
- package/dist/api/types/ContextWindowOverview.d.ts +41 -0
- package/dist/api/types/ContextWindowOverview.js +5 -0
- package/dist/api/types/CreateAssistantFileRequest.d.ts +7 -0
- package/dist/api/types/CreateAssistantFileRequest.js +5 -0
- package/dist/api/types/CreateAssistantRequest.d.ts +21 -0
- package/dist/api/types/CreateAssistantRequest.js +5 -0
- package/dist/api/types/CreateBlock.d.ts +21 -0
- package/dist/api/types/CreateBlock.js +5 -0
- package/dist/api/types/DeleteAssistantFileResponse.d.ts +10 -0
- package/dist/api/types/DeleteAssistantFileResponse.js +5 -0
- package/dist/api/types/DeleteAssistantResponse.d.ts +10 -0
- package/dist/api/types/DeleteAssistantResponse.js +5 -0
- package/dist/api/types/E2BSandboxConfig.d.ts +11 -0
- package/dist/api/types/E2BSandboxConfig.js +5 -0
- package/dist/api/types/EmbeddingConfig.d.ts +37 -0
- package/dist/api/types/EmbeddingConfig.js +5 -0
- package/dist/api/types/EmbeddingConfigEmbeddingEndpointType.d.ts +26 -0
- package/dist/api/types/EmbeddingConfigEmbeddingEndpointType.js +25 -0
- package/dist/api/types/FileMetadata.d.ts +32 -0
- package/dist/api/types/FileMetadata.js +5 -0
- package/dist/api/types/FunctionCallInput.d.ts +6 -0
- package/dist/api/types/FunctionCallInput.js +5 -0
- package/dist/api/types/FunctionCallOutput.d.ts +7 -0
- package/dist/api/types/FunctionCallOutput.js +5 -0
- package/dist/api/types/FunctionSchema.d.ts +8 -0
- package/dist/api/types/FunctionSchema.js +5 -0
- package/dist/api/types/Health.d.ts +10 -0
- package/dist/api/types/Health.js +5 -0
- package/dist/api/types/HttpValidationError.d.ts +7 -0
- package/dist/api/types/HttpValidationError.js +5 -0
- package/dist/api/types/InitToolRule.d.ts +12 -0
- package/dist/api/types/InitToolRule.js +5 -0
- package/dist/api/types/InternalServerErrorBody.d.ts +6 -0
- package/dist/api/types/InternalServerErrorBody.js +5 -0
- package/dist/api/types/Job.d.ts +34 -0
- package/dist/api/types/Job.js +5 -0
- package/dist/api/types/JobStatus.d.ts +14 -0
- package/dist/api/types/JobStatus.js +13 -0
- package/dist/api/types/LettaRequest.d.ts +12 -0
- package/dist/api/types/LettaRequest.js +5 -0
- package/dist/api/types/LettaResponse.d.ts +68 -0
- package/dist/api/types/LettaResponse.js +5 -0
- package/dist/api/types/LettaResponseAssistantMessage.d.ts +9 -0
- package/dist/api/types/LettaResponseAssistantMessage.js +5 -0
- package/dist/api/types/LettaResponseLettaUsageStatistics.d.ts +22 -0
- package/dist/api/types/LettaResponseLettaUsageStatistics.js +5 -0
- package/dist/api/types/LettaResponseReasoningMessage.d.ts +17 -0
- package/dist/api/types/LettaResponseReasoningMessage.js +5 -0
- package/dist/api/types/LettaResponseSystemMessage.d.ts +17 -0
- package/dist/api/types/LettaResponseSystemMessage.js +5 -0
- package/dist/api/types/LettaResponseToolCall.d.ts +8 -0
- package/dist/api/types/LettaResponseToolCall.js +5 -0
- package/dist/api/types/LettaResponseToolCallDelta.d.ts +8 -0
- package/dist/api/types/LettaResponseToolCallDelta.js +5 -0
- package/dist/api/types/LettaResponseToolCallMessage.d.ts +18 -0
- package/dist/api/types/LettaResponseToolCallMessage.js +5 -0
- package/dist/api/types/LettaResponseToolCallMessageToolCall.d.ts +5 -0
- package/dist/api/types/LettaResponseToolCallMessageToolCall.js +5 -0
- package/dist/api/types/LettaResponseToolCallMessageToolCallOne.d.ts +8 -0
- package/dist/api/types/LettaResponseToolCallMessageToolCallOne.js +5 -0
- package/dist/api/types/LettaResponseToolCallMessageToolCallZero.d.ts +8 -0
- package/dist/api/types/LettaResponseToolCallMessageToolCallZero.js +5 -0
- package/dist/api/types/LettaResponseToolReturnMessage.d.ts +26 -0
- package/dist/api/types/LettaResponseToolReturnMessage.js +5 -0
- package/dist/api/types/LettaResponseToolReturnMessageStatus.d.ts +8 -0
- package/dist/api/types/LettaResponseToolReturnMessageStatus.js +10 -0
- package/dist/api/types/LettaResponseUserMessage.d.ts +17 -0
- package/dist/api/types/LettaResponseUserMessage.js +5 -0
- package/dist/api/types/LettaSchemasLettaMessageToolCall.d.ts +8 -0
- package/dist/api/types/LettaSchemasLettaMessageToolCall.js +5 -0
- package/dist/api/types/LettaSchemasMessageMessage.d.ts +47 -0
- package/dist/api/types/LettaSchemasMessageMessage.js +5 -0
- package/dist/api/types/LettaSchemasOpenaiChatCompletionRequestTool.d.ts +8 -0
- package/dist/api/types/LettaSchemasOpenaiChatCompletionRequestTool.js +5 -0
- package/dist/api/types/LettaSchemasOpenaiChatCompletionRequestToolCall.d.ts +9 -0
- package/dist/api/types/LettaSchemasOpenaiChatCompletionRequestToolCall.js +5 -0
- package/dist/api/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.d.ts +7 -0
- package/dist/api/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.js +5 -0
- package/dist/api/types/LettaSchemasOpenaiChatCompletionResponseMessage.d.ts +10 -0
- package/dist/api/types/LettaSchemasOpenaiChatCompletionResponseMessage.js +5 -0
- package/dist/api/types/LettaSchemasOpenaiChatCompletionResponseToolCall.d.ts +9 -0
- package/dist/api/types/LettaSchemasOpenaiChatCompletionResponseToolCall.js +5 -0
- package/dist/api/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.d.ts +9 -0
- package/dist/api/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.js +5 -0
- package/dist/api/types/LettaSchemasOpenaiChatCompletionsToolCallInput.d.ts +11 -0
- package/dist/api/types/LettaSchemasOpenaiChatCompletionsToolCallInput.js +5 -0
- package/dist/api/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.d.ts +11 -0
- package/dist/api/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.js +5 -0
- package/dist/api/types/LettaSchemasToolTool.d.ts +39 -0
- package/dist/api/types/LettaSchemasToolTool.js +5 -0
- package/dist/api/types/LettaUsageStatistics.d.ts +22 -0
- package/dist/api/types/LettaUsageStatistics.js +5 -0
- package/dist/api/types/LlmConfig.d.ts +31 -0
- package/dist/api/types/LlmConfig.js +5 -0
- package/dist/api/types/LlmConfigModelEndpointType.d.ts +26 -0
- package/dist/api/types/LlmConfigModelEndpointType.js +25 -0
- package/dist/api/types/LocalSandboxConfig.d.ts +11 -0
- package/dist/api/types/LocalSandboxConfig.js +5 -0
- package/dist/api/types/LogProbToken.d.ts +8 -0
- package/dist/api/types/LogProbToken.js +5 -0
- package/dist/api/types/Memory.d.ts +13 -0
- package/dist/api/types/Memory.js +5 -0
- package/dist/api/types/MessageContentLogProb.d.ts +10 -0
- package/dist/api/types/MessageContentLogProb.js +5 -0
- package/dist/api/types/MessageCreate.d.ts +15 -0
- package/dist/api/types/MessageCreate.js +5 -0
- package/dist/api/types/MessageCreateRole.d.ts +11 -0
- package/dist/api/types/MessageCreateRole.js +10 -0
- package/dist/api/types/MessageRole.d.ts +11 -0
- package/dist/api/types/MessageRole.js +13 -0
- package/dist/api/types/NotFoundErrorBody.d.ts +7 -0
- package/dist/api/types/NotFoundErrorBody.js +5 -0
- package/dist/api/types/NotFoundErrorBodyMessage.d.ts +8 -0
- package/dist/api/types/NotFoundErrorBodyMessage.js +10 -0
- package/dist/api/types/OpenAiAssistant.d.ts +27 -0
- package/dist/api/types/OpenAiAssistant.js +5 -0
- package/dist/api/types/Organization.d.ts +11 -0
- package/dist/api/types/Organization.js +5 -0
- package/dist/api/types/OrganizationCreate.d.ts +7 -0
- package/dist/api/types/OrganizationCreate.js +5 -0
- package/dist/api/types/Passage.d.ts +47 -0
- package/dist/api/types/Passage.js +5 -0
- package/dist/api/types/ReasoningMessage.d.ts +17 -0
- package/dist/api/types/ReasoningMessage.js +5 -0
- package/dist/api/types/RecallMemorySummary.d.ts +7 -0
- package/dist/api/types/RecallMemorySummary.js +5 -0
- package/dist/api/types/ResponseFormat.d.ts +6 -0
- package/dist/api/types/ResponseFormat.js +5 -0
- package/dist/api/types/SandboxConfig.d.ts +22 -0
- package/dist/api/types/SandboxConfig.js +5 -0
- package/dist/api/types/SandboxConfigCreate.d.ts +8 -0
- package/dist/api/types/SandboxConfigCreate.js +5 -0
- package/dist/api/types/SandboxConfigCreateConfig.d.ts +8 -0
- package/dist/api/types/SandboxConfigCreateConfig.js +5 -0
- package/dist/api/types/SandboxConfigUpdate.d.ts +11 -0
- package/dist/api/types/SandboxConfigUpdate.js +5 -0
- package/dist/api/types/SandboxConfigUpdateConfig.d.ts +8 -0
- package/dist/api/types/SandboxConfigUpdateConfig.js +5 -0
- package/dist/api/types/SandboxEnvironmentVariable.d.ts +25 -0
- package/dist/api/types/SandboxEnvironmentVariable.js +5 -0
- package/dist/api/types/SandboxEnvironmentVariableCreate.d.ts +11 -0
- package/dist/api/types/SandboxEnvironmentVariableCreate.js +5 -0
- package/dist/api/types/SandboxEnvironmentVariableUpdate.d.ts +14 -0
- package/dist/api/types/SandboxEnvironmentVariableUpdate.js +5 -0
- package/dist/api/types/SandboxType.d.ts +8 -0
- package/dist/api/types/SandboxType.js +10 -0
- package/dist/api/types/Source.d.ts +37 -0
- package/dist/api/types/Source.js +5 -0
- package/dist/api/types/SystemMessageInput.d.ts +8 -0
- package/dist/api/types/SystemMessageInput.js +5 -0
- package/dist/api/types/SystemMessageOutput.d.ts +17 -0
- package/dist/api/types/SystemMessageOutput.js +5 -0
- package/dist/api/types/TerminalToolRule.d.ts +12 -0
- package/dist/api/types/TerminalToolRule.js +5 -0
- package/dist/api/types/ToolCallDelta.d.ts +8 -0
- package/dist/api/types/ToolCallDelta.js +5 -0
- package/dist/api/types/ToolCallFunctionOutput.d.ts +9 -0
- package/dist/api/types/ToolCallFunctionOutput.js +5 -0
- package/dist/api/types/ToolCallMessage.d.ts +18 -0
- package/dist/api/types/ToolCallMessage.js +5 -0
- package/dist/api/types/ToolCallMessageToolCall.d.ts +5 -0
- package/dist/api/types/ToolCallMessageToolCall.js +5 -0
- package/dist/api/types/ToolCreate.d.ts +21 -0
- package/dist/api/types/ToolCreate.js +5 -0
- package/dist/api/types/ToolFunctionChoice.d.ts +8 -0
- package/dist/api/types/ToolFunctionChoice.js +5 -0
- package/dist/api/types/ToolInput.d.ts +8 -0
- package/dist/api/types/ToolInput.js +5 -0
- package/dist/api/types/ToolMessage.d.ts +8 -0
- package/dist/api/types/ToolMessage.js +5 -0
- package/dist/api/types/ToolReturnMessage.d.ts +26 -0
- package/dist/api/types/ToolReturnMessage.js +5 -0
- package/dist/api/types/ToolReturnMessageStatus.d.ts +8 -0
- package/dist/api/types/ToolReturnMessageStatus.js +10 -0
- package/dist/api/types/ToolRuleType.d.ts +15 -0
- package/dist/api/types/ToolRuleType.js +14 -0
- package/dist/api/types/UsageStatistics.d.ts +8 -0
- package/dist/api/types/UsageStatistics.js +5 -0
- package/dist/api/types/User.d.ts +25 -0
- package/dist/api/types/User.js +5 -0
- package/dist/api/types/UserCreate.d.ts +9 -0
- package/dist/api/types/UserCreate.js +5 -0
- package/dist/api/types/UserMessageInput.d.ts +9 -0
- package/dist/api/types/UserMessageInput.js +5 -0
- package/dist/api/types/UserMessageInputContent.d.ts +4 -0
- package/dist/api/types/UserMessageInputContent.js +5 -0
- package/dist/api/types/UserMessageOutput.d.ts +17 -0
- package/dist/api/types/UserMessageOutput.js +5 -0
- package/dist/api/types/UserUpdate.d.ts +11 -0
- package/dist/api/types/UserUpdate.js +5 -0
- package/dist/api/types/ValidationError.d.ts +9 -0
- package/dist/api/types/ValidationError.js +5 -0
- package/dist/api/types/ValidationErrorLocItem.d.ts +4 -0
- package/dist/api/types/ValidationErrorLocItem.js +5 -0
- package/dist/api/types/index.d.ts +125 -0
- package/dist/api/types/index.js +141 -0
- package/dist/core/auth/BasicAuth.d.ts +8 -0
- package/dist/core/auth/BasicAuth.js +26 -0
- package/dist/core/auth/BearerToken.d.ts +5 -0
- package/dist/core/auth/BearerToken.js +15 -0
- package/dist/core/auth/index.d.ts +2 -0
- package/dist/core/auth/index.js +7 -0
- package/dist/core/fetcher/APIResponse.d.ts +10 -0
- package/dist/core/fetcher/APIResponse.js +2 -0
- package/dist/core/fetcher/Fetcher.d.ts +39 -0
- package/dist/core/fetcher/Fetcher.js +99 -0
- package/dist/core/fetcher/Supplier.d.ts +4 -0
- package/dist/core/fetcher/Supplier.js +22 -0
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/core/fetcher/createRequestUrl.js +13 -0
- package/dist/core/fetcher/getFetchFn.d.ts +4 -0
- package/dist/core/fetcher/getFetchFn.js +59 -0
- package/dist/core/fetcher/getHeader.d.ts +1 -0
- package/dist/core/fetcher/getHeader.js +12 -0
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +23 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getResponseBody.js +55 -0
- package/dist/core/fetcher/index.d.ts +5 -0
- package/dist/core/fetcher/index.js +9 -0
- package/dist/core/fetcher/makeRequest.d.ts +1 -0
- package/dist/core/fetcher/makeRequest.js +42 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/core/fetcher/requestWithRetries.js +41 -0
- package/dist/core/fetcher/signals.d.ts +12 -0
- package/dist/core/fetcher/signals.js +37 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +50 -0
- package/dist/core/form-data-utils/FormDataWrapper.d.ts +60 -0
- package/dist/core/form-data-utils/FormDataWrapper.js +174 -0
- package/dist/core/form-data-utils/index.d.ts +1 -0
- package/dist/core/form-data-utils/index.js +17 -0
- package/dist/core/index.d.ts +5 -0
- package/dist/core/index.js +21 -0
- package/dist/core/runtime/index.d.ts +1 -0
- package/dist/core/runtime/index.js +5 -0
- package/dist/core/runtime/runtime.d.ts +9 -0
- package/dist/core/runtime/runtime.js +93 -0
- package/dist/core/streaming-fetcher/Stream.d.ts +48 -0
- package/dist/core/streaming-fetcher/Stream.js +170 -0
- package/dist/core/streaming-fetcher/index.d.ts +1 -0
- package/dist/core/streaming-fetcher/index.js +5 -0
- package/dist/environments.d.ts +8 -0
- package/dist/environments.js +10 -0
- package/dist/errors/LettaError.d.ts +12 -0
- package/dist/errors/LettaError.js +32 -0
- package/dist/errors/LettaTimeoutError.d.ts +6 -0
- package/dist/errors/LettaTimeoutError.js +13 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/index.js +7 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +34 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/environments.d.ts +8 -0
- package/environments.js +10 -0
- package/errors/LettaError.d.ts +12 -0
- package/errors/LettaError.js +32 -0
- package/errors/LettaTimeoutError.d.ts +6 -0
- package/errors/LettaTimeoutError.js +13 -0
- package/errors/index.d.ts +2 -0
- package/errors/index.js +7 -0
- package/index.d.ts +4 -0
- package/index.js +34 -0
- package/jest.config.js +5 -0
- package/package.json +42 -10
- package/reference.md +4296 -0
- package/version.d.ts +1 -0
- package/version.js +4 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* agent_id: "agent_id"
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface LinkAgentMemoryBlockRequest {
|
|
11
|
+
/**
|
|
12
|
+
* The unique identifier of the agent to attach the source to.
|
|
13
|
+
*/
|
|
14
|
+
agent_id: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* agent_id: "agent_id"
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface UnlinkAgentMemoryBlockRequest {
|
|
11
|
+
/**
|
|
12
|
+
* The unique identifier of the agent to attach the source to.
|
|
13
|
+
*/
|
|
14
|
+
agent_id: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client"), exports);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
5
|
+
import * as core from "../../../../core";
|
|
6
|
+
import * as Letta from "../../../index";
|
|
7
|
+
export declare namespace Health {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.LettaEnvironment | string>;
|
|
10
|
+
token: core.Supplier<core.BearerToken>;
|
|
11
|
+
fetcher?: core.FetchFunction;
|
|
12
|
+
}
|
|
13
|
+
interface RequestOptions {
|
|
14
|
+
/** The maximum time to wait for a response in seconds. */
|
|
15
|
+
timeoutInSeconds?: number;
|
|
16
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
17
|
+
maxRetries?: number;
|
|
18
|
+
/** A hook to abort the request. */
|
|
19
|
+
abortSignal?: AbortSignal;
|
|
20
|
+
/** Additional headers to include in the request. */
|
|
21
|
+
headers?: Record<string, string>;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export declare class Health {
|
|
25
|
+
protected readonly _options: Health.Options;
|
|
26
|
+
constructor(_options: Health.Options);
|
|
27
|
+
/**
|
|
28
|
+
* @param {Health.RequestOptions} requestOptions - Request-specific configuration.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* await client.health.check()
|
|
32
|
+
*/
|
|
33
|
+
check(requestOptions?: Health.RequestOptions): Promise<Letta.Health>;
|
|
34
|
+
protected _getAuthorizationHeader(): Promise<string>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
38
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
39
|
+
};
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.Health = void 0;
|
|
42
|
+
const environments = __importStar(require("../../../../environments"));
|
|
43
|
+
const core = __importStar(require("../../../../core"));
|
|
44
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
45
|
+
const errors = __importStar(require("../../../../errors/index"));
|
|
46
|
+
class Health {
|
|
47
|
+
constructor(_options) {
|
|
48
|
+
this._options = _options;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* @param {Health.RequestOptions} requestOptions - Request-specific configuration.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* await client.health.check()
|
|
55
|
+
*/
|
|
56
|
+
check(requestOptions) {
|
|
57
|
+
var _a, _b;
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
60
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/health/"),
|
|
61
|
+
method: "GET",
|
|
62
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0-alpha2", "User-Agent": "@letta-ai/letta-client/0.1.0-alpha2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
63
|
+
contentType: "application/json",
|
|
64
|
+
requestType: "json",
|
|
65
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
66
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
67
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
68
|
+
});
|
|
69
|
+
if (_response.ok) {
|
|
70
|
+
return _response.body;
|
|
71
|
+
}
|
|
72
|
+
if (_response.error.reason === "status-code") {
|
|
73
|
+
throw new errors.LettaError({
|
|
74
|
+
statusCode: _response.error.statusCode,
|
|
75
|
+
body: _response.error.body,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
switch (_response.error.reason) {
|
|
79
|
+
case "non-json":
|
|
80
|
+
throw new errors.LettaError({
|
|
81
|
+
statusCode: _response.error.statusCode,
|
|
82
|
+
body: _response.error.rawBody,
|
|
83
|
+
});
|
|
84
|
+
case "timeout":
|
|
85
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/health/.");
|
|
86
|
+
case "unknown":
|
|
87
|
+
throw new errors.LettaError({
|
|
88
|
+
message: _response.error.errorMessage,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
_getAuthorizationHeader() {
|
|
94
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
95
|
+
return `Bearer ${yield core.Supplier.get(this._options.token)}`;
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.Health = Health;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * as agents from "./agents";
|
|
2
|
+
export * from "./agents/types";
|
|
3
|
+
export * as tools from "./tools";
|
|
4
|
+
export * as sources from "./sources";
|
|
5
|
+
export * as models from "./models";
|
|
6
|
+
export * as blocks from "./blocks";
|
|
7
|
+
export * as jobs from "./jobs";
|
|
8
|
+
export * as health from "./health";
|
|
9
|
+
export * from "./tools/client/requests";
|
|
10
|
+
export * from "./sources/client/requests";
|
|
11
|
+
export * from "./agents/client/requests";
|
|
12
|
+
export * from "./blocks/client/requests";
|
|
13
|
+
export * from "./jobs/client/requests";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.health = exports.jobs = exports.blocks = exports.models = exports.sources = exports.tools = exports.agents = void 0;
|
|
30
|
+
exports.agents = __importStar(require("./agents"));
|
|
31
|
+
__exportStar(require("./agents/types"), exports);
|
|
32
|
+
exports.tools = __importStar(require("./tools"));
|
|
33
|
+
exports.sources = __importStar(require("./sources"));
|
|
34
|
+
exports.models = __importStar(require("./models"));
|
|
35
|
+
exports.blocks = __importStar(require("./blocks"));
|
|
36
|
+
exports.jobs = __importStar(require("./jobs"));
|
|
37
|
+
exports.health = __importStar(require("./health"));
|
|
38
|
+
__exportStar(require("./tools/client/requests"), exports);
|
|
39
|
+
__exportStar(require("./sources/client/requests"), exports);
|
|
40
|
+
__exportStar(require("./agents/client/requests"), exports);
|
|
41
|
+
__exportStar(require("./blocks/client/requests"), exports);
|
|
42
|
+
__exportStar(require("./jobs/client/requests"), exports);
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
5
|
+
import * as core from "../../../../core";
|
|
6
|
+
import * as Letta from "../../../index";
|
|
7
|
+
export declare namespace Jobs {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.LettaEnvironment | string>;
|
|
10
|
+
token: core.Supplier<core.BearerToken>;
|
|
11
|
+
fetcher?: core.FetchFunction;
|
|
12
|
+
}
|
|
13
|
+
interface RequestOptions {
|
|
14
|
+
/** The maximum time to wait for a response in seconds. */
|
|
15
|
+
timeoutInSeconds?: number;
|
|
16
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
17
|
+
maxRetries?: number;
|
|
18
|
+
/** A hook to abort the request. */
|
|
19
|
+
abortSignal?: AbortSignal;
|
|
20
|
+
/** Additional headers to include in the request. */
|
|
21
|
+
headers?: Record<string, string>;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export declare class Jobs {
|
|
25
|
+
protected readonly _options: Jobs.Options;
|
|
26
|
+
constructor(_options: Jobs.Options);
|
|
27
|
+
/**
|
|
28
|
+
* List all jobs.
|
|
29
|
+
*
|
|
30
|
+
* @param {Letta.JobsListRequest} request
|
|
31
|
+
* @param {Jobs.RequestOptions} requestOptions - Request-specific configuration.
|
|
32
|
+
*
|
|
33
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* await client.jobs.list()
|
|
37
|
+
*/
|
|
38
|
+
list(request?: Letta.JobsListRequest, requestOptions?: Jobs.RequestOptions): Promise<Letta.Job[]>;
|
|
39
|
+
/**
|
|
40
|
+
* List all active jobs.
|
|
41
|
+
*
|
|
42
|
+
* @param {Jobs.RequestOptions} requestOptions - Request-specific configuration.
|
|
43
|
+
*
|
|
44
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* await client.jobs.listActive()
|
|
48
|
+
*/
|
|
49
|
+
listActive(requestOptions?: Jobs.RequestOptions): Promise<Letta.Job[]>;
|
|
50
|
+
/**
|
|
51
|
+
* Get the status of a job.
|
|
52
|
+
*
|
|
53
|
+
* @param {string} jobId
|
|
54
|
+
* @param {Jobs.RequestOptions} requestOptions - Request-specific configuration.
|
|
55
|
+
*
|
|
56
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* await client.jobs.get("job_id")
|
|
60
|
+
*/
|
|
61
|
+
get(jobId: string, requestOptions?: Jobs.RequestOptions): Promise<Letta.Job>;
|
|
62
|
+
/**
|
|
63
|
+
* Delete a job by its job_id.
|
|
64
|
+
*
|
|
65
|
+
* @param {string} jobId
|
|
66
|
+
* @param {Jobs.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
|
+
*
|
|
68
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* await client.jobs.delete("job_id")
|
|
72
|
+
*/
|
|
73
|
+
delete(jobId: string, requestOptions?: Jobs.RequestOptions): Promise<Letta.Job>;
|
|
74
|
+
protected _getAuthorizationHeader(): Promise<string>;
|
|
75
|
+
}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
38
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
39
|
+
};
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.Jobs = void 0;
|
|
42
|
+
const environments = __importStar(require("../../../../environments"));
|
|
43
|
+
const core = __importStar(require("../../../../core"));
|
|
44
|
+
const Letta = __importStar(require("../../../index"));
|
|
45
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
46
|
+
const errors = __importStar(require("../../../../errors/index"));
|
|
47
|
+
class Jobs {
|
|
48
|
+
constructor(_options) {
|
|
49
|
+
this._options = _options;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* List all jobs.
|
|
53
|
+
*
|
|
54
|
+
* @param {Letta.JobsListRequest} request
|
|
55
|
+
* @param {Jobs.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
|
+
*
|
|
57
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* await client.jobs.list()
|
|
61
|
+
*/
|
|
62
|
+
list(request = {}, requestOptions) {
|
|
63
|
+
var _a, _b;
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
const { source_id: sourceId } = request;
|
|
66
|
+
const _queryParams = {};
|
|
67
|
+
if (sourceId != null) {
|
|
68
|
+
_queryParams["source_id"] = sourceId;
|
|
69
|
+
}
|
|
70
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
71
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/jobs/"),
|
|
72
|
+
method: "GET",
|
|
73
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0-alpha2", "User-Agent": "@letta-ai/letta-client/0.1.0-alpha2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
74
|
+
contentType: "application/json",
|
|
75
|
+
queryParameters: _queryParams,
|
|
76
|
+
requestType: "json",
|
|
77
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
78
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
79
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
80
|
+
});
|
|
81
|
+
if (_response.ok) {
|
|
82
|
+
return _response.body;
|
|
83
|
+
}
|
|
84
|
+
if (_response.error.reason === "status-code") {
|
|
85
|
+
switch (_response.error.statusCode) {
|
|
86
|
+
case 422:
|
|
87
|
+
throw new Letta.UnprocessableEntityError(_response.error.body);
|
|
88
|
+
default:
|
|
89
|
+
throw new errors.LettaError({
|
|
90
|
+
statusCode: _response.error.statusCode,
|
|
91
|
+
body: _response.error.body,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
switch (_response.error.reason) {
|
|
96
|
+
case "non-json":
|
|
97
|
+
throw new errors.LettaError({
|
|
98
|
+
statusCode: _response.error.statusCode,
|
|
99
|
+
body: _response.error.rawBody,
|
|
100
|
+
});
|
|
101
|
+
case "timeout":
|
|
102
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/jobs/.");
|
|
103
|
+
case "unknown":
|
|
104
|
+
throw new errors.LettaError({
|
|
105
|
+
message: _response.error.errorMessage,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* List all active jobs.
|
|
112
|
+
*
|
|
113
|
+
* @param {Jobs.RequestOptions} requestOptions - Request-specific configuration.
|
|
114
|
+
*
|
|
115
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* await client.jobs.listActive()
|
|
119
|
+
*/
|
|
120
|
+
listActive(requestOptions) {
|
|
121
|
+
var _a, _b;
|
|
122
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
124
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/jobs/active"),
|
|
125
|
+
method: "GET",
|
|
126
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0-alpha2", "User-Agent": "@letta-ai/letta-client/0.1.0-alpha2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
127
|
+
contentType: "application/json",
|
|
128
|
+
requestType: "json",
|
|
129
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
130
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
131
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
132
|
+
});
|
|
133
|
+
if (_response.ok) {
|
|
134
|
+
return _response.body;
|
|
135
|
+
}
|
|
136
|
+
if (_response.error.reason === "status-code") {
|
|
137
|
+
switch (_response.error.statusCode) {
|
|
138
|
+
case 422:
|
|
139
|
+
throw new Letta.UnprocessableEntityError(_response.error.body);
|
|
140
|
+
default:
|
|
141
|
+
throw new errors.LettaError({
|
|
142
|
+
statusCode: _response.error.statusCode,
|
|
143
|
+
body: _response.error.body,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
switch (_response.error.reason) {
|
|
148
|
+
case "non-json":
|
|
149
|
+
throw new errors.LettaError({
|
|
150
|
+
statusCode: _response.error.statusCode,
|
|
151
|
+
body: _response.error.rawBody,
|
|
152
|
+
});
|
|
153
|
+
case "timeout":
|
|
154
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/jobs/active.");
|
|
155
|
+
case "unknown":
|
|
156
|
+
throw new errors.LettaError({
|
|
157
|
+
message: _response.error.errorMessage,
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Get the status of a job.
|
|
164
|
+
*
|
|
165
|
+
* @param {string} jobId
|
|
166
|
+
* @param {Jobs.RequestOptions} requestOptions - Request-specific configuration.
|
|
167
|
+
*
|
|
168
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* await client.jobs.get("job_id")
|
|
172
|
+
*/
|
|
173
|
+
get(jobId, requestOptions) {
|
|
174
|
+
var _a, _b;
|
|
175
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
176
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
177
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/jobs/${encodeURIComponent(jobId)}`),
|
|
178
|
+
method: "GET",
|
|
179
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0-alpha2", "User-Agent": "@letta-ai/letta-client/0.1.0-alpha2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
180
|
+
contentType: "application/json",
|
|
181
|
+
requestType: "json",
|
|
182
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
183
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
184
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
185
|
+
});
|
|
186
|
+
if (_response.ok) {
|
|
187
|
+
return _response.body;
|
|
188
|
+
}
|
|
189
|
+
if (_response.error.reason === "status-code") {
|
|
190
|
+
switch (_response.error.statusCode) {
|
|
191
|
+
case 422:
|
|
192
|
+
throw new Letta.UnprocessableEntityError(_response.error.body);
|
|
193
|
+
default:
|
|
194
|
+
throw new errors.LettaError({
|
|
195
|
+
statusCode: _response.error.statusCode,
|
|
196
|
+
body: _response.error.body,
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
switch (_response.error.reason) {
|
|
201
|
+
case "non-json":
|
|
202
|
+
throw new errors.LettaError({
|
|
203
|
+
statusCode: _response.error.statusCode,
|
|
204
|
+
body: _response.error.rawBody,
|
|
205
|
+
});
|
|
206
|
+
case "timeout":
|
|
207
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/jobs/{job_id}.");
|
|
208
|
+
case "unknown":
|
|
209
|
+
throw new errors.LettaError({
|
|
210
|
+
message: _response.error.errorMessage,
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Delete a job by its job_id.
|
|
217
|
+
*
|
|
218
|
+
* @param {string} jobId
|
|
219
|
+
* @param {Jobs.RequestOptions} requestOptions - Request-specific configuration.
|
|
220
|
+
*
|
|
221
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
222
|
+
*
|
|
223
|
+
* @example
|
|
224
|
+
* await client.jobs.delete("job_id")
|
|
225
|
+
*/
|
|
226
|
+
delete(jobId, requestOptions) {
|
|
227
|
+
var _a, _b;
|
|
228
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
229
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
230
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/jobs/${encodeURIComponent(jobId)}`),
|
|
231
|
+
method: "DELETE",
|
|
232
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.0-alpha2", "User-Agent": "@letta-ai/letta-client/0.1.0-alpha2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
233
|
+
contentType: "application/json",
|
|
234
|
+
requestType: "json",
|
|
235
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
236
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
237
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
238
|
+
});
|
|
239
|
+
if (_response.ok) {
|
|
240
|
+
return _response.body;
|
|
241
|
+
}
|
|
242
|
+
if (_response.error.reason === "status-code") {
|
|
243
|
+
switch (_response.error.statusCode) {
|
|
244
|
+
case 422:
|
|
245
|
+
throw new Letta.UnprocessableEntityError(_response.error.body);
|
|
246
|
+
default:
|
|
247
|
+
throw new errors.LettaError({
|
|
248
|
+
statusCode: _response.error.statusCode,
|
|
249
|
+
body: _response.error.body,
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
switch (_response.error.reason) {
|
|
254
|
+
case "non-json":
|
|
255
|
+
throw new errors.LettaError({
|
|
256
|
+
statusCode: _response.error.statusCode,
|
|
257
|
+
body: _response.error.rawBody,
|
|
258
|
+
});
|
|
259
|
+
case "timeout":
|
|
260
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling DELETE /v1/jobs/{job_id}.");
|
|
261
|
+
case "unknown":
|
|
262
|
+
throw new errors.LettaError({
|
|
263
|
+
message: _response.error.errorMessage,
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
_getAuthorizationHeader() {
|
|
269
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
270
|
+
return `Bearer ${yield core.Supplier.get(this._options.token)}`;
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
exports.Jobs = Jobs;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests";
|