@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.
Files changed (344) hide show
  1. package/README.md +66 -33
  2. package/dist/core/AudioManager.d.ts +0 -1
  3. package/dist/core/AudioManager.js +0 -1
  4. package/dist/core/BlendshapeQueue.d.ts +0 -1
  5. package/dist/core/BlendshapeQueue.js +20 -6
  6. package/dist/core/CharacterRoster.d.ts +0 -1
  7. package/dist/core/CharacterRoster.js +0 -1
  8. package/dist/core/CharacterVersionManager.d.ts +0 -1
  9. package/dist/core/CharacterVersionManager.js +0 -1
  10. package/dist/core/ConnectionStateHandler.d.ts +0 -1
  11. package/dist/core/ConnectionStateHandler.js +5 -2
  12. package/dist/core/ConvaiClient.d.ts +31 -3
  13. package/dist/core/ConvaiClient.js +136 -14
  14. package/dist/core/ConvaiRoomError.d.ts +0 -1
  15. package/dist/core/ConvaiRoomError.js +20 -2
  16. package/dist/core/EventEmitter.d.ts +0 -1
  17. package/dist/core/EventEmitter.js +0 -1
  18. package/dist/core/MemoryManager.d.ts +0 -1
  19. package/dist/core/MemoryManager.js +0 -1
  20. package/dist/core/MessageHandler.d.ts +0 -1
  21. package/dist/core/MessageHandler.js +41 -10
  22. package/dist/core/SSESession.d.ts +0 -1
  23. package/dist/core/SSESession.js +0 -1
  24. package/dist/core/ScreenShareManager.d.ts +0 -1
  25. package/dist/core/ScreenShareManager.js +0 -1
  26. package/dist/core/VideoManager.d.ts +0 -1
  27. package/dist/core/VideoManager.js +0 -1
  28. package/dist/core/characterInfo.d.ts +45 -0
  29. package/dist/core/characterInfo.js +55 -0
  30. package/dist/core/characterReference.d.ts +0 -1
  31. package/dist/core/characterReference.js +0 -1
  32. package/dist/core/connectRequest.d.ts +0 -1
  33. package/dist/core/connectRequest.js +0 -1
  34. package/dist/core/contextUpdateRequest.d.ts +0 -1
  35. package/dist/core/contextUpdateRequest.js +0 -1
  36. package/dist/core/index.d.ts +4 -3
  37. package/dist/core/index.js +20 -3
  38. package/dist/core/logicalTurn.d.ts +0 -1
  39. package/dist/core/logicalTurn.js +0 -1
  40. package/dist/core/modelOutput.d.ts +0 -1
  41. package/dist/core/modelOutput.js +0 -1
  42. package/dist/core/publishedChat.d.ts +0 -1
  43. package/dist/core/publishedChat.js +0 -1
  44. package/dist/core/rosterRequest.d.ts +0 -1
  45. package/dist/core/rosterRequest.js +0 -1
  46. package/dist/core/rtviEnvelope.d.ts +0 -1
  47. package/dist/core/rtviEnvelope.js +0 -1
  48. package/dist/core/types.d.ts +112 -10
  49. package/dist/core/types.js +0 -1
  50. package/dist/core/videoSourceState.d.ts +0 -1
  51. package/dist/core/videoSourceState.js +0 -1
  52. package/dist/core/visionRequest.d.ts +0 -1
  53. package/dist/core/visionRequest.js +0 -1
  54. package/dist/embed/index.d.ts +11 -1
  55. package/dist/embed/index.js +11 -1
  56. package/dist/embed/publicationApi.d.ts +0 -1
  57. package/dist/embed/publicationApi.js +0 -1
  58. package/dist/index.d.ts +0 -1
  59. package/dist/index.js +0 -1
  60. package/dist/lipsync-helpers/arkitOrder61.d.ts +0 -1
  61. package/dist/lipsync-helpers/arkitOrder61.js +5 -3
  62. package/dist/lipsync-helpers/createBlendshapeQueue.d.ts +0 -1
  63. package/dist/lipsync-helpers/createBlendshapeQueue.js +7 -1
  64. package/dist/lipsync-helpers/declarativeMapping.d.ts +2 -1
  65. package/dist/lipsync-helpers/declarativeMapping.js +72 -146
  66. package/dist/lipsync-helpers/index.d.ts +0 -1
  67. package/dist/lipsync-helpers/index.js +0 -1
  68. package/dist/lipsync-helpers/mappingTypes.d.ts +6 -5
  69. package/dist/lipsync-helpers/mappingTypes.js +0 -1
  70. package/dist/lipsync-helpers/metahumanOrder251.d.ts +0 -1
  71. package/dist/lipsync-helpers/metahumanOrder251.js +8 -9
  72. package/dist/lipsync-helpers/mhaLimitDrivers.d.ts +0 -1
  73. package/dist/lipsync-helpers/mhaLimitDrivers.js +0 -1
  74. package/dist/lipsync-helpers/naturalness/processor.d.ts +0 -1
  75. package/dist/lipsync-helpers/naturalness/processor.js +6 -4
  76. package/dist/lipsync-helpers/naturalness/profiles/mha.d.ts +0 -1
  77. package/dist/lipsync-helpers/naturalness/profiles/mha.js +0 -1
  78. package/dist/lipsync-helpers/naturalness/types.d.ts +0 -1
  79. package/dist/lipsync-helpers/naturalness/types.js +0 -1
  80. package/dist/lipsync-helpers/presetMappers.d.ts +0 -1
  81. package/dist/lipsync-helpers/presetMappers.js +0 -1
  82. package/dist/react/components/ConvaiWidget.d.ts +0 -1
  83. package/dist/react/components/ConvaiWidget.js +16 -8
  84. package/dist/react/components/index.d.ts +0 -1
  85. package/dist/react/components/index.js +0 -1
  86. package/dist/react/components/rtc-widget/components/AudioSettingsPanel.d.ts +0 -1
  87. package/dist/react/components/rtc-widget/components/AudioSettingsPanel.js +0 -1
  88. package/dist/react/components/rtc-widget/components/AudioVisualizer.d.ts +0 -1
  89. package/dist/react/components/rtc-widget/components/AudioVisualizer.js +0 -1
  90. package/dist/react/components/rtc-widget/components/ConviMessage.d.ts +0 -1
  91. package/dist/react/components/rtc-widget/components/ConviMessage.js +0 -1
  92. package/dist/react/components/rtc-widget/components/FloatingVideo.d.ts +0 -1
  93. package/dist/react/components/rtc-widget/components/FloatingVideo.js +0 -1
  94. package/dist/react/components/rtc-widget/components/MarkdownRenderer.d.ts +0 -1
  95. package/dist/react/components/rtc-widget/components/MarkdownRenderer.js +0 -1
  96. package/dist/react/components/rtc-widget/components/MessageBubble.d.ts +0 -1
  97. package/dist/react/components/rtc-widget/components/MessageBubble.js +0 -1
  98. package/dist/react/components/rtc-widget/components/MessageList.d.ts +0 -1
  99. package/dist/react/components/rtc-widget/components/MessageList.js +0 -1
  100. package/dist/react/components/rtc-widget/components/SiteCard.d.ts +0 -1
  101. package/dist/react/components/rtc-widget/components/SiteCard.js +0 -1
  102. package/dist/react/components/rtc-widget/components/UserMessage.d.ts +0 -1
  103. package/dist/react/components/rtc-widget/components/UserMessage.js +0 -1
  104. package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.d.ts +0 -1
  105. package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.js +0 -1
  106. package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.d.ts +0 -1
  107. package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.js +0 -1
  108. package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.d.ts +0 -1
  109. package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.js +0 -1
  110. package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.d.ts +0 -1
  111. package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.js +0 -1
  112. package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.d.ts +0 -1
  113. package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.js +0 -1
  114. package/dist/react/components/rtc-widget/components/conviComponents/index.d.ts +0 -1
  115. package/dist/react/components/rtc-widget/components/conviComponents/index.js +0 -1
  116. package/dist/react/components/rtc-widget/components/index.d.ts +0 -1
  117. package/dist/react/components/rtc-widget/components/index.js +0 -1
  118. package/dist/react/components/rtc-widget/index.d.ts +0 -1
  119. package/dist/react/components/rtc-widget/index.js +0 -1
  120. package/dist/react/components/rtc-widget/styles/framerConfig.d.ts +0 -1
  121. package/dist/react/components/rtc-widget/styles/framerConfig.js +0 -1
  122. package/dist/react/components/rtc-widget/styles/icons.d.ts +0 -1
  123. package/dist/react/components/rtc-widget/styles/icons.js +0 -1
  124. package/dist/react/components/rtc-widget/styles/index.d.ts +0 -1
  125. package/dist/react/components/rtc-widget/styles/index.js +0 -1
  126. package/dist/react/components/rtc-widget/styles/styledComponents.d.ts +0 -1
  127. package/dist/react/components/rtc-widget/styles/styledComponents.js +0 -1
  128. package/dist/react/components/rtc-widget/styles/theme.d.ts +0 -1
  129. package/dist/react/components/rtc-widget/styles/theme.js +0 -1
  130. package/dist/react/components/rtc-widget/types/index.d.ts +0 -1
  131. package/dist/react/components/rtc-widget/types/index.js +0 -1
  132. package/dist/react/hooks/index.d.ts +0 -1
  133. package/dist/react/hooks/index.js +0 -1
  134. package/dist/react/hooks/useCharacterInfo.d.ts +12 -11
  135. package/dist/react/hooks/useCharacterInfo.js +49 -50
  136. package/dist/react/hooks/useConvaiClient.d.ts +0 -1
  137. package/dist/react/hooks/useConvaiClient.js +6 -5
  138. package/dist/react/hooks/useLocalCameraTrack.d.ts +0 -1
  139. package/dist/react/hooks/useLocalCameraTrack.js +0 -1
  140. package/dist/react/icons.d.ts +0 -1
  141. package/dist/react/icons.js +0 -1
  142. package/dist/react/index.d.ts +0 -1
  143. package/dist/react/index.js +0 -1
  144. package/dist/utils/inlineMarkdown.d.ts +0 -1
  145. package/dist/utils/inlineMarkdown.js +0 -1
  146. package/dist/utils/lightbox.d.ts +0 -1
  147. package/dist/utils/lightbox.js +0 -1
  148. package/dist/utils/linkPresentation.d.ts +0 -1
  149. package/dist/utils/linkPresentation.js +0 -1
  150. package/dist/utils/linkPreview.d.ts +0 -1
  151. package/dist/utils/linkPreview.js +0 -1
  152. package/dist/utils/logger.d.ts +0 -1
  153. package/dist/utils/logger.js +0 -1
  154. package/dist/vanilla/AudioRenderer.d.ts +0 -1
  155. package/dist/vanilla/AudioRenderer.js +0 -1
  156. package/dist/vanilla/ConvaiWidget.d.ts +0 -1
  157. package/dist/vanilla/ConvaiWidget.js +18 -30
  158. package/dist/vanilla/WebSocketSession.d.ts +0 -1
  159. package/dist/vanilla/WebSocketSession.js +0 -1
  160. package/dist/vanilla/WidgetEventSubscriptions.d.ts +0 -1
  161. package/dist/vanilla/WidgetEventSubscriptions.js +0 -1
  162. package/dist/vanilla/icons.d.ts +0 -1
  163. package/dist/vanilla/icons.js +0 -1
  164. package/dist/vanilla/index.d.ts +0 -1
  165. package/dist/vanilla/index.js +0 -1
  166. package/dist/vanilla/styles.d.ts +0 -1
  167. package/dist/vanilla/styles.js +0 -1
  168. package/dist/vanilla/types.d.ts +0 -1
  169. package/dist/vanilla/types.js +0 -1
  170. package/dist/vanilla/websocket.d.ts +0 -1
  171. package/dist/vanilla/websocket.js +0 -1
  172. package/dist/version.d.ts +1 -2
  173. package/dist/version.js +1 -2
  174. package/package.json +3 -3
  175. package/dist/core/AudioManager.d.ts.map +0 -1
  176. package/dist/core/AudioManager.js.map +0 -1
  177. package/dist/core/BlendshapeQueue.d.ts.map +0 -1
  178. package/dist/core/BlendshapeQueue.js.map +0 -1
  179. package/dist/core/CharacterRoster.d.ts.map +0 -1
  180. package/dist/core/CharacterRoster.js.map +0 -1
  181. package/dist/core/CharacterVersionManager.d.ts.map +0 -1
  182. package/dist/core/CharacterVersionManager.js.map +0 -1
  183. package/dist/core/ConnectionStateHandler.d.ts.map +0 -1
  184. package/dist/core/ConnectionStateHandler.js.map +0 -1
  185. package/dist/core/ConvaiClient.d.ts.map +0 -1
  186. package/dist/core/ConvaiClient.js.map +0 -1
  187. package/dist/core/ConvaiRoomError.d.ts.map +0 -1
  188. package/dist/core/ConvaiRoomError.js.map +0 -1
  189. package/dist/core/EventEmitter.d.ts.map +0 -1
  190. package/dist/core/EventEmitter.js.map +0 -1
  191. package/dist/core/MemoryManager.d.ts.map +0 -1
  192. package/dist/core/MemoryManager.js.map +0 -1
  193. package/dist/core/MessageHandler.d.ts.map +0 -1
  194. package/dist/core/MessageHandler.js.map +0 -1
  195. package/dist/core/SSESession.d.ts.map +0 -1
  196. package/dist/core/SSESession.js.map +0 -1
  197. package/dist/core/ScreenShareManager.d.ts.map +0 -1
  198. package/dist/core/ScreenShareManager.js.map +0 -1
  199. package/dist/core/VideoManager.d.ts.map +0 -1
  200. package/dist/core/VideoManager.js.map +0 -1
  201. package/dist/core/characterReference.d.ts.map +0 -1
  202. package/dist/core/characterReference.js.map +0 -1
  203. package/dist/core/connectRequest.d.ts.map +0 -1
  204. package/dist/core/connectRequest.js.map +0 -1
  205. package/dist/core/contextUpdateRequest.d.ts.map +0 -1
  206. package/dist/core/contextUpdateRequest.js.map +0 -1
  207. package/dist/core/index.d.ts.map +0 -1
  208. package/dist/core/index.js.map +0 -1
  209. package/dist/core/logicalTurn.d.ts.map +0 -1
  210. package/dist/core/logicalTurn.js.map +0 -1
  211. package/dist/core/modelOutput.d.ts.map +0 -1
  212. package/dist/core/modelOutput.js.map +0 -1
  213. package/dist/core/publishedChat.d.ts.map +0 -1
  214. package/dist/core/publishedChat.js.map +0 -1
  215. package/dist/core/rosterRequest.d.ts.map +0 -1
  216. package/dist/core/rosterRequest.js.map +0 -1
  217. package/dist/core/rtviEnvelope.d.ts.map +0 -1
  218. package/dist/core/rtviEnvelope.js.map +0 -1
  219. package/dist/core/types.d.ts.map +0 -1
  220. package/dist/core/types.js.map +0 -1
  221. package/dist/core/videoSourceState.d.ts.map +0 -1
  222. package/dist/core/videoSourceState.js.map +0 -1
  223. package/dist/core/visionRequest.d.ts.map +0 -1
  224. package/dist/core/visionRequest.js.map +0 -1
  225. package/dist/embed/index.d.ts.map +0 -1
  226. package/dist/embed/index.js.map +0 -1
  227. package/dist/embed/publicationApi.d.ts.map +0 -1
  228. package/dist/embed/publicationApi.js.map +0 -1
  229. package/dist/index.d.ts.map +0 -1
  230. package/dist/index.js.map +0 -1
  231. package/dist/lipsync-helpers/arkitOrder61.d.ts.map +0 -1
  232. package/dist/lipsync-helpers/arkitOrder61.js.map +0 -1
  233. package/dist/lipsync-helpers/createBlendshapeQueue.d.ts.map +0 -1
  234. package/dist/lipsync-helpers/createBlendshapeQueue.js.map +0 -1
  235. package/dist/lipsync-helpers/declarativeMapping.d.ts.map +0 -1
  236. package/dist/lipsync-helpers/declarativeMapping.js.map +0 -1
  237. package/dist/lipsync-helpers/index.d.ts.map +0 -1
  238. package/dist/lipsync-helpers/index.js.map +0 -1
  239. package/dist/lipsync-helpers/mappingTypes.d.ts.map +0 -1
  240. package/dist/lipsync-helpers/mappingTypes.js.map +0 -1
  241. package/dist/lipsync-helpers/metahumanOrder251.d.ts.map +0 -1
  242. package/dist/lipsync-helpers/metahumanOrder251.js.map +0 -1
  243. package/dist/lipsync-helpers/mhaLimitDrivers.d.ts.map +0 -1
  244. package/dist/lipsync-helpers/mhaLimitDrivers.js.map +0 -1
  245. package/dist/lipsync-helpers/naturalness/processor.d.ts.map +0 -1
  246. package/dist/lipsync-helpers/naturalness/processor.js.map +0 -1
  247. package/dist/lipsync-helpers/naturalness/profiles/mha.d.ts.map +0 -1
  248. package/dist/lipsync-helpers/naturalness/profiles/mha.js.map +0 -1
  249. package/dist/lipsync-helpers/naturalness/types.d.ts.map +0 -1
  250. package/dist/lipsync-helpers/naturalness/types.js.map +0 -1
  251. package/dist/lipsync-helpers/presetMappers.d.ts.map +0 -1
  252. package/dist/lipsync-helpers/presetMappers.js.map +0 -1
  253. package/dist/react/components/ConvaiWidget.d.ts.map +0 -1
  254. package/dist/react/components/ConvaiWidget.js.map +0 -1
  255. package/dist/react/components/index.d.ts.map +0 -1
  256. package/dist/react/components/index.js.map +0 -1
  257. package/dist/react/components/rtc-widget/components/AudioSettingsPanel.d.ts.map +0 -1
  258. package/dist/react/components/rtc-widget/components/AudioSettingsPanel.js.map +0 -1
  259. package/dist/react/components/rtc-widget/components/AudioVisualizer.d.ts.map +0 -1
  260. package/dist/react/components/rtc-widget/components/AudioVisualizer.js.map +0 -1
  261. package/dist/react/components/rtc-widget/components/ConviMessage.d.ts.map +0 -1
  262. package/dist/react/components/rtc-widget/components/ConviMessage.js.map +0 -1
  263. package/dist/react/components/rtc-widget/components/FloatingVideo.d.ts.map +0 -1
  264. package/dist/react/components/rtc-widget/components/FloatingVideo.js.map +0 -1
  265. package/dist/react/components/rtc-widget/components/MarkdownRenderer.d.ts.map +0 -1
  266. package/dist/react/components/rtc-widget/components/MarkdownRenderer.js.map +0 -1
  267. package/dist/react/components/rtc-widget/components/MessageBubble.d.ts.map +0 -1
  268. package/dist/react/components/rtc-widget/components/MessageBubble.js.map +0 -1
  269. package/dist/react/components/rtc-widget/components/MessageList.d.ts.map +0 -1
  270. package/dist/react/components/rtc-widget/components/MessageList.js.map +0 -1
  271. package/dist/react/components/rtc-widget/components/SiteCard.d.ts.map +0 -1
  272. package/dist/react/components/rtc-widget/components/SiteCard.js.map +0 -1
  273. package/dist/react/components/rtc-widget/components/UserMessage.d.ts.map +0 -1
  274. package/dist/react/components/rtc-widget/components/UserMessage.js.map +0 -1
  275. package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.d.ts.map +0 -1
  276. package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.js.map +0 -1
  277. package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.d.ts.map +0 -1
  278. package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.js.map +0 -1
  279. package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.d.ts.map +0 -1
  280. package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.js.map +0 -1
  281. package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.d.ts.map +0 -1
  282. package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.js.map +0 -1
  283. package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.d.ts.map +0 -1
  284. package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.js.map +0 -1
  285. package/dist/react/components/rtc-widget/components/conviComponents/index.d.ts.map +0 -1
  286. package/dist/react/components/rtc-widget/components/conviComponents/index.js.map +0 -1
  287. package/dist/react/components/rtc-widget/components/index.d.ts.map +0 -1
  288. package/dist/react/components/rtc-widget/components/index.js.map +0 -1
  289. package/dist/react/components/rtc-widget/index.d.ts.map +0 -1
  290. package/dist/react/components/rtc-widget/index.js.map +0 -1
  291. package/dist/react/components/rtc-widget/styles/framerConfig.d.ts.map +0 -1
  292. package/dist/react/components/rtc-widget/styles/framerConfig.js.map +0 -1
  293. package/dist/react/components/rtc-widget/styles/icons.d.ts.map +0 -1
  294. package/dist/react/components/rtc-widget/styles/icons.js.map +0 -1
  295. package/dist/react/components/rtc-widget/styles/index.d.ts.map +0 -1
  296. package/dist/react/components/rtc-widget/styles/index.js.map +0 -1
  297. package/dist/react/components/rtc-widget/styles/styledComponents.d.ts.map +0 -1
  298. package/dist/react/components/rtc-widget/styles/styledComponents.js.map +0 -1
  299. package/dist/react/components/rtc-widget/styles/theme.d.ts.map +0 -1
  300. package/dist/react/components/rtc-widget/styles/theme.js.map +0 -1
  301. package/dist/react/components/rtc-widget/types/index.d.ts.map +0 -1
  302. package/dist/react/components/rtc-widget/types/index.js.map +0 -1
  303. package/dist/react/hooks/index.d.ts.map +0 -1
  304. package/dist/react/hooks/index.js.map +0 -1
  305. package/dist/react/hooks/useCharacterInfo.d.ts.map +0 -1
  306. package/dist/react/hooks/useCharacterInfo.js.map +0 -1
  307. package/dist/react/hooks/useConvaiClient.d.ts.map +0 -1
  308. package/dist/react/hooks/useConvaiClient.js.map +0 -1
  309. package/dist/react/hooks/useLocalCameraTrack.d.ts.map +0 -1
  310. package/dist/react/hooks/useLocalCameraTrack.js.map +0 -1
  311. package/dist/react/icons.d.ts.map +0 -1
  312. package/dist/react/icons.js.map +0 -1
  313. package/dist/react/index.d.ts.map +0 -1
  314. package/dist/react/index.js.map +0 -1
  315. package/dist/utils/inlineMarkdown.d.ts.map +0 -1
  316. package/dist/utils/inlineMarkdown.js.map +0 -1
  317. package/dist/utils/lightbox.d.ts.map +0 -1
  318. package/dist/utils/lightbox.js.map +0 -1
  319. package/dist/utils/linkPresentation.d.ts.map +0 -1
  320. package/dist/utils/linkPresentation.js.map +0 -1
  321. package/dist/utils/linkPreview.d.ts.map +0 -1
  322. package/dist/utils/linkPreview.js.map +0 -1
  323. package/dist/utils/logger.d.ts.map +0 -1
  324. package/dist/utils/logger.js.map +0 -1
  325. package/dist/vanilla/AudioRenderer.d.ts.map +0 -1
  326. package/dist/vanilla/AudioRenderer.js.map +0 -1
  327. package/dist/vanilla/ConvaiWidget.d.ts.map +0 -1
  328. package/dist/vanilla/ConvaiWidget.js.map +0 -1
  329. package/dist/vanilla/WebSocketSession.d.ts.map +0 -1
  330. package/dist/vanilla/WebSocketSession.js.map +0 -1
  331. package/dist/vanilla/WidgetEventSubscriptions.d.ts.map +0 -1
  332. package/dist/vanilla/WidgetEventSubscriptions.js.map +0 -1
  333. package/dist/vanilla/icons.d.ts.map +0 -1
  334. package/dist/vanilla/icons.js.map +0 -1
  335. package/dist/vanilla/index.d.ts.map +0 -1
  336. package/dist/vanilla/index.js.map +0 -1
  337. package/dist/vanilla/styles.d.ts.map +0 -1
  338. package/dist/vanilla/styles.js.map +0 -1
  339. package/dist/vanilla/types.d.ts.map +0 -1
  340. package/dist/vanilla/types.js.map +0 -1
  341. package/dist/vanilla/websocket.d.ts.map +0 -1
  342. package/dist/vanilla/websocket.js.map +0 -1
  343. package/dist/version.d.ts.map +0 -1
  344. 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
