@webex/plugin-meetings 3.12.0-next.15 → 3.12.0-next.151

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 (296) 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 +207 -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/dist/aiEnableRequest/index.js +15 -2
  40. package/dist/aiEnableRequest/index.js.map +1 -1
  41. package/dist/annotation/index.js +2 -2
  42. package/dist/annotation/index.js.map +1 -1
  43. package/dist/breakouts/breakout.js +8 -3
  44. package/dist/breakouts/breakout.js.map +1 -1
  45. package/dist/breakouts/events.js +29 -14
  46. package/dist/breakouts/events.js.map +1 -1
  47. package/dist/breakouts/index.js +99 -4
  48. package/dist/breakouts/index.js.map +1 -1
  49. package/dist/common/errors/webex-errors.js +49 -5
  50. package/dist/common/errors/webex-errors.js.map +1 -1
  51. package/dist/config.js +2 -2
  52. package/dist/config.js.map +1 -1
  53. package/dist/constants.js +37 -10
  54. package/dist/constants.js.map +1 -1
  55. package/dist/controls-options-manager/index.js +46 -10
  56. package/dist/controls-options-manager/index.js.map +1 -1
  57. package/dist/hashTree/constants.js +4 -1
  58. package/dist/hashTree/constants.js.map +1 -1
  59. package/dist/hashTree/hashTreeParser.js +1096 -391
  60. package/dist/hashTree/hashTreeParser.js.map +1 -1
  61. package/dist/hashTree/utils.js +20 -0
  62. package/dist/hashTree/utils.js.map +1 -1
  63. package/dist/index.js +7 -0
  64. package/dist/index.js.map +1 -1
  65. package/dist/interceptors/dataChannelAuthToken.js +75 -15
  66. package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
  67. package/dist/interceptors/locusRetry.js +23 -8
  68. package/dist/interceptors/locusRetry.js.map +1 -1
  69. package/dist/interpretation/index.js +55 -12
  70. package/dist/interpretation/index.js.map +1 -1
  71. package/dist/interpretation/interpretation.types.js +7 -0
  72. package/dist/interpretation/interpretation.types.js.map +1 -0
  73. package/dist/interpretation/siLanguage.js +1 -1
  74. package/dist/locus-info/controlsUtils.js +4 -1
  75. package/dist/locus-info/controlsUtils.js.map +1 -1
  76. package/dist/locus-info/index.js +615 -176
  77. package/dist/locus-info/index.js.map +1 -1
  78. package/dist/locus-info/infoUtils.js +36 -5
  79. package/dist/locus-info/infoUtils.js.map +1 -1
  80. package/dist/locus-info/types.js +20 -0
  81. package/dist/locus-info/types.js.map +1 -1
  82. package/dist/media/MediaConnectionAwaiter.js +15 -2
  83. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  84. package/dist/media/index.js +8 -2
  85. package/dist/media/index.js.map +1 -1
  86. package/dist/media/properties.js +4 -5
  87. package/dist/media/properties.js.map +1 -1
  88. package/dist/meeting/in-meeting-actions.js +7 -1
  89. package/dist/meeting/in-meeting-actions.js.map +1 -1
  90. package/dist/meeting/index.js +1684 -835
  91. package/dist/meeting/index.js.map +1 -1
  92. package/dist/meeting/locusMediaRequest.js +229 -82
  93. package/dist/meeting/locusMediaRequest.js.map +1 -1
  94. package/dist/meeting/muteState.js +10 -1
  95. package/dist/meeting/muteState.js.map +1 -1
  96. package/dist/meeting/request.js +5 -2
  97. package/dist/meeting/request.js.map +1 -1
  98. package/dist/meeting/util.js +37 -3
  99. package/dist/meeting/util.js.map +1 -1
  100. package/dist/meeting/voicea-meeting.js +2 -1
  101. package/dist/meeting/voicea-meeting.js.map +1 -1
  102. package/dist/meeting-info/meeting-info-v2.js +9 -3
  103. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  104. package/dist/meetings/index.js +300 -128
  105. package/dist/meetings/index.js.map +1 -1
  106. package/dist/meetings/meetings.types.js +6 -1
  107. package/dist/meetings/meetings.types.js.map +1 -1
  108. package/dist/meetings/request.js +39 -0
  109. package/dist/meetings/request.js.map +1 -1
  110. package/dist/meetings/util.js +116 -18
  111. package/dist/meetings/util.js.map +1 -1
  112. package/dist/member/index.js +10 -0
  113. package/dist/member/index.js.map +1 -1
  114. package/dist/member/types.js.map +1 -1
  115. package/dist/member/util.js +30 -0
  116. package/dist/member/util.js.map +1 -1
  117. package/dist/members/index.js +101 -43
  118. package/dist/members/index.js.map +1 -1
  119. package/dist/members/util.js +8 -1
  120. package/dist/members/util.js.map +1 -1
  121. package/dist/metrics/constants.js +7 -1
  122. package/dist/metrics/constants.js.map +1 -1
  123. package/dist/multistream/codec/constants.js +63 -0
  124. package/dist/multistream/codec/constants.js.map +1 -0
  125. package/dist/multistream/mediaRequestManager.js +62 -15
  126. package/dist/multistream/mediaRequestManager.js.map +1 -1
  127. package/dist/multistream/receiveSlot.js +9 -0
  128. package/dist/multistream/receiveSlot.js.map +1 -1
  129. package/dist/reachability/clusterReachability.js.map +1 -1
  130. package/dist/reachability/index.js +121 -83
  131. package/dist/reachability/index.js.map +1 -1
  132. package/dist/reachability/reachability.types.js +2 -0
  133. package/dist/reachability/reachability.types.js.map +1 -1
  134. package/dist/reachability/util.js +45 -0
  135. package/dist/reachability/util.js.map +1 -1
  136. package/dist/reactions/reactions.type.js.map +1 -1
  137. package/dist/recording-controller/index.js +1 -3
  138. package/dist/recording-controller/index.js.map +1 -1
  139. package/dist/roap/turnDiscovery.js +8 -1
  140. package/dist/roap/turnDiscovery.js.map +1 -1
  141. package/dist/types/common/errors/webex-errors.d.ts +32 -2
  142. package/dist/types/config.d.ts +2 -2
  143. package/dist/types/constants.d.ts +13 -1
  144. package/dist/types/controls-options-manager/index.d.ts +16 -0
  145. package/dist/types/hashTree/constants.d.ts +1 -0
  146. package/dist/types/hashTree/hashTreeParser.d.ts +201 -22
  147. package/dist/types/hashTree/utils.d.ts +7 -0
  148. package/dist/types/index.d.ts +3 -0
  149. package/dist/types/interceptors/locusRetry.d.ts +4 -4
  150. package/dist/types/interpretation/interpretation.types.d.ts +10 -0
  151. package/dist/types/locus-info/index.d.ts +106 -8
  152. package/dist/types/locus-info/infoUtils.d.ts +8 -0
  153. package/dist/types/locus-info/types.d.ts +22 -1
  154. package/dist/types/media/MediaConnectionAwaiter.d.ts +10 -1
  155. package/dist/types/media/properties.d.ts +6 -2
  156. package/dist/types/meeting/in-meeting-actions.d.ts +6 -0
  157. package/dist/types/meeting/index.d.ts +176 -11
  158. package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
  159. package/dist/types/meeting/request.d.ts +1 -0
  160. package/dist/types/meeting/util.d.ts +9 -0
  161. package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
  162. package/dist/types/meetings/index.d.ts +40 -19
  163. package/dist/types/meetings/meetings.types.d.ts +15 -0
  164. package/dist/types/meetings/request.d.ts +14 -0
  165. package/dist/types/member/index.d.ts +1 -0
  166. package/dist/types/member/types.d.ts +1 -0
  167. package/dist/types/member/util.d.ts +9 -0
  168. package/dist/types/members/index.d.ts +15 -2
  169. package/dist/types/members/util.d.ts +1 -5
  170. package/dist/types/metrics/constants.d.ts +6 -0
  171. package/dist/types/multistream/codec/constants.d.ts +7 -0
  172. package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
  173. package/dist/types/reachability/clusterReachability.d.ts +3 -3
  174. package/dist/types/reachability/index.d.ts +10 -3
  175. package/dist/types/reachability/reachability.types.d.ts +7 -0
  176. package/dist/types/reachability/util.d.ts +17 -0
  177. package/dist/types/reactions/reactions.type.d.ts +3 -0
  178. package/dist/webinar/index.js +307 -161
  179. package/dist/webinar/index.js.map +1 -1
  180. package/package.json +23 -23
  181. package/src/aiEnableRequest/ai-docs/ai-enable-request-spec.md +223 -0
  182. package/src/aiEnableRequest/index.ts +16 -0
  183. package/src/annotation/ai-docs/annotation-spec.md +236 -0
  184. package/src/annotation/index.ts +6 -4
  185. package/src/breakouts/ai-docs/breakouts-spec.md +324 -0
  186. package/src/breakouts/breakout.ts +3 -1
  187. package/src/breakouts/events.ts +33 -11
  188. package/src/breakouts/index.ts +122 -2
  189. package/src/common/errors/webex-errors.ts +50 -3
  190. package/src/config.ts +2 -2
  191. package/src/constants.ts +21 -3
  192. package/src/controls-options-manager/ai-docs/controls-options-manager-spec.md +243 -0
  193. package/src/controls-options-manager/index.ts +62 -10
  194. package/src/hashTree/ai-docs/hash-tree-spec.md +267 -0
  195. package/src/hashTree/constants.ts +7 -0
  196. package/src/hashTree/hashTreeParser.ts +861 -193
  197. package/src/hashTree/utils.ts +19 -0
  198. package/src/index.ts +6 -0
  199. package/src/interceptors/ai-docs/interceptors-spec.md +247 -0
  200. package/src/interceptors/dataChannelAuthToken.ts +88 -12
  201. package/src/interceptors/locusRetry.ts +25 -4
  202. package/src/interpretation/ai-docs/interpretation-spec.md +256 -0
  203. package/src/interpretation/index.ts +65 -10
  204. package/src/interpretation/interpretation.types.ts +11 -0
  205. package/src/locus-info/ai-docs/locus-info-spec.md +293 -0
  206. package/src/locus-info/controlsUtils.ts +3 -1
  207. package/src/locus-info/index.ts +566 -164
  208. package/src/locus-info/infoUtils.ts +41 -6
  209. package/src/locus-info/types.ts +26 -1
  210. package/src/media/MediaConnectionAwaiter.ts +21 -4
  211. package/src/media/ai-docs/media-spec.md +267 -0
  212. package/src/media/index.ts +10 -1
  213. package/src/media/properties.ts +8 -3
  214. package/src/meeting/ai-docs/meeting-spec.md +401 -0
  215. package/src/meeting/in-meeting-actions.ts +12 -0
  216. package/src/meeting/index.ts +937 -119
  217. package/src/meeting/locusMediaRequest.ts +106 -6
  218. package/src/meeting/muteState.ts +10 -1
  219. package/src/meeting/request.ts +11 -0
  220. package/src/meeting/util.ts +51 -7
  221. package/src/meeting/voicea-meeting.ts +1 -1
  222. package/src/meeting-info/ai-docs/meeting-info-spec.md +261 -0
  223. package/src/meeting-info/meeting-info-v2.ts +10 -4
  224. package/src/meetings/ai-docs/meetings-spec.md +296 -0
  225. package/src/meetings/index.ts +200 -80
  226. package/src/meetings/meetings.types.ts +19 -0
  227. package/src/meetings/request.ts +43 -0
  228. package/src/meetings/util.ts +117 -4
  229. package/src/member/ai-docs/member-spec.md +196 -0
  230. package/src/member/index.ts +10 -0
  231. package/src/member/types.ts +1 -0
  232. package/src/member/util.ts +29 -0
  233. package/src/members/ai-docs/members-spec.md +256 -0
  234. package/src/members/index.ts +70 -7
  235. package/src/members/util.ts +12 -4
  236. package/src/metrics/ai-docs/metrics-spec.md +185 -0
  237. package/src/metrics/constants.ts +6 -0
  238. package/src/multistream/ai-docs/multistream-spec.md +292 -0
  239. package/src/multistream/codec/constants.ts +58 -0
  240. package/src/multistream/mediaRequestManager.ts +119 -28
  241. package/src/multistream/receiveSlot.ts +18 -0
  242. package/src/personal-meeting-room/ai-docs/personal-meeting-room-spec.md +234 -0
  243. package/src/reachability/ai-docs/reachability-spec.md +261 -0
  244. package/src/reachability/clusterReachability.ts +3 -2
  245. package/src/reachability/index.ts +47 -16
  246. package/src/reachability/reachability.types.ts +11 -0
  247. package/src/reachability/util.ts +36 -0
  248. package/src/reactions/ai-docs/reactions-spec.md +198 -0
  249. package/src/reactions/reactions.type.ts +3 -0
  250. package/src/reconnection-manager/ai-docs/reconnection-manager-spec.md +272 -0
  251. package/src/recording-controller/ai-docs/recording-controller-spec.md +223 -0
  252. package/src/recording-controller/index.ts +1 -2
  253. package/src/roap/ai-docs/roap-spec.md +241 -0
  254. package/src/roap/turnDiscovery.ts +9 -1
  255. package/src/webinar/ai-docs/webinar-spec.md +243 -0
  256. package/src/webinar/index.ts +216 -38
  257. package/test/unit/spec/aiEnableRequest/index.ts +86 -0
  258. package/test/unit/spec/annotation/index.ts +3 -3
  259. package/test/unit/spec/breakouts/breakout.ts +9 -3
  260. package/test/unit/spec/breakouts/events.ts +120 -2
  261. package/test/unit/spec/breakouts/index.ts +223 -3
  262. package/test/unit/spec/common/errors/webex-errors.ts +78 -0
  263. package/test/unit/spec/controls-options-manager/index.js +139 -32
  264. package/test/unit/spec/hashTree/hashTreeParser.ts +2451 -184
  265. package/test/unit/spec/hashTree/utils.ts +37 -0
  266. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +196 -0
  267. package/test/unit/spec/interceptors/locusRetry.ts +205 -4
  268. package/test/unit/spec/interpretation/index.ts +119 -4
  269. package/test/unit/spec/locus-info/controlsUtils.js +172 -57
  270. package/test/unit/spec/locus-info/index.js +1014 -58
  271. package/test/unit/spec/locus-info/infoUtils.js +184 -1
  272. package/test/unit/spec/media/MediaConnectionAwaiter.ts +55 -0
  273. package/test/unit/spec/media/index.ts +92 -0
  274. package/test/unit/spec/media/properties.ts +23 -23
  275. package/test/unit/spec/meeting/in-meeting-actions.ts +6 -0
  276. package/test/unit/spec/meeting/index.js +2811 -117
  277. package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
  278. package/test/unit/spec/meeting/muteState.js +81 -0
  279. package/test/unit/spec/meeting/request.js +12 -0
  280. package/test/unit/spec/meeting/utils.js +179 -16
  281. package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
  282. package/test/unit/spec/meeting-info/meetinginfov2.js +76 -10
  283. package/test/unit/spec/meetings/index.js +544 -49
  284. package/test/unit/spec/meetings/request.js +141 -0
  285. package/test/unit/spec/meetings/utils.js +402 -51
  286. package/test/unit/spec/member/index.js +7 -0
  287. package/test/unit/spec/member/util.js +89 -0
  288. package/test/unit/spec/members/index.js +216 -0
  289. package/test/unit/spec/members/request.js +37 -1
  290. package/test/unit/spec/members/utils.js +63 -0
  291. package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
  292. package/test/unit/spec/reachability/index.ts +128 -46
  293. package/test/unit/spec/reachability/util.ts +31 -0
  294. package/test/unit/spec/recording-controller/index.js +9 -8
  295. package/test/unit/spec/roap/turnDiscovery.ts +20 -0
  296. package/test/unit/spec/webinar/index.ts +332 -31
