@webex/plugin-meetings 3.11.0-webex-services-ready.1 → 3.12.0-llmrefactor.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 (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 +58 -13
  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 +124 -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 +2286 -1129
  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 +121 -83
  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 +611 -164
  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 +62 -12
  185. package/src/breakouts/breakout.ts +3 -1
  186. package/src/breakouts/events.ts +33 -11
  187. package/src/breakouts/index.ts +143 -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 +1244 -224
  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 +47 -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 +415 -11
  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 +305 -18
  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 +3573 -353
  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 +128 -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,12 +343,22 @@ 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
359
  recipients: {
310
360
  // @ts-ignore
311
- route: this.webex.internal.llm.getBinding(),
361
+ route: binding,
312
362
  },
313
363
  headers: {
314
364
  to: strokeData.toUserId,
@@ -336,7 +386,7 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
336
386
  };
337
387
 
338
388
  // @ts-ignore
339
- this.webex.internal.llm.socket.send(data);
389
+ socket.send(data);
340
390
  this.seqNum += 1;
341
391
  }
342
392
  }
@@ -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,6 +153,11 @@ 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();
@@ -253,16 +262,44 @@ const Breakouts = WebexPlugin.extend({
253
262
  );
254
263
  },
255
264
 
265
+ /**
266
+ * Registers the LLM channel for broadcast messages
267
+ * @param {LLMChannel} channel - The LLM channel to use for breakout messages
268
+ * @returns {void}
269
+ */
270
+ registerLLMChannel(channel: LLMChannel) {
271
+ // If already subscribed to a previous channel, clean it up
272
+ if (this.hasSubscribedToMessage && this._llmChannel) {
273
+ this.stopListening(this._llmChannel);
274
+ this.hasSubscribedToMessage = false;
275
+ }
276
+
277
+ this._llmChannel = channel;
278
+ this.listenToBroadcastMessages();
279
+ },
280
+
281
+ /**
282
+ * Unregisters the LLM channel
283
+ * @returns {void}
284
+ */
285
+ unregisterLLMChannel() {
286
+ if (this._llmChannel) {
287
+ this.stopListening(this._llmChannel);
288
+ this._llmChannel = undefined;
289
+ this.hasSubscribedToMessage = false;
290
+ }
291
+ },
292
+
256
293
  /**
257
294
  * Sets up listener for broadcast messages sent to the breakout session
258
295
  * @returns {void}
259
296
  */
