@webex/plugin-meetings 3.12.0-next.133 → 3.12.0-next.134
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/index.js +1 -1
- package/dist/hashTree/hashTreeParser.js +37 -29
- 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 +4 -0
- package/dist/locus-info/index.js.map +1 -1
- package/dist/types/hashTree/hashTreeParser.d.ts +1 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +1 -1
- package/src/hashTree/hashTreeParser.ts +17 -3
- package/src/locus-info/index.ts +1 -0
- package/test/unit/spec/hashTree/hashTreeParser.ts +64 -1
- package/test/unit/spec/locus-info/index.js +32 -0
|
@@ -88,6 +88,7 @@ export type HashTreeParserCallbacks = {
|
|
|
88
88
|
locusInfoUpdateCallback: LocusInfoUpdateCallback;
|
|
89
89
|
syncLatencyTracker?: SyncLatencyTracker;
|
|
90
90
|
generateTrackingId?: GenerateTrackingId;
|
|
91
|
+
isLlmExpected: () => boolean;
|
|
91
92
|
};
|
|
92
93
|
/**
|
|
93
94
|
* This error is thrown if we receive information that the meeting has ended while we're processing some hash messages.
|
package/dist/webinar/index.js
CHANGED
package/package.json
CHANGED
|
@@ -110,6 +110,7 @@ export type HashTreeParserCallbacks = {
|
|
|
110
110
|
locusInfoUpdateCallback: LocusInfoUpdateCallback;
|
|
111
111
|
syncLatencyTracker?: SyncLatencyTracker;
|
|
112
112
|
generateTrackingId?: GenerateTrackingId;
|
|
113
|
+
isLlmExpected: () => boolean;
|
|
113
114
|
};
|
|
114
115
|
|
|
115
116
|
const SYNC_METRICS_DATA_SETS = [
|
|
@@ -1222,11 +1223,11 @@ class HashTreeParser {
|
|
|
1222
1223
|
// emitted only from the LLM message path, so no completion happens here.
|
|
1223
1224
|
const updatedObjects = this.parseMessage(message, debugText);
|
|
1224
1225
|
|
|
1225
|
-
this.resetHeartbeatWatchdogs(message.dataSets);
|
|
1226
1226
|
this.callLocusInfoUpdateCallback({
|
|
1227
1227
|
updateType: LocusInfoUpdateType.OBJECTS_UPDATED,
|
|
1228
1228
|
updatedObjects,
|
|
1229
1229
|
});
|
|
1230
|
+
this.resetHeartbeatWatchdogs(message.dataSets);
|
|
1230
1231
|
}
|
|
1231
1232
|
}
|
|
1232
1233
|
|
|
@@ -1876,7 +1877,20 @@ class HashTreeParser {
|
|
|
1876
1877
|
// dataset-level heartbeatIntervalMs takes priority; fall back to top-level common value
|
|
1877
1878
|
const heartbeatIntervalMs = dataSet?.heartbeatIntervalMs ?? this.topLevelHeartbeatIntervalMs;
|
|
1878
1879
|
|
|
1879
|
-
if (!dataSet?.hashTree || !heartbeatIntervalMs) {
|
|
1880
|
+
if (!dataSet?.hashTree || !this.isVisibleDataSet(dataSet.name) || !heartbeatIntervalMs) {
|
|
1881
|
+
// eslint-disable-next-line no-continue
|
|
1882
|
+
continue;
|
|
1883
|
+
}
|
|
1884
|
+
|
|
1885
|
+
if (
|
|
1886
|
+
LLM_DATASET_NAMES.includes(dataSet.name) &&
|
|
1887
|
+
this.callbacks.isLlmExpected &&
|
|
1888
|
+
!this.callbacks.isLlmExpected()
|
|
1889
|
+
) {
|
|
1890
|
+
LoggerProxy.logger.info(
|
|
1891
|
+
`HashTreeParser#resetHeartbeatWatchdogs --> ${this.debugId} skipping heartbeat watchdog timer for data set "${dataSet.name}" because LLM is disconnected`
|
|
1892
|
+
);
|
|
1893
|
+
|
|
1880
1894
|
// eslint-disable-next-line no-continue
|
|
1881
1895
|
continue;
|
|
1882
1896
|
}
|
|
@@ -1888,7 +1902,7 @@ class HashTreeParser {
|
|
|
1888
1902
|
dataSet.heartbeatWatchdogTimer = undefined;
|
|
1889
1903
|
|
|
1890
1904
|
LoggerProxy.logger.warn(
|
|
1891
|
-
`HashTreeParser#resetHeartbeatWatchdogs --> ${this.debugId} Heartbeat watchdog fired for data set "${dataSet.name}" - no heartbeat received within expected interval, initiating sync`
|
|
1905
|
+
`HashTreeParser#resetHeartbeatWatchdogs --> ${this.debugId} Heartbeat watchdog fired for data set "${dataSet.name}" - no heartbeat received within expected interval(heartbeatIntervalMs=${heartbeatIntervalMs}, backoffTime=${backoffTime}), initiating sync`
|
|
1892
1906
|
);
|
|
1893
1907
|
|
|
1894
1908
|
Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.HASH_TREE_HEARTBEAT_WATCHDOG_EXPIRED, {
|
package/src/locus-info/index.ts
CHANGED
|
@@ -568,6 +568,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
568
568
|
callbacks: {
|
|
569
569
|
locusInfoUpdateCallback: this.updateFromHashTree.bind(this, locusUrl),
|
|
570
570
|
syncLatencyTracker: this.callbacks.syncLatencyTracker,
|
|
571
|
+
isLlmExpected: () => this.parsedLocus.self?.joinedWith?.state === 'JOINED',
|
|
571
572
|
// Reuse webex-core's tracking-id interceptor sequence (exposed publicly via
|
|
572
573
|
// webexTrackingIdSequenceNumbers) so Locus requests share the client's unified
|
|
573
574
|
// ${sessionId}_${sequence} tracking id space instead of minting an unrelated id. Fall
|
|
@@ -184,7 +184,8 @@ describe('HashTreeParser', () => {
|
|
|
184
184
|
excludedDataSets?: string[],
|
|
185
185
|
syncLatencyTracker?: any,
|
|
186
186
|
syncLatencyMeetingId = 'meeting-1',
|
|
187
|
-
generateTrackingId?: any
|
|
187
|
+
generateTrackingId?: any,
|
|
188
|
+
isLlmExpected?: () => boolean
|
|
188
189
|
) {
|
|
189
190
|
return new HashTreeParser({
|
|
190
191
|
initialLocus,
|
|
@@ -194,6 +195,7 @@ describe('HashTreeParser', () => {
|
|
|
194
195
|
locusInfoUpdateCallback: callback,
|
|
195
196
|
syncLatencyTracker,
|
|
196
197
|
generateTrackingId,
|
|
198
|
+
isLlmExpected,
|
|
197
199
|
},
|
|
198
200
|
debugId: 'test',
|
|
199
201
|
excludedDataSets,
|
|
@@ -3519,6 +3521,45 @@ describe('HashTreeParser', () => {
|
|
|
3519
3521
|
expect(parser.dataSets.main.heartbeatWatchdogTimer).to.be.undefined;
|
|
3520
3522
|
});
|
|
3521
3523
|
|
|
3524
|
+
it('skips watchdog timers for LLM datasets when current meeting LLM is not expected', async () => {
|
|
3525
|
+
const parser = createHashTreeParser(
|
|
3526
|
+
undefined,
|
|
3527
|
+
undefined,
|
|
3528
|
+
undefined,
|
|
3529
|
+
undefined,
|
|
3530
|
+
'meeting-1',
|
|
3531
|
+
undefined,
|
|
3532
|
+
() => false
|
|
3533
|
+
);
|
|
3534
|
+
|
|
3535
|
+
const heartbeatMessage = {
|
|
3536
|
+
dataSets: [
|
|
3537
|
+
{
|
|
3538
|
+
...createDataSet('main', 16, 1100),
|
|
3539
|
+
root: parser.dataSets.main.hashTree.getRootHash(),
|
|
3540
|
+
},
|
|
3541
|
+
{
|
|
3542
|
+
...createDataSet('self', 1, 2100),
|
|
3543
|
+
url: parser.dataSets.self.url,
|
|
3544
|
+
root: parser.dataSets.self.hashTree.getRootHash(),
|
|
3545
|
+
},
|
|
3546
|
+
{
|
|
3547
|
+
...createDataSet('atd-unmuted', 16, 3100),
|
|
3548
|
+
url: parser.dataSets['atd-unmuted'].url,
|
|
3549
|
+
root: parser.dataSets['atd-unmuted'].hashTree.getRootHash(),
|
|
3550
|
+
},
|
|
3551
|
+
],
|
|
3552
|
+
visibleDataSetsUrl,
|
|
3553
|
+
locusUrl,
|
|
3554
|
+
};
|
|
3555
|
+
|
|
3556
|
+
parser.handleMessage(heartbeatMessage, 'heartbeat with meeting-scoped llm not expected');
|
|
3557
|
+
|
|
3558
|
+
expect(parser.dataSets.main.heartbeatWatchdogTimer).to.be.undefined;
|
|
3559
|
+
expect(parser.dataSets['atd-unmuted'].heartbeatWatchdogTimer).to.be.undefined;
|
|
3560
|
+
expect(parser.dataSets.self.heartbeatWatchdogTimer).to.not.be.undefined;
|
|
3561
|
+
});
|
|
3562
|
+
|
|
3522
3563
|
it('stops all watchdog timers when meeting ends via sentinel message', async () => {
|
|
3523
3564
|
const parser = createHashTreeParser();
|
|
3524
3565
|
|
|
@@ -3679,6 +3720,28 @@ describe('HashTreeParser', () => {
|
|
|
3679
3720
|
expect(parser.dataSets['atd-active']?.heartbeatWatchdogTimer).to.be.undefined;
|
|
3680
3721
|
});
|
|
3681
3722
|
|
|
3723
|
+
it('does not set watchdog for a data set that has a hash tree but is not in visibleDataSets', async () => {
|
|
3724
|
+
const parser = createHashTreeParser();
|
|
3725
|
+
|
|
3726
|
+
// simulate a dataset that still has a hash tree but is no longer visible
|
|
3727
|
+
parser.visibleDataSets = parser.visibleDataSets.filter((vds) => vds.name !== 'main');
|
|
3728
|
+
|
|
3729
|
+
const heartbeatMessage = {
|
|
3730
|
+
dataSets: [
|
|
3731
|
+
{
|
|
3732
|
+
...createDataSet('main', 16, 1100),
|
|
3733
|
+
root: parser.dataSets.main.hashTree.getRootHash(),
|
|
3734
|
+
},
|
|
3735
|
+
],
|
|
3736
|
+
visibleDataSetsUrl,
|
|
3737
|
+
locusUrl,
|
|
3738
|
+
};
|
|
3739
|
+
|
|
3740
|
+
parser.handleMessage(heartbeatMessage, 'heartbeat for non-visible dataset with hash tree');
|
|
3741
|
+
|
|
3742
|
+
expect(parser.dataSets.main.heartbeatWatchdogTimer).to.be.undefined;
|
|
3743
|
+
});
|
|
3744
|
+
|
|
3682
3745
|
it('restarts the watchdog timer after it fires so that future missed heartbeats still trigger syncs', async () => {
|
|
3683
3746
|
const parser = createHashTreeParser();
|
|
3684
3747
|
const heartbeatIntervalMs = 5000;
|
|
@@ -195,6 +195,38 @@ describe('plugin-meetings', () => {
|
|
|
195
195
|
);
|
|
196
196
|
});
|
|
197
197
|
|
|
198
|
+
it('passes an isLlmExpected callback that is true when current device is joined', async () => {
|
|
199
|
+
locusInfo.parsedLocus.self = {
|
|
200
|
+
state: 'LEFT',
|
|
201
|
+
joinedWith: {state: 'JOINED'},
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
await locusInfo.initialSetup({
|
|
205
|
+
trigger: 'locus-message',
|
|
206
|
+
hashTreeMessage: createHashTreeMessage(['dataset1']),
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
const {isLlmExpected} = HashTreeParserStub.firstCall.args[0].callbacks;
|
|
210
|
+
|
|
211
|
+
assert.equal(isLlmExpected(), true);
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
it('passes an isLlmExpected callback that is false when self is joined but current device is not joined', async () => {
|
|
215
|
+
locusInfo.parsedLocus.self = {
|
|
216
|
+
state: 'JOINED',
|
|
217
|
+
joinedWith: {state: 'LEFT'},
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
await locusInfo.initialSetup({
|
|
221
|
+
trigger: 'locus-message',
|
|
222
|
+
hashTreeMessage: createHashTreeMessage(['dataset1']),
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
const {isLlmExpected} = HashTreeParserStub.firstCall.args[0].callbacks;
|
|
226
|
+
|
|
227
|
+
assert.equal(isLlmExpected(), false);
|
|
228
|
+
});
|
|
229
|
+
|
|
198
230
|
it('should not initialize the hash tree when triggered from a non-hash tree locus message', async () => {
|
|
199
231
|
const locus = {url: 'http://locus-url.com', participants: []};
|
|
200
232
|
|