@webex/plugin-meetings 3.12.0-webex-services-ready.3 → 3.12.0-webex-services-ready.4
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/dist/aiEnableRequest/index.js +1 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/events.js +29 -14
- package/dist/breakouts/events.js.map +1 -1
- package/dist/breakouts/index.js +65 -2
- package/dist/breakouts/index.js.map +1 -1
- package/dist/constants.js +2 -1
- package/dist/constants.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +193 -23
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +141 -56
- package/dist/locus-info/index.js.map +1 -1
- package/dist/media/properties.js +3 -5
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/index.js +351 -52
- package/dist/meeting/index.js.map +1 -1
- package/dist/meetings/index.js +25 -0
- package/dist/meetings/index.js.map +1 -1
- package/dist/metrics/constants.js +3 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/roap/turnDiscovery.js +8 -1
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +51 -3
- package/dist/types/locus-info/index.d.ts +19 -4
- package/dist/types/media/properties.d.ts +5 -2
- package/dist/types/meeting/index.d.ts +63 -1
- package/dist/types/meetings/index.d.ts +8 -0
- package/dist/types/metrics/constants.d.ts +2 -0
- package/dist/webinar/index.js +4 -4
- package/dist/webinar/index.js.map +1 -1
- package/package.json +23 -23
- package/src/breakouts/events.ts +33 -11
- package/src/breakouts/index.ts +79 -1
- package/src/constants.ts +1 -0
- package/src/hashTree/hashTreeParser.ts +254 -18
- package/src/locus-info/index.ts +143 -51
- package/src/media/properties.ts +7 -3
- package/src/meeting/index.ts +329 -25
- package/src/meetings/index.ts +35 -1
- package/src/metrics/constants.ts +2 -0
- package/src/roap/turnDiscovery.ts +9 -1
- package/src/webinar/index.ts +2 -2
- package/test/unit/spec/breakouts/events.ts +120 -2
- package/test/unit/spec/breakouts/index.ts +142 -2
- package/test/unit/spec/hashTree/hashTreeParser.ts +556 -3
- package/test/unit/spec/locus-info/index.js +148 -5
- package/test/unit/spec/media/properties.ts +23 -23
- package/test/unit/spec/meeting/index.js +832 -126
- package/test/unit/spec/meetings/index.js +116 -12
- package/test/unit/spec/roap/turnDiscovery.ts +20 -0
- package/test/unit/spec/webinar/index.ts +3 -3
|
@@ -5,6 +5,7 @@ import breakoutEvent from "../../../../src/breakouts/events";
|
|
|
5
5
|
|
|
6
6
|
describe('plugin-meetings', () => {
|
|
7
7
|
describe('breakoutEvent', () => {
|
|
8
|
+
const originalPostMoveCallAnalyzer = breakoutEvent.postMoveCallAnalyzer;
|
|
8
9
|
let webex;
|
|
9
10
|
let mockMeeting = {};
|
|
10
11
|
let breakoutMoveId;
|
|
@@ -24,20 +25,35 @@ describe('plugin-meetings', () => {
|
|
|
24
25
|
groupId: "groupId",
|
|
25
26
|
};
|
|
26
27
|
breakoutMoveId = 'breakoutMoveId';
|
|
28
|
+
breakoutEvent.postMoveCallAnalyzer = originalPostMoveCallAnalyzer;
|
|
27
29
|
|
|
28
30
|
});
|
|
29
31
|
describe('postMoveCallAnalyzer', () => {
|
|
30
32
|
it('send metric as expected', () => {
|
|
31
33
|
const submitClientEvent = sinon.stub();
|
|
32
|
-
const eventInfo = {
|
|
34
|
+
const eventInfo = {
|
|
35
|
+
currentSession: newSession,
|
|
36
|
+
meeting: mockMeeting,
|
|
37
|
+
breakoutMoveId,
|
|
38
|
+
llmLatency: {
|
|
39
|
+
clientLLMDatachannelResponseTime: 10,
|
|
40
|
+
clientLLMWebSocketConnectTime: 20,
|
|
41
|
+
},
|
|
42
|
+
llmWebsocketUrl: 'wss://example.com/ws',
|
|
43
|
+
};
|
|
33
44
|
breakoutEvent.postMoveCallAnalyzer('client.breakout-session.join.response', eventInfo, submitClientEvent);
|
|
34
45
|
assert.calledWithMatch(submitClientEvent, {
|
|
35
46
|
name: 'client.breakout-session.join.response',
|
|
36
47
|
payload: {
|
|
48
|
+
llmLatency: {
|
|
49
|
+
clientLLMDatachannelResponseTime: 10,
|
|
50
|
+
clientLLMWebSocketConnectTime: 20,
|
|
51
|
+
},
|
|
37
52
|
identifiers: {
|
|
38
53
|
breakoutMoveId: 'breakoutMoveId',
|
|
39
54
|
breakoutSessionId: 'sessionId',
|
|
40
55
|
breakoutGroupId: 'groupId',
|
|
56
|
+
llmWebsocketUrl: 'wss://example.com/ws',
|
|
41
57
|
},
|
|
42
58
|
},
|
|
43
59
|
options: {meetingId: 'activeMeetingId'},
|
|
@@ -79,10 +95,112 @@ describe('plugin-meetings', () => {
|
|
|
79
95
|
sinon.stub(submitClientEvent, 'bind').returns(webex.internal.newMetrics.submitClientEvent);
|
|
80
96
|
|
|
81
97
|
breakoutEvent.postMoveCallAnalyzer = sinon.stub();
|
|
82
|
-
const eventInfo = {
|
|
98
|
+
const eventInfo = {
|
|
99
|
+
newSession,
|
|
100
|
+
mockMeeting,
|
|
101
|
+
breakoutMoveId,
|
|
102
|
+
llmLatency: {clientLLMDatachannelResponseTime: 10, clientLLMWebSocketConnectTime: 20},
|
|
103
|
+
};
|
|
83
104
|
breakoutEvent.onBreakoutJoinResponse(eventInfo, submitClientEvent);
|
|
84
105
|
assert.calledWith(breakoutEvent.postMoveCallAnalyzer, 'client.breakout-session.join.response', eventInfo, submitClientEvent);
|
|
85
106
|
});
|
|
107
|
+
|
|
108
|
+
it('emits join response metric without llmLatency', () => {
|
|
109
|
+
const submitClientEvent = sinon.stub();
|
|
110
|
+
|
|
111
|
+
breakoutEvent.postMoveCallAnalyzer(
|
|
112
|
+
'client.breakout-session.join.response',
|
|
113
|
+
{currentSession: newSession, meeting: mockMeeting, breakoutMoveId},
|
|
114
|
+
submitClientEvent
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
assert.calledOnceWithExactly(submitClientEvent, {
|
|
118
|
+
name: 'client.breakout-session.join.response',
|
|
119
|
+
payload: {
|
|
120
|
+
llmLatency: undefined,
|
|
121
|
+
identifiers: {
|
|
122
|
+
breakoutMoveId: 'breakoutMoveId',
|
|
123
|
+
breakoutSessionId: 'sessionId',
|
|
124
|
+
breakoutGroupId: 'groupId',
|
|
125
|
+
llmWebsocketUrl: undefined,
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
options: {meetingId: 'activeMeetingId', rawError: undefined},
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
it('does not emit duplicate join response metric with llmLatency for the same breakoutMoveId', () => {
|
|
133
|
+
const submitClientEvent = sinon.stub();
|
|
134
|
+
const shouldEmitBreakoutJoinResponseMetric = sinon.stub();
|
|
135
|
+
|
|
136
|
+
shouldEmitBreakoutJoinResponseMetric.onFirstCall().returns(true);
|
|
137
|
+
shouldEmitBreakoutJoinResponseMetric.onSecondCall().returns(false);
|
|
138
|
+
|
|
139
|
+
const eventInfo = {
|
|
140
|
+
currentSession: newSession,
|
|
141
|
+
meeting: {
|
|
142
|
+
...mockMeeting,
|
|
143
|
+
shouldEmitBreakoutJoinResponseMetric,
|
|
144
|
+
},
|
|
145
|
+
breakoutMoveId,
|
|
146
|
+
llmLatency: {clientLLMDatachannelResponseTime: 10, clientLLMWebSocketConnectTime: 20},
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
breakoutEvent.postMoveCallAnalyzer(
|
|
150
|
+
'client.breakout-session.join.response',
|
|
151
|
+
eventInfo,
|
|
152
|
+
submitClientEvent
|
|
153
|
+
);
|
|
154
|
+
breakoutEvent.postMoveCallAnalyzer(
|
|
155
|
+
'client.breakout-session.join.response',
|
|
156
|
+
eventInfo,
|
|
157
|
+
submitClientEvent
|
|
158
|
+
);
|
|
159
|
+
|
|
160
|
+
assert.calledTwice(shouldEmitBreakoutJoinResponseMetric);
|
|
161
|
+
assert.calledWithExactly(shouldEmitBreakoutJoinResponseMetric, breakoutMoveId, true);
|
|
162
|
+
assert.calledOnce(submitClientEvent);
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
it('allows llmLatency join response after join response without llmLatency', () => {
|
|
166
|
+
const submitClientEvent = sinon.stub();
|
|
167
|
+
const shouldEmitBreakoutJoinResponseMetric = sinon.stub();
|
|
168
|
+
|
|
169
|
+
shouldEmitBreakoutJoinResponseMetric.onFirstCall().returns(true);
|
|
170
|
+
shouldEmitBreakoutJoinResponseMetric.onSecondCall().returns(true);
|
|
171
|
+
|
|
172
|
+
const baseEventInfo = {
|
|
173
|
+
currentSession: newSession,
|
|
174
|
+
meeting: {
|
|
175
|
+
...mockMeeting,
|
|
176
|
+
shouldEmitBreakoutJoinResponseMetric,
|
|
177
|
+
},
|
|
178
|
+
breakoutMoveId,
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
breakoutEvent.postMoveCallAnalyzer(
|
|
182
|
+
'client.breakout-session.join.response',
|
|
183
|
+
baseEventInfo,
|
|
184
|
+
submitClientEvent
|
|
185
|
+
);
|
|
186
|
+
breakoutEvent.postMoveCallAnalyzer(
|
|
187
|
+
'client.breakout-session.join.response',
|
|
188
|
+
{
|
|
189
|
+
...baseEventInfo,
|
|
190
|
+
llmLatency: {clientLLMDatachannelResponseTime: 10, clientLLMWebSocketConnectTime: 20},
|
|
191
|
+
},
|
|
192
|
+
submitClientEvent
|
|
193
|
+
);
|
|
194
|
+
|
|
195
|
+
assert.calledTwice(shouldEmitBreakoutJoinResponseMetric);
|
|
196
|
+
assert.calledWithExactly(shouldEmitBreakoutJoinResponseMetric.firstCall, breakoutMoveId, false);
|
|
197
|
+
assert.calledWithExactly(shouldEmitBreakoutJoinResponseMetric.secondCall, breakoutMoveId, true);
|
|
198
|
+
assert.calledTwice(submitClientEvent);
|
|
199
|
+
assert.deepEqual(submitClientEvent.secondCall.args[0].payload.llmLatency, {
|
|
200
|
+
clientLLMDatachannelResponseTime: 10,
|
|
201
|
+
clientLLMWebSocketConnectTime: 20,
|
|
202
|
+
});
|
|
203
|
+
});
|
|
86
204
|
});
|
|
87
205
|
|
|
88
206
|
});
|
|
@@ -7,8 +7,7 @@ import sinon from 'sinon';
|
|
|
7
7
|
import MockWebex from '@webex/test-helper-mock-webex';
|
|
8
8
|
import testUtils from '../../../utils/testUtils';
|
|
9
9
|
import BreakoutEditLockedError from '@webex/plugin-meetings/src/breakouts/edit-lock-error';
|
|
10
|
-
import breakoutEvent from '../../../../src/breakouts/events'
|
|
11
|
-
|
|
10
|
+
import breakoutEvent from '../../../../src/breakouts/events'
|
|
12
11
|
const getBOResponse = (status: string) => {
|
|
13
12
|
return {
|
|
14
13
|
url: 'url',
|
|
@@ -217,6 +216,21 @@ describe('plugin-meetings', () => {
|
|
|
217
216
|
});
|
|
218
217
|
assert.calledThrice(breakouts.queryPreAssignments);
|
|
219
218
|
});
|
|
219
|
+
|
|
220
|
+
it('wires LLM_CONNECT_RESPONSE to handleLLMBreakoutJoinResponseMetric', () => {
|
|
221
|
+
const handleStub = sinon.stub(Breakouts.prototype, 'handleLLMBreakoutJoinResponseMetric');
|
|
222
|
+
const bo = new Breakouts({}, {parent: webex});
|
|
223
|
+
|
|
224
|
+
const eventInfo = {
|
|
225
|
+
meeting: {id: 'meeting-id'},
|
|
226
|
+
llmLatency: {clientLLMWebSocketConnectTime: 1},
|
|
227
|
+
};
|
|
228
|
+
bo.trigger(BREAKOUTS.EVENTS.LLM_CONNECT_RESPONSE, eventInfo);
|
|
229
|
+
|
|
230
|
+
assert.calledOnceWithExactly(handleStub, eventInfo);
|
|
231
|
+
|
|
232
|
+
handleStub.restore();
|
|
233
|
+
});
|
|
220
234
|
});
|
|
221
235
|
|
|
222
236
|
describe('#listenToCurrentSessionTypeChange', () => {
|
|
@@ -374,6 +388,27 @@ describe('plugin-meetings', () => {
|
|
|
374
388
|
assert.calledOnce(breakouts.clearBreakouts);
|
|
375
389
|
});
|
|
376
390
|
|
|
391
|
+
it('preserves the last non-empty breakoutMoveId when a later update omits it', () => {
|
|
392
|
+
breakouts.updateBreakout({
|
|
393
|
+
sessionId: 'sessionId',
|
|
394
|
+
groupId: 'groupId',
|
|
395
|
+
sessionType: 'BREAKOUT',
|
|
396
|
+
status: 'active',
|
|
397
|
+
breakoutMoveId: 'move-id-1',
|
|
398
|
+
});
|
|
399
|
+
assert.equal(breakouts.breakoutMoveId, 'move-id-1');
|
|
400
|
+
|
|
401
|
+
// a later controls update arrives without a replaces entry -> null move id
|
|
402
|
+
breakouts.updateBreakout({
|
|
403
|
+
sessionId: 'sessionId',
|
|
404
|
+
groupId: 'groupId',
|
|
405
|
+
sessionType: 'BREAKOUT',
|
|
406
|
+
status: 'active',
|
|
407
|
+
breakoutMoveId: null,
|
|
408
|
+
});
|
|
409
|
+
assert.equal(breakouts.breakoutMoveId, 'move-id-1');
|
|
410
|
+
});
|
|
411
|
+
|
|
377
412
|
it('updates the current breakout session, call onBreakoutJoinResponse when session changed', () => {
|
|
378
413
|
breakouts.webex.meetings = {
|
|
379
414
|
getMeetingByType: sinon.stub().returns({
|
|
@@ -431,6 +466,111 @@ describe('plugin-meetings', () => {
|
|
|
431
466
|
});
|
|
432
467
|
});
|
|
433
468
|
|
|
469
|
+
describe('#submitLLMBreakoutJoinResponseMetric', () => {
|
|
470
|
+
let onBreakoutJoinResponseSpy;
|
|
471
|
+
|
|
472
|
+
const setupReadyToEmit = () => {
|
|
473
|
+
breakouts.webex.meetings = {
|
|
474
|
+
getMeetingByType: sinon.stub().returns({id: 'meeting-id'}),
|
|
475
|
+
};
|
|
476
|
+
breakouts.webex.internal.newMetrics = {submitClientEvent: sinon.stub()};
|
|
477
|
+
breakouts.webex.internal.llm.getWebSocketUrl = sinon.stub().returns('wss://llm');
|
|
478
|
+
breakouts.breakoutMoveId = 'moveId';
|
|
479
|
+
breakouts.currentBreakoutSession.set({sessionId: 'sessionId', groupId: 'groupId'});
|
|
480
|
+
breakouts.llmBreakoutJoinResponseInfo = {
|
|
481
|
+
breakoutMoveId: 'moveId',
|
|
482
|
+
meeting: {id: 'meeting-id'},
|
|
483
|
+
llmLatency: {clientLLMWebSocketConnectTime: 1},
|
|
484
|
+
};
|
|
485
|
+
};
|
|
486
|
+
|
|
487
|
+
beforeEach(() => {
|
|
488
|
+
onBreakoutJoinResponseSpy = sinon.stub(breakoutEvent, 'onBreakoutJoinResponse');
|
|
489
|
+
});
|
|
490
|
+
|
|
491
|
+
afterEach(() => {
|
|
492
|
+
onBreakoutJoinResponseSpy.restore();
|
|
493
|
+
});
|
|
494
|
+
|
|
495
|
+
it('emits the join response while an active breakout is in progress', () => {
|
|
496
|
+
setupReadyToEmit();
|
|
497
|
+
breakouts.set('sessionType', BREAKOUTS.SESSION_TYPES.BREAKOUT);
|
|
498
|
+
breakouts.set('status', BREAKOUTS.STATUS.OPEN);
|
|
499
|
+
|
|
500
|
+
breakouts.submitLLMBreakoutJoinResponseMetric();
|
|
501
|
+
|
|
502
|
+
assert.calledOnce(onBreakoutJoinResponseSpy);
|
|
503
|
+
const eventInfoArg = onBreakoutJoinResponseSpy.getCall(0).args[0];
|
|
504
|
+
assert.equal(eventInfoArg.breakoutMoveId, 'moveId');
|
|
505
|
+
assert.deepEqual(eventInfoArg.llmLatency, {clientLLMWebSocketConnectTime: 1});
|
|
506
|
+
assert.equal(eventInfoArg.llmWebsocketUrl, 'wss://llm');
|
|
507
|
+
assert.equal(eventInfoArg.meeting.id, 'meeting-id');
|
|
508
|
+
assert.equal(eventInfoArg.currentSession.sessionId, 'sessionId');
|
|
509
|
+
assert.equal(eventInfoArg.currentSession.groupId, 'groupId');
|
|
510
|
+
assert.isUndefined(eventInfoArg.error);
|
|
511
|
+
assert.isUndefined(breakouts.llmBreakoutJoinResponseInfo);
|
|
512
|
+
});
|
|
513
|
+
|
|
514
|
+
it('emits the join response after returning to the main session', () => {
|
|
515
|
+
setupReadyToEmit();
|
|
516
|
+
breakouts.set('sessionType', BREAKOUTS.SESSION_TYPES.MAIN);
|
|
517
|
+
breakouts.currentBreakoutSession.set({sessionType: BREAKOUTS.SESSION_TYPES.MAIN});
|
|
518
|
+
|
|
519
|
+
breakouts.submitLLMBreakoutJoinResponseMetric();
|
|
520
|
+
|
|
521
|
+
assert.calledOnce(onBreakoutJoinResponseSpy);
|
|
522
|
+
const eventInfoArg = onBreakoutJoinResponseSpy.getCall(0).args[0];
|
|
523
|
+
assert.equal(eventInfoArg.breakoutMoveId, 'moveId');
|
|
524
|
+
assert.deepEqual(eventInfoArg.llmLatency, {clientLLMWebSocketConnectTime: 1});
|
|
525
|
+
assert.equal(eventInfoArg.llmWebsocketUrl, 'wss://llm');
|
|
526
|
+
assert.equal(eventInfoArg.meeting.id, 'meeting-id');
|
|
527
|
+
assert.equal(eventInfoArg.currentSession.sessionId, 'sessionId');
|
|
528
|
+
assert.equal(eventInfoArg.currentSession.groupId, 'groupId');
|
|
529
|
+
assert.isUndefined(eventInfoArg.error);
|
|
530
|
+
assert.isUndefined(breakouts.llmBreakoutJoinResponseInfo);
|
|
531
|
+
});
|
|
532
|
+
|
|
533
|
+
it('does not emit without a breakoutMoveId (non-breakout meeting)', () => {
|
|
534
|
+
setupReadyToEmit();
|
|
535
|
+
breakouts.breakoutMoveId = undefined;
|
|
536
|
+
breakouts.set('sessionType', BREAKOUTS.SESSION_TYPES.MAIN);
|
|
537
|
+
|
|
538
|
+
breakouts.submitLLMBreakoutJoinResponseMetric();
|
|
539
|
+
|
|
540
|
+
assert.notCalled(onBreakoutJoinResponseSpy);
|
|
541
|
+
});
|
|
542
|
+
|
|
543
|
+
it('does not emit when the LLM latency belongs to a different move id', () => {
|
|
544
|
+
setupReadyToEmit();
|
|
545
|
+
breakouts.set('sessionType', BREAKOUTS.SESSION_TYPES.MAIN);
|
|
546
|
+
breakouts.llmBreakoutJoinResponseInfo.breakoutMoveId = 'staleMoveId';
|
|
547
|
+
|
|
548
|
+
breakouts.submitLLMBreakoutJoinResponseMetric();
|
|
549
|
+
|
|
550
|
+
assert.notCalled(onBreakoutJoinResponseSpy);
|
|
551
|
+
});
|
|
552
|
+
});
|
|
553
|
+
|
|
554
|
+
describe('#handleLLMBreakoutJoinResponseMetric', () => {
|
|
555
|
+
it('stores the LLM connect response with the current breakoutMoveId and tries to emit', () => {
|
|
556
|
+
breakouts.breakoutMoveId = 'moveId';
|
|
557
|
+
breakouts.submitLLMBreakoutJoinResponseMetric = sinon.stub();
|
|
558
|
+
|
|
559
|
+
const eventInfo = {
|
|
560
|
+
meeting: {id: 'meeting-id'},
|
|
561
|
+
llmLatency: {clientLLMWebSocketConnectTime: 1},
|
|
562
|
+
};
|
|
563
|
+
|
|
564
|
+
breakouts.handleLLMBreakoutJoinResponseMetric(eventInfo);
|
|
565
|
+
|
|
566
|
+
assert.deepEqual(breakouts.llmBreakoutJoinResponseInfo, {
|
|
567
|
+
...eventInfo,
|
|
568
|
+
breakoutMoveId: 'moveId',
|
|
569
|
+
});
|
|
570
|
+
assert.calledOnce(breakouts.submitLLMBreakoutJoinResponseMetric);
|
|
571
|
+
});
|
|
572
|
+
});
|
|
573
|
+
|
|
434
574
|
describe('#updateBreakoutSessions', () => {
|
|
435
575
|
const checkBreakout = (breakout, sessionId, state) => {
|
|
436
576
|
assert.deepEqual(breakout.attributes, {
|