@letta-ai/letta-client 0.1.170 → 0.1.173
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/README.md +16 -3
- package/api/errors/BadRequestError.d.ts +2 -1
- package/api/errors/BadRequestError.js +2 -1
- package/api/errors/ConflictError.d.ts +2 -1
- package/api/errors/ConflictError.js +2 -1
- package/api/errors/InternalServerError.d.ts +2 -1
- package/api/errors/InternalServerError.js +2 -1
- package/api/errors/NotFoundError.d.ts +2 -1
- package/api/errors/NotFoundError.js +2 -1
- package/api/errors/PaymentRequiredError.d.ts +2 -1
- package/api/errors/PaymentRequiredError.js +2 -1
- package/api/errors/UnprocessableEntityError.d.ts +2 -1
- package/api/errors/UnprocessableEntityError.js +2 -1
- package/api/resources/agents/client/Client.d.ts +20 -10
- package/api/resources/agents/client/Client.js +166 -82
- package/api/resources/agents/client/requests/AgentsListRequest.d.ts +1 -1
- package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
- package/api/resources/agents/client/requests/UpdateAgent.d.ts +2 -0
- package/api/resources/agents/resources/blocks/client/Client.d.ts +10 -5
- package/api/resources/agents/resources/blocks/client/Client.js +90 -45
- package/api/resources/agents/resources/context/client/Client.d.ts +2 -1
- package/api/resources/agents/resources/context/client/Client.js +18 -9
- package/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -1
- package/api/resources/agents/resources/coreMemory/client/Client.js +18 -9
- package/api/resources/agents/resources/files/client/Client.d.ts +6 -3
- package/api/resources/agents/resources/files/client/Client.js +45 -21
- package/api/resources/agents/resources/folders/client/Client.d.ts +6 -3
- package/api/resources/agents/resources/folders/client/Client.js +54 -27
- package/api/resources/agents/resources/groups/client/Client.d.ts +2 -1
- package/api/resources/agents/resources/groups/client/Client.js +19 -10
- package/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -1
- package/api/resources/agents/resources/memoryVariables/client/Client.js +18 -9
- package/api/resources/agents/resources/messages/client/Client.d.ts +16 -8
- package/api/resources/agents/resources/messages/client/Client.js +155 -83
- package/api/resources/agents/resources/passages/client/Client.d.ts +8 -4
- package/api/resources/agents/resources/passages/client/Client.js +64 -31
- package/api/resources/agents/resources/passages/client/requests/PassageUpdate.d.ts +2 -2
- package/api/resources/agents/resources/sources/client/Client.d.ts +6 -3
- package/api/resources/agents/resources/sources/client/Client.js +54 -27
- package/api/resources/agents/resources/templates/client/Client.d.ts +6 -3
- package/api/resources/agents/resources/templates/client/Client.js +54 -27
- package/api/resources/agents/resources/tools/client/Client.d.ts +6 -3
- package/api/resources/agents/resources/tools/client/Client.js +54 -27
- package/api/resources/batches/client/Client.d.ts +8 -4
- package/api/resources/batches/client/Client.js +63 -30
- package/api/resources/blocks/client/Client.d.ts +12 -6
- package/api/resources/blocks/client/Client.js +100 -49
- package/api/resources/blocks/resources/agents/client/Client.d.ts +2 -1
- package/api/resources/blocks/resources/agents/client/Client.js +19 -10
- package/api/resources/clientSideAccessTokens/client/Client.d.ts +6 -3
- package/api/resources/clientSideAccessTokens/client/Client.js +46 -22
- package/api/resources/embeddingModels/client/Client.d.ts +2 -1
- package/api/resources/embeddingModels/client/Client.js +18 -9
- package/api/resources/folders/client/Client.d.ts +18 -9
- package/api/resources/folders/client/Client.js +154 -76
- package/api/resources/folders/resources/files/client/Client.d.ts +6 -3
- package/api/resources/folders/resources/files/client/Client.js +48 -24
- package/api/resources/folders/resources/passages/client/Client.d.ts +2 -1
- package/api/resources/folders/resources/passages/client/Client.js +19 -10
- package/api/resources/groups/client/Client.d.ts +12 -6
- package/api/resources/groups/client/Client.js +105 -52
- package/api/resources/groups/resources/messages/client/Client.d.ts +10 -5
- package/api/resources/groups/resources/messages/client/Client.js +91 -49
- package/api/resources/health/client/Client.d.ts +2 -1
- package/api/resources/health/client/Client.js +17 -8
- package/api/resources/identities/client/Client.d.ts +14 -7
- package/api/resources/identities/client/Client.js +123 -61
- package/api/resources/identities/resources/properties/client/Client.d.ts +2 -1
- package/api/resources/identities/resources/properties/client/Client.js +9 -3
- package/api/resources/jobs/client/Client.d.ts +10 -5
- package/api/resources/jobs/client/Client.js +92 -47
- package/api/resources/messages/client/Client.d.ts +2 -1
- package/api/resources/messages/client/Client.js +19 -10
- package/api/resources/models/client/Client.d.ts +2 -1
- package/api/resources/models/client/Client.js +27 -14
- package/api/resources/projects/client/Client.d.ts +2 -1
- package/api/resources/projects/client/Client.js +18 -9
- package/api/resources/providers/client/Client.d.ts +10 -5
- package/api/resources/providers/client/Client.js +77 -36
- package/api/resources/runs/client/Client.d.ts +8 -4
- package/api/resources/runs/client/Client.js +74 -38
- package/api/resources/runs/resources/messages/client/Client.d.ts +2 -1
- package/api/resources/runs/resources/messages/client/Client.js +21 -12
- package/api/resources/runs/resources/steps/client/Client.d.ts +2 -1
- package/api/resources/runs/resources/steps/client/Client.js +19 -10
- package/api/resources/runs/resources/usage/client/Client.d.ts +2 -1
- package/api/resources/runs/resources/usage/client/Client.js +18 -9
- package/api/resources/sources/client/Client.d.ts +20 -10
- package/api/resources/sources/client/Client.js +173 -86
- package/api/resources/sources/resources/files/client/Client.d.ts +6 -3
- package/api/resources/sources/resources/files/client/Client.js +48 -24
- package/api/resources/sources/resources/passages/client/Client.d.ts +2 -1
- package/api/resources/sources/resources/passages/client/Client.js +19 -10
- package/api/resources/steps/client/Client.d.ts +4 -2
- package/api/resources/steps/client/Client.js +41 -21
- package/api/resources/steps/resources/feedback/client/Client.d.ts +2 -1
- package/api/resources/steps/resources/feedback/client/Client.js +23 -12
- package/api/resources/tags/client/Client.d.ts +2 -1
- package/api/resources/tags/client/Client.js +19 -10
- package/api/resources/telemetry/client/Client.d.ts +2 -1
- package/api/resources/telemetry/client/Client.js +18 -9
- package/api/resources/templates/client/Client.d.ts +2 -1
- package/api/resources/templates/client/Client.js +18 -9
- package/api/resources/templates/resources/agents/client/Client.d.ts +2 -1
- package/api/resources/templates/resources/agents/client/Client.js +19 -10
- package/api/resources/tools/client/Client.d.ts +40 -20
- package/api/resources/tools/client/Client.js +356 -182
- package/api/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -0
- package/api/resources/tools/client/requests/ToolUpdate.d.ts +2 -0
- package/api/resources/voice/client/Client.d.ts +2 -1
- package/api/resources/voice/client/Client.js +9 -3
- package/api/types/AgentState.d.ts +2 -0
- package/api/types/EmbeddingConfig.d.ts +1 -11
- package/api/types/LettaStreamingRequest.d.ts +2 -0
- package/api/types/LlmConfig.d.ts +1 -11
- package/api/types/ModalSandboxConfig.d.ts +4 -0
- package/api/types/ModalSandboxConfigLanguage.d.ts +8 -0
- package/api/types/ModalSandboxConfigLanguage.js +10 -0
- package/api/types/NpmRequirement.d.ts +9 -0
- package/api/types/NpmRequirement.js +5 -0
- package/api/types/Passage.d.ts +4 -4
- package/api/types/Tool.d.ts +2 -0
- package/api/types/ToolCreate.d.ts +2 -0
- package/api/types/ToolType.d.ts +2 -1
- package/api/types/ToolType.js +1 -0
- package/api/types/index.d.ts +2 -0
- package/api/types/index.js +2 -0
- package/core/fetcher/APIResponse.d.ts +10 -0
- package/core/fetcher/Fetcher.d.ts +1 -1
- package/core/fetcher/Fetcher.js +11 -3
- package/core/fetcher/Headers.d.ts +2 -0
- package/core/fetcher/Headers.js +84 -0
- package/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/core/fetcher/HttpResponsePromise.js +103 -0
- package/core/fetcher/RawResponse.d.ts +29 -0
- package/core/fetcher/RawResponse.js +44 -0
- package/core/fetcher/createRequestUrl.d.ts +1 -1
- package/core/fetcher/getRequestBody.js +2 -1
- package/core/fetcher/index.d.ts +3 -0
- package/core/fetcher/index.js +7 -1
- package/core/fetcher/requestWithRetries.js +1 -1
- package/core/form-data-utils/FormDataWrapper.d.ts +3 -0
- package/core/form-data-utils/FormDataWrapper.js +53 -10
- package/core/form-data-utils/encodeAsFormParameter.d.ts +4 -0
- package/core/form-data-utils/encodeAsFormParameter.js +18 -0
- package/core/form-data-utils/index.d.ts +1 -0
- package/core/form-data-utils/index.js +3 -0
- package/core/json.d.ts +15 -0
- package/core/json.js +24 -0
- package/core/schemas/Schema.d.ts +2 -0
- package/core/schemas/Schema.js +2 -0
- package/core/schemas/builders/bigint/bigint.d.ts +1 -1
- package/core/schemas/builders/bigint/bigint.js +21 -17
- package/core/schemas/builders/object/object.js +1 -0
- package/core/schemas/builders/record/record.js +1 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +64 -0
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +1 -1
- package/dist/api/errors/BadRequestError.d.ts +2 -1
- package/dist/api/errors/BadRequestError.js +2 -1
- package/dist/api/errors/ConflictError.d.ts +2 -1
- package/dist/api/errors/ConflictError.js +2 -1
- package/dist/api/errors/InternalServerError.d.ts +2 -1
- package/dist/api/errors/InternalServerError.js +2 -1
- package/dist/api/errors/NotFoundError.d.ts +2 -1
- package/dist/api/errors/NotFoundError.js +2 -1
- package/dist/api/errors/PaymentRequiredError.d.ts +2 -1
- package/dist/api/errors/PaymentRequiredError.js +2 -1
- package/dist/api/errors/UnprocessableEntityError.d.ts +2 -1
- package/dist/api/errors/UnprocessableEntityError.js +2 -1
- package/dist/api/resources/agents/client/Client.d.ts +20 -10
- package/dist/api/resources/agents/client/Client.js +166 -82
- package/dist/api/resources/agents/client/requests/AgentsListRequest.d.ts +1 -1
- package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
- package/dist/api/resources/agents/client/requests/UpdateAgent.d.ts +2 -0
- package/dist/api/resources/agents/resources/blocks/client/Client.d.ts +10 -5
- package/dist/api/resources/agents/resources/blocks/client/Client.js +90 -45
- package/dist/api/resources/agents/resources/context/client/Client.d.ts +2 -1
- package/dist/api/resources/agents/resources/context/client/Client.js +18 -9
- package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -1
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +18 -9
- package/dist/api/resources/agents/resources/files/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/resources/files/client/Client.js +45 -21
- package/dist/api/resources/agents/resources/folders/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/resources/folders/client/Client.js +54 -27
- package/dist/api/resources/agents/resources/groups/client/Client.d.ts +2 -1
- package/dist/api/resources/agents/resources/groups/client/Client.js +19 -10
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.d.ts +2 -1
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +18 -9
- package/dist/api/resources/agents/resources/messages/client/Client.d.ts +16 -8
- package/dist/api/resources/agents/resources/messages/client/Client.js +155 -83
- package/dist/api/resources/agents/resources/passages/client/Client.d.ts +8 -4
- package/dist/api/resources/agents/resources/passages/client/Client.js +64 -31
- package/dist/api/resources/agents/resources/passages/client/requests/PassageUpdate.d.ts +2 -2
- package/dist/api/resources/agents/resources/sources/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/resources/sources/client/Client.js +54 -27
- package/dist/api/resources/agents/resources/templates/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/resources/templates/client/Client.js +54 -27
- package/dist/api/resources/agents/resources/tools/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/resources/tools/client/Client.js +54 -27
- package/dist/api/resources/batches/client/Client.d.ts +8 -4
- package/dist/api/resources/batches/client/Client.js +63 -30
- package/dist/api/resources/blocks/client/Client.d.ts +12 -6
- package/dist/api/resources/blocks/client/Client.js +100 -49
- package/dist/api/resources/blocks/resources/agents/client/Client.d.ts +2 -1
- package/dist/api/resources/blocks/resources/agents/client/Client.js +19 -10
- package/dist/api/resources/clientSideAccessTokens/client/Client.d.ts +6 -3
- package/dist/api/resources/clientSideAccessTokens/client/Client.js +46 -22
- package/dist/api/resources/embeddingModels/client/Client.d.ts +2 -1
- package/dist/api/resources/embeddingModels/client/Client.js +18 -9
- package/dist/api/resources/folders/client/Client.d.ts +18 -9
- package/dist/api/resources/folders/client/Client.js +154 -76
- package/dist/api/resources/folders/resources/files/client/Client.d.ts +6 -3
- package/dist/api/resources/folders/resources/files/client/Client.js +48 -24
- package/dist/api/resources/folders/resources/passages/client/Client.d.ts +2 -1
- package/dist/api/resources/folders/resources/passages/client/Client.js +19 -10
- package/dist/api/resources/groups/client/Client.d.ts +12 -6
- package/dist/api/resources/groups/client/Client.js +105 -52
- package/dist/api/resources/groups/resources/messages/client/Client.d.ts +10 -5
- package/dist/api/resources/groups/resources/messages/client/Client.js +91 -49
- package/dist/api/resources/health/client/Client.d.ts +2 -1
- package/dist/api/resources/health/client/Client.js +17 -8
- package/dist/api/resources/identities/client/Client.d.ts +14 -7
- package/dist/api/resources/identities/client/Client.js +123 -61
- package/dist/api/resources/identities/resources/properties/client/Client.d.ts +2 -1
- package/dist/api/resources/identities/resources/properties/client/Client.js +9 -3
- package/dist/api/resources/jobs/client/Client.d.ts +10 -5
- package/dist/api/resources/jobs/client/Client.js +92 -47
- package/dist/api/resources/messages/client/Client.d.ts +2 -1
- package/dist/api/resources/messages/client/Client.js +19 -10
- package/dist/api/resources/models/client/Client.d.ts +2 -1
- package/dist/api/resources/models/client/Client.js +27 -14
- package/dist/api/resources/projects/client/Client.d.ts +2 -1
- package/dist/api/resources/projects/client/Client.js +18 -9
- package/dist/api/resources/providers/client/Client.d.ts +10 -5
- package/dist/api/resources/providers/client/Client.js +77 -36
- package/dist/api/resources/runs/client/Client.d.ts +8 -4
- package/dist/api/resources/runs/client/Client.js +74 -38
- package/dist/api/resources/runs/resources/messages/client/Client.d.ts +2 -1
- package/dist/api/resources/runs/resources/messages/client/Client.js +21 -12
- package/dist/api/resources/runs/resources/steps/client/Client.d.ts +2 -1
- package/dist/api/resources/runs/resources/steps/client/Client.js +19 -10
- package/dist/api/resources/runs/resources/usage/client/Client.d.ts +2 -1
- package/dist/api/resources/runs/resources/usage/client/Client.js +18 -9
- package/dist/api/resources/sources/client/Client.d.ts +20 -10
- package/dist/api/resources/sources/client/Client.js +173 -86
- package/dist/api/resources/sources/resources/files/client/Client.d.ts +6 -3
- package/dist/api/resources/sources/resources/files/client/Client.js +48 -24
- package/dist/api/resources/sources/resources/passages/client/Client.d.ts +2 -1
- package/dist/api/resources/sources/resources/passages/client/Client.js +19 -10
- package/dist/api/resources/steps/client/Client.d.ts +4 -2
- package/dist/api/resources/steps/client/Client.js +41 -21
- package/dist/api/resources/steps/resources/feedback/client/Client.d.ts +2 -1
- package/dist/api/resources/steps/resources/feedback/client/Client.js +23 -12
- package/dist/api/resources/tags/client/Client.d.ts +2 -1
- package/dist/api/resources/tags/client/Client.js +19 -10
- package/dist/api/resources/telemetry/client/Client.d.ts +2 -1
- package/dist/api/resources/telemetry/client/Client.js +18 -9
- package/dist/api/resources/templates/client/Client.d.ts +2 -1
- package/dist/api/resources/templates/client/Client.js +18 -9
- package/dist/api/resources/templates/resources/agents/client/Client.d.ts +2 -1
- package/dist/api/resources/templates/resources/agents/client/Client.js +19 -10
- package/dist/api/resources/tools/client/Client.d.ts +40 -20
- package/dist/api/resources/tools/client/Client.js +356 -182
- package/dist/api/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -0
- package/dist/api/resources/tools/client/requests/ToolUpdate.d.ts +2 -0
- package/dist/api/resources/voice/client/Client.d.ts +2 -1
- package/dist/api/resources/voice/client/Client.js +9 -3
- package/dist/api/types/AgentState.d.ts +2 -0
- package/dist/api/types/EmbeddingConfig.d.ts +1 -11
- package/dist/api/types/LettaStreamingRequest.d.ts +2 -0
- package/dist/api/types/LlmConfig.d.ts +1 -11
- package/dist/api/types/ModalSandboxConfig.d.ts +4 -0
- package/dist/api/types/ModalSandboxConfigLanguage.d.ts +8 -0
- package/dist/api/types/ModalSandboxConfigLanguage.js +10 -0
- package/dist/api/types/NpmRequirement.d.ts +9 -0
- package/dist/api/types/NpmRequirement.js +5 -0
- package/dist/api/types/Passage.d.ts +4 -4
- package/dist/api/types/Tool.d.ts +2 -0
- package/dist/api/types/ToolCreate.d.ts +2 -0
- package/dist/api/types/ToolType.d.ts +2 -1
- package/dist/api/types/ToolType.js +1 -0
- package/dist/api/types/index.d.ts +2 -0
- package/dist/api/types/index.js +2 -0
- package/dist/core/fetcher/APIResponse.d.ts +10 -0
- package/dist/core/fetcher/Fetcher.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.js +11 -3
- package/dist/core/fetcher/Headers.d.ts +2 -0
- package/dist/core/fetcher/Headers.js +84 -0
- package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/dist/core/fetcher/HttpResponsePromise.js +103 -0
- package/dist/core/fetcher/RawResponse.d.ts +29 -0
- package/dist/core/fetcher/RawResponse.js +44 -0
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
- package/dist/core/fetcher/getRequestBody.js +2 -1
- package/dist/core/fetcher/index.d.ts +3 -0
- package/dist/core/fetcher/index.js +7 -1
- package/dist/core/fetcher/requestWithRetries.js +1 -1
- package/dist/core/form-data-utils/FormDataWrapper.d.ts +3 -0
- package/dist/core/form-data-utils/FormDataWrapper.js +53 -10
- package/dist/core/form-data-utils/encodeAsFormParameter.d.ts +4 -0
- package/dist/core/form-data-utils/encodeAsFormParameter.js +18 -0
- package/dist/core/form-data-utils/index.d.ts +1 -0
- package/dist/core/form-data-utils/index.js +3 -0
- package/dist/core/json.d.ts +15 -0
- package/dist/core/json.js +24 -0
- package/dist/core/schemas/Schema.d.ts +2 -0
- package/dist/core/schemas/Schema.js +2 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +1 -1
- package/dist/core/schemas/builders/bigint/bigint.js +21 -17
- package/dist/core/schemas/builders/object/object.js +1 -0
- package/dist/core/schemas/builders/record/record.js +1 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +64 -0
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +1 -1
- package/dist/errors/LettaError.d.ts +4 -1
- package/dist/errors/LettaError.js +6 -8
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -0
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -0
- package/dist/serialization/resources/agents/client/requests/UpdateAgent.d.ts +1 -0
- package/dist/serialization/resources/agents/client/requests/UpdateAgent.js +1 -0
- package/dist/serialization/resources/agents/resources/passages/client/requests/PassageUpdate.d.ts +1 -1
- package/dist/serialization/resources/agents/resources/passages/client/requests/PassageUpdate.js +1 -1
- package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -0
- package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.js +2 -0
- package/dist/serialization/resources/tools/client/requests/ToolUpdate.d.ts +2 -0
- package/dist/serialization/resources/tools/client/requests/ToolUpdate.js +2 -0
- package/dist/serialization/types/AgentState.d.ts +1 -0
- package/dist/serialization/types/AgentState.js +1 -0
- package/dist/serialization/types/LettaStreamingRequest.d.ts +1 -0
- package/dist/serialization/types/LettaStreamingRequest.js +1 -0
- package/dist/serialization/types/ModalSandboxConfig.d.ts +3 -0
- package/dist/serialization/types/ModalSandboxConfig.js +3 -0
- package/dist/serialization/types/ModalSandboxConfigLanguage.d.ts +10 -0
- package/dist/serialization/types/ModalSandboxConfigLanguage.js +41 -0
- package/dist/serialization/types/NpmRequirement.d.ts +13 -0
- package/dist/serialization/types/NpmRequirement.js +44 -0
- package/dist/serialization/types/Passage.d.ts +1 -1
- package/dist/serialization/types/Passage.js +1 -1
- package/dist/serialization/types/Tool.d.ts +2 -0
- package/dist/serialization/types/Tool.js +2 -0
- package/dist/serialization/types/ToolCreate.d.ts +2 -0
- package/dist/serialization/types/ToolCreate.js +2 -0
- package/dist/serialization/types/ToolType.d.ts +1 -1
- package/dist/serialization/types/ToolType.js +1 -0
- 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/errors/LettaError.d.ts +4 -1
- package/errors/LettaError.js +6 -8
- package/package.json +4 -4
- package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -0
- package/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -0
- package/serialization/resources/agents/client/requests/UpdateAgent.d.ts +1 -0
- package/serialization/resources/agents/client/requests/UpdateAgent.js +1 -0
- package/serialization/resources/agents/resources/passages/client/requests/PassageUpdate.d.ts +1 -1
- package/serialization/resources/agents/resources/passages/client/requests/PassageUpdate.js +1 -1
- package/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -0
- package/serialization/resources/tools/client/requests/ToolRunFromSource.js +2 -0
- package/serialization/resources/tools/client/requests/ToolUpdate.d.ts +2 -0
- package/serialization/resources/tools/client/requests/ToolUpdate.js +2 -0
- package/serialization/types/AgentState.d.ts +1 -0
- package/serialization/types/AgentState.js +1 -0
- package/serialization/types/LettaStreamingRequest.d.ts +1 -0
- package/serialization/types/LettaStreamingRequest.js +1 -0
- package/serialization/types/ModalSandboxConfig.d.ts +3 -0
- package/serialization/types/ModalSandboxConfig.js +3 -0
- package/serialization/types/ModalSandboxConfigLanguage.d.ts +10 -0
- package/serialization/types/ModalSandboxConfigLanguage.js +41 -0
- package/serialization/types/NpmRequirement.d.ts +13 -0
- package/serialization/types/NpmRequirement.js +44 -0
- package/serialization/types/Passage.d.ts +1 -1
- package/serialization/types/Passage.js +1 -1
- package/serialization/types/Tool.d.ts +2 -0
- package/serialization/types/Tool.js +2 -0
- package/serialization/types/ToolCreate.d.ts +2 -0
- package/serialization/types/ToolCreate.js +2 -0
- package/serialization/types/ToolType.d.ts +1 -1
- package/serialization/types/ToolType.js +1 -0
- 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
|
@@ -71,7 +71,10 @@ class Passages {
|
|
|
71
71
|
* @example
|
|
72
72
|
* await client.agents.passages.list("agent_id")
|
|
73
73
|
*/
|
|
74
|
-
list(
|
|
74
|
+
list(agentId, request = {}, requestOptions) {
|
|
75
|
+
return core.HttpResponsePromise.fromPromise(this.__list(agentId, request, requestOptions));
|
|
76
|
+
}
|
|
77
|
+
__list(agentId_1) {
|
|
75
78
|
return __awaiter(this, arguments, void 0, function* (agentId, request = {}, requestOptions) {
|
|
76
79
|
var _a, _b, _c;
|
|
77
80
|
const { after, before, limit, search, ascending } = request;
|
|
@@ -96,7 +99,7 @@ class Passages {
|
|
|
96
99
|
method: "GET",
|
|
97
100
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
98
101
|
? yield core.Supplier.get(this._options.project)
|
|
99
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
102
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
100
103
|
contentType: "application/json",
|
|
101
104
|
queryParameters: _queryParams,
|
|
102
105
|
requestType: "json",
|
|
@@ -105,13 +108,16 @@ class Passages {
|
|
|
105
108
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
106
109
|
});
|
|
107
110
|
if (_response.ok) {
|
|
108
|
-
return
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
return {
|
|
112
|
+
data: serializers.agents.passages.list.Response.parseOrThrow(_response.body, {
|
|
113
|
+
unrecognizedObjectKeys: "passthrough",
|
|
114
|
+
allowUnrecognizedUnionMembers: true,
|
|
115
|
+
allowUnrecognizedEnumValues: true,
|
|
116
|
+
skipValidation: true,
|
|
117
|
+
breadcrumbsPrefix: ["response"],
|
|
118
|
+
}),
|
|
119
|
+
rawResponse: _response.rawResponse,
|
|
120
|
+
};
|
|
115
121
|
}
|
|
116
122
|
if (_response.error.reason === "status-code") {
|
|
117
123
|
switch (_response.error.statusCode) {
|
|
@@ -122,11 +128,12 @@ class Passages {
|
|
|
122
128
|
allowUnrecognizedEnumValues: true,
|
|
123
129
|
skipValidation: true,
|
|
124
130
|
breadcrumbsPrefix: ["response"],
|
|
125
|
-
}));
|
|
131
|
+
}), _response.rawResponse);
|
|
126
132
|
default:
|
|
127
133
|
throw new errors.LettaError({
|
|
128
134
|
statusCode: _response.error.statusCode,
|
|
129
135
|
body: _response.error.body,
|
|
136
|
+
rawResponse: _response.rawResponse,
|
|
130
137
|
});
|
|
131
138
|
}
|
|
132
139
|
}
|
|
@@ -135,12 +142,14 @@ class Passages {
|
|
|
135
142
|
throw new errors.LettaError({
|
|
136
143
|
statusCode: _response.error.statusCode,
|
|
137
144
|
body: _response.error.rawBody,
|
|
145
|
+
rawResponse: _response.rawResponse,
|
|
138
146
|
});
|
|
139
147
|
case "timeout":
|
|
140
148
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/archival-memory.");
|
|
141
149
|
case "unknown":
|
|
142
150
|
throw new errors.LettaError({
|
|
143
151
|
message: _response.error.errorMessage,
|
|
152
|
+
rawResponse: _response.rawResponse,
|
|
144
153
|
});
|
|
145
154
|
}
|
|
146
155
|
});
|
|
@@ -160,6 +169,9 @@ class Passages {
|
|
|
160
169
|
* })
|
|
161
170
|
*/
|
|
162
171
|
create(agentId, request, requestOptions) {
|
|
172
|
+
return core.HttpResponsePromise.fromPromise(this.__create(agentId, request, requestOptions));
|
|
173
|
+
}
|
|
174
|
+
__create(agentId, request, requestOptions) {
|
|
163
175
|
return __awaiter(this, void 0, void 0, function* () {
|
|
164
176
|
var _a, _b, _c;
|
|
165
177
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -167,7 +179,7 @@ class Passages {
|
|
|
167
179
|
method: "POST",
|
|
168
180
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
169
181
|
? yield core.Supplier.get(this._options.project)
|
|
170
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
182
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
171
183
|
contentType: "application/json",
|
|
172
184
|
requestType: "json",
|
|
173
185
|
body: serializers.agents.CreateArchivalMemory.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -176,13 +188,16 @@ class Passages {
|
|
|
176
188
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
177
189
|
});
|
|
178
190
|
if (_response.ok) {
|
|
179
|
-
return
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
191
|
+
return {
|
|
192
|
+
data: serializers.agents.passages.create.Response.parseOrThrow(_response.body, {
|
|
193
|
+
unrecognizedObjectKeys: "passthrough",
|
|
194
|
+
allowUnrecognizedUnionMembers: true,
|
|
195
|
+
allowUnrecognizedEnumValues: true,
|
|
196
|
+
skipValidation: true,
|
|
197
|
+
breadcrumbsPrefix: ["response"],
|
|
198
|
+
}),
|
|
199
|
+
rawResponse: _response.rawResponse,
|
|
200
|
+
};
|
|
186
201
|
}
|
|
187
202
|
if (_response.error.reason === "status-code") {
|
|
188
203
|
switch (_response.error.statusCode) {
|
|
@@ -193,11 +208,12 @@ class Passages {
|
|
|
193
208
|
allowUnrecognizedEnumValues: true,
|
|
194
209
|
skipValidation: true,
|
|
195
210
|
breadcrumbsPrefix: ["response"],
|
|
196
|
-
}));
|
|
211
|
+
}), _response.rawResponse);
|
|
197
212
|
default:
|
|
198
213
|
throw new errors.LettaError({
|
|
199
214
|
statusCode: _response.error.statusCode,
|
|
200
215
|
body: _response.error.body,
|
|
216
|
+
rawResponse: _response.rawResponse,
|
|
201
217
|
});
|
|
202
218
|
}
|
|
203
219
|
}
|
|
@@ -206,12 +222,14 @@ class Passages {
|
|
|
206
222
|
throw new errors.LettaError({
|
|
207
223
|
statusCode: _response.error.statusCode,
|
|
208
224
|
body: _response.error.rawBody,
|
|
225
|
+
rawResponse: _response.rawResponse,
|
|
209
226
|
});
|
|
210
227
|
case "timeout":
|
|
211
228
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/archival-memory.");
|
|
212
229
|
case "unknown":
|
|
213
230
|
throw new errors.LettaError({
|
|
214
231
|
message: _response.error.errorMessage,
|
|
232
|
+
rawResponse: _response.rawResponse,
|
|
215
233
|
});
|
|
216
234
|
}
|
|
217
235
|
});
|
|
@@ -229,6 +247,9 @@ class Passages {
|
|
|
229
247
|
* await client.agents.passages.delete("agent_id", "memory_id")
|
|
230
248
|
*/
|
|
231
249
|
delete(agentId, memoryId, requestOptions) {
|
|
250
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(agentId, memoryId, requestOptions));
|
|
251
|
+
}
|
|
252
|
+
__delete(agentId, memoryId, requestOptions) {
|
|
232
253
|
return __awaiter(this, void 0, void 0, function* () {
|
|
233
254
|
var _a, _b, _c;
|
|
234
255
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -236,7 +257,7 @@ class Passages {
|
|
|
236
257
|
method: "DELETE",
|
|
237
258
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
238
259
|
? yield core.Supplier.get(this._options.project)
|
|
239
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
260
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
240
261
|
contentType: "application/json",
|
|
241
262
|
requestType: "json",
|
|
242
263
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -244,7 +265,7 @@ class Passages {
|
|
|
244
265
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
245
266
|
});
|
|
246
267
|
if (_response.ok) {
|
|
247
|
-
return _response.body;
|
|
268
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
248
269
|
}
|
|
249
270
|
if (_response.error.reason === "status-code") {
|
|
250
271
|
switch (_response.error.statusCode) {
|
|
@@ -255,11 +276,12 @@ class Passages {
|
|
|
255
276
|
allowUnrecognizedEnumValues: true,
|
|
256
277
|
skipValidation: true,
|
|
257
278
|
breadcrumbsPrefix: ["response"],
|
|
258
|
-
}));
|
|
279
|
+
}), _response.rawResponse);
|
|
259
280
|
default:
|
|
260
281
|
throw new errors.LettaError({
|
|
261
282
|
statusCode: _response.error.statusCode,
|
|
262
283
|
body: _response.error.body,
|
|
284
|
+
rawResponse: _response.rawResponse,
|
|
263
285
|
});
|
|
264
286
|
}
|
|
265
287
|
}
|
|
@@ -268,12 +290,14 @@ class Passages {
|
|
|
268
290
|
throw new errors.LettaError({
|
|
269
291
|
statusCode: _response.error.statusCode,
|
|
270
292
|
body: _response.error.rawBody,
|
|
293
|
+
rawResponse: _response.rawResponse,
|
|
271
294
|
});
|
|
272
295
|
case "timeout":
|
|
273
296
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling DELETE /v1/agents/{agent_id}/archival-memory/{memory_id}.");
|
|
274
297
|
case "unknown":
|
|
275
298
|
throw new errors.LettaError({
|
|
276
299
|
message: _response.error.errorMessage,
|
|
300
|
+
rawResponse: _response.rawResponse,
|
|
277
301
|
});
|
|
278
302
|
}
|
|
279
303
|
});
|
|
@@ -294,6 +318,9 @@ class Passages {
|
|
|
294
318
|
* })
|
|
295
319
|
*/
|
|
296
320
|
modify(agentId, memoryId, request, requestOptions) {
|
|
321
|
+
return core.HttpResponsePromise.fromPromise(this.__modify(agentId, memoryId, request, requestOptions));
|
|
322
|
+
}
|
|
323
|
+
__modify(agentId, memoryId, request, requestOptions) {
|
|
297
324
|
return __awaiter(this, void 0, void 0, function* () {
|
|
298
325
|
var _a, _b, _c;
|
|
299
326
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -301,7 +328,7 @@ class Passages {
|
|
|
301
328
|
method: "PATCH",
|
|
302
329
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
303
330
|
? yield core.Supplier.get(this._options.project)
|
|
304
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
331
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
305
332
|
contentType: "application/json",
|
|
306
333
|
requestType: "json",
|
|
307
334
|
body: serializers.agents.PassageUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -310,13 +337,16 @@ class Passages {
|
|
|
310
337
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
311
338
|
});
|
|
312
339
|
if (_response.ok) {
|
|
313
|
-
return
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
340
|
+
return {
|
|
341
|
+
data: serializers.agents.passages.modify.Response.parseOrThrow(_response.body, {
|
|
342
|
+
unrecognizedObjectKeys: "passthrough",
|
|
343
|
+
allowUnrecognizedUnionMembers: true,
|
|
344
|
+
allowUnrecognizedEnumValues: true,
|
|
345
|
+
skipValidation: true,
|
|
346
|
+
breadcrumbsPrefix: ["response"],
|
|
347
|
+
}),
|
|
348
|
+
rawResponse: _response.rawResponse,
|
|
349
|
+
};
|
|
320
350
|
}
|
|
321
351
|
if (_response.error.reason === "status-code") {
|
|
322
352
|
switch (_response.error.statusCode) {
|
|
@@ -327,11 +357,12 @@ class Passages {
|
|
|
327
357
|
allowUnrecognizedEnumValues: true,
|
|
328
358
|
skipValidation: true,
|
|
329
359
|
breadcrumbsPrefix: ["response"],
|
|
330
|
-
}));
|
|
360
|
+
}), _response.rawResponse);
|
|
331
361
|
default:
|
|
332
362
|
throw new errors.LettaError({
|
|
333
363
|
statusCode: _response.error.statusCode,
|
|
334
364
|
body: _response.error.body,
|
|
365
|
+
rawResponse: _response.rawResponse,
|
|
335
366
|
});
|
|
336
367
|
}
|
|
337
368
|
}
|
|
@@ -340,12 +371,14 @@ class Passages {
|
|
|
340
371
|
throw new errors.LettaError({
|
|
341
372
|
statusCode: _response.error.statusCode,
|
|
342
373
|
body: _response.error.rawBody,
|
|
374
|
+
rawResponse: _response.rawResponse,
|
|
343
375
|
});
|
|
344
376
|
case "timeout":
|
|
345
377
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/agents/{agent_id}/archival-memory/{memory_id}.");
|
|
346
378
|
case "unknown":
|
|
347
379
|
throw new errors.LettaError({
|
|
348
380
|
message: _response.error.errorMessage,
|
|
381
|
+
rawResponse: _response.rawResponse,
|
|
349
382
|
});
|
|
350
383
|
}
|
|
351
384
|
});
|
|
@@ -19,8 +19,8 @@ export interface PassageUpdate {
|
|
|
19
19
|
updatedAt?: Date;
|
|
20
20
|
/** Whether this passage is deleted or not. */
|
|
21
21
|
isDeleted?: boolean;
|
|
22
|
-
/** The unique identifier of the
|
|
23
|
-
|
|
22
|
+
/** The unique identifier of the archive containing this passage. */
|
|
23
|
+
archiveId?: string;
|
|
24
24
|
/** The data source of the passage. */
|
|
25
25
|
sourceId?: string;
|
|
26
26
|
/** The unique identifier of the file associated with the passage. */
|
|
@@ -42,7 +42,8 @@ export declare class Sources {
|
|
|
42
42
|
* @example
|
|
43
43
|
* await client.agents.sources.attach("agent_id", "source_id")
|
|
44
44
|
*/
|
|
45
|
-
attach(agentId: string, sourceId: string, requestOptions?: Sources.RequestOptions):
|
|
45
|
+
attach(agentId: string, sourceId: string, requestOptions?: Sources.RequestOptions): core.HttpResponsePromise<Letta.AgentState>;
|
|
46
|
+
private __attach;
|
|
46
47
|
/**
|
|
47
48
|
* Detach a source from an agent.
|
|
48
49
|
*
|
|
@@ -55,7 +56,8 @@ export declare class Sources {
|
|
|
55
56
|
* @example
|
|
56
57
|
* await client.agents.sources.detach("agent_id", "source_id")
|
|
57
58
|
*/
|
|
58
|
-
detach(agentId: string, sourceId: string, requestOptions?: Sources.RequestOptions):
|
|
59
|
+
detach(agentId: string, sourceId: string, requestOptions?: Sources.RequestOptions): core.HttpResponsePromise<Letta.AgentState>;
|
|
60
|
+
private __detach;
|
|
59
61
|
/**
|
|
60
62
|
* Get the sources associated with an agent.
|
|
61
63
|
*
|
|
@@ -67,7 +69,8 @@ export declare class Sources {
|
|
|
67
69
|
* @example
|
|
68
70
|
* await client.agents.sources.list("agent_id")
|
|
69
71
|
*/
|
|
70
|
-
list(agentId: string, requestOptions?: Sources.RequestOptions):
|
|
72
|
+
list(agentId: string, requestOptions?: Sources.RequestOptions): core.HttpResponsePromise<Letta.Source[]>;
|
|
73
|
+
private __list;
|
|
71
74
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
72
75
|
Authorization: string;
|
|
73
76
|
}>;
|
|
@@ -72,6 +72,9 @@ class Sources {
|
|
|
72
72
|
* await client.agents.sources.attach("agent_id", "source_id")
|
|
73
73
|
*/
|
|
74
74
|
attach(agentId, sourceId, requestOptions) {
|
|
75
|
+
return core.HttpResponsePromise.fromPromise(this.__attach(agentId, sourceId, requestOptions));
|
|
76
|
+
}
|
|
77
|
+
__attach(agentId, sourceId, requestOptions) {
|
|
75
78
|
return __awaiter(this, void 0, void 0, function* () {
|
|
76
79
|
var _a, _b, _c;
|
|
77
80
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -79,7 +82,7 @@ class Sources {
|
|
|
79
82
|
method: "PATCH",
|
|
80
83
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
81
84
|
? yield core.Supplier.get(this._options.project)
|
|
82
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
85
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
83
86
|
contentType: "application/json",
|
|
84
87
|
requestType: "json",
|
|
85
88
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -87,13 +90,16 @@ class Sources {
|
|
|
87
90
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
88
91
|
});
|
|
89
92
|
if (_response.ok) {
|
|
90
|
-
return
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
return {
|
|
94
|
+
data: serializers.AgentState.parseOrThrow(_response.body, {
|
|
95
|
+
unrecognizedObjectKeys: "passthrough",
|
|
96
|
+
allowUnrecognizedUnionMembers: true,
|
|
97
|
+
allowUnrecognizedEnumValues: true,
|
|
98
|
+
skipValidation: true,
|
|
99
|
+
breadcrumbsPrefix: ["response"],
|
|
100
|
+
}),
|
|
101
|
+
rawResponse: _response.rawResponse,
|
|
102
|
+
};
|
|
97
103
|
}
|
|
98
104
|
if (_response.error.reason === "status-code") {
|
|
99
105
|
switch (_response.error.statusCode) {
|
|
@@ -104,11 +110,12 @@ class Sources {
|
|
|
104
110
|
allowUnrecognizedEnumValues: true,
|
|
105
111
|
skipValidation: true,
|
|
106
112
|
breadcrumbsPrefix: ["response"],
|
|
107
|
-
}));
|
|
113
|
+
}), _response.rawResponse);
|
|
108
114
|
default:
|
|
109
115
|
throw new errors.LettaError({
|
|
110
116
|
statusCode: _response.error.statusCode,
|
|
111
117
|
body: _response.error.body,
|
|
118
|
+
rawResponse: _response.rawResponse,
|
|
112
119
|
});
|
|
113
120
|
}
|
|
114
121
|
}
|
|
@@ -117,12 +124,14 @@ class Sources {
|
|
|
117
124
|
throw new errors.LettaError({
|
|
118
125
|
statusCode: _response.error.statusCode,
|
|
119
126
|
body: _response.error.rawBody,
|
|
127
|
+
rawResponse: _response.rawResponse,
|
|
120
128
|
});
|
|
121
129
|
case "timeout":
|
|
122
130
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/agents/{agent_id}/sources/attach/{source_id}.");
|
|
123
131
|
case "unknown":
|
|
124
132
|
throw new errors.LettaError({
|
|
125
133
|
message: _response.error.errorMessage,
|
|
134
|
+
rawResponse: _response.rawResponse,
|
|
126
135
|
});
|
|
127
136
|
}
|
|
128
137
|
});
|
|
@@ -140,6 +149,9 @@ class Sources {
|
|
|
140
149
|
* await client.agents.sources.detach("agent_id", "source_id")
|
|
141
150
|
*/
|
|
142
151
|
detach(agentId, sourceId, requestOptions) {
|
|
152
|
+
return core.HttpResponsePromise.fromPromise(this.__detach(agentId, sourceId, requestOptions));
|
|
153
|
+
}
|
|
154
|
+
__detach(agentId, sourceId, requestOptions) {
|
|
143
155
|
return __awaiter(this, void 0, void 0, function* () {
|
|
144
156
|
var _a, _b, _c;
|
|
145
157
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -147,7 +159,7 @@ class Sources {
|
|
|
147
159
|
method: "PATCH",
|
|
148
160
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
149
161
|
? yield core.Supplier.get(this._options.project)
|
|
150
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
162
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
151
163
|
contentType: "application/json",
|
|
152
164
|
requestType: "json",
|
|
153
165
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -155,13 +167,16 @@ class Sources {
|
|
|
155
167
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
156
168
|
});
|
|
157
169
|
if (_response.ok) {
|
|
158
|
-
return
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
170
|
+
return {
|
|
171
|
+
data: serializers.AgentState.parseOrThrow(_response.body, {
|
|
172
|
+
unrecognizedObjectKeys: "passthrough",
|
|
173
|
+
allowUnrecognizedUnionMembers: true,
|
|
174
|
+
allowUnrecognizedEnumValues: true,
|
|
175
|
+
skipValidation: true,
|
|
176
|
+
breadcrumbsPrefix: ["response"],
|
|
177
|
+
}),
|
|
178
|
+
rawResponse: _response.rawResponse,
|
|
179
|
+
};
|
|
165
180
|
}
|
|
166
181
|
if (_response.error.reason === "status-code") {
|
|
167
182
|
switch (_response.error.statusCode) {
|
|
@@ -172,11 +187,12 @@ class Sources {
|
|
|
172
187
|
allowUnrecognizedEnumValues: true,
|
|
173
188
|
skipValidation: true,
|
|
174
189
|
breadcrumbsPrefix: ["response"],
|
|
175
|
-
}));
|
|
190
|
+
}), _response.rawResponse);
|
|
176
191
|
default:
|
|
177
192
|
throw new errors.LettaError({
|
|
178
193
|
statusCode: _response.error.statusCode,
|
|
179
194
|
body: _response.error.body,
|
|
195
|
+
rawResponse: _response.rawResponse,
|
|
180
196
|
});
|
|
181
197
|
}
|
|
182
198
|
}
|
|
@@ -185,12 +201,14 @@ class Sources {
|
|
|
185
201
|
throw new errors.LettaError({
|
|
186
202
|
statusCode: _response.error.statusCode,
|
|
187
203
|
body: _response.error.rawBody,
|
|
204
|
+
rawResponse: _response.rawResponse,
|
|
188
205
|
});
|
|
189
206
|
case "timeout":
|
|
190
207
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/agents/{agent_id}/sources/detach/{source_id}.");
|
|
191
208
|
case "unknown":
|
|
192
209
|
throw new errors.LettaError({
|
|
193
210
|
message: _response.error.errorMessage,
|
|
211
|
+
rawResponse: _response.rawResponse,
|
|
194
212
|
});
|
|
195
213
|
}
|
|
196
214
|
});
|
|
@@ -207,6 +225,9 @@ class Sources {
|
|
|
207
225
|
* await client.agents.sources.list("agent_id")
|
|
208
226
|
*/
|
|
209
227
|
list(agentId, requestOptions) {
|
|
228
|
+
return core.HttpResponsePromise.fromPromise(this.__list(agentId, requestOptions));
|
|
229
|
+
}
|
|
230
|
+
__list(agentId, requestOptions) {
|
|
210
231
|
return __awaiter(this, void 0, void 0, function* () {
|
|
211
232
|
var _a, _b, _c;
|
|
212
233
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -214,7 +235,7 @@ class Sources {
|
|
|
214
235
|
method: "GET",
|
|
215
236
|
headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
|
|
216
237
|
? yield core.Supplier.get(this._options.project)
|
|
217
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
238
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.173", "User-Agent": "@letta-ai/letta-client/0.1.173", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
218
239
|
contentType: "application/json",
|
|
219
240
|
requestType: "json",
|
|
220
241
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -222,13 +243,16 @@ class Sources {
|
|
|
222
243
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
223
244
|
});
|
|
224
245
|
if (_response.ok) {
|
|
225
|
-
return
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
246
|
+
return {
|
|
247
|
+
data: serializers.agents.sources.list.Response.parseOrThrow(_response.body, {
|
|
248
|
+
unrecognizedObjectKeys: "passthrough",
|
|
249
|
+
allowUnrecognizedUnionMembers: true,
|
|
250
|
+
allowUnrecognizedEnumValues: true,
|
|
251
|
+
skipValidation: true,
|
|
252
|
+
breadcrumbsPrefix: ["response"],
|
|
253
|
+
}),
|
|
254
|
+
rawResponse: _response.rawResponse,
|
|
255
|
+
};
|
|
232
256
|
}
|
|
233
257
|
if (_response.error.reason === "status-code") {
|
|
234
258
|
switch (_response.error.statusCode) {
|
|
@@ -239,11 +263,12 @@ class Sources {
|
|
|
239
263
|
allowUnrecognizedEnumValues: true,
|
|
240
264
|
skipValidation: true,
|
|
241
265
|
breadcrumbsPrefix: ["response"],
|
|
242
|
-
}));
|
|
266
|
+
}), _response.rawResponse);
|
|
243
267
|
default:
|
|
244
268
|
throw new errors.LettaError({
|
|
245
269
|
statusCode: _response.error.statusCode,
|
|
246
270
|
body: _response.error.body,
|
|
271
|
+
rawResponse: _response.rawResponse,
|
|
247
272
|
});
|
|
248
273
|
}
|
|
249
274
|
}
|
|
@@ -252,12 +277,14 @@ class Sources {
|
|
|
252
277
|
throw new errors.LettaError({
|
|
253
278
|
statusCode: _response.error.statusCode,
|
|
254
279
|
body: _response.error.rawBody,
|
|
280
|
+
rawResponse: _response.rawResponse,
|
|
255
281
|
});
|
|
256
282
|
case "timeout":
|
|
257
283
|
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/sources.");
|
|
258
284
|
case "unknown":
|
|
259
285
|
throw new errors.LettaError({
|
|
260
286
|
message: _response.error.errorMessage,
|
|
287
|
+
rawResponse: _response.rawResponse,
|
|
261
288
|
});
|
|
262
289
|
}
|
|
263
290
|
});
|
|
@@ -45,7 +45,8 @@ export declare class Templates {
|
|
|
45
45
|
* @example
|
|
46
46
|
* await client.agents.templates.createVersion("agent_id")
|
|
47
47
|
*/
|
|
48
|
-
createVersion(agentId: string, request?: Letta.agents.TemplatesCreateVersionRequest, requestOptions?: Templates.RequestOptions):
|
|
48
|
+
createVersion(agentId: string, request?: Letta.agents.TemplatesCreateVersionRequest, requestOptions?: Templates.RequestOptions): core.HttpResponsePromise<void>;
|
|
49
|
+
private __createVersion;
|
|
49
50
|
/**
|
|
50
51
|
* <Note>This endpoint is only available on Letta Cloud.</Note>
|
|
51
52
|
*
|
|
@@ -65,7 +66,8 @@ export declare class Templates {
|
|
|
65
66
|
* preserveCoreMemories: true
|
|
66
67
|
* })
|
|
67
68
|
*/
|
|
68
|
-
migrate(agentId: string, request: Letta.agents.TemplatesMigrateRequest, requestOptions?: Templates.RequestOptions):
|
|
69
|
+
migrate(agentId: string, request: Letta.agents.TemplatesMigrateRequest, requestOptions?: Templates.RequestOptions): core.HttpResponsePromise<Letta.agents.TemplatesMigrateResponse>;
|
|
70
|
+
private __migrate;
|
|
69
71
|
/**
|
|
70
72
|
* <Note>This endpoint is only available on Letta Cloud.</Note>
|
|
71
73
|
*
|
|
@@ -80,7 +82,8 @@ export declare class Templates {
|
|
|
80
82
|
* @example
|
|
81
83
|
* await client.agents.templates.create("agent_id")
|
|
82
84
|
*/
|
|
83
|
-
create(agentId: string, request?: Letta.agents.TemplatesCreateRequest, requestOptions?: Templates.RequestOptions):
|
|
85
|
+
create(agentId: string, request?: Letta.agents.TemplatesCreateRequest, requestOptions?: Templates.RequestOptions): core.HttpResponsePromise<Letta.agents.TemplatesCreateResponse>;
|
|
86
|
+
private __create;
|
|
84
87
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
85
88
|
Authorization: string;
|
|
86
89
|
}>;
|