@webex/plugin-meetings 3.11.0 → 3.12.0-llmrefactor.2

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 (294) hide show
  1. package/AGENTS.md +9 -0
  2. package/dist/aiEnableRequest/index.js +197 -0
  3. package/dist/aiEnableRequest/index.js.map +1 -0
  4. package/dist/aiEnableRequest/utils.js +36 -0
  5. package/dist/aiEnableRequest/utils.js.map +1 -0
  6. package/dist/annotation/index.js +60 -15
  7. package/dist/annotation/index.js.map +1 -1
  8. package/dist/breakouts/breakout.js +8 -3
  9. package/dist/breakouts/breakout.js.map +1 -1
  10. package/dist/breakouts/events.js +29 -14
  11. package/dist/breakouts/events.js.map +1 -1
  12. package/dist/breakouts/index.js +128 -7
  13. package/dist/breakouts/index.js.map +1 -1
  14. package/dist/common/errors/webex-errors.js +49 -5
  15. package/dist/common/errors/webex-errors.js.map +1 -1
  16. package/dist/config.js +8 -3
  17. package/dist/config.js.map +1 -1
  18. package/dist/constants.js +60 -11
  19. package/dist/constants.js.map +1 -1
  20. package/dist/controls-options-manager/constants.js +11 -1
  21. package/dist/controls-options-manager/constants.js.map +1 -1
  22. package/dist/controls-options-manager/index.js +67 -29
  23. package/dist/controls-options-manager/index.js.map +1 -1
  24. package/dist/controls-options-manager/util.js +91 -0
  25. package/dist/controls-options-manager/util.js.map +1 -1
  26. package/dist/hashTree/constants.js +16 -2
  27. package/dist/hashTree/constants.js.map +1 -1
  28. package/dist/hashTree/hashTree.js +18 -0
  29. package/dist/hashTree/hashTree.js.map +1 -1
  30. package/dist/hashTree/hashTreeParser.js +1655 -538
  31. package/dist/hashTree/hashTreeParser.js.map +1 -1
  32. package/dist/hashTree/types.js +4 -2
  33. package/dist/hashTree/types.js.map +1 -1
  34. package/dist/hashTree/utils.js +52 -0
  35. package/dist/hashTree/utils.js.map +1 -1
  36. package/dist/index.js +18 -2
  37. package/dist/index.js.map +1 -1
  38. package/dist/interceptors/constant.js +12 -0
  39. package/dist/interceptors/constant.js.map +1 -0
  40. package/dist/interceptors/dataChannelAuthToken.js +332 -0
  41. package/dist/interceptors/dataChannelAuthToken.js.map +1 -0
  42. package/dist/interceptors/index.js +7 -0
  43. package/dist/interceptors/index.js.map +1 -1
  44. package/dist/interceptors/locusRetry.js +23 -8
  45. package/dist/interceptors/locusRetry.js.map +1 -1
  46. package/dist/interceptors/utils.js +27 -0
  47. package/dist/interceptors/utils.js.map +1 -0
  48. package/dist/interpretation/index.js +11 -2
  49. package/dist/interpretation/index.js.map +1 -1
  50. package/dist/interpretation/interpretation.types.js +7 -0
  51. package/dist/interpretation/interpretation.types.js.map +1 -0
  52. package/dist/interpretation/siLanguage.js +1 -1
  53. package/dist/locus-info/controlsUtils.js +9 -4
  54. package/dist/locus-info/controlsUtils.js.map +1 -1
  55. package/dist/locus-info/index.js +914 -212
  56. package/dist/locus-info/index.js.map +1 -1
  57. package/dist/locus-info/infoUtils.js +36 -5
  58. package/dist/locus-info/infoUtils.js.map +1 -1
  59. package/dist/locus-info/selfUtils.js +1 -0
  60. package/dist/locus-info/selfUtils.js.map +1 -1
  61. package/dist/locus-info/types.js +19 -0
  62. package/dist/locus-info/types.js.map +1 -1
  63. package/dist/media/MediaConnectionAwaiter.js +72 -3
  64. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  65. package/dist/media/index.js +8 -2
  66. package/dist/media/index.js.map +1 -1
  67. package/dist/media/properties.js +8 -7
  68. package/dist/media/properties.js.map +1 -1
  69. package/dist/meeting/in-meeting-actions.js +11 -1
  70. package/dist/meeting/in-meeting-actions.js.map +1 -1
  71. package/dist/meeting/index.js +2287 -1118
  72. package/dist/meeting/index.js.map +1 -1
  73. package/dist/meeting/locusMediaRequest.js +229 -82
  74. package/dist/meeting/locusMediaRequest.js.map +1 -1
  75. package/dist/meeting/muteState.js +10 -1
  76. package/dist/meeting/muteState.js.map +1 -1
  77. package/dist/meeting/request.js +55 -2
  78. package/dist/meeting/request.js.map +1 -1
  79. package/dist/meeting/request.type.js.map +1 -1
  80. package/dist/meeting/util.js +168 -5
  81. package/dist/meeting/util.js.map +1 -1
  82. package/dist/meeting-info/meeting-info-v2.js +2 -2
  83. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  84. package/dist/meetings/index.js +369 -162
  85. package/dist/meetings/index.js.map +1 -1
  86. package/dist/meetings/meetings.types.js +6 -1
  87. package/dist/meetings/meetings.types.js.map +1 -1
  88. package/dist/meetings/request.js +39 -0
  89. package/dist/meetings/request.js.map +1 -1
  90. package/dist/meetings/util.js +116 -18
  91. package/dist/meetings/util.js.map +1 -1
  92. package/dist/member/index.js +20 -0
  93. package/dist/member/index.js.map +1 -1
  94. package/dist/member/types.js.map +1 -1
  95. package/dist/member/util.js +40 -0
  96. package/dist/member/util.js.map +1 -1
  97. package/dist/members/index.js +101 -43
  98. package/dist/members/index.js.map +1 -1
  99. package/dist/members/util.js +8 -1
  100. package/dist/members/util.js.map +1 -1
  101. package/dist/metrics/constants.js +12 -1
  102. package/dist/metrics/constants.js.map +1 -1
  103. package/dist/multistream/codec/constants.js +63 -0
  104. package/dist/multistream/codec/constants.js.map +1 -0
  105. package/dist/multistream/mediaRequestManager.js +64 -68
  106. package/dist/multistream/mediaRequestManager.js.map +1 -1
  107. package/dist/multistream/receiveSlot.js +9 -0
  108. package/dist/multistream/receiveSlot.js.map +1 -1
  109. package/dist/multistream/remoteMediaManager.js +11 -0
  110. package/dist/multistream/remoteMediaManager.js.map +1 -1
  111. package/dist/multistream/sendSlotManager.js +116 -2
  112. package/dist/multistream/sendSlotManager.js.map +1 -1
  113. package/dist/reachability/clusterReachability.js.map +1 -1
  114. package/dist/reachability/index.js +139 -93
  115. package/dist/reachability/index.js.map +1 -1
  116. package/dist/reachability/reachability.types.js +2 -0
  117. package/dist/reachability/reachability.types.js.map +1 -1
  118. package/dist/reachability/util.js +45 -0
  119. package/dist/reachability/util.js.map +1 -1
  120. package/dist/reactions/reactions.type.js.map +1 -1
  121. package/dist/reconnection-manager/index.js +0 -1
  122. package/dist/reconnection-manager/index.js.map +1 -1
  123. package/dist/recording-controller/index.js +1 -3
  124. package/dist/recording-controller/index.js.map +1 -1
  125. package/dist/roap/turnDiscovery.js +8 -1
  126. package/dist/roap/turnDiscovery.js.map +1 -1
  127. package/dist/types/aiEnableRequest/index.d.ts +5 -0
  128. package/dist/types/aiEnableRequest/utils.d.ts +2 -0
  129. package/dist/types/annotation/index.d.ts +19 -0
  130. package/dist/types/common/errors/webex-errors.d.ts +32 -2
  131. package/dist/types/config.d.ts +6 -2
  132. package/dist/types/constants.d.ts +35 -1
  133. package/dist/types/controls-options-manager/constants.d.ts +6 -1
  134. package/dist/types/controls-options-manager/index.d.ts +16 -0
  135. package/dist/types/hashTree/constants.d.ts +3 -0
  136. package/dist/types/hashTree/hashTree.d.ts +7 -0
  137. package/dist/types/hashTree/hashTreeParser.d.ts +315 -30
  138. package/dist/types/hashTree/types.d.ts +3 -0
  139. package/dist/types/hashTree/utils.d.ts +24 -0
  140. package/dist/types/index.d.ts +4 -0
  141. package/dist/types/interceptors/constant.d.ts +5 -0
  142. package/dist/types/interceptors/dataChannelAuthToken.d.ts +43 -0
  143. package/dist/types/interceptors/index.d.ts +2 -1
  144. package/dist/types/interceptors/locusRetry.d.ts +4 -4
  145. package/dist/types/interceptors/utils.d.ts +1 -0
  146. package/dist/types/interpretation/interpretation.types.d.ts +10 -0
  147. package/dist/types/locus-info/index.d.ts +126 -15
  148. package/dist/types/locus-info/infoUtils.d.ts +8 -0
  149. package/dist/types/locus-info/types.d.ts +28 -1
  150. package/dist/types/media/MediaConnectionAwaiter.d.ts +20 -2
  151. package/dist/types/media/properties.d.ts +8 -3
  152. package/dist/types/meeting/in-meeting-actions.d.ts +10 -0
  153. package/dist/types/meeting/index.d.ts +271 -16
  154. package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
  155. package/dist/types/meeting/request.d.ts +17 -1
  156. package/dist/types/meeting/request.type.d.ts +5 -0
  157. package/dist/types/meeting/util.d.ts +40 -0
  158. package/dist/types/meetings/index.d.ts +42 -20
  159. package/dist/types/meetings/meetings.types.d.ts +15 -0
  160. package/dist/types/meetings/request.d.ts +14 -0
  161. package/dist/types/member/index.d.ts +2 -0
  162. package/dist/types/member/types.d.ts +1 -0
  163. package/dist/types/member/util.d.ts +14 -0
  164. package/dist/types/members/index.d.ts +15 -2
  165. package/dist/types/members/util.d.ts +1 -5
  166. package/dist/types/metrics/constants.d.ts +11 -0
  167. package/dist/types/multistream/codec/constants.d.ts +7 -0
  168. package/dist/types/multistream/mediaRequestManager.d.ts +20 -26
  169. package/dist/types/multistream/sendSlotManager.d.ts +23 -1
  170. package/dist/types/reachability/clusterReachability.d.ts +3 -3
  171. package/dist/types/reachability/index.d.ts +10 -3
  172. package/dist/types/reachability/reachability.types.d.ts +7 -0
  173. package/dist/types/reachability/util.d.ts +17 -0
  174. package/dist/types/reactions/reactions.type.d.ts +4 -0
  175. package/dist/types/webinar/utils.d.ts +6 -0
  176. package/dist/webinar/index.js +612 -165
  177. package/dist/webinar/index.js.map +1 -1
  178. package/dist/webinar/utils.js +25 -0
  179. package/dist/webinar/utils.js.map +1 -0
  180. package/package.json +24 -23
  181. package/src/aiEnableRequest/README.md +84 -0
  182. package/src/aiEnableRequest/index.ts +186 -0
  183. package/src/aiEnableRequest/utils.ts +25 -0
  184. package/src/annotation/index.ts +67 -15
  185. package/src/breakouts/breakout.ts +3 -1
  186. package/src/breakouts/events.ts +33 -11
  187. package/src/breakouts/index.ts +145 -3
  188. package/src/common/errors/webex-errors.ts +50 -3
  189. package/src/config.ts +6 -2
  190. package/src/constants.ts +49 -3
  191. package/src/controls-options-manager/constants.ts +14 -1
  192. package/src/controls-options-manager/index.ts +87 -28
  193. package/src/controls-options-manager/util.ts +81 -1
  194. package/src/hashTree/constants.ts +17 -0
  195. package/src/hashTree/hashTree.ts +17 -0
  196. package/src/hashTree/hashTreeParser.ts +1482 -361
  197. package/src/hashTree/types.ts +4 -0
  198. package/src/hashTree/utils.ts +45 -0
  199. package/src/index.ts +14 -1
  200. package/src/interceptors/constant.ts +6 -0
  201. package/src/interceptors/dataChannelAuthToken.ts +217 -0
  202. package/src/interceptors/index.ts +2 -1
  203. package/src/interceptors/locusRetry.ts +25 -4
  204. package/src/interceptors/utils.ts +16 -0
  205. package/src/interpretation/index.ts +29 -11
  206. package/src/interpretation/interpretation.types.ts +11 -0
  207. package/src/locus-info/controlsUtils.ts +14 -1
  208. package/src/locus-info/index.ts +976 -203
  209. package/src/locus-info/infoUtils.ts +41 -6
  210. package/src/locus-info/selfUtils.ts +1 -0
  211. package/src/locus-info/types.ts +33 -1
  212. package/src/media/MediaConnectionAwaiter.ts +62 -5
  213. package/src/media/index.ts +10 -1
  214. package/src/media/properties.ts +11 -4
  215. package/src/meeting/in-meeting-actions.ts +20 -0
  216. package/src/meeting/index.ts +1258 -222
  217. package/src/meeting/locusMediaRequest.ts +106 -6
  218. package/src/meeting/muteState.ts +10 -1
  219. package/src/meeting/request.ts +53 -0
  220. package/src/meeting/request.type.ts +6 -0
  221. package/src/meeting/util.ts +207 -7
  222. package/src/meeting-info/meeting-info-v2.ts +4 -2
  223. package/src/meetings/index.ts +319 -117
  224. package/src/meetings/meetings.types.ts +19 -0
  225. package/src/meetings/request.ts +43 -0
  226. package/src/meetings/util.ts +117 -4
  227. package/src/member/index.ts +20 -0
  228. package/src/member/types.ts +1 -0
  229. package/src/member/util.ts +41 -0
  230. package/src/members/index.ts +70 -7
  231. package/src/members/util.ts +12 -4
  232. package/src/metrics/constants.ts +12 -0
  233. package/src/multistream/codec/constants.ts +58 -0
  234. package/src/multistream/mediaRequestManager.ts +117 -76
  235. package/src/multistream/receiveSlot.ts +18 -0
  236. package/src/multistream/remoteMediaManager.ts +13 -0
  237. package/src/multistream/sendSlotManager.ts +97 -3
  238. package/src/reachability/clusterReachability.ts +3 -2
  239. package/src/reachability/index.ts +56 -16
  240. package/src/reachability/reachability.types.ts +11 -0
  241. package/src/reachability/util.ts +36 -0
  242. package/src/reactions/reactions.type.ts +4 -0
  243. package/src/reconnection-manager/index.ts +0 -1
  244. package/src/recording-controller/index.ts +1 -2
  245. package/src/roap/turnDiscovery.ts +9 -1
  246. package/src/webinar/index.ts +416 -12
  247. package/src/webinar/utils.ts +16 -0
  248. package/test/unit/spec/aiEnableRequest/index.ts +1067 -0
  249. package/test/unit/spec/aiEnableRequest/utils.ts +130 -0
  250. package/test/unit/spec/annotation/index.ts +228 -134
  251. package/test/unit/spec/breakouts/breakout.ts +9 -3
  252. package/test/unit/spec/breakouts/events.ts +120 -2
  253. package/test/unit/spec/breakouts/index.ts +331 -15
  254. package/test/unit/spec/common/errors/webex-errors.ts +78 -0
  255. package/test/unit/spec/controls-options-manager/index.js +244 -29
  256. package/test/unit/spec/controls-options-manager/util.js +165 -0
  257. package/test/unit/spec/hashTree/hashTree.ts +66 -0
  258. package/test/unit/spec/hashTree/hashTreeParser.ts +4528 -171
  259. package/test/unit/spec/hashTree/utils.ts +125 -1
  260. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +388 -0
  261. package/test/unit/spec/interceptors/locusRetry.ts +205 -4
  262. package/test/unit/spec/interceptors/utils.ts +75 -0
  263. package/test/unit/spec/interpretation/index.ts +26 -4
  264. package/test/unit/spec/locus-info/controlsUtils.js +200 -56
  265. package/test/unit/spec/locus-info/index.js +1861 -149
  266. package/test/unit/spec/locus-info/infoUtils.js +184 -1
  267. package/test/unit/spec/media/MediaConnectionAwaiter.ts +96 -1
  268. package/test/unit/spec/media/index.ts +92 -0
  269. package/test/unit/spec/media/properties.ts +35 -26
  270. package/test/unit/spec/meeting/in-meeting-actions.ts +12 -2
  271. package/test/unit/spec/meeting/index.js +3694 -450
  272. package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
  273. package/test/unit/spec/meeting/muteState.js +81 -0
  274. package/test/unit/spec/meeting/request.js +82 -0
  275. package/test/unit/spec/meeting/utils.js +595 -27
  276. package/test/unit/spec/meeting-info/meetinginfov2.js +19 -10
  277. package/test/unit/spec/meetings/index.js +1138 -86
  278. package/test/unit/spec/meetings/request.js +141 -0
  279. package/test/unit/spec/meetings/utils.js +402 -51
  280. package/test/unit/spec/member/index.js +35 -4
  281. package/test/unit/spec/member/util.js +154 -27
  282. package/test/unit/spec/members/index.js +216 -0
  283. package/test/unit/spec/members/request.js +37 -1
  284. package/test/unit/spec/members/utils.js +63 -0
  285. package/test/unit/spec/multistream/mediaRequestManager.ts +503 -122
  286. package/test/unit/spec/multistream/remoteMediaManager.ts +30 -0
  287. package/test/unit/spec/multistream/sendSlotManager.ts +135 -36
  288. package/test/unit/spec/reachability/index.ts +151 -46
  289. package/test/unit/spec/reachability/util.ts +31 -0
  290. package/test/unit/spec/reconnection-manager/index.js +4 -8
  291. package/test/unit/spec/recording-controller/index.js +9 -8
  292. package/test/unit/spec/roap/turnDiscovery.ts +20 -0
  293. package/test/unit/spec/webinar/index.ts +1087 -167
  294. package/test/unit/spec/webinar/utils.ts +39 -0