- [![npm](https://img.shields.io/badge/npm-1.8.0--beta.7-blue)](https://www.npmjs.com/package/@convai/web-sdk)
5
+ [![npm](https://img.shields.io/npm/v/@convai/web-sdk/latest?label=npm&color=blue)](https://www.npmjs.com/package/@convai/web-sdk)
6
6
  [![TypeScript](https://img.shields.io/badge/TypeScript-first-3178C6)](https://www.typescriptlang.org/)
7
7
  [![License](https://img.shields.io/badge/license-Apache--2.0-green)](./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.8.0 (beta)
13
+ ## What's new in 1.9.0
14
14
 
15
- Install the beta with `npm install @convai/web-sdk@beta`.
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
- - **Agentic actions and canonical model output (v2)** — opt in with `capabilities`, declare client-executed tools in `actionConfig.tools`, consume typed `modelOutput` envelopes, return results with `sendActionResultAndWait()` for a correlated server acknowledgement, and read the raw provider stream through `botLlmTextRaw`. `visionPromptMode: "disabled"` keeps scene context without advertising visual perception. [Usage below.](#agentic-actions-and-canonical-model-output-v2)
19
- - **Published text chat** — a credential-free, text-only connection for public chat pages: `connectWithPublicationGrant()` and `connectionType: "text"`. For a copy/paste embed, pair it with [`@convai/web-widget`](https://www.npmjs.com/package/@convai/web-widget). [Usage below.](#published-text-chat)
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** — text-only streamed interactions through the interaction API, selected by `interactionApiUrl`; the one transport that runs under Node. [Usage below.](#sse-interaction-transport-beta)
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](./docs/convai_published_chat.md) for
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
- The `@convai/web-sdk/embed` browser element creates its own per-browser
149
- requester identifier. If a server or SSR integration calls its published-chat
150
- grant helpers directly, it must pass a caller-scoped requester identifier; do
151
- not reuse a process-wide identifier across visitors.
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> | Text-only interaction transport; the one that runs under Node |
240
- | [Character Versioning](docs/convai_character_versioning.md) | Connect to a draft, latest, or tagged version; list, compare, release and promote versions |
241
- | [Multi-Character Rooms](docs/convai_multi_character.md) | Rosters, `joinRoom`, interaction targets, live roster updates, per-member attribution |
242
- | [Published Text Chat](docs/convai_published_chat.md) | Grant-based text-only sessions, the copy/paste embed, lifecycle and API reference |
243
- | [Link Previews](docs/convai_link_previews.md) | Rendering links the character sends: previews, custom chat UIs, the scheme allowlist |
244
- | [Events Reference (local)](docs/convai_events.md) | Every event with its typed payload, including the v2 and multi-character events |
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 text-only integrations that need a streamed response:
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. SSE carries text only — no voice, video, or lipsync — and it never calls
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/convai_sse_transport.md).
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/convai_character_versioning.md).
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: [docs/convai_multi_character.md](docs/convai_multi_character.md).
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 `no_active_video`.
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
 
@@ -84,4 +84,3 @@ export declare class AudioManager extends EventEmitter implements AudioControls
84
84
  */
85
85
  reset(): void;
86
86
  }
87
- //# sourceMappingURL=AudioManager.d.ts.map
@@ -285,4 +285,3 @@ export class AudioManager extends EventEmitter {
285
285
  });
286
286
  }
287
287
  }
288
- //# sourceMappingURL=AudioManager.js.map
@@ -270,4 +270,3 @@ export declare class BlendshapeQueue {
270
270
  playbackFps: number;
271
271
  };
272
272
  }
273
- //# sourceMappingURL=BlendshapeQueue.d.ts.map
@@ -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
- const fadedFrame = new Float32Array(frame.length);
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
@@ -81,4 +81,3 @@ export declare class CharacterRoster {
81
81
  */
82
82
  applyConnectResponse(data: Record<string, unknown>): boolean;
83
83
  }
84
- //# sourceMappingURL=CharacterRoster.d.ts.map
@@ -345,4 +345,3 @@ function asString(value) {
345
345
  function asNumber(value) {
346
346
  return typeof value === "number" && Number.isFinite(value) ? value : null;
347
347
  }
348
- //# sourceMappingURL=CharacterRoster.js.map
@@ -97,4 +97,3 @@ export declare class CharacterVersionManager {
97
97
  private assertTag;
98
98
  private request;
99
99
  }
100
- //# sourceMappingURL=CharacterVersionManager.d.ts.map
@@ -224,4 +224,3 @@ function describeFailure(status, data) {
224
224
  return `HTTP ${status}: ${data}`;
225
225
  return `HTTP ${status}`;
226
226
  }
227
- //# sourceMappingURL=CharacterVersionManager.js.map
@@ -26,4 +26,3 @@ export declare class ConnectionStateHandler {
26
26
  */
27
27
  resetConnectionState(): void;
28
28
  }
29
- //# sourceMappingURL=ConnectionStateHandler.d.ts.map
@@ -51,7 +51,11 @@ export class ConnectionStateHandler {
51
51
  isConnected: true,
52
52
  isConnecting: false,
53
53
  });
54
- this.onBotReadyChange(false); // Wait for bot-ready message
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: string | null): void;
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