@webex/plugin-meetings 3.12.0 → 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.
Files changed (320) hide show
  1. package/.sdd/manifest.json +1312 -0
  2. package/.sdd/templates/.source.json +30 -0
  3. package/.sdd/templates/component-repo/module-docs/module-spec-quality.md +111 -0
  4. package/.sdd/templates/component-repo/module-docs/module-spec.template.md +321 -0
  5. package/.sdd/templates/component-repo/reference-docs/adr/_adr-example.md +59 -0
  6. package/.sdd/templates/component-repo/reference-docs/patterns/_pattern-example.md +49 -0
  7. package/.sdd/templates/component-repo/reference-docs/rules/_rule-example.md +42 -0
  8. package/.sdd/templates/component-repo/standing-docs/AGENTS.template.md +120 -0
  9. package/.sdd/templates/component-repo/standing-docs/ARCHITECTURE.template.md +206 -0
  10. package/.sdd/templates/component-repo/standing-docs/CONTRACTS.template.md +90 -0
  11. package/.sdd/templates/component-repo/standing-docs/DATA_MODEL.template.md +68 -0
  12. package/.sdd/templates/component-repo/standing-docs/GETTING_STARTED.template.md +111 -0
  13. package/.sdd/templates/component-repo/standing-docs/GLOSSARY.template.md +57 -0
  14. package/.sdd/templates/component-repo/standing-docs/REVIEW_CHECKLIST.template.md +69 -0
  15. package/.sdd/templates/component-repo/standing-docs/RULES.template.md +96 -0
  16. package/.sdd/templates/component-repo/standing-docs/SECURITY.template.md +84 -0
  17. package/.sdd/templates/component-repo/standing-docs/SERVICE_STATE.template.md +82 -0
  18. package/.sdd/templates/component-repo/standing-docs/SPEC_INDEX.template.md +94 -0
  19. package/.sdd/templates/component-repo/standing-docs/TEST_INDEX.template.md +64 -0
  20. package/.sdd/templates/component-repo/template-map.json +112 -0
  21. package/AGENTS.md +135 -0
  22. package/ai-docs/ARCHITECTURE.md +208 -0
  23. package/ai-docs/CONTRACTS.md +267 -0
  24. package/ai-docs/DATA_MODEL.md +64 -0
  25. package/ai-docs/GETTING_STARTED.md +73 -0
  26. package/ai-docs/GLOSSARY.md +56 -0
  27. package/ai-docs/REVIEW_CHECKLIST.md +45 -0
  28. package/ai-docs/RULES.md +79 -0
  29. package/ai-docs/SECURITY.md +74 -0
  30. package/ai-docs/SERVICE_STATE.md +59 -0
  31. package/ai-docs/SPEC_INDEX.md +85 -0
  32. package/ai-docs/TEST_INDEX.md +45 -0
  33. package/ai-docs/adr/0001-migrate-existing-docs-into-sdd.md +61 -0
  34. package/ai-docs/patterns/defensive-error-propagation.md +55 -0
  35. package/ai-docs/patterns/event-scope-emission.md +46 -0
  36. package/ai-docs/patterns/source-to-test-path-mirroring.md +45 -0
  37. package/ai-docs/patterns/stateless-plugin-request-classes.md +53 -0
  38. package/ai-docs/patterns/typed-constants-and-enum-values.md +47 -0
  39. package/assets/README.md +28 -0
  40. package/assets/e2ee-0.0.1.js +2 -0
  41. package/assets/e2ee-0.0.1.wasm +0 -0
  42. package/dist/aiEnableRequest/index.js +15 -2
  43. package/dist/aiEnableRequest/index.js.map +1 -1
  44. package/dist/annotation/index.js +55 -19
  45. package/dist/annotation/index.js.map +1 -1
  46. package/dist/assets/e2ee-0.0.1.js +2 -0
  47. package/dist/assets/e2ee-0.0.1.wasm +0 -0
  48. package/dist/breakouts/breakout.js +8 -3
  49. package/dist/breakouts/breakout.js.map +1 -1
  50. package/dist/breakouts/events.js +29 -14
  51. package/dist/breakouts/events.js.map +1 -1
  52. package/dist/breakouts/index.js +128 -7
  53. package/dist/breakouts/index.js.map +1 -1
  54. package/dist/common/errors/webex-errors.js +54 -5
  55. package/dist/common/errors/webex-errors.js.map +1 -1
  56. package/dist/config.js +4 -2
  57. package/dist/config.js.map +1 -1
  58. package/dist/constants.js +39 -11
  59. package/dist/constants.js.map +1 -1
  60. package/dist/controls-options-manager/constants.js +11 -1
  61. package/dist/controls-options-manager/constants.js.map +1 -1
  62. package/dist/controls-options-manager/index.js +67 -29
  63. package/dist/controls-options-manager/index.js.map +1 -1
  64. package/dist/controls-options-manager/util.js +91 -0
  65. package/dist/controls-options-manager/util.js.map +1 -1
  66. package/dist/hashTree/constants.js +13 -1
  67. package/dist/hashTree/constants.js.map +1 -1
  68. package/dist/hashTree/hashTreeParser.js +1245 -404
  69. package/dist/hashTree/hashTreeParser.js.map +1 -1
  70. package/dist/hashTree/utils.js +42 -0
  71. package/dist/hashTree/utils.js.map +1 -1
  72. package/dist/index.js +8 -0
  73. package/dist/index.js.map +1 -1
  74. package/dist/interceptors/dataChannelAuthToken.js +58 -16
  75. package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
  76. package/dist/interceptors/locusRetry.js +24 -9
  77. package/dist/interceptors/locusRetry.js.map +1 -1
  78. package/dist/interpretation/index.js +55 -12
  79. package/dist/interpretation/index.js.map +1 -1
  80. package/dist/interpretation/interpretation.types.js +7 -0
  81. package/dist/interpretation/interpretation.types.js.map +1 -0
  82. package/dist/interpretation/siLanguage.js +1 -1
  83. package/dist/locus-info/controlsUtils.js +4 -1
  84. package/dist/locus-info/controlsUtils.js.map +1 -1
  85. package/dist/locus-info/index.js +914 -196
  86. package/dist/locus-info/index.js.map +1 -1
  87. package/dist/locus-info/infoUtils.js +36 -5
  88. package/dist/locus-info/infoUtils.js.map +1 -1
  89. package/dist/locus-info/types.js +20 -0
  90. package/dist/locus-info/types.js.map +1 -1
  91. package/dist/media/MediaConnectionAwaiter.js +229 -166
  92. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  93. package/dist/media/index.js +8 -2
  94. package/dist/media/index.js.map +1 -1
  95. package/dist/media/properties.js +4 -5
  96. package/dist/media/properties.js.map +1 -1
  97. package/dist/meeting/in-meeting-actions.js +5 -1
  98. package/dist/meeting/in-meeting-actions.js.map +1 -1
  99. package/dist/meeting/index.js +1931 -887
  100. package/dist/meeting/index.js.map +1 -1
  101. package/dist/meeting/locusMediaRequest.js +229 -82
  102. package/dist/meeting/locusMediaRequest.js.map +1 -1
  103. package/dist/meeting/muteState.js +10 -1
  104. package/dist/meeting/muteState.js.map +1 -1
  105. package/dist/meeting/request.js +5 -2
  106. package/dist/meeting/request.js.map +1 -1
  107. package/dist/meeting/util.js +42 -3
  108. package/dist/meeting/util.js.map +1 -1
  109. package/dist/meeting/voicea-meeting.js +2 -1
  110. package/dist/meeting/voicea-meeting.js.map +1 -1
  111. package/dist/meeting-info/meeting-info-v2.js +12 -5
  112. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  113. package/dist/meetings/index.js +322 -129
  114. package/dist/meetings/index.js.map +1 -1
  115. package/dist/meetings/meetings.types.js +6 -1
  116. package/dist/meetings/meetings.types.js.map +1 -1
  117. package/dist/meetings/request.js +39 -0
  118. package/dist/meetings/request.js.map +1 -1
  119. package/dist/meetings/util.js +116 -18
  120. package/dist/meetings/util.js.map +1 -1
  121. package/dist/member/index.js +10 -0
  122. package/dist/member/index.js.map +1 -1
  123. package/dist/member/types.js.map +1 -1
  124. package/dist/member/util.js +30 -0
  125. package/dist/member/util.js.map +1 -1
  126. package/dist/members/index.js +101 -43
  127. package/dist/members/index.js.map +1 -1
  128. package/dist/members/util.js +8 -1
  129. package/dist/members/util.js.map +1 -1
  130. package/dist/metrics/constants.js +11 -1
  131. package/dist/metrics/constants.js.map +1 -1
  132. package/dist/multistream/codec/constants.js +63 -0
  133. package/dist/multistream/codec/constants.js.map +1 -0
  134. package/dist/multistream/mediaRequestManager.js +62 -15
  135. package/dist/multistream/mediaRequestManager.js.map +1 -1
  136. package/dist/multistream/receiveSlot.js +9 -0
  137. package/dist/multistream/receiveSlot.js.map +1 -1
  138. package/dist/multistream/remoteMediaManager.js +32 -4
  139. package/dist/multistream/remoteMediaManager.js.map +1 -1
  140. package/dist/multistream/sendSlotManager.js +127 -3
  141. package/dist/multistream/sendSlotManager.js.map +1 -1
  142. package/dist/reachability/clusterReachability.js.map +1 -1
  143. package/dist/reachability/index.js +121 -83
  144. package/dist/reachability/index.js.map +1 -1
  145. package/dist/reachability/reachability.types.js +2 -0
  146. package/dist/reachability/reachability.types.js.map +1 -1
  147. package/dist/reachability/util.js +45 -0
  148. package/dist/reachability/util.js.map +1 -1
  149. package/dist/reactions/reactions.type.js.map +1 -1
  150. package/dist/recording-controller/index.js +1 -3
  151. package/dist/recording-controller/index.js.map +1 -1
  152. package/dist/roap/turnDiscovery.js +8 -1
  153. package/dist/roap/turnDiscovery.js.map +1 -1
  154. package/dist/types/annotation/index.d.ts +19 -0
  155. package/dist/types/common/errors/webex-errors.d.ts +36 -2
  156. package/dist/types/config.d.ts +4 -2
  157. package/dist/types/constants.d.ts +15 -2
  158. package/dist/types/controls-options-manager/constants.d.ts +6 -1
  159. package/dist/types/controls-options-manager/index.d.ts +16 -0
  160. package/dist/types/hashTree/constants.d.ts +2 -0
  161. package/dist/types/hashTree/hashTreeParser.d.ts +230 -18
  162. package/dist/types/hashTree/utils.d.ts +18 -0
  163. package/dist/types/index.d.ts +4 -0
  164. package/dist/types/interceptors/locusRetry.d.ts +4 -4
  165. package/dist/types/interpretation/interpretation.types.d.ts +10 -0
  166. package/dist/types/locus-info/index.d.ts +151 -15
  167. package/dist/types/locus-info/infoUtils.d.ts +8 -0
  168. package/dist/types/locus-info/types.d.ts +28 -1
  169. package/dist/types/media/MediaConnectionAwaiter.d.ts +66 -49
  170. package/dist/types/media/properties.d.ts +6 -2
  171. package/dist/types/meeting/in-meeting-actions.d.ts +4 -0
  172. package/dist/types/meeting/index.d.ts +247 -13
  173. package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
  174. package/dist/types/meeting/request.d.ts +1 -0
  175. package/dist/types/meeting/util.d.ts +12 -1
  176. package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
  177. package/dist/types/meetings/index.d.ts +40 -19
  178. package/dist/types/meetings/meetings.types.d.ts +15 -0
  179. package/dist/types/meetings/request.d.ts +14 -0
  180. package/dist/types/member/index.d.ts +1 -0
  181. package/dist/types/member/types.d.ts +1 -0
  182. package/dist/types/member/util.d.ts +9 -0
  183. package/dist/types/members/index.d.ts +15 -2
  184. package/dist/types/members/util.d.ts +1 -5
  185. package/dist/types/metrics/constants.d.ts +10 -0
  186. package/dist/types/multistream/codec/constants.d.ts +7 -0
  187. package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
  188. package/dist/types/multistream/remoteMediaManager.d.ts +18 -0
  189. package/dist/types/multistream/sendSlotManager.d.ts +28 -2
  190. package/dist/types/reachability/clusterReachability.d.ts +3 -3
  191. package/dist/types/reachability/index.d.ts +10 -3
  192. package/dist/types/reachability/reachability.types.d.ts +7 -0
  193. package/dist/types/reachability/util.d.ts +17 -0
  194. package/dist/types/reactions/reactions.type.d.ts +3 -0
  195. package/dist/webinar/index.js +539 -245
  196. package/dist/webinar/index.js.map +1 -1
  197. package/package.json +26 -24
  198. package/src/aiEnableRequest/ai-docs/ai-enable-request-spec.md +223 -0
  199. package/src/aiEnableRequest/index.ts +16 -0
  200. package/src/annotation/ai-docs/annotation-spec.md +236 -0
  201. package/src/annotation/index.ts +61 -29
  202. package/src/breakouts/ai-docs/breakouts-spec.md +324 -0
  203. package/src/breakouts/breakout.ts +3 -1
  204. package/src/breakouts/events.ts +33 -11
  205. package/src/breakouts/index.ts +145 -3
  206. package/src/common/errors/webex-errors.ts +56 -3
  207. package/src/config.ts +8 -3
  208. package/src/constants.ts +23 -4
  209. package/src/controls-options-manager/ai-docs/controls-options-manager-spec.md +243 -0
  210. package/src/controls-options-manager/constants.ts +14 -1
  211. package/src/controls-options-manager/index.ts +87 -28
  212. package/src/controls-options-manager/util.ts +81 -1
  213. package/src/hashTree/ai-docs/hash-tree-spec.md +267 -0
  214. package/src/hashTree/constants.ts +16 -0
  215. package/src/hashTree/hashTreeParser.ts +1021 -214
  216. package/src/hashTree/utils.ts +36 -0
  217. package/src/index.ts +7 -0
  218. package/src/interceptors/ai-docs/interceptors-spec.md +247 -0
  219. package/src/interceptors/dataChannelAuthToken.ts +59 -12
  220. package/src/interceptors/locusRetry.ts +26 -5
  221. package/src/interpretation/ai-docs/interpretation-spec.md +256 -0
  222. package/src/interpretation/index.ts +65 -10
  223. package/src/interpretation/interpretation.types.ts +11 -0
  224. package/src/locus-info/ai-docs/locus-info-spec.md +293 -0
  225. package/src/locus-info/controlsUtils.ts +3 -1
  226. package/src/locus-info/index.ts +907 -184
  227. package/src/locus-info/infoUtils.ts +41 -6
  228. package/src/locus-info/types.ts +33 -1
  229. package/src/media/MediaConnectionAwaiter.ts +229 -196
  230. package/src/media/ai-docs/media-spec.md +267 -0
  231. package/src/media/index.ts +10 -1
  232. package/src/media/properties.ts +8 -3
  233. package/src/meeting/ai-docs/meeting-spec.md +404 -0
  234. package/src/meeting/in-meeting-actions.ts +8 -0
  235. package/src/meeting/index.ts +1237 -254
  236. package/src/meeting/locusMediaRequest.ts +106 -6
  237. package/src/meeting/muteState.ts +10 -1
  238. package/src/meeting/request.ts +11 -0
  239. package/src/meeting/util.ts +53 -8
  240. package/src/meeting/voicea-meeting.ts +1 -1
  241. package/src/meeting-info/ai-docs/meeting-info-spec.md +261 -0
  242. package/src/meeting-info/meeting-info-v2.ts +11 -4
  243. package/src/meetings/ai-docs/meetings-spec.md +296 -0
  244. package/src/meetings/index.ts +224 -80
  245. package/src/meetings/meetings.types.ts +19 -0
  246. package/src/meetings/request.ts +43 -0
  247. package/src/meetings/util.ts +117 -4
  248. package/src/member/ai-docs/member-spec.md +196 -0
  249. package/src/member/index.ts +10 -0
  250. package/src/member/types.ts +1 -0
  251. package/src/member/util.ts +29 -0
  252. package/src/members/ai-docs/members-spec.md +256 -0
  253. package/src/members/index.ts +70 -7
  254. package/src/members/util.ts +12 -4
  255. package/src/metrics/ai-docs/metrics-spec.md +185 -0
  256. package/src/metrics/constants.ts +11 -0
  257. package/src/multistream/ai-docs/multistream-spec.md +295 -0
  258. package/src/multistream/codec/constants.ts +58 -0
  259. package/src/multistream/mediaRequestManager.ts +119 -28
  260. package/src/multistream/receiveSlot.ts +18 -0
  261. package/src/multistream/remoteMediaManager.ts +23 -1
  262. package/src/multistream/sendSlotManager.ts +112 -4
  263. package/src/personal-meeting-room/ai-docs/personal-meeting-room-spec.md +234 -0
  264. package/src/reachability/ai-docs/reachability-spec.md +261 -0
  265. package/src/reachability/clusterReachability.ts +3 -2
  266. package/src/reachability/index.ts +47 -16
  267. package/src/reachability/reachability.types.ts +11 -0
  268. package/src/reachability/util.ts +36 -0
  269. package/src/reactions/ai-docs/reactions-spec.md +198 -0
  270. package/src/reactions/reactions.type.ts +3 -0
  271. package/src/reconnection-manager/ai-docs/reconnection-manager-spec.md +272 -0
  272. package/src/recording-controller/ai-docs/recording-controller-spec.md +223 -0
  273. package/src/recording-controller/index.ts +1 -2
  274. package/src/roap/ai-docs/roap-spec.md +241 -0
  275. package/src/roap/turnDiscovery.ts +9 -1
  276. package/src/webinar/ai-docs/webinar-spec.md +243 -0
  277. package/src/webinar/index.ts +333 -73
  278. package/test/unit/spec/aiEnableRequest/index.ts +86 -0
  279. package/test/unit/spec/annotation/index.ts +214 -182
  280. package/test/unit/spec/breakouts/breakout.ts +9 -3
  281. package/test/unit/spec/breakouts/events.ts +120 -2
  282. package/test/unit/spec/breakouts/index.ts +336 -15
  283. package/test/unit/spec/common/errors/webex-errors.ts +78 -0
  284. package/test/unit/spec/controls-options-manager/index.js +244 -29
  285. package/test/unit/spec/controls-options-manager/util.js +165 -0
  286. package/test/unit/spec/hashTree/hashTreeParser.ts +3126 -238
  287. package/test/unit/spec/hashTree/utils.ts +125 -1
  288. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +179 -1
  289. package/test/unit/spec/interceptors/locusRetry.ts +234 -5
  290. package/test/unit/spec/interpretation/index.ts +119 -4
  291. package/test/unit/spec/locus-info/controlsUtils.js +172 -57
  292. package/test/unit/spec/locus-info/index.js +1880 -136
  293. package/test/unit/spec/locus-info/infoUtils.js +184 -1
  294. package/test/unit/spec/media/MediaConnectionAwaiter.ts +479 -17
  295. package/test/unit/spec/media/index.ts +92 -0
  296. package/test/unit/spec/media/properties.ts +26 -26
  297. package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
  298. package/test/unit/spec/meeting/index.js +3697 -501
  299. package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
  300. package/test/unit/spec/meeting/muteState.js +81 -0
  301. package/test/unit/spec/meeting/request.js +12 -0
  302. package/test/unit/spec/meeting/utils.js +206 -16
  303. package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
  304. package/test/unit/spec/meeting-info/meetinginfov2.js +88 -11
  305. package/test/unit/spec/meetings/index.js +586 -53
  306. package/test/unit/spec/meetings/request.js +141 -0
  307. package/test/unit/spec/meetings/utils.js +402 -51
  308. package/test/unit/spec/member/index.js +7 -0
  309. package/test/unit/spec/member/util.js +89 -0
  310. package/test/unit/spec/members/index.js +216 -0
  311. package/test/unit/spec/members/request.js +37 -1
  312. package/test/unit/spec/members/utils.js +63 -0
  313. package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
  314. package/test/unit/spec/multistream/remoteMediaManager.ts +46 -0
  315. package/test/unit/spec/multistream/sendSlotManager.ts +165 -38
  316. package/test/unit/spec/reachability/index.ts +128 -46
  317. package/test/unit/spec/reachability/util.ts +31 -0
  318. package/test/unit/spec/recording-controller/index.js +9 -8
  319. package/test/unit/spec/roap/turnDiscovery.ts +20 -0
  320. package/test/unit/spec/webinar/index.ts +982 -328
