@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
@@ -1,6 +1,7 @@
1
1
  import uuid from 'uuid';
2
2
  // eslint-disable-next-line import/no-extraneous-dependencies
3
3
  import {WebexPlugin, config} from '@webex/webex-core';
4
+ import type LLMChannel from '@webex/internal-plugin-llm';
4
5
  import TriggerProxy from '../common/events/trigger-proxy';
5
6
 
6
7
  import {
@@ -13,7 +14,7 @@ import {
13
14
  } from './constants';
14
15
 
15
16
  import {StrokeData, RequestData, IAnnotationChannel, CommandRequestBody} from './annotation.types';
16
- import {HTTP_VERBS} from '../constants';
17
+ import {HTTP_VERBS, LOCUSEVENT} from '../constants';
17
18
 
18
19
  /**
19
20
  * @description Annotation to handle LLM and Mercury message and locus API
@@ -30,6 +31,12 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
30
31
  locusUrl: string;
31
32
  deviceUrl: string;
32
33
 
34
+ /** Currently registered LLM channel */
35
+ private channel?: LLMChannel;
36
+
37
+ /** Event handler bound to the channel, for cleanup */
38
+ private channelHandler?: (e: any) => void;
39
+
33
40
  /**
34
41
  * Initializes annotation module
35
42
  */
@@ -38,6 +45,37 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
38
45
  this.seqNum = 1;
39
46
  }
40
47
 
48
+ /**
49
+ * Register an LLMChannel with annotation. Only one channel can be registered
50
+ * at a time - the owner is responsible for switching channels when context
51
+ * changes (e.g., entering/leaving practice session).
52
+ * @param {LLMChannel} channel - The LLM channel to register
53
+ * @returns {void}
54
+ */
55
+ public registerChannel(channel: LLMChannel): void {
56
+ // Unregister existing channel first
57
+ this.unregisterChannel();
58
+
59
+ this.channel = channel;
60
+
61
+ // Subscribe to relay events from this channel
62
+ this.channelHandler = this.eventDataProcessor.bind(this);
63
+ channel.on('event:relay.event', this.channelHandler);
64
+ }
65
+
66
+ /**
67
+ * Unregister the current LLMChannel from annotation
68
+ * @returns {void}
69
+ */
70
+ public unregisterChannel(): void {
71
+ if (this.channel && this.channelHandler) {
72
+ this.channel.off('event:relay.event', this.channelHandler);
73
+ }
74
+
75
+ this.channel = undefined;
76
+ this.channelHandler = undefined;
77
+ }
78
+
41
79
  /**
42
80
  * Process Stroke Data
43
81
  * @param {object} data
@@ -69,7 +107,7 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
69
107
  */