260
297
  listenToBroadcastMessages() {
261
- if (!this.webex.internal.llm.isConnected() || this.hasSubscribedToMessage) {
298
+ if (!this._llmChannel?.isConnected() || this.hasSubscribedToMessage) {
262
299
  return;
263
300
  }
264
301
 
265
- this.listenTo(this.webex.internal.llm, 'event:breakout.message', (event) => {
302
+ this.listenTo(this._llmChannel, 'event:breakout.message', (event) => {
266
303
  const {
267
304
  data: {senderUserId, sentTime, message},
268
305
  } = event;
@@ -327,7 +364,10 @@ const Breakouts = WebexPlugin.extend({
327
364
  * @returns {void}
328
365
  */
329
366
  updateBreakout(params) {
367
+ const breakoutMoveId = params.breakoutMoveId || this.breakoutMoveId;
368
+
330
369
  this.set(params);
370
+ this.set('breakoutMoveId', breakoutMoveId);
331
371
  // These values are set manually so they are unset when they are not included in params
332
372
  this.set('groups', params.groups);
333
373
  this.set('startTime', params.startTime);
@@ -340,6 +380,7 @@ const Breakouts = WebexPlugin.extend({
340
380
  current: true,
341
381
  sessionType: params.sessionType,
342
382
  url: params.url,
383
+ resourceLink: params.resourceLink,
343
384
  [BREAKOUTS.SESSION_STATES.ACTIVE]: false,
344
385
  [BREAKOUTS.SESSION_STATES.ALLOWED]: false,
345
386
  [BREAKOUTS.SESSION_STATES.ASSIGNED]: false,
@@ -361,12 +402,81 @@ const Breakouts = WebexPlugin.extend({
361
402
  {
362
403
  currentSession: this.currentBreakoutSession,
363
404
  meeting,
364
- breakoutMoveId: params.breakoutMoveId,
405
+ breakoutMoveId,
365
406
  },
366
407
  // @ts-ignore
367
408
  this.webex.internal.newMetrics.submitClientEvent.bind(this.webex.internal.newMetrics)
368
409
  );
369
410
  }
411
+
412
+ this.submitLLMBreakoutJoinResponseMetric();
413
+ },
414
+
415
+ /**
416
+ * Stores the latest LLM connect response and tries to send the LLM-enhanced breakout join response.
417
+ * The breakout update and the LLM response are delivered independently, so either side can arrive first.
418
+ * @param {Object} eventInfo LLM connect response info
419
+ * @param {Object} eventInfo.meeting meeting instance
420
+ * @param {Object} eventInfo.llmLatency LLM latency values
421
+ * @param {Object} [eventInfo.error] LLM connection error
422
+ * @returns {void}
423
+ */
424
+ handleLLMBreakoutJoinResponseMetric(eventInfo: any) {
425
+ this.llmBreakoutJoinResponseInfo = {
426
+ ...eventInfo,
427
+ breakoutMoveId: this.breakoutMoveId,
428
+ };
429
+
430
+ this.submitLLMBreakoutJoinResponseMetric();
431
+ },
432
+
433
+ /**
434
+ * Sends the LLM-enhanced breakout join response metric when both breakout state and LLM latency
435
+ * are available. LLM reconnects can also happen while leaving a breakout, before stale breakout
436
+ * fields are fully cleared, so the joined-session check lives with the breakout state.
437
+ *
438
+ * The joined session changes both when joining a breakout and when returning to the main
439
+ * session, and the client reconnects LLM in both directions. Mirroring the desktop client, we
440
+ * emit the join response for either transition, so the active-breakout check also accepts the
441
+ * main session. Non-breakout meetings never carry a breakoutMoveId, and a given move id is
442
+ * reported at most once, so accepting the main session here cannot leak spurious events.
443
+ * @returns {void}
444
+ */
445
+ submitLLMBreakoutJoinResponseMetric() {
446
+ const eventInfo = this.llmBreakoutJoinResponseInfo;
447
+
448
+ // The breakout update and the LLM response arrive independently, so only emit once both the
449
+ // breakout move and its matching LLM latency are available for a session we have actually joined.
450
+ const hasMatchingMoveId =
451
+ !!this.breakoutMoveId && eventInfo?.breakoutMoveId === this.breakoutMoveId;
452
+ const hasSessionIdentifiers =
453
+ !!this.currentBreakoutSession?.sessionId && !!this.currentBreakoutSession?.groupId;
454
+ // isActiveBreakout already covers an open/closing breakout; isInMainSession covers return-to-main.
455
+ const isJoinedSession = this.isActiveBreakout || this.isInMainSession;
456
+
457
+ if (!eventInfo || !hasMatchingMoveId || !hasSessionIdentifiers || !isJoinedSession) {
458
+ return;
459
+ }
460
+
461
+ const {llmLatency, error} = eventInfo;
462
+ const meeting = eventInfo.meeting || this.webex.meetings.getMeetingByType(_ID_, this.meetingId);
463
+ // @ts-ignore
464
+ const llmWebsocketUrl = this.webex.internal.llm.getWebSocketUrl?.() || undefined;
465
+
466
+ breakoutEvent.onBreakoutJoinResponse(
467
+ {
468
+ currentSession: this.currentBreakoutSession,
469
+ meeting,
470
+ breakoutMoveId: this.breakoutMoveId,
471
+ llmLatency,
472
+ llmWebsocketUrl,
473
+ error,
474
+ },
475
+ // @ts-ignore
476
+ this.webex.internal.newMetrics.submitClientEvent.bind(this.webex.internal.newMetrics)
477
+ );
478
+
479
+ this.llmBreakoutJoinResponseInfo = undefined;
370
480
  },
371
481
 
372
482
  /**
@@ -985,6 +1095,36 @@ const Breakouts = WebexPlugin.extend({
985
1095
  body,
986
1096
  });
987
1097
  },
1098
+ /**
1099
+ * Remove participants from their current breakout session back to the main session
1100
+ * @param {string[]} participants - participant IDs to remove from breakout
1101
+ * @returns {Promise}
1102
+ */
1103
+ removeFromBreakout(participants: string[]) {
1104
+ if (!this.mainGroupId || !this.mainSessionId) {
1105
+ throw new Error(
1106
+ 'Main group ID and session ID must be available to remove participants from breakout'
1107
+ );
1108
+ }
1109
+
1110
+ return this.request({
1111
+ method: HTTP_VERBS.POST,
1112
+ uri: `${this.url}/move`,
1113
+ body: {
1114
+ groups: [
1115
+ {
1116
+ id: this.mainGroupId,
1117
+ sessions: [
1118
+ {
1119
+ id: this.mainSessionId,
1120
+ participants,
1121
+ },
1122
+ ],
1123
+ },
1124
+ ],
1125
+ },
1126
+ });
1127
+ },
988
1128
  /**
989
1129
  * trigger ASK_RETURN_TO_MAIN event when main session requested
990
1130
  * @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
  };