agora-agents 2.0.0
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 +202 -0
- package/dist/cjs/AgoraPoolClient.d.ts +130 -0
- package/dist/cjs/AgoraPoolClient.js +174 -0
- package/dist/cjs/BaseClient.d.ts +36 -0
- package/dist/cjs/BaseClient.js +50 -0
- package/dist/cjs/Client.d.ts +23 -0
- package/dist/cjs/Client.js +31 -0
- package/dist/cjs/agentkit/Agent.d.ts +415 -0
- package/dist/cjs/agentkit/Agent.js +645 -0
- package/dist/cjs/agentkit/AgentSession.d.ts +271 -0
- package/dist/cjs/agentkit/AgentSession.js +629 -0
- package/dist/cjs/agentkit/__tests__/type-safety.test.d.ts +14 -0
- package/dist/cjs/agentkit/__tests__/type-safety.test.js +294 -0
- package/dist/cjs/agentkit/avatar-types.d.ts +201 -0
- package/dist/cjs/agentkit/avatar-types.js +171 -0
- package/dist/cjs/agentkit/constants.d.ts +68 -0
- package/dist/cjs/agentkit/constants.js +72 -0
- package/dist/cjs/agentkit/index.d.ts +45 -0
- package/dist/cjs/agentkit/index.js +135 -0
- package/dist/cjs/agentkit/presets.d.ts +39 -0
- package/dist/cjs/agentkit/presets.js +204 -0
- package/dist/cjs/agentkit/token.d.ts +95 -0
- package/dist/cjs/agentkit/token.js +132 -0
- package/dist/cjs/agentkit/types.d.ts +517 -0
- package/dist/cjs/agentkit/types.js +6 -0
- package/dist/cjs/agentkit/vendors/avatar.d.ts +223 -0
- package/dist/cjs/agentkit/vendors/avatar.js +241 -0
- package/dist/cjs/agentkit/vendors/base.d.ts +157 -0
- package/dist/cjs/agentkit/vendors/base.js +81 -0
- package/dist/cjs/agentkit/vendors/llm.d.ts +300 -0
- package/dist/cjs/agentkit/vendors/llm.js +277 -0
- package/dist/cjs/agentkit/vendors/mllm.d.ts +207 -0
- package/dist/cjs/agentkit/vendors/mllm.js +126 -0
- package/dist/cjs/agentkit/vendors/stt.d.ts +272 -0
- package/dist/cjs/agentkit/vendors/stt.js +244 -0
- package/dist/cjs/agentkit/vendors/tts.d.ts +456 -0
- package/dist/cjs/agentkit/vendors/tts.js +313 -0
- package/dist/cjs/api/index.d.ts +2 -0
- package/dist/cjs/api/index.js +18 -0
- package/dist/cjs/api/resources/agentManagement/client/Client.d.ts +48 -0
- package/dist/cjs/api/resources/agentManagement/client/Client.js +165 -0
- package/dist/cjs/api/resources/agentManagement/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/agentManagement/client/index.js +17 -0
- package/dist/cjs/api/resources/agentManagement/client/requests/AgentThinkAgentManagementRequest.d.ts +85 -0
- package/dist/cjs/api/resources/agentManagement/client/requests/AgentThinkAgentManagementRequest.js +36 -0
- package/dist/cjs/api/resources/agentManagement/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/agentManagement/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/agentManagement/index.d.ts +2 -0
- package/dist/cjs/api/resources/agentManagement/index.js +18 -0
- package/dist/cjs/api/resources/agentManagement/types/AgentThinkAgentManagementResponse.d.ts +8 -0
- package/dist/cjs/api/resources/agentManagement/types/AgentThinkAgentManagementResponse.js +3 -0
- package/dist/cjs/api/resources/agentManagement/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/agentManagement/types/index.js +17 -0
- package/dist/cjs/api/resources/agents/client/Client.d.ts +208 -0
- package/dist/cjs/api/resources/agents/client/Client.js +724 -0
- package/dist/cjs/api/resources/agents/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/agents/client/index.js +17 -0
- package/dist/cjs/api/resources/agents/client/requests/GetAgentsRequest.d.ts +13 -0
- package/dist/cjs/api/resources/agents/client/requests/GetAgentsRequest.js +3 -0
- package/dist/cjs/api/resources/agents/client/requests/GetHistoryAgentsRequest.d.ts +13 -0
- package/dist/cjs/api/resources/agents/client/requests/GetHistoryAgentsRequest.js +3 -0
- package/dist/cjs/api/resources/agents/client/requests/GetTurnsAgentsRequest.d.ts +17 -0
- package/dist/cjs/api/resources/agents/client/requests/GetTurnsAgentsRequest.js +3 -0
- package/dist/cjs/api/resources/agents/client/requests/InterruptAgentsRequest.d.ts +13 -0
- package/dist/cjs/api/resources/agents/client/requests/InterruptAgentsRequest.js +3 -0
- package/dist/cjs/api/resources/agents/client/requests/ListAgentsRequest.d.ts +31 -0
- package/dist/cjs/api/resources/agents/client/requests/ListAgentsRequest.js +3 -0
- package/dist/cjs/api/resources/agents/client/requests/SpeakAgentsRequest.d.ts +45 -0
- package/dist/cjs/api/resources/agents/client/requests/SpeakAgentsRequest.js +18 -0
- package/dist/cjs/api/resources/agents/client/requests/StartAgentsRequest.d.ts +1048 -0
- package/dist/cjs/api/resources/agents/client/requests/StartAgentsRequest.js +335 -0
- package/dist/cjs/api/resources/agents/client/requests/StopAgentsRequest.d.ts +13 -0
- package/dist/cjs/api/resources/agents/client/requests/StopAgentsRequest.js +3 -0
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentsRequest.d.ts +62 -0
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentsRequest.js +3 -0
- package/dist/cjs/api/resources/agents/client/requests/index.d.ts +9 -0
- package/dist/cjs/api/resources/agents/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/agents/index.d.ts +2 -0
- package/dist/cjs/api/resources/agents/index.js +18 -0
- package/dist/cjs/api/resources/agents/types/GetAgentsResponse.d.ts +40 -0
- package/dist/cjs/api/resources/agents/types/GetAgentsResponse.js +24 -0
- package/dist/cjs/api/resources/agents/types/GetHistoryAgentsResponse.d.ts +37 -0
- package/dist/cjs/api/resources/agents/types/GetHistoryAgentsResponse.js +22 -0
- package/dist/cjs/api/resources/agents/types/GetTurnsAgentsResponse.d.ts +207 -0
- package/dist/cjs/api/resources/agents/types/GetTurnsAgentsResponse.js +45 -0
- package/dist/cjs/api/resources/agents/types/InterruptAgentsResponse.d.ts +8 -0
- package/dist/cjs/api/resources/agents/types/InterruptAgentsResponse.js +3 -0
- package/dist/cjs/api/resources/agents/types/ListAgentsRequestState.d.ts +10 -0
- package/dist/cjs/api/resources/agents/types/ListAgentsRequestState.js +13 -0
- package/dist/cjs/api/resources/agents/types/ListAgentsResponse.d.ts +53 -0
- package/dist/cjs/api/resources/agents/types/ListAgentsResponse.js +25 -0
- package/dist/cjs/api/resources/agents/types/SpeakAgentsResponse.d.ts +8 -0
- package/dist/cjs/api/resources/agents/types/SpeakAgentsResponse.js +3 -0
- package/dist/cjs/api/resources/agents/types/StartAgentsResponse.d.ts +36 -0
- package/dist/cjs/api/resources/agents/types/StartAgentsResponse.js +24 -0
- package/dist/cjs/api/resources/agents/types/UpdateAgentsResponse.d.ts +36 -0
- package/dist/cjs/api/resources/agents/types/UpdateAgentsResponse.js +24 -0
- package/dist/cjs/api/resources/agents/types/index.d.ts +9 -0
- package/dist/cjs/api/resources/agents/types/index.js +25 -0
- package/dist/cjs/api/resources/index.d.ts +12 -0
- package/dist/cjs/api/resources/index.js +51 -0
- package/dist/cjs/api/resources/phoneNumbers/client/Client.d.ts +97 -0
- package/dist/cjs/api/resources/phoneNumbers/client/Client.js +388 -0
- package/dist/cjs/api/resources/phoneNumbers/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/phoneNumbers/client/index.js +17 -0
- package/dist/cjs/api/resources/phoneNumbers/client/requests/AddPhoneNumbersRequest.d.ts +83 -0
- package/dist/cjs/api/resources/phoneNumbers/client/requests/AddPhoneNumbersRequest.js +16 -0
- package/dist/cjs/api/resources/phoneNumbers/client/requests/DeletePhoneNumbersRequest.d.ts +10 -0
- package/dist/cjs/api/resources/phoneNumbers/client/requests/DeletePhoneNumbersRequest.js +3 -0
- package/dist/cjs/api/resources/phoneNumbers/client/requests/GetPhoneNumbersRequest.d.ts +10 -0
- package/dist/cjs/api/resources/phoneNumbers/client/requests/GetPhoneNumbersRequest.js +3 -0
- package/dist/cjs/api/resources/phoneNumbers/client/requests/UpdatePhoneNumbersRequest.d.ts +36 -0
- package/dist/cjs/api/resources/phoneNumbers/client/requests/UpdatePhoneNumbersRequest.js +3 -0
- package/dist/cjs/api/resources/phoneNumbers/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/phoneNumbers/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/phoneNumbers/index.d.ts +2 -0
- package/dist/cjs/api/resources/phoneNumbers/index.js +18 -0
- package/dist/cjs/api/resources/phoneNumbers/types/AddPhoneNumbersResponse.d.ts +25 -0
- package/dist/cjs/api/resources/phoneNumbers/types/AddPhoneNumbersResponse.js +3 -0
- package/dist/cjs/api/resources/phoneNumbers/types/GetPhoneNumbersResponse.d.ts +43 -0
- package/dist/cjs/api/resources/phoneNumbers/types/GetPhoneNumbersResponse.js +16 -0
- package/dist/cjs/api/resources/phoneNumbers/types/ListPhoneNumbersResponseItem.d.ts +43 -0
- package/dist/cjs/api/resources/phoneNumbers/types/ListPhoneNumbersResponseItem.js +16 -0
- package/dist/cjs/api/resources/phoneNumbers/types/UpdatePhoneNumbersResponse.d.ts +43 -0
- package/dist/cjs/api/resources/phoneNumbers/types/UpdatePhoneNumbersResponse.js +16 -0
- package/dist/cjs/api/resources/phoneNumbers/types/index.d.ts +4 -0
- package/dist/cjs/api/resources/phoneNumbers/types/index.js +20 -0
- package/dist/cjs/api/resources/telephony/client/Client.d.ts +133 -0
- package/dist/cjs/api/resources/telephony/client/Client.js +416 -0
- package/dist/cjs/api/resources/telephony/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/telephony/client/index.js +17 -0
- package/dist/cjs/api/resources/telephony/client/requests/CallTelephonyRequest.d.ts +114 -0
- package/dist/cjs/api/resources/telephony/client/requests/CallTelephonyRequest.js +3 -0
- package/dist/cjs/api/resources/telephony/client/requests/GetTelephonyRequest.d.ts +13 -0
- package/dist/cjs/api/resources/telephony/client/requests/GetTelephonyRequest.js +3 -0
- package/dist/cjs/api/resources/telephony/client/requests/HangupTelephonyRequest.d.ts +13 -0
- package/dist/cjs/api/resources/telephony/client/requests/HangupTelephonyRequest.js +3 -0
- package/dist/cjs/api/resources/telephony/client/requests/ListTelephonyRequest.d.ts +29 -0
- package/dist/cjs/api/resources/telephony/client/requests/ListTelephonyRequest.js +3 -0
- package/dist/cjs/api/resources/telephony/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/telephony/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/telephony/index.d.ts +2 -0
- package/dist/cjs/api/resources/telephony/index.js +18 -0
- package/dist/cjs/api/resources/telephony/types/CallTelephonyResponse.d.ts +4 -0
- package/dist/cjs/api/resources/telephony/types/CallTelephonyResponse.js +3 -0
- package/dist/cjs/api/resources/telephony/types/GetTelephonyResponse.d.ts +69 -0
- package/dist/cjs/api/resources/telephony/types/GetTelephonyResponse.js +36 -0
- package/dist/cjs/api/resources/telephony/types/HangupTelephonyResponse.d.ts +1 -0
- package/dist/cjs/api/resources/telephony/types/HangupTelephonyResponse.js +3 -0
- package/dist/cjs/api/resources/telephony/types/ListTelephonyRequestType.d.ts +5 -0
- package/dist/cjs/api/resources/telephony/types/ListTelephonyRequestType.js +8 -0
- package/dist/cjs/api/resources/telephony/types/ListTelephonyResponse.d.ts +83 -0
- package/dist/cjs/api/resources/telephony/types/ListTelephonyResponse.js +34 -0
- package/dist/cjs/api/resources/telephony/types/index.d.ts +5 -0
- package/dist/cjs/api/resources/telephony/types/index.js +21 -0
- package/dist/cjs/api/types/AgentErrorResponse.d.ts +43 -0
- package/dist/cjs/api/types/AgentErrorResponse.js +25 -0
- package/dist/cjs/api/types/AmazonTts.d.ts +9 -0
- package/dist/cjs/api/types/AmazonTts.js +3 -0
- package/dist/cjs/api/types/AmazonTtsParams.d.ts +13 -0
- package/dist/cjs/api/types/AmazonTtsParams.js +3 -0
- package/dist/cjs/api/types/CartesiaTts.d.ts +9 -0
- package/dist/cjs/api/types/CartesiaTts.js +3 -0
- package/dist/cjs/api/types/CartesiaTtsParams.d.ts +13 -0
- package/dist/cjs/api/types/CartesiaTtsParams.js +3 -0
- package/dist/cjs/api/types/CartesiaTtsVoice.d.ts +9 -0
- package/dist/cjs/api/types/CartesiaTtsVoice.js +3 -0
- package/dist/cjs/api/types/DeepgramTts.d.ts +9 -0
- package/dist/cjs/api/types/DeepgramTts.js +3 -0
- package/dist/cjs/api/types/DeepgramTtsParams.d.ts +17 -0
- package/dist/cjs/api/types/DeepgramTtsParams.js +3 -0
- package/dist/cjs/api/types/ElevenLabsTts.d.ts +9 -0
- package/dist/cjs/api/types/ElevenLabsTts.js +3 -0
- package/dist/cjs/api/types/ElevenLabsTtsParams.d.ts +15 -0
- package/dist/cjs/api/types/ElevenLabsTtsParams.js +3 -0
- package/dist/cjs/api/types/FishAudioTts.d.ts +9 -0
- package/dist/cjs/api/types/FishAudioTts.js +3 -0
- package/dist/cjs/api/types/FishAudioTtsParams.d.ts +9 -0
- package/dist/cjs/api/types/FishAudioTtsParams.js +3 -0
- package/dist/cjs/api/types/GoogleTts.d.ts +9 -0
- package/dist/cjs/api/types/GoogleTts.js +3 -0
- package/dist/cjs/api/types/GoogleTtsParams.d.ts +13 -0
- package/dist/cjs/api/types/GoogleTtsParams.js +3 -0
- package/dist/cjs/api/types/HumeAiTts.d.ts +9 -0
- package/dist/cjs/api/types/HumeAiTts.js +3 -0
- package/dist/cjs/api/types/HumeAiTtsParams.d.ts +9 -0
- package/dist/cjs/api/types/HumeAiTtsParams.js +3 -0
- package/dist/cjs/api/types/MicrosoftTts.d.ts +9 -0
- package/dist/cjs/api/types/MicrosoftTts.js +3 -0
- package/dist/cjs/api/types/MicrosoftTtsParams.d.ts +13 -0
- package/dist/cjs/api/types/MicrosoftTtsParams.js +3 -0
- package/dist/cjs/api/types/MinimaxTts.d.ts +9 -0
- package/dist/cjs/api/types/MinimaxTts.js +3 -0
- package/dist/cjs/api/types/MinimaxTtsParams.d.ts +20 -0
- package/dist/cjs/api/types/MinimaxTtsParams.js +3 -0
- package/dist/cjs/api/types/MurfTts.d.ts +9 -0
- package/dist/cjs/api/types/MurfTts.js +3 -0
- package/dist/cjs/api/types/MurfTtsParams.d.ts +11 -0
- package/dist/cjs/api/types/MurfTtsParams.js +3 -0
- package/dist/cjs/api/types/OpenAiTts.d.ts +9 -0
- package/dist/cjs/api/types/OpenAiTts.js +3 -0
- package/dist/cjs/api/types/OpenAiTtsParams.d.ts +11 -0
- package/dist/cjs/api/types/OpenAiTtsParams.js +3 -0
- package/dist/cjs/api/types/RimeTts.d.ts +9 -0
- package/dist/cjs/api/types/RimeTts.js +3 -0
- package/dist/cjs/api/types/RimeTtsParams.d.ts +11 -0
- package/dist/cjs/api/types/RimeTtsParams.js +3 -0
- package/dist/cjs/api/types/SarvamTts.d.ts +9 -0
- package/dist/cjs/api/types/SarvamTts.js +3 -0
- package/dist/cjs/api/types/SarvamTtsParams.d.ts +11 -0
- package/dist/cjs/api/types/SarvamTtsParams.js +3 -0
- package/dist/cjs/api/types/TelephonyErrorResponse.d.ts +11 -0
- package/dist/cjs/api/types/TelephonyErrorResponse.js +3 -0
- package/dist/cjs/api/types/Tts.d.ts +43 -0
- package/dist/cjs/api/types/Tts.js +3 -0
- package/dist/cjs/api/types/index.d.ts +30 -0
- package/dist/cjs/api/types/index.js +46 -0
- package/dist/cjs/core/auth/AuthProvider.d.ts +4 -0
- package/dist/cjs/core/auth/AuthProvider.js +2 -0
- package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
- package/dist/cjs/core/auth/AuthRequest.js +2 -0
- package/dist/cjs/core/auth/BasicAuth.d.ts +8 -0
- package/dist/cjs/core/auth/BasicAuth.js +27 -0
- package/dist/cjs/core/auth/BearerToken.d.ts +5 -0
- package/dist/cjs/core/auth/BearerToken.js +15 -0
- package/dist/cjs/core/auth/index.d.ts +4 -0
- package/dist/cjs/core/auth/index.js +7 -0
- package/dist/cjs/core/base64.d.ts +2 -0
- package/dist/cjs/core/base64.js +26 -0
- package/dist/cjs/core/domain/index.d.ts +78 -0
- package/dist/cjs/core/domain/index.js +195 -0
- package/dist/cjs/core/exports.d.ts +2 -0
- package/dist/cjs/core/exports.js +18 -0
- package/dist/cjs/core/fetcher/APIResponse.d.ts +20 -0
- package/dist/cjs/core/fetcher/APIResponse.js +2 -0
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +20 -0
- package/dist/cjs/core/fetcher/BinaryResponse.js +17 -0
- package/dist/cjs/core/fetcher/EndpointMetadata.d.ts +13 -0
- package/dist/cjs/core/fetcher/EndpointMetadata.js +2 -0
- package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +12 -0
- package/dist/cjs/core/fetcher/EndpointSupplier.js +22 -0
- package/dist/cjs/core/fetcher/Fetcher.d.ts +45 -0
- package/dist/cjs/core/fetcher/Fetcher.js +315 -0
- package/dist/cjs/core/fetcher/Headers.d.ts +2 -0
- package/dist/cjs/core/fetcher/Headers.js +84 -0
- package/dist/cjs/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/dist/cjs/core/fetcher/HttpResponsePromise.js +103 -0
- package/dist/cjs/core/fetcher/RawResponse.d.ts +29 -0
- package/dist/cjs/core/fetcher/RawResponse.js +44 -0
- package/dist/cjs/core/fetcher/ResponseWithBody.d.ts +4 -0
- package/dist/cjs/core/fetcher/ResponseWithBody.js +6 -0
- package/dist/cjs/core/fetcher/Supplier.d.ts +4 -0
- package/dist/cjs/core/fetcher/Supplier.js +22 -0
- package/dist/cjs/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/cjs/core/fetcher/createRequestUrl.js +8 -0
- package/dist/cjs/core/fetcher/getErrorResponseBody.d.ts +1 -0
- package/dist/cjs/core/fetcher/getErrorResponseBody.js +45 -0
- package/dist/cjs/core/fetcher/getFetchFn.d.ts +1 -0
- package/dist/cjs/core/fetcher/getFetchFn.js +17 -0
- package/dist/cjs/core/fetcher/getHeader.d.ts +1 -0
- package/dist/cjs/core/fetcher/getHeader.js +11 -0
- package/dist/cjs/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/cjs/core/fetcher/getRequestBody.js +27 -0
- package/dist/cjs/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/cjs/core/fetcher/getResponseBody.js +55 -0
- package/dist/cjs/core/fetcher/index.d.ts +11 -0
- package/dist/cjs/core/fetcher/index.js +17 -0
- package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -0
- package/dist/cjs/core/fetcher/makeRequest.js +40 -0
- package/dist/cjs/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/cjs/core/fetcher/requestWithRetries.js +67 -0
- package/dist/cjs/core/fetcher/signals.d.ts +5 -0
- package/dist/cjs/core/fetcher/signals.js +24 -0
- package/dist/cjs/core/headers.d.ts +2 -0
- package/dist/cjs/core/headers.js +31 -0
- package/dist/cjs/core/index.d.ts +8 -0
- package/dist/cjs/core/index.js +47 -0
- package/dist/cjs/core/json.d.ts +15 -0
- package/dist/cjs/core/json.js +24 -0
- package/dist/cjs/core/logging/exports.d.ts +18 -0
- package/dist/cjs/core/logging/exports.js +45 -0
- package/dist/cjs/core/logging/index.d.ts +1 -0
- package/dist/cjs/core/logging/index.js +17 -0
- package/dist/cjs/core/logging/logger.d.ts +126 -0
- package/dist/cjs/core/logging/logger.js +144 -0
- package/dist/cjs/core/pagination/Page.d.ts +33 -0
- package/dist/cjs/core/pagination/Page.js +101 -0
- package/dist/cjs/core/pagination/exports.d.ts +1 -0
- package/dist/cjs/core/pagination/exports.js +2 -0
- package/dist/cjs/core/pagination/index.d.ts +1 -0
- package/dist/cjs/core/pagination/index.js +5 -0
- package/dist/cjs/core/runtime/index.d.ts +1 -0
- package/dist/cjs/core/runtime/index.js +5 -0
- package/dist/cjs/core/runtime/runtime.d.ts +9 -0
- package/dist/cjs/core/runtime/runtime.js +102 -0
- package/dist/cjs/core/url/encodePathParam.d.ts +1 -0
- package/dist/cjs/core/url/encodePathParam.js +21 -0
- package/dist/cjs/core/url/index.d.ts +3 -0
- package/dist/cjs/core/url/index.js +9 -0
- package/dist/cjs/core/url/join.d.ts +1 -0
- package/dist/cjs/core/url/join.js +68 -0
- package/dist/cjs/core/url/qs.d.ts +6 -0
- package/dist/cjs/core/url/qs.js +64 -0
- package/dist/cjs/core/utils/index.d.ts +1 -0
- package/dist/cjs/core/utils/index.js +5 -0
- package/dist/cjs/core/utils/setObjectProperty.d.ts +11 -0
- package/dist/cjs/core/utils/setObjectProperty.js +42 -0
- package/dist/cjs/environments.d.ts +4 -0
- package/dist/cjs/environments.js +7 -0
- package/dist/cjs/errors/AgoraError.d.ts +12 -0
- package/dist/cjs/errors/AgoraError.js +28 -0
- package/dist/cjs/errors/AgoraTimeoutError.d.ts +3 -0
- package/dist/cjs/errors/AgoraTimeoutError.js +11 -0
- package/dist/cjs/errors/index.d.ts +2 -0
- package/dist/cjs/errors/index.js +7 -0
- package/dist/cjs/exports.d.ts +1 -0
- package/dist/cjs/exports.js +17 -0
- package/dist/cjs/index.d.ts +10 -0
- package/dist/cjs/index.js +149 -0
- package/dist/cjs/version.d.ts +1 -0
- package/dist/cjs/version.js +4 -0
- package/dist/esm/AgoraPoolClient.d.mts +130 -0
- package/dist/esm/AgoraPoolClient.mjs +170 -0
- package/dist/esm/BaseClient.d.mts +36 -0
- package/dist/esm/BaseClient.mjs +14 -0
- package/dist/esm/Client.d.mts +23 -0
- package/dist/esm/Client.mjs +27 -0
- package/dist/esm/agentkit/Agent.d.mts +415 -0
- package/dist/esm/agentkit/Agent.mjs +641 -0
- package/dist/esm/agentkit/AgentSession.d.mts +271 -0
- package/dist/esm/agentkit/AgentSession.mjs +625 -0
- package/dist/esm/agentkit/__tests__/type-safety.test.d.mts +14 -0
- package/dist/esm/agentkit/__tests__/type-safety.test.mjs +292 -0
- package/dist/esm/agentkit/avatar-types.d.mts +201 -0
- package/dist/esm/agentkit/avatar-types.mjs +160 -0
- package/dist/esm/agentkit/constants.d.mts +68 -0
- package/dist/esm/agentkit/constants.mjs +69 -0
- package/dist/esm/agentkit/index.d.mts +45 -0
- package/dist/esm/agentkit/index.mjs +41 -0
- package/dist/esm/agentkit/presets.d.mts +39 -0
- package/dist/esm/agentkit/presets.mjs +199 -0
- package/dist/esm/agentkit/token.d.mts +95 -0
- package/dist/esm/agentkit/token.mjs +123 -0
- package/dist/esm/agentkit/types.d.mts +517 -0
- package/dist/esm/agentkit/types.mjs +5 -0
- package/dist/esm/agentkit/vendors/avatar.d.mts +223 -0
- package/dist/esm/agentkit/vendors/avatar.mjs +233 -0
- package/dist/esm/agentkit/vendors/base.d.mts +157 -0
- package/dist/esm/agentkit/vendors/base.mjs +73 -0
- package/dist/esm/agentkit/vendors/llm.d.mts +300 -0
- package/dist/esm/agentkit/vendors/llm.mjs +265 -0
- package/dist/esm/agentkit/vendors/mllm.d.mts +207 -0
- package/dist/esm/agentkit/vendors/mllm.mjs +119 -0
- package/dist/esm/agentkit/vendors/stt.d.mts +272 -0
- package/dist/esm/agentkit/vendors/stt.mjs +232 -0
- package/dist/esm/agentkit/vendors/tts.d.mts +456 -0
- package/dist/esm/agentkit/vendors/tts.mjs +297 -0
- package/dist/esm/api/index.d.mts +2 -0
- package/dist/esm/api/index.mjs +2 -0
- package/dist/esm/api/resources/agentManagement/client/Client.d.mts +48 -0
- package/dist/esm/api/resources/agentManagement/client/Client.mjs +128 -0
- package/dist/esm/api/resources/agentManagement/client/index.d.mts +1 -0
- package/dist/esm/api/resources/agentManagement/client/index.mjs +1 -0
- package/dist/esm/api/resources/agentManagement/client/requests/AgentThinkAgentManagementRequest.d.mts +85 -0
- package/dist/esm/api/resources/agentManagement/client/requests/AgentThinkAgentManagementRequest.mjs +33 -0
- package/dist/esm/api/resources/agentManagement/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/agentManagement/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/agentManagement/index.d.mts +2 -0
- package/dist/esm/api/resources/agentManagement/index.mjs +2 -0
- package/dist/esm/api/resources/agentManagement/types/AgentThinkAgentManagementResponse.d.mts +8 -0
- package/dist/esm/api/resources/agentManagement/types/AgentThinkAgentManagementResponse.mjs +2 -0
- package/dist/esm/api/resources/agentManagement/types/index.d.mts +1 -0
- package/dist/esm/api/resources/agentManagement/types/index.mjs +1 -0
- package/dist/esm/api/resources/agents/client/Client.d.mts +208 -0
- package/dist/esm/api/resources/agents/client/Client.mjs +687 -0
- package/dist/esm/api/resources/agents/client/index.d.mts +1 -0
- package/dist/esm/api/resources/agents/client/index.mjs +1 -0
- package/dist/esm/api/resources/agents/client/requests/GetAgentsRequest.d.mts +13 -0
- package/dist/esm/api/resources/agents/client/requests/GetAgentsRequest.mjs +2 -0
- package/dist/esm/api/resources/agents/client/requests/GetHistoryAgentsRequest.d.mts +13 -0
- package/dist/esm/api/resources/agents/client/requests/GetHistoryAgentsRequest.mjs +2 -0
- package/dist/esm/api/resources/agents/client/requests/GetTurnsAgentsRequest.d.mts +17 -0
- package/dist/esm/api/resources/agents/client/requests/GetTurnsAgentsRequest.mjs +2 -0
- package/dist/esm/api/resources/agents/client/requests/InterruptAgentsRequest.d.mts +13 -0
- package/dist/esm/api/resources/agents/client/requests/InterruptAgentsRequest.mjs +2 -0
- package/dist/esm/api/resources/agents/client/requests/ListAgentsRequest.d.mts +31 -0
- package/dist/esm/api/resources/agents/client/requests/ListAgentsRequest.mjs +2 -0
- package/dist/esm/api/resources/agents/client/requests/SpeakAgentsRequest.d.mts +45 -0
- package/dist/esm/api/resources/agents/client/requests/SpeakAgentsRequest.mjs +15 -0
- package/dist/esm/api/resources/agents/client/requests/StartAgentsRequest.d.mts +1048 -0
- package/dist/esm/api/resources/agents/client/requests/StartAgentsRequest.mjs +332 -0
- package/dist/esm/api/resources/agents/client/requests/StopAgentsRequest.d.mts +13 -0
- package/dist/esm/api/resources/agents/client/requests/StopAgentsRequest.mjs +2 -0
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentsRequest.d.mts +62 -0
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentsRequest.mjs +2 -0
- package/dist/esm/api/resources/agents/client/requests/index.d.mts +9 -0
- package/dist/esm/api/resources/agents/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/agents/index.d.mts +2 -0
- package/dist/esm/api/resources/agents/index.mjs +2 -0
- package/dist/esm/api/resources/agents/types/GetAgentsResponse.d.mts +40 -0
- package/dist/esm/api/resources/agents/types/GetAgentsResponse.mjs +21 -0
- package/dist/esm/api/resources/agents/types/GetHistoryAgentsResponse.d.mts +37 -0
- package/dist/esm/api/resources/agents/types/GetHistoryAgentsResponse.mjs +19 -0
- package/dist/esm/api/resources/agents/types/GetTurnsAgentsResponse.d.mts +207 -0
- package/dist/esm/api/resources/agents/types/GetTurnsAgentsResponse.mjs +42 -0
- package/dist/esm/api/resources/agents/types/InterruptAgentsResponse.d.mts +8 -0
- package/dist/esm/api/resources/agents/types/InterruptAgentsResponse.mjs +2 -0
- package/dist/esm/api/resources/agents/types/ListAgentsRequestState.d.mts +10 -0
- package/dist/esm/api/resources/agents/types/ListAgentsRequestState.mjs +10 -0
- package/dist/esm/api/resources/agents/types/ListAgentsResponse.d.mts +53 -0
- package/dist/esm/api/resources/agents/types/ListAgentsResponse.mjs +22 -0
- package/dist/esm/api/resources/agents/types/SpeakAgentsResponse.d.mts +8 -0
- package/dist/esm/api/resources/agents/types/SpeakAgentsResponse.mjs +2 -0
- package/dist/esm/api/resources/agents/types/StartAgentsResponse.d.mts +36 -0
- package/dist/esm/api/resources/agents/types/StartAgentsResponse.mjs +21 -0
- package/dist/esm/api/resources/agents/types/UpdateAgentsResponse.d.mts +36 -0
- package/dist/esm/api/resources/agents/types/UpdateAgentsResponse.mjs +21 -0
- package/dist/esm/api/resources/agents/types/index.d.mts +9 -0
- package/dist/esm/api/resources/agents/types/index.mjs +9 -0
- package/dist/esm/api/resources/index.d.mts +12 -0
- package/dist/esm/api/resources/index.mjs +12 -0
- package/dist/esm/api/resources/phoneNumbers/client/Client.d.mts +97 -0
- package/dist/esm/api/resources/phoneNumbers/client/Client.mjs +351 -0
- package/dist/esm/api/resources/phoneNumbers/client/index.d.mts +1 -0
- package/dist/esm/api/resources/phoneNumbers/client/index.mjs +1 -0
- package/dist/esm/api/resources/phoneNumbers/client/requests/AddPhoneNumbersRequest.d.mts +83 -0
- package/dist/esm/api/resources/phoneNumbers/client/requests/AddPhoneNumbersRequest.mjs +13 -0
- package/dist/esm/api/resources/phoneNumbers/client/requests/DeletePhoneNumbersRequest.d.mts +10 -0
- package/dist/esm/api/resources/phoneNumbers/client/requests/DeletePhoneNumbersRequest.mjs +2 -0
- package/dist/esm/api/resources/phoneNumbers/client/requests/GetPhoneNumbersRequest.d.mts +10 -0
- package/dist/esm/api/resources/phoneNumbers/client/requests/GetPhoneNumbersRequest.mjs +2 -0
- package/dist/esm/api/resources/phoneNumbers/client/requests/UpdatePhoneNumbersRequest.d.mts +36 -0
- package/dist/esm/api/resources/phoneNumbers/client/requests/UpdatePhoneNumbersRequest.mjs +2 -0
- package/dist/esm/api/resources/phoneNumbers/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/phoneNumbers/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/phoneNumbers/index.d.mts +2 -0
- package/dist/esm/api/resources/phoneNumbers/index.mjs +2 -0
- package/dist/esm/api/resources/phoneNumbers/types/AddPhoneNumbersResponse.d.mts +25 -0
- package/dist/esm/api/resources/phoneNumbers/types/AddPhoneNumbersResponse.mjs +2 -0
- package/dist/esm/api/resources/phoneNumbers/types/GetPhoneNumbersResponse.d.mts +43 -0
- package/dist/esm/api/resources/phoneNumbers/types/GetPhoneNumbersResponse.mjs +13 -0
- package/dist/esm/api/resources/phoneNumbers/types/ListPhoneNumbersResponseItem.d.mts +43 -0
- package/dist/esm/api/resources/phoneNumbers/types/ListPhoneNumbersResponseItem.mjs +13 -0
- package/dist/esm/api/resources/phoneNumbers/types/UpdatePhoneNumbersResponse.d.mts +43 -0
- package/dist/esm/api/resources/phoneNumbers/types/UpdatePhoneNumbersResponse.mjs +13 -0
- package/dist/esm/api/resources/phoneNumbers/types/index.d.mts +4 -0
- package/dist/esm/api/resources/phoneNumbers/types/index.mjs +4 -0
- package/dist/esm/api/resources/telephony/client/Client.d.mts +133 -0
- package/dist/esm/api/resources/telephony/client/Client.mjs +379 -0
- package/dist/esm/api/resources/telephony/client/index.d.mts +1 -0
- package/dist/esm/api/resources/telephony/client/index.mjs +1 -0
- package/dist/esm/api/resources/telephony/client/requests/CallTelephonyRequest.d.mts +114 -0
- package/dist/esm/api/resources/telephony/client/requests/CallTelephonyRequest.mjs +2 -0
- package/dist/esm/api/resources/telephony/client/requests/GetTelephonyRequest.d.mts +13 -0
- package/dist/esm/api/resources/telephony/client/requests/GetTelephonyRequest.mjs +2 -0
- package/dist/esm/api/resources/telephony/client/requests/HangupTelephonyRequest.d.mts +13 -0
- package/dist/esm/api/resources/telephony/client/requests/HangupTelephonyRequest.mjs +2 -0
- package/dist/esm/api/resources/telephony/client/requests/ListTelephonyRequest.d.mts +29 -0
- package/dist/esm/api/resources/telephony/client/requests/ListTelephonyRequest.mjs +2 -0
- package/dist/esm/api/resources/telephony/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/telephony/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/telephony/index.d.mts +2 -0
- package/dist/esm/api/resources/telephony/index.mjs +2 -0
- package/dist/esm/api/resources/telephony/types/CallTelephonyResponse.d.mts +4 -0
- package/dist/esm/api/resources/telephony/types/CallTelephonyResponse.mjs +2 -0
- package/dist/esm/api/resources/telephony/types/GetTelephonyResponse.d.mts +69 -0
- package/dist/esm/api/resources/telephony/types/GetTelephonyResponse.mjs +33 -0
- package/dist/esm/api/resources/telephony/types/HangupTelephonyResponse.d.mts +1 -0
- package/dist/esm/api/resources/telephony/types/HangupTelephonyResponse.mjs +2 -0
- package/dist/esm/api/resources/telephony/types/ListTelephonyRequestType.d.mts +5 -0
- package/dist/esm/api/resources/telephony/types/ListTelephonyRequestType.mjs +5 -0
- package/dist/esm/api/resources/telephony/types/ListTelephonyResponse.d.mts +83 -0
- package/dist/esm/api/resources/telephony/types/ListTelephonyResponse.mjs +31 -0
- package/dist/esm/api/resources/telephony/types/index.d.mts +5 -0
- package/dist/esm/api/resources/telephony/types/index.mjs +5 -0
- package/dist/esm/api/types/AgentErrorResponse.d.mts +43 -0
- package/dist/esm/api/types/AgentErrorResponse.mjs +22 -0
- package/dist/esm/api/types/AmazonTts.d.mts +9 -0
- package/dist/esm/api/types/AmazonTts.mjs +2 -0
- package/dist/esm/api/types/AmazonTtsParams.d.mts +13 -0
- package/dist/esm/api/types/AmazonTtsParams.mjs +2 -0
- package/dist/esm/api/types/CartesiaTts.d.mts +9 -0
- package/dist/esm/api/types/CartesiaTts.mjs +2 -0
- package/dist/esm/api/types/CartesiaTtsParams.d.mts +13 -0
- package/dist/esm/api/types/CartesiaTtsParams.mjs +2 -0
- package/dist/esm/api/types/CartesiaTtsVoice.d.mts +9 -0
- package/dist/esm/api/types/CartesiaTtsVoice.mjs +2 -0
- package/dist/esm/api/types/DeepgramTts.d.mts +9 -0
- package/dist/esm/api/types/DeepgramTts.mjs +2 -0
- package/dist/esm/api/types/DeepgramTtsParams.d.mts +17 -0
- package/dist/esm/api/types/DeepgramTtsParams.mjs +2 -0
- package/dist/esm/api/types/ElevenLabsTts.d.mts +9 -0
- package/dist/esm/api/types/ElevenLabsTts.mjs +2 -0
- package/dist/esm/api/types/ElevenLabsTtsParams.d.mts +15 -0
- package/dist/esm/api/types/ElevenLabsTtsParams.mjs +2 -0
- package/dist/esm/api/types/FishAudioTts.d.mts +9 -0
- package/dist/esm/api/types/FishAudioTts.mjs +2 -0
- package/dist/esm/api/types/FishAudioTtsParams.d.mts +9 -0
- package/dist/esm/api/types/FishAudioTtsParams.mjs +2 -0
- package/dist/esm/api/types/GoogleTts.d.mts +9 -0
- package/dist/esm/api/types/GoogleTts.mjs +2 -0
- package/dist/esm/api/types/GoogleTtsParams.d.mts +13 -0
- package/dist/esm/api/types/GoogleTtsParams.mjs +2 -0
- package/dist/esm/api/types/HumeAiTts.d.mts +9 -0
- package/dist/esm/api/types/HumeAiTts.mjs +2 -0
- package/dist/esm/api/types/HumeAiTtsParams.d.mts +9 -0
- package/dist/esm/api/types/HumeAiTtsParams.mjs +2 -0
- package/dist/esm/api/types/MicrosoftTts.d.mts +9 -0
- package/dist/esm/api/types/MicrosoftTts.mjs +2 -0
- package/dist/esm/api/types/MicrosoftTtsParams.d.mts +13 -0
- package/dist/esm/api/types/MicrosoftTtsParams.mjs +2 -0
- package/dist/esm/api/types/MinimaxTts.d.mts +9 -0
- package/dist/esm/api/types/MinimaxTts.mjs +2 -0
- package/dist/esm/api/types/MinimaxTtsParams.d.mts +20 -0
- package/dist/esm/api/types/MinimaxTtsParams.mjs +2 -0
- package/dist/esm/api/types/MurfTts.d.mts +9 -0
- package/dist/esm/api/types/MurfTts.mjs +2 -0
- package/dist/esm/api/types/MurfTtsParams.d.mts +11 -0
- package/dist/esm/api/types/MurfTtsParams.mjs +2 -0
- package/dist/esm/api/types/OpenAiTts.d.mts +9 -0
- package/dist/esm/api/types/OpenAiTts.mjs +2 -0
- package/dist/esm/api/types/OpenAiTtsParams.d.mts +11 -0
- package/dist/esm/api/types/OpenAiTtsParams.mjs +2 -0
- package/dist/esm/api/types/RimeTts.d.mts +9 -0
- package/dist/esm/api/types/RimeTts.mjs +2 -0
- package/dist/esm/api/types/RimeTtsParams.d.mts +11 -0
- package/dist/esm/api/types/RimeTtsParams.mjs +2 -0
- package/dist/esm/api/types/SarvamTts.d.mts +9 -0
- package/dist/esm/api/types/SarvamTts.mjs +2 -0
- package/dist/esm/api/types/SarvamTtsParams.d.mts +11 -0
- package/dist/esm/api/types/SarvamTtsParams.mjs +2 -0
- package/dist/esm/api/types/TelephonyErrorResponse.d.mts +11 -0
- package/dist/esm/api/types/TelephonyErrorResponse.mjs +2 -0
- package/dist/esm/api/types/Tts.d.mts +43 -0
- package/dist/esm/api/types/Tts.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +30 -0
- package/dist/esm/api/types/index.mjs +30 -0
- package/dist/esm/core/auth/AuthProvider.d.mts +4 -0
- package/dist/esm/core/auth/AuthProvider.mjs +1 -0
- package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
- package/dist/esm/core/auth/AuthRequest.mjs +1 -0
- package/dist/esm/core/auth/BasicAuth.d.mts +8 -0
- package/dist/esm/core/auth/BasicAuth.mjs +24 -0
- package/dist/esm/core/auth/BearerToken.d.mts +5 -0
- package/dist/esm/core/auth/BearerToken.mjs +12 -0
- package/dist/esm/core/auth/index.d.mts +4 -0
- package/dist/esm/core/auth/index.mjs +2 -0
- package/dist/esm/core/base64.d.mts +2 -0
- package/dist/esm/core/base64.mjs +22 -0
- package/dist/esm/core/domain/index.d.mts +78 -0
- package/dist/esm/core/domain/index.mjs +157 -0
- package/dist/esm/core/exports.d.mts +2 -0
- package/dist/esm/core/exports.mjs +2 -0
- package/dist/esm/core/fetcher/APIResponse.d.mts +20 -0
- package/dist/esm/core/fetcher/APIResponse.mjs +1 -0
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +20 -0
- package/dist/esm/core/fetcher/BinaryResponse.mjs +14 -0
- package/dist/esm/core/fetcher/EndpointMetadata.d.mts +13 -0
- package/dist/esm/core/fetcher/EndpointMetadata.mjs +1 -0
- package/dist/esm/core/fetcher/EndpointSupplier.d.mts +12 -0
- package/dist/esm/core/fetcher/EndpointSupplier.mjs +19 -0
- package/dist/esm/core/fetcher/Fetcher.d.mts +45 -0
- package/dist/esm/core/fetcher/Fetcher.mjs +311 -0
- package/dist/esm/core/fetcher/Headers.d.mts +2 -0
- package/dist/esm/core/fetcher/Headers.mjs +82 -0
- package/dist/esm/core/fetcher/HttpResponsePromise.d.mts +58 -0
- package/dist/esm/core/fetcher/HttpResponsePromise.mjs +99 -0
- package/dist/esm/core/fetcher/RawResponse.d.mts +29 -0
- package/dist/esm/core/fetcher/RawResponse.mjs +40 -0
- package/dist/esm/core/fetcher/ResponseWithBody.d.mts +4 -0
- package/dist/esm/core/fetcher/ResponseWithBody.mjs +3 -0
- package/dist/esm/core/fetcher/Supplier.d.mts +4 -0
- package/dist/esm/core/fetcher/Supplier.mjs +19 -0
- package/dist/esm/core/fetcher/createRequestUrl.d.mts +1 -0
- package/dist/esm/core/fetcher/createRequestUrl.mjs +5 -0
- package/dist/esm/core/fetcher/getErrorResponseBody.d.mts +1 -0
- package/dist/esm/core/fetcher/getErrorResponseBody.mjs +42 -0
- package/dist/esm/core/fetcher/getFetchFn.d.mts +1 -0
- package/dist/esm/core/fetcher/getFetchFn.mjs +14 -0
- package/dist/esm/core/fetcher/getHeader.d.mts +1 -0
- package/dist/esm/core/fetcher/getHeader.mjs +8 -0
- package/dist/esm/core/fetcher/getRequestBody.d.mts +7 -0
- package/dist/esm/core/fetcher/getRequestBody.mjs +24 -0
- package/dist/esm/core/fetcher/getResponseBody.d.mts +1 -0
- package/dist/esm/core/fetcher/getResponseBody.mjs +52 -0
- package/dist/esm/core/fetcher/index.d.mts +11 -0
- package/dist/esm/core/fetcher/index.mjs +6 -0
- package/dist/esm/core/fetcher/makeRequest.d.mts +1 -0
- package/dist/esm/core/fetcher/makeRequest.mjs +36 -0
- package/dist/esm/core/fetcher/requestWithRetries.d.mts +1 -0
- package/dist/esm/core/fetcher/requestWithRetries.mjs +64 -0
- package/dist/esm/core/fetcher/signals.d.mts +5 -0
- package/dist/esm/core/fetcher/signals.mjs +20 -0
- package/dist/esm/core/headers.d.mts +2 -0
- package/dist/esm/core/headers.mjs +27 -0
- package/dist/esm/core/index.d.mts +8 -0
- package/dist/esm/core/index.mjs +8 -0
- package/dist/esm/core/json.d.mts +15 -0
- package/dist/esm/core/json.mjs +19 -0
- package/dist/esm/core/logging/exports.d.mts +18 -0
- package/dist/esm/core/logging/exports.mjs +9 -0
- package/dist/esm/core/logging/index.d.mts +1 -0
- package/dist/esm/core/logging/index.mjs +1 -0
- package/dist/esm/core/logging/logger.d.mts +126 -0
- package/dist/esm/core/logging/logger.mjs +138 -0
- package/dist/esm/core/pagination/Page.d.mts +33 -0
- package/dist/esm/core/pagination/Page.mjs +97 -0
- package/dist/esm/core/pagination/exports.d.mts +1 -0
- package/dist/esm/core/pagination/exports.mjs +1 -0
- package/dist/esm/core/pagination/index.d.mts +1 -0
- package/dist/esm/core/pagination/index.mjs +1 -0
- package/dist/esm/core/runtime/index.d.mts +1 -0
- package/dist/esm/core/runtime/index.mjs +1 -0
- package/dist/esm/core/runtime/runtime.d.mts +9 -0
- package/dist/esm/core/runtime/runtime.mjs +99 -0
- package/dist/esm/core/url/encodePathParam.d.mts +1 -0
- package/dist/esm/core/url/encodePathParam.mjs +18 -0
- package/dist/esm/core/url/index.d.mts +3 -0
- package/dist/esm/core/url/index.mjs +3 -0
- package/dist/esm/core/url/join.d.mts +1 -0
- package/dist/esm/core/url/join.mjs +65 -0
- package/dist/esm/core/url/qs.d.mts +6 -0
- package/dist/esm/core/url/qs.mjs +61 -0
- package/dist/esm/core/utils/index.d.mts +1 -0
- package/dist/esm/core/utils/index.mjs +1 -0
- package/dist/esm/core/utils/setObjectProperty.d.mts +11 -0
- package/dist/esm/core/utils/setObjectProperty.mjs +39 -0
- package/dist/esm/environments.d.mts +4 -0
- package/dist/esm/environments.mjs +4 -0
- package/dist/esm/errors/AgoraError.d.mts +12 -0
- package/dist/esm/errors/AgoraError.mjs +24 -0
- package/dist/esm/errors/AgoraTimeoutError.d.mts +3 -0
- package/dist/esm/errors/AgoraTimeoutError.mjs +7 -0
- package/dist/esm/errors/index.d.mts +2 -0
- package/dist/esm/errors/index.mjs +2 -0
- package/dist/esm/exports.d.mts +1 -0
- package/dist/esm/exports.mjs +1 -0
- package/dist/esm/index.d.mts +10 -0
- package/dist/esm/index.mjs +20 -0
- package/dist/esm/version.d.mts +1 -0
- package/dist/esm/version.mjs +1 -0
- package/package.json +71 -0
- package/reference.md +1389 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type-safe constants for agent configuration values.
|
|
3
|
+
* Use these instead of raw strings to avoid typos and get IDE autocomplete.
|
|
4
|
+
*/
|
|
5
|
+
import { AgentThinkAgentManagementRequest as AgentThinkRequestNS } from "../api/resources/agentManagement/client/requests/AgentThinkAgentManagementRequest.mjs";
|
|
6
|
+
import { SpeakAgentsRequest as SpeakAgentsRequestNS } from "../api/resources/agents/client/requests/SpeakAgentsRequest.mjs";
|
|
7
|
+
import { StartAgentsRequest as StartAgentsRequestNS } from "../api/resources/agents/client/requests/StartAgentsRequest.mjs";
|
|
8
|
+
/** Data channel: `"rtm"` | `"datastream"` */
|
|
9
|
+
export declare const DataChannel: typeof StartAgentsRequestNS.Properties.Parameters.DataChannel;
|
|
10
|
+
/** RTC audio scenario: `"default"` | `"chorus"` | `"aiserver"` */
|
|
11
|
+
export declare const AudioScenario: typeof StartAgentsRequestNS.Properties.Parameters.AudioScenario;
|
|
12
|
+
/** Silence action when timeout elapses: `"speak"` | `"think"` (avoids shadowing SilenceAction type) */
|
|
13
|
+
export declare const SilenceActionValues: typeof StartAgentsRequestNS.Properties.Parameters.SilenceConfig.Action;
|
|
14
|
+
/** SAL mode: `"locking"` | `"recognition"` (avoids shadowing SalMode type) */
|
|
15
|
+
export declare const SalModeValues: typeof StartAgentsRequestNS.Properties.Sal.SalMode;
|
|
16
|
+
/** Geofence area and exclude area constants */
|
|
17
|
+
export declare const Geofence: typeof StartAgentsRequestNS.Properties.Geofence;
|
|
18
|
+
/** Filler word selection rule: `"shuffle"` | `"round_robin"` */
|
|
19
|
+
export declare const FillerWordsSelectionRule: typeof StartAgentsRequestNS.Properties.FillerWords.Content.StaticConfig.SelectionRule;
|
|
20
|
+
/**
|
|
21
|
+
* Turn detection type (deprecated; use `TurnDetectionNestedConfig.EndOfSpeech` instead).
|
|
22
|
+
* - `AgoraVad`: Agora VAD
|
|
23
|
+
* - `ServerVad`: Server-side VAD (MLLM only)
|
|
24
|
+
* - `SemanticVad`: Semantic VAD (MLLM only)
|
|
25
|
+
*/
|
|
26
|
+
export declare const TurnDetectionTypeValues: typeof StartAgentsRequestNS.Properties.TurnDetection.Type;
|
|
27
|
+
/** Interruption trigger mode: `"start_of_speech"` | `"keywords"` */
|
|
28
|
+
export declare const InterruptionModeValues: typeof StartAgentsRequestNS.Properties.Interruption.Mode;
|
|
29
|
+
/** Interruption trigger mode: `"start_of_speech"` */
|
|
30
|
+
export declare const InterruptionModeStartOfSpeech: StartAgentsRequestNS.Properties.Interruption.Mode;
|
|
31
|
+
/** Interruption trigger mode: `"keywords"` */
|
|
32
|
+
export declare const InterruptionModeKeywords: StartAgentsRequestNS.Properties.Interruption.Mode;
|
|
33
|
+
/** Strategy when interruption is disabled: `"append"` | `"ignore"` */
|
|
34
|
+
export declare const InterruptionDisabledStrategy: typeof StartAgentsRequestNS.Properties.Interruption.DisabledConfig.Strategy;
|
|
35
|
+
/** Strategy when interruption is disabled: append speech to the next turn. */
|
|
36
|
+
export declare const InterruptionDisabledStrategyAppend: StartAgentsRequestNS.Properties.Interruption.DisabledConfig.Strategy;
|
|
37
|
+
/** Strategy when interruption is disabled: ignore speech while busy. */
|
|
38
|
+
export declare const InterruptionDisabledStrategyIgnore: StartAgentsRequestNS.Properties.Interruption.DisabledConfig.Strategy;
|
|
39
|
+
/** Speak priority: `"INTERRUPT"` | `"APPEND"` | `"IGNORE"` */
|
|
40
|
+
export declare const SpeakPriorityValues: typeof SpeakAgentsRequestNS.Priority;
|
|
41
|
+
/** Speak immediately by interrupting the current output. */
|
|
42
|
+
export declare const SpeakPriorityInterrupt: SpeakAgentsRequestNS.Priority;
|
|
43
|
+
/** Queue the message after current output finishes. */
|
|
44
|
+
export declare const SpeakPriorityAppend: SpeakAgentsRequestNS.Priority;
|
|
45
|
+
/** Drop the message if the agent is busy. */
|
|
46
|
+
export declare const SpeakPriorityIgnore: SpeakAgentsRequestNS.Priority;
|
|
47
|
+
/** MLLM turn-detection mode: `"agora_vad"` | `"server_vad"` | `"semantic_vad"` */
|
|
48
|
+
export declare const MllmTurnDetectionModeValues: typeof StartAgentsRequestNS.Properties.Mllm.TurnDetection.Mode;
|
|
49
|
+
/** MLLM turn-detection mode: Agora VAD. */
|
|
50
|
+
export declare const MllmTurnDetectionModeAgoraVad: StartAgentsRequestNS.Properties.Mllm.TurnDetection.Mode;
|
|
51
|
+
/** MLLM turn-detection mode: server/vendor VAD. */
|
|
52
|
+
export declare const MllmTurnDetectionModeServerVad: StartAgentsRequestNS.Properties.Mllm.TurnDetection.Mode;
|
|
53
|
+
/** MLLM turn-detection mode: semantic VAD. */
|
|
54
|
+
export declare const MllmTurnDetectionModeSemanticVad: StartAgentsRequestNS.Properties.Mllm.TurnDetection.Mode;
|
|
55
|
+
/** Think action when the agent is listening: inject custom text without interrupting. */
|
|
56
|
+
export declare const ThinkOnListeningActionInject: AgentThinkRequestNS.OnListeningAction;
|
|
57
|
+
/** Think action when the agent is listening: interrupt and start a new turn. */
|
|
58
|
+
export declare const ThinkOnListeningActionInterrupt: AgentThinkRequestNS.OnListeningAction;
|
|
59
|
+
/** Think action when the agent is listening: ignore the request. */
|
|
60
|
+
export declare const ThinkOnListeningActionIgnore: AgentThinkRequestNS.OnListeningAction;
|
|
61
|
+
/** Think action when the agent is thinking: interrupt and start a new turn. */
|
|
62
|
+
export declare const ThinkOnThinkingActionInterrupt: AgentThinkRequestNS.OnThinkingAction;
|
|
63
|
+
/** Think action when the agent is thinking: ignore the request. */
|
|
64
|
+
export declare const ThinkOnThinkingActionIgnore: AgentThinkRequestNS.OnThinkingAction;
|
|
65
|
+
/** Think action when the agent is speaking: interrupt and start a new turn. */
|
|
66
|
+
export declare const ThinkOnSpeakingActionInterrupt: AgentThinkRequestNS.OnSpeakingAction;
|
|
67
|
+
/** Think action when the agent is speaking: ignore the request. */
|
|
68
|
+
export declare const ThinkOnSpeakingActionIgnore: AgentThinkRequestNS.OnSpeakingAction;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type-safe constants for agent configuration values.
|
|
3
|
+
* Use these instead of raw strings to avoid typos and get IDE autocomplete.
|
|
4
|
+
*/
|
|
5
|
+
// Import namespace as value from source (api index uses export type)
|
|
6
|
+
import { AgentThinkAgentManagementRequest as AgentThinkRequestNS } from "../api/resources/agentManagement/client/requests/AgentThinkAgentManagementRequest.mjs";
|
|
7
|
+
import { SpeakAgentsRequest as SpeakAgentsRequestNS } from "../api/resources/agents/client/requests/SpeakAgentsRequest.mjs";
|
|
8
|
+
import { StartAgentsRequest as StartAgentsRequestNS } from "../api/resources/agents/client/requests/StartAgentsRequest.mjs";
|
|
9
|
+
/** Data channel: `"rtm"` | `"datastream"` */
|
|
10
|
+
export const DataChannel = StartAgentsRequestNS.Properties.Parameters.DataChannel;
|
|
11
|
+
/** RTC audio scenario: `"default"` | `"chorus"` | `"aiserver"` */
|
|
12
|
+
export const AudioScenario = StartAgentsRequestNS.Properties.Parameters.AudioScenario;
|
|
13
|
+
/** Silence action when timeout elapses: `"speak"` | `"think"` (avoids shadowing SilenceAction type) */
|
|
14
|
+
export const SilenceActionValues = StartAgentsRequestNS.Properties.Parameters.SilenceConfig.Action;
|
|
15
|
+
/** SAL mode: `"locking"` | `"recognition"` (avoids shadowing SalMode type) */
|
|
16
|
+
export const SalModeValues = StartAgentsRequestNS.Properties.Sal.SalMode;
|
|
17
|
+
/** Geofence area and exclude area constants */
|
|
18
|
+
export const Geofence = StartAgentsRequestNS.Properties.Geofence;
|
|
19
|
+
/** Filler word selection rule: `"shuffle"` | `"round_robin"` */
|
|
20
|
+
export const FillerWordsSelectionRule = StartAgentsRequestNS.Properties.FillerWords.Content.StaticConfig.SelectionRule;
|
|
21
|
+
/**
|
|
22
|
+
* Turn detection type (deprecated; use `TurnDetectionNestedConfig.EndOfSpeech` instead).
|
|
23
|
+
* - `AgoraVad`: Agora VAD
|
|
24
|
+
* - `ServerVad`: Server-side VAD (MLLM only)
|
|
25
|
+
* - `SemanticVad`: Semantic VAD (MLLM only)
|
|
26
|
+
*/
|
|
27
|
+
export const TurnDetectionTypeValues = StartAgentsRequestNS.Properties.TurnDetection.Type;
|
|
28
|
+
/** Interruption trigger mode: `"start_of_speech"` | `"keywords"` */
|
|
29
|
+
export const InterruptionModeValues = StartAgentsRequestNS.Properties.Interruption.Mode;
|
|
30
|
+
/** Interruption trigger mode: `"start_of_speech"` */
|
|
31
|
+
export const InterruptionModeStartOfSpeech = StartAgentsRequestNS.Properties.Interruption.Mode.StartOfSpeech;
|
|
32
|
+
/** Interruption trigger mode: `"keywords"` */
|
|
33
|
+
export const InterruptionModeKeywords = StartAgentsRequestNS.Properties.Interruption.Mode.Keywords;
|
|
34
|
+
/** Strategy when interruption is disabled: `"append"` | `"ignore"` */
|
|
35
|
+
export const InterruptionDisabledStrategy = StartAgentsRequestNS.Properties.Interruption.DisabledConfig.Strategy;
|
|
36
|
+
/** Strategy when interruption is disabled: append speech to the next turn. */
|
|
37
|
+
export const InterruptionDisabledStrategyAppend = StartAgentsRequestNS.Properties.Interruption.DisabledConfig.Strategy.Append;
|
|
38
|
+
/** Strategy when interruption is disabled: ignore speech while busy. */
|
|
39
|
+
export const InterruptionDisabledStrategyIgnore = StartAgentsRequestNS.Properties.Interruption.DisabledConfig.Strategy.Ignore;
|
|
40
|
+
/** Speak priority: `"INTERRUPT"` | `"APPEND"` | `"IGNORE"` */
|
|
41
|
+
export const SpeakPriorityValues = SpeakAgentsRequestNS.Priority;
|
|
42
|
+
/** Speak immediately by interrupting the current output. */
|
|
43
|
+
export const SpeakPriorityInterrupt = SpeakAgentsRequestNS.Priority.Interrupt;
|
|
44
|
+
/** Queue the message after current output finishes. */
|
|
45
|
+
export const SpeakPriorityAppend = SpeakAgentsRequestNS.Priority.Append;
|
|
46
|
+
/** Drop the message if the agent is busy. */
|
|
47
|
+
export const SpeakPriorityIgnore = SpeakAgentsRequestNS.Priority.Ignore;
|
|
48
|
+
/** MLLM turn-detection mode: `"agora_vad"` | `"server_vad"` | `"semantic_vad"` */
|
|
49
|
+
export const MllmTurnDetectionModeValues = StartAgentsRequestNS.Properties.Mllm.TurnDetection.Mode;
|
|
50
|
+
/** MLLM turn-detection mode: Agora VAD. */
|
|
51
|
+
export const MllmTurnDetectionModeAgoraVad = StartAgentsRequestNS.Properties.Mllm.TurnDetection.Mode.AgoraVad;
|
|
52
|
+
/** MLLM turn-detection mode: server/vendor VAD. */
|
|
53
|
+
export const MllmTurnDetectionModeServerVad = StartAgentsRequestNS.Properties.Mllm.TurnDetection.Mode.ServerVad;
|
|
54
|
+
/** MLLM turn-detection mode: semantic VAD. */
|
|
55
|
+
export const MllmTurnDetectionModeSemanticVad = StartAgentsRequestNS.Properties.Mllm.TurnDetection.Mode.SemanticVad;
|
|
56
|
+
/** Think action when the agent is listening: inject custom text without interrupting. */
|
|
57
|
+
export const ThinkOnListeningActionInject = AgentThinkRequestNS.OnListeningAction.Inject;
|
|
58
|
+
/** Think action when the agent is listening: interrupt and start a new turn. */
|
|
59
|
+
export const ThinkOnListeningActionInterrupt = AgentThinkRequestNS.OnListeningAction.Interrupt;
|
|
60
|
+
/** Think action when the agent is listening: ignore the request. */
|
|
61
|
+
export const ThinkOnListeningActionIgnore = AgentThinkRequestNS.OnListeningAction.Ignore;
|
|
62
|
+
/** Think action when the agent is thinking: interrupt and start a new turn. */
|
|
63
|
+
export const ThinkOnThinkingActionInterrupt = AgentThinkRequestNS.OnThinkingAction.Interrupt;
|
|
64
|
+
/** Think action when the agent is thinking: ignore the request. */
|
|
65
|
+
export const ThinkOnThinkingActionIgnore = AgentThinkRequestNS.OnThinkingAction.Ignore;
|
|
66
|
+
/** Think action when the agent is speaking: interrupt and start a new turn. */
|
|
67
|
+
export const ThinkOnSpeakingActionInterrupt = AgentThinkRequestNS.OnSpeakingAction.Interrupt;
|
|
68
|
+
/** Think action when the agent is speaking: ignore the request. */
|
|
69
|
+
export const ThinkOnSpeakingActionIgnore = AgentThinkRequestNS.OnSpeakingAction.Ignore;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agentkit layer for the Agora Conversational AI SDK.
|
|
3
|
+
*
|
|
4
|
+
* This module provides a cleaner, more ergonomic API on top of the
|
|
5
|
+
* Fern-generated SDK types and methods.
|
|
6
|
+
*
|
|
7
|
+
* ## Maintenance Notes
|
|
8
|
+
*
|
|
9
|
+
* This agentkit is designed to minimize maintenance burden:
|
|
10
|
+
*
|
|
11
|
+
* 1. **Type aliases** (in types.ts) re-export Fern types directly.
|
|
12
|
+
* When Fern adds new fields, they're automatically available.
|
|
13
|
+
*
|
|
14
|
+
* 2. **The `raw` property** on AgentSession exposes the underlying
|
|
15
|
+
* Fern-generated AgentsClient. When Fern adds new endpoints,
|
|
16
|
+
* they're immediately available via `session.raw.newEndpoint()`.
|
|
17
|
+
*
|
|
18
|
+
* 3. **Convenience methods** (say, stop, interrupt, etc.) are the only
|
|
19
|
+
* parts that need manual updates when adding new sugar.
|
|
20
|
+
*/
|
|
21
|
+
export type { AgentsClient } from "../api/resources/agents/client/Client.mjs";
|
|
22
|
+
export type { AgentOptions } from "./Agent.mjs";
|
|
23
|
+
export { Agent } from "./Agent.mjs";
|
|
24
|
+
export type { AgentSessionEvent, AgentSessionEventHandler, AgentSessionOptions, } from "./AgentSession.mjs";
|
|
25
|
+
export { AgentSession } from "./AgentSession.mjs";
|
|
26
|
+
export type { AkoolAvatarConfig, AnamAvatarConfig, GenericAvatarConfig, HeyGenAvatarConfig, LiveAvatarAvatarConfig, StrictAvatarConfig, } from "./avatar-types.mjs";
|
|
27
|
+
export { isAkoolAvatar, isAnamAvatar, isAvatarTokenManaged, isGenericAvatar, isHeyGenAvatar, isLiveAvatarAvatar, toBaseAvatarConfig, validateAvatarConfig, validateTtsSampleRate, } from "./avatar-types.mjs";
|
|
28
|
+
export { AudioScenario, DataChannel, FillerWordsSelectionRule, Geofence, InterruptionDisabledStrategy, InterruptionDisabledStrategyAppend, InterruptionDisabledStrategyIgnore, InterruptionModeKeywords, InterruptionModeStartOfSpeech, InterruptionModeValues, MllmTurnDetectionModeAgoraVad, MllmTurnDetectionModeSemanticVad, MllmTurnDetectionModeServerVad, MllmTurnDetectionModeValues, SalModeValues, SilenceActionValues, SpeakPriorityAppend, SpeakPriorityIgnore, SpeakPriorityInterrupt, SpeakPriorityValues, ThinkOnListeningActionIgnore, ThinkOnListeningActionInject, ThinkOnListeningActionInterrupt, ThinkOnSpeakingActionIgnore, ThinkOnSpeakingActionInterrupt, ThinkOnThinkingActionIgnore, ThinkOnThinkingActionInterrupt, TurnDetectionTypeValues, } from "./constants.mjs";
|
|
29
|
+
export type { AgentPreset, AsrPreset, DeepgramPresetModel, LlmPreset, MiniMaxPresetModel, OpenAIPresetModel, OpenAITtsPresetModel, PresetInput, TtsPreset, } from "./presets.mjs";
|
|
30
|
+
export { AgentPresets, normalizePresetInput } from "./presets.mjs";
|
|
31
|
+
export type { GenerateConvoAITokenOptions, GenerateTokenOptions, } from "./token.mjs";
|
|
32
|
+
export { ExpiresIn, generateConvoAIToken, generateRtcToken, MAX_EXPIRY_SECONDS, } from "./token.mjs";
|
|
33
|
+
export type { AdvancedFeatures, AgentConfig, AgentConfigUpdate, AmazonTts, AmazonTtsParams, AsrConfig, AvatarConfig, AvatarVendor, CartesiaTts, CartesiaTtsParams, ConversationHistory, ConversationRole, ConversationSessionTurn, ConversationTurn, ConversationTurns, Eagerness, ElevenLabsTts, ElevenLabsTtsParams, EndOfSpeechConfig, EndOfSpeechMode, EndOfSpeechSemanticConfig, EndOfSpeechVadConfig, FarewellConfig, FillerWordsConfig, FillerWordsContent, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, FillerWordsTrigger, FillerWordsTriggerFixedTimeConfig, FishAudioTts, FishAudioTtsParams, GeofenceArea, GeofenceConfig, GeofenceExcludeArea, GetTurnsOptions, GoogleTts, GoogleTtsParams, HumeAiTts, HumeAiTtsParams, InterruptionConfig, InterruptionMode, InterruptMode, Labels, LlmConfig, LlmGreetingConfigs, LlmGreetingConfigsMode, LlmStyle, McpServersItem, MicrosoftTts, MicrosoftTtsParams, MinimaxTts, MinimaxTtsParams, MllmConfig, MllmTurnDetectionConfig, MllmTurnDetectionMode, MllmVendor, MurfTts, MurfTtsParams, OpenAiTts, OpenAiTtsParams, ParametersAudioScenario, ParametersDataChannel, RimeTts, RimeTtsParams, RtcConfig, SalConfig, SalMode, SarvamTts, SarvamTtsParams, SayOptions, SessionInfo, SessionListResponse, SessionOptions, SessionParams, SessionParamsInput, SessionStatus, SessionSummary, SilenceAction, SilenceConfig, SpeakPriority, StartOfSpeechConfig, StartOfSpeechDisabledConfig, StartOfSpeechDisabledConfigStrategy, StartOfSpeechKeywordsConfig, StartOfSpeechMode, StartOfSpeechVadConfig, SttConfig, SttVendor, ThinkOnListeningAction, ThinkOnSpeakingAction, ThinkOnThinkingAction, ThinkOptions, ThinkResponse, TtsConfig, TurnDetectionConfig, TurnDetectionNestedConfig, TurnDetectionType, } from "./types.mjs";
|
|
34
|
+
export type { AkoolAvatarOptions, AnamAvatarOptions, GenericAvatarOptions, HeyGenAvatarOptions, LiveAvatarAvatarOptions, } from "./vendors/avatar.mjs";
|
|
35
|
+
export { AkoolAvatar, AnamAvatar, GenericAvatar, HeyGenAvatar, LiveAvatarAvatar, } from "./vendors/avatar.mjs";
|
|
36
|
+
export type { AkoolSampleRate, CartesiaSampleRate, ElevenLabsSampleRate, HeyGenSampleRate, LiveAvatarSampleRate, MicrosoftSampleRate, SampleRate, } from "./vendors/base.mjs";
|
|
37
|
+
export { BaseAvatar, BaseLLM, type BaseLlmOptions, BaseMLLM, BaseSTT, BaseTTS, type GoogleTTSSampleRate, } from "./vendors/base.mjs";
|
|
38
|
+
export type { AmazonBedrockOptions, AnthropicOptions, AzureOpenAIOptions, CustomLLMOptions, DifyOptions, GeminiOptions, GroqOptions, OpenAIOptions, VertexAILLMOptions, } from "./vendors/llm.mjs";
|
|
39
|
+
export { AmazonBedrock, Anthropic, AzureOpenAI, CustomLLM, Dify, Gemini, Groq, OpenAI, VertexAILLM, } from "./vendors/llm.mjs";
|
|
40
|
+
export type { GeminiLiveOptions, OpenAIRealtimeOptions, VertexAIOptions, XaiGrokOptions, } from "./vendors/mllm.mjs";
|
|
41
|
+
export { GeminiLive, OpenAIRealtime, VertexAI, XaiGrok, } from "./vendors/mllm.mjs";
|
|
42
|
+
export type { AmazonSTTOptions, AresSTTOptions, AssemblyAISTTOptions, DeepgramSTTOptions, GoogleSTTOptions, MicrosoftSTTOptions, OpenAISTTOptions, SarvamSTTOptions, SpeechmaticsSTTOptions, } from "./vendors/stt.mjs";
|
|
43
|
+
export { AmazonSTT, AresSTT, AssemblyAISTT, DeepgramSTT, GoogleSTT, MicrosoftSTT, OpenAISTT, SarvamSTT, SpeechmaticsSTT, } from "./vendors/stt.mjs";
|
|
44
|
+
export type { AmazonTTSOptions, CartesiaTTSOptions, DeepgramTTSOptions, ElevenLabsTTSOptions, FishAudioTTSOptions, GoogleTTSOptions, HumeAITTSOptions, MicrosoftTTSOptions, MiniMaxTTSOptions, MurfTTSOptions, OpenAITTSOptions, RimeTTSOptions, SarvamTTSOptions, } from "./vendors/tts.mjs";
|
|
45
|
+
export { AmazonTTS, CartesiaTTS, DeepgramTTS, ElevenLabsTTS, FishAudioTTS, GoogleTTS, HumeAITTS, MicrosoftTTS, MiniMaxTTS, MurfTTS, OpenAITTS, RimeTTS, SarvamTTS, } from "./vendors/tts.mjs";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agentkit layer for the Agora Conversational AI SDK.
|
|
3
|
+
*
|
|
4
|
+
* This module provides a cleaner, more ergonomic API on top of the
|
|
5
|
+
* Fern-generated SDK types and methods.
|
|
6
|
+
*
|
|
7
|
+
* ## Maintenance Notes
|
|
8
|
+
*
|
|
9
|
+
* This agentkit is designed to minimize maintenance burden:
|
|
10
|
+
*
|
|
11
|
+
* 1. **Type aliases** (in types.ts) re-export Fern types directly.
|
|
12
|
+
* When Fern adds new fields, they're automatically available.
|
|
13
|
+
*
|
|
14
|
+
* 2. **The `raw` property** on AgentSession exposes the underlying
|
|
15
|
+
* Fern-generated AgentsClient. When Fern adds new endpoints,
|
|
16
|
+
* they're immediately available via `session.raw.newEndpoint()`.
|
|
17
|
+
*
|
|
18
|
+
* 3. **Convenience methods** (say, stop, interrupt, etc.) are the only
|
|
19
|
+
* parts that need manual updates when adding new sugar.
|
|
20
|
+
*/
|
|
21
|
+
// Core classes
|
|
22
|
+
export { Agent } from "./Agent.mjs";
|
|
23
|
+
export { AgentSession } from "./AgentSession.mjs";
|
|
24
|
+
export { isAkoolAvatar, isAnamAvatar, isAvatarTokenManaged, isGenericAvatar, isHeyGenAvatar, isLiveAvatarAvatar, toBaseAvatarConfig, validateAvatarConfig, validateTtsSampleRate, } from "./avatar-types.mjs";
|
|
25
|
+
// Type-safe constants
|
|
26
|
+
export { AudioScenario, DataChannel, FillerWordsSelectionRule, Geofence, InterruptionDisabledStrategy, InterruptionDisabledStrategyAppend, InterruptionDisabledStrategyIgnore, InterruptionModeKeywords, InterruptionModeStartOfSpeech, InterruptionModeValues, MllmTurnDetectionModeAgoraVad, MllmTurnDetectionModeSemanticVad, MllmTurnDetectionModeServerVad, MllmTurnDetectionModeValues, SalModeValues, SilenceActionValues, SpeakPriorityAppend, SpeakPriorityIgnore, SpeakPriorityInterrupt, SpeakPriorityValues, ThinkOnListeningActionIgnore, ThinkOnListeningActionInject, ThinkOnListeningActionInterrupt, ThinkOnSpeakingActionIgnore, ThinkOnSpeakingActionInterrupt, ThinkOnThinkingActionIgnore, ThinkOnThinkingActionInterrupt, TurnDetectionTypeValues, } from "./constants.mjs";
|
|
27
|
+
export { AgentPresets, normalizePresetInput } from "./presets.mjs";
|
|
28
|
+
// Token generation
|
|
29
|
+
export { ExpiresIn, generateConvoAIToken, generateRtcToken, MAX_EXPIRY_SECONDS, } from "./token.mjs";
|
|
30
|
+
// Avatar vendor classes
|
|
31
|
+
export { AkoolAvatar, AnamAvatar, GenericAvatar, HeyGenAvatar, LiveAvatarAvatar, } from "./vendors/avatar.mjs";
|
|
32
|
+
// Base vendor classes
|
|
33
|
+
export { BaseAvatar, BaseLLM, BaseMLLM, BaseSTT, BaseTTS, } from "./vendors/base.mjs";
|
|
34
|
+
// LLM vendor classes
|
|
35
|
+
export { AmazonBedrock, Anthropic, AzureOpenAI, CustomLLM, Dify, Gemini, Groq, OpenAI, VertexAILLM, } from "./vendors/llm.mjs";
|
|
36
|
+
// MLLM vendor classes
|
|
37
|
+
export { GeminiLive, OpenAIRealtime, VertexAI, XaiGrok, } from "./vendors/mllm.mjs";
|
|
38
|
+
// STT vendor classes
|
|
39
|
+
export { AmazonSTT, AresSTT, AssemblyAISTT, DeepgramSTT, GoogleSTT, MicrosoftSTT, OpenAISTT, SarvamSTT, SpeechmaticsSTT, } from "./vendors/stt.mjs";
|
|
40
|
+
// TTS vendor classes
|
|
41
|
+
export { AmazonTTS, CartesiaTTS, DeepgramTTS, ElevenLabsTTS, FishAudioTTS, GoogleTTS, HumeAITTS, MicrosoftTTS, MiniMaxTTS, MurfTTS, OpenAITTS, RimeTTS, SarvamTTS, } from "./vendors/tts.mjs";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type * as Agora from "../api/index.mjs";
|
|
2
|
+
export declare const AgentPresets: {
|
|
3
|
+
readonly asr: {
|
|
4
|
+
readonly deepgramNova2: "deepgram_nova_2";
|
|
5
|
+
readonly deepgramNova3: "deepgram_nova_3";
|
|
6
|
+
};
|
|
7
|
+
readonly llm: {
|
|
8
|
+
readonly openaiGpt4oMini: "openai_gpt_4o_mini";
|
|
9
|
+
readonly openaiGpt41Mini: "openai_gpt_4_1_mini";
|
|
10
|
+
readonly openaiGpt5Nano: "openai_gpt_5_nano";
|
|
11
|
+
readonly openaiGpt5Mini: "openai_gpt_5_mini";
|
|
12
|
+
};
|
|
13
|
+
readonly tts: {
|
|
14
|
+
readonly minimaxSpeech26Turbo: "minimax_speech_2_6_turbo";
|
|
15
|
+
readonly minimaxSpeech28Turbo: "minimax_speech_2_8_turbo";
|
|
16
|
+
readonly openaiTts1: "openai_tts_1";
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const DeepgramPresetModels: readonly ["nova-2", "nova-3"];
|
|
20
|
+
export declare const OpenAIPresetModels: readonly ["gpt-4o-mini", "gpt-4.1-mini", "gpt-5-nano", "gpt-5-mini"];
|
|
21
|
+
export declare const OpenAITtsPresetModels: readonly ["tts-1"];
|
|
22
|
+
export declare const MiniMaxPresetModels: readonly ["speech-2.6-turbo", "speech_2_6_turbo", "speech-2.8-turbo", "speech_2_8_turbo"];
|
|
23
|
+
export type AsrPreset = (typeof AgentPresets.asr)[keyof typeof AgentPresets.asr];
|
|
24
|
+
export type LlmPreset = (typeof AgentPresets.llm)[keyof typeof AgentPresets.llm];
|
|
25
|
+
export type TtsPreset = (typeof AgentPresets.tts)[keyof typeof AgentPresets.tts];
|
|
26
|
+
export type AgentPreset = AsrPreset | LlmPreset | TtsPreset;
|
|
27
|
+
export type PresetInput = AgentPreset | readonly AgentPreset[] | string;
|
|
28
|
+
export type DeepgramPresetModel = (typeof DeepgramPresetModels)[number];
|
|
29
|
+
export type OpenAIPresetModel = (typeof OpenAIPresetModels)[number];
|
|
30
|
+
export type OpenAITtsPresetModel = (typeof OpenAITtsPresetModels)[number];
|
|
31
|
+
export type MiniMaxPresetModel = (typeof MiniMaxPresetModels)[number];
|
|
32
|
+
export declare function normalizePresetInput(preset?: PresetInput | readonly string[]): string | undefined;
|
|
33
|
+
export declare function resolveSessionPresets(args: {
|
|
34
|
+
preset?: PresetInput;
|
|
35
|
+
properties: Agora.StartAgentsRequest.Properties;
|
|
36
|
+
}): {
|
|
37
|
+
preset?: string;
|
|
38
|
+
properties: Agora.StartAgentsRequest.Properties;
|
|
39
|
+
};
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
export const AgentPresets = {
|
|
13
|
+
asr: {
|
|
14
|
+
deepgramNova2: "deepgram_nova_2",
|
|
15
|
+
deepgramNova3: "deepgram_nova_3",
|
|
16
|
+
},
|
|
17
|
+
llm: {
|
|
18
|
+
openaiGpt4oMini: "openai_gpt_4o_mini",
|
|
19
|
+
openaiGpt41Mini: "openai_gpt_4_1_mini",
|
|
20
|
+
openaiGpt5Nano: "openai_gpt_5_nano",
|
|
21
|
+
openaiGpt5Mini: "openai_gpt_5_mini",
|
|
22
|
+
},
|
|
23
|
+
tts: {
|
|
24
|
+
minimaxSpeech26Turbo: "minimax_speech_2_6_turbo",
|
|
25
|
+
minimaxSpeech28Turbo: "minimax_speech_2_8_turbo",
|
|
26
|
+
openaiTts1: "openai_tts_1",
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
export const DeepgramPresetModels = ["nova-2", "nova-3"];
|
|
30
|
+
export const OpenAIPresetModels = ["gpt-4o-mini", "gpt-4.1-mini", "gpt-5-nano", "gpt-5-mini"];
|
|
31
|
+
export const OpenAITtsPresetModels = ["tts-1"];
|
|
32
|
+
export const MiniMaxPresetModels = [
|
|
33
|
+
"speech-2.6-turbo",
|
|
34
|
+
"speech_2_6_turbo",
|
|
35
|
+
"speech-2.8-turbo",
|
|
36
|
+
"speech_2_8_turbo",
|
|
37
|
+
];
|
|
38
|
+
const OPENAI_CHAT_COMPLETIONS_URL = "https://api.openai.com/v1/chat/completions";
|
|
39
|
+
const deepgramModelToPreset = {
|
|
40
|
+
"nova-2": AgentPresets.asr.deepgramNova2,
|
|
41
|
+
"nova-3": AgentPresets.asr.deepgramNova3,
|
|
42
|
+
};
|
|
43
|
+
const openAiModelToPreset = {
|
|
44
|
+
"gpt-4o-mini": AgentPresets.llm.openaiGpt4oMini,
|
|
45
|
+
"gpt-4.1-mini": AgentPresets.llm.openaiGpt41Mini,
|
|
46
|
+
"gpt-5-nano": AgentPresets.llm.openaiGpt5Nano,
|
|
47
|
+
"gpt-5-mini": AgentPresets.llm.openaiGpt5Mini,
|
|
48
|
+
};
|
|
49
|
+
const minimaxModelToPreset = {
|
|
50
|
+
"speech-2.6-turbo": AgentPresets.tts.minimaxSpeech26Turbo,
|
|
51
|
+
speech_2_6_turbo: AgentPresets.tts.minimaxSpeech26Turbo,
|
|
52
|
+
"speech-2.8-turbo": AgentPresets.tts.minimaxSpeech28Turbo,
|
|
53
|
+
speech_2_8_turbo: AgentPresets.tts.minimaxSpeech28Turbo,
|
|
54
|
+
};
|
|
55
|
+
function normalizeModelName(value) {
|
|
56
|
+
return typeof value === "string" ? value.trim().toLowerCase() : undefined;
|
|
57
|
+
}
|
|
58
|
+
function getPresetCategory(preset) {
|
|
59
|
+
if (Object.values(AgentPresets.asr).includes(preset))
|
|
60
|
+
return "asr";
|
|
61
|
+
if (Object.values(AgentPresets.llm).includes(preset))
|
|
62
|
+
return "llm";
|
|
63
|
+
if (Object.values(AgentPresets.tts).includes(preset))
|
|
64
|
+
return "tts";
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
function parsePresetInput(preset) {
|
|
68
|
+
if (preset == null)
|
|
69
|
+
return [];
|
|
70
|
+
if (Array.isArray(preset))
|
|
71
|
+
return preset.map((item) => item.trim()).filter(Boolean);
|
|
72
|
+
if (typeof preset !== "string")
|
|
73
|
+
return [];
|
|
74
|
+
return preset
|
|
75
|
+
.split(",")
|
|
76
|
+
.map((item) => item.trim())
|
|
77
|
+
.filter(Boolean);
|
|
78
|
+
}
|
|
79
|
+
function omitUndefinedKeys(value) {
|
|
80
|
+
const next = Object.fromEntries(Object.entries(value).filter(([, entry]) => entry !== undefined));
|
|
81
|
+
return Object.keys(next).length > 0 ? next : undefined;
|
|
82
|
+
}
|
|
83
|
+
function inferAsrPreset(asr) {
|
|
84
|
+
var _a, _b, _c;
|
|
85
|
+
if (!asr || asr.vendor !== "deepgram" || ((_a = asr.params) === null || _a === void 0 ? void 0 : _a.api_key))
|
|
86
|
+
return undefined;
|
|
87
|
+
const preset = deepgramModelToPreset[(_c = normalizeModelName((_b = asr.params) === null || _b === void 0 ? void 0 : _b.model)) !== null && _c !== void 0 ? _c : ""];
|
|
88
|
+
if (!preset)
|
|
89
|
+
return undefined;
|
|
90
|
+
return {
|
|
91
|
+
category: "asr",
|
|
92
|
+
preset,
|
|
93
|
+
stripModel: true,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
function inferLlmPreset(llm) {
|
|
97
|
+
var _a, _b;
|
|
98
|
+
if (!llm || llm.api_key)
|
|
99
|
+
return undefined;
|
|
100
|
+
if (llm.vendor && llm.vendor !== "openai")
|
|
101
|
+
return undefined;
|
|
102
|
+
if (llm.url && llm.url !== OPENAI_CHAT_COMPLETIONS_URL)
|
|
103
|
+
return undefined;
|
|
104
|
+
const preset = openAiModelToPreset[(_b = normalizeModelName((_a = llm.params) === null || _a === void 0 ? void 0 : _a.model)) !== null && _b !== void 0 ? _b : ""];
|
|
105
|
+
if (!preset)
|
|
106
|
+
return undefined;
|
|
107
|
+
return {
|
|
108
|
+
category: "llm",
|
|
109
|
+
preset,
|
|
110
|
+
stripModel: true,
|
|
111
|
+
stripDefaultUrl: true,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
function inferTtsPreset(tts) {
|
|
115
|
+
var _a, _b, _c, _d, _e, _f;
|
|
116
|
+
if (!tts)
|
|
117
|
+
return undefined;
|
|
118
|
+
if (tts.vendor === "openai") {
|
|
119
|
+
if ((_a = tts.params) === null || _a === void 0 ? void 0 : _a.api_key)
|
|
120
|
+
return undefined;
|
|
121
|
+
const model = (_c = normalizeModelName((_b = tts.params) === null || _b === void 0 ? void 0 : _b.model)) !== null && _c !== void 0 ? _c : "tts-1";
|
|
122
|
+
if (model !== "tts-1")
|
|
123
|
+
return undefined;
|
|
124
|
+
return {
|
|
125
|
+
category: "tts",
|
|
126
|
+
preset: AgentPresets.tts.openaiTts1,
|
|
127
|
+
vendor: "openai",
|
|
128
|
+
stripModel: true,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
if (tts.vendor === "minimax") {
|
|
132
|
+
if ((_d = tts.params) === null || _d === void 0 ? void 0 : _d.key)
|
|
133
|
+
return undefined;
|
|
134
|
+
const preset = minimaxModelToPreset[(_f = normalizeModelName((_e = tts.params) === null || _e === void 0 ? void 0 : _e.model)) !== null && _f !== void 0 ? _f : ""];
|
|
135
|
+
if (!preset)
|
|
136
|
+
return undefined;
|
|
137
|
+
return {
|
|
138
|
+
category: "tts",
|
|
139
|
+
preset,
|
|
140
|
+
vendor: "minimax",
|
|
141
|
+
stripModel: true,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
return undefined;
|
|
145
|
+
}
|
|
146
|
+
function stripInferredPresetFields(properties, inferred) {
|
|
147
|
+
var _a, _b, _c, _d;
|
|
148
|
+
let asr = properties.asr;
|
|
149
|
+
const asrInference = inferred.asr;
|
|
150
|
+
if (asr && asrInference) {
|
|
151
|
+
asr = Object.assign(Object.assign({}, asr), { params: omitUndefinedKeys(Object.assign(Object.assign({}, asr.params), { api_key: undefined, model: asrInference.stripModel ? undefined : (_a = asr.params) === null || _a === void 0 ? void 0 : _a.model })) });
|
|
152
|
+
}
|
|
153
|
+
let llm = properties.llm;
|
|
154
|
+
const llmInference = inferred.llm;
|
|
155
|
+
if (llm && llmInference) {
|
|
156
|
+
const { url: llmUrl } = llm, llmRest = __rest(llm, ["url"]);
|
|
157
|
+
llm = Object.assign(Object.assign({}, llmRest), { api_key: undefined, url: llmInference.stripDefaultUrl ? undefined : llmUrl, params: omitUndefinedKeys(Object.assign(Object.assign({}, llm.params), { model: llmInference.stripModel ? undefined : (_b = llm.params) === null || _b === void 0 ? void 0 : _b.model })) });
|
|
158
|
+
}
|
|
159
|
+
let tts = properties.tts;
|
|
160
|
+
const ttsInference = inferred.tts;
|
|
161
|
+
if (tts && ttsInference) {
|
|
162
|
+
if (ttsInference.vendor === "openai" && tts.vendor === "openai") {
|
|
163
|
+
tts = Object.assign(Object.assign({}, tts), { params: omitUndefinedKeys(Object.assign(Object.assign({}, tts.params), { api_key: undefined, model: ttsInference.stripModel ? undefined : (_c = tts.params) === null || _c === void 0 ? void 0 : _c.model })) });
|
|
164
|
+
}
|
|
165
|
+
else if (ttsInference.vendor === "minimax" && tts.vendor === "minimax") {
|
|
166
|
+
tts = Object.assign(Object.assign({}, tts), { params: omitUndefinedKeys(Object.assign(Object.assign({}, tts.params), { key: undefined, group_id: undefined, url: undefined, model: ttsInference.stripModel ? undefined : (_d = tts.params) === null || _d === void 0 ? void 0 : _d.model })) });
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return Object.assign(Object.assign({}, properties), { asr, llm, tts });
|
|
170
|
+
}
|
|
171
|
+
export function normalizePresetInput(preset) {
|
|
172
|
+
const entries = parsePresetInput(preset);
|
|
173
|
+
return entries.length > 0 ? entries.join(",") : undefined;
|
|
174
|
+
}
|
|
175
|
+
export function resolveSessionPresets(args) {
|
|
176
|
+
const explicitPresets = parsePresetInput(args.preset);
|
|
177
|
+
const explicitCategories = new Set(explicitPresets.map(getPresetCategory).filter(Boolean));
|
|
178
|
+
const inferred = {};
|
|
179
|
+
if (!explicitCategories.has("asr")) {
|
|
180
|
+
const result = inferAsrPreset(args.properties.asr);
|
|
181
|
+
if (result)
|
|
182
|
+
inferred.asr = result;
|
|
183
|
+
}
|
|
184
|
+
if (!explicitCategories.has("llm")) {
|
|
185
|
+
const result = inferLlmPreset(args.properties.llm);
|
|
186
|
+
if (result)
|
|
187
|
+
inferred.llm = result;
|
|
188
|
+
}
|
|
189
|
+
if (!explicitCategories.has("tts")) {
|
|
190
|
+
const result = inferTtsPreset(args.properties.tts);
|
|
191
|
+
if (result)
|
|
192
|
+
inferred.tts = result;
|
|
193
|
+
}
|
|
194
|
+
const inferredPresets = Object.values(inferred).map((result) => result.preset);
|
|
195
|
+
return {
|
|
196
|
+
preset: normalizePresetInput([...explicitPresets, ...inferredPresets]),
|
|
197
|
+
properties: stripInferredPresetFields(args.properties, inferred),
|
|
198
|
+
};
|
|
199
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Token generation for internal use by the agentkit layer.
|
|
3
|
+
*
|
|
4
|
+
* - RTC tokens authenticate a specific (appId, channel, uid) combination with
|
|
5
|
+
* the Agora RTC network.
|
|
6
|
+
* - ConvoAI tokens are combined RTC + RTM tokens used to authenticate ConvoAI
|
|
7
|
+
* REST API calls via `Authorization: agora token=<token>`.
|
|
8
|
+
*
|
|
9
|
+
* The `agora-token` library handles the JWT signing.
|
|
10
|
+
*/
|
|
11
|
+
export declare const MAX_EXPIRY_SECONDS = 86400;
|
|
12
|
+
/**
|
|
13
|
+
* Convenience helpers for specifying token expiry durations.
|
|
14
|
+
*
|
|
15
|
+
* Agora AccessToken2 tokens are valid for a maximum of 24 hours (86400 seconds).
|
|
16
|
+
* Use these helpers with `expiresIn` when creating sessions to avoid hardcoding
|
|
17
|
+
* raw second values.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```typescript
|
|
21
|
+
* agent.createSession(client, {
|
|
22
|
+
* channel: 'room-123',
|
|
23
|
+
* agentUid: '1',
|
|
24
|
+
* remoteUids: ['100'],
|
|
25
|
+
* expiresIn: ExpiresIn.hours(12),
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare const ExpiresIn: {
|
|
30
|
+
MAX: 86400;
|
|
31
|
+
HOUR: 3600;
|
|
32
|
+
DAY: 86400;
|
|
33
|
+
hours(h: number): number;
|
|
34
|
+
minutes(m: number): number;
|
|
35
|
+
seconds(s: number): number;
|
|
36
|
+
};
|
|
37
|
+
export interface GenerateTokenOptions {
|
|
38
|
+
appId: string;
|
|
39
|
+
appCertificate: string;
|
|
40
|
+
channel: string;
|
|
41
|
+
uid: number;
|
|
42
|
+
role?: number;
|
|
43
|
+
expirySeconds?: number;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Builds a short-lived RTC token for a numeric UID.
|
|
47
|
+
*
|
|
48
|
+
* Both `tokenExpire` and `privilegeExpire` are set to the same value — the
|
|
49
|
+
* standard approach for most applications.
|
|
50
|
+
*/
|
|
51
|
+
export declare function generateRtcToken(opts: GenerateTokenOptions): string;
|
|
52
|
+
export interface GenerateRtcTokenWithAccountOptions {
|
|
53
|
+
appId: string;
|
|
54
|
+
appCertificate: string;
|
|
55
|
+
channel: string;
|
|
56
|
+
/** String account identity — used when enableStringUid is true */
|
|
57
|
+
account: string;
|
|
58
|
+
role?: number;
|
|
59
|
+
expirySeconds?: number;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Builds a short-lived RTC token for a string UID (user account).
|
|
63
|
+
*
|
|
64
|
+
* Use this instead of `generateRtcToken` when `enableStringUid` is true and
|
|
65
|
+
* the agent UID is a non-numeric string. The Agora platform treats
|
|
66
|
+
* `buildTokenWithUserAccount` tokens as valid for string-UID channels.
|
|
67
|
+
*
|
|
68
|
+
* Both `tokenExpire` and `privilegeExpire` are set to the same value.
|
|
69
|
+
*/
|
|
70
|
+
export declare function generateRtcTokenWithAccount(opts: GenerateRtcTokenWithAccountOptions): string;
|
|
71
|
+
export interface GenerateConvoAITokenOptions {
|
|
72
|
+
appId: string;
|
|
73
|
+
appCertificate: string;
|
|
74
|
+
/** The channel the agent will join — must match the channel used in the start request */
|
|
75
|
+
channelName: string;
|
|
76
|
+
/** Numeric ConvoAI participant UID. Use the RTC UID for a user, agent, or avatar. */
|
|
77
|
+
uid: number;
|
|
78
|
+
/** Seconds until the token expires (default: 86400) */
|
|
79
|
+
tokenExpire?: number;
|
|
80
|
+
/**
|
|
81
|
+
* Seconds until privileges expire. Defaults to the same value as `tokenExpire`.
|
|
82
|
+
* Per Agora docs, setting this to 0 would expire privileges immediately — the SDK
|
|
83
|
+
* always substitutes `tokenExpire` when this is 0 or omitted.
|
|
84
|
+
*/
|
|
85
|
+
privilegeExpire?: number;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Builds a combined RTC + RTM token for ConvoAI REST API authentication.
|
|
89
|
+
*
|
|
90
|
+
* The resulting token is used as: `Authorization: agora token=<token>`
|
|
91
|
+
*
|
|
92
|
+
* Uses `buildTokenWithRtm` which bundles both RTC channel access and RTM
|
|
93
|
+
* messaging privileges in a single AccessToken2 token.
|
|
94
|
+
*/
|
|
95
|
+
export declare function generateConvoAIToken(opts: GenerateConvoAITokenOptions): string;
|