@@ -1,7 +1,13 @@
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';
4
5
  import { LocusDTO } from '../locus-info/types';
6
+ export declare enum SyncAllBackoffType {
7
+ NONE = "none",
8
+ ONLY_LLM = "onlyLLM",
9
+ ALL = "all"
10
+ }
5
11
  export interface DataSet {
6
12
  url: string;
7
13
  root: string;
@@ -13,9 +19,11 @@ export interface DataSet {
13
19
  maxMs: number;
14
20
  exponent: number;
15
21
  };
22
+ heartbeatIntervalMs?: number;
16
23
  }
17
24
  export interface RootHashMessage {
18
25
  dataSets: Array<DataSet>;
26
+ heartbeatIntervalMs?: number;
19
27
  }
20
28
  export interface HashTreeMessage {
21
29
  dataSets: Array<DataSet>;
@@ -38,22 +46,63 @@ interface InternalDataSet extends DataSet {
38
46
  hashTree?: HashTree;
39
47
  timer?: ReturnType<typeof setTimeout>;
40
48
  heartbeatWatchdogTimer?: ReturnType<typeof setTimeout>;
49
+ syncAbortController?: AbortController;
41
50
  }
42
51
  type WebexRequestMethod = (options: Record<string, any>) => Promise<any>;
52
+ type GenerateTrackingId = () => string | undefined;
43
53
  export declare const LocusInfoUpdateType: {
44
54
  readonly OBJECTS_UPDATED: "OBJECTS_UPDATED";
45
55
  readonly MEETING_ENDED: "MEETING_ENDED";
56
+ readonly LOCUS_NOT_FOUND: "LOCUS_NOT_FOUND";
46
57
  };
47
58
  export type LocusInfoUpdateType = Enum<typeof LocusInfoUpdateType>;
48
- export type LocusInfoUpdateCallback = (updateType: LocusInfoUpdateType, data?: {
49
- updatedObjects: HashTreeObject[];
50
- }) => void;
59
+ interface LocusUpdatePayloads {
60
+ [LocusInfoUpdateType.OBJECTS_UPDATED]: {
61
+ updatedObjects: HashTreeObject[];
62
+ };
63
+ [LocusInfoUpdateType.MEETING_ENDED]: unknown;
64
+ [LocusInfoUpdateType.LOCUS_NOT_FOUND]: unknown;
65
+ }
66
+ export type LocusInfoUpdate = {
67
+ [K in keyof LocusUpdatePayloads]: {
68
+ updateType: K;
69
+ } & LocusUpdatePayloads[K];
70
+ }[keyof LocusUpdatePayloads];
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
+ isLlmExpected: () => boolean;
92
+ };
51
93
  /**
52
94
  * This error is thrown if we receive information that the meeting has ended while we're processing some hash messages.
53
95
  * It's handled internally by HashTreeParser and results in MEETING_ENDED being sent up.
54
96
  */
