@webex/plugin-meetings 3.12.0-webex-services-ready.4 → 3.13.0-next.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/.sdd/manifest.json +1312 -0
- package/.sdd/templates/.source.json +30 -0
- package/.sdd/templates/component-repo/module-docs/module-spec-quality.md +111 -0
- package/.sdd/templates/component-repo/module-docs/module-spec.template.md +321 -0
- package/.sdd/templates/component-repo/reference-docs/adr/_adr-example.md +59 -0
- package/.sdd/templates/component-repo/reference-docs/patterns/_pattern-example.md +49 -0
- package/.sdd/templates/component-repo/reference-docs/rules/_rule-example.md +42 -0
- package/.sdd/templates/component-repo/standing-docs/AGENTS.template.md +120 -0
- package/.sdd/templates/component-repo/standing-docs/ARCHITECTURE.template.md +206 -0
- package/.sdd/templates/component-repo/standing-docs/CONTRACTS.template.md +90 -0
- package/.sdd/templates/component-repo/standing-docs/DATA_MODEL.template.md +68 -0
- package/.sdd/templates/component-repo/standing-docs/GETTING_STARTED.template.md +111 -0
- package/.sdd/templates/component-repo/standing-docs/GLOSSARY.template.md +57 -0
- package/.sdd/templates/component-repo/standing-docs/REVIEW_CHECKLIST.template.md +69 -0
- package/.sdd/templates/component-repo/standing-docs/RULES.template.md +96 -0
- package/.sdd/templates/component-repo/standing-docs/SECURITY.template.md +84 -0
- package/.sdd/templates/component-repo/standing-docs/SERVICE_STATE.template.md +82 -0
- package/.sdd/templates/component-repo/standing-docs/SPEC_INDEX.template.md +94 -0
- package/.sdd/templates/component-repo/standing-docs/TEST_INDEX.template.md +64 -0
- package/.sdd/templates/component-repo/template-map.json +112 -0
- package/AGENTS.md +130 -4
- package/ai-docs/ARCHITECTURE.md +208 -0
- package/ai-docs/CONTRACTS.md +267 -0
- package/ai-docs/DATA_MODEL.md +64 -0
- package/ai-docs/GETTING_STARTED.md +73 -0
- package/ai-docs/GLOSSARY.md +56 -0
- package/ai-docs/REVIEW_CHECKLIST.md +45 -0
- package/ai-docs/RULES.md +79 -0
- package/ai-docs/SECURITY.md +74 -0
- package/ai-docs/SERVICE_STATE.md +59 -0
- package/ai-docs/SPEC_INDEX.md +85 -0
- package/ai-docs/TEST_INDEX.md +45 -0
- package/ai-docs/adr/0001-migrate-existing-docs-into-sdd.md +61 -0
- package/ai-docs/patterns/defensive-error-propagation.md +55 -0
- package/ai-docs/patterns/event-scope-emission.md +46 -0
- package/ai-docs/patterns/source-to-test-path-mirroring.md +45 -0
- package/ai-docs/patterns/stateless-plugin-request-classes.md +53 -0
- package/ai-docs/patterns/typed-constants-and-enum-values.md +47 -0
- package/assets/README.md +28 -0
- package/assets/e2ee-0.0.1.js +2 -0
- package/assets/e2ee-0.0.1.wasm +0 -0
- package/dist/aiEnableRequest/index.js +1 -1
- package/dist/annotation/index.js +55 -19
- package/dist/annotation/index.js.map +1 -1
- package/dist/assets/e2ee-0.0.1.js +2 -0
- package/dist/assets/e2ee-0.0.1.wasm +0 -0
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +39 -5
- package/dist/breakouts/index.js.map +1 -1
- package/dist/common/errors/webex-errors.js +7 -2
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/config.js +1 -0
- package/dist/config.js.map +1 -1
- package/dist/constants.js +6 -5
- package/dist/constants.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +101 -48
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/interceptors/dataChannelAuthToken.js +41 -59
- package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
- package/dist/interceptors/locusRetry.js +1 -1
- package/dist/interceptors/locusRetry.js.map +1 -1
- package/dist/interpretation/index.js +46 -12
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +236 -80
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/types.js +2 -1
- package/dist/locus-info/types.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +225 -175
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/meeting/index.js +355 -299
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/util.js +8 -2
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.js +2 -1
- package/dist/meeting/voicea-meeting.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +10 -3
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +72 -31
- package/dist/meetings/index.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +32 -4
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +11 -1
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/types/annotation/index.d.ts +19 -0
- package/dist/types/common/errors/webex-errors.d.ts +6 -2
- package/dist/types/config.d.ts +1 -0
- package/dist/types/constants.d.ts +2 -1
- package/dist/types/hashTree/hashTreeParser.d.ts +12 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/locus-info/index.d.ts +45 -1
- package/dist/types/locus-info/types.d.ts +1 -0
- package/dist/types/media/MediaConnectionAwaiter.d.ts +61 -53
- package/dist/types/meeting/index.d.ts +49 -12
- package/dist/types/meeting/util.d.ts +3 -1
- package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
- package/dist/types/meetings/index.d.ts +2 -1
- package/dist/types/multistream/remoteMediaManager.d.ts +18 -0
- package/dist/types/multistream/sendSlotManager.d.ts +5 -1
- package/dist/webinar/index.js +298 -255
- package/dist/webinar/index.js.map +1 -1
- package/package.json +25 -23
- package/src/aiEnableRequest/ai-docs/ai-enable-request-spec.md +223 -0
- package/src/annotation/ai-docs/annotation-spec.md +236 -0
- package/src/annotation/index.ts +61 -29
- package/src/breakouts/ai-docs/breakouts-spec.md +324 -0
- package/src/breakouts/index.ts +35 -2
- package/src/common/errors/webex-errors.ts +8 -2
- package/src/config.ts +5 -1
- package/src/constants.ts +2 -1
- package/src/controls-options-manager/ai-docs/controls-options-manager-spec.md +243 -0
- package/src/hashTree/ai-docs/hash-tree-spec.md +267 -0
- package/src/hashTree/hashTreeParser.ts +67 -3
- package/src/index.ts +1 -0
- package/src/interceptors/ai-docs/interceptors-spec.md +247 -0
- package/src/interceptors/dataChannelAuthToken.ts +48 -77
- package/src/interceptors/locusRetry.ts +1 -1
- package/src/interpretation/ai-docs/interpretation-spec.md +256 -0
- package/src/interpretation/index.ts +38 -1
- package/src/locus-info/ai-docs/locus-info-spec.md +293 -0
- package/src/locus-info/index.ts +156 -35
- package/src/locus-info/types.ts +1 -0
- package/src/media/MediaConnectionAwaiter.ts +223 -207
- package/src/media/ai-docs/media-spec.md +267 -0
- package/src/meeting/ai-docs/meeting-spec.md +404 -0
- package/src/meeting/index.ts +332 -296
- package/src/meeting/util.ts +7 -4
- package/src/meeting/voicea-meeting.ts +1 -1
- package/src/meeting-info/ai-docs/meeting-info-spec.md +261 -0
- package/src/meeting-info/meeting-info-v2.ts +7 -2
- package/src/meetings/ai-docs/meetings-spec.md +296 -0
- package/src/meetings/index.ts +59 -23
- package/src/member/ai-docs/member-spec.md +196 -0
- package/src/members/ai-docs/members-spec.md +256 -0
- package/src/metrics/ai-docs/metrics-spec.md +185 -0
- package/src/multistream/ai-docs/multistream-spec.md +295 -0
- package/src/multistream/remoteMediaManager.ts +23 -1
- package/src/multistream/sendSlotManager.ts +15 -1
- package/src/personal-meeting-room/ai-docs/personal-meeting-room-spec.md +234 -0
- package/src/reachability/ai-docs/reachability-spec.md +261 -0
- package/src/reactions/ai-docs/reactions-spec.md +198 -0
- package/src/reconnection-manager/ai-docs/reconnection-manager-spec.md +272 -0
- package/src/recording-controller/ai-docs/recording-controller-spec.md +223 -0
- package/src/roap/ai-docs/roap-spec.md +241 -0
- package/src/webinar/ai-docs/webinar-spec.md +243 -0
- package/src/webinar/index.ts +168 -188
- package/test/unit/spec/annotation/index.ts +214 -182
- package/test/unit/spec/breakouts/index.ts +145 -13
- package/test/unit/spec/hashTree/hashTreeParser.ts +212 -1
- package/test/unit/spec/interceptors/dataChannelAuthToken.ts +81 -99
- package/test/unit/spec/interceptors/locusRetry.ts +29 -1
- package/test/unit/spec/interpretation/index.ts +93 -0
- package/test/unit/spec/locus-info/index.js +397 -0
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +426 -19
- package/test/unit/spec/media/properties.ts +3 -3
- package/test/unit/spec/meeting/index.js +1219 -723
- package/test/unit/spec/meeting/utils.js +52 -18
- package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
- package/test/unit/spec/meeting-info/meetinginfov2.js +69 -1
- package/test/unit/spec/meetings/index.js +145 -43
- package/test/unit/spec/multistream/remoteMediaManager.ts +46 -0
- package/test/unit/spec/multistream/sendSlotManager.ts +30 -2
- package/test/unit/spec/webinar/index.ts +886 -718
package/src/locus-info/index.ts
CHANGED
|
@@ -320,6 +320,15 @@ export default class LocusInfo extends EventsScope {
|
|
|
320
320
|
this.hashTreeObjectId2ParticipantId = new Map();
|
|
321
321
|
}
|
|
322
322
|
|
|
323
|
+
/**
|
|
324
|
+
* Whether this meeting uses hash tree based Locus (as opposed to a classic, delta based Locus).
|
|
325
|
+
*
|
|
326
|
+
* @returns {boolean}
|
|
327
|
+
*/
|
|
328
|
+
isUsingHashTrees(): boolean {
|
|
329
|
+
return this.hashTreeParsers.size > 0;
|
|
330
|
+
}
|
|
331
|
+
|
|
323
332
|
/**
|
|
324
333
|
* 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.
|
|
325
334
|
* WARNING: This function must not be used for hash tree based Locus meetings.
|
|
@@ -327,12 +336,26 @@ export default class LocusInfo extends EventsScope {
|
|
|
327
336
|
* @param {Meeting} meeting
|
|
328
337
|
* @param {boolean} isLocusUrlChanged
|
|
329
338
|
* @param {Locus} locus
|
|
330
|
-
* @
|
|
339
|
+
* @param {Object} [options]
|
|
340
|
+
* @param {boolean} [options.destroyOnTransientFailure=true] controls what happens on a *transient*
|
|
341
|
+
* sync failure (a terminal failure, e.g. a 403 meaning the meeting has ended, always destroys
|
|
342
|
+
* the meeting regardless of this flag). When true, a transient failure destroys the meeting and
|
|
343
|
+
* the returned promise still resolves. When false, the meeting is preserved and the returned
|
|
344
|
+
* promise rejects so the caller can retry.
|
|
345
|
+
* @returns {Promise} resolves once the fetched DTO has been applied; see destroyOnTransientFailure
|
|
346
|
+
* for the failure behavior
|
|
331
347
|
*/
|
|
332
|
-
private doLocusSync(
|
|
348
|
+
private doLocusSync(
|
|
349
|
+
meeting: any,
|
|
350
|
+
isLocusUrlChanged: boolean,
|
|
351
|
+
locus: any,
|
|
352
|
+
{destroyOnTransientFailure = true}: {destroyOnTransientFailure?: boolean} = {}
|
|
353
|
+
) {
|
|
333
354
|
let url;
|
|
334
355
|
let isDelta = false;
|
|
335
356
|
let meetingDestroyed = false;
|
|
357
|
+
// whether the DTO fetch itself failed (as opposed to applying a successfully fetched DTO)
|
|
358
|
+
let fetchFailed = false;
|
|
336
359
|
|
|
337
360
|
if (isLocusUrlChanged) {
|
|
338
361
|
// for the locus url changed case from breakout to main session, we should always do a full sync, in this case, the url from locus is always on main session,
|
|
@@ -353,8 +376,30 @@ export default class LocusInfo extends EventsScope {
|
|
|
353
376
|
} DTO)`
|
|
354
377
|
);
|
|
355
378
|
|
|
356
|
-
//
|
|
357
|
-
meeting
|
|
379
|
+
// Called once the DTO fetch (delta plus any full-sync fallback) has failed and we're giving up.
|
|
380
|
+
// The meeting is destroyed when either the delta-processing path asked for it, or the failure is
|
|
381
|
+
// terminal (e.g. a 403 meaning the meeting has ended) - in both cases there's nothing left to
|
|
382
|
+
// sync or retry, so the trailing catch below swallows the rejection whenever meetingDestroyed is
|
|
383
|
+
// set. On the caller-driven reconnection path a non-terminal failure preserves the meeting and
|
|
384
|
+
// lets the rejection propagate so the caller can retry.
|
|
385
|
+
const onFetchFailure = (error: any, logMessage: string, {terminal = false} = {}) => {
|
|
386
|
+
// terminal failures always destroy the meeting; destroyOnTransientFailure only controls the
|
|
387
|
+
// non-terminal case
|
|
388
|
+
const destroyMeeting = terminal || destroyOnTransientFailure;
|
|
389
|
+
LoggerProxy.logger.info(
|
|
390
|
+
`Locus-info:index#doLocusSync --> ${logMessage}${
|
|
391
|
+
destroyMeeting ? ', destroying the meeting' : ''
|
|
392
|
+
}`
|
|
393
|
+
);
|
|
394
|
+
fetchFailed = true;
|
|
395
|
+
if (destroyMeeting) {
|
|
396
|
+
this.webex.meetings.destroy(meeting, MEETING_REMOVED_REASON.LOCUS_DTO_SYNC_FAILED);
|
|
397
|
+
meetingDestroyed = true;
|
|
398
|
+
}
|
|
399
|
+
throw error;
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
return meeting.meetingRequest
|
|
358
403
|
.getLocusDTO({url})
|
|
359
404
|
.catch((e) => {
|
|
360
405
|
if (isDelta) {
|
|
@@ -375,26 +420,21 @@ export default class LocusInfo extends EventsScope {
|
|
|
375
420
|
|
|
376
421
|
// Locus sometimes returns 403, for example if meeting has ended, no point trying the fallback to full sync in that case
|
|
377
422
|
if (e.statusCode !== 403) {
|
|
378
|
-
return meeting.meetingRequest.getLocusDTO({url: meeting.locusUrl}).catch((err) =>
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
)
|
|
382
|
-
|
|
383
|
-
meetingDestroyed = true;
|
|
384
|
-
throw err;
|
|
385
|
-
});
|
|
423
|
+
return meeting.meetingRequest.getLocusDTO({url: meeting.locusUrl}).catch((err) =>
|
|
424
|
+
// A 403 from the fallback full sync is also terminal (meeting has ended), so remove the
|
|
425
|
+
// meeting even on the reconnection path instead of preserving it and rejecting.
|
|
426
|
+
onFetchFailure(err, 'fallback full sync failed', {terminal: err.statusCode === 403})
|
|
427
|
+
);
|
|
386
428
|
}
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
)
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
);
|
|
429
|
+
|
|
430
|
+
// A 403 means the meeting has ended - this is terminal, so remove the meeting even on the
|
|
431
|
+
// reconnection path (there's nothing to retry) instead of preserving it and rejecting.
|
|
432
|
+
return onFetchFailure(e, 'got 403 from Locus, skipping fallback to full sync', {
|
|
433
|
+
terminal: true,
|
|
434
|
+
});
|
|
394
435
|
}
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
throw e;
|
|
436
|
+
|
|
437
|
+
return onFetchFailure(e, 'full sync failed', {terminal: e.statusCode === 403});
|
|
398
438
|
})
|
|
399
439
|
.then((res) => {
|
|
400
440
|
if (isEmpty(res.body)) {
|
|
@@ -425,18 +465,32 @@ export default class LocusInfo extends EventsScope {
|
|
|
425
465
|
meeting.locusInfo.onFullLocus('classic Locus sync', res.body);
|
|
426
466
|
})
|
|
427
467
|
.catch((e) => {
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
468
|
+
if (!fetchFailed) {
|
|
469
|
+
// The DTO was fetched successfully but applying it failed. Retrying wouldn't help - it
|
|
470
|
+
// would re-fetch and re-apply the same unprocessable DTO and fail identically - so log and
|
|
471
|
+
// resume (swallow the error) instead of propagating it. Propagating here would make the
|
|
472
|
+
// reconnection flow (which treats a rejection as retryable) retry indefinitely.
|
|
473
|
+
LoggerProxy.logger.info(
|
|
474
|
+
`Locus-info:index#doLocusSync --> getLocusDTO succeeded but failed to handle result, locus parser will resume but not all data may be synced (${e.toString()})`
|
|
475
|
+
);
|
|
431
476
|
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
477
|
+
Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.LOCUS_SYNC_HANDLING_FAILED, {
|
|
478
|
+
correlationId: meeting.correlationId,
|
|
479
|
+
url,
|
|
480
|
+
reason: e.message,
|
|
481
|
+
errorName: e.name,
|
|
482
|
+
stack: e.stack,
|
|
483
|
+
code: e.code,
|
|
484
|
+
});
|
|
485
|
+
|
|
486
|
+
return;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
if (!destroyOnTransientFailure && !meetingDestroyed) {
|
|
490
|
+
// caller-driven sync (e.g. reconnection): propagate a transient fetch failure so it can be
|
|
491
|
+
// retried. If the meeting was destroyed (terminal failure), there's nothing to retry.
|
|
492
|
+
throw e;
|
|
493
|
+
}
|
|
440
494
|
})
|
|
441
495
|
.finally(() => {
|
|
442
496
|
if (!meetingDestroyed) {
|
|
@@ -447,6 +501,52 @@ export default class LocusInfo extends EventsScope {
|
|
|
447
501
|
});
|
|
448
502
|
}
|
|
449
503
|
|
|
504
|
+
/**
|
|
505
|
+
* Syncs this meeting's Locus state (e.g. after a network reconnection), routing to whichever
|
|
506
|
+
* mechanism the meeting uses (a meeting only ever uses one): hash tree datasets via
|
|
507
|
+
* syncAllHashTreeDatasets() or a standalone Locus DTO fetch for classic meetings.
|
|
508
|
+
* A transient failure preserves the meeting (so the caller can retry); only a terminal failure
|
|
509
|
+
* (e.g. a 403 meaning the meeting has ended) destroys it.
|
|
510
|
+
*
|
|
511
|
+
* The classic path is only needed when Meetings#syncMeetings() can't do its usual
|
|
512
|
+
* getActiveMeetings() fetch (e.g. unverified guests, for whom Locus rejects that call); signed-in
|
|
513
|
+
* users resync classic meetings via getActiveMeetings() and pass canSyncClassicLocus as false.
|
|
514
|
+
*
|
|
515
|
+
* @param {Meeting} meeting
|
|
516
|
+
* @param {Object} options
|
|
517
|
+
* @param {boolean} options.canSyncClassicLocus - whether this sync is allowed to fetch a
|
|
518
|
+
* standalone Locus DTO for classic meetings
|
|
519
|
+
* @param {boolean} options.canSyncHashTree - whether this sync is allowed to sync hash tree
|
|
520
|
+
* datasets for hash tree based meetings
|
|
521
|
+
* @returns {Promise<void>} resolves once the sync (hash tree or classic) completes; for the
|
|
522
|
+
* classic path it rejects only on a transient failure, so the caller can retry (a terminal
|
|
523
|
+
* failure destroys the meeting and resolves)
|
|
524
|
+
*/
|
|
525
|
+
async sync(
|
|
526
|
+
meeting: any,
|
|
527
|
+
{canSyncClassicLocus, canSyncHashTree}: {canSyncClassicLocus: boolean; canSyncHashTree: boolean}
|
|
528
|
+
): Promise<void> {
|
|
529
|
+
if (this.isUsingHashTrees()) {
|
|
530
|
+
// hash tree based meeting: doLocusSync must not be used, sync the hash tree datasets instead
|
|
531
|
+
if (canSyncHashTree) {
|
|
532
|
+
await this.syncAllHashTreeDatasets();
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
return;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
// classic (non hash tree) meeting: only sync if there's a Locus URL to fetch against, otherwise
|
|
539
|
+
// getLocusDTO() would reject and doLocusSync() would destroy the (e.g. not-yet-joined) meeting
|
|
540
|
+
if (canSyncClassicLocus && meeting.locusUrl) {
|
|
541
|
+
// Pause the parser so in-flight deltas don't race the DTO fetch; doLocusSync() resumes it.
|
|
542
|
+
this.locusParser.pause();
|
|
543
|
+
// destroyOnTransientFailure: false so a transient failure preserves the meeting and rejects,
|
|
544
|
+
// letting the reconnection flow retry instead of tearing the meeting down. A terminal failure
|
|
545
|
+
// (e.g. a 403 meaning the meeting has ended) still destroys the meeting.
|
|
546
|
+
await this.doLocusSync(meeting, false, undefined, {destroyOnTransientFailure: false});
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
|
|
450
550
|
/**
|
|
451
551
|
* Apply locus delta data to meeting
|
|
452
552
|
* @param {string} action Locus delta action
|
|
@@ -538,6 +638,15 @@ export default class LocusInfo extends EventsScope {
|
|
|
538
638
|
this.updateLinks(locus.links);
|
|
539
639
|
}
|
|
540
640
|
|
|
641
|
+
/**
|
|
642
|
+
* Whether we expect to receive updates over the LLM connection. This is used by hash tree parsers
|
|
643
|
+
* to decide whether to arm heartbeat watchdog timers for LLM data sets.
|
|
644
|
+
* @returns {boolean}
|
|
645
|
+
*/
|
|
646
|
+
private isLlmExpected(): boolean {
|
|
647
|
+
return this.parsedLocus.self?.joinedWith?.state === 'JOINED';
|
|
648
|
+
}
|
|
649
|
+
|
|
541
650
|
/**
|
|
542
651
|
* Creates a HashTreeParser instance for a given locusUrl and stores it in the map.
|
|
543
652
|
* @param {Object} params
|
|
@@ -568,6 +677,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
568
677
|
callbacks: {
|
|
569
678
|
locusInfoUpdateCallback: this.updateFromHashTree.bind(this, locusUrl),
|
|
570
679
|
syncLatencyTracker: this.callbacks.syncLatencyTracker,
|
|
680
|
+
isLlmExpected: () => this.isLlmExpected(),
|
|
571
681
|
// Reuse webex-core's tracking-id interceptor sequence (exposed publicly via
|
|
572
682
|
// webexTrackingIdSequenceNumbers) so Locus requests share the client's unified
|
|
573
683
|
// ${sessionId}_${sequence} tracking id space instead of minting an unrelated id. Fall
|
|
@@ -759,7 +869,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
759
869
|
? (responseBody as {locus: LocusDTO}).locus
|
|
760
870
|
: (responseBody as LocusDTO);
|
|
761
871
|
|
|
762
|
-
if (this.
|
|
872
|
+
if (this.isUsingHashTrees()) {
|
|
763
873
|
// We are in hash tree mode. Check if we need to create/reactivate a parser for this locusUrl.
|
|
764
874
|
if (!hashTreeParserEntry || hashTreeParserEntry.parser.state === 'stopped') {
|
|
765
875
|
if (!locusUrl) {
|
|
@@ -1404,7 +1514,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
1404
1514
|
* @memberof LocusInfo
|
|
1405
1515
|
*/
|
|
1406
1516
|
parse(meeting: any, data: any) {
|
|
1407
|
-
if (this.
|
|
1517
|
+
if (this.isUsingHashTrees()) {
|
|
1408
1518
|
if (data.eventType === LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS) {
|
|
1409
1519
|
// sync meetings response follows the format of "not wrapped" locus API responses,
|
|
1410
1520
|
// so has no dataSets nor Metadata
|
|
@@ -2713,6 +2823,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
2713
2823
|
*/
|
|
2714
2824
|
updateSelf(self: any) {
|
|
2715
2825
|
if (self) {
|
|
2826
|
+
const wasLlmExpected = this.isLlmExpected();
|
|
2716
2827
|
// @ts-ignore
|
|
2717
2828
|
const parsedSelves = SelfUtils.getSelves(
|
|
2718
2829
|
this.parsedLocus.self,
|
|
@@ -2866,6 +2977,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
2866
2977
|
{
|
|
2867
2978
|
muted: parsedSelves.current.remoteMuted,
|
|
2868
2979
|
unmuteAllowed: parsedSelves.current.unmuteAllowed,
|
|
2980
|
+
modifiedBy: parsedSelves.current.modifiedBy ?? null,
|
|
2869
2981
|
}
|
|
2870
2982
|
);
|
|
2871
2983
|
}
|
|
@@ -2991,6 +3103,15 @@ export default class LocusInfo extends EventsScope {
|
|
|
2991
3103
|
this.parsedLocus.self = parsedSelves.current;
|
|
2992
3104
|
// @ts-ignore
|
|
2993
3105
|
this.self = self;
|
|
3106
|
+
|
|
3107
|
+
// If LLM just became expected (self reported JOINED), some hash tree parsers may have skipped
|
|
3108
|
+
// arming heartbeat watchdog timers for LLM data sets whose messages arrived before this
|
|
3109
|
+
// update. Re-evaluate them now so those watchdogs get armed.
|
|
3110
|
+
if (!wasLlmExpected && this.isLlmExpected()) {
|
|
3111
|
+
this.hashTreeParsers.forEach((entry) => {
|
|
3112
|
+
entry.parser.reevaluateLlmWatchdogs();
|
|
3113
|
+
});
|
|
3114
|
+
}
|
|
2994
3115
|
} else {
|
|
2995
3116
|
this.compareAndUpdateFlags.compareHostAndSelf = false;
|
|
2996
3117
|
}
|