@webex/plugin-meetings 3.12.0-next.102 → 3.12.0-next.103
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 +147 -19
- 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 +56 -33
- package/dist/locus-info/index.js.map +1 -1
- package/dist/meeting/index.js +284 -37
- package/dist/meeting/index.js.map +1 -1
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +40 -3
- package/dist/types/locus-info/index.d.ts +10 -4
- package/dist/types/meeting/index.d.ts +54 -1
- package/dist/webinar/index.js +1 -1
- package/package.json +13 -13
- 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 +209 -17
- package/src/locus-info/index.ts +45 -18
- package/src/meeting/index.ts +246 -4
- 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 +440 -3
- package/test/unit/spec/locus-info/index.js +45 -5
- package/test/unit/spec/meeting/index.js +389 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { LocusSyncLatencyEventName } from '@webex/internal-plugin-metrics';
|
|
1
2
|
import HashTree from './hashTree';
|
|
2
3
|
import { Enum } from '../constants';
|
|
3
4
|
import { HtMeta, HashTreeObject } from './types';
|
|
@@ -48,6 +49,7 @@ interface InternalDataSet extends DataSet {
|
|
|
48
49
|
syncAbortController?: AbortController;
|
|
49
50
|
}
|
|
50
51
|
type WebexRequestMethod = (options: Record<string, any>) => Promise<any>;
|
|
52
|
+
type GenerateTrackingId = () => string | undefined;
|
|
51
53
|
export declare const LocusInfoUpdateType: {
|
|
52
54
|
readonly OBJECTS_UPDATED: "OBJECTS_UPDATED";
|
|
53
55
|
readonly MEETING_ENDED: "MEETING_ENDED";
|
|
@@ -67,6 +69,26 @@ export type LocusInfoUpdate = {
|
|
|
67
69
|
} & LocusUpdatePayloads[K];
|
|
68
70
|
}[keyof LocusUpdatePayloads];
|
|
69
71
|
export type LocusInfoUpdateCallback = (update: LocusInfoUpdate) => void;
|
|
72
|
+
export type SyncLatencyTracker = {
|
|
73
|
+
saveLatency: (key: 'internal.client.locus.sync.random.backoff', value: number, options: {
|
|
74
|
+
meetingId: string;
|
|
75
|
+
dataSetName: string;
|
|
76
|
+
}) => void;
|
|
77
|
+
saveTimestamp: (options: {
|
|
78
|
+
key: LocusSyncLatencyEventName;
|
|
79
|
+
options: {
|
|
80
|
+
meetingId: string;
|
|
81
|
+
dataSetName: string;
|
|
82
|
+
trackingId?: string;
|
|
83
|
+
};
|
|
84
|
+
}) => void;
|
|
85
|
+
clearLocusSyncLatency: (dataSetName: string, meetingId: string, trackingId?: string) => void;
|
|
86
|
+
};
|
|
87
|
+
export type HashTreeParserCallbacks = {
|
|
88
|
+
locusInfoUpdateCallback: LocusInfoUpdateCallback;
|
|
89
|
+
syncLatencyTracker?: SyncLatencyTracker;
|
|
90
|
+
generateTrackingId?: GenerateTrackingId;
|
|
91
|
+
};
|
|
70
92
|
/**
|
|
71
93
|
* This error is thrown if we receive information that the meeting has ended while we're processing some hash messages.
|
|
72
94
|
* It's handled internally by HashTreeParser and results in MEETING_ENDED being sent up.
|
|
@@ -87,7 +109,8 @@ declare class HashTreeParser {
|
|
|
87
109
|
dataSets: Record<string, InternalDataSet>;
|
|
88
110
|
visibleDataSetsUrl: string;
|
|
89
111
|
webexRequest: WebexRequestMethod;
|
|
90
|
-
|
|
112
|
+
private callbacks;
|
|
113
|
+
private syncLatencyMeetingId;
|
|
91
114
|
visibleDataSets: VisibleDataSetInfo[];
|
|
92
115
|
debugId: string;
|
|
93
116
|
private excludedDataSets;
|
|
@@ -110,9 +133,10 @@ declare class HashTreeParser {
|
|
|
110
133
|
};
|
|
111
134
|
metadata: Metadata | null;
|
|
112
135
|
webexRequest: WebexRequestMethod;
|
|
113
|
-
|
|
136
|
+
callbacks: HashTreeParserCallbacks;
|
|
114
137
|
debugId: string;
|
|
115
138
|
excludedDataSets?: string[];
|
|
139
|
+
syncLatencyMeetingId: string;
|
|
116
140
|
});
|
|
117
141
|
/**
|
|
118
142
|
* Sets the visible data sets list for the HashTreeParser. This method should be called only at the start, to initialize
|
|
@@ -318,6 +342,15 @@ declare class HashTreeParser {
|
|
|
318
342
|
* @returns {void}
|
|
319
343
|
*/
|
|
320
344
|
handleMessage(message: HashTreeMessage, debugText?: string): void;
|
|
345
|
+
/**
|
|
346
|
+
* Checks if Locus sync latency metrics should be collected for a dataset.
|
|
347
|
+
*
|
|
348
|
+
* @param {string} dataSetName dataset name
|
|
349
|
+
* @param {boolean} [isInitialization=false] whether this is an initialization sync
|
|
350
|
+
* @returns {boolean}
|
|
351
|
+
*/
|
|
352
|
+
private shouldCollectSyncMetrics;
|
|
353
|
+
private saveSyncBackoffLatency;
|
|
321
354
|
/**
|
|
322
355
|
* Calls the updateInfo callback if there are any updates to report
|
|
323
356
|
*
|
|
@@ -472,6 +505,9 @@ declare class HashTreeParser {
|
|
|
472
505
|
* Gets the current hashes from the locus for a specific data set.
|
|
473
506
|
* @param {string} dataSetName
|
|
474
507
|
* @param {string} currentRootHash
|
|
508
|
+
* @param {Object} [trackingIds] tracking ids for the /hashtree request
|
|
509
|
+
* @param {string} [trackingIds.requestTrackingId] tracking id forced onto the /hashtree HTTP request header (kept distinct from the /sync request's tracking id)
|
|
510
|
+
* @param {string} [trackingIds.metricTrackingId] tracking id (the /sync request's) under which the hashtree latency milestones are recorded, so they belong to the same sync latency record
|
|
475
511
|
* @returns {Object|null} An object containing the hashes and leaf count, or null if the hashes match and no sync is needed
|
|
476
512
|
*/
|
|
477
513
|
private getHashesFromLocus;
|
|
@@ -480,7 +516,8 @@ declare class HashTreeParser {
|
|
|
480
516
|
*
|
|
481
517
|
* @param {InternalDataSet} dataSet The data set to sync.
|
|
482
518
|
* @param {Object} options Either `{ isInitialization: true }` for init syncs (uses leafCount=1 with empty leaf data) or `{ mismatchedLeavesData }` for normal syncs.
|
|
483
|
-
* @
|
|
519
|
+
* @param {string} [trackingId] tracking id
|
|
520
|
+
* @returns {Promise<HashTreeMessage | null>}
|
|
484
521
|
*/
|
|
485
522
|
private sendSyncRequestToLocus;
|
|
486
523
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import EventsScope from '../common/events/events-scope';
|
|
2
2
|
import { LOCUSEVENT } from '../constants';
|
|
3
|
-
import HashTreeParser, { DataSet, HashTreeMessage, Metadata } from '../hashTree/hashTreeParser';
|
|
3
|
+
import HashTreeParser, { DataSet, HashTreeMessage, Metadata, SyncLatencyTracker } from '../hashTree/hashTreeParser';
|
|
4
4
|
import { HashTreeObject } from '../hashTree/types';
|
|
5
5
|
import { Links, LocusDTO } from './types';
|
|
6
6
|
import MeetingCollection from '../meetings/collection';
|
|
7
7
|
export type LocusLLMEvent = {
|
|
8
|
+
trackingId?: string;
|
|
8
9
|
data: {
|
|
9
10
|
eventType: typeof LOCUSEVENT.HASH_TREE_DATA_UPDATED;
|
|
10
11
|
stateElementsMessage: HashTreeMessage;
|
|
@@ -20,6 +21,10 @@ export type HashTreeParserEntry = {
|
|
|
20
21
|
replacedAt?: string;
|
|
21
22
|
initializedFromHashTree: boolean;
|
|
22
23
|
};
|
|
24
|
+
export type LocusInfoCallbacks = {
|
|
25
|
+
updateMeeting: (object: any) => void;
|
|
26
|
+
syncLatencyTracker?: SyncLatencyTracker;
|
|
27
|
+
};
|
|
23
28
|
/**
|
|
24
29
|
* Finds a meeting for a given hash tree message.
|
|
25
30
|
*
|
|
@@ -52,7 +57,6 @@ export default class LocusInfo extends EventsScope {
|
|
|
52
57
|
locusParser: any;
|
|
53
58
|
meetingId: any;
|
|
54
59
|
parsedLocus: any;
|
|
55
|
-
updateMeeting: any;
|
|
56
60
|
webex: any;
|
|
57
61
|
aclUrl: any;
|
|
58
62
|
baseSequence: any;
|
|
@@ -76,15 +80,17 @@ export default class LocusInfo extends EventsScope {
|
|
|
76
80
|
hashTreeParsers: Map<string, HashTreeParserEntry>;
|
|
77
81
|
hashTreeObjectId2ParticipantId: Map<number, string>;
|
|
78
82
|
classicVsHashTreeMismatchMetricCounter: number;
|
|
83
|
+
private callbacks;
|
|
79
84
|
private destroyMeetingSuspended;
|
|
80
85
|
/**
|
|
81
86
|
* Constructor
|
|
82
|
-
* @param {
|
|
87
|
+
* @param {Object} callbacks callbacks used by LocusInfo
|
|
88
|
+
* @param {function} callbacks.updateMeeting callback to update the meeting object from an object
|
|
83
89
|
* @param {object} webex
|
|
84
90
|
* @param {string} meetingId
|
|
85
91
|
* @returns {undefined}
|
|
86
92
|
*/
|
|
87
|
-
constructor(
|
|
93
|
+
constructor(callbacks: LocusInfoCallbacks, webex: any, meetingId: any);
|
|
88
94
|
/**
|
|
89
95
|
* Does a Locus sync. It tries to get the latest delta DTO or if it can't, it falls back to getting the full Locus DTO.
|
|
90
96
|
* WARNING: This function must not be used for hash tree based Locus meetings.
|
|
@@ -494,6 +494,7 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
494
494
|
isMoveToInProgress: boolean;
|
|
495
495
|
registrationIdStatus: string;
|
|
496
496
|
brbState: BrbState;
|
|
497
|
+
private emittedBreakoutJoinResponseMoveIds;
|
|
497
498
|
private promisesWaitingForPropUpdate;
|
|
498
499
|
voiceaListenerCallbacks: object;
|
|
499
500
|
private addMediaData;
|
|
@@ -709,6 +710,40 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
709
710
|
* @returns {Promise}
|
|
710
711
|
*/
|
|
711
712
|
postMetrics(eventName: ClientEvent['name']): void;
|
|
713
|
+
/**
|
|
714
|
+
* Handles the LLM state-update message that resulted from a Locus /sync. Records the LLM arrival
|
|
715
|
+
* time (the milestone that gates client.locus.sync.complete - the metric is emitted only for LLM
|
|
716
|
+
* flows) and then tries to complete the metric.
|
|
717
|
+
* @param {string} meetingId meeting id
|
|
718
|
+
* @param {string} trackingId sync tracking id echoed back on the LLM message
|
|
719
|
+
* @returns {void}
|
|
720
|
+
* @private
|
|
721
|
+
* @memberof Meeting
|
|
722
|
+
*/
|
|
723
|
+
private onLocusSyncLlmMessage;
|
|
724
|
+
/**
|
|
725
|
+
* Attempts to complete the Locus sync latency metric and emit client.locus.sync.complete. The
|
|
726
|
+
* metric is emitted only once BOTH the /sync response and the resulting LLM message have arrived
|
|
727
|
+
* (in either order); until then the record is kept so the missing milestone can still land. Both
|
|
728
|
+
* trigger points (the LLM message handler and the /sync response timestamp) call this, so the
|
|
729
|
+
* metric fires as soon as the second milestone is in.
|
|
730
|
+
* @param {string} meetingId meeting id
|
|
731
|
+
* @param {string} trackingId sync tracking id used to match the pending record
|
|
732
|
+
* @returns {void}
|
|
733
|
+
* @private
|
|
734
|
+
* @memberof Meeting
|
|
735
|
+
*/
|
|
736
|
+
private tryCompleteLocusSyncLatency;
|
|
737
|
+
/**
|
|
738
|
+
* Submits the client.locus.sync.complete Call Analyzer event for a completed Locus sync latency
|
|
739
|
+
* measurement.
|
|
740
|
+
* @param {string} meetingId meeting id
|
|
741
|
+
* @param {object} completed completed sync latency payload from the metrics plugin
|
|
742
|
+
* @returns {void}
|
|
743
|
+
* @private
|
|
744
|
+
* @memberof Meeting
|
|
745
|
+
*/
|
|
746
|
+
private emitLocusSyncCompleteMetric;
|
|
712
747
|
/**
|
|
713
748
|
* Proxy function for all the listener set ups
|
|
714
749
|
* @returns {undefined}
|
|
@@ -1466,9 +1501,27 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
1466
1501
|
/**
|
|
1467
1502
|
* Connects to low latency mercury and reconnects if the address has changed
|
|
1468
1503
|
* It will also disconnect if called when the meeting has ended
|
|
1504
|
+
* @param {Object} [options]
|
|
1505
|
+
* @param {boolean} [options.isInitialJoinPhase] true when called from initial join flow
|
|
1469
1506
|
* @returns {Promise}
|
|
1470
1507
|
*/
|
|
1471
|
-
updateLLMConnection(
|
|
1508
|
+
updateLLMConnection({ isInitialJoinPhase }?: {
|
|
1509
|
+
isInitialJoinPhase?: boolean;
|
|
1510
|
+
}): Promise<any>;
|
|
1511
|
+
/**
|
|
1512
|
+
* Ensures breakout join response metric with LLM latency is emitted only once per breakout move id.
|
|
1513
|
+
* @param {string | undefined} breakoutMoveId
|
|
1514
|
+
* @param {boolean} [hasLLMLatency=false]
|
|
1515
|
+
* @returns {boolean}
|
|
1516
|
+
*/
|
|
1517
|
+
private shouldEmitBreakoutJoinResponseMetric;
|
|
1518
|
+
/**
|
|
1519
|
+
* Sends LLM connect latencies for initial join flow.
|
|
1520
|
+
* @param {RegisterAndConnectTiming} timings
|
|
1521
|
+
* @param {any} [error]
|
|
1522
|
+
* @returns {void}
|
|
1523
|
+
*/
|
|
1524
|
+
private sendLLMConnectMetric;
|
|
1472
1525
|
/**
|
|
1473
1526
|
* Use phone for meeting audio
|
|
1474
1527
|
* @param {String} phoneNumber If provided, it will dial-out using this number. If not provided, dial-in will be used
|
package/dist/webinar/index.js
CHANGED
package/package.json
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@webex/eslint-config-legacy": "0.0.0",
|
|
44
44
|
"@webex/jest-config-legacy": "0.0.0",
|
|
45
45
|
"@webex/legacy-tools": "0.0.0",
|
|
46
|
-
"@webex/plugin-rooms": "3.12.0-next.
|
|
46
|
+
"@webex/plugin-rooms": "3.12.0-next.37",
|
|
47
47
|
"@webex/test-helper-chai": "3.12.0-next.5",
|
|
48
48
|
"@webex/test-helper-mocha": "3.12.0-next.5",
|
|
49
49
|
"@webex/test-helper-mock-webex": "3.12.0-next.5",
|
|
@@ -63,20 +63,20 @@
|
|
|
63
63
|
"@webex/common": "3.12.0-next.5",
|
|
64
64
|
"@webex/event-dictionary-ts": "^1.0.2215",
|
|
65
65
|
"@webex/internal-media-core": "2.26.2",
|
|
66
|
-
"@webex/internal-plugin-conversation": "3.12.0-next.
|
|
67
|
-
"@webex/internal-plugin-device": "3.12.0-next.
|
|
68
|
-
"@webex/internal-plugin-llm": "3.12.0-next.
|
|
69
|
-
"@webex/internal-plugin-mercury": "3.12.0-next.
|
|
70
|
-
"@webex/internal-plugin-metrics": "3.12.0-next.
|
|
71
|
-
"@webex/internal-plugin-support": "3.12.0-next.
|
|
72
|
-
"@webex/internal-plugin-user": "3.12.0-next.
|
|
73
|
-
"@webex/internal-plugin-voicea": "3.12.0-next.
|
|
66
|
+
"@webex/internal-plugin-conversation": "3.12.0-next.37",
|
|
67
|
+
"@webex/internal-plugin-device": "3.12.0-next.35",
|
|
68
|
+
"@webex/internal-plugin-llm": "3.12.0-next.39",
|
|
69
|
+
"@webex/internal-plugin-mercury": "3.12.0-next.36",
|
|
70
|
+
"@webex/internal-plugin-metrics": "3.12.0-next.35",
|
|
71
|
+
"@webex/internal-plugin-support": "3.12.0-next.37",
|
|
72
|
+
"@webex/internal-plugin-user": "3.12.0-next.36",
|
|
73
|
+
"@webex/internal-plugin-voicea": "3.12.0-next.39",
|
|
74
74
|
"@webex/media-helpers": "3.12.0-next.10",
|
|
75
|
-
"@webex/plugin-people": "3.12.0-next.
|
|
76
|
-
"@webex/plugin-rooms": "3.12.0-next.
|
|
75
|
+
"@webex/plugin-people": "3.12.0-next.36",
|
|
76
|
+
"@webex/plugin-rooms": "3.12.0-next.37",
|
|
77
77
|
"@webex/ts-sdp": "^1.8.1",
|
|
78
78
|
"@webex/web-capabilities": "^1.10.0",
|
|
79
|
-
"@webex/webex-core": "3.12.0-next.
|
|
79
|
+
"@webex/webex-core": "3.12.0-next.35",
|
|
80
80
|
"ampersand-collection": "^2.0.2",
|
|
81
81
|
"bowser": "^2.11.0",
|
|
82
82
|
"btoa": "^1.2.1",
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
"//": [
|
|
95
95
|
"TODO: upgrade jwt-decode when moving to node 18"
|
|
96
96
|
],
|
|
97
|
-
"version": "3.12.0-next.
|
|
97
|
+
"version": "3.12.0-next.103"
|
|
98
98
|
}
|
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
|
@@ -32,6 +32,7 @@ const Breakouts = WebexPlugin.extend({
|
|
|
32
32
|
name: 'string', // only present when in a breakout session
|
|
33
33
|
sessionId: 'string', // appears from the moment you enable breakouts
|
|
34
34
|
sessionType: 'string', // appears from the moment you enable breakouts
|
|
35
|
+
breakoutMoveId: 'string', // used to correlate breakout move/join diagnostics
|
|
35
36
|
startTime: 'string', // appears once breakouts start
|
|
36
37
|
status: 'string', // only present when in a breakout session
|
|
37
38
|
url: 'string', // appears from the moment you enable breakouts
|
|
@@ -149,6 +150,11 @@ const Breakouts = WebexPlugin.extend({
|
|
|
149
150
|
this.listenTo(this.breakouts, 'change:requestedLastModifiedTime', (breakout) => {
|
|
150
151
|
this.triggerReturnToMainEvent(breakout);
|
|
151
152
|
});
|
|
153
|
+
this.listenTo(
|
|
154
|
+
this,
|
|
155
|
+
BREAKOUTS.EVENTS.LLM_CONNECT_RESPONSE,
|
|
156
|
+
this.handleLLMBreakoutJoinResponseMetric
|
|
157
|
+
);
|
|
152
158
|
this.listenToCurrentSessionTypeChange();
|
|
153
159
|
this.listenToBreakoutRosters();
|
|
154
160
|
this.listenToBreakoutHelp();
|
|
@@ -327,7 +333,10 @@ const Breakouts = WebexPlugin.extend({
|
|
|
327
333
|
* @returns {void}
|
|
328
334
|
*/
|
|
329
335
|
updateBreakout(params) {
|
|
336
|
+
const breakoutMoveId = params.breakoutMoveId || this.breakoutMoveId;
|
|
337
|
+
|
|
330
338
|
this.set(params);
|
|
339
|
+
this.set('breakoutMoveId', breakoutMoveId);
|
|
331
340
|
// These values are set manually so they are unset when they are not included in params
|
|
332
341
|
this.set('groups', params.groups);
|
|
333
342
|
this.set('startTime', params.startTime);
|
|
@@ -362,12 +371,81 @@ const Breakouts = WebexPlugin.extend({
|
|
|
362
371
|
{
|
|
363
372
|
currentSession: this.currentBreakoutSession,
|
|
364
373
|
meeting,
|
|
365
|
-
breakoutMoveId
|
|
374
|
+
breakoutMoveId,
|
|
366
375
|
},
|
|
367
376
|
// @ts-ignore
|
|
368
377
|
this.webex.internal.newMetrics.submitClientEvent.bind(this.webex.internal.newMetrics)
|
|
369
378
|
);
|
|
370
379
|
}
|
|
380
|
+
|
|
381
|
+
this.submitLLMBreakoutJoinResponseMetric();
|
|
382
|
+
},
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Stores the latest LLM connect response and tries to send the LLM-enhanced breakout join response.
|
|
386
|
+
* The breakout update and the LLM response are delivered independently, so either side can arrive first.
|
|
387
|
+
* @param {Object} eventInfo LLM connect response info
|
|
388
|
+
* @param {Object} eventInfo.meeting meeting instance
|
|
389
|
+
* @param {Object} eventInfo.llmLatency LLM latency values
|
|
390
|
+
* @param {Object} [eventInfo.error] LLM connection error
|
|
391
|
+
* @returns {void}
|
|
392
|
+
*/
|
|
393
|
+
handleLLMBreakoutJoinResponseMetric(eventInfo: any) {
|
|
394
|
+
this.llmBreakoutJoinResponseInfo = {
|
|
395
|
+
...eventInfo,
|
|
396
|
+
breakoutMoveId: this.breakoutMoveId,
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
this.submitLLMBreakoutJoinResponseMetric();
|
|
400
|
+
},
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Sends the LLM-enhanced breakout join response metric when both breakout state and LLM latency
|
|
404
|
+
* are available. LLM reconnects can also happen while leaving a breakout, before stale breakout
|
|
405
|
+
* fields are fully cleared, so the joined-session check lives with the breakout state.
|
|
406
|
+
*
|
|
407
|
+
* The joined session changes both when joining a breakout and when returning to the main
|
|
408
|
+
* session, and the client reconnects LLM in both directions. Mirroring the desktop client, we
|
|
409
|
+
* emit the join response for either transition, so the active-breakout check also accepts the
|
|
410
|
+
* main session. Non-breakout meetings never carry a breakoutMoveId, and a given move id is
|
|
411
|
+
* reported at most once, so accepting the main session here cannot leak spurious events.
|
|
412
|
+
* @returns {void}
|
|
413
|
+
*/
|
|
414
|
+
submitLLMBreakoutJoinResponseMetric() {
|
|
415
|
+
const eventInfo = this.llmBreakoutJoinResponseInfo;
|
|
416
|
+
|
|
417
|
+
// The breakout update and the LLM response arrive independently, so only emit once both the
|
|
418
|
+
// breakout move and its matching LLM latency are available for a session we have actually joined.
|
|
419
|
+
const hasMatchingMoveId =
|
|
420
|
+
!!this.breakoutMoveId && eventInfo?.breakoutMoveId === this.breakoutMoveId;
|
|
421
|
+
const hasSessionIdentifiers =
|
|
422
|
+
!!this.currentBreakoutSession?.sessionId && !!this.currentBreakoutSession?.groupId;
|
|
423
|
+
// isActiveBreakout already covers an open/closing breakout; isInMainSession covers return-to-main.
|
|
424
|
+
const isJoinedSession = this.isActiveBreakout || this.isInMainSession;
|
|
425
|
+
|
|
426
|
+
if (!eventInfo || !hasMatchingMoveId || !hasSessionIdentifiers || !isJoinedSession) {
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
const {llmLatency, error} = eventInfo;
|
|
431
|
+
const meeting = eventInfo.meeting || this.webex.meetings.getMeetingByType(_ID_, this.meetingId);
|
|
432
|
+
// @ts-ignore
|
|
433
|
+
const llmWebsocketUrl = this.webex.internal.llm.getWebSocketUrl?.() || undefined;
|
|
434
|
+
|
|
435
|
+
breakoutEvent.onBreakoutJoinResponse(
|
|
436
|
+
{
|
|
437
|
+
currentSession: this.currentBreakoutSession,
|
|
438
|
+
meeting,
|
|
439
|
+
breakoutMoveId: this.breakoutMoveId,
|
|
440
|
+
llmLatency,
|
|
441
|
+
llmWebsocketUrl,
|
|
442
|
+
error,
|
|
443
|
+
},
|
|
444
|
+
// @ts-ignore
|
|
445
|
+
this.webex.internal.newMetrics.submitClientEvent.bind(this.webex.internal.newMetrics)
|
|
446
|
+
);
|
|
447
|
+
|
|
448
|
+
this.llmBreakoutJoinResponseInfo = undefined;
|
|
371
449
|
},
|
|
372
450
|
|
|
373
451
|
/**
|
package/src/constants.ts
CHANGED