@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.
- package/AGENTS.md +9 -0
- package/dist/aiEnableRequest/index.js +197 -0
- package/dist/aiEnableRequest/index.js.map +1 -0
- package/dist/aiEnableRequest/utils.js +36 -0
- package/dist/aiEnableRequest/utils.js.map +1 -0
- package/dist/annotation/index.js +58 -13
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.js +8 -3
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/events.js +29 -14
- package/dist/breakouts/events.js.map +1 -1
- package/dist/breakouts/index.js +124 -7
- package/dist/breakouts/index.js.map +1 -1
- package/dist/common/errors/webex-errors.js +49 -5
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/config.js +8 -3
- package/dist/config.js.map +1 -1
- package/dist/constants.js +60 -11
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +11 -1
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/index.js +67 -29
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/util.js +91 -0
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/hashTree/constants.js +16 -2
- package/dist/hashTree/constants.js.map +1 -1
- package/dist/hashTree/hashTree.js +18 -0
- package/dist/hashTree/hashTree.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +1655 -538
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/hashTree/types.js +4 -2
- package/dist/hashTree/types.js.map +1 -1
- package/dist/hashTree/utils.js +52 -0
- package/dist/hashTree/utils.js.map +1 -1
- package/dist/index.js +18 -2
- package/dist/index.js.map +1 -1
- package/dist/interceptors/constant.js +12 -0
- package/dist/interceptors/constant.js.map +1 -0
- package/dist/interceptors/dataChannelAuthToken.js +332 -0
- package/dist/interceptors/dataChannelAuthToken.js.map +1 -0
- package/dist/interceptors/index.js +7 -0
- package/dist/interceptors/index.js.map +1 -1
- package/dist/interceptors/locusRetry.js +23 -8
- package/dist/interceptors/locusRetry.js.map +1 -1
- package/dist/interceptors/utils.js +27 -0
- package/dist/interceptors/utils.js.map +1 -0
- package/dist/interpretation/index.js +11 -2
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/interpretation.types.js +7 -0
- package/dist/interpretation/interpretation.types.js.map +1 -0
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +9 -4
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +914 -212
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +36 -5
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/selfUtils.js +1 -0
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/locus-info/types.js +19 -0
- package/dist/locus-info/types.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +72 -3
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/media/index.js +8 -2
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +8 -7
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +11 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +2286 -1129
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +229 -82
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +10 -1
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +55 -2
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/util.js +168 -5
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +2 -2
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +369 -162
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +6 -1
- package/dist/meetings/meetings.types.js.map +1 -1
- package/dist/meetings/request.js +39 -0
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +116 -18
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +20 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js +40 -0
- package/dist/member/util.js.map +1 -1
- package/dist/members/index.js +101 -43
- package/dist/members/index.js.map +1 -1
- package/dist/members/util.js +8 -1
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +12 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/codec/constants.js +63 -0
- package/dist/multistream/codec/constants.js.map +1 -0
- package/dist/multistream/mediaRequestManager.js +64 -68
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +9 -0
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +11 -0
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +116 -2
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +121 -83
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js +2 -0
- package/dist/reachability/reachability.types.js.map +1 -1
- package/dist/reachability/util.js +45 -0
- package/dist/reachability/util.js.map +1 -1
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.js +0 -1
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/index.js +1 -3
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/roap/turnDiscovery.js +8 -1
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/types/aiEnableRequest/index.d.ts +5 -0
- package/dist/types/aiEnableRequest/utils.d.ts +2 -0
- package/dist/types/annotation/index.d.ts +19 -0
- package/dist/types/common/errors/webex-errors.d.ts +32 -2
- package/dist/types/config.d.ts +6 -2
- package/dist/types/constants.d.ts +35 -1
- package/dist/types/controls-options-manager/constants.d.ts +6 -1
- package/dist/types/controls-options-manager/index.d.ts +16 -0
- package/dist/types/hashTree/constants.d.ts +3 -0
- package/dist/types/hashTree/hashTree.d.ts +7 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +315 -30
- package/dist/types/hashTree/types.d.ts +3 -0
- package/dist/types/hashTree/utils.d.ts +24 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/interceptors/constant.d.ts +5 -0
- package/dist/types/interceptors/dataChannelAuthToken.d.ts +43 -0
- package/dist/types/interceptors/index.d.ts +2 -1
- package/dist/types/interceptors/locusRetry.d.ts +4 -4
- package/dist/types/interceptors/utils.d.ts +1 -0
- package/dist/types/interpretation/interpretation.types.d.ts +10 -0
- package/dist/types/locus-info/index.d.ts +126 -15
- package/dist/types/locus-info/infoUtils.d.ts +8 -0
- package/dist/types/locus-info/types.d.ts +28 -1
- package/dist/types/media/MediaConnectionAwaiter.d.ts +20 -2
- package/dist/types/media/properties.d.ts +8 -3
- package/dist/types/meeting/in-meeting-actions.d.ts +10 -0
- package/dist/types/meeting/index.d.ts +271 -16
- package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
- package/dist/types/meeting/request.d.ts +17 -1
- package/dist/types/meeting/request.type.d.ts +5 -0
- package/dist/types/meeting/util.d.ts +40 -0
- package/dist/types/meetings/index.d.ts +42 -20
- package/dist/types/meetings/meetings.types.d.ts +15 -0
- package/dist/types/meetings/request.d.ts +14 -0
- package/dist/types/member/index.d.ts +2 -0
- package/dist/types/member/types.d.ts +1 -0
- package/dist/types/member/util.d.ts +14 -0
- package/dist/types/members/index.d.ts +15 -2
- package/dist/types/members/util.d.ts +1 -5
- package/dist/types/metrics/constants.d.ts +11 -0
- package/dist/types/multistream/codec/constants.d.ts +7 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +20 -26
- package/dist/types/multistream/sendSlotManager.d.ts +23 -1
- package/dist/types/reachability/clusterReachability.d.ts +3 -3
- package/dist/types/reachability/index.d.ts +10 -3
- package/dist/types/reachability/reachability.types.d.ts +7 -0
- package/dist/types/reachability/util.d.ts +17 -0
- package/dist/types/reactions/reactions.type.d.ts +4 -0
- package/dist/types/webinar/utils.d.ts +6 -0
- package/dist/webinar/index.js +611 -164
- package/dist/webinar/index.js.map +1 -1
- package/dist/webinar/utils.js +25 -0
- package/dist/webinar/utils.js.map +1 -0
- package/package.json +24 -23
- package/src/aiEnableRequest/README.md +84 -0
- package/src/aiEnableRequest/index.ts +186 -0
- package/src/aiEnableRequest/utils.ts +25 -0
- package/src/annotation/index.ts +62 -12
- package/src/breakouts/breakout.ts +3 -1
- package/src/breakouts/events.ts +33 -11
- package/src/breakouts/index.ts +143 -3
- package/src/common/errors/webex-errors.ts +50 -3
- package/src/config.ts +6 -2
- package/src/constants.ts +49 -3
- package/src/controls-options-manager/constants.ts +14 -1
- package/src/controls-options-manager/index.ts +87 -28
- package/src/controls-options-manager/util.ts +81 -1
- package/src/hashTree/constants.ts +17 -0
- package/src/hashTree/hashTree.ts +17 -0
- package/src/hashTree/hashTreeParser.ts +1482 -361
- package/src/hashTree/types.ts +4 -0
- package/src/hashTree/utils.ts +45 -0
- package/src/index.ts +14 -1
- package/src/interceptors/constant.ts +6 -0
- package/src/interceptors/dataChannelAuthToken.ts +217 -0
- package/src/interceptors/index.ts +2 -1
- package/src/interceptors/locusRetry.ts +25 -4
- package/src/interceptors/utils.ts +16 -0
- package/src/interpretation/index.ts +29 -11
- package/src/interpretation/interpretation.types.ts +11 -0
- package/src/locus-info/controlsUtils.ts +14 -1
- package/src/locus-info/index.ts +976 -203
- package/src/locus-info/infoUtils.ts +41 -6
- package/src/locus-info/selfUtils.ts +1 -0
- package/src/locus-info/types.ts +33 -1
- package/src/media/MediaConnectionAwaiter.ts +62 -5
- package/src/media/index.ts +10 -1
- package/src/media/properties.ts +11 -4
- package/src/meeting/in-meeting-actions.ts +20 -0
- package/src/meeting/index.ts +1244 -224
- package/src/meeting/locusMediaRequest.ts +106 -6
- package/src/meeting/muteState.ts +10 -1
- package/src/meeting/request.ts +53 -0
- package/src/meeting/request.type.ts +6 -0
- package/src/meeting/util.ts +207 -7
- package/src/meeting-info/meeting-info-v2.ts +4 -2
- package/src/meetings/index.ts +319 -117
- package/src/meetings/meetings.types.ts +19 -0
- package/src/meetings/request.ts +43 -0
- package/src/meetings/util.ts +117 -4
- package/src/member/index.ts +20 -0
- package/src/member/types.ts +1 -0
- package/src/member/util.ts +41 -0
- package/src/members/index.ts +70 -7
- package/src/members/util.ts +12 -4
- package/src/metrics/constants.ts +12 -0
- package/src/multistream/codec/constants.ts +58 -0
- package/src/multistream/mediaRequestManager.ts +117 -76
- package/src/multistream/receiveSlot.ts +18 -0
- package/src/multistream/remoteMediaManager.ts +13 -0
- package/src/multistream/sendSlotManager.ts +97 -3
- package/src/reachability/clusterReachability.ts +3 -2
- package/src/reachability/index.ts +47 -16
- package/src/reachability/reachability.types.ts +11 -0
- package/src/reachability/util.ts +36 -0
- package/src/reactions/reactions.type.ts +4 -0
- package/src/reconnection-manager/index.ts +0 -1
- package/src/recording-controller/index.ts +1 -2
- package/src/roap/turnDiscovery.ts +9 -1
- package/src/webinar/index.ts +415 -11
- package/src/webinar/utils.ts +16 -0
- package/test/unit/spec/aiEnableRequest/index.ts +1067 -0
- package/test/unit/spec/aiEnableRequest/utils.ts +130 -0
- package/test/unit/spec/annotation/index.ts +228 -134
- package/test/unit/spec/breakouts/breakout.ts +9 -3
- package/test/unit/spec/breakouts/events.ts +120 -2
- package/test/unit/spec/breakouts/index.ts +305 -18
- package/test/unit/spec/common/errors/webex-errors.ts +78 -0
- package/test/unit/spec/controls-options-manager/index.js +244 -29
- package/test/unit/spec/controls-options-manager/util.js +165 -0
- package/test/unit/spec/hashTree/hashTree.ts +66 -0
- package/test/unit/spec/hashTree/hashTreeParser.ts +4528 -171
- package/test/unit/spec/hashTree/utils.ts +125 -1
- package/test/unit/spec/interceptors/dataChannelAuthToken.ts +388 -0
- package/test/unit/spec/interceptors/locusRetry.ts +205 -4
- package/test/unit/spec/interceptors/utils.ts +75 -0
- package/test/unit/spec/interpretation/index.ts +26 -4
- package/test/unit/spec/locus-info/controlsUtils.js +200 -56
- package/test/unit/spec/locus-info/index.js +1861 -149
- package/test/unit/spec/locus-info/infoUtils.js +184 -1
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +96 -1
- package/test/unit/spec/media/index.ts +92 -0
- package/test/unit/spec/media/properties.ts +35 -26
- package/test/unit/spec/meeting/in-meeting-actions.ts +12 -2
- package/test/unit/spec/meeting/index.js +3573 -353
- package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
- package/test/unit/spec/meeting/muteState.js +81 -0
- package/test/unit/spec/meeting/request.js +82 -0
- package/test/unit/spec/meeting/utils.js +595 -27
- package/test/unit/spec/meeting-info/meetinginfov2.js +19 -10
- package/test/unit/spec/meetings/index.js +1138 -86
- package/test/unit/spec/meetings/request.js +141 -0
- package/test/unit/spec/meetings/utils.js +402 -51
- package/test/unit/spec/member/index.js +35 -4
- package/test/unit/spec/member/util.js +154 -27
- package/test/unit/spec/members/index.js +216 -0
- package/test/unit/spec/members/request.js +37 -1
- package/test/unit/spec/members/utils.js +63 -0
- package/test/unit/spec/multistream/mediaRequestManager.ts +503 -122
- package/test/unit/spec/multistream/remoteMediaManager.ts +30 -0
- package/test/unit/spec/multistream/sendSlotManager.ts +135 -36
- package/test/unit/spec/reachability/index.ts +128 -46
- package/test/unit/spec/reachability/util.ts +31 -0
- package/test/unit/spec/reconnection-manager/index.js +4 -8
- package/test/unit/spec/recording-controller/index.js +9 -8
- package/test/unit/spec/roap/turnDiscovery.ts +20 -0
- package/test/unit/spec/webinar/index.ts +1087 -167
- package/test/unit/spec/webinar/utils.ts +39 -0
package/src/annotation/index.ts
CHANGED
|
@@ -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 ===
|
|
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
|
-
|
|
152
|
+
`event:${LOCUSEVENT.APPROVAL_REQUEST}`,
|
|
114
153
|
this.eventCommandProcessor,
|
|
115
154
|
this
|
|
116
155
|
);
|
|
117
|
-
//
|
|
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(
|
|
168
|
+
this.webex.internal.mercury.off(
|
|
169
|
+
`event:${LOCUSEVENT.APPROVAL_REQUEST}`,
|
|
170
|
+
this.eventCommandProcessor
|
|
171
|
+
);
|
|
131
172
|
|
|
132
|
-
//
|
|
133
|
-
this.
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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
|
-
|
|
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
|
/**
|
package/src/breakouts/events.ts
CHANGED
|
@@ -36,20 +36,42 @@ const breakoutEvent: {
|
|
|
36
36
|
if (!eventInfo?.breakoutMoveId || !eventInfo?.meeting) {
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
|
|
40
|
+
const {breakoutMoveId, currentSession, error, llmLatency, llmWebsocketUrl, meeting} = eventInfo;
|
|
41
|
+
|
|
42
|
+
if (!meeting.meetingInfo?.enableConvergedArchitecture) {
|
|
40
43
|
return;
|
|
41
44
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
|
|
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
|
|
package/src/breakouts/index.ts
CHANGED
|
@@ -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.
|
|
298
|
+
if (!this._llmChannel?.isConnected() || this.hasSubscribedToMessage) {
|
|
262
299
|
return;
|
|
263
300
|
}
|
|
264
301
|
|
|
265
|
-
this.listenTo(this.
|
|
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
|
|
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 {
|
|
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(
|
|
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
|
-
|
|
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
|
};
|