@convai/web-sdk 1.9.0-beta.7 → 1.9.1
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 +66 -33
- package/dist/core/AudioManager.d.ts +0 -1
- package/dist/core/AudioManager.js +0 -1
- package/dist/core/BlendshapeQueue.d.ts +0 -1
- package/dist/core/BlendshapeQueue.js +20 -6
- package/dist/core/CharacterRoster.d.ts +0 -1
- package/dist/core/CharacterRoster.js +0 -1
- package/dist/core/CharacterVersionManager.d.ts +0 -1
- package/dist/core/CharacterVersionManager.js +0 -1
- package/dist/core/ConnectionStateHandler.d.ts +0 -1
- package/dist/core/ConnectionStateHandler.js +5 -2
- package/dist/core/ConvaiClient.d.ts +31 -3
- package/dist/core/ConvaiClient.js +136 -14
- package/dist/core/ConvaiRoomError.d.ts +0 -1
- package/dist/core/ConvaiRoomError.js +20 -2
- package/dist/core/EventEmitter.d.ts +0 -1
- package/dist/core/EventEmitter.js +0 -1
- package/dist/core/MemoryManager.d.ts +0 -1
- package/dist/core/MemoryManager.js +0 -1
- package/dist/core/MessageHandler.d.ts +0 -1
- package/dist/core/MessageHandler.js +41 -10
- package/dist/core/SSESession.d.ts +0 -1
- package/dist/core/SSESession.js +0 -1
- package/dist/core/ScreenShareManager.d.ts +0 -1
- package/dist/core/ScreenShareManager.js +0 -1
- package/dist/core/VideoManager.d.ts +0 -1
- package/dist/core/VideoManager.js +0 -1
- package/dist/core/characterInfo.d.ts +45 -0
- package/dist/core/characterInfo.js +55 -0
- package/dist/core/characterReference.d.ts +0 -1
- package/dist/core/characterReference.js +0 -1
- package/dist/core/connectRequest.d.ts +0 -1
- package/dist/core/connectRequest.js +0 -1
- package/dist/core/contextUpdateRequest.d.ts +0 -1
- package/dist/core/contextUpdateRequest.js +0 -1
- package/dist/core/index.d.ts +4 -3
- package/dist/core/index.js +20 -3
- package/dist/core/logicalTurn.d.ts +0 -1
- package/dist/core/logicalTurn.js +0 -1
- package/dist/core/modelOutput.d.ts +0 -1
- package/dist/core/modelOutput.js +0 -1
- package/dist/core/publishedChat.d.ts +0 -1
- package/dist/core/publishedChat.js +0 -1
- package/dist/core/rosterRequest.d.ts +0 -1
- package/dist/core/rosterRequest.js +0 -1
- package/dist/core/rtviEnvelope.d.ts +0 -1
- package/dist/core/rtviEnvelope.js +0 -1
- package/dist/core/types.d.ts +112 -10
- package/dist/core/types.js +0 -1
- package/dist/core/videoSourceState.d.ts +0 -1
- package/dist/core/videoSourceState.js +0 -1
- package/dist/core/visionRequest.d.ts +0 -1
- package/dist/core/visionRequest.js +0 -1
- package/dist/embed/index.d.ts +11 -1
- package/dist/embed/index.js +11 -1
- package/dist/embed/publicationApi.d.ts +0 -1
- package/dist/embed/publicationApi.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/lipsync-helpers/arkitOrder61.d.ts +0 -1
- package/dist/lipsync-helpers/arkitOrder61.js +5 -3
- package/dist/lipsync-helpers/createBlendshapeQueue.d.ts +0 -1
- package/dist/lipsync-helpers/createBlendshapeQueue.js +7 -1
- package/dist/lipsync-helpers/declarativeMapping.d.ts +2 -1
- package/dist/lipsync-helpers/declarativeMapping.js +72 -146
- package/dist/lipsync-helpers/index.d.ts +0 -1
- package/dist/lipsync-helpers/index.js +0 -1
- package/dist/lipsync-helpers/mappingTypes.d.ts +6 -5
- package/dist/lipsync-helpers/mappingTypes.js +0 -1
- package/dist/lipsync-helpers/metahumanOrder251.d.ts +0 -1
- package/dist/lipsync-helpers/metahumanOrder251.js +8 -9
- package/dist/lipsync-helpers/mhaLimitDrivers.d.ts +0 -1
- package/dist/lipsync-helpers/mhaLimitDrivers.js +0 -1
- package/dist/lipsync-helpers/naturalness/processor.d.ts +0 -1
- package/dist/lipsync-helpers/naturalness/processor.js +6 -4
- package/dist/lipsync-helpers/naturalness/profiles/mha.d.ts +0 -1
- package/dist/lipsync-helpers/naturalness/profiles/mha.js +0 -1
- package/dist/lipsync-helpers/naturalness/types.d.ts +0 -1
- package/dist/lipsync-helpers/naturalness/types.js +0 -1
- package/dist/lipsync-helpers/presetMappers.d.ts +0 -1
- package/dist/lipsync-helpers/presetMappers.js +0 -1
- package/dist/react/components/ConvaiWidget.d.ts +0 -1
- package/dist/react/components/ConvaiWidget.js +16 -8
- package/dist/react/components/index.d.ts +0 -1
- package/dist/react/components/index.js +0 -1
- package/dist/react/components/rtc-widget/components/AudioSettingsPanel.d.ts +0 -1
- package/dist/react/components/rtc-widget/components/AudioSettingsPanel.js +0 -1
- package/dist/react/components/rtc-widget/components/AudioVisualizer.d.ts +0 -1
- package/dist/react/components/rtc-widget/components/AudioVisualizer.js +0 -1
- package/dist/react/components/rtc-widget/components/ConviMessage.d.ts +0 -1
- package/dist/react/components/rtc-widget/components/ConviMessage.js +0 -1
- package/dist/react/components/rtc-widget/components/FloatingVideo.d.ts +0 -1
- package/dist/react/components/rtc-widget/components/FloatingVideo.js +0 -1
- package/dist/react/components/rtc-widget/components/MarkdownRenderer.d.ts +0 -1
- package/dist/react/components/rtc-widget/components/MarkdownRenderer.js +0 -1
- package/dist/react/components/rtc-widget/components/MessageBubble.d.ts +0 -1
- package/dist/react/components/rtc-widget/components/MessageBubble.js +0 -1
- package/dist/react/components/rtc-widget/components/MessageList.d.ts +0 -1
- package/dist/react/components/rtc-widget/components/MessageList.js +0 -1
- package/dist/react/components/rtc-widget/components/SiteCard.d.ts +0 -1
- package/dist/react/components/rtc-widget/components/SiteCard.js +0 -1
- package/dist/react/components/rtc-widget/components/UserMessage.d.ts +0 -1
- package/dist/react/components/rtc-widget/components/UserMessage.js +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.d.ts +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.js +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.d.ts +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.js +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.d.ts +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.js +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.d.ts +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.js +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.d.ts +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.js +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/index.d.ts +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/index.js +0 -1
- package/dist/react/components/rtc-widget/components/index.d.ts +0 -1
- package/dist/react/components/rtc-widget/components/index.js +0 -1
- package/dist/react/components/rtc-widget/index.d.ts +0 -1
- package/dist/react/components/rtc-widget/index.js +0 -1
- package/dist/react/components/rtc-widget/styles/framerConfig.d.ts +0 -1
- package/dist/react/components/rtc-widget/styles/framerConfig.js +0 -1
- package/dist/react/components/rtc-widget/styles/icons.d.ts +0 -1
- package/dist/react/components/rtc-widget/styles/icons.js +0 -1
- package/dist/react/components/rtc-widget/styles/index.d.ts +0 -1
- package/dist/react/components/rtc-widget/styles/index.js +0 -1
- package/dist/react/components/rtc-widget/styles/styledComponents.d.ts +0 -1
- package/dist/react/components/rtc-widget/styles/styledComponents.js +0 -1
- package/dist/react/components/rtc-widget/styles/theme.d.ts +0 -1
- package/dist/react/components/rtc-widget/styles/theme.js +0 -1
- package/dist/react/components/rtc-widget/types/index.d.ts +0 -1
- package/dist/react/components/rtc-widget/types/index.js +0 -1
- package/dist/react/hooks/index.d.ts +0 -1
- package/dist/react/hooks/index.js +0 -1
- package/dist/react/hooks/useCharacterInfo.d.ts +12 -11
- package/dist/react/hooks/useCharacterInfo.js +49 -50
- package/dist/react/hooks/useConvaiClient.d.ts +0 -1
- package/dist/react/hooks/useConvaiClient.js +6 -5
- package/dist/react/hooks/useLocalCameraTrack.d.ts +0 -1
- package/dist/react/hooks/useLocalCameraTrack.js +0 -1
- package/dist/react/icons.d.ts +0 -1
- package/dist/react/icons.js +0 -1
- package/dist/react/index.d.ts +0 -1
- package/dist/react/index.js +0 -1
- package/dist/utils/inlineMarkdown.d.ts +0 -1
- package/dist/utils/inlineMarkdown.js +0 -1
- package/dist/utils/lightbox.d.ts +0 -1
- package/dist/utils/lightbox.js +0 -1
- package/dist/utils/linkPresentation.d.ts +0 -1
- package/dist/utils/linkPresentation.js +0 -1
- package/dist/utils/linkPreview.d.ts +0 -1
- package/dist/utils/linkPreview.js +0 -1
- package/dist/utils/logger.d.ts +0 -1
- package/dist/utils/logger.js +0 -1
- package/dist/vanilla/AudioRenderer.d.ts +0 -1
- package/dist/vanilla/AudioRenderer.js +0 -1
- package/dist/vanilla/ConvaiWidget.d.ts +0 -1
- package/dist/vanilla/ConvaiWidget.js +18 -30
- package/dist/vanilla/WebSocketSession.d.ts +0 -1
- package/dist/vanilla/WebSocketSession.js +0 -1
- package/dist/vanilla/WidgetEventSubscriptions.d.ts +0 -1
- package/dist/vanilla/WidgetEventSubscriptions.js +0 -1
- package/dist/vanilla/icons.d.ts +0 -1
- package/dist/vanilla/icons.js +0 -1
- package/dist/vanilla/index.d.ts +0 -1
- package/dist/vanilla/index.js +0 -1
- package/dist/vanilla/styles.d.ts +0 -1
- package/dist/vanilla/styles.js +0 -1
- package/dist/vanilla/types.d.ts +0 -1
- package/dist/vanilla/types.js +0 -1
- package/dist/vanilla/websocket.d.ts +0 -1
- package/dist/vanilla/websocket.js +0 -1
- package/dist/version.d.ts +1 -2
- package/dist/version.js +1 -2
- package/package.json +3 -3
- package/dist/core/AudioManager.d.ts.map +0 -1
- package/dist/core/AudioManager.js.map +0 -1
- package/dist/core/BlendshapeQueue.d.ts.map +0 -1
- package/dist/core/BlendshapeQueue.js.map +0 -1
- package/dist/core/CharacterRoster.d.ts.map +0 -1
- package/dist/core/CharacterRoster.js.map +0 -1
- package/dist/core/CharacterVersionManager.d.ts.map +0 -1
- package/dist/core/CharacterVersionManager.js.map +0 -1
- package/dist/core/ConnectionStateHandler.d.ts.map +0 -1
- package/dist/core/ConnectionStateHandler.js.map +0 -1
- package/dist/core/ConvaiClient.d.ts.map +0 -1
- package/dist/core/ConvaiClient.js.map +0 -1
- package/dist/core/ConvaiRoomError.d.ts.map +0 -1
- package/dist/core/ConvaiRoomError.js.map +0 -1
- package/dist/core/EventEmitter.d.ts.map +0 -1
- package/dist/core/EventEmitter.js.map +0 -1
- package/dist/core/MemoryManager.d.ts.map +0 -1
- package/dist/core/MemoryManager.js.map +0 -1
- package/dist/core/MessageHandler.d.ts.map +0 -1
- package/dist/core/MessageHandler.js.map +0 -1
- package/dist/core/SSESession.d.ts.map +0 -1
- package/dist/core/SSESession.js.map +0 -1
- package/dist/core/ScreenShareManager.d.ts.map +0 -1
- package/dist/core/ScreenShareManager.js.map +0 -1
- package/dist/core/VideoManager.d.ts.map +0 -1
- package/dist/core/VideoManager.js.map +0 -1
- package/dist/core/characterReference.d.ts.map +0 -1
- package/dist/core/characterReference.js.map +0 -1
- package/dist/core/connectRequest.d.ts.map +0 -1
- package/dist/core/connectRequest.js.map +0 -1
- package/dist/core/contextUpdateRequest.d.ts.map +0 -1
- package/dist/core/contextUpdateRequest.js.map +0 -1
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js.map +0 -1
- package/dist/core/logicalTurn.d.ts.map +0 -1
- package/dist/core/logicalTurn.js.map +0 -1
- package/dist/core/modelOutput.d.ts.map +0 -1
- package/dist/core/modelOutput.js.map +0 -1
- package/dist/core/publishedChat.d.ts.map +0 -1
- package/dist/core/publishedChat.js.map +0 -1
- package/dist/core/rosterRequest.d.ts.map +0 -1
- package/dist/core/rosterRequest.js.map +0 -1
- package/dist/core/rtviEnvelope.d.ts.map +0 -1
- package/dist/core/rtviEnvelope.js.map +0 -1
- package/dist/core/types.d.ts.map +0 -1
- package/dist/core/types.js.map +0 -1
- package/dist/core/videoSourceState.d.ts.map +0 -1
- package/dist/core/videoSourceState.js.map +0 -1
- package/dist/core/visionRequest.d.ts.map +0 -1
- package/dist/core/visionRequest.js.map +0 -1
- package/dist/embed/index.d.ts.map +0 -1
- package/dist/embed/index.js.map +0 -1
- package/dist/embed/publicationApi.d.ts.map +0 -1
- package/dist/embed/publicationApi.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lipsync-helpers/arkitOrder61.d.ts.map +0 -1
- package/dist/lipsync-helpers/arkitOrder61.js.map +0 -1
- package/dist/lipsync-helpers/createBlendshapeQueue.d.ts.map +0 -1
- package/dist/lipsync-helpers/createBlendshapeQueue.js.map +0 -1
- package/dist/lipsync-helpers/declarativeMapping.d.ts.map +0 -1
- package/dist/lipsync-helpers/declarativeMapping.js.map +0 -1
- package/dist/lipsync-helpers/index.d.ts.map +0 -1
- package/dist/lipsync-helpers/index.js.map +0 -1
- package/dist/lipsync-helpers/mappingTypes.d.ts.map +0 -1
- package/dist/lipsync-helpers/mappingTypes.js.map +0 -1
- package/dist/lipsync-helpers/metahumanOrder251.d.ts.map +0 -1
- package/dist/lipsync-helpers/metahumanOrder251.js.map +0 -1
- package/dist/lipsync-helpers/mhaLimitDrivers.d.ts.map +0 -1
- package/dist/lipsync-helpers/mhaLimitDrivers.js.map +0 -1
- package/dist/lipsync-helpers/naturalness/processor.d.ts.map +0 -1
- package/dist/lipsync-helpers/naturalness/processor.js.map +0 -1
- package/dist/lipsync-helpers/naturalness/profiles/mha.d.ts.map +0 -1
- package/dist/lipsync-helpers/naturalness/profiles/mha.js.map +0 -1
- package/dist/lipsync-helpers/naturalness/types.d.ts.map +0 -1
- package/dist/lipsync-helpers/naturalness/types.js.map +0 -1
- package/dist/lipsync-helpers/presetMappers.d.ts.map +0 -1
- package/dist/lipsync-helpers/presetMappers.js.map +0 -1
- package/dist/react/components/ConvaiWidget.d.ts.map +0 -1
- package/dist/react/components/ConvaiWidget.js.map +0 -1
- package/dist/react/components/index.d.ts.map +0 -1
- package/dist/react/components/index.js.map +0 -1
- package/dist/react/components/rtc-widget/components/AudioSettingsPanel.d.ts.map +0 -1
- package/dist/react/components/rtc-widget/components/AudioSettingsPanel.js.map +0 -1
- package/dist/react/components/rtc-widget/components/AudioVisualizer.d.ts.map +0 -1
- package/dist/react/components/rtc-widget/components/AudioVisualizer.js.map +0 -1
- package/dist/react/components/rtc-widget/components/ConviMessage.d.ts.map +0 -1
- package/dist/react/components/rtc-widget/components/ConviMessage.js.map +0 -1
- package/dist/react/components/rtc-widget/components/FloatingVideo.d.ts.map +0 -1
- package/dist/react/components/rtc-widget/components/FloatingVideo.js.map +0 -1
- package/dist/react/components/rtc-widget/components/MarkdownRenderer.d.ts.map +0 -1
- package/dist/react/components/rtc-widget/components/MarkdownRenderer.js.map +0 -1
- package/dist/react/components/rtc-widget/components/MessageBubble.d.ts.map +0 -1
- package/dist/react/components/rtc-widget/components/MessageBubble.js.map +0 -1
- package/dist/react/components/rtc-widget/components/MessageList.d.ts.map +0 -1
- package/dist/react/components/rtc-widget/components/MessageList.js.map +0 -1
- package/dist/react/components/rtc-widget/components/SiteCard.d.ts.map +0 -1
- package/dist/react/components/rtc-widget/components/SiteCard.js.map +0 -1
- package/dist/react/components/rtc-widget/components/UserMessage.d.ts.map +0 -1
- package/dist/react/components/rtc-widget/components/UserMessage.js.map +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.d.ts.map +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.js.map +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.d.ts.map +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.js.map +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.d.ts.map +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.js.map +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.d.ts.map +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.js.map +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.d.ts.map +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.js.map +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/index.d.ts.map +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/index.js.map +0 -1
- package/dist/react/components/rtc-widget/components/index.d.ts.map +0 -1
- package/dist/react/components/rtc-widget/components/index.js.map +0 -1
- package/dist/react/components/rtc-widget/index.d.ts.map +0 -1
- package/dist/react/components/rtc-widget/index.js.map +0 -1
- package/dist/react/components/rtc-widget/styles/framerConfig.d.ts.map +0 -1
- package/dist/react/components/rtc-widget/styles/framerConfig.js.map +0 -1
- package/dist/react/components/rtc-widget/styles/icons.d.ts.map +0 -1
- package/dist/react/components/rtc-widget/styles/icons.js.map +0 -1
- package/dist/react/components/rtc-widget/styles/index.d.ts.map +0 -1
- package/dist/react/components/rtc-widget/styles/index.js.map +0 -1
- package/dist/react/components/rtc-widget/styles/styledComponents.d.ts.map +0 -1
- package/dist/react/components/rtc-widget/styles/styledComponents.js.map +0 -1
- package/dist/react/components/rtc-widget/styles/theme.d.ts.map +0 -1
- package/dist/react/components/rtc-widget/styles/theme.js.map +0 -1
- package/dist/react/components/rtc-widget/types/index.d.ts.map +0 -1
- package/dist/react/components/rtc-widget/types/index.js.map +0 -1
- package/dist/react/hooks/index.d.ts.map +0 -1
- package/dist/react/hooks/index.js.map +0 -1
- package/dist/react/hooks/useCharacterInfo.d.ts.map +0 -1
- package/dist/react/hooks/useCharacterInfo.js.map +0 -1
- package/dist/react/hooks/useConvaiClient.d.ts.map +0 -1
- package/dist/react/hooks/useConvaiClient.js.map +0 -1
- package/dist/react/hooks/useLocalCameraTrack.d.ts.map +0 -1
- package/dist/react/hooks/useLocalCameraTrack.js.map +0 -1
- package/dist/react/icons.d.ts.map +0 -1
- package/dist/react/icons.js.map +0 -1
- package/dist/react/index.d.ts.map +0 -1
- package/dist/react/index.js.map +0 -1
- package/dist/utils/inlineMarkdown.d.ts.map +0 -1
- package/dist/utils/inlineMarkdown.js.map +0 -1
- package/dist/utils/lightbox.d.ts.map +0 -1
- package/dist/utils/lightbox.js.map +0 -1
- package/dist/utils/linkPresentation.d.ts.map +0 -1
- package/dist/utils/linkPresentation.js.map +0 -1
- package/dist/utils/linkPreview.d.ts.map +0 -1
- package/dist/utils/linkPreview.js.map +0 -1
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js.map +0 -1
- package/dist/vanilla/AudioRenderer.d.ts.map +0 -1
- package/dist/vanilla/AudioRenderer.js.map +0 -1
- package/dist/vanilla/ConvaiWidget.d.ts.map +0 -1
- package/dist/vanilla/ConvaiWidget.js.map +0 -1
- package/dist/vanilla/WebSocketSession.d.ts.map +0 -1
- package/dist/vanilla/WebSocketSession.js.map +0 -1
- package/dist/vanilla/WidgetEventSubscriptions.d.ts.map +0 -1
- package/dist/vanilla/WidgetEventSubscriptions.js.map +0 -1
- package/dist/vanilla/icons.d.ts.map +0 -1
- package/dist/vanilla/icons.js.map +0 -1
- package/dist/vanilla/index.d.ts.map +0 -1
- package/dist/vanilla/index.js.map +0 -1
- package/dist/vanilla/styles.d.ts.map +0 -1
- package/dist/vanilla/styles.js.map +0 -1
- package/dist/vanilla/types.d.ts.map +0 -1
- package/dist/vanilla/types.js.map +0 -1
- package/dist/vanilla/websocket.d.ts.map +0 -1
- package/dist/vanilla/websocket.js.map +0 -1
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js.map +0 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Real-time conversational AI characters for the web.**
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/@convai/web-sdk)
|
|
6
6
|
[](https://www.typescriptlang.org/)
|
|
7
7
|
[](./LICENSE)
|
|
8
8
|
|
|
@@ -10,19 +10,44 @@ TypeScript-first SDK for embedding Convai AI characters into React and vanilla J
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
## What's new in 1.
|
|
13
|
+
## What's new in 1.9.0
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
> **Breaking for 1.8.0 users:** the `<convai-chat>` custom element and the `./embed/browser` entry point (`dist/embed/chat-embed-v1.js`) are removed. The copy/paste published-chat embed is now `<convai-widget>` from [`@convai/web-widget`](https://www.npmjs.com/package/@convai/web-widget); the [CHANGELOG](./CHANGELOG.md) has the before/after snippet.
|
|
16
16
|
|
|
17
17
|
- **Multi-character rooms** — connect a roster of characters with the `characters` config option (two copies of one character are two independent members), switch who answers with `setInteractionTarget()`, add or remove members live with `updateCharacterRoster()`, and let other participants join the same room with `joinRoom()`. Every transcript line, audio track and readiness event is attributed to a `membershipId`. [Usage below.](#multi-character-rooms-beta)
|
|
18
|
-
- **
|
|
19
|
-
- **
|
|
20
|
-
- **Typed events** — `client.on(event, callback)` infers each callback's payload from the exported `ConvaiEventMap`, so `botReady`, `modelOutput`, `characterStatus` and the rest are checked at compile time. See the [events reference](docs/convai_events.md).
|
|
21
|
-
- **Local transcript lines and usage updates** — `appendMessage()` inserts a line into the transcript without sending anything, and `toggleUsageUpdates(true)` opts into per-turn `usageUpdate` cost breakdowns.
|
|
18
|
+
- **Typed events** — `client.on(event, callback)` infers each callback's payload from the exported `ConvaiEventMap`, so `botReady`, `modelOutput`, `characterStatus` and the rest are checked at compile time. See the [events reference](https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/event-reference).
|
|
19
|
+
- **Local transcript lines and usage updates** — `appendMessage()` inserts a line into the transcript without sending anything, and `toggleUsageUpdates(true)` opts into per-turn `usageUpdate` cost breakdowns (on a session connected with `debug: true`; otherwise the server has no usage stream).
|
|
22
20
|
- **Character versioning** — connect to a character's editable draft, its promoted latest release, or an immutable tag with the `characterVersion` config option, and list, compare, release, promote, fork and discard versions through `client.characterVersions`. [Usage below.](#character-versioning-beta)
|
|
23
|
-
- **SSE interaction transport** —
|
|
21
|
+
- **SSE interaction transport** — chat over the interaction API, selected by `interactionApiUrl`: text in, the reply streamed as text and, with `ttsEnabled`, as speech (`audioData`); the one transport that runs under Node. We recommend SSE for chat and realtime for voice — see [Choosing a Transport](https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/choose-a-transport). [Usage below.](#sse-interaction-transport-beta)
|
|
24
22
|
- **Embeddable vanilla widget** — the vanilla widget runs inside a shadow root, with a character header and a connecting overlay, so it can be dropped into any page.
|
|
25
23
|
- **Node-importable dist** — `@convai/web-sdk/core`, `/vanilla`, `/vanilla/websocket` and `/lipsync-helpers` load in plain Node, SSR and Next.js server components.
|
|
24
|
+
- **Character voice mute** — `setCharacterMuted()` / `isCharacterMuted()` silence the character's voice for the listener; `audioControls` stays the microphone.
|
|
25
|
+
- **Raw transport frames** — the typed `rawMessage` event exposes incoming LiveKit, WebSocket and SSE frames.
|
|
26
|
+
- **Smaller install** — 220 MB → 36 MB of dependencies, and no shipped source maps (681.9 kB → 290.5 kB packed).
|
|
27
|
+
|
|
28
|
+
### Previously in 1.8.0
|
|
29
|
+
|
|
30
|
+
- **Protocol capabilities, opted into one at a time** — `capabilities`
|
|
31
|
+
selects v2 correlated client tool calls, the canonical Core-validated
|
|
32
|
+
`modelOutput` envelope, and raw `bot-llm-text` streaming, each independent
|
|
33
|
+
of the others. Core must confirm a v2 capability or the SDK refuses the
|
|
34
|
+
connection, so a half-upgraded backend fails at connect rather than
|
|
35
|
+
mid-conversation. Omit the block entirely and nothing changes: existing
|
|
36
|
+
connections and one-argument text messages stay on the v1 wire contract.
|
|
37
|
+
[Options table.](https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/actions)
|
|
38
|
+
- **Correlated action results and logical turns** — action results carry the
|
|
39
|
+
call they answer, and turn correlation holds across multi-envelope and
|
|
40
|
+
voice turns, so a response can be tied to its cause without guessing from
|
|
41
|
+
arrival order.
|
|
42
|
+
- **Extension renderer registry** — render custom model-output extensions
|
|
43
|
+
without the SDK knowing your UI framework.
|
|
44
|
+
- **Published chat without a credential** — a text-only connection method for
|
|
45
|
+
published-chat launch grants, plus a native custom-element browser bundle
|
|
46
|
+
at `dist/embed/chat-embed-v1.js` for iframe-free embeds. The embed never
|
|
47
|
+
receives a publisher API key. [Usage below.](#published-text-chat)
|
|
48
|
+
- **Loads in Node without a bundler** — emitted ESM carries explicit relative
|
|
49
|
+
extensions, so the published package and the Chat Publish client resolve
|
|
50
|
+
under plain Node resolution.
|
|
26
51
|
|
|
27
52
|
### Previously in 1.7.0
|
|
28
53
|
|
|
@@ -31,7 +56,7 @@ Install the beta with `npm install @convai/web-sdk@beta`.
|
|
|
31
56
|
- **Lipsync naturalness pipeline** — modular naturalness processing with a tuned MetaHuman profile.
|
|
32
57
|
- **Adaptive glass widget styling** — `ConvaiWidget` adapts to light and dark backgrounds.
|
|
33
58
|
|
|
34
|
-
### 1.6.0
|
|
59
|
+
### Previously in 1.6.0
|
|
35
60
|
|
|
36
61
|
- **Narrative Design template keys** — personalize one narrative graph per session: seed values at connect with the `narrativeTemplateKeys` config option, replace them mid-session with `updateTemplateKeys()`. [Usage below.](#narrative-design-template-keys)
|
|
37
62
|
- **Typed parameterized actions** — `actionResponse` is now typed via the exported `ConvaiAction` / `ActionResponseEvent`, including the `target` of parameterized actions. [Usage below.](#actions)
|
|
@@ -112,7 +137,7 @@ window.addEventListener("beforeunload", () => {
|
|
|
112
137
|
|
|
113
138
|
### Published text chat
|
|
114
139
|
|
|
115
|
-
See the [Published text chat guide](
|
|
140
|
+
See the [Published text chat guide](https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/published-text-chat) for
|
|
116
141
|
React and vanilla integrations, lifecycle behavior, and the complete API
|
|
117
142
|
reference.
|
|
118
143
|
|
|
@@ -145,10 +170,11 @@ session. An application performing its own retry may pass the same
|
|
|
145
170
|
text-only; the server-issued room token does not permit publishing microphone
|
|
146
171
|
or camera tracks.
|
|
147
172
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
not reuse a process-wide
|
|
173
|
+
In a browser, the `@convai/web-sdk/embed` grant helper
|
|
174
|
+
(`requestPublishedChatGrant`) creates its own per-browser requester identifier.
|
|
175
|
+
If a server or SSR integration calls the published-chat grant helpers directly,
|
|
176
|
+
it must pass a caller-scoped requester identifier; do not reuse a process-wide
|
|
177
|
+
identifier across visitors.
|
|
152
178
|
|
|
153
179
|
When using `ConvaiWidget`, provide `requestPublicationGrant` so Reset,
|
|
154
180
|
Disconnect, and later reopen operations mint a new grant instead of attempting
|
|
@@ -222,26 +248,28 @@ Full documentation is at **<a href="https://docs.convai.com/api-docs/plugins-and
|
|
|
222
248
|
|
|
223
249
|
| Guide | Description |
|
|
224
250
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------- |
|
|
225
|
-
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk" target="_blank" rel="noopener noreferrer">Quick Start</a> | First working integration in under 5 minutes |
|
|
226
|
-
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk" target="_blank" rel="noopener noreferrer">Configuration</a> | All `ConvaiConfig` options |
|
|
227
|
-
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk" target="_blank" rel="noopener noreferrer">React Integration</a> | `useConvaiClient`, `ConvaiWidget`, and React-specific patterns |
|
|
228
|
-
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk" target="_blank" rel="noopener noreferrer">Vanilla JS</a> | `ConvaiClient`, `createConvaiWidget`, and audio setup |
|
|
251
|
+
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/quickstart" target="_blank" rel="noopener noreferrer">Quick Start</a> | First working integration in under 5 minutes |
|
|
252
|
+
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/vanilla-typescript/best-practices-and-type-definitions" target="_blank" rel="noopener noreferrer">Configuration</a> | All `ConvaiConfig` options |
|
|
253
|
+
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/react" target="_blank" rel="noopener noreferrer">React Integration</a> | `useConvaiClient`, `ConvaiWidget`, and React-specific patterns |
|
|
254
|
+
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/vanilla-typescript" target="_blank" rel="noopener noreferrer">Vanilla JS</a> | `ConvaiClient`, `createConvaiWidget`, and audio setup |
|
|
229
255
|
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/event-reference" target="_blank" rel="noopener noreferrer">Events</a> | Full event reference — `botReady`, `stateChange`, `messagesChange`, `interactionCreated`, and more |
|
|
230
256
|
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/dynamic-context" target="_blank" rel="noopener noreferrer">Context Management</a> | Dynamic context, `updateContext`, file upload, session management |
|
|
231
257
|
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/emotions" target="_blank" rel="noopener noreferrer">Emotions</a> | Per-turn emotion detection, provider options, and `stateOfMind` / `updateEmotion()` |
|
|
232
|
-
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk" target="_blank" rel="noopener noreferrer">Lipsync</a> | ARKit / MetaHuman blendshape streams and `BlendshapeQueue` API |
|
|
258
|
+
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/lipsync-and-blendshape" target="_blank" rel="noopener noreferrer">Lipsync</a> | ARKit / MetaHuman blendshape streams and `BlendshapeQueue` API |
|
|
233
259
|
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/actions" target="_blank" rel="noopener noreferrer">Actions</a> | Trigger character behaviors and scene actions |
|
|
234
260
|
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/long-term-memory" target="_blank" rel="noopener noreferrer">Memory</a> | Long-term memory scoped to end users |
|
|
235
|
-
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk" target="_blank" rel="noopener noreferrer">Audio & Video</a> | Microphone, camera, screen share controls |
|
|
261
|
+
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/react" target="_blank" rel="noopener noreferrer">Audio & Video</a> | Microphone, camera, screen share controls |
|
|
236
262
|
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/error-handling" target="_blank" rel="noopener noreferrer">Error Handling</a> | `error`, `disconnect`, `serverResponse`, retry patterns |
|
|
237
263
|
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/auth-tokens" target="_blank" rel="noopener noreferrer">Auth Tokens</a> | Server-side token exchange for production |
|
|
238
264
|
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/websocket-transport-layer" target="_blank" rel="noopener noreferrer">WebSocket Transport</a> | Alternative transport for WebRTC-constrained environments |
|
|
239
|
-
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk" target="_blank" rel="noopener noreferrer">SSE Transport</a> |
|
|
240
|
-
| [
|
|
241
|
-
| [
|
|
242
|
-
| [
|
|
243
|
-
| [
|
|
244
|
-
| [
|
|
265
|
+
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/sse-transport" target="_blank" rel="noopener noreferrer">SSE Transport</a> | Chat transport: text in, text or audio out; the one that runs under Node |
|
|
266
|
+
| [Choosing a Transport](https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/choose-a-transport) | SSE vs realtime vs WebSocket, the recommended SSE-chat-plus-voice-mode setup, and why |
|
|
267
|
+
| [Character Versioning](https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/character-versioning) | Connect to a draft, latest, or tagged version; list, compare, release and promote versions |
|
|
268
|
+
| [Multi-Character Rooms](https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/multi-character-rooms) | Rosters, `joinRoom`, interaction targets, live roster updates, per-member attribution |
|
|
269
|
+
| [Published Text Chat](https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/published-text-chat) | Grant-based text-only sessions, the copy/paste embed, lifecycle and API reference |
|
|
270
|
+
| [Link Previews](https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/link-previews) | Rendering links the character sends: previews, custom chat UIs, the scheme allowlist |
|
|
271
|
+
| [Mute the Character's Voice](https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/mute-the-characters-voice) | `setCharacterMuted` / `isCharacterMuted`: silence the character for the listener |
|
|
272
|
+
| [Raw Transport Messages](https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/raw-messages) | The typed `rawMessage` event across LiveKit, WebSocket and SSE |
|
|
245
273
|
|
|
246
274
|
---
|
|
247
275
|
|
|
@@ -297,7 +325,7 @@ See the <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-p
|
|
|
297
325
|
|
|
298
326
|
## SSE interaction transport (beta)
|
|
299
327
|
|
|
300
|
-
Use the interaction API for
|
|
328
|
+
Use the interaction API for chat — typed input, with the reply streamed as text and, optionally, speech:
|
|
301
329
|
|
|
302
330
|
```ts
|
|
303
331
|
const client = new ConvaiClient({
|
|
@@ -311,16 +339,21 @@ client.sendUserTextMessage("Hello!");
|
|
|
311
339
|
```
|
|
312
340
|
|
|
313
341
|
This sends each message as an SSE `POST` with `Authorization: Bearer ...`. Set `transport: "sse"`
|
|
314
|
-
explicitly if preferred.
|
|
342
|
+
explicitly if preferred. With `ttsEnabled: true` the reply's speech streams as `audioData`
|
|
343
|
+
events on the same response; there is no microphone, video, or lipsync. It never calls
|
|
315
344
|
`/connect`, so `connect()` makes no network request and the session id arrives on the first
|
|
316
345
|
interaction via the `characterSessionId` event.
|
|
317
346
|
|
|
347
|
+
We recommend SSE for chat and realtime for voice: start on SSE and move the same conversation to
|
|
348
|
+
realtime when the user wants to talk. See [Choosing a Transport](https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/choose-a-transport)
|
|
349
|
+
for why, and for building on one transport only.
|
|
350
|
+
|
|
318
351
|
Because it needs neither WebRTC nor a DOM, this is the only transport that runs outside a browser.
|
|
319
352
|
Import `@convai/web-sdk/core` from Node, SSR, or a serverless function — not the root or `/react`
|
|
320
353
|
entry points, which pull in browser-only dependencies.
|
|
321
354
|
|
|
322
355
|
The interaction API is currently reachable at staging only; a production host is planned.
|
|
323
|
-
Full guide: [SSE Interaction Transport](docs/
|
|
356
|
+
Full guide: [SSE Interaction Transport](https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/sse-transport).
|
|
324
357
|
|
|
325
358
|
---
|
|
326
359
|
|
|
@@ -369,7 +402,7 @@ staging.
|
|
|
369
402
|
|
|
370
403
|
Explicit selectors are resolved by the runtime through the Character REST platform. Staging has
|
|
371
404
|
this today; production answers explicit selectors with `503` until it is promoted there.
|
|
372
|
-
Full guide: [Character Versioning](docs/
|
|
405
|
+
Full guide: [Character Versioning](https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/character-versioning).
|
|
373
406
|
|
|
374
407
|
---
|
|
375
408
|
|
|
@@ -419,7 +452,7 @@ Key points:
|
|
|
419
452
|
- Room-topology failures throw `ConvaiRoomError` with `status`, `code`, `requestTraceId` and `isRetryable`; the SDK retries `ROSTER_PROVISIONING_IN_PROGRESS` for you (`rosterProvisioningRetry`).
|
|
420
453
|
- Action protocol v2 and `actionConfig.tools` are single-character only and cannot be combined with a roster.
|
|
421
454
|
|
|
422
|
-
Full reference: [
|
|
455
|
+
Full reference: [Host several characters in one room](https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/multi-character-rooms).
|
|
423
456
|
|
|
424
457
|
---
|
|
425
458
|
|
|
@@ -473,7 +506,7 @@ const triggerId = client.visionTrigger({
|
|
|
473
506
|
await client.videoControls.unpublishVisionSource(handle);
|
|
474
507
|
```
|
|
475
508
|
|
|
476
|
-
`visionStatus()` and `visionTrigger()` return an update id. Match it against `serverResponse` events for outcomes such as `frames_available`, `buffer_empty`, `attached`, or `
|
|
509
|
+
`visionStatus()` and `visionTrigger()` return an update id. Match it against `serverResponse` events for outcomes such as `frames_available`, `buffer_empty`, `attached`, `no_active_video` or `vision_not_enabled`. Vision needs more than `enableVideo: true`: the account's unified vision context feature and a vision-capable, non-realtime model. Without them frames publish fine but are never seen, and the SDK warns once per session.
|
|
477
510
|
|
|
478
511
|
---
|
|
479
512
|
|
|
@@ -641,7 +674,7 @@ client.updateEmotion("joy");
|
|
|
641
674
|
client.updateEmotion(null); // clear — "neutral" and "" clear it too
|
|
642
675
|
```
|
|
643
676
|
|
|
644
|
-
Values are trimmed and lowercased. The runtime value carries into the next connect, including a reconnect; an explicit `stateOfMind` in the connect config takes precedence.
|
|
677
|
+
The server applies Plutchik's eight primary emotions — `joy`, `trust`, `fear`, `surprise`, `sadness`, `disgust`, `anger`, `anticipation` — and ignores anything else (the SDK warns). Values are trimmed and lowercased. The runtime value carries into the next connect, including a reconnect; an explicit `stateOfMind` in the connect config takes precedence.
|
|
645
678
|
|
|
646
679
|
Requires backend support — live on production as of 2026-08-20. On a backend without it, the server replies with an `Unknown message type` error on `serverResponse`. Because `/connect` silently ignores unknown fields, a successful connect alone does not prove `state_of_mind` was applied, so watch the ack:
|
|
647
680
|
|
|
@@ -20,6 +20,25 @@
|
|
|
20
20
|
* - Mapper is applied when frames are added to the queue
|
|
21
21
|
* - Common use cases: ARKit 61 → ARKit 52, MetaHuman 251 → Custom format
|
|
22
22
|
*/
|
|
23
|
+
/**
|
|
24
|
+
* A frame scaled by alpha. Mapper output keeps its shape: the
|
|
25
|
+
* lipsync-helpers name mappers hang target names on the array
|
|
26
|
+
* (`__blendshapeNames`) or return `{ names, values, ... }`, and a fade that
|
|
27
|
+
* dropped either made getBlendshapeObject() return {} on faded frames.
|
|
28
|
+
*/
|
|
29
|
+
function scaleFrame(frame, alpha) {
|
|
30
|
+
const optimized = frame;
|
|
31
|
+
if (!(frame instanceof Float32Array) && optimized.values instanceof Float32Array) {
|
|
32
|
+
return { ...optimized, values: optimized.values.map((v) => v * alpha) };
|
|
33
|
+
}
|
|
34
|
+
const faded = new Float32Array(frame.length);
|
|
35
|
+
for (let i = 0; i < frame.length; i++)
|
|
36
|
+
faded[i] = frame[i] * alpha;
|
|
37
|
+
const names = frame.__blendshapeNames;
|
|
38
|
+
if (names)
|
|
39
|
+
Object.defineProperty(faded, "__blendshapeNames", { value: names, enumerable: false });
|
|
40
|
+
return faded;
|
|
41
|
+
}
|
|
23
42
|
export class BlendshapeQueue {
|
|
24
43
|
/**
|
|
25
44
|
* Create a new BlendshapeQueue
|
|
@@ -425,11 +444,7 @@ export class BlendshapeQueue {
|
|
|
425
444
|
}
|
|
426
445
|
// Apply alpha to all morph values
|
|
427
446
|
if (alpha < 1.0) {
|
|
428
|
-
|
|
429
|
-
for (let i = 0; i < frame.length; i++) {
|
|
430
|
-
fadedFrame[i] = frame[i] * alpha;
|
|
431
|
-
}
|
|
432
|
-
return fadedFrame;
|
|
447
|
+
return scaleFrame(frame, alpha);
|
|
433
448
|
}
|
|
434
449
|
return frame;
|
|
435
450
|
}
|
|
@@ -770,4 +785,3 @@ export class BlendshapeQueue {
|
|
|
770
785
|
BlendshapeQueue.TARGET_FPS = 60;
|
|
771
786
|
BlendshapeQueue.MAX_RETIRED_TIMELINE_ALIASES = 48;
|
|
772
787
|
BlendshapeQueue.MISSING_INDEXED_FRAME_GRACE_MS = (24 / BlendshapeQueue.TARGET_FPS) * 1000;
|
|
773
|
-
//# sourceMappingURL=BlendshapeQueue.js.map
|
|
@@ -51,7 +51,11 @@ export class ConnectionStateHandler {
|
|
|
51
51
|
isConnected: true,
|
|
52
52
|
isConnecting: false,
|
|
53
53
|
});
|
|
54
|
-
|
|
54
|
+
// Do not reset bot-ready here. Connecting (and Disconnected) already
|
|
55
|
+
// did, so a fresh connect still waits for it — but the first bot-ready
|
|
56
|
+
// data frame can arrive before this event (measured: 3ms early, 1
|
|
57
|
+
// connect in 5). Resetting then dropped it: botReady fired twice, and
|
|
58
|
+
// isBotReady stayed false until the server happened to send another.
|
|
55
59
|
}
|
|
56
60
|
else if (state === ConnectionState.Connecting) {
|
|
57
61
|
this.onStateUpdate({
|
|
@@ -81,4 +85,3 @@ export class ConnectionStateHandler {
|
|
|
81
85
|
this.onMessageHandlerReset();
|
|
82
86
|
}
|
|
83
87
|
}
|
|
84
|
-
//# sourceMappingURL=ConnectionStateHandler.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Room } from "livekit-client";
|
|
2
|
-
import { ConvaiConfig, ConvaiClientState, ChatMessage, IConvaiClient, PublishedChatConnectOptions, AudioControls, CharacterMuteOptions, VideoControls, ScreenShareControls, DynamicInfo, ContextUpdateOptions, UploadFileOptions, ServerResponse, WebSocketSessionFactory, RespondModeUpdateOptions, UpdateSceneMetadataOptions, VisionStatusOptions, VisionTriggerOptions, ConnectionData, SendUserTextMessageOptions, ConvaiCharacterInstance, ConvaiRoomSession, JoinRoomOptions, ActiveCharacterChange, CharacterRosterChange, UpdateCharacterRosterOptions, AppendMessageOptions, ConvaiEventMap, ActionResult, ActionResultAck, ActionResultAckFailureReason, ActionResultAckOptions } from "./types.js";
|
|
2
|
+
import { ConvaiConfig, ConvaiClientState, ChatMessage, IConvaiClient, PublishedChatConnectOptions, AudioControls, CharacterMuteOptions, VideoControls, ScreenShareControls, DynamicInfo, ContextUpdateOptions, UploadFileOptions, ServerResponse, WebSocketSessionFactory, RespondModeUpdateOptions, UpdateSceneMetadataOptions, VisionStatusOptions, VisionTriggerOptions, ConnectionData, SendUserTextMessageOptions, StateOfMindInput, ConvaiCharacterInstance, ConvaiRoomSession, JoinRoomOptions, ActiveCharacterChange, CharacterRosterChange, UpdateCharacterRosterOptions, AppendMessageOptions, ConvaiEventMap, ActionResult, ActionResultAck, ActionResultAckFailureReason, ActionResultAckOptions } from "./types.js";
|
|
3
3
|
import { EventEmitter } from "./EventEmitter.js";
|
|
4
4
|
import { BlendshapeQueue } from "./BlendshapeQueue.js";
|
|
5
5
|
import { MemoryManager } from "./MemoryManager.js";
|
|
@@ -91,6 +91,12 @@ export declare class ConvaiClient extends EventEmitter implements IConvaiClient
|
|
|
91
91
|
private _rosterCommandSeq;
|
|
92
92
|
private _requestTraceId;
|
|
93
93
|
private _isBotReady;
|
|
94
|
+
/** turnEnd held back until speaking stays stopped (see speakingChange). */
|
|
95
|
+
private _pendingTurnEnd;
|
|
96
|
+
/** How long speaking must stay stopped before a turn is reported ended. */
|
|
97
|
+
private static readonly TURN_END_SETTLE_MS;
|
|
98
|
+
/** Warn once per connect when Core reports vision off for the session. */
|
|
99
|
+
private _warnedVisionNotEnabled;
|
|
94
100
|
private _participantSid;
|
|
95
101
|
private _audioSettings;
|
|
96
102
|
private _storedConfig;
|
|
@@ -99,6 +105,17 @@ export declare class ConvaiClient extends EventEmitter implements IConvaiClient
|
|
|
99
105
|
* so updateEmotion() called before any config is stored is not lost.
|
|
100
106
|
*/
|
|
101
107
|
private _stateOfMind;
|
|
108
|
+
/** States of mind published and not yet acked, oldest first; acks arrive in send order. */
|
|
109
|
+
private _pendingStateOfMindAcks;
|
|
110
|
+
/**
|
|
111
|
+
* Match an update-emotion ack to a value this client sent. The ack carries
|
|
112
|
+
* no request id, its state_of_mind is the state still in effect rather than
|
|
113
|
+
* the value it judged, and acks can arrive out of order (measured: "happy"'s
|
|
114
|
+
* rejection before "joy"'s success). So an applied ack settles the value it
|
|
115
|
+
* names, and a rejected one settles the oldest pending value that is not an
|
|
116
|
+
* accepted state of mind. Returns the rejected value, when it can be named.
|
|
117
|
+
*/
|
|
118
|
+
private _settleStateOfMindAck;
|
|
102
119
|
private _endUserId;
|
|
103
120
|
private _endUserMetadata;
|
|
104
121
|
private _wsSession;
|
|
@@ -180,6 +197,11 @@ export declare class ConvaiClient extends EventEmitter implements IConvaiClient
|
|
|
180
197
|
get requestTraceId(): string | null;
|
|
181
198
|
get isBotReady(): boolean;
|
|
182
199
|
get audioControls(): AudioControls;
|
|
200
|
+
/**
|
|
201
|
+
* Configured origin for the widget's character name/avatar lookup, or null
|
|
202
|
+
* when unset. See {@link ConvaiConfig.characterInfoUrl}.
|
|
203
|
+
*/
|
|
204
|
+
get characterInfoUrl(): string | null;
|
|
183
205
|
/**
|
|
184
206
|
* Silence the character's voice, or bring it back. See
|
|
185
207
|
* {@link IConvaiClient.setCharacterMuted}.
|
|
@@ -456,7 +478,7 @@ export declare class ConvaiClient extends EventEmitter implements IConvaiClient
|
|
|
456
478
|
* Set or clear the character's temporary state of mind.
|
|
457
479
|
* This is silent: it affects the next response and does not trigger one.
|
|
458
480
|
*/
|
|
459
|
-
updateEmotion(stateOfMind:
|
|
481
|
+
updateEmotion(stateOfMind: StateOfMindInput): void;
|
|
460
482
|
/**
|
|
461
483
|
* Send descriptive scene updates. Use when environment description changes
|
|
462
484
|
* and the bot should know what is visible or nearby. Does not modify action_config.
|
|
@@ -465,6 +487,13 @@ export declare class ConvaiClient extends EventEmitter implements IConvaiClient
|
|
|
465
487
|
name: string;
|
|
466
488
|
description: string;
|
|
467
489
|
}>, options?: UpdateSceneMetadataOptions): void;
|
|
490
|
+
/**
|
|
491
|
+
* Mirror a runtime respond-mode change into the stored config, so
|
|
492
|
+
* reconnect() — which replays _storedConfig — does not revert it. text and
|
|
493
|
+
* audio are typed `"must_respond"` only in the config, so other values for
|
|
494
|
+
* them stay runtime-only rather than widening that type.
|
|
495
|
+
*/
|
|
496
|
+
private rememberRespondMode;
|
|
468
497
|
private createUpdateId;
|
|
469
498
|
private serializeRespondModes;
|
|
470
499
|
/**
|
|
@@ -489,4 +518,3 @@ export declare class ConvaiClient extends EventEmitter implements IConvaiClient
|
|
|
489
518
|
*/
|
|
490
519
|
resetIdleTimer(): void;
|
|
491
520
|
}
|
|
492
|
-
//# sourceMappingURL=ConvaiClient.d.ts.map
|