@webex/plugin-meetings 3.12.0-llmrefactor.7 → 3.12.0-llmrefactor.8
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 +64 -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 +25 -4
- package/dist/locus-info/index.js.map +1 -1
- package/dist/types/hashTree/hashTreeParser.d.ts +11 -0
- package/dist/types/locus-info/index.d.ts +6 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +4 -4
- package/src/hashTree/hashTreeParser.ts +50 -0
- package/src/locus-info/index.ts +20 -1
- package/test/unit/spec/hashTree/hashTreeParser.ts +148 -0
- package/test/unit/spec/locus-info/index.js +47 -0
|
@@ -191,7 +191,7 @@ var AIEnableRequest = _webexCore.WebexPlugin.extend({
|
|
|
191
191
|
method: _constants.HTTP_VERBS.PUT
|
|
192
192
|
});
|
|
193
193
|
},
|
|
194
|
-
version: "3.12.0-llmrefactor.
|
|
194
|
+
version: "3.12.0-llmrefactor.8"
|
|
195
195
|
});
|
|
196
196
|
var _default = exports.default = AIEnableRequest;
|
|
197
197
|
//# sourceMappingURL=index.js.map
|
|
@@ -214,7 +214,7 @@ var Breakout = _webexCore.WebexPlugin.extend({
|
|
|
214
214
|
sessionId: this.sessionId
|
|
215
215
|
});
|
|
216
216
|
},
|
|
217
|
-
version: "3.12.0-llmrefactor.
|
|
217
|
+
version: "3.12.0-llmrefactor.8"
|
|
218
218
|
});
|
|
219
219
|
var _default = exports.default = Breakout;
|
|
220
220
|
//# sourceMappingURL=breakout.js.map
|
package/dist/breakouts/index.js
CHANGED
|
@@ -1230,7 +1230,7 @@ var Breakouts = _webexCore.WebexPlugin.extend({
|
|
|
1230
1230
|
this.trigger(_constants.BREAKOUTS.EVENTS.ASK_RETURN_TO_MAIN);
|
|
1231
1231
|
}
|
|
1232
1232
|
},
|
|
1233
|
-
version: "3.12.0-llmrefactor.
|
|
1233
|
+
version: "3.12.0-llmrefactor.8"
|
|
1234
1234
|
});
|
|
1235
1235
|
var _default = exports.default = Breakouts;
|
|
1236
1236
|
//# sourceMappingURL=index.js.map
|
|
@@ -126,6 +126,9 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
126
126
|
(0, _defineProperty2.default)(this, "syncQueueProcessingPromise", _promise.default.resolve());
|
|
127
127
|
// top-level heartbeat interval from the most recent message, used as fallback when dataset-level value is missing
|
|
128
128
|
(0, _defineProperty2.default)(this, "topLevelHeartbeatIntervalMs", void 0);
|
|
129
|
+
// LLM data sets that were received while LLM was not expected, so their heartbeat watchdog was
|
|
130
|
+
// skipped; reevaluateLlmWatchdogs() arms these once LLM becomes expected and then clears this set
|
|
131
|
+
(0, _defineProperty2.default)(this, "pendingLlmWatchdogDataSetNames", new _set.default());
|
|
129
132
|
var _options$initialLocus = options.initialLocus,
|
|
130
133
|
dataSets = _options$initialLocus.dataSets,
|
|
131
134
|
locus = _options$initialLocus.locus; // extract dataSets from initialLocus
|
|
@@ -2020,6 +2023,8 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
2020
2023
|
if (_constants3.LLM_DATASET_NAMES.includes(dataSet.name) && _this11.callbacks.isLlmExpected && !_this11.callbacks.isLlmExpected()) {
|
|
2021
2024
|
_loggerProxy.default.logger.info("HashTreeParser#resetHeartbeatWatchdogs --> ".concat(_this11.debugId, " skipping heartbeat watchdog timer for data set \"").concat(dataSet.name, "\" because LLM is disconnected"));
|
|
2022
2025
|
|
|
2026
|
+
// remember it so reevaluateLlmWatchdogs() can arm the watchdog once LLM becomes expected
|
|
2027
|
+
_this11.pendingLlmWatchdogDataSetNames.add(dataSet.name);
|
|
2023
2028
|
// eslint-disable-next-line no-continue
|
|
2024
2029
|
return 0; // continue
|
|
2025
2030
|
}
|
|
@@ -2049,6 +2054,45 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
2049
2054
|
}
|
|
2050
2055
|
}
|
|
2051
2056
|
|
|
2057
|
+
/**
|
|
2058
|
+
* Re-evaluates heartbeat watchdog timers for LLM data sets. While LLM is not expected,
|
|
2059
|
+
* resetHeartbeatWatchdogs skips setting watchdog timers for LLM data sets and records them in
|
|
2060
|
+
* pendingLlmWatchdogDataSetNames. This must be called when LLM transitions to expected (e.g. self
|
|
2061
|
+
* reports JOINED) to arm the watchdogs for those pending data sets (avoids a timing issue where
|
|
2062
|
+
* the "main"/"atd-active"/"atd-unmuted" data set arrives before the self update). The pending set
|
|
2063
|
+
* is consumed and cleared here.
|
|
2064
|
+
* @returns {void}
|
|
2065
|
+
*/
|
|
2066
|
+
}, {
|
|
2067
|
+
key: "reevaluateLlmWatchdogs",
|
|
2068
|
+
value: function reevaluateLlmWatchdogs() {
|
|
2069
|
+
var _this12 = this;
|
|
2070
|
+
if (this.state === 'stopped') {
|
|
2071
|
+
return;
|
|
2072
|
+
}
|
|
2073
|
+
if (this.pendingLlmWatchdogDataSetNames.size === 0) {
|
|
2074
|
+
return;
|
|
2075
|
+
}
|
|
2076
|
+
|
|
2077
|
+
// consume the pending set - these LLM data sets were received while LLM was not expected
|
|
2078
|
+
var pendingDataSetNames = (0, _toConsumableArray2.default)(this.pendingLlmWatchdogDataSetNames);
|
|
2079
|
+
this.pendingLlmWatchdogDataSetNames.clear();
|
|
2080
|
+
var dataSetsNeedingWatchdog = pendingDataSetNames.map(function (name) {
|
|
2081
|
+
return _this12.dataSets[name];
|
|
2082
|
+
}).filter(function (dataSet) {
|
|
2083
|
+
if (!(dataSet !== null && dataSet !== void 0 && dataSet.hashTree) || dataSet.heartbeatWatchdogTimer) {
|
|
2084
|
+
return false;
|
|
2085
|
+
}
|
|
2086
|
+
return _this12.isVisibleDataSet(dataSet.name);
|
|
2087
|
+
});
|
|
2088
|
+
if (dataSetsNeedingWatchdog.length > 0) {
|
|
2089
|
+
_loggerProxy.default.logger.info("HashTreeParser#reevaluateLlmWatchdogs --> ".concat(this.debugId, " LLM became expected, setting heartbeat watchdog timers for data sets: ").concat(dataSetsNeedingWatchdog.map(function (ds) {
|
|
2090
|
+
return ds.name;
|
|
2091
|
+
}).join(', ')));
|
|
2092
|
+
this.resetHeartbeatWatchdogs(dataSetsNeedingWatchdog);
|
|
2093
|
+
}
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2052
2096
|
/**
|
|
2053
2097
|
* Stops all timers for the data sets to prevent any further sync attempts.
|
|
2054
2098
|
* @returns {void}
|
|
@@ -2083,6 +2127,7 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
2083
2127
|
this.topLevelHeartbeatIntervalMs = undefined;
|
|
2084
2128
|
this.syncAllBackoffType = SyncAllBackoffType.NONE;
|
|
2085
2129
|
this.dataSetsSyncedDuringBackoff = new _set.default();
|
|
2130
|
+
this.pendingLlmWatchdogDataSetNames = new _set.default();
|
|
2086
2131
|
(0, _values.default)(this.dataSets).forEach(function (dataSet) {
|
|
2087
2132
|
var _dataSet$syncAbortCon2;
|
|
2088
2133
|
(_dataSet$syncAbortCon2 = dataSet.syncAbortController) === null || _dataSet$syncAbortCon2 === void 0 ? void 0 : _dataSet$syncAbortCon2.abort();
|
|
@@ -2208,7 +2253,7 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
2208
2253
|
}, {
|
|
2209
2254
|
key: "getHashesFromLocus",
|
|
2210
2255
|
value: function getHashesFromLocus(dataSetName, currentRootHash, trackingIds) {
|
|
2211
|
-
var
|
|
2256
|
+
var _this13 = this;
|
|
2212
2257
|
var _ref9 = trackingIds !== null && trackingIds !== void 0 ? trackingIds : {},
|
|
2213
2258
|
requestTrackingId = _ref9.requestTrackingId,
|
|
2214
2259
|
metricTrackingId = _ref9.metricTrackingId;
|
|
@@ -2238,12 +2283,12 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
2238
2283
|
}
|
|
2239
2284
|
} : {})).then(function (response) {
|
|
2240
2285
|
var _response$body, _response$body2;
|
|
2241
|
-
if (
|
|
2242
|
-
var
|
|
2243
|
-
(
|
|
2286
|
+
if (_this13.shouldCollectSyncMetrics(dataSetName)) {
|
|
2287
|
+
var _this13$callbacks$syn;
|
|
2288
|
+
(_this13$callbacks$syn = _this13.callbacks.syncLatencyTracker) === null || _this13$callbacks$syn === void 0 ? void 0 : _this13$callbacks$syn.saveTimestamp({
|
|
2244
2289
|
key: 'internal.client.locus.hashtree.response',
|
|
2245
2290
|
options: {
|
|
2246
|
-
meetingId:
|
|
2291
|
+
meetingId: _this13.syncLatencyMeetingId,
|
|
2247
2292
|
dataSetName: dataSetName,
|
|
2248
2293
|
trackingId: metricTrackingId
|
|
2249
2294
|
}
|
|
@@ -2251,25 +2296,25 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
2251
2296
|
}
|
|
2252
2297
|
if (!response.body || (0, _lodash.isEmpty)(response.body)) {
|
|
2253
2298
|
// 204 with empty body means our hashes match Locus, no sync needed
|
|
2254
|
-
_loggerProxy.default.logger.info("HashTreeParser#getHashesFromLocus --> ".concat(
|
|
2299
|
+
_loggerProxy.default.logger.info("HashTreeParser#getHashesFromLocus --> ".concat(_this13.debugId, " Got ").concat(response.statusCode, " with empty body for data set \"").concat(dataSetName, "\", hashes match - no sync needed"));
|
|
2255
2300
|
return null;
|
|
2256
2301
|
}
|
|
2257
2302
|
var hashes = (_response$body = response.body) === null || _response$body === void 0 ? void 0 : _response$body.hashes;
|
|
2258
2303
|
var dataSetFromResponse = (_response$body2 = response.body) === null || _response$body2 === void 0 ? void 0 : _response$body2.dataSet;
|
|
2259
2304
|
if (!hashes || !(0, _isArray.default)(hashes)) {
|
|
2260
|
-
_loggerProxy.default.logger.warn("HashTreeParser#getHashesFromLocus --> ".concat(
|
|
2305
|
+
_loggerProxy.default.logger.warn("HashTreeParser#getHashesFromLocus --> ".concat(_this13.debugId, " Locus returned invalid hashes, response body="), response.body);
|
|
2261
2306
|
throw new Error("Locus returned invalid hashes: ".concat(hashes));
|
|
2262
2307
|
}
|
|
2263
|
-
_loggerProxy.default.logger.info("HashTreeParser#getHashesFromLocus --> ".concat(
|
|
2308
|
+
_loggerProxy.default.logger.info("HashTreeParser#getHashesFromLocus --> ".concat(_this13.debugId, " Received hashes for data set \"").concat(dataSetName, "\": ").concat((0, _stringify.default)(hashes)));
|
|
2264
2309
|
return {
|
|
2265
2310
|
hashes: hashes,
|
|
2266
2311
|
dataSet: dataSetFromResponse
|
|
2267
2312
|
};
|
|
2268
2313
|
}).catch(function (error) {
|
|
2269
|
-
_loggerProxy.default.logger.error("HashTreeParser#getHashesFromLocus --> ".concat(
|
|
2270
|
-
|
|
2314
|
+
_loggerProxy.default.logger.error("HashTreeParser#getHashesFromLocus --> ".concat(_this13.debugId, " Error ").concat(error.statusCode, " fetching hashes for data set \"").concat(dataSetName, "\":"), error);
|
|
2315
|
+
_this13.checkForSentinelHttpResponse(error, dataSet.name);
|
|
2271
2316
|
_metrics.default.sendBehavioralMetric(_constants.default.HASH_TREE_SYNC_FAILURE, {
|
|
2272
|
-
debugId:
|
|
2317
|
+
debugId: _this13.debugId,
|
|
2273
2318
|
dataSetName: dataSetName,
|
|
2274
2319
|
request: 'GET /hashtree',
|
|
2275
2320
|
statusCode: error.statusCode,
|
|
@@ -2290,7 +2335,7 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
2290
2335
|
}, {
|
|
2291
2336
|
key: "sendSyncRequestToLocus",
|
|
2292
2337
|
value: function sendSyncRequestToLocus(dataSet, options, trackingId) {
|
|
2293
|
-
var
|
|
2338
|
+
var _this14 = this;
|
|
2294
2339
|
_loggerProxy.default.logger.info("HashTreeParser#sendSyncRequestToLocus --> ".concat(this.debugId, " Sending sync request for data set \"").concat(dataSet.name, "\""));
|
|
2295
2340
|
var isInitialization = 'isInitialization' in options;
|
|
2296
2341
|
var url = "".concat(dataSet.url, "/sync");
|
|
@@ -2341,26 +2386,26 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
2341
2386
|
body: body
|
|
2342
2387
|
})).then(function (resp) {
|
|
2343
2388
|
if (shouldCollectMetrics) {
|
|
2344
|
-
var
|
|
2345
|
-
(
|
|
2389
|
+
var _this14$callbacks$syn;
|
|
2390
|
+
(_this14$callbacks$syn = _this14.callbacks.syncLatencyTracker) === null || _this14$callbacks$syn === void 0 ? void 0 : _this14$callbacks$syn.saveTimestamp({
|
|
2346
2391
|
key: 'internal.client.locus.sync.response',
|
|
2347
2392
|
options: {
|
|
2348
|
-
meetingId:
|
|
2393
|
+
meetingId: _this14.syncLatencyMeetingId,
|
|
2349
2394
|
dataSetName: dataSet.name,
|
|
2350
2395
|
trackingId: trackingId
|
|
2351
2396
|
}
|
|
2352
2397
|
});
|
|
2353
2398
|
}
|
|
2354
2399
|
if (!resp.body || (0, _lodash.isEmpty)(resp.body)) {
|
|
2355
|
-
_loggerProxy.default.logger.info("HashTreeParser#sendSyncRequestToLocus --> ".concat(
|
|
2400
|
+
_loggerProxy.default.logger.info("HashTreeParser#sendSyncRequestToLocus --> ".concat(_this14.debugId, " Got ").concat(resp.statusCode, " with empty body for sync request for data set \"").concat(dataSet.name, "\", data should arrive via messages"));
|
|
2356
2401
|
return null;
|
|
2357
2402
|
}
|
|
2358
2403
|
return resp.body;
|
|
2359
2404
|
}).catch(function (error) {
|
|
2360
|
-
_loggerProxy.default.logger.error("HashTreeParser#sendSyncRequestToLocus --> ".concat(
|
|
2361
|
-
|
|
2405
|
+
_loggerProxy.default.logger.error("HashTreeParser#sendSyncRequestToLocus --> ".concat(_this14.debugId, " Error ").concat(error.statusCode, " sending sync request for data set \"").concat(dataSet.name, "\":"), error);
|
|
2406
|
+
_this14.checkForSentinelHttpResponse(error, dataSet.name);
|
|
2362
2407
|
_metrics.default.sendBehavioralMetric(_constants.default.HASH_TREE_SYNC_FAILURE, {
|
|
2363
|
-
debugId:
|
|
2408
|
+
debugId: _this14.debugId,
|
|
2364
2409
|
dataSetName: dataSet.name,
|
|
2365
2410
|
request: 'POST /sync',
|
|
2366
2411
|
statusCode: error.statusCode,
|