55
97
  export declare class MeetingEndedError extends Error {
56
98
  }
99
+ /**
100
+ * This error is thrown when a 404 is received from Locus hash tree endpoints, indicating that the locus URL
101
+ * is no longer valid (e.g. participant moved to a breakout room, or meeting ended).
102
+ * It's handled internally by HashTreeParser and results in LOCUS_NOT_FOUND being sent up.
103
+ */
104
+ export declare class LocusNotFoundError extends Error {
105
+ }
57
106
  /**
58
107
  * Parses hash tree eventing locus data
59
108
  */
@@ -61,11 +110,19 @@ declare class HashTreeParser {
61
110
  dataSets: Record<string, InternalDataSet>;
62
111
  visibleDataSetsUrl: string;
63
112
  webexRequest: WebexRequestMethod;
64
- locusInfoUpdateCallback: LocusInfoUpdateCallback;
113
+ private callbacks;
114
+ private syncLatencyMeetingId;
65
115
  visibleDataSets: VisibleDataSetInfo[];
66
116
  debugId: string;
67
- heartbeatIntervalMs?: number;
68
117
  private excludedDataSets;
118
+ state: 'active' | 'stopped';
119
+ private syncQueue;
120
+ private isSyncInProgress;
121
+ private syncAllBackoffType;
122
+ private dataSetsSyncedDuringBackoff;
123
+ private syncQueueProcessingPromise;
124
+ private topLevelHeartbeatIntervalMs?;
125
+ private pendingLlmWatchdogDataSetNames;
69
126
  /**
70
127
  * Constructor for HashTreeParser
71
128
  * @param {Object} options
@@ -78,10 +135,20 @@ declare class HashTreeParser {
78
135
  };
79
136
  metadata: Metadata | null;
80
137
  webexRequest: WebexRequestMethod;
81
- locusInfoUpdateCallback: LocusInfoUpdateCallback;
138
+ callbacks: HashTreeParserCallbacks;
82
139
  debugId: string;
83
140
  excludedDataSets?: string[];
141
+ syncLatencyMeetingId: string;
84
142
  });
143
+ /**
144
+ * Sets the visible data sets list for the HashTreeParser. This method should be called only at the start, to initialize
145
+ * the visible data sets, before any message processsing, so for example from the constructor or when resuming the parser.
146
+ *
147
+ * @param {Array<VisibleDataSetInfo>} visibleDataSets - The visible data sets to set
148
+ * @param {Array<DataSet>} dataSets - The "dataSets" list from Locus (yes, Locus sends visibleDataSets and dataSets as separate lists and they can differ)
149
+ * @returns {void}
150
+ */
151
+ private setVisibleDataSets;
85
152
  /**
86
153
  * Checks if the given data set name is in the list of visible data sets
87
154
  * @param {string} dataSetName data set name to check
@@ -110,14 +177,6 @@ declare class HashTreeParser {
110
177
  * @returns {Promise}
111
178
  */
112
179
  private initializeNewVisibleDataSet;
113
- /**
114
- * Sends a special sync request to Locus with all leaves empty - this is a way to get all the data for a given dataset.
115
- *
116
- * @param {string} datasetName - name of the dataset for which to send the request
117
- * @param {string} debugText - text to include in logs
118
- * @returns {Promise}
119
- */
120
- private sendInitializationSyncRequestToLocus;
121
180
  /**
122
181
  * Queries Locus for all up-to-date information about all visible data sets
123
182
  *
@@ -183,6 +242,13 @@ declare class HashTreeParser {
183
242
  * @returns {void}
184
243
  */
185
244
  private handleRootHashHeartBeatMessage;
245
+ /**
246
+ * Handles known errors that can happen during syncs
247
+ *
248
+ * @param {any} error - The error to handle
249
+ * @returns {boolean} true if the error was recognized and handled, false otherwise
250
+ */
251
+ private handleSyncErrors;
186
252
  /**
187
253
  * Asynchronously initializes new visible data sets
188
254
  *
@@ -218,6 +284,14 @@ declare class HashTreeParser {
218
284
  * @returns {void}
219
285
  */
220
286
  private updateDataSetInfo;
287
+ /**
288
+ * Updates the leaf count for a data set, resizing its hash tree accordingly.
289
+ *
290
+ * @param {InternalDataSet} dataSet - The data set to update
291
+ * @param {number} newLeafCount - The new leaf count
292
+ * @returns {void}
293
+ */
294
+ private updateDataSetLeafCount;
221
295
  /**
222
296
  * Checks for changes in the visible data sets based on the updated objects.
223
297
  * @param {HashTreeObject[]} updatedObjects - The list of updated hash tree objects.
@@ -270,6 +344,15 @@ declare class HashTreeParser {
270
344
  * @returns {void}
271
345
  */
272
346
  handleMessage(message: HashTreeMessage, debugText?: string): void;
347
+ /**
348
+ * Checks if Locus sync latency metrics should be collected for a dataset.
349
+ *
350
+ * @param {string} dataSetName dataset name
351
+ * @param {boolean} [isInitialization=false] whether this is an initialization sync
352
+ * @returns {boolean}
353
+ */
354
+ private shouldCollectSyncMetrics;
355
+ private saveSyncBackoffLatency;
273
356
  /**
274
357
  * Calls the updateInfo callback if there are any updates to report
275
358
  *
@@ -284,15 +367,103 @@ declare class HashTreeParser {
284
367
  * @returns {number} - A weighted backoff time based on the provided configuration, using algorithm supplied by Locus team
285
368
  */
286
369
  private getWeightedBackoffTime;
370
+ /**
371
+ * Returns a copy of a hash tree message restricted to a single dataset, keeping only the
372
+ * requested dataset and the elements belonging to it. Used to strip out datasets that Locus
373
+ * may include in a sync response but that we didn't request (e.g. "unjoined" sharing elements
374
+ * with "main"), which would otherwise be applied once per dataset.
375
+ *
376
+ * @param {HashTreeMessage} message the sync response message
377
+ * @param {string} dataSetName the dataset that was requested
378
+ * @returns {HashTreeMessage} a new message containing only the requested dataset
379
+ */
380
+ private filterMessageToDataSet;
287
381
  /**
288
382
  * Performs a sync for the given data set.
289
383
  *
290
384
  * @param {InternalDataSet} dataSet - The data set to sync
291
- * @param {string} rootHash - Our current root hash for this data set
292
385
  * @param {string} reason - The reason for the sync (used for logging)
386
+ * @param {boolean} [isInitialization] - Whether this is an initialization sync (sends empty leaves data instead of comparing hashes)
293
387
  * @returns {Promise<void>}
294
388
  */
295
389
  private performSync;
390
+ /**
391
+ * Cancels any pending or in-flight syncs for the specified data sets.
392
+ * This removes matching entries from the sync queue and aborts any in-flight sync HTTP requests.
393
+ *
394
+ * @param {string[]} dataSetNames - The names of the data sets to cancel syncs for
395
+ * @returns {void}
396
+ */
397
+ private cancelPendingSyncsForDataSets;
398
+ /**
399
+ * If a syncAllDatasets backoff sleep is in progress, marks the given data sets to be skipped
400
+ * after the sleep completes.
401
+ *
402
+ * @param {string[]} dataSetNames - The names of the data sets to mark
403
+ * @returns {void}
404
+ */
405
+ private markDataSetsForSyncAllBackoffSkip;
406
+ /**
407
+ * Aborts any in-flight sync HTTP requests for the specified data sets.
408
+ *
409
+ * @param {string[]} dataSetNames - The names of the data sets whose syncs should be aborted
410
+ * @returns {void}
411
+ */
412
+ private abortInFlightSyncs;
413
+ /**
414
+ * Enqueues a sync for the given data set. If the data set is already in the queue, the request is ignored.
415
+ * This ensures that all syncs are executed sequentially and no more than 1 sync runs at a time.
416
+ *
417
+ * @param {string} dataSetName - The name of the data set to sync
418
+ * @param {string} reason - The reason for the sync (used for logging)
419
+ * @param {boolean} [isInitialization=false] - Whether this is an initialization sync (uses empty leaves data instead of hash comparison)
420
+ * @returns {void}
421
+ */
422
+ private enqueueSyncForDataset;
423
+ /**
424
+ * Processes the sync queue sequentially. Only one instance of this method runs at a time.
425
+ *
426
+ * @returns {Promise<void>}
427
+ */
428
+ private processSyncQueue;
429
+ /**
430
+ * sets the backoff type for syncAllDatasets calls, which determines the scope of datasets that will be synced after the backoff delay.
431
+ *
432
+ * @param {boolean} onlyLLM - Whether the backoff is for a syncAllDatasets call that is syncing only LLM datasets
433
+ * @returns {void}
434
+ */
435
+ private setSyncAllBackoffType;
436
+ /**
437
+ * Checks if a syncAll backoff is already in progress. If so, upgrades the scope from
438
+ * onlyLLM to all datasets when the new call has a broader scope.
439
+ *
440
+ * @param {boolean} onlyLLM - Whether the current call is for LLM datasets only
441
+ * @returns {boolean} true if a backoff is already pending (caller should return early)
442
+ */
443
+ private tryUpgradePendingBackoff;
444
+ /**
445
+ * Syncs all data sets that have hash trees, one by one in sequence, using the priority order
446
+ * provided by sortByInitPriority().
447
+ *
448
+ * If a call is already waiting in the backoff delay phase, a new call with a broader scope
449
+ * (onlyLLM=false) will upgrade the pending scope, and the dataset list will be computed after
450
+ * the backoff using the upgraded scope. After the backoff, the sync queue handles deduplication
451
+ * so no guard is needed.
452
+ *
453
+ * @param {Object} [options={}] - Options for syncing
454
+ * @param {boolean} [options.onlyLLM=false] - Whether to sync only LLM based data sets
455
+ * @returns {Promise<void>}
456
+ */
457
+ syncAllDatasets(options?: {
458
+ onlyLLM?: boolean;
459
+ }): Promise<void>;
460
+ /**
461
+ * Returns the list of data sets that have hash trees, sorted by the priority order provided by sortByInitPriority().
462
+ *
463
+ * @param {boolean} onlyLLM - Whether to include only LLM based data sets
464
+ * @returns {Array<{name: string, backoff: {maxMs: number, exponent: number}}>} The sorted list of data sets with their backoff configurations
465
+ */
466
+ private getSortedDataSetsWithHashTrees;
296
467
  /**
297
468
  * Runs the sync algorithm for the given data set.
298
469
  *
@@ -310,25 +481,66 @@ declare class HashTreeParser {
310
481
  * @returns {void}
311
482
  */
312
483
  private resetHeartbeatWatchdogs;
484
+ /**
485
+ * Re-evaluates heartbeat watchdog timers for LLM data sets. While LLM is not expected,
486
+ * resetHeartbeatWatchdogs skips setting watchdog timers for LLM data sets and records them in
487
+ * pendingLlmWatchdogDataSetNames. This must be called when LLM transitions to expected (e.g. self
488
+ * reports JOINED) to arm the watchdogs for those pending data sets (avoids a timing issue where
489
+ * the "main"/"atd-active"/"atd-unmuted" data set arrives before the self update). The pending set
490
+ * is consumed and cleared here.
491
+ * @returns {void}
492
+ */
493
+ reevaluateLlmWatchdogs(): void;
313
494
  /**
314
495
  * Stops all timers for the data sets to prevent any further sync attempts.
315
496
  * @returns {void}
316
497
  */
317
498
  private stopAllTimers;
499
+ /**
500
+ * Stops the HashTreeParser, preventing it from processing any further messages and clearing all timers.
501
+ * It also clears all the hash trees, so if the parser is resumed later, it will need to do a sync
502
+ * to be up-to-date.
503
+ * @returns {void}
504
+ */
505
+ stop(): void;
506
+ /**
507
+ * Cleans up the HashTreeParser, stopping all timers and clearing all internal state.
508
+ * After calling this, the parser should not be used anymore.
509
+ * @returns {void}
510
+ */
511
+ cleanUp(): void;
512
+ /**
513
+ * Resumes the HashTreeParser that was previously stopped, using a hash tree message.
514
+ * @param {HashTreeMessage} message - The message to resume with, it must contain metadata with visible data sets info
515
+ * @returns {void}
516
+ */
517
+ resumeFromMessage(message: HashTreeMessage): void;
518
+ /**
519
+ * Resumes the HashTreeParser that was previously stopped, using a Locus API response.
520
+ * Unlike resumeFromMessage(), this does not require metadata/dataSets in the input,
521
+ * as it fetches all necessary information from Locus via initializeFromGetLociResponse.
522
+ * @param {LocusDTO} locus - locus object from an API response
523
+ * @returns {Promise}
524
+ */
525
+ resumeFromApiResponse(locus: LocusDTO): Promise<void>;
318
526
  private checkForSentinelHttpResponse;
319
527
  /**
320
528
  * Gets the current hashes from the locus for a specific data set.
321
529
  * @param {string} dataSetName
322
530
  * @param {string} currentRootHash
323
- * @returns {string[]}
531
+ * @param {Object} [trackingIds] tracking ids for the /hashtree request
532
+ * @param {string} [trackingIds.requestTrackingId] tracking id forced onto the /hashtree HTTP request header (kept distinct from the /sync request's tracking id)
533
+ * @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
534
+ * @returns {Object|null} An object containing the hashes and leaf count, or null if the hashes match and no sync is needed
324
535
  */
325
536
  private getHashesFromLocus;
326
537
  /**
327
538
  * Sends a sync request to Locus for the specified data set.
328
539
  *
329
540
  * @param {InternalDataSet} dataSet The data set to sync.
330
- * @param {Record<number, LeafDataItem[]>} mismatchedLeavesData The mismatched leaves data to include in the sync request.
331
- * @returns {Promise<HashTreeMessage|null>}
541
+ * @param {Object} options Either `{ isInitialization: true }` for init syncs (uses leafCount=1 with empty leaf data) or `{ mismatchedLeavesData }` for normal syncs.
542
+ * @param {string} [trackingId] tracking id
543
+ * @returns {Promise<HashTreeMessage | null>}
332
544
  */
333
545
  private sendSyncRequestToLocus;
334
546
  }