@@ -0,0 +1,236 @@
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
+ # ANNOTATION — 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/annotation/`.
13
+
14
+ ## Metadata
15
+
16
+ | Field | Value |
17
+ |---|---|
18
+ | Module id | `annotation` |
19
+ | Source path(s) | `src/annotation/` |
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
+ | No routed legacy module spec | overview / API / behavior / tests | none; generated from current annotation controller/types/constants and tests |
36
+ | Current source and mirrored tests | implementation / tests | verified | requirements, flows, failures, and test strategy below |
37
+
38
+ ## Overview
39
+
40
+ `src/annotation/` contains 3 direct source/reference file(s) and has 1 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 annotation approval requests, Mercury/LLM listener registration, encrypted stroke relay, and the emitted annotation command/stroke events.
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/annotation/
54
+ ├── annotation.types.ts — module type declarations
55
+ ├── constants.ts — module constants and wire values
56
+ ├── index.ts — module facade/controller or primary exports
57
+ └── ai-docs/annotation-spec.md — canonical module specification
58
+ ```
59
+
60
+ ## Key Files (source of truth)
61
+
62
+ | File | Holds |
63
+ |---|---|
64
+ | `src/annotation/annotation.types.ts` | module type declarations |
65
+ | `src/annotation/constants.ts` | module constants and wire values |
66
+ | `src/annotation/index.ts` | module facade/controller or primary exports |
67
+ | `test/unit/spec/annotation/index.ts` | mirrored characterization/unit coverage |
68
+
69
+ ## Public Surface
70
+
71
+ | Contract ID | Type | Surface | Purpose | Compatibility / deprecation | Schema / detail link | Root index |
72
+ |---|---|---|---|---|---|---|
73
+ | `annotation.1` | SDK / lifecycle | `locusUrlUpdate()`, `approvalUrlUpdate()`, and `deregisterEvents()` | Store Locus/approval URLs, install listeners from `locusUrlUpdate()`, and remove the exact Mercury/LLM listeners on teardown. | `approvalUrlUpdate()` only assigns `approvalUrl`; preserve the once-only listener guard owned by `locusUrlUpdate()` and the three event topics. | `src/annotation/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
74
+ | `annotation.2` | SDK / remote | `approveAnnotation()`, `cancelApproveAnnotation()`, and `closeAnnotation()` | POST requested/closed share-annotation actions or PUT cancellation using the current approval context. | Preserve action/resource values, share instance id, and optional receiver routing. | `src/annotation/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
75
+ | `annotation.3` | SDK / remote | `acceptRequest()` and `declineRequest()` | PUT a presenter decision to the URL carried by an incoming approval. | Preserve the accepted/declined action values and direct request-promise result. | `src/annotation/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
76
+ | `annotation.4` | SDK / relay | `sendStrokeData()` and `ANNOTATION_STROKE_DATA` | Encrypt outbound stroke content, publish it on the selected LLM socket, decrypt inbound content, and emit the scoped stroke event. | Preserve sequence increments, relay/message fields, and the initial disconnected no-op. | `src/annotation/index.ts`, `src/annotation/constants.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
77
+ | `annotation.5` | exported constants/types | `EVENT_TRIGGERS`, `ANNOTATION_RESOURCE_TYPE`, `ANNOTATION_RELAY_TYPES`, `ANNOTATION_STATUS`, `ANNOTATION_POLICY`, `ANNOTATION_REQUEST_TYPE`, `ANNOTATION_ACTION_TYPE`, `ANNOTATION`, `StrokeData`, `RequestData`, `CommandRequestBody`, `IAnnotationChannel`, and `AnnotationInfo` | Share the exact approval and relay vocabulary used by Meeting, Webinar, and consumers. | Add fields compatibly; existing raw action, relay, resource, and event values are wire-sensitive. | `src/annotation/constants.ts`, `src/annotation/annotation.types.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
78
+
79
+ ### Emitted events
80
+
81
+ 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.
82
+
83
+ | Event literal | Constant / expression | Emission evidence |
84
+ |---|---|---|
85
+ | `annotation:command` | `EVENT_TRIGGERS.ANNOTATION_COMMAND` | `src/annotation/index.ts` |
86
+ | `annotation:strokeData` | `EVENT_TRIGGERS.ANNOTATION_STROKE_DATA` | `src/annotation/index.ts` |
87
+ | `meeting:updateAnnotationInfo` | `EVENT_TRIGGERS.MEETING_UPDATE_ANNOTATION_INFO` | `src/meeting/index.ts` |
88
+
89
+ Compatibility notes:
90
+ - 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.
91
+
92
+ ## Requires (dependencies)
93
+
94
+ Approval and Locus URLs, Mercury, LLM sockets/bindings, Webex encryption, annotation constants/types, and participant/device/share identity supplied by callers.
95
+
96
+ ## Requirements
97
+
98
+ | ID | WHAT | WHY | Source Evidence | Test / Example Evidence | Assumptions / Gaps | Confidence |
99
+ |---|---|---|---|---|---|---|
100
+ | `ANNOTATION-R-001` | `locusUrlUpdate()` assigns `locusUrl` and registers the Mercury approval listener plus default/practice-session LLM relay listeners once; `approvalUrlUpdate()` only assigns `approvalUrl`; `deregisterEvents()` removes the callbacks and clears the subscription flag. | Duplicate subscriptions would emit the same annotation event more than once, while attributing registration to the approval URL setter invents a side effect. | `src/annotation/index.ts` | `test/unit/spec/annotation/index.ts` | none | PRESENT |
101
+ | `ANNOTATION-R-002` | Approval methods send the declared action/resource body to the supplied approval URL; stroke sends encrypt content, choose the connected practice-session socket or default socket, and increment `seqNum` after publication. | Approval routing and relay sequence fields are service-visible protocol values and must remain stable. | `src/annotation/index.ts`, `src/annotation/annotation.types.ts` | `test/unit/spec/annotation/index.ts` | late socket selection after encryption and rejected encryption/decryption promises need explicit race/error coverage | PRESENT |
102
+ | `ANNOTATION-R-003` | Approval methods return their request promises; disconnected stroke sends return without work; stroke encryption/decryption uses asynchronous callbacks without a returned caller promise or module retry; deregistration removes the installed Mercury/LLM callbacks. | Callers must not assume encryption failures are converted into approval-style promise rejections or that disconnected strokes are queued. | `src/annotation/` | `test/unit/spec/annotation/index.ts` | none | PRESENT |
103
+
104
+ ## Design Overview
105
+
106
+ The controller subscribes directly to Mercury approval and LLM relay events, performs approval HTTP operations, and encrypts/decrypts relay content before exposing annotation command/stroke events.
107
+
108
+ ## Data Flow
109
+
110
+ ```mermaid
111
+ flowchart LR
112
+ Locus[Locus approval events] --> Controller[index.ts]
113
+ Caller[Meeting / annotation consumer] --> Controller
114
+ Controller --> Approval[HTTP approvalUrl]
115
+ Controller --> Crypto[Webex encryption]
116
+ Crypto --> LLM[LLM relay WebSocket]
117
+ LLM --> Controller
118
+ Controller --> Events[annotation command / stroke events]
119
+ ```
120
+
121
+ ## Sequence Diagram(s)
122
+
123
+ Sequence coverage:
124
+
125
+ | Operation group | Diagram | Failure coverage |
126
+ |---|---|---|
127
+ | UC-1…UC-4 — annotation approval and relay operation groups | Annotation approval and relay primary sequence | approval HTTP rejection, disconnected relay skip, and asynchronous encryption/decryption failure |
128
+ | UC-2 — approval and disconnected-send behavior | Annotation approval and relay alternate/failure sequence | request rejection or initial LLM connectivity false |
129
+
130
+ ### Annotation approval and relay primary sequence
131
+
132
+ ```mermaid
133
+ sequenceDiagram
134
+ participant C as Annotation consumer
135
+ participant A as Annotation index.ts
136
+ participant E as Encryption
137
+ participant L as LLM relay socket
138
+ C->>A: send command or stroke data
139
+ A->>E: encrypt relay payload
140
+ E-->>A: encrypted content
141
+ A->>L: socket.send relay event
142
+ L-->>A: relay event
143
+ A->>E: decrypt content
144
+ E-->>A: annotation payload
145
+ A-->>C: scoped annotation event
146
+ ```
147
+
148
+ ### Annotation approval and relay alternate/failure sequence
149
+
150
+ ```mermaid
151
+ sequenceDiagram
152
+ participant C as Annotation consumer
153
+ participant A as Annotation index.ts
154
+ participant H as Webex request / LLM
155
+ alt approval action
156
+ C->>A: accept / decline / request / cancel / close
157
+ A->>H: HTTP request with action/resource body
158
+ H-->>C: returned request promise outcome
159
+ else sendStrokeData while LLM disconnected
160
+ C->>A: sendStrokeData(stroke)
161
+ A-->>C: return without encryption or socket send
162
+ end
163
+ ```
164
+
165
+ ## Class / Component Relationships
166
+
167
+ ```mermaid
168
+ classDiagram
169
+ class Locus
170
+ class Controller
171
+ class Caller
172
+ class Approval
173
+ class Crypto
174
+ class LLM
175
+ class Events
176
+ Locus --> Controller
177
+ Caller --> Controller
178
+ Controller --> Approval
179
+ Controller --> Crypto
180
+ Crypto --> LLM
181
+ LLM --> Controller
182
+ Controller --> Events
183
+ ```
184
+
185
+ The arrows identify ownership and delegation inside `src/annotation/`; files that only declare types or constants are not presented as transports.
186
+
187
+ ## Use Cases
188
+
189
+ - **UC-1:** Register the approval and default/practice-session relay listeners once when `locusUrlUpdate()` establishes context; update `approvalUrl` independently without registering listeners, then remove installed listeners with `deregisterEvents()`. Evidence: `src/annotation/index.ts`.
190
+ - **UC-2:** Request, cancel, or close annotation for a share instance, optionally routing the request to a specific participant/device. Evidence: `src/annotation/index.ts`.
191
+ - **UC-3:** Accept or decline a presenter approval request by PUTting the exact action to the event-provided URL. Evidence: `src/annotation/index.ts`.
192
+ - **UC-4:** Skip a stroke while LLM is disconnected; otherwise encrypt, select the current practice/default socket after encryption, publish with the next sequence, then decrypt and emit received stroke data. Evidence: `src/annotation/index.ts`.
193
+
194
+ ## State Model
195
+
196
+ The controller stores `seqNum`, `hasSubscribedToEvents`, `approvalUrl`, `locusUrl`, and `deviceUrl`. `seqNum` starts at 1 and increments after each published stroke; `hasSubscribedToEvents` only records whether this controller installed its Mercury/LLM callbacks. The module does not transition between `NO_ANNOTATION` and `RUNNING_ANNOTATION`; those constants are not consumed by current source or tests.
197
+
198
+ ## Business Rules & Invariants
199
+
200
+ - Approval calls use their supplied approval URL and declared action/resource values. Stroke publication is skipped only when the initial LLM connectivity check is false; relay types and sequence fields use the declared wire values. Enforced under `src/annotation/`.
201
+
202
+ ## Concurrency & Reactive Flow
203
+
204
+ - Stroke encryption completes asynchronously. `sendStrokeData` checks LLM connectivity before encryption, while `publishEncrypted` selects the current practice-session/default socket when encryption resolves; the controller has no cancellation or supersession guard.
205
+
206
+ ## Protocol / Wire Format
207
+
208
+ - `index.ts` constructs approval bodies and LLM `publishRequest` envelopes from the request/event/channel types and constants under `src/annotation/`. Preserve action/resource/relay values, receiver and route fields, sequence fields, and encryption metadata.
209
+
210
+ ## Error Handling & Failure Modes
211
+
212
+ | Condition | Signal | Caller recovery |
213
+ |---|---|---|
214
+ | Approval request rejects | The approval method's returned promise rejects with the request failure. | Correct the URL/body or retry under the caller's policy. |
215
+ | LLM is disconnected at the initial stroke-send check | `sendStrokeData` returns `undefined` without encryption or socket send. | Reinvoke only after connectivity is restored. |
216
+ | Stroke encrypt/decrypt rejects | The controller installs no catch and `sendStrokeData` returns no promise, so the failure is not converted into a caller-facing annotation result. | Observe the owning encryption/runtime failure path; do not assume a module retry. |
217
+
218
+ ## Pitfalls
219
+
220
+ - `ANNOTATION_STATUS.NO_ANNOTATION` and `RUNNING_ANNOTATION` are declarations only; do not treat them as a live controller lifecycle without a consuming transition path.
221
+ - Verify both typed constants/enums and raw wire values before changing a logical condition in this legacy package.
222
+
223
+ ## Test-Case Strategy (module)
224
+
225
+ Use the current mirrored suites: `test/unit/spec/annotation/index.ts`. Characterize the annotation-specific use cases above and each listed failure condition; add cleanup or transition cases only for resources and state this module actually owns.
226
+
227
+ | Behavior / Requirement | Existing test evidence | Gap |
228
+ |---|---|---|
229
+ | `ANNOTATION-R-001` | `test/unit/spec/annotation/index.ts` | cover every owned Mercury/LLM topic and action/event payload |
230
+ | `ANNOTATION-R-002` | `test/unit/spec/annotation/index.ts` | cover receiver-present and receiver-absent bodies for requested/canceled/closed actions |
231
+ | `ANNOTATION-R-003` | `test/unit/spec/annotation/index.ts` | assert deregistration removes all three owned listeners and a disconnected stroke performs no encryption or send |
232
+
233
+ ## Traceability
234
+
235
+ - Repo architecture: [`ARCHITECTURE.md`](../../../ai-docs/ARCHITECTURE.md) · Registry: [`SPEC_INDEX.md`](../../../ai-docs/SPEC_INDEX.md)
236
+ - Coverage state and contracts baseline: `../../../.sdd/manifest.json`
@@ -326,10 +326,12 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
326
326
  const data = {
327
327
  id: `${this.seqNum}`,
328
328
  type: 'publishRequest',
329
- recipients: {
330
- // @ts-ignore
331
- route: binding,
332
- },
329
+ recipients: [
330
+ {
331
+ // @ts-ignore
332
+ route: binding,
333
+ },
334
+ ],
333
335
  headers: {
334
336
  to: strokeData.toUserId,
335
337
  },
@@ -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
  /**