@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
@@ -0,0 +1,293 @@
1
+ <!-- sdd-generated-metadata
2
+ doc_kind: module-spec
3
+ generated_from: module-spec@0.2.2
4
+ generator_plugin: repo-annotation@1.0.5+codex.20260818094939
5
+ generated_by: codex
6
+ approved_by: repository user
7
+ updated_at: 2026-09-08T00:00:00Z
8
+ validation_status: pass-with-warnings
9
+ -->
10
+ # LOCUS INFO — SPEC
11
+
12
+ > Start here → root [`AGENTS.md`](../../../AGENTS.md) · router [`SPEC_INDEX.md`](../../../ai-docs/SPEC_INDEX.md) · system [`ARCHITECTURE.md`](../../../ai-docs/ARCHITECTURE.md). This is the canonical source-local spec for `src/locus-info/`.
13
+
14
+ ## Metadata
15
+
16
+ | Field | Value |
17
+ |---|---|
18
+ | Module id | `locus-info` |
19
+ | Source path(s) | `src/locus-info/` |
20
+ | Parent spec | — |
21
+ | Doc kind | Module spec |
22
+ | Coverage score | 93% assessed 2026-08-22; 13/14 mandatory fields present; all critical and Important fields present; one noncritical polish gap remains; pending independent validation of the participant-role repair |
23
+ | Generated from | `module-spec` @ SDLC template library `0.2.2` |
24
+ | generated_by / approved_by / updated_at | codex / repository user / 2026-09-08T00:00:00Z |
25
+ | Revalidated against | `b7b93b443e` (manual diff review of `f9a29f61..b7b93b443e`; not a generator/validator tool run) |
26
+ | Validation status | pass-with-warnings |
27
+
28
+ ## Evidence Rules
29
+
30
+ Requirements cite current implementation and mirrored unit-test paths. Current code wins over retained prose when they conflict; commit and PR history are excluded by repository-owner decision. Missing test evidence is stated as a gap rather than inferred.
31
+
32
+ ## Source Material Register
33
+
34
+ | Source material | Scope | Decision | Detail location or disposition |
35
+ |---|---|---|---|
36
+ | No routed legacy module spec | overview / API / behavior / tests | none; generated from current parser/state code and tests |
37
+ | Current source and mirrored tests | implementation / tests | verified | requirements, flows, failures, and test strategy below |
38
+
39
+ ## Overview
40
+
41
+ `src/locus-info/` contains 10 direct source/reference file(s) and has 10 mirrored unit-test file(s). This spec separates its public operations, runtime data movement, component ownership, state applicability, and verification boundary.
42
+
43
+ ## Purpose / Responsibility
44
+
45
+ Normalizes Locus full-state, delta, API-response, and hash-tree inputs into one meeting-state projection and scoped callbacks.
46
+
47
+ ## Stack
48
+
49
+ TypeScript/JavaScript in the Node 22.14 Yarn workspace; Webex core/plugin abstractions and Mocha/Sinon/`@webex/test-helper-chai` tests. Build target: `yarn workspace @webex/plugin-meetings build:src`.
50
+
51
+ ## Folder / Package Structure
52
+
53
+ ```text
54
+ src/locus-info/
55
+ ├── controlsUtils.ts — controlsUtils implementation responsibility
56
+ ├── embeddedAppsUtils.ts — embeddedAppsUtils implementation responsibility
57
+ ├── fullState.ts — state projection or transition logic
58
+ ├── hostUtils.ts — hostUtils implementation responsibility
59
+ ├── index.ts — module facade/controller or primary exports
60
+ ├── infoUtils.ts — infoUtils implementation responsibility
61
+ ├── mediaSharesUtils.ts — mediaSharesUtils implementation responsibility
62
+ ├── parser.ts — parser implementation responsibility
63
+ ├── selfUtils.ts — selfUtils implementation responsibility
64
+ ├── types.ts — module type declarations
65
+ └── ai-docs/locus-info-spec.md — canonical module specification
66
+ ```
67
+
68
+ ## Key Files (source of truth)
69
+
70
+ | File | Holds |
71
+ |---|---|
72
+ | `src/locus-info/controlsUtils.ts` | controlsUtils implementation responsibility |
73
+ | `src/locus-info/embeddedAppsUtils.ts` | embeddedAppsUtils implementation responsibility |
74
+ | `src/locus-info/fullState.ts` | state projection or transition logic |
75
+ | `src/locus-info/hostUtils.ts` | hostUtils implementation responsibility |
76
+ | `src/locus-info/index.ts` | module facade/controller or primary exports |
77
+ | `src/locus-info/infoUtils.ts` | infoUtils implementation responsibility |
78
+ | `src/locus-info/mediaSharesUtils.ts` | mediaSharesUtils implementation responsibility |
79
+ | `src/locus-info/parser.ts` | parser implementation responsibility |
80
+ | `src/locus-info/selfUtils.ts` | selfUtils implementation responsibility |
81
+ | `src/locus-info/types.ts` | module type declarations |
82
+ | `test/unit/spec/locus-info/controlsUtils.js` and 9 sibling test file(s) | mirrored characterization/unit coverage |
83
+
84
+ ## Public Surface
85
+
86
+ | Contract ID | Type | Surface | Purpose | Compatibility / deprecation | Schema / detail link | Root index |
87
+ |---|---|---|---|---|---|---|
88
+ | `locus-info.1` | SDK / initialization | `init()`, `initialSetup()`, `handleLocusAPIResponse()`, and `applyLocusDeltaData()` / `handleLocusDelta()` | Establish the Locus projection and serialize API/Mercury delta entry paths. | Preserve initialization order and single-event mutation discipline. | `src/locus-info/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
89
+ | `locus-info.2` | SDK / hash-tree | `updateLocusFromHashTreeObject()`, `sendClassicVsHashTreeMismatchMetric()`, and `syncAllHashTreeDatasets()` | Convert synchronized hash-tree objects into the same Locus projection and emit the existing metric when the update arrives in the unexpected transport shape. | Preserve parser callback ownership, metric trigger conditions, and dataset synchronization boundaries. | `src/locus-info/index.ts`, `src/hashTree/hashTreeParser.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
90
+ | `locus-info.3` | SDK / parsing/event | `parse()`, `emitScoped()`, `onFullLocus()`, `onDeltaLocus()`, and `handleOneOnOneEvent()` | Parse full/delta payloads and notify composed Meeting controllers through scoped callbacks. | Preserve callback names/payloads and one-on-one handling. | `src/locus-info/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
91
+ | `locus-info.4` | SDK / projection | `updateLocusInfo()`, `getLocusPartner()`, `isMeetingActive()`, `suspendDestroyMeeting()`, `compareAndUpdate()`, and `compareSelfAndHost()` | Reconcile core meeting activity, partner, self, and host changes without duplicating remote transport. | Preserve comparison semantics and destroy-suspension behavior. | `src/locus-info/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
92
+ | `locus-info.5` | SDK / projection | `updateParticipants()`, `updateControls()`, `updateConversationUrl()`, `updateCreated()`, `updateLinks()`, `updateFullState()`, `updateHostInfo()`, `updateMeetingInfo()`, `updateEmbeddedApps()`, `updateMediaShares()`, `updateReplaces()`, `updateSelf()`, `ensureSelfParticipantExists()`, and `mergeParticipants()` | Project the complete set of Locus subdocuments into Meeting, Members, controls, media shares, and related state. | Preserve per-subdocument comparison and callback routing. | `src/locus-info/index.ts`, `src/locus-info/controlsUtils.ts`, `src/locus-info/embeddedAppsUtils.ts`, `src/locus-info/mediaSharesUtils.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
93
+ | `locus-info.6` | SDK / identity/cache | `updateLocusUrl()`, `updateAclUrl()`, `updateBasequence()`, `updateSequence()`, `updateLocusCache()`, `getTheLocusToUpdate()`, `updateMainSessionLocusCache()`, `clearMainSessionLocusCache()`, and `cleanUp()` | Maintain the current/main Locus identity and cached payload used for subsequent comparison. | Preserve main-session separation and cleanup of owned parser/cache state. | `src/locus-info/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
94
+ | `locus-info.7` | parser comparison | `locus2string()`, `checkSequenceOverlap()`, `checkUnequalRanges()`, `checkForUniqueEntries()`, `checkIfOutOfSync()`, `compare()`, `compareFullDtoSequence()`, `isNewFullLocus()`, `compareSequence()`, `compareToAction()`, `extractComparisonState()`, `getMetaData()`, `getUniqueSequences()`, `getNumbersOutOfRange()`, `isValidLocus()`, `isSequenceEmpty()`, and `isLoci()` | Determine whether a delta is contiguous, duplicate, missing, or requires a full sync. | Preserve concrete `IDLE`, `PAUSED`, `WORKING`, and `BLOCKED` parser-state transitions. | `src/locus-info/parser.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
95
+ | `locus-info.8` | parser queue/lifecycle | `nextEvent()`, `onDeltaAction()`, `onDeltaEvent()`, `packComparisonResult()`, `pause()`, `processDeltaEvent()`, `resume()`, and `getDebugMessage()` | Serialize queued deltas and expose/debug the parser's current blocking/working state. | Pause/resume and queue ordering are observable through applied callback order. | `src/locus-info/parser.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
96
+ | `locus-info.9` | exported helpers/contracts | `findMeetingForHashTreeMessage()`, `createLocusFromHashTreeMessage()`, `LocusLLMEvent`, `LocusApiResponseBody`, `HashTreeParserEntry`, `LocusInfoCallbacks`, `DisplayHintSection`, `EndMeetingReason`, `LocusFullState`, `Links`, `LocusDTO`, `ReplacesInfo`, and `LocusErrorCodes` | Share the exact Locus/hash-tree integration vocabulary used by Meetings and composed controllers. | Add fields compatibly; raw error/status/link shapes remain cross-module contracts. | `src/locus-info/index.ts`, `src/locus-info/types.ts`, `src/locus-info/fullState.ts`, `src/locus-info/infoUtils.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
97
+
98
+ Compatibility notes:
99
+ - Prefer additive options and payload fields. Preserve method/event names, rejection semantics, and cleanup timing; route public changes through `src/index.ts` or the documented owning object.
100
+
101
+ ## Requires (dependencies)
102
+
103
+ Locus payloads and fetch access, hash-tree parser, event scope utilities, member/meeting callbacks, and metrics.
104
+
105
+ ## Requirements
106
+
107
+ | ID | WHAT | WHY | Source Evidence | Test / Example Evidence | Assumptions / Gaps | Confidence |
108
+ |---|---|---|---|---|---|---|
109
+ | `LOCUS-INFO-R-001` | initialize/parse/update Locus state. | Normalizes Locus full-state, delta, API-response, and hash-tree inputs into one meeting-state projection and scoped callbacks. | `src/locus-info/index.ts` | `test/unit/spec/locus-info/index.js` | none | PRESENT |
110
+ | `LOCUS-INFO-R-002` | apply full, delta, API, and hash-tree updates. | Full, delta, API, and hash-tree inputs must converge on one ordered Locus projection without applying gaps. | `src/locus-info/index.ts`, `src/locus-info/parser.ts` | `test/unit/spec/locus-info/index.js` | internal full-sync failure while parser is blocked needs explicit recovery coverage | PRESENT |
111
+ | `LOCUS-INFO-R-003` | Malformed or stale deltas follow parser comparison rules. `doLocusSync()` returns `undefined`, intentionally ignores the request chain, falls back from delta to full sync when allowed, logs/destroys on terminal failure, and resumes the parser in `finally` when the meeting survives. | Parser recovery is internal and must not be documented as a caller-visible rejected promise when no such promise is returned. | `src/locus-info/index.ts`, `src/locus-info/parser.ts` | `test/unit/spec/locus-info/index.js`, `test/unit/spec/locus-info/parser.js` | terminal sync/destroy and parser-resume ordering need explicit coverage | PRESENT |
112
+ | `LOCUS-INFO-R-004` | Full-state, delta, API-response, and hash-tree inputs converge through parsers into the same current Locus projection. | Alternate synchronization transports must not expose divergent meeting state. | `src/locus-info/index.ts`, `src/locus-info/parser.ts` | `test/unit/spec/locus-info/index.js`, `test/unit/spec/locus-info/parser.js` | none | PRESENT |
113
+ | `LOCUS-INFO-R-005` | Sequence/dataset gaps trigger synchronization rather than speculative application. `sendClassicVsHashTreeMismatchMetric()` reports an unexpected classic-Locus transport shape while hash-tree mode is enabled; it does not compare classic and hash-tree state values. | Applying stale or incomplete remote state can produce false meeting/member/control events, while the metric contract must not imply a state-diff computation that does not exist. | `src/locus-info/index.ts`, `src/hashTree/hashTreeParser.ts` | `test/unit/spec/locus-info/index.js`, `test/unit/spec/hashTree/hashTreeParser.ts` | none | PRESENT |
114
+ | `LOCUS-INFO-R-006` | Normalized changes invoke the correct scoped callback/event for members, self, controls, media shares, host, embedded apps, and meeting lifecycle. | Parent Meeting and consumers need domain-specific deltas, not an undifferentiated Locus payload. | `src/locus-info/index.ts`, `src/locus-info/controlsUtils.ts`, `src/locus-info/selfUtils.ts` | `test/unit/spec/locus-info/index.js`, `test/unit/spec/locus-info/controlsUtils.js`, `test/unit/spec/locus-info/selfUtils.js` | none | PRESENT |
115
+ | `LOCUS-INFO-R-007` | `LocusErrorCodes` is the shared catalogue of raw Locus `errorCode` values the client branches on: `LOCUS_INACTIVE` (`2403004`) and `LOCUS_USER_FULL` (`2423001`). When constructing the hash-tree parser, `LocusInfo` injects `isLlmExpected: () => this.parsedLocus.self?.joinedWith?.state === 'JOINED'`, so LLM-dataset heartbeat supervision is gated on the current device being joined rather than on `self` being joined from any device. | These numeric codes cross module boundaries and drive caller-visible decisions (see `MEETING-R-009`), so their values are contracts, not internal constants. Anchoring the LLM expectation on `joinedWith` prevents heartbeat watchdogs from supervising a transport this device does not hold. | `src/locus-info/types.ts`, `src/locus-info/index.ts` | `test/unit/spec/locus-info/index.js` | none | PRESENT |
116
+
117
+ ## Design Overview
118
+
119
+ `LocusInfo` owns the normalized meeting projection. The utility files compare individual Locus domains, while `parser.ts` serializes delta application and calls `LocusInfo.doLocusSync()` when a gap requires the parent meeting request to fetch a full DTO.
120
+
121
+ ## Data Flow
122
+
123
+ ```mermaid
124
+ flowchart LR
125
+ LocusEvent[Locus full or delta event] --> Info[index.ts]
126
+ Info --> Parser[parser.ts delta sequencer]
127
+ Parser --> Utils[controls/self/info/media-share/host/app utils]
128
+ Parser --> Sync[LocusInfo.doLocusSync]
129
+ Sync --> Request[meetingRequest.getLocusDTO]
130
+ Request --> Parser
131
+ Utils --> Projection[normalized meeting projection + change flags]
132
+ ```
133
+
134
+ ## Sequence Diagram(s)
135
+
136
+ Sequence coverage:
137
+
138
+ | Operation group | Diagram | Failure coverage |
139
+ |---|---|---|
140
+ | UC-1…UC-6 — Locus projection and recovery operation groups | Locus projection and recovery primary sequence | duplicate/out-of-order delta, blocked parser, internal sync failure, and cache cleanup |
141
+ | UC-1…UC-6 — Locus projection and recovery alternate/failure paths | Locus projection and recovery alternate/failure sequence | out-of-order delta, missing sequence range, invalid Locus shape, or full-sync request rejection |
142
+
143
+ ### Locus projection and recovery primary sequence
144
+
145
+ ```mermaid
146
+ sequenceDiagram
147
+ participant E as Locus event
148
+ participant L as LocusInfo
149
+ participant P as parser.ts
150
+ participant R as meetingRequest
151
+ E-->>L: full DTO or delta
152
+ alt full DTO
153
+ L->>L: onFullLocus applies the authoritative projection
154
+ else delta
155
+ L->>L: handleLocusDelta(response)
156
+ L->>P: onDeltaEvent queues and compares the delta
157
+ alt contiguous delta
158
+ P->>P: apply utility comparisons
159
+ else missing/out-of-order delta
160
+ P->>L: request full synchronization
161
+ L->>R: getLocusDTO()
162
+ R-->>L: synchronized Locus response
163
+ alt response contains a delta
164
+ L->>L: handleLocusDelta(response)
165
+ L->>P: onDeltaEvent(response)
166
+ else response contains a full DTO
167
+ L->>L: onFullLocus applies the synchronized DTO
168
+ end
169
+ end
170
+ end
171
+ L->>L: expose normalized state and change flags
172
+ ```
173
+
174
+ ### Locus projection and recovery alternate/failure sequence
175
+
176
+ ```mermaid
177
+ sequenceDiagram
178
+ participant E as Locus delta input
179
+ participant L as LocusInfo
180
+ participant P as parser.ts sequencer
181
+ participant R as meetingRequest.getLocusDTO
182
+ E-->>L: delta with sequence range
183
+ L->>P: enqueue and compare against current sequence
184
+ alt gap or mismatch requires full synchronization
185
+ P->>L: request synchronization
186
+ L->>R: getLocusDTO()
187
+ alt synchronization succeeds
188
+ R-->>L: full DTO
189
+ L->>L: onFullLocus applies the full DTO directly
190
+ L->>P: resume queued deltas after handling settles
191
+ else terminal synchronization rejects
192
+ R--xL: rejected request
193
+ L->>L: log and destroy meeting
194
+ L->>P: do not resume destroyed meeting parser
195
+ end
196
+ else stale or applicable delta
197
+ P->>P: ignore stale input or apply current delta
198
+ end
199
+ ```
200
+
201
+ ## Class / Component Relationships
202
+
203
+ ```mermaid
204
+ classDiagram
205
+ class LocusEvent
206
+ class Info
207
+ class Parser
208
+ class Utils
209
+ class Sync
210
+ class Request
211
+ class Projection
212
+ LocusEvent --> Info
213
+ Info --> Parser
214
+ Parser --> Utils
215
+ Parser --> Sync
216
+ Sync --> Request
217
+ Request --> Parser
218
+ Utils --> Projection
219
+ ```
220
+
221
+ The arrows identify ownership and delegation inside `src/locus-info/`; files that only declare types or constants are not presented as transports.
222
+
223
+ ## Use Cases
224
+
225
+ - **UC-1:** Initialize from a full Locus API response and project self, host, participants, controls, links, meeting info, shares, embedded apps, and replacement state. Evidence: `src/locus-info/index.ts`.
226
+ - **UC-2:** Serialize incoming Locus deltas so only one queued event mutates the projection at a time. Evidence: `src/locus-info/parser.ts`, `src/locus-info/index.ts`.
227
+ - **UC-3:** Pause/block parsing and initiate the internal full-sync path when sequence comparison finds missing or out-of-order state. Evidence: `src/locus-info/parser.ts`, `src/locus-info/index.ts`.
228
+ - **UC-4:** Convert hash-tree messages/API responses into Locus updates and emit the existing diagnostic when a classic-Locus-shaped update arrives while hash-tree mode is enabled; no classic-vs-hash-tree value comparison is performed. Evidence: `src/locus-info/index.ts`, `src/hashTree/hashTreeParser.ts`.
229
+ - **UC-5:** Emit scoped callbacks only for the Locus subdocuments that changed, preserving Meeting/Members/controller ownership. Evidence: `src/locus-info/index.ts`, `src/locus-info/controlsUtils.ts`, `src/locus-info/embeddedAppsUtils.ts`, `src/locus-info/mediaSharesUtils.ts`.
230
+ - **UC-6:** Maintain and clear distinct current/main-session Locus caches as breakout session context changes. Evidence: `src/locus-info/index.ts`.
231
+
232
+ ## State Model
233
+
234
+ Normalized Locus, sequence/dataset state, meeting activity, partner/self/member projections, and suspension flags are held per meeting.
235
+
236
+ ## Business Rules & Invariants
237
+
238
+ - Older or mismatched updates must not silently replace newer state; self participant existence and dataset consistency are repaired before callbacks. Enforced by `src/locus-info/index.ts` and supporting code under `src/locus-info/`.
239
+
240
+ ## Concurrency & Reactive Flow
241
+
242
+ - Delta inputs are ordered by the parser's sequence state. A gap/mismatch enters the parser's synchronization path and the returned full DTO is parsed before later changes are exposed; stale inputs follow the comparison result instead of being applied speculatively.
243
+
244
+ ## State Machine
245
+
246
+ ```mermaid
247
+ stateDiagram-v2
248
+ [*] --> IDLE
249
+ IDLE --> WORKING: dequeue delta
250
+ WORKING --> IDLE: queue drained
251
+ WORKING --> BLOCKED: missing predecessor
252
+ BLOCKED --> WORKING: predecessor arrives
253
+ WORKING --> PAUSED: full sync starts
254
+ PAUSED --> WORKING: resume after sync
255
+ ```
256
+
257
+ The diagram uses the parser's `IDLE`, `WORKING`, `BLOCKED`, and `PAUSED` values from `src/locus-info/parser.ts`.
258
+
259
+ ## Protocol / Wire Format
260
+
261
+ - External payloads are parsed/serialized by files under `src/locus-info/` and existing Webex/media dependencies. Preserve current field names, enum/raw values, sequence identifiers, and compatibility behavior; do not treat the normalized client model as the wire schema.
262
+
263
+ ## Error Handling & Failure Modes
264
+
265
+ | Condition | Signal | Caller recovery |
266
+ |---|---|---|
267
+ | Delta sequence is stale, out of order, or has a missing range | `parser.ts` follows its sequence comparison result: stale input is not speculatively applied, and a gap requests full synchronization. | Wait for the synchronized DTO before consuming later projected changes. |
268
+ | `getLocusDTO()` rejects during `doLocusSync()` | The private method's internal promise chain handles the failure by logging and, on the terminal path, destroying the meeting; `doLocusSync()` itself returns `undefined`, so no rejection is propagated to a caller. Its `finally` resumes the parser when the meeting survives. | Observe the owning meeting/parser lifecycle rather than awaiting a nonexistent synchronization promise. |
269
+ | Full/API/hash-tree input is accepted | `LocusInfo` updates its normalized projection and invokes only the callbacks for changed member, self, control, share, host, app, or lifecycle fields. | Consume the scoped change callback rather than the raw Locus payload. |
270
+
271
+ ## Pitfalls
272
+
273
+ - Full, delta, and hash-tree messages can overlap or arrive out of order. Updating callbacks before reconciliation creates transient false state.
274
+ - Public behavior may be reachable through a parent `Meeting`/`Meetings` object even when the source helper is not exported directly.
275
+
276
+ ## Test-Case Strategy (module)
277
+
278
+ Use the current mirrored suites: `test/unit/spec/locus-info/controlsUtils.js`, `test/unit/spec/locus-info/embeddedAppsUtils.js`, `test/unit/spec/locus-info/index.js`, `test/unit/spec/locus-info/infoUtils.js`, `test/unit/spec/locus-info/lib/BasicSeqCmp.json`, `test/unit/spec/locus-info/lib/SeqCmp.json`, `test/unit/spec/locus-info/mediaSharesUtils.ts`, `test/unit/spec/locus-info/parser.js`, `test/unit/spec/locus-info/selfConstant.js`, `test/unit/spec/locus-info/selfUtils.js`. Characterize the locus-info-specific use cases above and each listed failure condition; add cleanup or transition cases only for resources and state this module actually owns.
279
+
280
+ | Behavior / Requirement | Existing test evidence | Gap |
281
+ |---|---|---|
282
+ | `LOCUS-INFO-R-001` | `test/unit/spec/locus-info/index.js` | cover full/API/delta/hash-tree entry paths and every changed-subdocument callback family |
283
+ | `LOCUS-INFO-R-002` | `test/unit/spec/locus-info/index.js` | internal full-sync failure while parser is blocked needs explicit recovery coverage |
284
+ | `LOCUS-INFO-R-003` | `test/unit/spec/locus-info/index.js`, `test/unit/spec/locus-info/parser.js` | characterize internal sync failure handling, blocked-queue resume, and cleanup without implying caller rejection |
285
+ | `LOCUS-INFO-R-004` | `test/unit/spec/locus-info/index.js`, `test/unit/spec/locus-info/parser.js` | none |
286
+ | `LOCUS-INFO-R-005` | `test/unit/spec/locus-info/index.js`, `test/unit/spec/hashTree/hashTreeParser.ts` | verify sequence/dataset recovery separately from the unexpected-transport-shape metric trigger |
287
+ | `LOCUS-INFO-R-006` | `test/unit/spec/locus-info/controlsUtils.js`, `test/unit/spec/locus-info/selfUtils.js` | verify every callback family during focused changes |
288
+ | `LOCUS-INFO-R-007` | `test/unit/spec/locus-info/index.js` | covered for the `isLlmExpected` joined and self-joined-but-device-not-joined cases; add a case per `LocusErrorCodes` value as new codes are added |
289
+
290
+ ## Traceability
291
+
292
+ - Repo architecture: [`ARCHITECTURE.md`](../../../ai-docs/ARCHITECTURE.md) · Registry: [`SPEC_INDEX.md`](../../../ai-docs/SPEC_INDEX.md)
293
+ - Coverage state and contracts baseline: `../../../.sdd/manifest.json`
@@ -26,7 +26,9 @@ ControlsUtils.parse = (controls: any) => {
26
26
  modifiedBy: ControlsUtils.getId(controls),
27
27
  paused: controls.record.paused ? controls.record.paused : false,
28
28
  recording: controls.record.recording,
29
- lastModified: controls.record.meta.lastModified,
29
+ lastModified: controls.record.meta?.lastModified,
30
+ modifiedByServiceAppName: controls.record.meta?.modifiedByServiceAppName,
31
+ modifiedByServiceAppId: controls.record.meta?.modifiedByServiceAppId,
30
32
  };
31
33
  }
32
34