@letta-ai/letta-client 0.1.7 → 0.1.9
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 +8 -0
- package/Client.js +10 -0
- package/README.md +9 -9
- package/api/errors/ConflictError.js +17 -7
- package/api/errors/InternalServerError.js +17 -7
- package/api/errors/NotFoundError.js +17 -7
- package/api/errors/UnprocessableEntityError.js +17 -7
- package/api/resources/agents/client/Client.d.ts +17 -7
- package/api/resources/agents/client/Client.js +116 -39
- package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +6 -9
- package/api/resources/agents/client/requests/ResetMessagesRequest.d.ts +13 -0
- package/api/resources/agents/client/requests/ResetMessagesRequest.js +5 -0
- package/api/resources/agents/client/requests/index.d.ts +1 -0
- package/api/resources/agents/resources/archivalMemory/client/Client.d.ts +2 -0
- package/api/resources/agents/resources/archivalMemory/client/Client.js +31 -21
- package/api/resources/agents/resources/context/client/Client.d.ts +2 -0
- package/api/resources/agents/resources/context/client/Client.js +20 -10
- package/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -0
- package/api/resources/agents/resources/coreMemory/client/Client.js +38 -28
- package/api/resources/agents/resources/index.js +17 -7
- package/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -0
- package/api/resources/agents/resources/memoryVariables/client/Client.js +20 -10
- package/api/resources/agents/resources/messages/client/Client.d.ts +3 -1
- package/api/resources/agents/resources/messages/client/Client.js +37 -27
- package/api/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +1 -1
- package/api/resources/agents/resources/messages/types/MessagesListResponse.d.ts +1 -1
- package/api/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +1 -1
- package/api/resources/agents/resources/recallMemory/client/Client.d.ts +2 -0
- package/api/resources/agents/resources/recallMemory/client/Client.js +20 -10
- package/api/resources/agents/resources/sources/client/Client.d.ts +2 -0
- package/api/resources/agents/resources/sources/client/Client.js +20 -10
- package/api/resources/agents/resources/templates/client/Client.d.ts +2 -0
- package/api/resources/agents/resources/templates/client/Client.js +30 -20
- package/api/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +1 -1
- package/api/resources/agents/resources/tools/client/Client.d.ts +2 -0
- package/api/resources/agents/resources/tools/client/Client.js +26 -16
- package/api/resources/agents/types/AgentsSearchRequestCombinator.d.ts +1 -1
- package/api/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +1 -1
- package/api/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +1 -1
- package/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +1 -1
- package/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +1 -1
- package/api/resources/agents/types/CreateAgentRequestToolRulesItem.d.ts +1 -1
- package/api/resources/agents/types/UpdateAgentToolRulesItem.d.ts +1 -1
- package/api/resources/blocks/client/Client.d.ts +2 -0
- package/api/resources/blocks/client/Client.js +40 -30
- package/api/resources/health/client/Client.d.ts +2 -0
- package/api/resources/health/client/Client.js +20 -10
- package/api/resources/index.d.ts +4 -0
- package/api/resources/index.js +22 -8
- package/api/resources/jobs/client/Client.d.ts +2 -0
- package/api/resources/jobs/client/Client.js +31 -21
- package/api/resources/models/client/Client.d.ts +2 -0
- package/api/resources/models/client/Client.js +23 -13
- package/api/resources/providers/client/Client.d.ts +2 -0
- package/api/resources/providers/client/Client.js +31 -21
- package/api/resources/runs/client/Client.d.ts +117 -0
- package/api/resources/runs/client/Client.js +510 -0
- package/api/resources/runs/client/index.d.ts +1 -0
- package/api/resources/runs/client/index.js +17 -0
- package/api/resources/runs/client/requests/GetRunMessagesRequest.d.ts +50 -0
- package/api/resources/runs/client/requests/GetRunMessagesRequest.js +5 -0
- package/api/resources/runs/client/requests/index.d.ts +1 -0
- package/api/resources/runs/client/requests/index.js +2 -0
- package/api/resources/runs/index.d.ts +1 -0
- package/api/resources/runs/index.js +17 -0
- package/api/resources/sources/client/Client.d.ts +2 -0
- package/api/resources/sources/client/Client.js +43 -33
- package/api/resources/sources/resources/files/client/Client.d.ts +2 -1
- package/api/resources/sources/resources/files/client/Client.js +28 -18
- package/api/resources/sources/resources/index.js +17 -7
- package/api/resources/sources/resources/passages/client/Client.d.ts +2 -0
- package/api/resources/sources/resources/passages/client/Client.js +20 -10
- package/api/resources/tag/client/Client.d.ts +44 -0
- package/api/resources/tag/client/Client.js +146 -0
- package/api/resources/tag/client/index.d.ts +1 -0
- package/api/resources/tag/client/index.js +17 -0
- package/api/resources/tag/client/requests/ListTagsRequest.d.ts +12 -0
- package/api/resources/tag/client/requests/ListTagsRequest.js +5 -0
- package/api/resources/tag/client/requests/index.d.ts +1 -0
- package/api/resources/tag/client/requests/index.js +2 -0
- package/api/resources/tag/index.d.ts +1 -0
- package/api/resources/tag/index.js +17 -0
- package/api/resources/tools/client/Client.d.ts +2 -0
- package/api/resources/tools/client/Client.js +57 -47
- package/api/resources/tools/client/requests/ToolRunFromSource.d.ts +1 -1
- package/api/resources/tools/client/requests/ToolUpdate.d.ts +0 -2
- package/api/types/AgentStateToolRulesItem.d.ts +1 -1
- package/api/types/AgentType.d.ts +1 -1
- package/api/types/AppAuthSchemeAuthMode.d.ts +1 -1
- package/api/types/ChatCompletionRequestFunctionCall.d.ts +1 -1
- package/api/types/ChatCompletionRequestMessagesItem.d.ts +1 -1
- package/api/types/ChatCompletionRequestStop.d.ts +1 -1
- package/api/types/ChatCompletionRequestToolChoice.d.ts +1 -1
- package/api/types/EmbeddingConfigEmbeddingEndpointType.d.ts +1 -1
- package/api/types/Job.d.ts +2 -0
- package/api/types/JobStatus.d.ts +1 -1
- package/api/types/JobType.d.ts +8 -0
- package/api/types/JobType.js +10 -0
- package/api/types/LettaResponseMessagesItem.d.ts +1 -1
- package/api/types/LettaSchemasToolTool.d.ts +0 -2
- package/api/types/LlmConfigModelEndpointType.d.ts +1 -1
- package/api/types/MessageCreateRole.d.ts +1 -1
- package/api/types/MessageRole.d.ts +1 -1
- package/api/types/NotFoundErrorBodyMessage.d.ts +1 -1
- package/api/types/Run.d.ts +34 -0
- package/api/types/Run.js +5 -0
- package/api/types/SandboxConfigCreateConfig.d.ts +1 -1
- package/api/types/SandboxConfigUpdateConfig.d.ts +1 -1
- package/api/types/SandboxType.d.ts +1 -1
- package/api/types/ToolCallMessageToolCall.d.ts +1 -1
- package/api/types/ToolCreate.d.ts +0 -2
- package/api/types/ToolReturnMessageStatus.d.ts +1 -1
- package/api/types/ToolRuleType.d.ts +1 -1
- package/api/types/ToolType.d.ts +1 -1
- package/api/types/UserMessageInputContent.d.ts +1 -1
- package/api/types/ValidationErrorLocItem.d.ts +1 -1
- package/api/types/index.d.ts +2 -0
- package/api/types/index.js +2 -0
- package/core/fetcher/APIResponse.d.ts +1 -1
- package/core/fetcher/Fetcher.d.ts +1 -1
- package/core/fetcher/Fetcher.js +2 -2
- package/core/fetcher/Supplier.d.ts +1 -1
- package/core/fetcher/createRequestUrl.js +1 -2
- package/core/fetcher/getFetchFn.js +18 -9
- package/core/fetcher/getHeader.js +1 -2
- package/core/fetcher/getRequestBody.js +3 -4
- package/core/fetcher/getResponseBody.js +1 -2
- package/core/fetcher/makeRequest.d.ts +1 -1
- package/core/fetcher/requestWithRetries.js +3 -4
- package/core/fetcher/signals.d.ts +0 -1
- package/core/fetcher/signals.js +2 -3
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
- package/core/form-data-utils/FormDataWrapper.d.ts +4 -4
- package/core/form-data-utils/FormDataWrapper.js +22 -12
- package/core/index.js +17 -7
- package/core/runtime/runtime.d.ts +1 -1
- package/core/runtime/runtime.js +51 -41
- package/core/schemas/Schema.d.ts +5 -5
- package/core/schemas/builders/bigint/bigint.js +1 -2
- package/core/schemas/builders/date/date.js +1 -2
- package/core/schemas/builders/enum/enum.js +1 -2
- package/core/schemas/builders/lazy/lazy.d.ts +1 -1
- package/core/schemas/builders/lazy/lazy.js +3 -4
- package/core/schemas/builders/lazy/lazyObject.js +1 -2
- package/core/schemas/builders/list/list.js +1 -2
- package/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/core/schemas/builders/object/object.d.ts +1 -1
- package/core/schemas/builders/object/object.js +2 -3
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/core/schemas/builders/object/property.js +2 -3
- package/core/schemas/builders/object/types.d.ts +11 -11
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
- package/core/schemas/builders/object-like/types.d.ts +1 -1
- package/core/schemas/builders/record/record.js +1 -2
- package/core/schemas/builders/record/types.d.ts +2 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +3 -4
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/core/schemas/builders/set/set.js +1 -2
- package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
- package/core/schemas/builders/union/discriminant.js +1 -2
- package/core/schemas/builders/union/types.d.ts +6 -6
- package/core/schemas/builders/union/union.d.ts +1 -1
- package/core/schemas/builders/union/union.js +1 -2
- package/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +3 -3
- package/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/core/schemas/utils/entries.d.ts +1 -1
- package/core/schemas/utils/entries.js +1 -2
- package/core/schemas/utils/filterObject.d.ts +1 -1
- package/core/schemas/utils/filterObject.js +1 -2
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
- package/core/schemas/utils/isPlainObject.js +1 -2
- package/core/schemas/utils/keys.d.ts +1 -1
- package/core/schemas/utils/keys.js +1 -2
- package/core/schemas/utils/maybeSkipValidation.js +1 -2
- package/core/schemas/utils/partition.js +1 -2
- package/core/streaming-fetcher/Stream.d.ts +0 -1
- package/core/streaming-fetcher/Stream.js +20 -21
- package/dist/Client.d.ts +8 -0
- package/dist/Client.js +10 -0
- package/dist/api/errors/ConflictError.js +17 -7
- package/dist/api/errors/InternalServerError.js +17 -7
- package/dist/api/errors/NotFoundError.js +17 -7
- package/dist/api/errors/UnprocessableEntityError.js +17 -7
- package/dist/api/resources/agents/client/Client.d.ts +17 -7
- package/dist/api/resources/agents/client/Client.js +116 -39
- package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +6 -9
- package/dist/api/resources/agents/client/requests/ResetMessagesRequest.d.ts +13 -0
- package/dist/api/resources/agents/client/requests/ResetMessagesRequest.js +5 -0
- package/dist/api/resources/agents/client/requests/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/archivalMemory/client/Client.d.ts +2 -0
- package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +31 -21
- package/dist/api/resources/agents/resources/context/client/Client.d.ts +2 -0
- package/dist/api/resources/agents/resources/context/client/Client.js +20 -10
- package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -0
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +38 -28
- package/dist/api/resources/agents/resources/index.js +17 -7
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -0
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +20 -10
- package/dist/api/resources/agents/resources/messages/client/Client.d.ts +3 -1
- package/dist/api/resources/agents/resources/messages/client/Client.js +37 -27
- package/dist/api/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +1 -1
- package/dist/api/resources/agents/resources/messages/types/MessagesListResponse.d.ts +1 -1
- package/dist/api/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +1 -1
- package/dist/api/resources/agents/resources/recallMemory/client/Client.d.ts +2 -0
- package/dist/api/resources/agents/resources/recallMemory/client/Client.js +20 -10
- package/dist/api/resources/agents/resources/sources/client/Client.d.ts +2 -0
- package/dist/api/resources/agents/resources/sources/client/Client.js +20 -10
- package/dist/api/resources/agents/resources/templates/client/Client.d.ts +2 -0
- package/dist/api/resources/agents/resources/templates/client/Client.js +30 -20
- package/dist/api/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +1 -1
- package/dist/api/resources/agents/resources/tools/client/Client.d.ts +2 -0
- package/dist/api/resources/agents/resources/tools/client/Client.js +26 -16
- package/dist/api/resources/agents/types/AgentsSearchRequestCombinator.d.ts +1 -1
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +1 -1
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +1 -1
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +1 -1
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +1 -1
- package/dist/api/resources/agents/types/CreateAgentRequestToolRulesItem.d.ts +1 -1
- package/dist/api/resources/agents/types/UpdateAgentToolRulesItem.d.ts +1 -1
- package/dist/api/resources/blocks/client/Client.d.ts +2 -0
- package/dist/api/resources/blocks/client/Client.js +40 -30
- package/dist/api/resources/health/client/Client.d.ts +2 -0
- package/dist/api/resources/health/client/Client.js +20 -10
- package/dist/api/resources/index.d.ts +4 -0
- package/dist/api/resources/index.js +22 -8
- package/dist/api/resources/jobs/client/Client.d.ts +2 -0
- package/dist/api/resources/jobs/client/Client.js +31 -21
- package/dist/api/resources/models/client/Client.d.ts +2 -0
- package/dist/api/resources/models/client/Client.js +23 -13
- package/dist/api/resources/providers/client/Client.d.ts +2 -0
- package/dist/api/resources/providers/client/Client.js +31 -21
- package/dist/api/resources/runs/client/Client.d.ts +117 -0
- package/dist/api/resources/runs/client/Client.js +510 -0
- package/dist/api/resources/runs/client/index.d.ts +1 -0
- package/dist/api/resources/runs/client/index.js +17 -0
- package/dist/api/resources/runs/client/requests/GetRunMessagesRequest.d.ts +50 -0
- package/dist/api/resources/runs/client/requests/GetRunMessagesRequest.js +5 -0
- package/dist/api/resources/runs/client/requests/index.d.ts +1 -0
- package/dist/api/resources/runs/client/requests/index.js +2 -0
- package/dist/api/resources/runs/index.d.ts +1 -0
- package/dist/api/resources/runs/index.js +17 -0
- package/dist/api/resources/sources/client/Client.d.ts +2 -0
- package/dist/api/resources/sources/client/Client.js +43 -33
- package/dist/api/resources/sources/resources/files/client/Client.d.ts +2 -1
- package/dist/api/resources/sources/resources/files/client/Client.js +28 -18
- package/dist/api/resources/sources/resources/index.js +17 -7
- package/dist/api/resources/sources/resources/passages/client/Client.d.ts +2 -0
- package/dist/api/resources/sources/resources/passages/client/Client.js +20 -10
- package/dist/api/resources/tag/client/Client.d.ts +44 -0
- package/dist/api/resources/tag/client/Client.js +146 -0
- package/dist/api/resources/tag/client/index.d.ts +1 -0
- package/dist/api/resources/tag/client/index.js +17 -0
- package/dist/api/resources/tag/client/requests/ListTagsRequest.d.ts +12 -0
- package/dist/api/resources/tag/client/requests/ListTagsRequest.js +5 -0
- package/dist/api/resources/tag/client/requests/index.d.ts +1 -0
- package/dist/api/resources/tag/client/requests/index.js +2 -0
- package/dist/api/resources/tag/index.d.ts +1 -0
- package/dist/api/resources/tag/index.js +17 -0
- package/dist/api/resources/tools/client/Client.d.ts +2 -0
- package/dist/api/resources/tools/client/Client.js +57 -47
- package/dist/api/resources/tools/client/requests/ToolRunFromSource.d.ts +1 -1
- package/dist/api/resources/tools/client/requests/ToolUpdate.d.ts +0 -2
- package/dist/api/types/AgentStateToolRulesItem.d.ts +1 -1
- package/dist/api/types/AgentType.d.ts +1 -1
- package/dist/api/types/AppAuthSchemeAuthMode.d.ts +1 -1
- package/dist/api/types/ChatCompletionRequestFunctionCall.d.ts +1 -1
- package/dist/api/types/ChatCompletionRequestMessagesItem.d.ts +1 -1
- package/dist/api/types/ChatCompletionRequestStop.d.ts +1 -1
- package/dist/api/types/ChatCompletionRequestToolChoice.d.ts +1 -1
- package/dist/api/types/EmbeddingConfigEmbeddingEndpointType.d.ts +1 -1
- package/dist/api/types/Job.d.ts +2 -0
- package/dist/api/types/JobStatus.d.ts +1 -1
- package/dist/api/types/JobType.d.ts +8 -0
- package/dist/api/types/JobType.js +10 -0
- package/dist/api/types/LettaResponseMessagesItem.d.ts +1 -1
- package/dist/api/types/LettaSchemasToolTool.d.ts +0 -2
- package/dist/api/types/LlmConfigModelEndpointType.d.ts +1 -1
- package/dist/api/types/MessageCreateRole.d.ts +1 -1
- package/dist/api/types/MessageRole.d.ts +1 -1
- package/dist/api/types/NotFoundErrorBodyMessage.d.ts +1 -1
- package/dist/api/types/Run.d.ts +34 -0
- package/dist/api/types/Run.js +5 -0
- package/dist/api/types/SandboxConfigCreateConfig.d.ts +1 -1
- package/dist/api/types/SandboxConfigUpdateConfig.d.ts +1 -1
- package/dist/api/types/SandboxType.d.ts +1 -1
- package/dist/api/types/ToolCallMessageToolCall.d.ts +1 -1
- package/dist/api/types/ToolCreate.d.ts +0 -2
- package/dist/api/types/ToolReturnMessageStatus.d.ts +1 -1
- package/dist/api/types/ToolRuleType.d.ts +1 -1
- package/dist/api/types/ToolType.d.ts +1 -1
- package/dist/api/types/UserMessageInputContent.d.ts +1 -1
- package/dist/api/types/ValidationErrorLocItem.d.ts +1 -1
- package/dist/api/types/index.d.ts +2 -0
- package/dist/api/types/index.js +2 -0
- package/dist/core/fetcher/APIResponse.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.js +2 -2
- package/dist/core/fetcher/Supplier.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.js +1 -2
- package/dist/core/fetcher/getFetchFn.js +18 -9
- package/dist/core/fetcher/getHeader.js +1 -2
- package/dist/core/fetcher/getRequestBody.js +3 -4
- package/dist/core/fetcher/getResponseBody.js +1 -2
- package/dist/core/fetcher/makeRequest.d.ts +1 -1
- package/dist/core/fetcher/requestWithRetries.js +3 -4
- package/dist/core/fetcher/signals.d.ts +0 -1
- package/dist/core/fetcher/signals.js +2 -3
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
- package/dist/core/form-data-utils/FormDataWrapper.d.ts +4 -4
- package/dist/core/form-data-utils/FormDataWrapper.js +22 -12
- package/dist/core/index.js +17 -7
- package/dist/core/runtime/runtime.d.ts +1 -1
- package/dist/core/runtime/runtime.js +51 -41
- package/dist/core/schemas/Schema.d.ts +5 -5
- package/dist/core/schemas/builders/bigint/bigint.js +1 -2
- package/dist/core/schemas/builders/date/date.js +1 -2
- package/dist/core/schemas/builders/enum/enum.js +1 -2
- package/dist/core/schemas/builders/lazy/lazy.d.ts +1 -1
- package/dist/core/schemas/builders/lazy/lazy.js +3 -4
- package/dist/core/schemas/builders/lazy/lazyObject.js +1 -2
- package/dist/core/schemas/builders/list/list.js +1 -2
- package/dist/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/dist/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/dist/core/schemas/builders/object/object.d.ts +1 -1
- package/dist/core/schemas/builders/object/object.js +2 -3
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/dist/core/schemas/builders/object/property.js +2 -3
- package/dist/core/schemas/builders/object/types.d.ts +11 -11
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
- package/dist/core/schemas/builders/object-like/types.d.ts +1 -1
- package/dist/core/schemas/builders/record/record.js +1 -2
- package/dist/core/schemas/builders/record/types.d.ts +2 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +3 -4
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/dist/core/schemas/builders/set/set.js +1 -2
- package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
- package/dist/core/schemas/builders/union/discriminant.js +1 -2
- package/dist/core/schemas/builders/union/types.d.ts +6 -6
- package/dist/core/schemas/builders/union/union.d.ts +1 -1
- package/dist/core/schemas/builders/union/union.js +1 -2
- package/dist/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +3 -3
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/dist/core/schemas/utils/entries.d.ts +1 -1
- package/dist/core/schemas/utils/entries.js +1 -2
- package/dist/core/schemas/utils/filterObject.d.ts +1 -1
- package/dist/core/schemas/utils/filterObject.js +1 -2
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
- package/dist/core/schemas/utils/isPlainObject.js +1 -2
- package/dist/core/schemas/utils/keys.d.ts +1 -1
- package/dist/core/schemas/utils/keys.js +1 -2
- package/dist/core/schemas/utils/maybeSkipValidation.js +1 -2
- package/dist/core/schemas/utils/partition.js +1 -2
- package/dist/core/streaming-fetcher/Stream.d.ts +0 -1
- package/dist/core/streaming-fetcher/Stream.js +20 -21
- package/dist/environments.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +19 -8
- package/dist/serialization/resources/agents/client/index.js +17 -7
- package/dist/serialization/resources/agents/client/list.js +17 -7
- package/dist/serialization/resources/agents/client/requests/AgentsSearchRequest.js +17 -7
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +3 -2
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +20 -9
- package/dist/serialization/resources/agents/client/requests/UpdateAgent.js +17 -7
- package/dist/serialization/resources/agents/resources/archivalMemory/client/create.js +17 -7
- package/dist/serialization/resources/agents/resources/archivalMemory/client/index.js +17 -7
- package/dist/serialization/resources/agents/resources/archivalMemory/client/list.js +17 -7
- package/dist/serialization/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.js +17 -7
- package/dist/serialization/resources/agents/resources/coreMemory/client/getBlocks.js +17 -7
- package/dist/serialization/resources/agents/resources/coreMemory/client/index.js +17 -7
- package/dist/serialization/resources/agents/resources/coreMemory/client/listInContext.js +17 -7
- package/dist/serialization/resources/agents/resources/index.js +17 -7
- package/dist/serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.js +17 -7
- package/dist/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.js +17 -7
- package/dist/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.js +17 -7
- package/dist/serialization/resources/agents/resources/messages/types/LettaStreamingResponse.js +17 -7
- package/dist/serialization/resources/agents/resources/messages/types/MessagesListResponse.js +17 -7
- package/dist/serialization/resources/agents/resources/messages/types/MessagesListResponseItem.js +17 -7
- package/dist/serialization/resources/agents/resources/sources/client/get.js +17 -7
- package/dist/serialization/resources/agents/resources/sources/client/index.js +17 -7
- package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +1 -1
- package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.js +18 -8
- package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateVersionRequest.js +17 -7
- package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.js +17 -7
- package/dist/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.js +17 -7
- package/dist/serialization/resources/agents/resources/tools/client/index.js +17 -7
- package/dist/serialization/resources/agents/resources/tools/client/list.js +17 -7
- package/dist/serialization/resources/agents/types/AgentsSearchRequestCombinator.js +17 -7
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +17 -7
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.js +17 -7
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.js +17 -7
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.js +17 -7
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.js +17 -7
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js +17 -7
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemVersion.js +17 -7
- package/dist/serialization/resources/agents/types/CreateAgentRequestToolRulesItem.js +17 -7
- package/dist/serialization/resources/agents/types/UpdateAgentToolRulesItem.js +17 -7
- package/dist/serialization/resources/blocks/client/index.js +17 -7
- package/dist/serialization/resources/blocks/client/list.js +17 -7
- package/dist/serialization/resources/index.d.ts +2 -0
- package/dist/serialization/resources/index.js +20 -8
- package/dist/serialization/resources/jobs/client/index.js +17 -7
- package/dist/serialization/resources/jobs/client/list.js +17 -7
- package/dist/serialization/resources/jobs/client/listActive.js +17 -7
- package/dist/serialization/resources/models/client/index.js +17 -7
- package/dist/serialization/resources/models/client/listEmbeddingModels.js +17 -7
- package/dist/serialization/resources/models/client/listLlms.js +17 -7
- package/dist/serialization/resources/providers/client/index.js +17 -7
- package/dist/serialization/resources/providers/client/listProviders.js +17 -7
- package/dist/serialization/resources/providers/client/requests/ProviderCreate.js +17 -7
- package/dist/serialization/resources/providers/client/requests/ProviderUpdate.js +17 -7
- package/dist/serialization/resources/runs/client/getRunMessages.d.ts +11 -0
- package/dist/serialization/resources/runs/client/getRunMessages.js +42 -0
- package/dist/serialization/resources/runs/client/index.d.ts +3 -0
- package/dist/serialization/resources/runs/client/index.js +39 -0
- package/dist/serialization/resources/runs/client/listActiveRuns.d.ts +11 -0
- package/dist/serialization/resources/runs/client/listActiveRuns.js +42 -0
- package/dist/serialization/resources/runs/client/listRuns.d.ts +11 -0
- package/dist/serialization/resources/runs/client/listRuns.js +42 -0
- package/dist/serialization/resources/runs/index.d.ts +1 -0
- package/dist/serialization/resources/runs/index.js +17 -0
- package/dist/serialization/resources/sources/client/getByName.js +17 -7
- package/dist/serialization/resources/sources/client/index.js +17 -7
- package/dist/serialization/resources/sources/client/list.js +17 -7
- package/dist/serialization/resources/sources/client/requests/SourceCreate.js +17 -7
- package/dist/serialization/resources/sources/client/requests/SourceUpdate.js +17 -7
- package/dist/serialization/resources/sources/resources/files/client/index.js +17 -7
- package/dist/serialization/resources/sources/resources/files/client/list.js +17 -7
- package/dist/serialization/resources/sources/resources/index.js +17 -7
- package/dist/serialization/resources/sources/resources/passages/client/index.js +17 -7
- package/dist/serialization/resources/sources/resources/passages/client/list.js +17 -7
- package/dist/serialization/resources/tag/client/index.d.ts +1 -0
- package/dist/serialization/resources/tag/client/index.js +37 -0
- package/dist/serialization/resources/tag/client/listTags.d.ts +9 -0
- package/dist/serialization/resources/tag/client/listTags.js +41 -0
- package/dist/serialization/resources/tag/index.d.ts +1 -0
- package/dist/serialization/resources/tag/index.js +17 -0
- package/dist/serialization/resources/tools/client/addBaseTool.js +17 -7
- package/dist/serialization/resources/tools/client/getByName.js +17 -7
- package/dist/serialization/resources/tools/client/index.js +17 -7
- package/dist/serialization/resources/tools/client/list.js +17 -7
- package/dist/serialization/resources/tools/client/listComposioActionsByApp.js +17 -7
- package/dist/serialization/resources/tools/client/listComposioApps.js +17 -7
- package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +1 -1
- package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.js +18 -8
- package/dist/serialization/resources/tools/client/requests/ToolUpdate.d.ts +0 -1
- package/dist/serialization/resources/tools/client/requests/ToolUpdate.js +17 -8
- package/dist/serialization/types/ActionModel.js +17 -7
- package/dist/serialization/types/ActionParametersModel.js +17 -7
- package/dist/serialization/types/ActionResponseModel.js +17 -7
- package/dist/serialization/types/AgentEnvironmentVariable.js +17 -7
- package/dist/serialization/types/AgentState.js +17 -7
- package/dist/serialization/types/AgentStateToolRulesItem.js +17 -7
- package/dist/serialization/types/AgentType.js +17 -7
- package/dist/serialization/types/AppAuthScheme.js +17 -7
- package/dist/serialization/types/AppAuthSchemeAuthMode.js +17 -7
- package/dist/serialization/types/AppModel.js +17 -7
- package/dist/serialization/types/ArchivalMemorySummary.js +17 -7
- package/dist/serialization/types/AssistantFile.js +17 -7
- package/dist/serialization/types/AssistantMessageInput.js +17 -7
- package/dist/serialization/types/AssistantMessageOutput.js +17 -7
- package/dist/serialization/types/AuthRequest.js +17 -7
- package/dist/serialization/types/AuthResponse.js +17 -7
- package/dist/serialization/types/AuthSchemeField.js +17 -7
- package/dist/serialization/types/Block.js +17 -7
- package/dist/serialization/types/BlockUpdate.js +17 -7
- package/dist/serialization/types/ChatCompletionRequest.js +17 -7
- package/dist/serialization/types/ChatCompletionRequestFunctionCall.js +17 -7
- package/dist/serialization/types/ChatCompletionRequestMessagesItem.js +17 -7
- package/dist/serialization/types/ChatCompletionRequestStop.js +17 -7
- package/dist/serialization/types/ChatCompletionRequestToolChoice.js +17 -7
- package/dist/serialization/types/ChatCompletionResponse.js +17 -7
- package/dist/serialization/types/ChildToolRule.js +17 -7
- package/dist/serialization/types/Choice.js +17 -7
- package/dist/serialization/types/ConditionalToolRule.js +17 -7
- package/dist/serialization/types/ConflictErrorBody.js +17 -7
- package/dist/serialization/types/ContextWindowOverview.js +17 -7
- package/dist/serialization/types/CreateAssistantFileRequest.js +17 -7
- package/dist/serialization/types/CreateAssistantRequest.js +17 -7
- package/dist/serialization/types/CreateBlock.js +17 -7
- package/dist/serialization/types/DeleteAssistantFileResponse.js +17 -7
- package/dist/serialization/types/DeleteAssistantResponse.js +17 -7
- package/dist/serialization/types/E2BSandboxConfig.js +17 -7
- package/dist/serialization/types/EmbeddingConfig.js +17 -7
- package/dist/serialization/types/EmbeddingConfigEmbeddingEndpointType.js +17 -7
- package/dist/serialization/types/FileMetadata.js +17 -7
- package/dist/serialization/types/FunctionCallInput.js +17 -7
- package/dist/serialization/types/FunctionCallOutput.js +17 -7
- package/dist/serialization/types/FunctionSchema.js +17 -7
- package/dist/serialization/types/Health.js +17 -7
- package/dist/serialization/types/HttpValidationError.js +17 -7
- package/dist/serialization/types/InitToolRule.js +17 -7
- package/dist/serialization/types/InternalServerErrorBody.js +17 -7
- package/dist/serialization/types/Job.d.ts +2 -0
- package/dist/serialization/types/Job.js +19 -7
- package/dist/serialization/types/JobStatus.js +17 -7
- package/dist/serialization/types/JobType.d.ts +10 -0
- package/dist/serialization/types/JobType.js +44 -0
- package/dist/serialization/types/LettaRequest.js +17 -7
- package/dist/serialization/types/LettaResponse.js +17 -7
- package/dist/serialization/types/LettaResponseMessagesItem.js +17 -7
- package/dist/serialization/types/LettaSchemasLettaMessageToolCall.js +17 -7
- package/dist/serialization/types/LettaSchemasMessageMessage.js +17 -7
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionRequestTool.js +17 -7
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCall.js +17 -7
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.js +17 -7
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionResponseMessage.js +17 -7
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionResponseToolCall.js +17 -7
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.js +17 -7
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallInput.js +17 -7
- package/dist/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.js +17 -7
- package/dist/serialization/types/LettaSchemasToolTool.d.ts +0 -1
- package/dist/serialization/types/LettaSchemasToolTool.js +17 -8
- package/dist/serialization/types/LettaUsageStatistics.js +17 -7
- package/dist/serialization/types/LlmConfig.js +17 -7
- package/dist/serialization/types/LlmConfigModelEndpointType.js +17 -7
- package/dist/serialization/types/LocalSandboxConfig.js +17 -7
- package/dist/serialization/types/LogProbToken.js +17 -7
- package/dist/serialization/types/Memory.js +17 -7
- package/dist/serialization/types/MessageContentLogProb.js +17 -7
- package/dist/serialization/types/MessageCreate.js +17 -7
- package/dist/serialization/types/MessageCreateRole.js +17 -7
- package/dist/serialization/types/MessageRole.js +17 -7
- package/dist/serialization/types/NotFoundErrorBody.js +17 -7
- package/dist/serialization/types/NotFoundErrorBodyMessage.js +17 -7
- package/dist/serialization/types/OpenAiAssistant.js +17 -7
- package/dist/serialization/types/Organization.js +17 -7
- package/dist/serialization/types/OrganizationCreate.js +17 -7
- package/dist/serialization/types/Passage.js +17 -7
- package/dist/serialization/types/Provider.js +17 -7
- package/dist/serialization/types/ReasoningMessage.js +17 -7
- package/dist/serialization/types/RecallMemorySummary.js +17 -7
- package/dist/serialization/types/ResponseFormat.js +17 -7
- package/dist/serialization/types/Run.d.ts +22 -0
- package/dist/serialization/types/Run.js +53 -0
- package/dist/serialization/types/SandboxConfig.js +17 -7
- package/dist/serialization/types/SandboxConfigCreate.js +17 -7
- package/dist/serialization/types/SandboxConfigCreateConfig.js +17 -7
- package/dist/serialization/types/SandboxConfigUpdate.js +17 -7
- package/dist/serialization/types/SandboxConfigUpdateConfig.js +17 -7
- package/dist/serialization/types/SandboxEnvironmentVariable.js +17 -7
- package/dist/serialization/types/SandboxEnvironmentVariableCreate.js +17 -7
- package/dist/serialization/types/SandboxEnvironmentVariableUpdate.js +17 -7
- package/dist/serialization/types/SandboxType.js +17 -7
- package/dist/serialization/types/Source.js +17 -7
- package/dist/serialization/types/SystemMessageInput.js +17 -7
- package/dist/serialization/types/SystemMessageOutput.js +17 -7
- package/dist/serialization/types/TerminalToolRule.js +17 -7
- package/dist/serialization/types/ToolCallDelta.js +17 -7
- package/dist/serialization/types/ToolCallFunctionOutput.js +17 -7
- package/dist/serialization/types/ToolCallMessage.js +17 -7
- package/dist/serialization/types/ToolCallMessageToolCall.js +17 -7
- package/dist/serialization/types/ToolCreate.d.ts +0 -1
- package/dist/serialization/types/ToolCreate.js +17 -8
- package/dist/serialization/types/ToolFunctionChoice.js +17 -7
- package/dist/serialization/types/ToolInput.js +17 -7
- package/dist/serialization/types/ToolMessage.js +17 -7
- package/dist/serialization/types/ToolReturnMessage.js +17 -7
- package/dist/serialization/types/ToolReturnMessageStatus.js +17 -7
- package/dist/serialization/types/ToolRuleType.js +17 -7
- package/dist/serialization/types/ToolType.js +17 -7
- package/dist/serialization/types/UsageStatistics.js +17 -7
- package/dist/serialization/types/User.js +17 -7
- package/dist/serialization/types/UserCreate.js +17 -7
- package/dist/serialization/types/UserMessageInput.js +17 -7
- package/dist/serialization/types/UserMessageInputContent.js +17 -7
- package/dist/serialization/types/UserMessageOutput.js +17 -7
- package/dist/serialization/types/UserUpdate.js +17 -7
- package/dist/serialization/types/ValidationError.js +17 -7
- package/dist/serialization/types/ValidationErrorLocItem.js +17 -7
- package/dist/serialization/types/index.d.ts +2 -0
- package/dist/serialization/types/index.js +2 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/environments.d.ts +1 -1
- package/index.d.ts +1 -0
- package/index.js +19 -8
- package/{jest.config.js → jest.config.mjs} +4 -1
- package/package.json +17 -16
- package/reference.md +524 -9
- package/scripts/rename-to-esm-files.js +115 -0
- package/serialization/resources/agents/client/index.js +17 -7
- package/serialization/resources/agents/client/list.js +17 -7
- package/serialization/resources/agents/client/requests/AgentsSearchRequest.js +17 -7
- package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +3 -2
- package/serialization/resources/agents/client/requests/CreateAgentRequest.js +20 -9
- package/serialization/resources/agents/client/requests/UpdateAgent.js +17 -7
- package/serialization/resources/agents/resources/archivalMemory/client/create.js +17 -7
- package/serialization/resources/agents/resources/archivalMemory/client/index.js +17 -7
- package/serialization/resources/agents/resources/archivalMemory/client/list.js +17 -7
- package/serialization/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.js +17 -7
- package/serialization/resources/agents/resources/coreMemory/client/getBlocks.js +17 -7
- package/serialization/resources/agents/resources/coreMemory/client/index.js +17 -7
- package/serialization/resources/agents/resources/coreMemory/client/listInContext.js +17 -7
- package/serialization/resources/agents/resources/index.js +17 -7
- package/serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.js +17 -7
- package/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.js +17 -7
- package/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.js +17 -7
- package/serialization/resources/agents/resources/messages/types/LettaStreamingResponse.js +17 -7
- package/serialization/resources/agents/resources/messages/types/MessagesListResponse.js +17 -7
- package/serialization/resources/agents/resources/messages/types/MessagesListResponseItem.js +17 -7
- package/serialization/resources/agents/resources/sources/client/get.js +17 -7
- package/serialization/resources/agents/resources/sources/client/index.js +17 -7
- package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +1 -1
- package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.js +18 -8
- package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateVersionRequest.js +17 -7
- package/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.js +17 -7
- package/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.js +17 -7
- package/serialization/resources/agents/resources/tools/client/index.js +17 -7
- package/serialization/resources/agents/resources/tools/client/list.js +17 -7
- package/serialization/resources/agents/types/AgentsSearchRequestCombinator.js +17 -7
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +17 -7
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.js +17 -7
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.js +17 -7
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.js +17 -7
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.js +17 -7
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js +17 -7
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemVersion.js +17 -7
- package/serialization/resources/agents/types/CreateAgentRequestToolRulesItem.js +17 -7
- package/serialization/resources/agents/types/UpdateAgentToolRulesItem.js +17 -7
- package/serialization/resources/blocks/client/index.js +17 -7
- package/serialization/resources/blocks/client/list.js +17 -7
- package/serialization/resources/index.d.ts +2 -0
- package/serialization/resources/index.js +20 -8
- package/serialization/resources/jobs/client/index.js +17 -7
- package/serialization/resources/jobs/client/list.js +17 -7
- package/serialization/resources/jobs/client/listActive.js +17 -7
- package/serialization/resources/models/client/index.js +17 -7
- package/serialization/resources/models/client/listEmbeddingModels.js +17 -7
- package/serialization/resources/models/client/listLlms.js +17 -7
- package/serialization/resources/providers/client/index.js +17 -7
- package/serialization/resources/providers/client/listProviders.js +17 -7
- package/serialization/resources/providers/client/requests/ProviderCreate.js +17 -7
- package/serialization/resources/providers/client/requests/ProviderUpdate.js +17 -7
- package/serialization/resources/runs/client/getRunMessages.d.ts +11 -0
- package/serialization/resources/runs/client/getRunMessages.js +42 -0
- package/serialization/resources/runs/client/index.d.ts +3 -0
- package/serialization/resources/runs/client/index.js +39 -0
- package/serialization/resources/runs/client/listActiveRuns.d.ts +11 -0
- package/serialization/resources/runs/client/listActiveRuns.js +42 -0
- package/serialization/resources/runs/client/listRuns.d.ts +11 -0
- package/serialization/resources/runs/client/listRuns.js +42 -0
- package/serialization/resources/runs/index.d.ts +1 -0
- package/serialization/resources/runs/index.js +17 -0
- package/serialization/resources/sources/client/getByName.js +17 -7
- package/serialization/resources/sources/client/index.js +17 -7
- package/serialization/resources/sources/client/list.js +17 -7
- package/serialization/resources/sources/client/requests/SourceCreate.js +17 -7
- package/serialization/resources/sources/client/requests/SourceUpdate.js +17 -7
- package/serialization/resources/sources/resources/files/client/index.js +17 -7
- package/serialization/resources/sources/resources/files/client/list.js +17 -7
- package/serialization/resources/sources/resources/index.js +17 -7
- package/serialization/resources/sources/resources/passages/client/index.js +17 -7
- package/serialization/resources/sources/resources/passages/client/list.js +17 -7
- package/serialization/resources/tag/client/index.d.ts +1 -0
- package/serialization/resources/tag/client/index.js +37 -0
- package/serialization/resources/tag/client/listTags.d.ts +9 -0
- package/serialization/resources/tag/client/listTags.js +41 -0
- package/serialization/resources/tag/index.d.ts +1 -0
- package/serialization/resources/tag/index.js +17 -0
- package/serialization/resources/tools/client/addBaseTool.js +17 -7
- package/serialization/resources/tools/client/getByName.js +17 -7
- package/serialization/resources/tools/client/index.js +17 -7
- package/serialization/resources/tools/client/list.js +17 -7
- package/serialization/resources/tools/client/listComposioActionsByApp.js +17 -7
- package/serialization/resources/tools/client/listComposioApps.js +17 -7
- package/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +1 -1
- package/serialization/resources/tools/client/requests/ToolRunFromSource.js +18 -8
- package/serialization/resources/tools/client/requests/ToolUpdate.d.ts +0 -1
- package/serialization/resources/tools/client/requests/ToolUpdate.js +17 -8
- package/serialization/types/ActionModel.js +17 -7
- package/serialization/types/ActionParametersModel.js +17 -7
- package/serialization/types/ActionResponseModel.js +17 -7
- package/serialization/types/AgentEnvironmentVariable.js +17 -7
- package/serialization/types/AgentState.js +17 -7
- package/serialization/types/AgentStateToolRulesItem.js +17 -7
- package/serialization/types/AgentType.js +17 -7
- package/serialization/types/AppAuthScheme.js +17 -7
- package/serialization/types/AppAuthSchemeAuthMode.js +17 -7
- package/serialization/types/AppModel.js +17 -7
- package/serialization/types/ArchivalMemorySummary.js +17 -7
- package/serialization/types/AssistantFile.js +17 -7
- package/serialization/types/AssistantMessageInput.js +17 -7
- package/serialization/types/AssistantMessageOutput.js +17 -7
- package/serialization/types/AuthRequest.js +17 -7
- package/serialization/types/AuthResponse.js +17 -7
- package/serialization/types/AuthSchemeField.js +17 -7
- package/serialization/types/Block.js +17 -7
- package/serialization/types/BlockUpdate.js +17 -7
- package/serialization/types/ChatCompletionRequest.js +17 -7
- package/serialization/types/ChatCompletionRequestFunctionCall.js +17 -7
- package/serialization/types/ChatCompletionRequestMessagesItem.js +17 -7
- package/serialization/types/ChatCompletionRequestStop.js +17 -7
- package/serialization/types/ChatCompletionRequestToolChoice.js +17 -7
- package/serialization/types/ChatCompletionResponse.js +17 -7
- package/serialization/types/ChildToolRule.js +17 -7
- package/serialization/types/Choice.js +17 -7
- package/serialization/types/ConditionalToolRule.js +17 -7
- package/serialization/types/ConflictErrorBody.js +17 -7
- package/serialization/types/ContextWindowOverview.js +17 -7
- package/serialization/types/CreateAssistantFileRequest.js +17 -7
- package/serialization/types/CreateAssistantRequest.js +17 -7
- package/serialization/types/CreateBlock.js +17 -7
- package/serialization/types/DeleteAssistantFileResponse.js +17 -7
- package/serialization/types/DeleteAssistantResponse.js +17 -7
- package/serialization/types/E2BSandboxConfig.js +17 -7
- package/serialization/types/EmbeddingConfig.js +17 -7
- package/serialization/types/EmbeddingConfigEmbeddingEndpointType.js +17 -7
- package/serialization/types/FileMetadata.js +17 -7
- package/serialization/types/FunctionCallInput.js +17 -7
- package/serialization/types/FunctionCallOutput.js +17 -7
- package/serialization/types/FunctionSchema.js +17 -7
- package/serialization/types/Health.js +17 -7
- package/serialization/types/HttpValidationError.js +17 -7
- package/serialization/types/InitToolRule.js +17 -7
- package/serialization/types/InternalServerErrorBody.js +17 -7
- package/serialization/types/Job.d.ts +2 -0
- package/serialization/types/Job.js +19 -7
- package/serialization/types/JobStatus.js +17 -7
- package/serialization/types/JobType.d.ts +10 -0
- package/serialization/types/JobType.js +44 -0
- package/serialization/types/LettaRequest.js +17 -7
- package/serialization/types/LettaResponse.js +17 -7
- package/serialization/types/LettaResponseMessagesItem.js +17 -7
- package/serialization/types/LettaSchemasLettaMessageToolCall.js +17 -7
- package/serialization/types/LettaSchemasMessageMessage.js +17 -7
- package/serialization/types/LettaSchemasOpenaiChatCompletionRequestTool.js +17 -7
- package/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCall.js +17 -7
- package/serialization/types/LettaSchemasOpenaiChatCompletionRequestToolCallFunction.js +17 -7
- package/serialization/types/LettaSchemasOpenaiChatCompletionResponseMessage.js +17 -7
- package/serialization/types/LettaSchemasOpenaiChatCompletionResponseToolCall.js +17 -7
- package/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallFunction.js +17 -7
- package/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallInput.js +17 -7
- package/serialization/types/LettaSchemasOpenaiChatCompletionsToolCallOutput.js +17 -7
- package/serialization/types/LettaSchemasToolTool.d.ts +0 -1
- package/serialization/types/LettaSchemasToolTool.js +17 -8
- package/serialization/types/LettaUsageStatistics.js +17 -7
- package/serialization/types/LlmConfig.js +17 -7
- package/serialization/types/LlmConfigModelEndpointType.js +17 -7
- package/serialization/types/LocalSandboxConfig.js +17 -7
- package/serialization/types/LogProbToken.js +17 -7
- package/serialization/types/Memory.js +17 -7
- package/serialization/types/MessageContentLogProb.js +17 -7
- package/serialization/types/MessageCreate.js +17 -7
- package/serialization/types/MessageCreateRole.js +17 -7
- package/serialization/types/MessageRole.js +17 -7
- package/serialization/types/NotFoundErrorBody.js +17 -7
- package/serialization/types/NotFoundErrorBodyMessage.js +17 -7
- package/serialization/types/OpenAiAssistant.js +17 -7
- package/serialization/types/Organization.js +17 -7
- package/serialization/types/OrganizationCreate.js +17 -7
- package/serialization/types/Passage.js +17 -7
- package/serialization/types/Provider.js +17 -7
- package/serialization/types/ReasoningMessage.js +17 -7
- package/serialization/types/RecallMemorySummary.js +17 -7
- package/serialization/types/ResponseFormat.js +17 -7
- package/serialization/types/Run.d.ts +22 -0
- package/serialization/types/Run.js +53 -0
- package/serialization/types/SandboxConfig.js +17 -7
- package/serialization/types/SandboxConfigCreate.js +17 -7
- package/serialization/types/SandboxConfigCreateConfig.js +17 -7
- package/serialization/types/SandboxConfigUpdate.js +17 -7
- package/serialization/types/SandboxConfigUpdateConfig.js +17 -7
- package/serialization/types/SandboxEnvironmentVariable.js +17 -7
- package/serialization/types/SandboxEnvironmentVariableCreate.js +17 -7
- package/serialization/types/SandboxEnvironmentVariableUpdate.js +17 -7
- package/serialization/types/SandboxType.js +17 -7
- package/serialization/types/Source.js +17 -7
- package/serialization/types/SystemMessageInput.js +17 -7
- package/serialization/types/SystemMessageOutput.js +17 -7
- package/serialization/types/TerminalToolRule.js +17 -7
- package/serialization/types/ToolCallDelta.js +17 -7
- package/serialization/types/ToolCallFunctionOutput.js +17 -7
- package/serialization/types/ToolCallMessage.js +17 -7
- package/serialization/types/ToolCallMessageToolCall.js +17 -7
- package/serialization/types/ToolCreate.d.ts +0 -1
- package/serialization/types/ToolCreate.js +17 -8
- package/serialization/types/ToolFunctionChoice.js +17 -7
- package/serialization/types/ToolInput.js +17 -7
- package/serialization/types/ToolMessage.js +17 -7
- package/serialization/types/ToolReturnMessage.js +17 -7
- package/serialization/types/ToolReturnMessageStatus.js +17 -7
- package/serialization/types/ToolRuleType.js +17 -7
- package/serialization/types/ToolType.js +17 -7
- package/serialization/types/UsageStatistics.js +17 -7
- package/serialization/types/User.js +17 -7
- package/serialization/types/UserCreate.js +17 -7
- package/serialization/types/UserMessageInput.js +17 -7
- package/serialization/types/UserMessageInputContent.js +17 -7
- package/serialization/types/UserMessageOutput.js +17 -7
- package/serialization/types/UserUpdate.js +17 -7
- package/serialization/types/ValidationError.js +17 -7
- package/serialization/types/ValidationErrorLocItem.js +17 -7
- package/serialization/types/index.d.ts +2 -0
- package/serialization/types/index.js +2 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/api/types/index.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ export * from "./Health";
|
|
|
48
48
|
export * from "./InitToolRule";
|
|
49
49
|
export * from "./Job";
|
|
50
50
|
export * from "./JobStatus";
|
|
51
|
+
export * from "./JobType";
|
|
51
52
|
export * from "./LlmConfigModelEndpointType";
|
|
52
53
|
export * from "./LlmConfig";
|
|
53
54
|
export * from "./LettaRequest";
|
|
@@ -69,6 +70,7 @@ export * from "./Provider";
|
|
|
69
70
|
export * from "./ReasoningMessage";
|
|
70
71
|
export * from "./RecallMemorySummary";
|
|
71
72
|
export * from "./ResponseFormat";
|
|
73
|
+
export * from "./Run";
|
|
72
74
|
export * from "./SandboxConfig";
|
|
73
75
|
export * from "./SandboxConfigCreateConfig";
|
|
74
76
|
export * from "./SandboxConfigCreate";
|
package/api/types/index.js
CHANGED
|
@@ -64,6 +64,7 @@ __exportStar(require("./Health"), exports);
|
|
|
64
64
|
__exportStar(require("./InitToolRule"), exports);
|
|
65
65
|
__exportStar(require("./Job"), exports);
|
|
66
66
|
__exportStar(require("./JobStatus"), exports);
|
|
67
|
+
__exportStar(require("./JobType"), exports);
|
|
67
68
|
__exportStar(require("./LlmConfigModelEndpointType"), exports);
|
|
68
69
|
__exportStar(require("./LlmConfig"), exports);
|
|
69
70
|
__exportStar(require("./LettaRequest"), exports);
|
|
@@ -85,6 +86,7 @@ __exportStar(require("./Provider"), exports);
|
|
|
85
86
|
__exportStar(require("./ReasoningMessage"), exports);
|
|
86
87
|
__exportStar(require("./RecallMemorySummary"), exports);
|
|
87
88
|
__exportStar(require("./ResponseFormat"), exports);
|
|
89
|
+
__exportStar(require("./Run"), exports);
|
|
88
90
|
__exportStar(require("./SandboxConfig"), exports);
|
|
89
91
|
__exportStar(require("./SandboxConfigCreateConfig"), exports);
|
|
90
92
|
__exportStar(require("./SandboxConfigCreate"), exports);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type APIResponse<Success, Failure> = SuccessfulResponse<Success> | FailedResponse<Failure>;
|
|
2
2
|
export interface SuccessfulResponse<T> {
|
|
3
3
|
ok: true;
|
|
4
4
|
body: T;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { APIResponse } from "./APIResponse";
|
|
2
|
-
export
|
|
2
|
+
export type FetchFunction = <R = unknown>(args: Fetcher.Args) => Promise<APIResponse<R, Fetcher.Error>>;
|
|
3
3
|
export declare namespace Fetcher {
|
|
4
4
|
interface Args {
|
|
5
5
|
url: string;
|
package/core/fetcher/Fetcher.js
CHANGED
|
@@ -9,7 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.fetcher =
|
|
12
|
+
exports.fetcher = void 0;
|
|
13
|
+
exports.fetcherImpl = fetcherImpl;
|
|
13
14
|
const createRequestUrl_1 = require("./createRequestUrl");
|
|
14
15
|
const getFetchFn_1 = require("./getFetchFn");
|
|
15
16
|
const getRequestBody_1 = require("./getRequestBody");
|
|
@@ -95,5 +96,4 @@ function fetcherImpl(args) {
|
|
|
95
96
|
}
|
|
96
97
|
});
|
|
97
98
|
}
|
|
98
|
-
exports.fetcherImpl = fetcherImpl;
|
|
99
99
|
exports.fetcher = fetcherImpl;
|
|
@@ -3,11 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.createRequestUrl =
|
|
6
|
+
exports.createRequestUrl = createRequestUrl;
|
|
7
7
|
const qs_1 = __importDefault(require("qs"));
|
|
8
8
|
function createRequestUrl(baseUrl, queryParameters) {
|
|
9
9
|
return Object.keys(queryParameters !== null && queryParameters !== void 0 ? queryParameters : {}).length > 0
|
|
10
10
|
? `${baseUrl}?${qs_1.default.stringify(queryParameters, { arrayFormat: "repeat" })}`
|
|
11
11
|
: baseUrl;
|
|
12
12
|
}
|
|
13
|
-
exports.createRequestUrl = createRequestUrl;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
36
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
37
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -32,7 +42,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32
42
|
});
|
|
33
43
|
};
|
|
34
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.getFetchFn =
|
|
45
|
+
exports.getFetchFn = getFetchFn;
|
|
36
46
|
const runtime_1 = require("../runtime");
|
|
37
47
|
/**
|
|
38
48
|
* Returns a fetch function based on the runtime
|
|
@@ -56,4 +66,3 @@ function getFetchFn() {
|
|
|
56
66
|
return (yield Promise.resolve().then(() => __importStar(require("node-fetch")))).default;
|
|
57
67
|
});
|
|
58
68
|
}
|
|
59
|
-
exports.getFetchFn = getFetchFn;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getHeader =
|
|
3
|
+
exports.getHeader = getHeader;
|
|
4
4
|
function getHeader(headers, header) {
|
|
5
5
|
for (const [headerKey, headerValue] of Object.entries(headers)) {
|
|
6
6
|
if (headerKey.toLowerCase() === header.toLowerCase()) {
|
|
@@ -9,4 +9,3 @@ function getHeader(headers, header) {
|
|
|
9
9
|
}
|
|
10
10
|
return undefined;
|
|
11
11
|
}
|
|
12
|
-
exports.getHeader = getHeader;
|
|
@@ -9,9 +9,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.getRequestBody =
|
|
13
|
-
function getRequestBody(
|
|
14
|
-
return __awaiter(this,
|
|
12
|
+
exports.getRequestBody = getRequestBody;
|
|
13
|
+
function getRequestBody(_a) {
|
|
14
|
+
return __awaiter(this, arguments, void 0, function* ({ body, type }) {
|
|
15
15
|
if (type.includes("json")) {
|
|
16
16
|
return JSON.stringify(body);
|
|
17
17
|
}
|
|
@@ -20,4 +20,3 @@ function getRequestBody({ body, type }) {
|
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
-
exports.getRequestBody = getRequestBody;
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.getResponseBody =
|
|
12
|
+
exports.getResponseBody = getResponseBody;
|
|
13
13
|
const chooseStreamWrapper_1 = require("./stream-wrappers/chooseStreamWrapper");
|
|
14
14
|
function getResponseBody(response, responseType) {
|
|
15
15
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -52,4 +52,3 @@ function getResponseBody(response, responseType) {
|
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
-
exports.getResponseBody = getResponseBody;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const makeRequest: (fetchFn: (url: string, init: RequestInit) => Promise<Response>, url: string, method: string, headers: Record<string, string>, requestBody: BodyInit | undefined, timeoutMs?: number
|
|
1
|
+
export declare const makeRequest: (fetchFn: (url: string, init: RequestInit) => Promise<Response>, url: string, method: string, headers: Record<string, string>, requestBody: BodyInit | undefined, timeoutMs?: number, abortSignal?: AbortSignal, withCredentials?: boolean, duplex?: "half") => Promise<Response>;
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.requestWithRetries =
|
|
12
|
+
exports.requestWithRetries = requestWithRetries;
|
|
13
13
|
const INITIAL_RETRY_DELAY = 1000; // in milliseconds
|
|
14
14
|
const MAX_RETRY_DELAY = 60000; // in milliseconds
|
|
15
15
|
const DEFAULT_MAX_RETRIES = 2;
|
|
@@ -19,8 +19,8 @@ function addJitter(delay) {
|
|
|
19
19
|
const jitterMultiplier = 1 + (Math.random() * 2 - 1) * JITTER_FACTOR;
|
|
20
20
|
return delay * jitterMultiplier;
|
|
21
21
|
}
|
|
22
|
-
function requestWithRetries(
|
|
23
|
-
return __awaiter(this,
|
|
22
|
+
function requestWithRetries(requestFn_1) {
|
|
23
|
+
return __awaiter(this, arguments, void 0, function* (requestFn, maxRetries = DEFAULT_MAX_RETRIES) {
|
|
24
24
|
let response = yield requestFn();
|
|
25
25
|
for (let i = 0; i < maxRetries; ++i) {
|
|
26
26
|
if ([408, 409, 429].includes(response.status) || response.status >= 500) {
|
|
@@ -38,4 +38,3 @@ function requestWithRetries(requestFn, maxRetries = DEFAULT_MAX_RETRIES) {
|
|
|
38
38
|
return response;
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
exports.requestWithRetries = requestWithRetries;
|
package/core/fetcher/signals.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getTimeoutSignal = getTimeoutSignal;
|
|
4
|
+
exports.anySignal = anySignal;
|
|
4
5
|
const TIMEOUT = "timeout";
|
|
5
6
|
function getTimeoutSignal(timeoutMs) {
|
|
6
7
|
const controller = new AbortController();
|
|
7
8
|
const abortId = setTimeout(() => controller.abort(TIMEOUT), timeoutMs);
|
|
8
9
|
return { signal: controller.signal, abortId };
|
|
9
10
|
}
|
|
10
|
-
exports.getTimeoutSignal = getTimeoutSignal;
|
|
11
11
|
/**
|
|
12
12
|
* Returns an abort signal that is getting aborted when
|
|
13
13
|
* at least one of the specified abort signals is aborted.
|
|
@@ -34,4 +34,3 @@ function anySignal(...args) {
|
|
|
34
34
|
}
|
|
35
35
|
return controller.signal;
|
|
36
36
|
}
|
|
37
|
-
exports.anySignal = anySignal;
|
|
@@ -76,21 +76,23 @@ class NodePre18StreamWrapper {
|
|
|
76
76
|
this.encoding = encoding;
|
|
77
77
|
}
|
|
78
78
|
text() {
|
|
79
|
-
var e_1, _a;
|
|
80
79
|
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
var _a, e_1, _b, _c;
|
|
81
81
|
const chunks = [];
|
|
82
82
|
const encoder = new TextEncoder();
|
|
83
83
|
this.readableStream.setEncoding((this.encoding || "utf-8"));
|
|
84
84
|
try {
|
|
85
|
-
for (var
|
|
86
|
-
|
|
85
|
+
for (var _d = true, _e = __asyncValues(this.readableStream), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
|
|
86
|
+
_c = _f.value;
|
|
87
|
+
_d = false;
|
|
88
|
+
const chunk = _c;
|
|
87
89
|
chunks.push(encoder.encode(chunk));
|
|
88
90
|
}
|
|
89
91
|
}
|
|
90
92
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
91
93
|
finally {
|
|
92
94
|
try {
|
|
93
|
-
if (
|
|
95
|
+
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
|
94
96
|
}
|
|
95
97
|
finally { if (e_1) throw e_1.error; }
|
|
96
98
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StreamWrapper } from "./chooseStreamWrapper";
|
|
2
|
-
|
|
2
|
+
type EventCallback = (data?: any) => void;
|
|
3
3
|
export declare class UndiciStreamWrapper<ReadFormat extends Uint8Array | Uint16Array | Uint32Array> implements StreamWrapper<UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>, ReadFormat> {
|
|
4
4
|
private readableStream;
|
|
5
5
|
private reader;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
36
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
37
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -32,7 +42,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32
42
|
});
|
|
33
43
|
};
|
|
34
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.chooseStreamWrapper =
|
|
45
|
+
exports.chooseStreamWrapper = chooseStreamWrapper;
|
|
36
46
|
const runtime_1 = require("../../runtime");
|
|
37
47
|
function chooseStreamWrapper(responseBody) {
|
|
38
48
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -47,4 +57,3 @@ function chooseStreamWrapper(responseBody) {
|
|
|
47
57
|
}
|
|
48
58
|
});
|
|
49
59
|
}
|
|
50
|
-
exports.chooseStreamWrapper = chooseStreamWrapper;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type MaybePromise<T> = Promise<T> | T;
|
|
2
2
|
interface FormDataRequest<Body> {
|
|
3
3
|
body: Body;
|
|
4
4
|
headers: Record<string, string>;
|
|
@@ -11,7 +11,7 @@ export interface CrossPlatformFormData {
|
|
|
11
11
|
getRequest(): MaybePromise<FormDataRequest<unknown>>;
|
|
12
12
|
}
|
|
13
13
|
export declare function newFormData(): Promise<CrossPlatformFormData>;
|
|
14
|
-
export
|
|
14
|
+
export type Node18FormDataFd = {
|
|
15
15
|
append(name: string, value: unknown, fileName?: string): void;
|
|
16
16
|
} | undefined;
|
|
17
17
|
/**
|
|
@@ -24,7 +24,7 @@ export declare class Node18FormData implements CrossPlatformFormData {
|
|
|
24
24
|
appendFile(key: string, value: unknown, fileName?: string): Promise<void>;
|
|
25
25
|
getRequest(): Promise<FormDataRequest<unknown>>;
|
|
26
26
|
}
|
|
27
|
-
export
|
|
27
|
+
export type Node16FormDataFd = {
|
|
28
28
|
append(name: string, value: unknown, options?: string | {
|
|
29
29
|
header?: string | Headers;
|
|
30
30
|
knownLength?: number;
|
|
@@ -44,7 +44,7 @@ export declare class Node16FormData implements CrossPlatformFormData {
|
|
|
44
44
|
appendFile(key: string, value: unknown, fileName?: string): Promise<void>;
|
|
45
45
|
getRequest(): FormDataRequest<Node16FormDataFd>;
|
|
46
46
|
}
|
|
47
|
-
export
|
|
47
|
+
export type WebFormDataFd = {
|
|
48
48
|
append(name: string, value: string | Blob, fileName?: string): void;
|
|
49
49
|
} | undefined;
|
|
50
50
|
/**
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
36
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
37
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -32,7 +42,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32
42
|
});
|
|
33
43
|
};
|
|
34
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.WebFormData = exports.Node16FormData = exports.Node18FormData =
|
|
45
|
+
exports.WebFormData = exports.Node16FormData = exports.Node18FormData = void 0;
|
|
46
|
+
exports.newFormData = newFormData;
|
|
36
47
|
const runtime_1 = require("../runtime");
|
|
37
48
|
function isNamedValue(value) {
|
|
38
49
|
return typeof value === "object" && value != null && "name" in value;
|
|
@@ -53,7 +64,6 @@ function newFormData() {
|
|
|
53
64
|
return formdata;
|
|
54
65
|
});
|
|
55
66
|
}
|
|
56
|
-
exports.newFormData = newFormData;
|
|
57
67
|
/**
|
|
58
68
|
* Form Data Implementation for Node.js 18+
|
|
59
69
|
*/
|
|
@@ -68,8 +78,8 @@ class Node18FormData {
|
|
|
68
78
|
(_a = this.fd) === null || _a === void 0 ? void 0 : _a.append(key, value);
|
|
69
79
|
}
|
|
70
80
|
appendFile(key, value, fileName) {
|
|
71
|
-
var _a, _b;
|
|
72
81
|
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
var _a, _b;
|
|
73
83
|
if (fileName == null && isNamedValue(value)) {
|
|
74
84
|
fileName = value.name;
|
|
75
85
|
}
|
|
@@ -114,8 +124,8 @@ class Node16FormData {
|
|
|
114
124
|
(_a = this.fd) === null || _a === void 0 ? void 0 : _a.append(key, value);
|
|
115
125
|
}
|
|
116
126
|
appendFile(key, value, fileName) {
|
|
117
|
-
var _a, _b;
|
|
118
127
|
return __awaiter(this, void 0, void 0, function* () {
|
|
128
|
+
var _a, _b;
|
|
119
129
|
if (fileName == null && isNamedValue(value)) {
|
|
120
130
|
fileName = value.name;
|
|
121
131
|
}
|
|
@@ -156,8 +166,8 @@ class WebFormData {
|
|
|
156
166
|
(_a = this.fd) === null || _a === void 0 ? void 0 : _a.append(key, value);
|
|
157
167
|
}
|
|
158
168
|
appendFile(key, value, fileName) {
|
|
159
|
-
var _a;
|
|
160
169
|
return __awaiter(this, void 0, void 0, function* () {
|
|
170
|
+
var _a;
|
|
161
171
|
if (fileName == null && isNamedValue(value)) {
|
|
162
172
|
fileName = value.name;
|
|
163
173
|
}
|
package/core/index.js
CHANGED
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
19
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
20
|
};
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.serialization = void 0;
|
|
30
40
|
__exportStar(require("./fetcher"), exports);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare const RUNTIME: Runtime;
|
|
5
5
|
export interface Runtime {
|
|
6
|
-
type: "browser" | "web-worker" | "deno" | "bun" | "node" | "react-native" | "unknown" | "workerd";
|
|
6
|
+
type: "browser" | "web-worker" | "deno" | "bun" | "node" | "react-native" | "unknown" | "workerd" | "edge-runtime";
|
|
7
7
|
version?: string;
|
|
8
8
|
parsedVersion?: number;
|
|
9
9
|
}
|
package/core/runtime/runtime.js
CHANGED
|
@@ -1,80 +1,85 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var _a, _b, _c, _d, _e;
|
|
3
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
3
|
exports.RUNTIME = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* A constant that indicates whether the environment the code is running is a Web Browser.
|
|
7
|
-
*/
|
|
8
|
-
const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
9
|
-
/**
|
|
10
|
-
* A constant that indicates whether the environment the code is running is a Web Worker.
|
|
11
|
-
*/
|
|
12
|
-
const isWebWorker = typeof self === "object" &&
|
|
13
|
-
// @ts-ignore
|
|
14
|
-
typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" &&
|
|
15
|
-
(((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope" ||
|
|
16
|
-
((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "ServiceWorkerGlobalScope" ||
|
|
17
|
-
((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "SharedWorkerGlobalScope");
|
|
18
|
-
/**
|
|
19
|
-
* A constant that indicates whether the environment the code is running is Deno.
|
|
20
|
-
*/
|
|
21
|
-
const isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined";
|
|
22
|
-
/**
|
|
23
|
-
* A constant that indicates whether the environment the code is running is Bun.sh.
|
|
24
|
-
*/
|
|
25
|
-
const isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined";
|
|
26
|
-
/**
|
|
27
|
-
* A constant that indicates whether the environment the code is running is Node.JS.
|
|
28
|
-
*/
|
|
29
|
-
const isNode = typeof process !== "undefined" &&
|
|
30
|
-
Boolean(process.version) &&
|
|
31
|
-
Boolean((_d = process.versions) === null || _d === void 0 ? void 0 : _d.node) &&
|
|
32
|
-
// Deno spoofs process.versions.node, see https://deno.land/std@0.177.0/node/process.ts?s=versions
|
|
33
|
-
!isDeno &&
|
|
34
|
-
!isBun;
|
|
35
|
-
/**
|
|
36
|
-
* A constant that indicates whether the environment the code is running is in React-Native.
|
|
37
|
-
* https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js
|
|
38
|
-
*/
|
|
39
|
-
const isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative";
|
|
40
|
-
/**
|
|
41
|
-
* A constant that indicates whether the environment the code is running is Cloudflare.
|
|
42
|
-
* https://developers.cloudflare.com/workers/runtime-apis/web-standards/#navigatoruseragent
|
|
43
|
-
*/
|
|
44
|
-
const isCloudflare = typeof globalThis !== "undefined" && ((_e = globalThis === null || globalThis === void 0 ? void 0 : globalThis.navigator) === null || _e === void 0 ? void 0 : _e.userAgent) === "Cloudflare-Workers";
|
|
45
4
|
/**
|
|
46
5
|
* A constant that indicates which environment and version the SDK is running in.
|
|
47
6
|
*/
|
|
48
7
|
exports.RUNTIME = evaluateRuntime();
|
|
49
8
|
function evaluateRuntime() {
|
|
9
|
+
var _a, _b, _c, _d, _e;
|
|
10
|
+
/**
|
|
11
|
+
* A constant that indicates whether the environment the code is running is a Web Browser.
|
|
12
|
+
*/
|
|
13
|
+
const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
50
14
|
if (isBrowser) {
|
|
51
15
|
return {
|
|
52
16
|
type: "browser",
|
|
53
17
|
version: window.navigator.userAgent,
|
|
54
18
|
};
|
|
55
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* A constant that indicates whether the environment the code is running is Cloudflare.
|
|
22
|
+
* https://developers.cloudflare.com/workers/runtime-apis/web-standards/#navigatoruseragent
|
|
23
|
+
*/
|
|
24
|
+
const isCloudflare = typeof globalThis !== "undefined" && ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === "Cloudflare-Workers";
|
|
56
25
|
if (isCloudflare) {
|
|
57
26
|
return {
|
|
58
27
|
type: "workerd",
|
|
59
28
|
};
|
|
60
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* A constant that indicates whether the environment the code is running is Edge Runtime.
|
|
32
|
+
* https://vercel.com/docs/functions/runtimes/edge-runtime#check-if-you're-running-on-the-edge-runtime
|
|
33
|
+
*/
|
|
34
|
+
const isEdgeRuntime = typeof EdgeRuntime === "string";
|
|
35
|
+
if (isEdgeRuntime) {
|
|
36
|
+
return {
|
|
37
|
+
type: "edge-runtime",
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* A constant that indicates whether the environment the code is running is a Web Worker.
|
|
42
|
+
*/
|
|
43
|
+
const isWebWorker = typeof self === "object" &&
|
|
44
|
+
// @ts-ignore
|
|
45
|
+
typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" &&
|
|
46
|
+
(((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "DedicatedWorkerGlobalScope" ||
|
|
47
|
+
((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "ServiceWorkerGlobalScope" ||
|
|
48
|
+
((_d = self.constructor) === null || _d === void 0 ? void 0 : _d.name) === "SharedWorkerGlobalScope");
|
|
61
49
|
if (isWebWorker) {
|
|
62
50
|
return {
|
|
63
51
|
type: "web-worker",
|
|
64
52
|
};
|
|
65
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* A constant that indicates whether the environment the code is running is Deno.
|
|
56
|
+
* FYI Deno spoofs process.versions.node, see https://deno.land/std@0.177.0/node/process.ts?s=versions
|
|
57
|
+
*/
|
|
58
|
+
const isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined";
|
|
66
59
|
if (isDeno) {
|
|
67
60
|
return {
|
|
68
61
|
type: "deno",
|
|
69
62
|
version: Deno.version.deno,
|
|
70
63
|
};
|
|
71
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* A constant that indicates whether the environment the code is running is Bun.sh.
|
|
67
|
+
*/
|
|
68
|
+
const isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined";
|
|
72
69
|
if (isBun) {
|
|
73
70
|
return {
|
|
74
71
|
type: "bun",
|
|
75
72
|
version: Bun.version,
|
|
76
73
|
};
|
|
77
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* A constant that indicates whether the environment the code is running is Node.JS.
|
|
77
|
+
*/
|
|
78
|
+
const isNode = typeof process !== "undefined" &&
|
|
79
|
+
"version" in process &&
|
|
80
|
+
!!process.version &&
|
|
81
|
+
"versions" in process &&
|
|
82
|
+
!!((_e = process.versions) === null || _e === void 0 ? void 0 : _e.node);
|
|
78
83
|
if (isNode) {
|
|
79
84
|
return {
|
|
80
85
|
type: "node",
|
|
@@ -82,6 +87,11 @@ function evaluateRuntime() {
|
|
|
82
87
|
parsedVersion: Number(process.versions.node.split(".")[0]),
|
|
83
88
|
};
|
|
84
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* A constant that indicates whether the environment the code is running is in React-Native.
|
|
92
|
+
* https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js
|
|
93
|
+
*/
|
|
94
|
+
const isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative";
|
|
85
95
|
if (isReactNative) {
|
|
86
96
|
return {
|
|
87
97
|
type: "react-native",
|
package/core/schemas/Schema.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SchemaUtils } from "./builders";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
2
|
+
export type Schema<Raw = unknown, Parsed = unknown> = BaseSchema<Raw, Parsed> & SchemaUtils<Raw, Parsed>;
|
|
3
|
+
export type inferRaw<S extends Schema> = S extends Schema<infer Raw, any> ? Raw : never;
|
|
4
|
+
export type inferParsed<S extends Schema> = S extends Schema<any, infer Parsed> ? Parsed : never;
|
|
5
5
|
export interface BaseSchema<Raw, Parsed> {
|
|
6
6
|
parse: (raw: unknown, opts?: SchemaOptions) => MaybeValid<Parsed>;
|
|
7
7
|
json: (parsed: unknown, opts?: SchemaOptions) => MaybeValid<Raw>;
|
|
@@ -26,8 +26,8 @@ export declare const SchemaType: {
|
|
|
26
26
|
readonly UNDISCRIMINATED_UNION: "undiscriminatedUnion";
|
|
27
27
|
readonly OPTIONAL: "optional";
|
|
28
28
|
};
|
|
29
|
-
export
|
|
30
|
-
export
|
|
29
|
+
export type SchemaType = (typeof SchemaType)[keyof typeof SchemaType];
|
|
30
|
+
export type MaybeValid<T> = Valid<T> | Invalid;
|
|
31
31
|
export interface Valid<T> {
|
|
32
32
|
ok: true;
|
|
33
33
|
value: T;
|