@webex/plugin-meetings 3.12.0 → 3.13.0-next.10

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 (354) 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/babel.config.js +17 -1
  43. package/dist/aiEnableRequest/index.js +15 -2
  44. package/dist/aiEnableRequest/index.js.map +1 -1
  45. package/dist/annotation/index.js +55 -19
  46. package/dist/annotation/index.js.map +1 -1
  47. package/dist/assets/e2ee-0.0.1.js +2 -0
  48. package/dist/assets/e2ee-0.0.1.wasm +0 -0
  49. package/dist/breakouts/breakout.js +8 -3
  50. package/dist/breakouts/breakout.js.map +1 -1
  51. package/dist/breakouts/events.js +29 -14
  52. package/dist/breakouts/events.js.map +1 -1
  53. package/dist/breakouts/index.js +128 -7
  54. package/dist/breakouts/index.js.map +1 -1
  55. package/dist/common/errors/webex-errors.js +54 -5
  56. package/dist/common/errors/webex-errors.js.map +1 -1
  57. package/dist/common/wasm-loader.js +174 -0
  58. package/dist/common/wasm-loader.js.map +1 -0
  59. package/dist/config.js +5 -2
  60. package/dist/config.js.map +1 -1
  61. package/dist/constants.js +39 -11
  62. package/dist/constants.js.map +1 -1
  63. package/dist/controls-options-manager/constants.js +11 -1
  64. package/dist/controls-options-manager/constants.js.map +1 -1
  65. package/dist/controls-options-manager/index.js +67 -29
  66. package/dist/controls-options-manager/index.js.map +1 -1
  67. package/dist/controls-options-manager/util.js +91 -0
  68. package/dist/controls-options-manager/util.js.map +1 -1
  69. package/dist/e2ee/E2eeManager.js +91 -0
  70. package/dist/e2ee/E2eeManager.js.map +1 -0
  71. package/dist/e2ee/E2eeSignaling.js +200 -0
  72. package/dist/e2ee/E2eeSignaling.js.map +1 -0
  73. package/dist/e2ee/MediaEncryptionService.js +75 -0
  74. package/dist/e2ee/MediaEncryptionService.js.map +1 -0
  75. package/dist/e2ee/mls.js +558 -0
  76. package/dist/e2ee/mls.js.map +1 -0
  77. package/dist/e2ee/types.js +59 -0
  78. package/dist/e2ee/types.js.map +1 -0
  79. package/dist/e2ee/wasm.d.js +7 -0
  80. package/dist/e2ee/wasm.d.js.map +1 -0
  81. package/dist/hashTree/constants.js +13 -1
  82. package/dist/hashTree/constants.js.map +1 -1
  83. package/dist/hashTree/hashTreeParser.js +1245 -404
  84. package/dist/hashTree/hashTreeParser.js.map +1 -1
  85. package/dist/hashTree/utils.js +42 -0
  86. package/dist/hashTree/utils.js.map +1 -1
  87. package/dist/index.js +8 -0
  88. package/dist/index.js.map +1 -1
  89. package/dist/interceptors/dataChannelAuthToken.js +58 -16
  90. package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
  91. package/dist/interceptors/locusRetry.js +24 -9
  92. package/dist/interceptors/locusRetry.js.map +1 -1
  93. package/dist/interpretation/index.js +55 -12
  94. package/dist/interpretation/index.js.map +1 -1
  95. package/dist/interpretation/interpretation.types.js +7 -0
  96. package/dist/interpretation/interpretation.types.js.map +1 -0
  97. package/dist/interpretation/siLanguage.js +1 -1
  98. package/dist/locus-info/controlsUtils.js +4 -1
  99. package/dist/locus-info/controlsUtils.js.map +1 -1
  100. package/dist/locus-info/index.js +914 -196
  101. package/dist/locus-info/index.js.map +1 -1
  102. package/dist/locus-info/infoUtils.js +36 -5
  103. package/dist/locus-info/infoUtils.js.map +1 -1
  104. package/dist/locus-info/types.js +20 -0
  105. package/dist/locus-info/types.js.map +1 -1
  106. package/dist/media/MediaConnectionAwaiter.js +229 -166
  107. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  108. package/dist/media/index.js +8 -2
  109. package/dist/media/index.js.map +1 -1
  110. package/dist/media/properties.js +4 -5
  111. package/dist/media/properties.js.map +1 -1
  112. package/dist/meeting/in-meeting-actions.js +5 -1
  113. package/dist/meeting/in-meeting-actions.js.map +1 -1
  114. package/dist/meeting/index.js +1931 -887
  115. package/dist/meeting/index.js.map +1 -1
  116. package/dist/meeting/locusMediaRequest.js +229 -82
  117. package/dist/meeting/locusMediaRequest.js.map +1 -1
  118. package/dist/meeting/muteState.js +10 -1
  119. package/dist/meeting/muteState.js.map +1 -1
  120. package/dist/meeting/request.js +5 -2
  121. package/dist/meeting/request.js.map +1 -1
  122. package/dist/meeting/util.js +42 -3
  123. package/dist/meeting/util.js.map +1 -1
  124. package/dist/meeting/voicea-meeting.js +2 -1
  125. package/dist/meeting/voicea-meeting.js.map +1 -1
  126. package/dist/meeting-info/meeting-info-v2.js +12 -5
  127. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  128. package/dist/meetings/index.js +342 -129
  129. package/dist/meetings/index.js.map +1 -1
  130. package/dist/meetings/meetings.types.js +6 -1
  131. package/dist/meetings/meetings.types.js.map +1 -1
  132. package/dist/meetings/request.js +39 -0
  133. package/dist/meetings/request.js.map +1 -1
  134. package/dist/meetings/util.js +116 -18
  135. package/dist/meetings/util.js.map +1 -1
  136. package/dist/member/index.js +10 -0
  137. package/dist/member/index.js.map +1 -1
  138. package/dist/member/types.js.map +1 -1
  139. package/dist/member/util.js +30 -0
  140. package/dist/member/util.js.map +1 -1
  141. package/dist/members/index.js +101 -43
  142. package/dist/members/index.js.map +1 -1
  143. package/dist/members/util.js +8 -1
  144. package/dist/members/util.js.map +1 -1
  145. package/dist/metrics/constants.js +11 -1
  146. package/dist/metrics/constants.js.map +1 -1
  147. package/dist/multistream/codec/constants.js +63 -0
  148. package/dist/multistream/codec/constants.js.map +1 -0
  149. package/dist/multistream/mediaRequestManager.js +62 -15
  150. package/dist/multistream/mediaRequestManager.js.map +1 -1
  151. package/dist/multistream/receiveSlot.js +9 -0
  152. package/dist/multistream/receiveSlot.js.map +1 -1
  153. package/dist/multistream/remoteMediaManager.js +32 -4
  154. package/dist/multistream/remoteMediaManager.js.map +1 -1
  155. package/dist/multistream/sendSlotManager.js +127 -3
  156. package/dist/multistream/sendSlotManager.js.map +1 -1
  157. package/dist/reachability/clusterReachability.js.map +1 -1
  158. package/dist/reachability/index.js +121 -83
  159. package/dist/reachability/index.js.map +1 -1
  160. package/dist/reachability/reachability.types.js +2 -0
  161. package/dist/reachability/reachability.types.js.map +1 -1
  162. package/dist/reachability/util.js +45 -0
  163. package/dist/reachability/util.js.map +1 -1
  164. package/dist/reactions/reactions.type.js.map +1 -1
  165. package/dist/recording-controller/index.js +1 -3
  166. package/dist/recording-controller/index.js.map +1 -1
  167. package/dist/roap/turnDiscovery.js +8 -1
  168. package/dist/roap/turnDiscovery.js.map +1 -1
  169. package/dist/types/annotation/index.d.ts +19 -0
  170. package/dist/types/common/errors/webex-errors.d.ts +36 -2
  171. package/dist/types/common/wasm-loader.d.ts +55 -0
  172. package/dist/types/config.d.ts +5 -2
  173. package/dist/types/constants.d.ts +15 -2
  174. package/dist/types/controls-options-manager/constants.d.ts +6 -1
  175. package/dist/types/controls-options-manager/index.d.ts +16 -0
  176. package/dist/types/e2ee/E2eeManager.d.ts +23 -0
  177. package/dist/types/e2ee/E2eeSignaling.d.ts +94 -0
  178. package/dist/types/e2ee/MediaEncryptionService.d.ts +27 -0
  179. package/dist/types/e2ee/mls.d.ts +191 -0
  180. package/dist/types/e2ee/types.d.ts +104 -0
  181. package/dist/types/hashTree/constants.d.ts +2 -0
  182. package/dist/types/hashTree/hashTreeParser.d.ts +230 -18
  183. package/dist/types/hashTree/utils.d.ts +18 -0
  184. package/dist/types/index.d.ts +4 -0
  185. package/dist/types/interceptors/locusRetry.d.ts +4 -4
  186. package/dist/types/interpretation/interpretation.types.d.ts +10 -0
  187. package/dist/types/locus-info/index.d.ts +151 -15
  188. package/dist/types/locus-info/infoUtils.d.ts +8 -0
  189. package/dist/types/locus-info/types.d.ts +28 -1
  190. package/dist/types/media/MediaConnectionAwaiter.d.ts +66 -49
  191. package/dist/types/media/properties.d.ts +6 -2
  192. package/dist/types/meeting/in-meeting-actions.d.ts +4 -0
  193. package/dist/types/meeting/index.d.ts +247 -13
  194. package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
  195. package/dist/types/meeting/request.d.ts +1 -0
  196. package/dist/types/meeting/util.d.ts +12 -1
  197. package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
  198. package/dist/types/meetings/index.d.ts +44 -19
  199. package/dist/types/meetings/meetings.types.d.ts +15 -0
  200. package/dist/types/meetings/request.d.ts +14 -0
  201. package/dist/types/member/index.d.ts +1 -0
  202. package/dist/types/member/types.d.ts +1 -0
  203. package/dist/types/member/util.d.ts +9 -0
  204. package/dist/types/members/index.d.ts +15 -2
  205. package/dist/types/members/util.d.ts +1 -5
  206. package/dist/types/metrics/constants.d.ts +10 -0
  207. package/dist/types/multistream/codec/constants.d.ts +7 -0
  208. package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
  209. package/dist/types/multistream/remoteMediaManager.d.ts +18 -0
  210. package/dist/types/multistream/sendSlotManager.d.ts +28 -2
  211. package/dist/types/reachability/clusterReachability.d.ts +3 -3
  212. package/dist/types/reachability/index.d.ts +10 -3
  213. package/dist/types/reachability/reachability.types.d.ts +7 -0
  214. package/dist/types/reachability/util.d.ts +17 -0
  215. package/dist/types/reactions/reactions.type.d.ts +3 -0
  216. package/dist/webinar/index.js +539 -245
  217. package/dist/webinar/index.js.map +1 -1
  218. package/package.json +26 -24
  219. package/src/aiEnableRequest/ai-docs/ai-enable-request-spec.md +223 -0
  220. package/src/aiEnableRequest/index.ts +16 -0
  221. package/src/annotation/ai-docs/annotation-spec.md +236 -0
  222. package/src/annotation/index.ts +61 -29
  223. package/src/breakouts/ai-docs/breakouts-spec.md +324 -0
  224. package/src/breakouts/breakout.ts +3 -1
  225. package/src/breakouts/events.ts +33 -11
  226. package/src/breakouts/index.ts +145 -3
  227. package/src/common/errors/webex-errors.ts +56 -3
  228. package/src/common/wasm-loader.ts +124 -0
  229. package/src/config.ts +9 -3
  230. package/src/constants.ts +23 -4
  231. package/src/controls-options-manager/ai-docs/controls-options-manager-spec.md +243 -0
  232. package/src/controls-options-manager/constants.ts +14 -1
  233. package/src/controls-options-manager/index.ts +87 -28
  234. package/src/controls-options-manager/util.ts +81 -1
  235. package/src/e2ee/E2eeManager.ts +58 -0
  236. package/src/e2ee/E2eeSignaling.ts +215 -0
  237. package/src/e2ee/MediaEncryptionService.ts +41 -0
  238. package/src/e2ee/mls.ts +548 -0
  239. package/src/e2ee/types.ts +114 -0
  240. package/src/e2ee/wasm.d.ts +153 -0
  241. package/src/hashTree/ai-docs/hash-tree-spec.md +267 -0
  242. package/src/hashTree/constants.ts +16 -0
  243. package/src/hashTree/hashTreeParser.ts +1021 -214
  244. package/src/hashTree/utils.ts +36 -0
  245. package/src/index.ts +7 -0
  246. package/src/interceptors/ai-docs/interceptors-spec.md +247 -0
  247. package/src/interceptors/dataChannelAuthToken.ts +59 -12
  248. package/src/interceptors/locusRetry.ts +26 -5
  249. package/src/interpretation/ai-docs/interpretation-spec.md +256 -0
  250. package/src/interpretation/index.ts +65 -10
  251. package/src/interpretation/interpretation.types.ts +11 -0
  252. package/src/locus-info/ai-docs/locus-info-spec.md +293 -0
  253. package/src/locus-info/controlsUtils.ts +3 -1
  254. package/src/locus-info/index.ts +907 -184
  255. package/src/locus-info/infoUtils.ts +41 -6
  256. package/src/locus-info/types.ts +33 -1
  257. package/src/media/MediaConnectionAwaiter.ts +229 -196
  258. package/src/media/ai-docs/media-spec.md +267 -0
  259. package/src/media/index.ts +10 -1
  260. package/src/media/properties.ts +8 -3
  261. package/src/meeting/ai-docs/meeting-spec.md +404 -0
  262. package/src/meeting/in-meeting-actions.ts +8 -0
  263. package/src/meeting/index.ts +1237 -254
  264. package/src/meeting/locusMediaRequest.ts +106 -6
  265. package/src/meeting/muteState.ts +10 -1
  266. package/src/meeting/request.ts +11 -0
  267. package/src/meeting/util.ts +53 -8
  268. package/src/meeting/voicea-meeting.ts +1 -1
  269. package/src/meeting-info/ai-docs/meeting-info-spec.md +261 -0
  270. package/src/meeting-info/meeting-info-v2.ts +11 -4
  271. package/src/meetings/ai-docs/meetings-spec.md +298 -0
  272. package/src/meetings/index.ts +242 -80
  273. package/src/meetings/meetings.types.ts +19 -0
  274. package/src/meetings/request.ts +43 -0
  275. package/src/meetings/util.ts +117 -4
  276. package/src/member/ai-docs/member-spec.md +196 -0
  277. package/src/member/index.ts +10 -0
  278. package/src/member/types.ts +1 -0
  279. package/src/member/util.ts +29 -0
  280. package/src/members/ai-docs/members-spec.md +256 -0
  281. package/src/members/index.ts +70 -7
  282. package/src/members/util.ts +12 -4
  283. package/src/metrics/ai-docs/metrics-spec.md +185 -0
  284. package/src/metrics/constants.ts +11 -0
  285. package/src/multistream/ai-docs/multistream-spec.md +295 -0
  286. package/src/multistream/codec/constants.ts +58 -0
  287. package/src/multistream/mediaRequestManager.ts +119 -28
  288. package/src/multistream/receiveSlot.ts +18 -0
  289. package/src/multistream/remoteMediaManager.ts +23 -1
  290. package/src/multistream/sendSlotManager.ts +112 -4
  291. package/src/personal-meeting-room/ai-docs/personal-meeting-room-spec.md +234 -0
  292. package/src/reachability/ai-docs/reachability-spec.md +261 -0
  293. package/src/reachability/clusterReachability.ts +3 -2
  294. package/src/reachability/index.ts +47 -16
  295. package/src/reachability/reachability.types.ts +11 -0
  296. package/src/reachability/util.ts +36 -0
  297. package/src/reactions/ai-docs/reactions-spec.md +198 -0
  298. package/src/reactions/reactions.type.ts +3 -0
  299. package/src/reconnection-manager/ai-docs/reconnection-manager-spec.md +272 -0
  300. package/src/recording-controller/ai-docs/recording-controller-spec.md +223 -0
  301. package/src/recording-controller/index.ts +1 -2
  302. package/src/roap/ai-docs/roap-spec.md +241 -0
  303. package/src/roap/turnDiscovery.ts +9 -1
  304. package/src/webinar/ai-docs/webinar-spec.md +243 -0
  305. package/src/webinar/index.ts +333 -73
  306. package/test/unit/spec/aiEnableRequest/index.ts +86 -0
  307. package/test/unit/spec/annotation/index.ts +214 -182
  308. package/test/unit/spec/breakouts/breakout.ts +9 -3
  309. package/test/unit/spec/breakouts/events.ts +120 -2
  310. package/test/unit/spec/breakouts/index.ts +336 -15
  311. package/test/unit/spec/common/errors/webex-errors.ts +78 -0
  312. package/test/unit/spec/common/wasm-loader.ts +171 -0
  313. package/test/unit/spec/controls-options-manager/index.js +244 -29
  314. package/test/unit/spec/controls-options-manager/util.js +165 -0
  315. package/test/unit/spec/e2ee/E2eeManager.ts +82 -0
  316. package/test/unit/spec/e2ee/E2eeSignaling.ts +172 -0
  317. package/test/unit/spec/e2ee/MediaEncryptionService.ts +43 -0
  318. package/test/unit/spec/e2ee/mls.ts +765 -0
  319. package/test/unit/spec/hashTree/hashTreeParser.ts +3126 -238
  320. package/test/unit/spec/hashTree/utils.ts +125 -1
  321. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +179 -1
  322. package/test/unit/spec/interceptors/locusRetry.ts +234 -5
  323. package/test/unit/spec/interpretation/index.ts +119 -4
  324. package/test/unit/spec/locus-info/controlsUtils.js +172 -57
  325. package/test/unit/spec/locus-info/index.js +1880 -136
  326. package/test/unit/spec/locus-info/infoUtils.js +184 -1
  327. package/test/unit/spec/media/MediaConnectionAwaiter.ts +479 -17
  328. package/test/unit/spec/media/index.ts +92 -0
  329. package/test/unit/spec/media/properties.ts +26 -26
  330. package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
  331. package/test/unit/spec/meeting/index.js +3697 -501
  332. package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
  333. package/test/unit/spec/meeting/muteState.js +81 -0
  334. package/test/unit/spec/meeting/request.js +12 -0
  335. package/test/unit/spec/meeting/utils.js +206 -16
  336. package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
  337. package/test/unit/spec/meeting-info/index.js +2 -3
  338. package/test/unit/spec/meeting-info/meetinginfov2.js +88 -11
  339. package/test/unit/spec/meetings/index.js +606 -53
  340. package/test/unit/spec/meetings/request.js +141 -0
  341. package/test/unit/spec/meetings/utils.js +402 -51
  342. package/test/unit/spec/member/index.js +7 -0
  343. package/test/unit/spec/member/util.js +89 -0
  344. package/test/unit/spec/members/index.js +216 -0
  345. package/test/unit/spec/members/request.js +37 -1
  346. package/test/unit/spec/members/utils.js +63 -0
  347. package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
  348. package/test/unit/spec/multistream/remoteMediaManager.ts +46 -0
  349. package/test/unit/spec/multistream/sendSlotManager.ts +165 -38
  350. package/test/unit/spec/reachability/index.ts +128 -46
  351. package/test/unit/spec/reachability/util.ts +31 -0
  352. package/test/unit/spec/recording-controller/index.js +9 -8
  353. package/test/unit/spec/roap/turnDiscovery.ts +20 -0
  354. package/test/unit/spec/webinar/index.ts +982 -328