@@ -20,3 +20,21 @@ export declare function isMetadata(object: HashTreeObject): boolean;
20
20
  * @returns {void}
21
21
  */
22
22
  export declare const deleteNestedObjectsWithHtMeta: (currentLocusPart: any, parent?: any, currentKey?: string | number) => void;
23
+ /**
24
+ * Reorders items so that those matching the given priority list come first (in priority order),
25
+ * followed by everything else in their original order.
26
+ *
27
+ * @param {Array<T>} items - The items to reorder
28
+ * @param {string[]} priority - Ordered list of names that should come first
29
+ * @returns {Array<T>} A new array with prioritized items first
30
+ */
31
+ export declare function sortByInitPriority<T extends {
32
+ name: string;
33
+ }>(items: T[], priority: string[]): T[];
34
+ /**
35
+ * Sleeps for the specified amount of milliseconds
36
+ *
37
+ * @param {number} ms amount of milliseconds to sleep
38
+ * @returns {Promise<void>} A promise that resolves after the specified delay
39
+ */
40
+ export declare function sleep(ms: number): Promise<void>;
@@ -1,3 +1,4 @@
1
+ import '@webex/internal-plugin-identity';
1
2
  import Meetings from './meetings';
2
3
  import CaptchaError from './common/errors/captcha-error';
