@convai/web-sdk 1.9.0-beta.0 → 1.9.0-beta.12
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 +35 -43
- 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 +66 -3
- package/dist/core/ConvaiClient.js +253 -20
- 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 +5 -3
- package/dist/core/MessageHandler.js +125 -47
- package/dist/core/SSESession.d.ts +13 -9
- package/dist/core/SSESession.js +240 -13
- 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 +6 -1
- package/dist/core/index.js +20 -1
- 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 +5 -0
- package/dist/core/rtviEnvelope.js +9 -0
- package/dist/core/types.d.ts +241 -17
- 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 +20 -3
- package/dist/embed/index.js +20 -3
- 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 +9 -1
- package/dist/react/components/ConvaiWidget.js +23 -28
- 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 +4 -2
- package/dist/react/components/rtc-widget/components/ConviMessage.js +2 -3
- package/dist/react/components/rtc-widget/components/FloatingVideo.d.ts +0 -1
- package/dist/react/components/rtc-widget/components/FloatingVideo.js +1 -3
- package/dist/react/components/rtc-widget/components/MarkdownRenderer.d.ts +21 -4
- package/dist/react/components/rtc-widget/components/MarkdownRenderer.js +114 -131
- 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 +4 -2
- package/dist/react/components/rtc-widget/components/MessageList.js +2 -3
- package/dist/react/components/rtc-widget/components/SiteCard.d.ts +14 -0
- package/dist/react/components/rtc-widget/components/SiteCard.js +34 -0
- package/dist/react/components/rtc-widget/components/UserMessage.d.ts +0 -1
- package/dist/react/components/rtc-widget/components/UserMessage.js +1 -2
- 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 +1 -3
- package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.d.ts +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.js +1 -3
- package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.d.ts +0 -1
- package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.js +1 -4
- 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 +8 -5
- package/dist/react/hooks/useLocalCameraTrack.d.ts +0 -1
- package/dist/react/hooks/useLocalCameraTrack.js +0 -1
- package/dist/react/icons.d.ts +37 -0
- package/dist/react/icons.js +53 -0
- package/dist/react/index.d.ts +4 -1
- package/dist/react/index.js +2 -1
- package/dist/utils/inlineMarkdown.d.ts +0 -1
- package/dist/utils/inlineMarkdown.js +0 -1
- package/dist/utils/lightbox.d.ts +15 -0
- package/dist/utils/lightbox.js +94 -0
- package/dist/utils/linkPresentation.d.ts +75 -0
- package/dist/utils/linkPresentation.js +414 -0
- package/dist/utils/linkPreview.d.ts +45 -0
- package/dist/utils/linkPreview.js +71 -0
- 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 +302 -226
- 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 +4 -1
- package/dist/vanilla/index.js +2 -1
- package/dist/vanilla/styles.d.ts +0 -1
- package/dist/vanilla/styles.js +9 -1
- package/dist/vanilla/types.d.ts +9 -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 +23 -28
- 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/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/ConvaiChatElement.d.ts +0 -103
- package/dist/embed/ConvaiChatElement.d.ts.map +0 -1
- package/dist/embed/ConvaiChatElement.js +0 -679
- package/dist/embed/ConvaiChatElement.js.map +0 -1
- package/dist/embed/browser.d.ts +0 -3
- package/dist/embed/browser.d.ts.map +0 -1
- package/dist/embed/browser.js +0 -5
- package/dist/embed/browser.js.map +0 -1
- package/dist/embed/chat-embed-v1.js +0 -200
- package/dist/embed/chat-embed-v1.js.map +0 -7
- 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/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/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/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/dist/core/types.d.ts
CHANGED
|
@@ -120,6 +120,10 @@ export interface ServerResponseExtras {
|
|
|
120
120
|
content?: string;
|
|
121
121
|
enabled?: boolean;
|
|
122
122
|
muted?: boolean;
|
|
123
|
+
/** Whether the server applied the state of mind; false for an unknown value. */
|
|
124
|
+
applied?: boolean;
|
|
125
|
+
/** The state of mind the server received. */
|
|
126
|
+
state_of_mind?: string | null;
|
|
123
127
|
trigger_name?: string;
|
|
124
128
|
has_speak_tag?: boolean;
|
|
125
129
|
text?: string;
|
|
@@ -428,6 +432,8 @@ export interface VisionInputConfig {
|
|
|
428
432
|
}
|
|
429
433
|
export interface VisionBufferStatus {
|
|
430
434
|
enabled?: boolean;
|
|
435
|
+
/** Buffer state as Core reports it, e.g. `"vision_not_enabled"`. */
|
|
436
|
+
status?: string;
|
|
431
437
|
first_frame_pts?: number | null;
|
|
432
438
|
last_frame_pts?: number | null;
|
|
433
439
|
first_frame_index?: number | null;
|
|
@@ -574,6 +580,33 @@ export interface ConvaiConfig {
|
|
|
574
580
|
* `https://api2-stg.convai.com` to author against staging.
|
|
575
581
|
*/
|
|
576
582
|
characterApiUrl?: string;
|
|
583
|
+
/**
|
|
584
|
+
* Origin serving `POST /character/get`, which the bundled chat widget uses
|
|
585
|
+
* for the character's display name and avatar (optional, defaults to
|
|
586
|
+
* `https://api.convai.com`).
|
|
587
|
+
*
|
|
588
|
+
* Deliberately separate from {@link ConvaiConfig.characterApiUrl}: that one
|
|
589
|
+
* addresses the Character REST platform on `api2.convai.com`, which does not
|
|
590
|
+
* serve this route. A deployment that is not Convai's SaaS — on-prem above
|
|
591
|
+
* all — should set both, to its own gateway.
|
|
592
|
+
*
|
|
593
|
+
* It matters more than a header decoration suggests. Left unset off-SaaS,
|
|
594
|
+
* the lookup goes to `api.convai.com` and takes the API key with it: on a
|
|
595
|
+
* restricted network that is a failed request and a credential crossing a
|
|
596
|
+
* boundary it should not. The widget degrades gracefully either way, showing
|
|
597
|
+
* the fallback name and no avatar.
|
|
598
|
+
*
|
|
599
|
+
* @example
|
|
600
|
+
* ```ts
|
|
601
|
+
* const client = new ConvaiClient({
|
|
602
|
+
* apiKey: '…',
|
|
603
|
+
* characterId: '…',
|
|
604
|
+
* url: 'https://realtime-api.example-onprem.com', // core-service
|
|
605
|
+
* characterInfoUrl: 'https://api.example-onprem.com', // name + avatar
|
|
606
|
+
* });
|
|
607
|
+
* ```
|
|
608
|
+
*/
|
|
609
|
+
characterInfoUrl?: string;
|
|
577
610
|
/**
|
|
578
611
|
* Ordered roster of character instances for a multi-character room. Pass this
|
|
579
612
|
* *instead of* `characterId` -- exactly one of the two is valid.
|
|
@@ -630,8 +663,11 @@ export interface ConvaiConfig {
|
|
|
630
663
|
* and retry in application code.
|
|
631
664
|
*/
|
|
632
665
|
rosterProvisioningRetry?: RosterProvisioningRetry | false;
|
|
633
|
-
/**
|
|
634
|
-
|
|
666
|
+
/**
|
|
667
|
+
* Temporary character state of mind sent as `state_of_mind` on connect.
|
|
668
|
+
* One of the {@link StateOfMind} values; the server ignores anything else.
|
|
669
|
+
*/
|
|
670
|
+
stateOfMind?: StateOfMindInput;
|
|
635
671
|
/**
|
|
636
672
|
* Stable identifier for the end user (optional).
|
|
637
673
|
*
|
|
@@ -719,7 +755,7 @@ export interface ConvaiConfig {
|
|
|
719
755
|
* LiveKit has no TURN server (e.g. local dev).
|
|
720
756
|
*/
|
|
721
757
|
iceTransportPolicy?: RTCIceTransportPolicy;
|
|
722
|
-
/** Enable text-to-speech audio generation (default: true) */
|
|
758
|
+
/** Enable text-to-speech audio generation (default: true for LiveKit, false for SSE). */
|
|
723
759
|
ttsEnabled?: boolean;
|
|
724
760
|
/**
|
|
725
761
|
* Enable lipsync/facial animation blendshapes (default: false).
|
|
@@ -865,7 +901,8 @@ export interface ConvaiConfig {
|
|
|
865
901
|
* When true:
|
|
866
902
|
* - Dynamic info behaves as a static prompt sent to the LLM for that WebRTC connection
|
|
867
903
|
* - Dynamic info persists throughout the session
|
|
868
|
-
* -
|
|
904
|
+
* - `reconnect()` sends it again; a `disconnect()` followed by a new
|
|
905
|
+
* `connect(config)` only has it if that config does
|
|
869
906
|
*
|
|
870
907
|
* When false:
|
|
871
908
|
* - Allows resetting and updating via updateContext() or updateDynamicInfo()
|
|
@@ -925,12 +962,24 @@ export interface ConvaiConfig {
|
|
|
925
962
|
extraMetadata?: Record<string, unknown>;
|
|
926
963
|
};
|
|
927
964
|
}
|
|
965
|
+
/**
|
|
966
|
+
* The states of mind the server applies: Plutchik's eight primary emotions.
|
|
967
|
+
* Verified against realtime-api.convai.com — any other value (`"happy"`,
|
|
968
|
+
* `"calm"`, `"sad"`, ...) is acknowledged but ignored.
|
|
969
|
+
*/
|
|
970
|
+
export type StateOfMind = "joy" | "trust" | "fear" | "surprise" | "sadness" | "disgust" | "anger" | "anticipation";
|
|
971
|
+
/**
|
|
972
|
+
* What `stateOfMind` / `updateEmotion` accept: a {@link StateOfMind}, or
|
|
973
|
+
* `null` / `"neutral"` / `""` to clear. Typed open (`string & {}`) so editors
|
|
974
|
+
* suggest the valid values without breaking code that passes a `string`.
|
|
975
|
+
*/
|
|
976
|
+
export type StateOfMindInput = StateOfMind | "neutral" | (string & {}) | null;
|
|
928
977
|
/** Optional metadata for a text interaction. */
|
|
929
978
|
export interface SendUserTextMessageOptions {
|
|
930
979
|
/** Stable logical-turn identity used by clients that correlate responses. */
|
|
931
980
|
logicalTurnId?: string;
|
|
932
981
|
/** User-selected temporary emotion to apply before processing the text. */
|
|
933
|
-
stateOfMind?:
|
|
982
|
+
stateOfMind?: StateOfMindInput;
|
|
934
983
|
/** Latest request-scoped dynamic context to include in this same interaction. */
|
|
935
984
|
dynamicInfo?: DynamicInfo;
|
|
936
985
|
}
|
|
@@ -1094,6 +1143,51 @@ export interface CharacterAudioTrackEvent {
|
|
|
1094
1143
|
* server-defined and informational; treat unknown fields as opaque.
|
|
1095
1144
|
*/
|
|
1096
1145
|
export type UsageUpdate = Record<string, unknown>;
|
|
1146
|
+
/**
|
|
1147
|
+
* Identity of the stateless SSE request that produced an event.
|
|
1148
|
+
*
|
|
1149
|
+
* This travels out-of-band so legacy server payloads remain unchanged. In
|
|
1150
|
+
* particular, an older runtime can emit a valid `bot-turn-completed` frame
|
|
1151
|
+
* without `logical_turn_id` and the host can still settle the right request.
|
|
1152
|
+
*/
|
|
1153
|
+
export interface SSERequestContext {
|
|
1154
|
+
transport: "sse";
|
|
1155
|
+
logicalTurnIds: string[];
|
|
1156
|
+
messageTypes: string[];
|
|
1157
|
+
}
|
|
1158
|
+
/**
|
|
1159
|
+
* An incoming decoded wire message, before SDK interpretation or SSE text batching.
|
|
1160
|
+
* Unknown message types and original server-message envelopes are preserved.
|
|
1161
|
+
* This is an observation, not a validated server command or completion receipt.
|
|
1162
|
+
* `message` and SSE request arrays are detached from SDK processing. Treat them
|
|
1163
|
+
* as read-only; LiveKit `participant` retains its original identity for validation.
|
|
1164
|
+
*/
|
|
1165
|
+
export type RawMessageEvent = {
|
|
1166
|
+
message: unknown;
|
|
1167
|
+
/** Incoming payload bytes; SSE counts its joined data fields, excluding framing. */
|
|
1168
|
+
byteLength: number;
|
|
1169
|
+
} & ({
|
|
1170
|
+
transport: "livekit";
|
|
1171
|
+
participant: unknown;
|
|
1172
|
+
} | {
|
|
1173
|
+
transport: "websocket";
|
|
1174
|
+
} | {
|
|
1175
|
+
transport: "sse";
|
|
1176
|
+
request: SSERequestContext;
|
|
1177
|
+
});
|
|
1178
|
+
/** @deprecated Use {@link SSERequestContext}; retained for error-listener compatibility. */
|
|
1179
|
+
export type SSERequestErrorContext = SSERequestContext;
|
|
1180
|
+
/** A streamed signed 16-bit little-endian PCM audio chunk. */
|
|
1181
|
+
export interface AudioDataEvent {
|
|
1182
|
+
/** Sample rate of this chunk in hertz. */
|
|
1183
|
+
sample_rate: number;
|
|
1184
|
+
/** Number of interleaved channels. */
|
|
1185
|
+
channels: number;
|
|
1186
|
+
/** Base64-encoded PCM bytes. */
|
|
1187
|
+
audio: string;
|
|
1188
|
+
/** Always false for interaction API streams. */
|
|
1189
|
+
includes_wav_header: boolean;
|
|
1190
|
+
}
|
|
1097
1191
|
/**
|
|
1098
1192
|
* Every event the client emits, with its payload.
|
|
1099
1193
|
*
|
|
@@ -1105,11 +1199,14 @@ export type UsageUpdate = Record<string, unknown>;
|
|
|
1105
1199
|
* than guessed at.
|
|
1106
1200
|
*/
|
|
1107
1201
|
export interface ConvaiEventMap {
|
|
1202
|
+
/** Incoming wire messages on LiveKit, WebSocket and SSE; see {@link RawMessageEvent}. */
|
|
1203
|
+
rawMessage: [event: RawMessageEvent];
|
|
1108
1204
|
connect: [];
|
|
1109
1205
|
connected: [];
|
|
1110
1206
|
disconnect: [reason: DisconnectReason | null];
|
|
1111
1207
|
disconnected: [];
|
|
1112
|
-
|
|
1208
|
+
/** SSE failures include request identity, even when error is a string or null. */
|
|
1209
|
+
error: [error: unknown, request?: SSERequestErrorContext];
|
|
1113
1210
|
stateChange: [state: ConvaiClientState];
|
|
1114
1211
|
botReady: [];
|
|
1115
1212
|
characterSessionId: [characterSessionId: string];
|
|
@@ -1137,7 +1234,8 @@ export interface ConvaiEventMap {
|
|
|
1137
1234
|
scale?: number;
|
|
1138
1235
|
} | null];
|
|
1139
1236
|
actionResponse: [data: ActionResponseEvent];
|
|
1140
|
-
|
|
1237
|
+
/** SSE acknowledgements retain request identity without rewriting server payloads. */
|
|
1238
|
+
serverResponse: [response: ServerResponse, request?: SSERequestContext];
|
|
1141
1239
|
botOutput: [data: {
|
|
1142
1240
|
text: string;
|
|
1143
1241
|
spoken: boolean;
|
|
@@ -1148,22 +1246,26 @@ export interface ConvaiEventMap {
|
|
|
1148
1246
|
}];
|
|
1149
1247
|
botTtsStarted: [];
|
|
1150
1248
|
botTtsStopped: [];
|
|
1151
|
-
|
|
1249
|
+
/** Raw PCM generated for the current response. */
|
|
1250
|
+
audioData: [data: AudioDataEvent, request?: SSERequestContext];
|
|
1251
|
+
/** SSE terminals retain request identity when legacy payloads omit a turn ID. */
|
|
1252
|
+
botTurnCompleted: [data: unknown, request?: SSERequestContext];
|
|
1152
1253
|
userMuteStarted: [];
|
|
1153
1254
|
userMuteStopped: [];
|
|
1154
1255
|
idleWarning: [data: {
|
|
1155
1256
|
remainingSeconds: number | null;
|
|
1156
1257
|
}];
|
|
1157
|
-
|
|
1258
|
+
/** SSE abstention retains request identity, including legacy no-echo frames. */
|
|
1259
|
+
llmNoResponse: [request?: SSERequestContext];
|
|
1158
1260
|
metrics: [data: Record<string, unknown>];
|
|
1159
1261
|
usageUpdate: [data: UsageUpdate];
|
|
1160
1262
|
blendshapes: [data: Record<string, unknown>];
|
|
1161
1263
|
blendshapeCancel: [data: Record<string, unknown>];
|
|
1162
1264
|
blendshapeStatsReceived: [stats: Record<string, unknown>];
|
|
1163
1265
|
botAudioTrack: [track: MediaStreamTrack];
|
|
1164
|
-
audioStateChange: [
|
|
1165
|
-
videoStateChange: [
|
|
1166
|
-
screenShareStateChange: [
|
|
1266
|
+
audioStateChange: [state: AudioStateChange];
|
|
1267
|
+
videoStateChange: [state: VideoStateChange];
|
|
1268
|
+
screenShareStateChange: [state: ScreenShareStateChange];
|
|
1167
1269
|
characterReady: [instance: ConvaiCharacterInstance | undefined];
|
|
1168
1270
|
characterStatus: [status: CharacterStatusEvent];
|
|
1169
1271
|
activeCharacterChange: [change: ActiveCharacterChange];
|
|
@@ -1379,6 +1481,46 @@ export interface ConvaiClientState {
|
|
|
1379
1481
|
*/
|
|
1380
1482
|
activeMembershipId: string | null;
|
|
1381
1483
|
}
|
|
1484
|
+
/**
|
|
1485
|
+
* Payload of `audioControls.on('audioStateChange')`.
|
|
1486
|
+
*
|
|
1487
|
+
* Every field is optional because the emitters report only what moved: a
|
|
1488
|
+
* microphone mute sends `isAudioMuted` and `isAudioEnabled` and leaves
|
|
1489
|
+
* `audioLevel` out entirely. Read each one with an `!== undefined` check
|
|
1490
|
+
* rather than treating absence as `false`.
|
|
1491
|
+
*/
|
|
1492
|
+
export interface AudioStateChange {
|
|
1493
|
+
/** True while the microphone is muted. */
|
|
1494
|
+
isAudioMuted?: boolean;
|
|
1495
|
+
/** True while a microphone track is published. */
|
|
1496
|
+
isAudioEnabled?: boolean;
|
|
1497
|
+
/** Input level, 0–1, when level monitoring is running. */
|
|
1498
|
+
audioLevel?: number;
|
|
1499
|
+
}
|
|
1500
|
+
/** Payload of `videoControls.on('videoStateChange')`. Partial, like {@link AudioStateChange}. */
|
|
1501
|
+
export interface VideoStateChange {
|
|
1502
|
+
/** True while a camera track is published. */
|
|
1503
|
+
isVideoEnabled?: boolean;
|
|
1504
|
+
/** True while the camera is published but hidden (a soft mute). */
|
|
1505
|
+
isVideoHidden?: boolean;
|
|
1506
|
+
}
|
|
1507
|
+
/** Payload of `screenShareControls.on('screenShareStateChange')`. Partial, like {@link AudioStateChange}. */
|
|
1508
|
+
export interface ScreenShareStateChange {
|
|
1509
|
+
/** True while a screen-share track is live. */
|
|
1510
|
+
isScreenShareActive?: boolean;
|
|
1511
|
+
/** True while screen sharing is enabled, whether or not a track is live yet. */
|
|
1512
|
+
isScreenShareEnabled?: boolean;
|
|
1513
|
+
}
|
|
1514
|
+
/**
|
|
1515
|
+
* Narrows {@link IConvaiClient.setCharacterMuted} to one roster member.
|
|
1516
|
+
*/
|
|
1517
|
+
export interface CharacterMuteOptions {
|
|
1518
|
+
/**
|
|
1519
|
+
* Mute or unmute only this roster member. Omit to set the whole session,
|
|
1520
|
+
* which also clears any per-member state set earlier.
|
|
1521
|
+
*/
|
|
1522
|
+
membershipId?: string;
|
|
1523
|
+
}
|
|
1382
1524
|
/**
|
|
1383
1525
|
* Audio control interface for managing microphone
|
|
1384
1526
|
*/
|
|
@@ -1845,6 +1987,66 @@ export interface IConvaiClient {
|
|
|
1845
1987
|
readonly isBotReady: boolean;
|
|
1846
1988
|
/** Audio control methods for managing microphone mute/unmute */
|
|
1847
1989
|
readonly audioControls: AudioControls;
|
|
1990
|
+
/**
|
|
1991
|
+
* The configured origin for the widget's character name/avatar lookup, or
|
|
1992
|
+
* `null` when it was not set and the default applies. Read by the bundled
|
|
1993
|
+
* widgets so they ask the same host the rest of the client was pointed at.
|
|
1994
|
+
*/
|
|
1995
|
+
readonly characterInfoUrl?: string | null;
|
|
1996
|
+
/**
|
|
1997
|
+
* Silence the character's voice, or bring it back.
|
|
1998
|
+
*
|
|
1999
|
+
* This is output, not input: it is the speaker, where
|
|
2000
|
+
* {@link IConvaiClient.audioControls} is the microphone. The character keeps
|
|
2001
|
+
* talking, the turn keeps streaming, and transcripts, emotions and
|
|
2002
|
+
* blendshapes keep arriving — you simply stop hearing it. Nothing is
|
|
2003
|
+
* renegotiated with the server, so a mute and unmute mid-sentence is
|
|
2004
|
+
* inaudible either way.
|
|
2005
|
+
*
|
|
2006
|
+
* The state is held by the client, not applied once and forgotten, so it
|
|
2007
|
+
* survives what arrives later: a character who joins a roster room, a track
|
|
2008
|
+
* republished after a reconnect, and a transport switch. Both transports are
|
|
2009
|
+
* covered — WebRTC and WebSocket — whether or not a widget is mounted.
|
|
2010
|
+
*
|
|
2011
|
+
* Passing `membershipId` addresses one member of a multi-character roster.
|
|
2012
|
+
* Calling it without one is authoritative for the session: it sets every
|
|
2013
|
+
* character and clears per-member state set earlier.
|
|
2014
|
+
*
|
|
2015
|
+
* @param muted - `true` to silence, `false` to restore.
|
|
2016
|
+
* @param options - Narrow the call to one roster member.
|
|
2017
|
+
*
|
|
2018
|
+
* @example
|
|
2019
|
+
* ```ts
|
|
2020
|
+
* // A mute button for custom UI
|
|
2021
|
+
* client.setCharacterMuted(true);
|
|
2022
|
+
* client.isCharacterMuted(); // true
|
|
2023
|
+
*
|
|
2024
|
+
* // Toggle
|
|
2025
|
+
* client.setCharacterMuted(!client.isCharacterMuted());
|
|
2026
|
+
*
|
|
2027
|
+
* // Silence one character in a roster room, leaving the others audible
|
|
2028
|
+
* const [, second] = client.characters;
|
|
2029
|
+
* client.setCharacterMuted(true, { membershipId: second.membershipId });
|
|
2030
|
+
* ```
|
|
2031
|
+
*/
|
|
2032
|
+
setCharacterMuted(muted: boolean, options?: CharacterMuteOptions): void;
|
|
2033
|
+
/**
|
|
2034
|
+
* Whether the character's voice is currently silenced.
|
|
2035
|
+
*
|
|
2036
|
+
* With no argument this reports the session-wide setting. With a
|
|
2037
|
+
* `membershipId` it reports what that member actually does, which is its own
|
|
2038
|
+
* setting when one was made for it and the session-wide setting otherwise.
|
|
2039
|
+
*
|
|
2040
|
+
* @param membershipId - Report this roster member instead of the session.
|
|
2041
|
+
*
|
|
2042
|
+
* @example
|
|
2043
|
+
* ```ts
|
|
2044
|
+
* client.setCharacterMuted(true, { membershipId: 'm_2' });
|
|
2045
|
+
* client.isCharacterMuted(); // false — the session is audible
|
|
2046
|
+
* client.isCharacterMuted('m_2'); // true — this member is not
|
|
2047
|
+
* ```
|
|
2048
|
+
*/
|
|
2049
|
+
isCharacterMuted(membershipId?: string): boolean;
|
|
1848
2050
|
/** Video control methods for enabling/disabling camera */
|
|
1849
2051
|
readonly videoControls: VideoControls;
|
|
1850
2052
|
/** Screen sharing control methods */
|
|
@@ -1965,8 +2167,15 @@ export interface IConvaiClient {
|
|
|
1965
2167
|
* Opt in or out of `usageUpdate` events -- the server's per-turn usage and
|
|
1966
2168
|
* cost breakdown. Informational only; billing is unaffected.
|
|
1967
2169
|
*
|
|
2170
|
+
* **Requires connecting with `debug: true`.** The server only registers the
|
|
2171
|
+
* usage stream for debug sessions; otherwise it answers this toggle with a
|
|
2172
|
+
* `serverResponse` error ("Usage-update publisher not available") and no
|
|
2173
|
+
* `usageUpdate` ever fires.
|
|
2174
|
+
*
|
|
1968
2175
|
* @example
|
|
1969
2176
|
* ```ts
|
|
2177
|
+
* const client = new ConvaiClient({ apiKey, characterId, debug: true })
|
|
2178
|
+
* await client.connect()
|
|
1970
2179
|
* client.toggleUsageUpdates(true)
|
|
1971
2180
|
* client.on('usageUpdate', (u) => console.log(u))
|
|
1972
2181
|
* ```
|
|
@@ -1997,7 +2206,14 @@ export interface IConvaiClient {
|
|
|
1997
2206
|
updateCharacterRoster: (options: UpdateCharacterRosterOptions) => Promise<CharacterRosterChange>;
|
|
1998
2207
|
/** Disconnect from the current character session */
|
|
1999
2208
|
disconnect: () => Promise<void>;
|
|
2000
|
-
/**
|
|
2209
|
+
/**
|
|
2210
|
+
* Disconnect and connect again with the stored config. The stored config
|
|
2211
|
+
* includes the runtime changes made since connecting —
|
|
2212
|
+
* `updateDynamicInfo()`, `updateEmotion()`, `updateTemplateKeys()`,
|
|
2213
|
+
* `toggleTts()` and `respondModeUpdate()` — so a reconnect does not revert
|
|
2214
|
+
* them. The session id is kept; call `resetSession()` first for a fresh
|
|
2215
|
+
* conversation.
|
|
2216
|
+
*/
|
|
2001
2217
|
reconnect: () => Promise<void>;
|
|
2002
2218
|
/** Reset the session ID to start a new conversation (clears history) */
|
|
2003
2219
|
resetSession: () => void;
|
|
@@ -2094,8 +2310,12 @@ export interface IConvaiClient {
|
|
|
2094
2310
|
/**
|
|
2095
2311
|
* Set or clear the character's temporary state of mind without triggering a response.
|
|
2096
2312
|
* Pass `null` (or `"neutral"`) to clear it.
|
|
2313
|
+
*
|
|
2314
|
+
* Accepted values are the eight {@link StateOfMind} emotions; the server
|
|
2315
|
+
* acknowledges anything else with `extras.applied: false` ("Invalid emotion
|
|
2316
|
+
* ignored") and the SDK logs a warning.
|
|
2097
2317
|
*/
|
|
2098
|
-
updateEmotion: (stateOfMind:
|
|
2318
|
+
updateEmotion: (stateOfMind: StateOfMindInput) => void;
|
|
2099
2319
|
/**
|
|
2100
2320
|
* Send descriptive scene updates so the bot knows what is visible or nearby.
|
|
2101
2321
|
* Does not modify actionConfig.
|
|
@@ -2106,7 +2326,7 @@ export interface IConvaiClient {
|
|
|
2106
2326
|
}>, options?: UpdateSceneMetadataOptions) => void;
|
|
2107
2327
|
/**
|
|
2108
2328
|
* Toggle text-to-speech on or off.
|
|
2109
|
-
*
|
|
2329
|
+
* SSE applies the setting to subsequent interaction requests.
|
|
2110
2330
|
*/
|
|
2111
2331
|
toggleTts: (enabled: boolean) => void;
|
|
2112
2332
|
/**
|
|
@@ -2134,7 +2354,12 @@ export interface IConvaiClient {
|
|
|
2134
2354
|
uploadFile: (file: File, options?: UploadFileOptions) => Promise<void>;
|
|
2135
2355
|
/**
|
|
2136
2356
|
* Subscribe to an event
|
|
2137
|
-
* @param event Event name
|
|
2357
|
+
* @param event Event name, including `rawMessage` for incoming wire events.
|
|
2358
|
+
* @example
|
|
2359
|
+
* const unsubscribe = client.on('rawMessage', ({ message, transport }) => {
|
|
2360
|
+
* console.log(transport, message);
|
|
2361
|
+
* });
|
|
2362
|
+
* unsubscribe();
|
|
2138
2363
|
* @param callback Callback function
|
|
2139
2364
|
* @returns Unsubscribe function
|
|
2140
2365
|
*/
|
|
@@ -2146,4 +2371,3 @@ export interface IConvaiClient {
|
|
|
2146
2371
|
*/
|
|
2147
2372
|
off: <E extends string>(event: E, callback: ConvaiEventCallback<E>) => void;
|
|
2148
2373
|
}
|
|
2149
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/core/types.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { VisionSourceKind } from "./types.js";
|
|
2
2
|
export declare function isWebcamVisionSource(source?: VisionSourceKind | null): boolean;
|
|
3
3
|
export declare function shouldKeepExistingVisionSource(currentSource: VisionSourceKind, nextSource: VisionSourceKind, hasReplacementTrack: boolean): boolean;
|
|
4
|
-
//# sourceMappingURL=videoSourceState.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { ConvaiConfig, VisionInputConfig } from "./types.js";
|
|
2
2
|
export declare function resolveVisionInputConfig(config: Pick<ConvaiConfig, "enableVideo" | "visionInputConfig">): VisionInputConfig | undefined;
|
|
3
3
|
export declare function serializeVisionInputConfig(config: VisionInputConfig): Record<string, unknown>;
|
|
4
|
-
//# sourceMappingURL=visionRequest.d.ts.map
|
package/dist/embed/index.d.ts
CHANGED
|
@@ -2,8 +2,25 @@
|
|
|
2
2
|
* Published-chat descriptor and grant helpers. Server callers must provide a
|
|
3
3
|
* caller-scoped requester ID when minting a grant.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* These are transport-free REST helpers with no dependencies — pair them with
|
|
6
|
+
* `ConvaiClient.connectWithPublicationGrant()`, or with the vanilla widget's
|
|
7
|
+
* `requestPublicationGrant` option, to run a published session.
|
|
8
|
+
*
|
|
9
|
+
* The `<convai-chat>` custom element that used to ship alongside them is
|
|
10
|
+
* gone. It bundled the whole SDK a second time to render a chat panel the
|
|
11
|
+
* vanilla widget already renders, and `@convai/web-widget` now covers the
|
|
12
|
+
* copy/paste embed with a loader a fraction of the size. See
|
|
13
|
+
* docs/convai_published_chat.md.
|
|
7
14
|
*/
|
|
8
15
|
export * from "./publicationApi.js";
|
|
9
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Strip a stale `connectAttemptId` before starting a fresh published session.
|
|
18
|
+
*
|
|
19
|
+
* Exported because it encodes a protocol rule, not a widget detail: an attempt
|
|
20
|
+
* id may be reused only while retrying the *same* single-use launch token, so a
|
|
21
|
+
* UI that starts a new session with options it kept from the last one would
|
|
22
|
+
* otherwise replay an id the server already consumed. Any interface driving
|
|
23
|
+
* published chat — the bundled widgets, `@convai/web-widget`, or your own —
|
|
24
|
+
* needs this at the session boundary.
|
|
25
|
+
*/
|
|
26
|
+
export { freshPublicationGrantOptions } from "../core/publishedChat.js";
|
package/dist/embed/index.js
CHANGED
|
@@ -2,8 +2,25 @@
|
|
|
2
2
|
* Published-chat descriptor and grant helpers. Server callers must provide a
|
|
3
3
|
* caller-scoped requester ID when minting a grant.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* These are transport-free REST helpers with no dependencies — pair them with
|
|
6
|
+
* `ConvaiClient.connectWithPublicationGrant()`, or with the vanilla widget's
|
|
7
|
+
* `requestPublicationGrant` option, to run a published session.
|
|
8
|
+
*
|
|
9
|
+
* The `<convai-chat>` custom element that used to ship alongside them is
|
|
10
|
+
* gone. It bundled the whole SDK a second time to render a chat panel the
|
|
11
|
+
* vanilla widget already renders, and `@convai/web-widget` now covers the
|
|
12
|
+
* copy/paste embed with a loader a fraction of the size. See
|
|
13
|
+
* docs/convai_published_chat.md.
|
|
7
14
|
*/
|
|
8
15
|
export * from "./publicationApi.js";
|
|
9
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Strip a stale `connectAttemptId` before starting a fresh published session.
|
|
18
|
+
*
|
|
19
|
+
* Exported because it encodes a protocol rule, not a widget detail: an attempt
|
|
20
|
+
* id may be reused only while retrying the *same* single-use launch token, so a
|
|
21
|
+
* UI that starts a new session with options it kept from the last one would
|
|
22
|
+
* otherwise replay an id the server already consumed. Any interface driving
|
|
23
|
+
* published chat — the bundled widgets, `@convai/web-widget`, or your own —
|
|
24
|
+
* needs this at the session boundary.
|
|
25
|
+
*/
|
|
26
|
+
export { freshPublicationGrantOptions } from "../core/publishedChat.js";
|
|
@@ -20,4 +20,3 @@ export declare function getPublishedChatEndpoints(publicationId: string, publica
|
|
|
20
20
|
export declare function fetchPublishedChatDescriptor(descriptorUrl: string, fetchImpl?: PublishedChatFetch, signal?: AbortSignal): Promise<PublishedChatDescriptor>;
|
|
21
21
|
export declare function requestPublishedChatGrant(launchGrantUrl: string, fetchImpl?: PublishedChatFetch, signal?: AbortSignal, requesterId?: string): Promise<string>;
|
|
22
22
|
export declare function loadPublishedChatSession(publicationId: string, publicationApiUrl?: string, fetchImpl?: PublishedChatFetch, signal?: AbortSignal, requesterId?: string): Promise<PublishedChatSession>;
|
|
23
|
-
//# sourceMappingURL=publicationApi.d.ts.map
|
|
@@ -138,4 +138,3 @@ export async function loadPublishedChatSession(publicationId, publicationApiUrl,
|
|
|
138
138
|
const launchToken = await requestPublishedChatGrant(launchGrantUrl.toString(), fetchImpl, signal, requesterId);
|
|
139
139
|
return { descriptor, launchToken };
|
|
140
140
|
}
|
|
141
|
-
//# sourceMappingURL=publicationApi.js.map
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -270,7 +270,8 @@ export function getActiveBlendshapesFromOrder61(values61, threshold = 0.01) {
|
|
|
270
270
|
* @param maxEntries - Maximum entries to show (default: 20)
|
|
271
271
|
*/
|
|
272
272
|
export function formatOrder61ForLogging(values61, threshold = 0.01, maxEntries = 20) {
|
|
273
|
-
const
|
|
273
|
+
const allActive = getActiveBlendshapesFromOrder61(values61, threshold);
|
|
274
|
+
const active = allActive
|
|
274
275
|
.slice(0, maxEntries)
|
|
275
276
|
.reduce((acc, item) => {
|
|
276
277
|
acc[item.name] = Number(item.value.toFixed(4));
|
|
@@ -279,9 +280,10 @@ export function formatOrder61ForLogging(values61, threshold = 0.01, maxEntries =
|
|
|
279
280
|
return {
|
|
280
281
|
active,
|
|
281
282
|
total: values61.length,
|
|
282
|
-
|
|
283
|
+
// Every active channel, not just the maxEntries listed — as in the
|
|
284
|
+
// MetaHuman helper, which shares this return shape.
|
|
285
|
+
activeCount: allActive.length,
|
|
283
286
|
headRotation: getHeadRotation(values61),
|
|
284
287
|
eyeRotations: getEyeRotations(values61),
|
|
285
288
|
};
|
|
286
289
|
}
|
|
287
|
-
//# sourceMappingURL=arkitOrder61.js.map
|
|
@@ -48,6 +48,13 @@ export function createBlendshapeQueue(config) {
|
|
|
48
48
|
else {
|
|
49
49
|
// Select preset mapper based on input/output format
|
|
50
50
|
mapper = selectPresetMapper(config.inputFormat, config.outputFormat);
|
|
51
|
+
// Only same-format passthroughs are built in. Returning a queue anyway
|
|
52
|
+
// handed one layout to a rig expecting another — 61 ARKit values to a
|
|
53
|
+
// 251-channel MetaHuman — with no error.
|
|
54
|
+
if (!mapper) {
|
|
55
|
+
throw new Error(`createBlendshapeQueue: no built-in mapping from "${config.inputFormat}" to "${config.outputFormat}". ` +
|
|
56
|
+
"Pass a mapper, or use the same input and output format.");
|
|
57
|
+
}
|
|
51
58
|
}
|
|
52
59
|
return new BlendshapeQueue(mapper);
|
|
53
60
|
}
|
|
@@ -123,4 +130,3 @@ export function inferMappingFromConfig(blendshapeConfig) {
|
|
|
123
130
|
outputFormat: format, // Passthrough by default
|
|
124
131
|
};
|
|
125
132
|
}
|
|
126
|
-
//# sourceMappingURL=createBlendshapeQueue.js.map
|
|
@@ -86,8 +86,9 @@ export declare function createARKitNameMapper(mapping: BlendshapeNameMapping, ou
|
|
|
86
86
|
* ```
|
|
87
87
|
*/
|
|
88
88
|
export declare function createMetaHumanNameMapper(mapping: BlendshapeNameMapping, outputFormat?: 'object' | 'optimized'): BlendshapeMapper;
|
|
89
|
+
/** Attach target names to a frame without making them iterable values. */
|
|
90
|
+
export declare function withBlendshapeNames(values: Float32Array, names: readonly string[]): Float32Array;
|
|
89
91
|
/**
|
|
90
92
|
* Helper to extract blendshape object from mapper output
|
|
91
93
|
*/
|
|
92
94
|
export declare function getBlendshapeObject(output: any): Record<string, number>;
|
|
93
|
-
//# sourceMappingURL=declarativeMapping.d.ts.map
|