@@ -0,0 +1,324 @@
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-08-22T15:21:29Z
8
+ validation_status: pass-with-warnings
9
+ -->
10
+ # BREAKOUTS — 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/breakouts/`.
13
+
14
+ ## Metadata
15
+
16
+ | Field | Value |
17
+ |---|---|
18
+ | Module id | `breakouts` |
19
+ | Source path(s) | `src/breakouts/` |
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-08-22T15:21:29Z |
25
+ | Validation status | pass-with-warnings |
26
+
27
+ ## Evidence Rules
28
+
29
+ Requirements cite current source and mirrored tests. Current code wins over retained prose when they conflict; commit and PR history are excluded. Missing evidence stays a gap.
30
+
31
+ ## Source Material Register
32
+
33
+ | Source material | Scope | Decision | Detail location or disposition |
34
+ |---|---|---|---|
35
+ | Retained breakout feature guide | overview / API / behavior / tests | used and corrected; attendee/events structure was preserved, while stale host-API claims were replaced with current implemented operations and evidence |
36
+ | Current source and mirrored tests | implementation / tests | verified | requirements, flows, failures, and test strategy below |
37
+
38
+ ## Overview
39
+
40
+ `src/breakouts/` contains 8 direct source/reference file(s) and has 7 mirrored unit-test file(s). This spec separates its public operations, runtime data movement, component ownership, state applicability, and verification boundary.
41
+
42
+ ## Purpose / Responsibility
43
+
44
+ Owns breakout-session projections, participant and host workflows, roster/broadcast/help events, edit-lock lifecycle, and server mutations.
45
+
46
+ ## Stack
47
+
48
+ TypeScript/JavaScript in the Node 22.14 Yarn workspace; Webex core/plugin abstractions and Mocha/Sinon/`@webex/test-helper-chai` tests.
49
+
50
+ ## Folder / Package Structure
51
+
52
+ ```text
53
+ src/breakouts/
54
+ ├── README.md — retained legacy reference input
55
+ ├── breakout.ts — breakout implementation responsibility
56
+ ├── collection.ts — module-owned collection
57
+ ├── edit-lock-error.ts — module-specific error type
58
+ ├── events.ts — breakout Call Analyzer metric helper
59
+ ├── index.ts — module facade/controller or primary exports
60
+ ├── request.ts — broadcast-specific request helper
61
+ ├── utils.ts — normalization/helper functions
62
+ └── ai-docs/breakouts-spec.md — canonical module specification
63
+ ```
64
+
65
+ ## Key Files (source of truth)
66
+
67
+ | File | Holds |
68
+ |---|---|
69
+ | `src/breakouts/README.md` | retained legacy reference input |
70
+ | `src/breakouts/breakout.ts` | breakout implementation responsibility |
71
+ | `src/breakouts/collection.ts` | module-owned collection |
72
+ | `src/breakouts/edit-lock-error.ts` | module-specific error type |
73
+ | `src/breakouts/events.ts` | `breakoutEvent` Call Analyzer metric construction/submission helper; feature events are emitted by `index.ts` |
74
+ | `src/breakouts/index.ts` | module facade/controller or primary exports |
75
+ | `src/breakouts/request.ts` | broadcast-specific request helper |
76
+ | `src/breakouts/utils.ts` | normalization/helper functions |
77
+ | `test/unit/spec/breakouts/breakout.ts` and 6 sibling test file(s) | mirrored characterization/unit coverage |
78
+
79
+ ## Public Surface
80
+
81
+ | Contract ID | Type | Surface | Purpose | Compatibility / deprecation | Schema / detail link | Root index |
82
+ |---|---|---|---|---|---|---|
83
+ | `breakouts.1` | SDK / lifecycle | `initialize()`, `cleanUp()`, `locusUrlUpdate()`, `updateCanManageBreakouts()`, `breakoutServiceUrlUpdate()`, `handleRosterUpdate()`, `listenToCurrentSessionTypeChange()`, `listenToBroadcastMessages()`, `listenToBreakoutRosters()`, `listenToBreakoutHelp()`, `handleLLMBreakoutJoinResponseMetric()`, `submitLLMBreakoutJoinResponseMetric()`, `updateBreakoutSessions()`, and `clearBreakouts()` | Reconcile meeting-scoped breakout state and owned event subscriptions/metrics from Locus/service updates. | Preserve session/member ids, listener topics, metric fields, and scoped emitted events. | `src/breakouts/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
84
+ | `breakouts.2` | SDK / query | `queryRosters()`, `isBreakoutInProgress()`, `isBreakoutIClosing()`, `getMainSession()`, `getBreakout()`, and collection/session update helpers | Query and project current breakout sessions, main-session identity, roster, and close state. | Preserve collection identity and current enum/value semantics. | `src/breakouts/index.ts`, `src/breakouts/collection.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
85
+ | `breakouts.3` | attendee session object | `Breakout.initialize()`, `join()`, `leave()`, `askForHelp()`, `initMembers()`, `isNeedHandleRoster()`, `parseRoster()`, and `broadcast()` | Let an attendee act on one breakout and maintain its session-local roster. | These methods are owned by `breakout.ts`, not delegated through the controller index. | `src/breakouts/breakout.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
86
+ | `breakouts.4` | SDK / remote | controller `askAllToReturn()`, `broadcast()`, and `triggerReturnToMainEvent()` | Send host return/broadcast actions and expose the corresponding scoped meeting event. | Preserve broadcast roles/content and return-to-main event payload. | `src/breakouts/index.ts`, `src/breakouts/request.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
87
+ | `breakouts.5` | SDK / host remote | `enableBreakouts()`, `toggleBreakout()`, `doToggleBreakout()`, `create()`, `clearSessions()`, `start()`, `end()`, and `update()` | Create and transition the remote breakout configuration and sessions. | Preserve request sequencing, state values, and service rejection mapping. | `src/breakouts/index.ts`, `src/breakouts/request.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
88
+ | `breakouts.6` | SDK / assignment remote | `assign()`, `queryPreAssignments()`, `dynamicAssign()`, `moveToLobby()`, and `removeFromBreakout()` | Manage pre/dynamic participant assignment and movement between lobby/session contexts. | Preserve participant/session ids and per-operation request bodies. | `src/breakouts/index.ts`, `src/breakouts/request.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
89
+ | `breakouts.7` | SDK / edit lock | `enableAndLockBreakout()`, `hasBreakoutLocked()`, `lockBreakout()`, `keepEditLockAlive()`, and `unLockEditBreakout()` | Acquire, refresh, inspect, and release the edit token used by protected host mutations. | Service lock conflicts map to `BreakoutEditLockedError`, while a locally held lock rejects with a plain `Error`; keepalive ownership is explicit. | `src/breakouts/index.ts`, `src/breakouts/edit-lock-error.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
90
+ | `breakouts.8` | exported adapter/helpers | `BreakoutRequest.broadcast()`, `BreakoutEditLockedError`, `getBroadcastRoles()`, `boServiceErrorHandler()`, and `isSessionTypeChangedFromSessionToMain()` | Provide the direct broadcast adapter, lock error, role selection, service-error mapping, and session-transition predicate. | Preserve error identity, role ordering, and transition logic. | `src/breakouts/request.ts`, `src/breakouts/edit-lock-error.ts`, `src/breakouts/utils.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
91
+
92
+ ### Emitted events
93
+
94
+ Current source emits or forwards these observable literals for this operation boundary. Preserve literal values, scope, payload shape, and emission timing; a constant name alone is not a substitute for the consumer-visible value.
95
+
96
+ | Event literal | Constant / expression | Emission evidence |
97
+ |---|---|---|
98
+ | `ASK_FOR_HELP` | `BREAKOUTS.EVENTS.ASK_FOR_HELP` | `src/breakouts/index.ts` |
99
+ | `ASK_RETURN_TO_MAIN` | `BREAKOUTS.EVENTS.ASK_RETURN_TO_MAIN` | `src/breakouts/index.ts` |
100
+ | `BREAKOUTS_CLOSING` | `BREAKOUTS.EVENTS.BREAKOUTS_CLOSING` | `src/breakouts/index.ts` |
101
+ | `LEAVE_BREAKOUT` | `BREAKOUTS.EVENTS.LEAVE_BREAKOUT` | `src/breakouts/index.ts` |
102
+ | `meeting:breakouts:askForHelp` | `EVENT_TRIGGERS.MEETING_BREAKOUTS_ASK_FOR_HELP` | `src/meeting/index.ts` |
103
+ | `meeting:breakouts:askReturnToMain` | `EVENT_TRIGGERS.MEETING_BREAKOUTS_ASK_RETURN_TO_MAIN` | `src/meeting/index.ts` |
104
+ | `meeting:breakouts:closing` | `EVENT_TRIGGERS.MEETING_BREAKOUTS_CLOSING` | `src/meeting/index.ts` |
105
+ | `meeting:breakouts:leave` | `EVENT_TRIGGERS.MEETING_BREAKOUTS_LEAVE` | `src/meeting/index.ts` |
106
+ | `meeting:breakouts:message` | `EVENT_TRIGGERS.MEETING_BREAKOUTS_MESSAGE` | `src/meeting/index.ts` |
107
+ | `meeting:breakouts:preAssignmentsUpdate` | `EVENT_TRIGGERS.MEETING_BREAKOUTS_PRE_ASSIGNMENTS_UPDATE` | `src/meeting/index.ts` |
108
+ | `meeting:breakouts:update` | `EVENT_TRIGGERS.MEETING_BREAKOUTS_UPDATE` | `src/meeting/index.ts` |
109
+ | `MEMBERS_UPDATE` | `BREAKOUTS.EVENTS.MEMBERS_UPDATE` | `src/breakouts/index.ts` |
110
+ | `MESSAGE` | `BREAKOUTS.EVENTS.MESSAGE` | `src/breakouts/index.ts` |
111
+ | `PRE_ASSIGNMENTS_UPDATE` | `BREAKOUTS.EVENTS.PRE_ASSIGNMENTS_UPDATE` | `src/breakouts/index.ts` |
112
+
113
+ Compatibility notes:
114
+ - Prefer additive fields/options and preserve current rejection/event/cleanup semantics. Internal helpers are not public merely because they are exported within the source directory.
115
+
116
+ ## Requires (dependencies)
117
+
118
+ Parent Meeting/Locus state, breakout service URL, request helper, breakout/member collections, event utilities, timers, role/capability fields, and metrics.
119
+
120
+ ## Requirements
121
+
122
+ | ID | WHAT | WHY | Source Evidence | Test / Example Evidence | Assumptions / Gaps | Confidence |
123
+ |---|---|---|---|---|---|---|
124
+ | `BREAKOUTS-R-001` | initialize/query breakout session and roster state. | Owns breakout-session projections, participant and host workflows, roster/broadcast/help events, edit-lock lifecycle, and server mutations. | `src/breakouts/index.ts` | `test/unit/spec/breakouts/index.ts` | none | PRESENT |
125
+ | `BREAKOUTS-R-002` | Attendee `join()`, `leave()`, and `askForHelp()` execute on the per-session object in `breakout.ts`; controller broadcasts delegate to `BreakoutRequest.broadcast()`. | The session object and controller have distinct request ownership, so attributing every attendee operation to `index.ts` hides the actual call boundary. | `src/breakouts/breakout.ts`, `src/breakouts/index.ts`, `src/breakouts/request.ts` | `test/unit/spec/breakouts/breakout.ts`, `test/unit/spec/breakouts/index.ts`, `test/unit/spec/breakouts/request.ts` | none | PRESENT |
126
+ | `BREAKOUTS-R-003` | Request failures remain caller-visible and edit-lock conflicts are mapped explicitly. `unLockEditBreakout()` clears the keepalive, but `cleanUp()` only stops listeners/resets message subscription and does not clear the edit-lock timer. | The timer ownership gap must remain visible so cleanup is not relied on to release an editor that current code leaves active. | `src/breakouts/index.ts`, `src/breakouts/edit-lock-error.ts` | `test/unit/spec/breakouts/index.ts`, `test/unit/spec/breakouts/edit-lock-error.ts` | cleanup does not clear the edit-lock keepalive timer | PRESENT |
127
+ | `BREAKOUTS-R-004` | Roster, session type, broadcasts, help requests, and return-to-main updates reconcile into meeting-scoped breakout/session/member projections and events. | Attendees need current session membership and host messages without consuming raw Locus/service payloads. | `src/breakouts/index.ts`, `src/breakouts/breakout.ts`, `src/breakouts/collection.ts` | `test/unit/spec/breakouts/index.ts`, `test/unit/spec/breakouts/breakout.ts`, `test/unit/spec/breakouts/collection.ts` | none | PRESENT |
128
+ | `BREAKOUTS-R-005` | Host create/start/end/update/assign/move/remove operations use current session ids/URLs and direct request calls owned by `index.ts`; `canManageBreakouts` is stored but does not gate these methods. | These operations mutate shared server state, and the current absence of a local capability guard must not be replaced with an invented authorization guarantee. | `src/breakouts/index.ts` | `test/unit/spec/breakouts/index.ts` | stored management capability is not enforced by host mutation methods | PRESENT |
129
+ | `BREAKOUTS-R-006` | Edit-lock acquire/keepalive/unlock is coordinated around host configuration and maps lock conflicts to `BreakoutEditLockedError`; explicit unlock clears the timer. | Multiple hosts can edit breakout configuration, so conflict identity and explicit unlock behavior must remain stable even though general cleanup has a timer gap. | `src/breakouts/index.ts`, `src/breakouts/edit-lock-error.ts`, `src/breakouts/utils.ts` | `test/unit/spec/breakouts/edit-lock-error.ts`, `test/unit/spec/breakouts/utils.js` | general cleanup does not clear the timer | PRESENT |
130
+
131
+ ## Design Overview
132
+
133
+ Breakouts projects Locus breakout state into `Breakout` objects and a collection, performs most server mutations directly from `index.ts`, delegates only broadcast delivery to `BreakoutRequest`, emits feature events from `index.ts`, uses `events.ts` for breakout Call Analyzer metrics, and owns the edit-lock keepalive timer.
134
+
135
+ ## Data Flow
136
+
137
+ ```mermaid
138
+ flowchart LR
139
+ Locus[Locus breakout projection] --> Controller[index.ts]
140
+ Controller --> Collection[collection.ts]
141
+ Collection --> Session[breakout.ts]
142
+ Caller[Meeting / host / attendee] --> Controller
143
+ Caller --> Session
144
+ Controller --> Direct[index.ts request / webex.request]
145
+ Direct --> Service[Breakout service URLs]
146
+ Controller --> Request[request.ts broadcast helper]
147
+ Request --> Service
148
+ Controller --> FeatureEvents[index.ts scoped feature events]
149
+ Controller --> Metrics[events.ts Call Analyzer metrics]
150
+ Controller --> Lock[edit lock token + keepalive]
151
+ ```
152
+
153
+ ## Sequence Diagram(s)
154
+
155
+ Sequence coverage:
156
+
157
+ | Operation group | Diagram | Failure coverage |
158
+ |---|---|---|
159
+ | UC-1…UC-5 — breakout session and edit-lock operation groups | Breakout session and edit-lock primary sequence | invalid session context, edit-lock conflict, request rejection, and listener/session cleanup |
160
+ | UC-1…UC-5 — breakout session and edit-lock alternate/failure paths | Breakout session and edit-lock alternate/failure sequence | invalid session/lock context, edit-lock conflict, breakout service rejection, or absent local capability enforcement |
161
+
162
+ ### Breakout session and edit-lock primary sequence
163
+
164
+ ```mermaid
165
+ sequenceDiagram
166
+ participant C as Host or attendee
167
+ participant B as Breakouts index.ts
168
+ participant O as Breakout breakout.ts
169
+ participant R as index.ts request boundary
170
+ participant BR as BreakoutRequest
171
+ participant S as Breakout service
172
+ C->>B: host mutation or controller broadcast
173
+ C->>O: attendee join / leave / help
174
+ B->>B: resolve session/URL and edit lock where required; no canManageBreakouts guard
175
+ alt attendee session operation
176
+ O->>S: direct session request
177
+ S-->>O: response or error
178
+ O-->>C: response, rejection, or synchronous leave guard throw
179
+ else broadcast
180
+ B->>BR: broadcast(current URL, group, roles)
181
+ BR->>S: POST message
182
+ S-->>BR: accepted response or error
183
+ BR-->>B: response
184
+ else host operation
185
+ B->>R: direct request with current URL and ids
186
+ R->>S: HTTP request
187
+ S-->>R: accepted state or error
188
+ R-->>B: response
189
+ end
190
+ B->>B: reconcile collection and lock timer when applicable
191
+ B-->>C: result and scoped breakout event
192
+ ```
193
+
194
+ ### Breakout session and edit-lock alternate/failure sequence
195
+
196
+ ```mermaid
197
+ sequenceDiagram
198
+ participant H as Host / attendee
199
+ participant B as Breakouts
200
+ participant O as Breakout breakout.ts
201
+ participant S as Breakout service
202
+ alt attendee join, leave, or help operation
203
+ H->>O: perform attendee session operation
204
+ opt leave operation
205
+ O->>O: reject main-session leave or a missing main session
206
+ end
207
+ O->>S: direct session request
208
+ S-->>O: response or rejection
209
+ O-->>H: response or returned rejection; leave guard may throw synchronously
210
+ else valid host operation
211
+ H->>B: acquire lock or perform host operation
212
+ B->>B: validate session URL, ids, and edit-lock state where required; do not check canManageBreakouts
213
+ B->>S: direct request or broadcast helper request
214
+ S-->>B: response
215
+ B-->>H: request result and reconciled breakout projection
216
+ else local edit lock is already held
217
+ B--xH: lockBreakout() returned rejection carrying a plain Error, not BreakoutEditLockedError
218
+ else breakout service conflict or request rejection
219
+ S--xB: BreakoutEditLockedError or service rejection through the returned promise
220
+ B--xH: returned rejection
221
+ end
222
+ ```
223
+
224
+ ## Class / Component Relationships
225
+
226
+ ```mermaid
227
+ classDiagram
228
+ class Locus
229
+ class Controller
230
+ class Collection
231
+ class Session
232
+ class Caller
233
+ class Direct
234
+ class Request
235
+ class Service
236
+ class Events
237
+ class Lock
238
+ Locus --> Controller
239
+ Controller --> Collection
240
+ Collection --> Session
241
+ Caller --> Controller
242
+ Controller --> Direct
243
+ Direct --> Service
244
+ Controller --> Request
245
+ Request --> Service
246
+ Controller --> Events
247
+ Controller --> Lock
248
+ ```
249
+
250
+ The arrows identify ownership and delegation inside `src/breakouts/`; files that only declare types or constants are not presented as transports.
251
+
252
+ ## Use Cases
253
+
254
+ - **UC-1:** Reconcile session, roster, help, broadcast, and return-to-main changes into the meeting-scoped controller collection. Evidence: `src/breakouts/index.ts`, `src/breakouts/collection.ts`.
255
+ - **UC-2:** Join, leave, request help, or receive broadcast on an individual `Breakout` object and maintain that session's member roster. Evidence: `src/breakouts/breakout.ts`.
256
+ - **UC-3:** Create, clear, start, end, or update breakout sessions through the host controller request path. Evidence: `src/breakouts/index.ts`, `src/breakouts/request.ts`.
257
+ - **UC-4:** Query preassignments, dynamically assign participants, move them to lobby, or remove them from a breakout. Evidence: `src/breakouts/index.ts`, `src/breakouts/request.ts`.
258
+ - **UC-5:** Acquire and refresh an edit lock before protected host mutations, mapping service conflicts to `BreakoutEditLockedError`. Evidence: `src/breakouts/index.ts`, `src/breakouts/edit-lock-error.ts`.
259
+
260
+ ## State Model
261
+
262
+ Breakout collection, current/main session ids, management capability, edit-lock token/timer, roster state, subscriptions, and pending metric context are meeting scoped.
263
+
264
+ ## Business Rules & Invariants
265
+
266
+ - Host mutations use current session/service context and a valid edit lock where applicable; current code stores `canManageBreakouts` but does not enforce it. Collection/session ids remain consistent; `cleanUp()` releases subscriptions but not the edit-lock keepalive. Enforced under `src/breakouts/`.
267
+
268
+ ## Concurrency & Reactive Flow
269
+
270
+ - The active edit-lock token and its keepalive timer belong to one host edit session. `unLockEditBreakout()` clears that timer, while `cleanUp()` does not; roster and session updates reconcile by their current session/member ids before scoped breakout events are emitted.
271
+
272
+ ## State Machine
273
+
274
+ ```mermaid
275
+ stateDiagram-v2
276
+ [*] --> CLOSED
277
+ CLOSED --> PENDING: host prepares sessions
278
+ PENDING --> OPEN: start
279
+ OPEN --> CLOSING: close requested
280
+ CLOSING --> CLOSED: sessions close
281
+ OPEN --> OPEN: roster / help / broadcast update
282
+ ```
283
+
284
+ The diagram uses the breakout `CLOSED`, `PENDING`, `OPEN`, and `CLOSING` values declared in `src/constants.ts`.
285
+
286
+ ## Error Handling & Failure Modes
287
+
288
+ | Condition | Signal | Caller recovery |
289
+ |---|---|---|
290
+ | Required session/main-session context is absent | Guards such as `Breakout.leave()`, controller `getMainSession()`, and controller broadcast throw synchronously; other async methods return rejected promises for their own missing URL/id checks. Stored management capability is not a local guard. | Distinguish a direct throw from an async rejection and refresh current breakout state before retrying. |
291
+ | Another editor owns the breakout lock | A service lock conflict is mapped to `BreakoutEditLockedError` by `boServiceErrorHandler()`; a lock already held locally instead rejects with a plain `Error('Breakout already locked')` from the `async` `lockBreakout()`. | Wait for the lock owner to release it before retrying, and do not assume every lock failure is a `BreakoutEditLockedError`. |
292
+ | A breakout request rejects or the controller is cleaned up | The returned request promise remains rejected; cleanup removes owned listeners but does not cancel the edit-lock keepalive timer. | Handle the asynchronous rejection and explicitly unlock before discarding an edit session. |
293
+
294
+ ## Pitfalls
295
+
296
+ - The retained README says host operations were not implemented, but current code implements create/start/end/update/assignment and edit locking. Do not preserve that stale limitation.
297
+ - Verify both typed constants/enums and raw wire values before changing a logical condition in this legacy package.
298
+
299
+ ## Module Do's / Don'ts
300
+
301
+ - DO preserve this boundary: Reconcile session, roster, help, broadcast, and return-to-main changes into the meeting-scoped collection.
302
+ - DON'T move remote I/O or lifecycle ownership into a passive type, constant, catalog, or normalization file.
303
+
304
+ ## Key Design Trade-off
305
+
306
+ - Edit locking prevents concurrent host configuration conflicts, but requires keepalive, unlock, and failure cleanup around mutations.
307
+
308
+ ## Test-Case Strategy (module)
309
+
310
+ Use the current mirrored suites: `test/unit/spec/breakouts/breakout.ts`, `test/unit/spec/breakouts/collection.ts`, `test/unit/spec/breakouts/edit-lock-error.ts`, `test/unit/spec/breakouts/events.ts`, `test/unit/spec/breakouts/index.ts`, `test/unit/spec/breakouts/request.ts`, `test/unit/spec/breakouts/utils.js`. Characterize the breakouts-specific use cases above and each listed failure condition; add cleanup or transition cases only for resources and state this module actually owns.
311
+
312
+ | Behavior / Requirement | Existing test evidence | Gap |
313
+ |---|---|---|
314
+ | `BREAKOUTS-R-001` | `test/unit/spec/breakouts/index.ts` | cover controller reconciliation separately from per-session `Breakout` operations |
315
+ | `BREAKOUTS-R-002` | `test/unit/spec/breakouts/index.ts` | cover each create/start/end/update/assignment body and its required URL/session context |
316
+ | `BREAKOUTS-R-003` | `test/unit/spec/breakouts/index.ts`, `test/unit/spec/breakouts/breakout.ts` | characterize lock conflict, session-object join/leave/help failures, and listener cleanup as separate outcomes |
317
+ | `BREAKOUTS-R-004` | `test/unit/spec/breakouts/index.ts`, `test/unit/spec/breakouts/breakout.ts` | verify duplicate/out-of-order roster updates |
318
+ | `BREAKOUTS-R-005` | `test/unit/spec/breakouts/index.ts` | characterize that host mutations proceed without a local `canManageBreakouts` rejection and leave authorization to the service |
319
+ | `BREAKOUTS-R-006` | `test/unit/spec/breakouts/edit-lock-error.ts`, `test/unit/spec/breakouts/utils.js` | verify keepalive/unlock cleanup on failure |
320
+
321
+ ## Traceability
322
+
323
+ - Repo architecture: [`ARCHITECTURE.md`](../../../ai-docs/ARCHITECTURE.md) · Registry: [`SPEC_INDEX.md`](../../../ai-docs/SPEC_INDEX.md)
324
+ - Coverage state and contracts baseline: `../../../.sdd/manifest.json`
@@ -31,6 +31,7 @@ const Breakout = WebexPlugin.extend({
31
31
  groupId: 'string',
32
32
  url: 'string', // where to send requests to
33
33
  requestedLastModifiedTime: 'string',
34
+ resourceLink: 'string', // the resource link for this breakout session, used for telemetry and logging
34
35
  },
35
36
 
36
37
  derived: {
@@ -165,7 +166,8 @@ const Breakout = WebexPlugin.extend({
165
166
  return;
166
167
  }
167
168
  this.breakoutRosterLocus = locus;
168
- this.members.locusParticipantsUpdate(locus);
169
+ // The roster via breakout roster event is full roster, use replace strategy to update the members
170
+ this.members.locusParticipantsUpdate({participants: locus.participants, isReplace: true});
169
171
  },
170
172
 
171
173
  /**
@@ -36,20 +36,42 @@ const breakoutEvent: {
36
36
  if (!eventInfo?.breakoutMoveId || !eventInfo?.meeting) {
37
37
  return;
38
38
  }
39
- if (!eventInfo.meeting.meetingInfo?.enableConvergedArchitecture) {
39
+
40
+ const {breakoutMoveId, currentSession, error, llmLatency, llmWebsocketUrl, meeting} = eventInfo;
41
+
42
+ if (!meeting.meetingInfo?.enableConvergedArchitecture) {
40
43
  return;
41
44
  }
42
- submitClientEvent({
43
- name: event,
44
- payload: {
45
- identifiers: {
46
- breakoutMoveId: eventInfo.breakoutMoveId,
47
- breakoutSessionId: eventInfo?.currentSession?.sessionId,
48
- breakoutGroupId: eventInfo?.currentSession?.groupId,
49
- },
45
+
46
+ if (
47
+ event === 'client.breakout-session.join.response' &&
48
+ typeof meeting.shouldEmitBreakoutJoinResponseMetric === 'function' &&
49
+ !meeting.shouldEmitBreakoutJoinResponseMetric(breakoutMoveId, Boolean(llmLatency))
50
+ ) {
51
+ return;
52
+ }
53
+
54
+ const payload: any = {
55
+ llmLatency,
56
+ identifiers: {
57
+ breakoutMoveId,
58
+ breakoutSessionId: currentSession?.sessionId,
59
+ breakoutGroupId: currentSession?.groupId,
60
+ llmWebsocketUrl,
50
61
  },
51
- options: {meetingId: eventInfo.meeting.id},
52
- });
62
+ };
63
+
64
+ const options: any = {
65
+ meetingId: meeting.id,
66
+ rawError: error,
67
+ };
68
+
69
+ const metricEvent = {
70
+ name: event,
71
+ payload,
72
+ options,
73
+ };
74
+ submitClientEvent(metricEvent);
53
75
  },
54
76
  };
55
77
 
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import {WebexPlugin} from '@webex/webex-core';
5
5
  import {debounce, forEach} from 'lodash';
6
+ import type LLMChannel from '@webex/internal-plugin-llm';
6
7
  import LoggerProxy from '../common/logs/logger-proxy';
7
8
 
8
9
  import {BREAKOUTS, MEETINGS, HTTP_VERBS, _ID_} from '../constants';
@@ -32,6 +33,7 @@ const Breakouts = WebexPlugin.extend({
32
33
  name: 'string', // only present when in a breakout session
33
34
  sessionId: 'string', // appears from the moment you enable breakouts
34
35
  sessionType: 'string', // appears from the moment you enable breakouts
36
+ breakoutMoveId: 'string', // used to correlate breakout move/join diagnostics
35
37
  startTime: 'string', // appears once breakouts start
36
38
  status: 'string', // only present when in a breakout session
37
39
  url: 'string', // appears from the moment you enable breakouts
@@ -47,6 +49,8 @@ const Breakouts = WebexPlugin.extend({
47
49
  canManageBreakouts: 'boolean', // appear the ability to manage breakouts
48
50
  mainGroupId: 'string', // appears from the moment you enable breakouts
49
51
  mainSessionId: 'string', // appears from the moment you enable breakouts
52
+ hasSubscribedToMessage: 'boolean', // tracks if listening to LLM broadcast messages
53
+ _llmChannel: 'object', // registered LLM channel for broadcast messages
50
54
  },
51
55
  children: {
52
56
  currentBreakoutSession: Breakout,
@@ -149,9 +153,16 @@ const Breakouts = WebexPlugin.extend({
149
153
  this.listenTo(this.breakouts, 'change:requestedLastModifiedTime', (breakout) => {
150
154
  this.triggerReturnToMainEvent(breakout);
151
155
  });
156
+ this.listenTo(
157
+ this,
158
+ BREAKOUTS.EVENTS.LLM_CONNECT_RESPONSE,
159
+ this.handleLLMBreakoutJoinResponseMetric
160
+ );
152
161
  this.listenToCurrentSessionTypeChange();
153
162
  this.listenToBreakoutRosters();
154
163
  this.listenToBreakoutHelp();
164
+ // LLM may connect after locusUrlUpdate has already run, so re-check the broadcast subscription on connect
165
+ this.listenTo(this.webex.internal.llm, 'online', () => this.listenToBroadcastMessages());
155
166
  // @ts-ignore
156
167
  this.breakoutRequest = new BreakoutRequest({webex: this.webex});
157
168
  },
@@ -253,16 +264,44 @@ const Breakouts = WebexPlugin.extend({
253
264
  );
254
265
  },
255
266
 
267
+ /**
268
+ * Registers the LLM channel for broadcast messages
269
+ * @param {LLMChannel} channel - The LLM channel to use for breakout messages
270
+ * @returns {void}
271
+ */
272
+ registerLLMChannel(channel: LLMChannel) {
273
+ // If already subscribed to a previous channel, clean it up
274
+ if (this.hasSubscribedToMessage && this._llmChannel) {
275
+ this.stopListening(this._llmChannel);
276
+ this.hasSubscribedToMessage = false;
277
+ }
278
+
279
+ this._llmChannel = channel;
280
+ this.listenToBroadcastMessages();
281
+ },
282
+
283
+ /**
284
+ * Unregisters the LLM channel
285
+ * @returns {void}
286
+ */
287
+ unregisterLLMChannel() {
288
+ if (this._llmChannel) {
289
+ this.stopListening(this._llmChannel);
290
+ this._llmChannel = undefined;
291
+ this.hasSubscribedToMessage = false;
292
+ }
293
+ },
294
+
256
295
  /**
257
296
  * Sets up listener for broadcast messages sent to the breakout session
258
297
  * @returns {void}
259
298
  */
260
299
  listenToBroadcastMessages() {
261
- if (!this.webex.internal.llm.isConnected() || this.hasSubscribedToMessage) {
300
+ if (!this._llmChannel?.isConnected() || this.hasSubscribedToMessage) {
262
301
  return;
263
302
  }
264
303
 
265
- this.listenTo(this.webex.internal.llm, 'event:breakout.message', (event) => {
304
+ this.listenTo(this._llmChannel, 'event:breakout.message', (event) => {
266
305
  const {
267
306
  data: {senderUserId, sentTime, message},
268
307
  } = event;
@@ -327,7 +366,10 @@ const Breakouts = WebexPlugin.extend({
327
366
  * @returns {void}
328
367
  */
329
368
  updateBreakout(params) {
369
+ const breakoutMoveId = params.breakoutMoveId || this.breakoutMoveId;
370
+
330
371
  this.set(params);
372
+ this.set('breakoutMoveId', breakoutMoveId);
331
373
  // These values are set manually so they are unset when they are not included in params
332
374
  this.set('groups', params.groups);
333
375
  this.set('startTime', params.startTime);
@@ -340,6 +382,7 @@ const Breakouts = WebexPlugin.extend({
340
382
  current: true,
341
383
  sessionType: params.sessionType,
342
384
  url: params.url,
385
+ resourceLink: params.resourceLink,
343
386
  [BREAKOUTS.SESSION_STATES.ACTIVE]: false,
344
387
  [BREAKOUTS.SESSION_STATES.ALLOWED]: false,
345
388
  [BREAKOUTS.SESSION_STATES.ASSIGNED]: false,
@@ -361,12 +404,81 @@ const Breakouts = WebexPlugin.extend({
361
404
  {
362
405
  currentSession: this.currentBreakoutSession,
363
406
  meeting,
364
- breakoutMoveId: params.breakoutMoveId,
407
+ breakoutMoveId,
365
408
  },
366
409
  // @ts-ignore
367
410
  this.webex.internal.newMetrics.submitClientEvent.bind(this.webex.internal.newMetrics)
368
411
  );
369
412
  }
413
+
414
+ this.submitLLMBreakoutJoinResponseMetric();
415
+ },
416
+
417
+ /**
418
+ * Stores the latest LLM connect response and tries to send the LLM-enhanced breakout join response.
419
+ * The breakout update and the LLM response are delivered independently, so either side can arrive first.
420
+ * @param {Object} eventInfo LLM connect response info
421
+ * @param {Object} eventInfo.meeting meeting instance
422
+ * @param {Object} eventInfo.llmLatency LLM latency values
423
+ * @param {Object} [eventInfo.error] LLM connection error
424
+ * @returns {void}
425
+ */
426
+ handleLLMBreakoutJoinResponseMetric(eventInfo: any) {
427
+ this.llmBreakoutJoinResponseInfo = {
428
+ ...eventInfo,
429
+ breakoutMoveId: this.breakoutMoveId,
430
+ };
431
+
432
+ this.submitLLMBreakoutJoinResponseMetric();
433
+ },
434
+
435
+ /**
436
+ * Sends the LLM-enhanced breakout join response metric when both breakout state and LLM latency
437
+ * are available. LLM reconnects can also happen while leaving a breakout, before stale breakout
438
+ * fields are fully cleared, so the joined-session check lives with the breakout state.
439
+ *
440
+ * The joined session changes both when joining a breakout and when returning to the main
441
+ * session, and the client reconnects LLM in both directions. Mirroring the desktop client, we
442
+ * emit the join response for either transition, so the active-breakout check also accepts the
443
+ * main session. Non-breakout meetings never carry a breakoutMoveId, and a given move id is
444
+ * reported at most once, so accepting the main session here cannot leak spurious events.
445
+ * @returns {void}
446
+ */
447
+ submitLLMBreakoutJoinResponseMetric() {
448
+ const eventInfo = this.llmBreakoutJoinResponseInfo;
449
+
450
+ // The breakout update and the LLM response arrive independently, so only emit once both the
451
+ // breakout move and its matching LLM latency are available for a session we have actually joined.
452
+ const hasMatchingMoveId =
453
+ !!this.breakoutMoveId && eventInfo?.breakoutMoveId === this.breakoutMoveId;
454
+ const hasSessionIdentifiers =
455
+ !!this.currentBreakoutSession?.sessionId && !!this.currentBreakoutSession?.groupId;
456
+ // isActiveBreakout already covers an open/closing breakout; isInMainSession covers return-to-main.
457
+ const isJoinedSession = this.isActiveBreakout || this.isInMainSession;
458
+
459
+ if (!eventInfo || !hasMatchingMoveId || !hasSessionIdentifiers || !isJoinedSession) {
460
+ return;
461
+ }
462
+
463
+ const {llmLatency, error} = eventInfo;
464
+ const meeting = eventInfo.meeting || this.webex.meetings.getMeetingByType(_ID_, this.meetingId);
465
+ // @ts-ignore
466
+ const llmWebsocketUrl = this.webex.internal.llm.getWebSocketUrl?.() || undefined;
467
+
468
+ breakoutEvent.onBreakoutJoinResponse(
469
+ {
470
+ currentSession: this.currentBreakoutSession,
471
+ meeting,
472
+ breakoutMoveId: this.breakoutMoveId,
473
+ llmLatency,
474
+ llmWebsocketUrl,
475
+ error,
476
+ },
477
+ // @ts-ignore
478
+ this.webex.internal.newMetrics.submitClientEvent.bind(this.webex.internal.newMetrics)
479
+ );
480
+
481
+ this.llmBreakoutJoinResponseInfo = undefined;
370
482
  },
371
483
 
372
484
  /**
@@ -985,6 +1097,36 @@ const Breakouts = WebexPlugin.extend({
985
1097
  body,
986
1098
  });
987
1099
  },
1100
+ /**
1101
+ * Remove participants from their current breakout session back to the main session
1102
+ * @param {string[]} participants - participant IDs to remove from breakout
1103
+ * @returns {Promise}
1104
+ */
1105
+ removeFromBreakout(participants: string[]) {
1106
+ if (!this.mainGroupId || !this.mainSessionId) {
1107
+ throw new Error(
1108
+ 'Main group ID and session ID must be available to remove participants from breakout'
1109
+ );
1110
+ }
1111
+
1112
+ return this.request({
1113
+ method: HTTP_VERBS.POST,
1114
+ uri: `${this.url}/move`,
1115
+ body: {
1116
+ groups: [
1117
+ {
1118
+ id: this.mainGroupId,
1119
+ sessions: [
1120
+ {
1121
+ id: this.mainSessionId,
1122
+ participants,
1123
+ },
1124
+ ],
1125
+ },
1126
+ ],
1127
+ },
1128
+ });
1129
+ },
988
1130
  /**
989
1131
  * trigger ASK_RETURN_TO_MAIN event when main session requested
990
1132
  * @param {Object} breakout