package/src/constants.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  // @ts-ignore
2
2
  import {hydraTypes} from '@webex/common';
3
3
 
4
+ export {LLM_DEFAULT_SESSION, LLM_PRACTICE_SESSION} from '@webex/internal-plugin-llm';
5
+
4
6
  export type Enum<T extends Record<string, unknown>> = T[keyof T];
5
7
 
6
8
  // *********** LOWERCASE / CAMELCASE STRINGS ************
@@ -364,6 +366,8 @@ export const EVENT_TRIGGERS = {
364
366
  MEETING_CONTROLS_VIEW_THE_PARTICIPANTS_LIST_UPDATED:
365
367
  'meeting:controls:view-the-participants-list:updated',
366
368
  MEETING_CONTROLS_RAISE_HAND_UPDATED: 'meeting:controls:raise-hand:updated',
369
+ MEETING_CONTROLS_AI_SUMMARY_NOTIFICATION_UPDATED:
370
+ 'meeting:controls:ai-summary-notification:updated',
367
371
  MEETING_CONTROLS_VIDEO_UPDATED: 'meeting:controls:video:updated',
368
372
  MEETING_CONTROLS_STAGE_VIEW_UPDATED: 'meeting:controls:stage-view:updated',
369
373
  MEETING_CONTROLS_WEBCAST_UPDATED: 'meeting:controls:webcast:updated',
@@ -387,6 +391,8 @@ export const EVENT_TRIGGERS = {
387
391
  MEETING_MANUAL_CAPTION_UPDATED: 'meeting:manualCaptionControl:updated',
388
392
  MEETING_CAPTION_RECEIVED: 'meeting:caption-received',
389
393
  MEETING_PARTICIPANT_REASON_CHANGED: 'meeting:participant-reason-changed',
394
+ MEETING_AI_ENABLE_REQUEST: 'meeting:aiEnableRequest',
395
+ MEETING_SRTP_CIPHER_UPDATED: 'meeting:srtpCipher:updated',
390
396
  };
391
397
 
392
398
  export const EVENT_TYPES = {
@@ -413,8 +419,7 @@ export const HEADERS = {
413
419
  // Meeting actually ended
414
420
  export const MEETING_REMOVED_REASON = {
415
421
  SELF_REMOVED: 'SELF_REMOVED', // server or host removed you from the meeting
416
- FULLSTATE_REMOVED: 'FULLSTATE_REMOVED', // meeting got dropped ? not sure
417
- MEETING_INACTIVE_TERMINATING: 'MEETING_INACTIVE_TERMINATING', // Meeting got ended or everyone left the meeting
422
+ MEETING_INACTIVE_TERMINATING: 'MEETING_INACTIVE_TERMINATING', // Meeting got ended or everyone left the meeting (historically was sent on Locus TERMINATING or INACTIVE, but now only on INACTIVE as that's the final state)
418
423
  CLIENT_LEAVE_REQUEST: 'CLIENT_LEAVE_REQUEST', // You triggered leave meeting
419
424
  CLIENT_LEAVE_REQUEST_TAB_CLOSED: 'CLIENT_LEAVE_REQUEST_TAB_CLOSED', // You triggered leave meeting, such as closing the browser tab directly
420
425
  USER_ENDED_SHARE_STREAMS: 'USER_ENDED_SHARE_STREAMS', // user triggered stop share
@@ -655,6 +660,7 @@ export const BREAKOUTS = {
655
660
  LEAVE_BREAKOUT: 'LEAVE_BREAKOUT',
656
661
  ASK_FOR_HELP: 'ASK_FOR_HELP',
657
662
  PRE_ASSIGNMENTS_UPDATE: 'PRE_ASSIGNMENTS_UPDATE',
663
+ LLM_CONNECT_RESPONSE: 'LLM_CONNECT_RESPONSE',
658
664
  },
659
665
  SESSION_TYPES: {
660
666
  MAIN: 'MAIN',
@@ -697,6 +703,12 @@ export const INTERPRETATION = {
697
703
  DECLINED: 'DECLINED',
698
704
  },
699
705
  RESOURCE_TYPE: 'SiHandover',
706
+ CAPABILITIES: {
707
+ HOST_CONTROL_SI_SUPPORTED: 'HOST_CONTROL_SI_SUPPORTED',
708
+ INTERPRETER_CONTROL_SI_SUPPORTED: 'INTERPRETER_CONTROL_SI_SUPPORTED',
709
+ SI_HANDOVER_SUPPORTED: 'SI_HANDOVER_SUPPORTED',
710
+ SIGN_INTERPRETER_SUPPORTED: 'SIGN_INTERPRETER_SUPPORTED',
711
+ },
700
712
  };
701
713
 
702
714
  export const LOCUSINFO = {
@@ -704,6 +716,7 @@ export const LOCUSINFO = {
704
716
  CONTROLS_MEETING_LAYOUT_UPDATED: 'CONTROLS_MEETING_LAYOUT_UPDATED',
705
717
  CONTROLS_RECORDING_UPDATED: 'CONTROLS_RECORDING_UPDATED',
706
718
  CONTROLS_MEETING_TRANSCRIBE_UPDATED: 'CONTROLS_MEETING_TRANSCRIBE_UPDATED',
719
+ CONTROLS_AI_SUMMARY_NOTIFICATION_UPDATED: 'CONTROLS_AI_SUMMARY_NOTIFICATION_UPDATED',
707
720
  CONTROLS_MEETING_TRANSCRIPTION_SPOKEN_LANGUAGE_UPDATED:
708
721
  'CONTROLS_MEETING_TRANSCRIPTION_SPOKEN_LANGUAGE_UPDATED',
709
722
  CONTROLS_MEETING_MANUAL_CAPTION_UPDATED: 'CONTROLS_MEETING_MANUAL_CAPTION_UPDATED',
@@ -750,6 +763,7 @@ export const LOCUSINFO = {
750
763
  SELF_IS_SHARING_BLOCKED_CHANGE: 'SELF_IS_SHARING_BLOCKED_CHANGE',
751
764
  SELF_MEETING_BREAKOUTS_CHANGED: 'SELF_MEETING_BREAKOUTS_CHANGED',
752
765
  SELF_MEETING_INTERPRETATION_CHANGED: 'SELF_MEETING_INTERPRETATION_CHANGED',
766
+ SELF_ID_CHANGED: 'SELF_ID_CHANGED',
753
767
  SELF_MEETING_BRB_CHANGED: 'SELF_MEETING_BRB_CHANGED',
754
768
  MEDIA_INACTIVITY: 'MEDIA_INACTIVITY',
755
769
  LINKS_SERVICES: 'LINKS_SERVICES',
@@ -797,6 +811,8 @@ export const LOCUSEVENT = {
797
811
 
798
812
  HASH_TREE_DATA_UPDATED: 'locus.state_message',
799
813
 
814
+ APPROVAL_REQUEST: 'locus.approval_request',
815
+
800
816
  // events generated internally by SDK
801
817
  SDK_LOCUS_FROM_SYNC_MEETINGS: 'jsSdk.locus_from_sync_meetings', // generated for each meeting from response to GET /loci Locus API call
802
818
  SDK_NO_EVENT: 'jsSdk.no_event', // used in cases where eventType is irrelevant
@@ -977,6 +993,8 @@ export const DISPLAY_HINTS = {
977
993
  LOWER_SOMEONE_ELSES_HAND: 'LOWER_SOMEONE_ELSES_HAND',
978
994
  LEAVE_TRANSFER_HOST_END_MEETING: 'LEAVE_TRANSFER_HOST_END_MEETING',
979
995
  LEAVE_END_MEETING: 'LEAVE_END_MEETING',
996
+ END_MEETING: 'END_MEETING',
997
+ REQUIRE_HOST_END_MEETING_BEFORE_LEAVE: 'REQUIRE_HOST_END_MEETING_BEFORE_LEAVE',
980
998
  STREAMING_STATUS_STARTED: 'STREAMING_STATUS_STARTED',
981
999
  STREAMING_STATUS_STOPPED: 'STREAMING_STATUS_STOPPED',
982
1000
  CAPTION_START: 'CAPTION_START',
@@ -1022,6 +1040,8 @@ export const DISPLAY_HINTS = {
1022
1040
  // participants list
1023
1041
  DISABLE_VIEW_THE_PARTICIPANT_LIST: 'DISABLE_VIEW_THE_PARTICIPANT_LIST',
1024
1042
  ENABLE_VIEW_THE_PARTICIPANT_LIST: 'ENABLE_VIEW_THE_PARTICIPANT_LIST',
1043
+ VIEW_THE_PARTICIPANT_LIST: 'VIEW_THE_PARTICIPANT_LIST',
1044
+ CAN_VIEW_THE_PARTICIPANT_LIST: 'CAN_VIEW_THE_PARTICIPANT_LIST',
1025
1045
  // for webinar participants list
1026
1046
  DISABLE_VIEW_THE_PARTICIPANT_LIST_PANELIST: 'DISABLE_VIEW_THE_PARTICIPANT_LIST_PANELIST',
1027
1047
  ENABLE_VIEW_THE_PARTICIPANT_LIST_PANELIST: 'ENABLE_VIEW_THE_PARTICIPANT_LIST_PANELIST',
@@ -1080,15 +1100,26 @@ export const DISPLAY_HINTS = {
1080
1100
  // Polling QA
1081
1101
  ENABLE_ATTENDEE_START_POLLING_QA: 'ENABLE_ATTENDEE_START_POLLING_QA',
1082
1102
  DISABLE_ATTENDEE_START_POLLING_QA: 'DISABLE_ATTENDEE_START_POLLING_QA',
1103
+
1104
+ // AI
1105
+ ATTENDEE_REQUEST_AI_ASSISTANT_ENABLED: 'ATTENDEE_REQUEST_AI_ASSISTANT_ENABLED',
1106
+ ATTENDEE_REQUEST_AI_ASSISTANT_DECLINED_ALL: 'ATTENDEE_REQUEST_AI_ASSISTANT_DECLINED_ALL',
1107
+
1108
+ // Anonymous Display Names
1109
+ ANONYMOUS_DISPLAY_NAMES_ENABLED: 'ANONYMOUS_DISPLAY_NAMES_ENABLED',
1083
1110
  };
1084
1111
 
1085
- export const INTERSTITIAL_DISPLAY_HINTS = [DISPLAY_HINTS.VOIP_IS_ENABLED];
1112
+ export const INTERSTITIAL_DISPLAY_HINTS = [
1113
+ DISPLAY_HINTS.VOIP_IS_ENABLED,
1114
+ DISPLAY_HINTS.ANONYMOUS_DISPLAY_NAMES_ENABLED,
1115
+ ];
1086
1116
 
1087
1117
  export const SELF_ROLES = {
1088
1118
  COHOST: 'COHOST',
1089
1119
  MODERATOR: 'MODERATOR',
1090
1120
  ATTENDEE: 'ATTENDEE',
1091
1121
  PANELIST: 'PANELIST',
1122
+ PRESENTER: 'PRESENTER',
1092
1123
  };
1093
1124
 
1094
1125
  export const MEETING_STATE = {
@@ -1401,3 +1432,18 @@ export const STAGE_MANAGER_TYPE = {
1401
1432
  BACKGROUND: 0b010,
1402
1433
  NAME_LABEL: 0b100,
1403
1434
  };
1435
+
1436
+ export const DEFAULT_LARGE_SCALE_WEBINAR_ATTENDEE_SEARCH_LIMIT = 50;
1437
+
1438
+ export const AI_ENABLE_REQUEST = {
1439
+ EVENTS: {
1440
+ APPROVAL_REQUEST_ARRIVED: 'APPROVAL_REQUEST_ARRIVED',
1441
+ },
1442
+ ACTION_TYPE: {
1443
+ REQUESTED: 'REQUESTED',
1444
+ ACCEPTED: 'ACCEPTED',
1445
+ DECLINED: 'DECLINED',
1446
+ DECLINED_ALL: 'DECLINED_ALL',
1447
+ },
1448
+ RESOURCE_TYPE: 'AiAssistant',
1449
+ };
@@ -1,5 +1,18 @@
1
+ import {camelCase} from 'lodash';
2
+ import {Control, Setting} from './enums';
3
+
1
4
  const ENABLED = 'enabled';
2
5
  const CAN_SET = 'canSet';
3
6
  const CAN_UNSET = 'canUnset';
4
7
 
5
- export {ENABLED, CAN_SET, CAN_UNSET};
8
+ /**
9
+ * Body keys that represent audio controls. These do not support cross-locus
10
+ * authorization and must be sent directly to the current locus URL.
11
+ */
12
+ const AUDIO_CONTROL_BODY_KEYS: ReadonlySet<string> = new Set([
13
+ Control.audio,
14
+ camelCase(Setting.muteOnEntry),
15
+ camelCase(Setting.disallowUnmute),
16
+ ]);
17
+
18
+ export {ENABLED, CAN_SET, CAN_UNSET, AUDIO_CONTROL_BODY_KEYS};
@@ -1,10 +1,10 @@
1
1
  import {camelCase} from 'lodash';
2
+ import ParameterError from '../common/errors/parameter';
2
3
  import PermissionError from '../common/errors/permission';
3
- import {CONTROLS, HTTP_VERBS} from '../constants';
4
4
  import MeetingRequest from '../meeting/request';
5
5
  import LoggerProxy from '../common/logs/logger-proxy';
6
6
  import {Control, Setting} from './enums';
7
- import {ControlConfig} from './types';
7
+ import {ControlConfig, ViewTheParticipantListProperties} from './types';
8
8
  import Util from './util';
9
9
  import {CAN_SET, CAN_UNSET, ENABLED} from './constants';
10
10
 
@@ -56,6 +56,10 @@ export default class ControlsOptionsManager {
56
56
  */
57
57
  private mainLocusUrl: string;
58
58
 
59
+ private getControls: () => Record<string, any> = () => ({});
60
+
61
+ private isWebinar: () => boolean = () => false;
62
+
59
63
  /**
60
64
  * @param {MeetingRequest} request
61
65
  * @param {Object} options
@@ -67,6 +71,8 @@ export default class ControlsOptionsManager {
67
71
  options?: {
68
72
  locusUrl: string;
69
73
  displayHints?: Array<string>;
74
+ getControls?: () => Record<string, any>;
75
+ isWebinar?: () => boolean;
70
76
  }
71
77
  ) {
72
78
  this.initialize(request);
@@ -89,7 +95,12 @@ export default class ControlsOptionsManager {
89
95
  * @public
90
96
  * @memberof ControlsOptionsManager
91
97
  */
92
- public set(options?: {locusUrl: string; displayHints?: Array<string>}) {
98
+ public set(options?: {
99
+ locusUrl: string;
100
+ displayHints?: Array<string>;
101
+ getControls?: () => Record<string, any>;
102
+ isWebinar?: () => boolean;
103
+ }) {
93
104
  this.extract(options);
94
105
  }
95
106
 
@@ -141,9 +152,20 @@ export default class ControlsOptionsManager {
141
152
  * @private
142
153
  * @memberof ControlsOptionsManager
143
154
  */
144
- private extract(options?: {locusUrl: string; displayHints?: Array<string>}) {
155
+ private extract(options?: {
156
+ locusUrl: string;
157
+ displayHints?: Array<string>;
158
+ getControls?: () => Record<string, any>;
159
+ isWebinar?: () => boolean;
160
+ }) {
145
161
  this.setDisplayHints(options?.displayHints);
146
162
  this.setLocusUrl(options?.locusUrl);
163
+ if (options?.getControls) {
164
+ this.getControls = options.getControls;
165
+ }
166
+ if (options?.isWebinar) {
167
+ this.isWebinar = options.isWebinar;
168
+ }
147
169
  }
148
170
 
149
171
  /**
@@ -153,6 +175,12 @@ export default class ControlsOptionsManager {
153
175
  * @returns {Promise<Array<any>>}- Promise resolving if the request was successful.
154
176
  */
155
177
  public update(...controls: Array<ControlConfig>) {
178
+ if (!this.locusUrl) {
179
+ return Promise.reject(
180
+ new ParameterError('The associated locusUrl for update() controls must be defined.')
181
+ );
182
+ }
183
+
156
184
  const payloads = controls.map((control) => {
157
185
  if (!Object.keys(Control).includes(control.scope)) {
158
186
  throw new Error(
@@ -166,25 +194,33 @@ export default class ControlsOptionsManager {
166
194
  );
167
195
  }
168
196
 
197
+ let {properties} = control;
198
+
199
+ if (control.scope === Control.viewTheParticipantList) {
200
+ const props = properties as ViewTheParticipantListProperties;
201
+ const current = this.getControls()?.viewTheParticipantList;
202
+ properties = {
203
+ enabled: props.enabled ?? current?.enabled ?? false,
204
+ ...(this.isWebinar() && {
205
+ panelistEnabled: props.panelistEnabled ?? current?.panelistEnabled ?? false,
206
+ attendeeCount: props.attendeeCount ?? Boolean(current?.attendeeCount) ?? false,
207
+ }),
208
+ };
209
+ }
210
+
169
211
  return {
170
- [control.scope]: control.properties,
212
+ [control.scope]: properties,
171
213
  };
172
214
  });
173
215
 
174
216
  return payloads.reduce((previous, payload) => {
175
- const extraBody =
176
- this.mainLocusUrl && this.mainLocusUrl !== this.locusUrl
177
- ? {authorizingLocusUrl: this.locusUrl}
178
- : {};
179
-
180
- return previous.then(() =>
181
- // @ts-ignore
182
- this.request.request({
183
- uri: `${this.mainLocusUrl || this.locusUrl}/${CONTROLS}`,
184
- body: {...payload, ...extraBody},
185
- method: HTTP_VERBS.PATCH,
186
- })
187
- );
217
+ const requestParams = Util.getControlsRequestParams({
218
+ body: payload,
219
+ locusUrl: this.locusUrl,
220
+ mainLocusUrl: this.mainLocusUrl,
221
+ });
222
+
223
+ return previous.then(() => this.sendControlsRequest(requestParams));
188
224
  }, Promise.resolve());
189
225
  }
190
226
 
@@ -200,6 +236,12 @@ export default class ControlsOptionsManager {
200
236
  [Setting.muteOnEntry]?: boolean;
201
237
  [Setting.roles]?: Array<string>;
202
238
  }): Promise<any> {
239
+ if (!this.locusUrl) {
240
+ return Promise.reject(
241
+ new ParameterError('The associated locusUrl for setControls() must be defined.')
242
+ );
243
+ }
244
+
203
245
  LoggerProxy.logger.log(
204
246
  `ControlsOptionsManager:index#setControls --> ${JSON.stringify(setting)}`
205
247
  );
@@ -258,17 +300,34 @@ export default class ControlsOptionsManager {
258
300
  if (error) {
259
301
  return Promise.reject(error);
260
302
  }
261
- const extraBody =
262
- this.mainLocusUrl && this.mainLocusUrl !== this.locusUrl
263
- ? {authorizingLocusUrl: this.locusUrl}
264
- : {};
265
-
266
- // @ts-ignore
267
- return this.request.request({
268
- uri: `${this.mainLocusUrl || this.locusUrl}/${CONTROLS}`,
269
- body: {...body, ...extraBody},
270
- method: HTTP_VERBS.PATCH,
303
+
304
+ const requestParams = Util.getControlsRequestParams({
305
+ body,
306
+ locusUrl: this.locusUrl,
307
+ mainLocusUrl: this.mainLocusUrl,
271
308
  });
309
+
310
+ return this.sendControlsRequest(requestParams);
311
+ }
312
+
313
+ /**
314
+ * Sends a controls request to Locus. When authorizingLocusUrl is present in the body,
315
+ * we use a plain request() because the response contains the main session Locus DTO
316
+ * instead of the breakout we're in, so we don't want to parse it as a delta.
317
+ * Otherwise we use locusDeltaRequest() for normal delta processing.
318
+ *
319
+ * @param {Object} requestParams - The request parameters from getControlsRequestParams.
320
+ * @returns {Promise<any>}
321
+ */
322
+ private sendControlsRequest(requestParams: {
323
+ uri: string;
324
+ body: Record<string, any>;
325
+ method: string;
326
+ }): Promise<any> {
327
+ return requestParams.body.authorizingLocusUrl
328
+ ? // @ts-ignore
329
+ this.request.request(requestParams)
330
+ : this.request.locusDeltaRequest(requestParams);
272
331
  }
273
332
 
274
333
  /**
@@ -1,5 +1,6 @@
1
- import {DISPLAY_HINTS} from '../constants';
1
+ import {CONTROLS, DISPLAY_HINTS, HTTP_VERBS} from '../constants';
2
2
  import {Control} from './enums';
3
+ import {AUDIO_CONTROL_BODY_KEYS} from './constants';
3
4
  import {
4
5
  ControlConfig,
5
6
  AudioProperties,
@@ -400,6 +401,85 @@ class Utils {
400
401
 
401
402
  return determinant;
402
403
  }
404
+
405
+ /**
406
+ * Check if all body keys represent audio controls.
407
+ *
408
+ * @param {Record<string, any>} body - The request body to inspect.
409
+ * @returns {boolean} - True if every key in the body is an audio control key.
410
+ */
411
+ public static isAudioControl(body: Record<string, any>): boolean {
412
+ return Object.keys(body).every((key) => AUDIO_CONTROL_BODY_KEYS.has(key));
413
+ }
414
+
415
+ /**
416
+ * Check if the current locus URL differs from the main locus URL,
417
+ * indicating a breakout session.
418
+ *
419
+ * @param {string} locusUrl - The current locus URL.
420
+ * @param {string} [mainLocusUrl] - The main locus URL.
421
+ * @returns {boolean} - True if in a breakout session.
422
+ */
423
+ public static isBreakoutLocusUrl(locusUrl: string, mainLocusUrl?: string): boolean {
424
+ return Boolean(mainLocusUrl) && mainLocusUrl !== locusUrl;
425
+ }
426
+
427
+ /**
428
+ * Resolve the target URL and extra body fields for a controls request,
429
+ * handling breakout session routing. Note: This is a pure computation function.
430
+ * It does not validate that locusUrl is
431
+ * defined. Callers must guard against falsy locusUrl before
432
+ * invoking this function.
433
+ * Mixed audio and non-audio keys in a single body (e.g., {audio: {...},
434
+ * raiseHand: {...}}) are treated as non-audio and routed to mainLocusUrl with
435
+ * authorizingLocusUrl. This means the audio portion would go through unsupported
436
+ * cross-locus authorization. Callers must not produce mixed payloads — update()
437
+ * sends each control scope as a separate request, and setControls() only handles
438
+ * audio-related settings.
439
+ *
440
+ * The authorizingLocusUrl mechanism on PATCH /loci/{lid}/controls is not supported
441
+ * for audio control updates (mute/unmute, muteOnEntry, disallowUnmute).
442
+ * Audio controls are not wired into the cross-locus GraphQL authorization path that
443
+ * other control types (raiseHand, viewParticipantList, admit, reactions, etc.) use.
444
+ * Specifically, the GraphQL authorization layer does not recognize audio as a control
445
+ * type eligible for remote locus authorization.
446
+ * This means authorizingLocusUrl is effectively ignored for audio controls and the
447
+ * server evaluates the request against the target locus only, where the host may not
448
+ * be currently joined.
449
+ * Audio control updates must be sent directly to the locus the user is currently in.
450
+ * If the host is in a breakout and wants to mute participants in that breakout, the
451
+ * request should target the breakout locus URL directly, not the main session locus
452
+ * with authorizingLocusUrl.
453
+ * Meeting-wide audio control actions (e.g., muting panelists across all breakouts
454
+ * from a single request) are not currently supported through this mechanism.
455
+ *
456
+ * @param {object} options
457
+ * @param {Record<string, any>} options.body - The request body.
458
+ * @param {string} options.locusUrl - The current locus URL. Must be defined (callers must validate).
459
+ * @param {string} [options.mainLocusUrl] - The main locus URL.
460
+ * @returns {{ uri: string, body: Record<string, any>, method: string }}
461
+ */
462
+ public static getControlsRequestParams(options: {
463
+ body: Record<string, any>;
464
+ locusUrl: string;
465
+ mainLocusUrl?: string;
466
+ }): {
467
+ uri: string;
468
+ body: Record<string, any>;
469
+ method: string;
470
+ } {
471
+ const {body, locusUrl, mainLocusUrl} = options;
472
+
473
+ const isAudio = Utils.isAudioControl(body);
474
+ const inBreakout = Utils.isBreakoutLocusUrl(locusUrl, mainLocusUrl);
475
+ const targetUrl = inBreakout && !isAudio ? mainLocusUrl : locusUrl;
476
+
477
+ return {
478
+ uri: `${targetUrl}/${CONTROLS}`,
479
+ body: inBreakout && !isAudio ? {...body, authorizingLocusUrl: locusUrl} : body,
480
+ method: HTTP_VERBS.PATCH,
481
+ };
482
+ }
403
483
  }
404
484
 
405
485
  export default Utils;
@@ -6,4 +6,21 @@ export const DataSetNames = {
6
6
  ATD_ACTIVE: 'atd-active', // only sent to panelists, over LLM; the attendees that have their hands raised or are allowed to unmute themselves
7
7
  ATD_UNMUTED: 'atd-unmuted', // sent to web client, over LLM, not sent to panelists; the attendees that are unmuted
8
8
  SELF: 'self', // sent to web client, over Mercury
9
+ UNJOINED: 'unjoined', // sent when you are not joined, but can still see some stuff from the meeting (mutually exclusive with "main")
9
10
  };
11
+
12
+ // Priority order for initializing data sets — higher priority names come first.
13
+ // Data sets not listed here will be initialized after all prioritized ones.
14
+ // MAIN must come before SELF because LocusInfo.updateFromHashTree processes the
15
+ // batch of updatedObjects in order, and the SELF handler in updateLocusFromHashTreeObject
16
+ // checks locus.info?.isWebinar (which comes from MAIN) to decide whether to create a
17
+ // participant object for webinar attendees. If SELF were initialized first, locus.info
18
+ // would not yet be populated and the attendee participant would be skipped.
19
+ export const DATA_SET_INIT_PRIORITY: string[] = [DataSetNames.MAIN, DataSetNames.SELF];
20
+
21
+ // Data sets for which we normally receive events over LLM connection
22
+ export const LLM_DATASET_NAMES = [
23
+ DataSetNames.MAIN,
24
+ DataSetNames.ATD_ACTIVE,
25
+ DataSetNames.ATD_UNMUTED,
26
+ ];
@@ -371,6 +371,23 @@ class HashTree {
371
371
  return items;
372
372
  }
373
373
 
374
+ /**
375
+ * Retrieves the version of a specific item by its id and type.
376
+ * @param {number} id The ID of the item.
377
+ * @param {ObjectType} type The type of the item.
378
+ * @returns {number | undefined} The version of the item if found, undefined otherwise.
379
+ */
380
+ getItemVersion(id: number, type: ObjectType): number | undefined {
381
+ if (this.numLeaves === 0) {
382
+ return undefined;
383
+ }
384
+
385
+ const index = id % this.numLeaves;
386
+ const item = this.leaves[index]?.[type]?.[id];
387
+
388
+ return item?.version;
389
+ }
390
+
374
391
  /**
375
392
  * Resizes the HashTree to have a new number of leaf nodes, redistributing all existing items.
376
393
  * @param {number} newNumLeaves The new number of leaf nodes (must be 0 or a power of 2).