3
4
  import IntentToJoinError from './common/errors/intent-to-join';
@@ -16,6 +17,9 @@ export * as REACTIONS from './reactions/reactions';
16
17
  export * as sdkAnnotationTypes from './annotation/annotation.types';
17
18
  export * as MeetingInfoV2 from './meeting-info/meeting-info-v2';
18
19
  export { type Reaction } from './reactions/reactions.type';
20
+ export { SitePreferenceSelectOption } from './meetings/meetings.types';
21
+ export type { FetchSitePreferencesMeViaSiteOptions, SitePreferencesResponse, } from './meetings/meetings.types';
22
+ export type { Interpreter, InterpreterUsingResource } from './interpretation/interpretation.types';
19
23
  export { CaptchaError, IntentToJoinError, JoinMeetingError, PasswordError, PermissionError, ReclaimHostIsHostAlreadyError, ReclaimHostNotAllowedError, ReclaimHostNotSupportedError, ReclaimHostEmptyWrongKeyError, Meeting, MeetingInfoUtil, JoinWebinarError, SdpResponseTimeoutError, };
20
24
  export { RemoteMedia } from './multistream/remoteMedia';
21
25
  export { default as TriggerProxy } from './common/events/trigger-proxy';
@@ -11,11 +11,11 @@ export default class LocusRetryStatusInterceptor extends Interceptor {
11
11
  */
12
12
  static create(): LocusRetryStatusInterceptor;
13
13
  /**
14
- * Handle response errors
15
- * @param {Object} options
16
- * @param {WebexHttpError} reason
17
- * @returns {Promise<WebexHttpError>}
14
+ * Check whether a URI is a Locus /hashtree or /sync endpoint.
15
+ * @param {string} uri
16
+ * @returns {boolean}
18
17
  */
18
+ private static isLocusHashtreeOrSync;
19
19
  onResponseError(options: any, reason: any): Promise<unknown>;
20
20
  /**
21
21
  * Handle retries for locus service unavailable errors
@@ -0,0 +1,10 @@
1
+ export type InterpreterUsingResource = {
2
+ id: string;
3
+ email?: string;
4
+ };
5
+ export type Interpreter = {
6
+ order: number;
7
+ sourceLanguage: string;
8
+ targetLanguage: string;
9
+ usingResource: InterpreterUsingResource;
10
+ };