70
108
  private eventCommandProcessor(e) {
71
109
  if (
72
- e?.data?.eventType === 'locus.approval_request' &&
110
+ e?.data?.eventType === LOCUSEVENT.APPROVAL_REQUEST &&
73
111
  e?.data?.approval?.resourceType === ANNOTATION_RESOURCE_TYPE &&
74
112
  e?.data?.approval?.actionType
75
113
  ) {
@@ -104,18 +142,18 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
104
142
 
105
143
  /**
106
144
  * Listen to websocket messages
145
+ * @deprecated LLM event subscription is now handled by registerChannel()
107
146
  * @returns {undefined}
108
147
  */
109
148
  private listenToEvents() {
110
149
  if (!this.hasSubscribedToEvents) {
111
150
  // @ts-ignore
112
151
  this.webex.internal.mercury.on(
113
- 'event:locus.approval_request',
152
+ `event:${LOCUSEVENT.APPROVAL_REQUEST}`,
114
153
  this.eventCommandProcessor,
115
154
  this
116
155
  );
117
- // @ts-ignore
118
- this.webex.internal.llm.on('event:relay.event', this.eventDataProcessor, this);
156
+ // LLM event subscription is now handled by registerChannel()
119
157
  this.hasSubscribedToEvents = true;
120
158
  }
121
159
  }
@@ -127,10 +165,13 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
127
165
  public deregisterEvents() {
128
166
  if (this.hasSubscribedToEvents) {
129
167
  // @ts-ignore
130
- this.webex.internal.mercury.off('event:locus.approval_request', this.eventCommandProcessor);
168
+ this.webex.internal.mercury.off(
169
+ `event:${LOCUSEVENT.APPROVAL_REQUEST}`,
170
+ this.eventCommandProcessor
171
+ );
131
172
 
132
- // @ts-ignore
133
- this.webex.internal.llm.off('event:relay.event', this.eventDataProcessor);
173
+ // Unregister LLM channel
174
+ this.unregisterChannel();
134
175
 
135
176
  this.hasSubscribedToEvents = false;
136
177
  }
@@ -287,8 +328,7 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
287
328
  * @returns {void}
288
329
  */
289
330
  public sendStrokeData = (strokeData: StrokeData): void => {
290
- // @ts-ignore
291
- if (!this.webex.internal.llm.isConnected()) return;
331
+ if (!this.channel?.isConnected()) return;
292
332
  this.encryptContent(strokeData.encryptionKeyUrl, strokeData.content).then(
293
333
  (encryptedContent) => {
294
334
  this.publishEncrypted(encryptedContent, strokeData);
@@ -303,13 +343,25 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
303
343
  * @returns {void}
304
344
  */
305
345
  private publishEncrypted(encryptedContent: string, strokeData: StrokeData) {
346
+ if (!this.channel) {
347
+ return;
348
+ }
349
+
350
+ const socket = this.channel.getSocket();
351
+ const binding = this.channel.getBinding();
352
+ if (!socket || !binding) {
353
+ return;
354
+ }
355
+
306
356
  const data = {
307
357
  id: `${this.seqNum}`,
308
358
  type: 'publishRequest',
309
- recipients: {
310
- // @ts-ignore
311
- route: this.webex.internal.llm.getBinding(),
312
- },
359
+ recipients: [
360
+ {
361
+ // @ts-ignore
362
+ route: binding,
363
+ },
364
+ ],
313
365
  headers: {
314
366
  to: strokeData.toUserId,
315
367
  },
@@ -336,7 +388,7 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
336
388
  };
337
389
 
338
390
  // @ts-ignore
339
- this.webex.internal.llm.socket.send(data);
391
+ socket.send(data);
340
392
  this.seqNum += 1;
341
393
  }
342
394
  }
@@ -31,6 +31,7 @@ const Breakout = WebexPlugin.extend({
31
31
  groupId: 'string',
32
32
  url: 'string', // where to send requests to
33
33
  requestedLastModifiedTime: 'string',
34
+ resourceLink: 'string', // the resource link for this breakout session, used for telemetry and logging
34
35
  },
35
36
 
36
37
  derived: {
@@ -165,7 +166,8 @@ const Breakout = WebexPlugin.extend({
165
166
  return;
166
167
  }
167
168
  this.breakoutRosterLocus = locus;
168
- this.members.locusParticipantsUpdate(locus);
169
+ // The roster via breakout roster event is full roster, use replace strategy to update the members
170
+ this.members.locusParticipantsUpdate({participants: locus.participants, isReplace: true});
169
171
  },
170
172
 
171
173
  /**
@@ -36,20 +36,42 @@ const breakoutEvent: {
36
36
  if (!eventInfo?.breakoutMoveId || !eventInfo?.meeting) {
37
37
  return;
38
38
  }
39
- if (!eventInfo.meeting.meetingInfo?.enableConvergedArchitecture) {
39
+
40
+ const {breakoutMoveId, currentSession, error, llmLatency, llmWebsocketUrl, meeting} = eventInfo;
41
+
42
+ if (!meeting.meetingInfo?.enableConvergedArchitecture) {
40
43
  return;
41
44
  }
42
- submitClientEvent({
43
- name: event,
44
- payload: {
45
- identifiers: {
46
- breakoutMoveId: eventInfo.breakoutMoveId,
47
- breakoutSessionId: eventInfo?.currentSession?.sessionId,
48
- breakoutGroupId: eventInfo?.currentSession?.groupId,
49
- },
45
+
46
+ if (
47
+ event === 'client.breakout-session.join.response' &&
48
+ typeof meeting.shouldEmitBreakoutJoinResponseMetric === 'function' &&
49
+ !meeting.shouldEmitBreakoutJoinResponseMetric(breakoutMoveId, Boolean(llmLatency))
50
+ ) {
51
+ return;
52
+ }
53
+
54
+ const payload: any = {
55
+ llmLatency,
56
+ identifiers: {
57
+ breakoutMoveId,
58
+ breakoutSessionId: currentSession?.sessionId,
59
+ breakoutGroupId: currentSession?.groupId,
60
+ llmWebsocketUrl,
50
61
  },
51
- options: {meetingId: eventInfo.meeting.id},
52
- });
62
+ };
63
+
64
+ const options: any = {
65
+ meetingId: meeting.id,
66
+ rawError: error,
67
+ };
68
+
69
+ const metricEvent = {
70
+ name: event,
71
+ payload,
72
+ options,
73
+ };
74
+ submitClientEvent(metricEvent);
53
75
  },
54
76
  };
55
77
 
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import {WebexPlugin} from '@webex/webex-core';
5
5
  import {debounce, forEach} from 'lodash';
6
+ import type LLMChannel from '@webex/internal-plugin-llm';
6
7
  import LoggerProxy from '../common/logs/logger-proxy';
7
8
 
8
9
  import {BREAKOUTS, MEETINGS, HTTP_VERBS, _ID_} from '../constants';
@@ -32,6 +33,7 @@ const Breakouts = WebexPlugin.extend({
32
33
  name: 'string', // only present when in a breakout session
33
34
  sessionId: 'string', // appears from the moment you enable breakouts
34
35
  sessionType: 'string', // appears from the moment you enable breakouts
36
+ breakoutMoveId: 'string', // used to correlate breakout move/join diagnostics
35
37
  startTime: 'string', // appears once breakouts start
36
38
  status: 'string', // only present when in a breakout session
37
39
  url: 'string', // appears from the moment you enable breakouts
@@ -47,6 +49,8 @@ const Breakouts = WebexPlugin.extend({
47
49
  canManageBreakouts: 'boolean', // appear the ability to manage breakouts
48
50
  mainGroupId: 'string', // appears from the moment you enable breakouts
49
51
  mainSessionId: 'string', // appears from the moment you enable breakouts
52
+ hasSubscribedToMessage: 'boolean', // tracks if listening to LLM broadcast messages
53
+ _llmChannel: 'object', // registered LLM channel for broadcast messages
50
54
  },
51
55
  children: {
52
56
  currentBreakoutSession: Breakout,
@@ -149,9 +153,16 @@ const Breakouts = WebexPlugin.extend({
149
153
  this.listenTo(this.breakouts, 'change:requestedLastModifiedTime', (breakout) => {
150
154
  this.triggerReturnToMainEvent(breakout);
151
155
  });
156
+ this.listenTo(
157
+ this,
158
+ BREAKOUTS.EVENTS.LLM_CONNECT_RESPONSE,
159
+ this.handleLLMBreakoutJoinResponseMetric
160
+ );
152
161
  this.listenToCurrentSessionTypeChange();
153
162
  this.listenToBreakoutRosters();
154
163
  this.listenToBreakoutHelp();
164
+ // LLM may connect after locusUrlUpdate has already run, so re-check the broadcast subscription on connect
165
+ this.listenTo(this.webex.internal.llm, 'online', () => this.listenToBroadcastMessages());
155
166
  // @ts-ignore
156
167
  this.breakoutRequest = new BreakoutRequest({webex: this.webex});
157
168
  },
@@ -253,16 +264,44 @@ const Breakouts = WebexPlugin.extend({
253
264
  );
254
265
  },
255
266
 
267
+ /**
268
+ * Registers the LLM channel for broadcast messages
269
+ * @param {LLMChannel} channel - The LLM channel to use for breakout messages
270
+ * @returns {void}
271
+ */
272
+ registerLLMChannel(channel: LLMChannel) {
273
+ // If already subscribed to a previous channel, clean it up
274
+ if (this.hasSubscribedToMessage && this._llmChannel) {
275
+ this.stopListening(this._llmChannel);
276
+ this.hasSubscribedToMessage = false;
277
+ }
278
+
279
+ this._llmChannel = channel;
280
+ this.listenToBroadcastMessages();
281
+ },
282
+
283
+ /**
284
+ * Unregisters the LLM channel
285
+ * @returns {void}
286
+ */
287
+ unregisterLLMChannel() {
288
+ if (this._llmChannel) {
289
+ this.stopListening(this._llmChannel);
290
+ this._llmChannel = undefined;
291
+ this.hasSubscribedToMessage = false;
292
+ }
293
+ },
294
+
256
295
  /**
257
296
  * Sets up listener for broadcast messages sent to the breakout session
258
297
  * @returns {void}
259
298
  */
260
299
  listenToBroadcastMessages() {
261
- if (!this.webex.internal.llm.isConnected() || this.hasSubscribedToMessage) {
300
+ if (!this._llmChannel?.isConnected() || this.hasSubscribedToMessage) {
262
301
  return;
263
302
  }
264
303
 
265
- this.listenTo(this.webex.internal.llm, 'event:breakout.message', (event) => {
304
+ this.listenTo(this._llmChannel, 'event:breakout.message', (event) => {
266
305
  const {
267
306
  data: {senderUserId, sentTime, message},
268
307
  } = event;
@@ -327,7 +366,10 @@ const Breakouts = WebexPlugin.extend({
327
366
  * @returns {void}
328
367
  */
329
368
  updateBreakout(params) {
369
+ const breakoutMoveId = params.breakoutMoveId || this.breakoutMoveId;
370
+
330
371
  this.set(params);
372
+ this.set('breakoutMoveId', breakoutMoveId);
331
373
  // These values are set manually so they are unset when they are not included in params
332
374
  this.set('groups', params.groups);
333
375
  this.set('startTime', params.startTime);
@@ -340,6 +382,7 @@ const Breakouts = WebexPlugin.extend({
340
382
  current: true,
341
383
  sessionType: params.sessionType,
342
384
  url: params.url,
385
+ resourceLink: params.resourceLink,
343
386
  [BREAKOUTS.SESSION_STATES.ACTIVE]: false,
344
387
  [BREAKOUTS.SESSION_STATES.ALLOWED]: false,
345
388
  [BREAKOUTS.SESSION_STATES.ASSIGNED]: false,
@@ -361,12 +404,81 @@ const Breakouts = WebexPlugin.extend({
361
404
  {
362
405
  currentSession: this.currentBreakoutSession,
363
406
  meeting,
364
- breakoutMoveId: params.breakoutMoveId,
407
+ breakoutMoveId,
365
408
  },
366
409
  // @ts-ignore
367
410
  this.webex.internal.newMetrics.submitClientEvent.bind(this.webex.internal.newMetrics)
368
411
  );
369
412
  }
413
+
414
+ this.submitLLMBreakoutJoinResponseMetric();
415
+ },
416
+
417
+ /**
418
+ * Stores the latest LLM connect response and tries to send the LLM-enhanced breakout join response.
419
+ * The breakout update and the LLM response are delivered independently, so either side can arrive first.
420
+ * @param {Object} eventInfo LLM connect response info
421
+ * @param {Object} eventInfo.meeting meeting instance
422
+ * @param {Object} eventInfo.llmLatency LLM latency values
423
+ * @param {Object} [eventInfo.error] LLM connection error
424
+ * @returns {void}
425
+ */
426
+ handleLLMBreakoutJoinResponseMetric(eventInfo: any) {
427
+ this.llmBreakoutJoinResponseInfo = {
428
+ ...eventInfo,
429
+ breakoutMoveId: this.breakoutMoveId,
430
+ };
431
+
432
+ this.submitLLMBreakoutJoinResponseMetric();
433
+ },
434
+
435
+ /**
436
+ * Sends the LLM-enhanced breakout join response metric when both breakout state and LLM latency
437
+ * are available. LLM reconnects can also happen while leaving a breakout, before stale breakout
438
+ * fields are fully cleared, so the joined-session check lives with the breakout state.
439
+ *
440
+ * The joined session changes both when joining a breakout and when returning to the main
441
+ * session, and the client reconnects LLM in both directions. Mirroring the desktop client, we
442
+ * emit the join response for either transition, so the active-breakout check also accepts the
443
+ * main session. Non-breakout meetings never carry a breakoutMoveId, and a given move id is
444
+ * reported at most once, so accepting the main session here cannot leak spurious events.
445
+ * @returns {void}
446
+ */
447
+ submitLLMBreakoutJoinResponseMetric() {
448
+ const eventInfo = this.llmBreakoutJoinResponseInfo;
449
+
450
+ // The breakout update and the LLM response arrive independently, so only emit once both the
451
+ // breakout move and its matching LLM latency are available for a session we have actually joined.
452
+ const hasMatchingMoveId =
453
+ !!this.breakoutMoveId && eventInfo?.breakoutMoveId === this.breakoutMoveId;
454
+ const hasSessionIdentifiers =
455
+ !!this.currentBreakoutSession?.sessionId && !!this.currentBreakoutSession?.groupId;
456
+ // isActiveBreakout already covers an open/closing breakout; isInMainSession covers return-to-main.
457
+ const isJoinedSession = this.isActiveBreakout || this.isInMainSession;
458
+
459
+ if (!eventInfo || !hasMatchingMoveId || !hasSessionIdentifiers || !isJoinedSession) {
460
+ return;
461
+ }
462
+
463
+ const {llmLatency, error} = eventInfo;
464
+ const meeting = eventInfo.meeting || this.webex.meetings.getMeetingByType(_ID_, this.meetingId);
465
+ // @ts-ignore
466
+ const llmWebsocketUrl = this.webex.internal.llm.getWebSocketUrl?.() || undefined;
467
+
468
+ breakoutEvent.onBreakoutJoinResponse(
469
+ {
470
+ currentSession: this.currentBreakoutSession,
471
+ meeting,
472
+ breakoutMoveId: this.breakoutMoveId,
473
+ llmLatency,
474
+ llmWebsocketUrl,
475
+ error,
476
+ },
477
+ // @ts-ignore
478
+ this.webex.internal.newMetrics.submitClientEvent.bind(this.webex.internal.newMetrics)
479
+ );
480
+
481
+ this.llmBreakoutJoinResponseInfo = undefined;
370
482
  },
371
483
 
372
484
  /**
@@ -985,6 +1097,36 @@ const Breakouts = WebexPlugin.extend({
985
1097
  body,
986
1098
  });
987
1099
  },
1100
+ /**
1101
+ * Remove participants from their current breakout session back to the main session
1102
+ * @param {string[]} participants - participant IDs to remove from breakout
1103
+ * @returns {Promise}
1104
+ */
1105
+ removeFromBreakout(participants: string[]) {
1106
+ if (!this.mainGroupId || !this.mainSessionId) {
1107
+ throw new Error(
1108
+ 'Main group ID and session ID must be available to remove participants from breakout'
1109
+ );
1110
+ }
1111
+
1112
+ return this.request({
1113
+ method: HTTP_VERBS.POST,
1114
+ uri: `${this.url}/move`,
1115
+ body: {
1116
+ groups: [
1117
+ {
1118
+ id: this.mainGroupId,
1119
+ sessions: [
1120
+ {
1121
+ id: this.mainSessionId,
1122
+ participants,
1123
+ },
1124
+ ],
1125
+ },
1126
+ ],
1127
+ },
1128
+ });
1129
+ },
988
1130
  /**
989
1131
  * trigger ASK_RETURN_TO_MAIN event when main session requested
990
1132
  * @param {Object} breakout
@@ -157,19 +157,66 @@ WebExMeetingsErrors[IceGatheringFailed.CODE] = IceGatheringFailed;
157
157
  class AddMediaFailed extends WebexMeetingsError {
158
158
  static CODE = 30203;
159
159
  cause?: Error;
160
+ connectionType?: string;
161
+ selectedCandidatePairChanges?: number;
162
+ numTransports?: number;
163
+ iceConnected?: boolean;
160
164
 
161
165
  /**
162
166
  * Creates a new AddMediaFailed error
163
- * @param {Error} [cause] - The underlying error that caused the media addition to fail
167
+ * @param {Object} options
168
+ * @param {Error} [options.cause] - The underlying error that caused the media addition to fail
169
+ * @param {string} [options.connectionType] - The ICE connection type at the time of failure (e.g. 'UDP', 'TURN-TLS')
170
+ * @param {number} [options.selectedCandidatePairChanges] - Number of times the selected candidate pair changed
171
+ * @param {number} [options.numTransports] - Number of ICE transports
172
+ * @param {boolean} [options.iceConnected] - Whether ICE connection was established before the failure
164
173
  */
165
- constructor(cause?: Error) {
174
+ constructor(
175
+ options: {
176
+ cause?: Error;
177
+ connectionType?: string;
178
+ selectedCandidatePairChanges?: number;
179
+ numTransports?: number;
180
+ iceConnected?: boolean;
181
+ } = {}
182
+ ) {
166
183
  super(AddMediaFailed.CODE, 'Failed to add media');
167
- this.cause = cause;
184
+ this.cause = options.cause;
185
+ this.connectionType = options.connectionType;
186
+ this.selectedCandidatePairChanges = options.selectedCandidatePairChanges;
187
+ this.numTransports = options.numTransports;
188
+ this.iceConnected = options.iceConnected;
189
+ }
190
+
191
+ /**
192
+ * Returns true if the failure was due to a DTLS handshake failure
193
+ * (ICE connected successfully but the overall media connection failed).
194
+ */
195
+ get isDtlsHandshakeFailure(): boolean {
196
+ return this.iceConnected === true;
168
197
  }
169
198
  }
170
199
  export {AddMediaFailed};
171
200
  WebExMeetingsErrors[AddMediaFailed.CODE] = AddMediaFailed;
172
201
 
202
+ /**
203
+ * @class MediaConnectionTimedOutError
204
+ * @classdesc Internal error thrown when the media connection times out waiting to connect.
205
+ */
206
+ class MediaConnectionTimedOutError extends Error {
207
+ iceConnected: boolean;
208
+
209
+ cause?: any;
210
+
211
+ constructor(message: string, iceConnected: boolean, cause?: any) {
212
+ super(message);
213
+ this.name = 'MediaConnectionTimedOutError';
214
+ this.iceConnected = iceConnected;
215
+ this.cause = cause;
216
+ }
217
+ }
218
+ export {MediaConnectionTimedOutError};
219
+
173
220
  /**
174
221
  * @class SdpResponseTimeoutError
175
222
  * @classdesc Raised whenever we timeout waiting for remote SDP answer
package/src/config.ts CHANGED
@@ -82,16 +82,17 @@ export default {
82
82
  enableExtmap: false,
83
83
  enableAutomaticLLM: false,
84
84
  installedOrgID: undefined,
85
+ multipartSitePrefixList: ['.my.', '.mydmz.', '.mybts.', '.mydev.', '.myats2.', '.myats.'],
85
86
  experimental: {
86
87
  enableMediaNegotiatedEvent: false,
87
88
  enableUnifiedMeetings: true,
88
89
  enableAdhocMeetings: true,
89
- enableTcpReachability: false,
90
- enableTlsReachability: false,
90
+ storeLocusHashTreeEventsForDebugging: false,
91
91
  },
92
92
  degradationPreferences: {
93
93
  maxMacroblocksLimit: 8192,
94
94
  },
95
+ enableAv1SlidesSupport: false,
95
96
  // This only applies to non-multistream meetings
96
97
  iceCandidatesGatheringTimeout: undefined,
97
98
  backendIpv6NativeSupport: false,
@@ -101,5 +102,8 @@ export default {
101
102
  stopIceGatheringAfterFirstRelayCandidate: false,
102
103
  enableAudioTwccForMultistream: false,
103
104
  enablePerUdpUrlReachability: false, // true: separate peer connection per each UDP URL; false: single peer connection for all URLs
105
+ locus: {
106
+ excludedDataSets: ['attendees'], // attendees data set only applies to webinar attendees and we never really need that
107
+ },
104
108
  },
105
109
  };